hook-fetch 2.3.0 → 2.3.2
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/CHANGELOG.md +12 -0
- package/dist/cjs/index.cjs +2 -2
- package/dist/es/index.mjs +3 -3
- package/dist/umd/index.js +5 -5
- package/package.json +1 -1
- package/types/baseClass-BYjVeiZn.d.ts +23 -0
- package/types/index.d.ts +93 -3
- package/types/plugins/index.d.ts +2 -2
- package/types/plugins/sse.d.ts +2 -2
- package/types/react/index.d.ts +3 -3
- package/types/{sse-DpKfrPVN.d.ts → sse-B2EqUaS9.d.ts} +1 -1
- package/types/{types-DKk321dw.d.ts → types-DOFlmwin.d.ts} +2 -2
- package/types/vue/index.d.ts +3 -3
- package/types/index-C-WVDJU7.d.ts +0 -112
package/CHANGELOG.md
CHANGED
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./chunk.cjs`),t=require(`./error.cjs`),n=(e,t)=>e?!t||t.length===0?e:t.reduce((e,t)=>(delete e[t],e),{...e}):{};let r=function(e){return e.JSON=`application/json`,e.FORM_URLENCODED=`application/x-www-form-urlencoded`,e.FORM_DATA=`multipart/form-data`,e.TEXT=`text/plain`,e.HTML=`text/html`,e.XML=`text/xml`,e.CSV=`text/csv`,e.STREAM=`application/octet-stream`,e}({}),i=function(e){return e[e.TIME_OUT=408]=`TIME_OUT`,e[e.ABORTED=499]=`ABORTED`,e[e.NETWORK_ERROR=599]=`NETWORK_ERROR`,e[e.BODY_NULL=502]=`BODY_NULL`,e[e.UNKNOWN=601]=`UNKNOWN`,e}({}),a=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.DELETE=`DELETE`,e.PATCH=`PATCH`,e.HEAD=`HEAD`,e.OPTIONS=`OPTIONS`,e}({});const o=[`PATCH`,`POST`,`PUT`,`DELETE`,`OPTIONS`],s=[`GET`,`HEAD`];function c(e,t,n,i={arrayFormat:`repeat`}){if(!e)return null;if(e instanceof FormData)return e;let a=null;if(o.includes(t.toUpperCase())){let t=new Headers(n||{}),o=t.get(`Content-Type`)||r.JSON;if(o.includes(r.JSON))a=JSON.stringify(e);else if(o.includes(r.FORM_URLENCODED))a=qs.stringify(e,i);else if(o.includes(r.FORM_DATA)){let t=new FormData;if(!(e instanceof FormData)&&typeof e==`object`){let n=e;Object.keys(n).forEach(e=>{n.prototype.hasOwnProperty.call(e)&&t.append(e,n[e])}),a=t}}else (typeof e==`string`||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof ReadableStream<`u`&&e instanceof ReadableStream)&&(a=e)}return s.includes(t.toUpperCase())&&(a=null),a}function l(e){if(e instanceof FormData)return e;let t=new FormData;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];r instanceof File||r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}var u=e.__commonJSMin((exports,t)=>{t.exports=TypeError}),d=e.__commonJSMin((exports,t)=>{t.exports=require(`util`).inspect}),f=e.__commonJSMin((exports,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype,f=u?WeakMap.prototype.has:null,p=typeof WeakSet==`function`&&WeakSet.prototype,m=p?WeakSet.prototype.has:null,h=typeof WeakRef==`function`&&WeakRef.prototype,g=h?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,v=Object.prototype.toString,y=Function.prototype.toString,b=String.prototype.match,x=String.prototype.slice,S=String.prototype.replace,C=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,E=Array.prototype.concat,D=Array.prototype.join,ee=Array.prototype.slice,O=Math.floor,k=typeof BigInt==`function`?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,j=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,M=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,N=typeof Symbol==`function`&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||`symbol`)?Symbol.toStringTag:null,te=Object.prototype.propertyIsEnumerable,P=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function F(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||T.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-O(-e):O(e);if(r!==e){var i=String(r),a=x.call(t,i.length+1);return S.call(i,n,`$&_`)+`.`+S.call(S.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return S.call(t,n,`$&_`)}var I=d(),L=I.custom,ne=ue(L)?L:null,re={__proto__:null,double:`"`,single:`'`},R={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(W(s,`quoteStyle`)&&!W(re,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(W(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=W(s,`customInspect`)?s.customInspect:!0;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return Y(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?F(t,f):f}if(typeof t==`bigint`){var p=String(t)+`n`;return d?F(t,p):p}var m=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=m&&m>0&&typeof t==`object`)return ae(t)?`[Array]`:`[Object]`;var h=ye(s,r);if(o===void 0)o=[];else if(pe(o,t)>=0)return`[Circular]`;function g(t,n,i){if(n&&(o=ee.call(o),o.push(n)),i){var a={depth:s.depth};return W(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!se(t)){var v=fe(t),y=xe(t,g);return`[Function`+(v?`: `+v:` (anonymous)`)+`]`+(y.length>0?` { `+D.call(y,`, `)+` }`:``)}if(ue(t)){var b=M?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):j.call(t);return typeof t==`object`&&!M?Z(b):b}if(ge(t)){for(var C=`<`+w.call(String(t.nodeName)),T=t.attributes||[],O=0;O<T.length;O++)C+=` `+T[O].name+`=`+z(ie(T[O].value),`double`,s);return C+=`>`,t.childNodes&&t.childNodes.length&&(C+=`...`),C+=`</`+w.call(String(t.nodeName))+`>`,C}if(ae(t)){if(t.length===0)return`[]`;var A=xe(t,g);return h&&!ve(A)?`[`+be(A,h)+`]`:`[ `+D.call(A,`, `)+` ]`}if(V(t)){var L=xe(t,g);return!(`cause`in Error.prototype)&&`cause`in t&&!te.call(t,`cause`)?`{ [`+String(t)+`] `+D.call(E.call(`[cause]: `+g(t.cause),L),`, `)+` }`:L.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+D.call(L,`, `)+` }`}if(typeof t==`object`&&u){if(ne&&typeof t[ne]==`function`&&I)return I(t,{depth:m-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(me(t)){var R=[];return a&&a.call(t,function(e,n){R.push(g(n,t,!0)+` => `+g(e,t))}),_e(`Map`,i.call(t),R,h)}if(J(t)){var B=[];return l&&l.call(t,function(e){B.push(g(e,t))}),_e(`Set`,c.call(t),B,h)}if(K(t))return Q(`WeakMap`);if(he(t))return Q(`WeakSet`);if(q(t))return Q(`WeakRef`);if(ce(t))return Z(g(Number(t)));if(de(t))return Z(g(k.call(t)));if(le(t))return Z(_.call(t));if(H(t))return Z(g(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!oe(t)&&!se(t)){var U=xe(t,g),X=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,Se=t instanceof Object?``:`null prototype`,Ce=!X&&N&&Object(t)===t&&N in t?x.call(G(t),8,-1):Se?`Object`:``,we=X||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``,Te=we+(Ce||Se?`[`+D.call(E.call([],Ce||[],Se||[]),`: `)+`] `:``);return U.length===0?Te+`{}`:h?Te+`{`+be(U,h)+`}`:Te+`{ `+D.call(U,`, `)+` }`}return String(t)};function z(e,t,n){var r=n.quoteStyle||t,i=re[r];return i+e+i}function ie(e){return S.call(String(e),/"/g,`"`)}function B(e){return!N||!(typeof e==`object`&&(N in e||e[N]!==void 0))}function ae(e){return G(e)===`[object Array]`&&B(e)}function oe(e){return G(e)===`[object Date]`&&B(e)}function se(e){return G(e)===`[object RegExp]`&&B(e)}function V(e){return G(e)===`[object Error]`&&B(e)}function H(e){return G(e)===`[object String]`&&B(e)}function ce(e){return G(e)===`[object Number]`&&B(e)}function le(e){return G(e)===`[object Boolean]`&&B(e)}function ue(e){if(M)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!j)return!1;try{return j.call(e),!0}catch{}return!1}function de(e){if(!e||typeof e!=`object`||!k)return!1;try{return k.call(e),!0}catch{}return!1}var U=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return U.call(e,t)}function G(e){return v.call(e)}function fe(e){if(e.name)return e.name;var t=b.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function pe(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function me(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function K(e){if(!f||!e||typeof e!=`object`)return!1;try{f.call(e,f);try{m.call(e,m)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function q(e){if(!g||!e||typeof e!=`object`)return!1;try{return g.call(e),!0}catch{}return!1}function J(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function he(e){if(!m||!e||typeof e!=`object`)return!1;try{m.call(e,m);try{f.call(e,f)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ge(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement?!0:typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function Y(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return Y(x.call(e,0,t.maxStringLength),t)+r}var i=R[t.quoteStyle||`single`];i.lastIndex=0;var a=S.call(S.call(e,i,`\\$1`),/[\x00-\x1f]/g,X);return z(a,`single`,t)}function X(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+C.call(t.toString(16))}function Z(e){return`Object(`+e+`)`}function Q(e){return e+` { ? }`}function _e(e,t,n,r){var i=r?be(n,r):D.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function ve(e){for(var t=0;t<e.length;t++)if(pe(e[t],`
|
|
1
|
+
Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./chunk.cjs`),t=require(`./error.cjs`),n=(e,t)=>e?!t||t.length===0?e:t.reduce((e,t)=>(delete e[t],e),{...e}):{};let r=function(e){return e.JSON=`application/json`,e.FORM_URLENCODED=`application/x-www-form-urlencoded`,e.FORM_DATA=`multipart/form-data`,e.TEXT=`text/plain`,e.HTML=`text/html`,e.XML=`text/xml`,e.CSV=`text/csv`,e.STREAM=`application/octet-stream`,e}({}),i=function(e){return e[e.TIME_OUT=408]=`TIME_OUT`,e[e.ABORTED=499]=`ABORTED`,e[e.NETWORK_ERROR=599]=`NETWORK_ERROR`,e[e.BODY_NULL=502]=`BODY_NULL`,e[e.UNKNOWN=601]=`UNKNOWN`,e}({}),a=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.DELETE=`DELETE`,e.PATCH=`PATCH`,e.HEAD=`HEAD`,e.OPTIONS=`OPTIONS`,e}({});var o=class e extends Error{message;name;status;statusText;response;config;constructor({message:t,status:n,statusText:r,response:i,config:a,name:o}){super(t),this.message=t,this.status=n,this.statusText=r,this.response=i,this.config=a,this.name=o??t,Object.setPrototypeOf(this,e.prototype)}},s=e.__commonJSMin((exports,t)=>{t.exports=TypeError}),c=e.__commonJSMin((exports,t)=>{t.exports=require(`util`).inspect}),l=e.__commonJSMin((exports,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,l=o&&s&&typeof s.get==`function`?s.get:null,u=o&&Set.prototype.forEach,d=typeof WeakMap==`function`&&WeakMap.prototype,f=d?WeakMap.prototype.has:null,p=typeof WeakSet==`function`&&WeakSet.prototype,m=p?WeakSet.prototype.has:null,h=typeof WeakRef==`function`&&WeakRef.prototype,g=h?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,v=Object.prototype.toString,y=Function.prototype.toString,b=String.prototype.match,x=String.prototype.slice,S=String.prototype.replace,C=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,E=Array.prototype.concat,D=Array.prototype.join,ee=Array.prototype.slice,O=Math.floor,te=typeof BigInt==`function`?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,A=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,j=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,M=typeof Symbol==`function`&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||`symbol`)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,P=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function F(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||T.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-O(-e):O(e);if(r!==e){var i=String(r),a=x.call(t,i.length+1);return S.call(i,n,`$&_`)+`.`+S.call(S.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return S.call(t,n,`$&_`)}var I=c(),L=I.custom,R=le(L)?L:null,ne={__proto__:null,double:`"`,single:`'`},re={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(K(s,`quoteStyle`)&&!K(ne,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(K(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=K(s,`customInspect`)?s.customInspect:!0;if(typeof c!=`boolean`&&c!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return X(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?F(t,f):f}if(typeof t==`bigint`){var p=String(t)+`n`;return d?F(t,p):p}var m=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=m&&m>0&&typeof t==`object`)return ie(t)?`[Array]`:`[Object]`;var h=ye(s,r);if(o===void 0)o=[];else if(de(o,t)>=0)return`[Circular]`;function g(t,n,i){if(n&&(o=ee.call(o),o.push(n)),i){var a={depth:s.depth};return K(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!oe(t)){var v=ue(t),y=xe(t,g);return`[Function`+(v?`: `+v:` (anonymous)`)+`]`+(y.length>0?` { `+D.call(y,`, `)+` }`:``)}if(le(t)){var b=j?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):A.call(t);return typeof t==`object`&&!j?Z(b):b}if(Y(t)){for(var C=`<`+w.call(String(t.nodeName)),T=t.attributes||[],O=0;O<T.length;O++)C+=` `+T[O].name+`=`+z(B(T[O].value),`double`,s);return C+=`>`,t.childNodes&&t.childNodes.length&&(C+=`...`),C+=`</`+w.call(String(t.nodeName))+`>`,C}if(ie(t)){if(t.length===0)return`[]`;var k=xe(t,g);return h&&!ve(k)?`[`+be(k,h)+`]`:`[ `+D.call(k,`, `)+` ]`}if(H(t)){var L=xe(t,g);return!(`cause`in Error.prototype)&&`cause`in t&&!N.call(t,`cause`)?`{ [`+String(t)+`] `+D.call(E.call(`[cause]: `+g(t.cause),L),`, `)+` }`:L.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+D.call(L,`, `)+` }`}if(typeof t==`object`&&c){if(R&&typeof t[R]==`function`&&I)return I(t,{depth:m-r});if(c!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(fe(t)){var re=[];return a&&a.call(t,function(e,n){re.push(g(n,t,!0)+` => `+g(e,t))}),_e(`Map`,i.call(t),re,h)}if(me(t)){var V=[];return u&&u.call(t,function(e){V.push(g(e,t))}),_e(`Set`,l.call(t),V,h)}if(J(t))return Q(`WeakMap`);if(he(t))return Q(`WeakSet`);if(pe(t))return Q(`WeakRef`);if(se(t))return Z(g(Number(t)));if(W(t))return Z(g(te.call(t)));if(ce(t))return Z(_.call(t));if(U(t))return Z(g(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!ae(t)&&!oe(t)){var G=xe(t,g),ge=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,Se=t instanceof Object?``:`null prototype`,Ce=!ge&&M&&Object(t)===t&&M in t?x.call(q(t),8,-1):Se?`Object`:``,we=ge||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``,Te=we+(Ce||Se?`[`+D.call(E.call([],Ce||[],Se||[]),`: `)+`] `:``);return G.length===0?Te+`{}`:h?Te+`{`+be(G,h)+`}`:Te+`{ `+D.call(G,`, `)+` }`}return String(t)};function z(e,t,n){var r=n.quoteStyle||t,i=ne[r];return i+e+i}function B(e){return S.call(String(e),/"/g,`"`)}function V(e){return!M||!(typeof e==`object`&&(M in e||e[M]!==void 0))}function ie(e){return q(e)===`[object Array]`&&V(e)}function ae(e){return q(e)===`[object Date]`&&V(e)}function oe(e){return q(e)===`[object RegExp]`&&V(e)}function H(e){return q(e)===`[object Error]`&&V(e)}function U(e){return q(e)===`[object String]`&&V(e)}function se(e){return q(e)===`[object Number]`&&V(e)}function ce(e){return q(e)===`[object Boolean]`&&V(e)}function le(e){if(j)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!A)return!1;try{return A.call(e),!0}catch{}return!1}function W(e){if(!e||typeof e!=`object`||!te)return!1;try{return te.call(e),!0}catch{}return!1}var G=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return G.call(e,t)}function q(e){return v.call(e)}function ue(e){if(e.name)return e.name;var t=b.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function de(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function fe(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{l.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function J(e){if(!f||!e||typeof e!=`object`)return!1;try{f.call(e,f);try{m.call(e,m)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function pe(e){if(!g||!e||typeof e!=`object`)return!1;try{return g.call(e),!0}catch{}return!1}function me(e){if(!l||!e||typeof e!=`object`)return!1;try{l.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function he(e){if(!m||!e||typeof e!=`object`)return!1;try{m.call(e,m);try{f.call(e,f)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Y(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement?!0:typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function X(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return X(x.call(e,0,t.maxStringLength),t)+r}var i=re[t.quoteStyle||`single`];i.lastIndex=0;var a=S.call(S.call(e,i,`\\$1`),/[\x00-\x1f]/g,ge);return z(a,`single`,t)}function ge(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+C.call(t.toString(16))}function Z(e){return`Object(`+e+`)`}function Q(e){return e+` { ? }`}function _e(e,t,n,r){var i=r?be(n,r):D.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function ve(e){for(var t=0;t<e.length;t++)if(de(e[t],`
|
|
2
2
|
`)>=0)return!1;return!0}function ye(e,t){var n;if(e.indent===` `)n=` `;else if(typeof e.indent==`number`&&e.indent>0)n=D.call(Array(e.indent+1),` `);else return null;return{base:n,prev:D.call(Array(t+1),n)}}function be(e,t){if(e.length===0)return``;var n=`
|
|
3
3
|
`+t.prev+t.base;return n+D.call(e,`,`+n)+`
|
|
4
|
-
`+t.prev}function xe(e,t){var n=ae(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=W(e,i)?t(e[i],e):``}var a=typeof A==`function`?A(e):[],o;if(M){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e){if(!W(e,c)||n&&String(Number(c))===c&&c<e.length||M&&o[`$`+c]instanceof Symbol)continue;T.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))}if(typeof A==`function`)for(var l=0;l<a.length;l++)te.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}}),p=e.__commonJSMin((exports,t)=>{var n=f(),r=u(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=e&&e.next,r=c(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}}),m=e.__commonJSMin((exports,t)=>{t.exports=Object}),h=e.__commonJSMin((exports,t)=>{t.exports=Error}),g=e.__commonJSMin((exports,t)=>{t.exports=EvalError}),_=e.__commonJSMin((exports,t)=>{t.exports=RangeError}),v=e.__commonJSMin((exports,t)=>{t.exports=ReferenceError}),y=e.__commonJSMin((exports,t)=>{t.exports=SyntaxError}),b=e.__commonJSMin((exports,t)=>{t.exports=URIError}),x=e.__commonJSMin((exports,t)=>{t.exports=Math.abs}),S=e.__commonJSMin((exports,t)=>{t.exports=Math.floor}),C=e.__commonJSMin((exports,t)=>{t.exports=Math.max}),w=e.__commonJSMin((exports,t)=>{t.exports=Math.min}),T=e.__commonJSMin((exports,t)=>{t.exports=Math.pow}),E=e.__commonJSMin((exports,t)=>{t.exports=Math.round}),D=e.__commonJSMin((exports,t)=>{t.exports=Number.isNaN||function(e){return e!==e}}),ee=e.__commonJSMin((exports,t)=>{var n=D();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}}),O=e.__commonJSMin((exports,t)=>{t.exports=Object.getOwnPropertyDescriptor}),k=e.__commonJSMin((exports,t)=>{var n=O();if(n)try{n([],`length`)}catch{n=null}t.exports=n}),A=e.__commonJSMin((exports,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n}),j=e.__commonJSMin((exports,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}}),M=e.__commonJSMin((exports,t)=>{var n=typeof Symbol<`u`&&Symbol,r=j();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}}),N=e.__commonJSMin((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null}),te=e.__commonJSMin((exports,t)=>{var n=m();t.exports=n.getPrototypeOf||null}),P=e.__commonJSMin((exports,t)=>{var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}}),F=e.__commonJSMin((exports,t)=>{var n=P();t.exports=Function.prototype.bind||n}),I=e.__commonJSMin((exports,t)=>{t.exports=Function.prototype.call}),L=e.__commonJSMin((exports,t)=>{t.exports=Function.prototype.apply}),ne=e.__commonJSMin((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply}),re=e.__commonJSMin((exports,t)=>{var n=F(),r=L(),i=I(),a=ne();t.exports=a||n.call(i,r)}),R=e.__commonJSMin((exports,t)=>{var n=F(),r=u(),i=I(),a=re();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}}),z=e.__commonJSMin((exports,t)=>{var n=R(),r=k(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1}),ie=e.__commonJSMin((exports,t)=>{var n=N(),r=te(),i=z();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null}),B=e.__commonJSMin((exports,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty,i=F();t.exports=i.call(n,r)}),ae=e.__commonJSMin((exports,t)=>{var n,r=m(),i=h(),a=g(),o=_(),s=v(),c=y(),l=u(),d=b(),f=x(),p=S(),D=C(),O=w(),j=T(),P=E(),ne=ee(),re=Function,R=function(e){try{return re(`"use strict"; return (`+e+`).constructor;`)()}catch{}},z=k(),ae=A(),oe=function(){throw new l},se=z?function(){try{return arguments.callee,oe}catch{try{return z(arguments,`callee`).get}catch{return oe}}}():oe,V=M()(),H=ie(),ce=te(),le=N(),ue=L(),de=I(),U={},W=typeof Uint8Array>`u`||!H?n:H(Uint8Array),G={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":V&&H?H([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":U,"%AsyncGenerator%":U,"%AsyncGeneratorFunction%":U,"%AsyncIteratorPrototype%":U,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":re,"%GeneratorFunction%":U,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":V&&H?H(H([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!V||!H?n:H(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":z,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!V||!H?n:H(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":V&&H?H(``[Symbol.iterator]()):n,"%Symbol%":V?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":se,"%TypedArray%":W,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":de,"%Function.prototype.apply%":ue,"%Object.defineProperty%":ae,"%Object.getPrototypeOf%":ce,"%Math.abs%":f,"%Math.floor%":p,"%Math.max%":D,"%Math.min%":O,"%Math.pow%":j,"%Math.round%":P,"%Math.sign%":ne,"%Reflect.getPrototypeOf%":le};if(H)try{null.error}catch(e){var fe=H(H(e));G[`%Error.prototype%`]=fe}var pe=function e(t){var n;if(t===`%AsyncFunction%`)n=R(`async function () {}`);else if(t===`%GeneratorFunction%`)n=R(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=R(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&H&&(n=H(i.prototype))}return G[t]=n,n},me={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},K=F(),q=B(),J=K.call(de,Array.prototype.concat),he=K.call(ue,Array.prototype.splice),ge=K.call(de,String.prototype.replace),Y=K.call(de,String.prototype.slice),X=K.call(de,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,_e=function(e){var t=Y(e,0,1),n=Y(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return ge(e,Z,function(e,t,n,i){r[r.length]=n?ge(i,Q,`$1`):t||e}),r},ve=function(e,t){var n=e,r;if(q(me,n)&&(r=me[n],n=`%`+r[0]+`%`),q(G,n)){var i=G[n];if(i===U&&(i=pe(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(X(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=_e(e),r=n.length>0?n[0]:``,i=ve(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],he(n,J([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=Y(p,0,1),h=Y(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,q(G,a))o=G[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(z&&d+1>=n.length){var g=z(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=q(o,p),o=o[p];f&&!s&&(G[a]=o)}}return o}}),oe=e.__commonJSMin((exports,t)=>{var n=ae(),r=R(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}}),se=e.__commonJSMin((exports,t)=>{var n=ae(),r=oe(),i=f(),a=u(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),d=r(`Map.prototype.delete`,!0),p=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=d(e,t);return p(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}}),V=e.__commonJSMin((exports,t)=>{var n=ae(),r=oe(),i=f(),a=se(),o=u(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),d=r(`WeakMap.prototype.has`,!0),p=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return p(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?d(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a}),H=e.__commonJSMin((exports,t)=>{var n=u(),r=f(),i=p(),a=se(),o=V(),s=o||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+r(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=s(),e.set(t,n)}};return t}}),ce=e.__commonJSMin((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),le=e.__commonJSMin((exports,t)=>{var n=ce(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a<n.length;++a)n[a]!==void 0&&r.push(n[a]);t.obj[t.prop]=r}}},s=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},c=function e(t,n,a){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(i(t))t.push(n);else if(t&&typeof t==`object`)(a&&(a.plainObjects||a.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!=`object`)return[t].concat(n);var o=t;return i(t)&&!i(n)&&(o=s(t,a)),i(t)&&i(n)?(n.forEach(function(n,i){if(r.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,a):t.push(n)}else t[i]=n}),t):Object.keys(n).reduce(function(t,i){var o=n[i];return r.call(t,i)?t[i]=e(t[i],o,a):t[i]=o,t},o)},l=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},u=function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},d=1024,f=function(e,t,r,i,o){if(e.length===0)return e;var s=e;if(typeof e==`symbol`?s=Symbol.prototype.toString.call(e):typeof e!=`string`&&(s=String(e)),r===`iso-8859-1`)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});for(var c=``,l=0;l<s.length;l+=d){for(var u=s.length>=d?s.slice(l,l+d):s,f=[],p=0;p<u.length;++p){var m=u.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u==`object`&&u&&n.indexOf(u)===-1&&(t.push({obj:a,prop:l}),n.push(u))}return o(t),e},m=function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},h=function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},g=function(e,t){return[].concat(e,t)},_=function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)};t.exports={arrayToObject:s,assign:l,combine:g,compact:p,decode:u,encode:f,isBuffer:h,isRegExp:m,maybeMap:_,merge:c}}),ue=e.__commonJSMin((exports,t)=>{var n=H(),r=le(),i=ce(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,ee=0,O=!1;(D=D.get(m))!==void 0&&!O;){var k=D.get(t);if(ee+=1,k!==void 0){if(k===ee)throw RangeError(`Cyclic object value`);O=!0}D.get(m)===void 0&&(ee=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var A=C?i:g(i,f.encoder,w,`key`,x);return[S(A)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var j=[];if(E===void 0)return j;var M;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),M=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))M=_;else{var N=Object.keys(E);M=v?N.sort(v):N}var te=h?String(i).replace(/\./g,`%2E`):String(i),P=o&&s(E)&&E.length===1?te+`[]`:te;if(c&&s(E)&&E.length===0)return P+`[]`;for(var F=0;F<M.length;++F){var I=M[F],L=typeof I==`object`&&I&&I.value!==void 0?I.value:E[I];if(!(d&&L===null)){var ne=y&&h?String(I).replace(/\./g,`%2E`):String(I),re=s(E)?typeof a==`function`?a(P,ne):P:P+(y?`.`+ne:`[`+ne+`]`);T.set(t,ee);var R=n();R.set(m,T),l(j,e(L,re,a,o,c,u,d,h,a===`comma`&&C&&s(E)?null:g,_,v,y,b,x,S,C,w,R))}}return j},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l;if(l=e.arrayFormat in o?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat,`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0?!0:f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m],v=r[_];i.skipNulls&&v===null||l(u,h(v,_,d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B&`:b+=`utf8=%E2%9C%93&`),y.length>0?b+y:``}}),de=e.__commonJSMin((exports,t)=>{var n=le(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<p.length;++h)p[h].indexOf(`utf8=`)===0&&(p[h]===l?g=`utf-8`:p[h]===c&&(g=`iso-8859-1`),m=h,h=p.length);for(h=0;h<p.length;++h)if(h!==m){var _=p[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b,x;y===-1?(b=t.decoder(_,a.decoder,g,`key`),x=t.strictNullHandling?null:``):(b=t.decoder(_.slice(0,y),a.decoder,g,`key`),x=n.maybeMap(s(_.slice(y+1),t,i(u[b])?u[b].length:0),function(e){return t.decoder(e,a.decoder,g,`value`)})),x&&t.interpretNumericEntities&&g===`iso-8859-1`&&(x=o(String(x))),_.indexOf(`[]=`)>-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f<n.depth;){if(f+=1,!n.plainObjects&&r.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}if(c){if(n.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+n.depth+` and strictDepth is true`);u.push(`[`+a.slice(c.index)+`]`)}return d(u,t,n,i)}},p=function(e){if(!e)return a;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?a.charset:e.charset,r=e.duplicates===void 0?a.duplicates:e.duplicates;if(r!==`combine`&&r!==`first`&&r!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);var i=e.allowDots===void 0?e.decodeDotInKeys===!0?!0:a.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:a.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:a.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:a.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:a.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:a.decoder,delimiter:typeof e.delimiter==`string`||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:a.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:a.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:a.strictDepth,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`?e.throwOnLimitExceeded:!1}};t.exports=function(e,t){var r=p(t);if(e===``||e==null)return r.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?u(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],l=f(c,i[c],r,typeof e==`string`);a=n.merge(a,l,r)}return r.allowSparse===!0?a:n.compact(a)}}),U=e.__commonJSMin((exports,t)=>{var n=ue(),r=de(),i=ce();t.exports={formats:i,parse:r,stringify:n}}),W=e.__toESM(U(),1);const G={arrayFormat:`repeat`};function fe(e,t,n={arrayFormat:`repeat`}){if(t){let r=W.default.stringify(t,n);r&&(e=e.includes(`?`)?`${e}&${r}`:`${e}?${r}`)}return e}function pe(e={},t={}){let n=e instanceof Headers?e:new Headers(e),r=e=>{e instanceof Headers||(e=new Headers(e)),e.forEach((e,t)=>{n.set(t,e)})};return r(t),n}function me(e){return e[Symbol.toStringTag]===`Generator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.iterator]==`function`}function K(e){return e[Symbol.toStringTag]===`AsyncGenerator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.asyncIterator]==`function`}function q(e){let t=new Map;e.forEach(e=>{t.set(e.name,e)});let n=Array.from(t.values()).sort((e,t)=>(e.priority??0)-(t.priority??0)),r=[],i=[],a=[],o=[],s=[],c=[];return n.forEach(e=>{e.beforeRequest&&r.push(e.beforeRequest),e.afterResponse&&i.push(e.afterResponse),e.onError&&a.push(e.onError),e.onFinally&&o.push(e.onFinally),e.transformStreamChunk&&s.push(e.transformStreamChunk),e.beforeStream&&c.push(e.beforeStream)}),{beforeRequestPlugins:r,afterResponsePlugins:i,errorPlugins:a,finallyPlugins:o,beforeStreamPlugins:c,transformStreamChunkPlugins:s}}var J=function(e){return e.JSON=`json`,e.BLOB=`blob`,e.TEXT=`text`,e.ARRAY_BUFFER=`arrayBuffer`,e.FORM_DATA=`formData`,e.BYTES=`bytes`,e}(J||{}),he=class e{#plugins;#sourcePlugins;#controller;#config;#promise=null;#isTimeout=!1;#executor=null;#finallyCallbacks=new Set;#responseType=`json`;#fullOptions;constructor(e){this.#fullOptions=e;let{plugins:t=[],controller:n,url:r,baseURL:i=``,params:a,data:o,qsConfig:s={},withCredentials:c=!1,extra:l,method:u=`GET`,headers:d={}}=e;this.#controller=n??new AbortController,this.#sourcePlugins=t,this.#plugins=q(t),this.#config={url:r,baseURL:i,params:a,data:o,withCredentials:c,extra:l,method:u,headers:d,qsConfig:Object.assign(G,s)},this.#promise=this.#init(e)}#init({timeout:e}){return new Promise(async(r,a)=>{let o=this.#config,{beforeRequestPlugins:s}=this.#plugins,l=null;for(let e of s)try{if(o=await e(o),o.resolve){let e=o.resolve();e instanceof Response?r(e):r(new Response(e))}}catch(e){l=e;break}if(l)return this.#promise=null,a(l);let u=fe(o.baseURL+o.url,o.params,o.qsConfig),d=c(o.data??null,o.method,o.headers,o.qsConfig),f=n(o??{},[`baseURL`,`data`,`extra`,`headers`,`method`,`params`,`url`,`withCredentials`]),p={...f,method:o.method,headers:o.headers,signal:this.#controller.signal,credentials:o.withCredentials?`include`:`omit`,body:d},m=fetch(u,p),h=[m],g=null;if(e){let t=new Promise(t=>{g=setTimeout(()=>{this.#isTimeout=!0,this.#controller?.abort()},e)});h.push(t)}try{let e=await Promise.race(h);e?(e.ok&&r(e),l=new t.ResponseError({message:`Fail Request`,status:e.status,statusText:e.statusText,config:this.#config,name:`Fail Request`,response:e})):l=new t.ResponseError({message:`NETWORK_ERROR`,status:i.NETWORK_ERROR,statusText:`Network Error`,config:this.#config,name:`Network Error`})}catch(e){l=e,this.#promise=null}finally{l&&a(l),g&&clearTimeout(g)}})}async#createNormalizeError(e){if(e instanceof t.ResponseError)return e;let n;return n=this.#promise?await this.#response:void 0,e instanceof TypeError?e.name===`AbortError`?this.#isTimeout?new t.ResponseError({message:`Request timeout`,status:i.TIME_OUT,statusText:`Request timeout`,config:this.#config,name:`Request timeout`,response:n}):new t.ResponseError({message:`Request aborted`,status:i.ABORTED,statusText:`Request aborted`,config:this.#config,name:`Request aborted`,response:n}):new t.ResponseError({message:e.message,status:i.NETWORK_ERROR,statusText:`Unknown Request Error`,config:this.#config,name:e.name,response:n}):new t.ResponseError({message:e?.message??`Unknown Request Error`,status:i.UNKNOWN,statusText:`Unknown Request Error`,config:this.#config,name:`Unknown Request Error`,response:n})}async#normalizeError(e){let t=await this.#createNormalizeError(e);for(let e of this.#plugins.errorPlugins)t=await e(t,this.#config);return t.__normalized=!0,t}#execFinally(){for(let e of this.#finallyCallbacks)e();this.#plugins.finallyPlugins.forEach(e=>{e({config:this.#config})}),this.#finallyCallbacks.clear(),this.#plugins.finallyPlugins.length!==this.#sourcePlugins?.length&&(this.#plugins=q(this.#sourcePlugins))}get#getExecutor(){return this.#executor?this.#executor:this.#response}async#resolve(e){let t=this.#plugins.afterResponsePlugins,n={config:this.#config,response:await this.#response,responseType:this.#responseType,controller:this.#controller,result:e};try{for(let e of t)n=await e(n,this.#config);return n.result}catch(e){return Promise.reject(e)}}then(e,t){return this.#getExecutor.then(async t=>e?.call(this,await this.#resolve(t)),async e=>t?.call(this,await this.#normalizeError(e)))}catch(e){return this.#getExecutor.catch(e)}finally(e){this.#finallyCallbacks.add(e)}abort(){this.#controller.abort()}get#response(){return this.#promise?this.#promise.then(e=>e.clone()).catch(async e=>{throw await this.#normalizeError(e)}):Promise.reject(Error(`Response is null`))}json(){return this.#then(J.JSON,this.#response?.then(e=>e.json()))}blob(){return this.#then(J.BLOB,this.#response?.then(e=>e.blob()))}text(){return this.#then(J.TEXT,this.#response?.then(e=>e.text()))}arrayBuffer(){return this.#then(J.ARRAY_BUFFER,this.#response.then(e=>e.arrayBuffer()))}#then(e,t){return this.#executor=t.then(t=>(this.#responseType=e,this.#resolve(t))).catch(async t=>{throw this.#responseType=e,t.__normalized?t:await this.#normalizeError(t)}).finally(this.#execFinally.bind(this)),this.#executor}formData(){return this.#then(J.FORM_DATA,this.#response.then(e=>e.formData()))}bytes(){return this.#then(J.BYTES,this.#response.then(e=>e.bytes()))}__injectPlugins__(e){let t=[...this.#sourcePlugins,...e];this.#plugins=q(t)}async*stream(){let e=(await this.#response)?.body;if(!e)throw Error(`Response body is null`);for(let t of this.#plugins.beforeStreamPlugins)e=await t(e,this.#config);let t=e.getReader();if(!t)throw Error(`Response body reader is null`);try{for(;;){let{done:e,value:n}=await t.read();if(e)break;let r={source:n,result:n,error:null};try{for(let e of this.#plugins.transformStreamChunkPlugins)r=await e(r,this.#config);if(r.result&&(me(r.result)||K(r.result)))for await(let e of r.result){let t={source:r.source,result:e,error:null};yield t}else yield r}catch(e){r.error=e,r.result=null,yield r}}}catch(e){return this.#normalizeError(e)}finally{t.releaseLock(),this.#execFinally()}}retry(){let{controller:t,...n}=this.#fullOptions;return new e(n)}get response(){return this.#response}};function ge(e){return new he(e)}var Y=class{#timeout;#baseURL;#commonHeaders;#queue=[];#plugins=[];#withCredentials;#qsConfig;constructor({timeout:e=0,baseURL:t=``,headers:n={},plugins:r=[],withCredentials:i=!1,qsConfig:a={}}){this.#timeout=e,this.#baseURL=t,this.#commonHeaders=n,this.#plugins=r,this.#withCredentials=i,this.#qsConfig=a,this.request=this.request.bind(this),this.get=this.get.bind(this),this.head=this.head.bind(this),this.options=this.options.bind(this),this.delete=this.delete.bind(this),this.post=this.post.bind(this),this.put=this.put.bind(this),this.patch=this.patch.bind(this),this.abortAll=this.abortAll.bind(this),this.use=this.use.bind(this)}use(e){return this.#plugins.push(e),this}request(e,{timeout:t,headers:n,method:r=`GET`,params:i={},data:a={},qsConfig:o={},withCredentials:s,extra:c={},plugins:l=[]}={}){let u=new AbortController;this.#queue.push(u);let d=this,f={name:`hook-fetch-inner-wrapper`,priority:2**53-1,onFinally(){d.#queue=d.#queue.filter(e=>e!==u)}},p=ge({url:e,baseURL:this.#baseURL,timeout:t??this.#timeout,plugins:[...this.#plugins,...l,f],headers:pe(this.#commonHeaders,n),controller:u,method:r,params:i,data:a,qsConfig:Object.assign(this.#qsConfig,o),withCredentials:s??this.#withCredentials,extra:c});return p}#requestWithParams(e,t={},n={}){return this.request(e,{...n,params:t})}#requestWithBody(e,t={},n={}){return this.request(e,{...n,data:t})}get(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`GET`})}head(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`HEAD`})}options(e,t={},n){return this.request(e,{...n,method:`OPTIONS`,params:t})}delete(e,t){return this.request(e,{...t,method:`DELETE`})}post(e,t,n){return this.#requestWithBody(e,t,{...n,method:`POST`})}upload(e,t,n){return this.#requestWithBody(e,l(t??{}),{...n,method:`POST`})}put(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PUT`})}patch(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PATCH`})}abortAll(){this.#queue.forEach(e=>e.abort()),this.#queue=[]}};function X(e,t={}){return ge({url:e,baseURL:``,...t})}function Z(e,t,n={}){return X(e,{...n,params:t})}function Q(e,t=null,n={}){return X(e,{...n,data:t})}const _e=X;function ve(e,t={},n){return Z(e,t,{...n,method:`GET`})}function ye(e,t={},n){return Z(e,t,{...n,method:`HEAD`})}function be(e,t={},n){return X(e,{...n,params:t,method:`OPTIONS`})}function xe(e,t){return X(e,{...t,method:`DELETE`})}function Se(e,t,n){return Q(e,t,{...n,method:`POST`})}function Ce(e,t,n){return Q(e,l(t??{}),{...n,method:`POST`})}function we(e,t,n){return Q(e,t,{...n,method:`PUT`})}function Te(e,t,n){return Q(e,t,{...n,method:`PATCH`})}const $=X;$.create=e=>{let t=new Y(e),n=t.request.bind(void 0);return Object.assign(n,Y.prototype,t),n},$.get=ve,$.head=ye,$.options=be,$.delete=xe,$.post=Se,$.put=we,$.patch=Te,$.upload=Ce;var Ee=$,De=Ee;exports.ContentType=r,exports.Method=a,exports.ResponseError=t.ResponseError,exports.StatusCode=i,exports.default=De,exports.del=xe,exports.get=ve,exports.head=ye,exports.options=be,exports.patch=Te,exports.post=Se,exports.put=we,exports.request=_e,exports.upload=Ce;
|
|
4
|
+
`+t.prev}function xe(e,t){var n=ie(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=K(e,i)?t(e[i],e):``}var a=typeof k==`function`?k(e):[],o;if(j){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e){if(!K(e,c)||n&&String(Number(c))===c&&c<e.length||j&&o[`$`+c]instanceof Symbol)continue;T.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))}if(typeof k==`function`)for(var l=0;l<a.length;l++)N.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}}),u=e.__commonJSMin((exports,t)=>{var n=l(),r=s(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},c=function(e,t){return e?!!i(e,t):!1},u=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=e&&e.next,r=u(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return a(e,t)},has:function(t){return c(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}}),d=e.__commonJSMin((exports,t)=>{t.exports=Object}),f=e.__commonJSMin((exports,t)=>{t.exports=Error}),p=e.__commonJSMin((exports,t)=>{t.exports=EvalError}),m=e.__commonJSMin((exports,t)=>{t.exports=RangeError}),h=e.__commonJSMin((exports,t)=>{t.exports=ReferenceError}),g=e.__commonJSMin((exports,t)=>{t.exports=SyntaxError}),_=e.__commonJSMin((exports,t)=>{t.exports=URIError}),v=e.__commonJSMin((exports,t)=>{t.exports=Math.abs}),y=e.__commonJSMin((exports,t)=>{t.exports=Math.floor}),b=e.__commonJSMin((exports,t)=>{t.exports=Math.max}),x=e.__commonJSMin((exports,t)=>{t.exports=Math.min}),S=e.__commonJSMin((exports,t)=>{t.exports=Math.pow}),C=e.__commonJSMin((exports,t)=>{t.exports=Math.round}),w=e.__commonJSMin((exports,t)=>{t.exports=Number.isNaN||function(e){return e!==e}}),T=e.__commonJSMin((exports,t)=>{var n=w();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}}),E=e.__commonJSMin((exports,t)=>{t.exports=Object.getOwnPropertyDescriptor}),D=e.__commonJSMin((exports,t)=>{var n=E();if(n)try{n([],`length`)}catch{n=null}t.exports=n}),ee=e.__commonJSMin((exports,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n}),O=e.__commonJSMin((exports,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}}),te=e.__commonJSMin((exports,t)=>{var n=typeof Symbol<`u`&&Symbol,r=O();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}}),k=e.__commonJSMin((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null}),A=e.__commonJSMin((exports,t)=>{var n=d();t.exports=n.getPrototypeOf||null}),j=e.__commonJSMin((exports,t)=>{var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}}),M=e.__commonJSMin((exports,t)=>{var n=j();t.exports=Function.prototype.bind||n}),N=e.__commonJSMin((exports,t)=>{t.exports=Function.prototype.call}),P=e.__commonJSMin((exports,t)=>{t.exports=Function.prototype.apply}),F=e.__commonJSMin((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply}),I=e.__commonJSMin((exports,t)=>{var n=M(),r=P(),i=N(),a=F();t.exports=a||n.call(i,r)}),L=e.__commonJSMin((exports,t)=>{var n=M(),r=s(),i=N(),a=I();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}}),R=e.__commonJSMin((exports,t)=>{var n=L(),r=D(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1}),ne=e.__commonJSMin((exports,t)=>{var n=k(),r=A(),i=R();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null}),re=e.__commonJSMin((exports,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty,i=M();t.exports=i.call(n,r)}),z=e.__commonJSMin((exports,t)=>{var n,r=d(),i=f(),a=p(),o=m(),c=h(),l=g(),u=s(),w=_(),E=v(),O=y(),j=b(),F=x(),I=S(),L=C(),R=T(),z=Function,B=function(e){try{return z(`"use strict"; return (`+e+`).constructor;`)()}catch{}},V=D(),ie=ee(),ae=function(){throw new u},oe=V?function(){try{return arguments.callee,ae}catch{try{return V(arguments,`callee`).get}catch{return ae}}}():ae,H=te()(),U=ne(),se=A(),ce=k(),le=P(),W=N(),G={},K=typeof Uint8Array>`u`||!U?n:U(Uint8Array),q={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":H&&U?U([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":G,"%AsyncGenerator%":G,"%AsyncGeneratorFunction%":G,"%AsyncIteratorPrototype%":G,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":z,"%GeneratorFunction%":G,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":H&&U?U(U([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!H||!U?n:U(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":V,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":c,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!H||!U?n:U(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":H&&U?U(``[Symbol.iterator]()):n,"%Symbol%":H?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":oe,"%TypedArray%":K,"%TypeError%":u,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":w,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":W,"%Function.prototype.apply%":le,"%Object.defineProperty%":ie,"%Object.getPrototypeOf%":se,"%Math.abs%":E,"%Math.floor%":O,"%Math.max%":j,"%Math.min%":F,"%Math.pow%":I,"%Math.round%":L,"%Math.sign%":R,"%Reflect.getPrototypeOf%":ce};if(U)try{null.error}catch(e){var ue=U(U(e));q[`%Error.prototype%`]=ue}var de=function e(t){var n;if(t===`%AsyncFunction%`)n=B(`async function () {}`);else if(t===`%GeneratorFunction%`)n=B(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=B(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&U&&(n=U(i.prototype))}return q[t]=n,n},fe={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},J=M(),pe=re(),me=J.call(W,Array.prototype.concat),he=J.call(le,Array.prototype.splice),Y=J.call(W,String.prototype.replace),X=J.call(W,String.prototype.slice),ge=J.call(W,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q=/\\(\\)?/g,_e=function(e){var t=X(e,0,1),n=X(e,-1);if(t===`%`&&n!==`%`)throw new l("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new l("invalid intrinsic syntax, expected opening `%`");var r=[];return Y(e,Z,function(e,t,n,i){r[r.length]=n?Y(i,Q,`$1`):t||e}),r},ve=function(e,t){var n=e,r;if(pe(fe,n)&&(r=fe[n],n=`%`+r[0]+`%`),pe(q,n)){var i=q[n];if(i===G&&(i=de(n)),i===void 0&&!t)throw new u(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new l(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new u(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new u(`"allowMissing" argument must be a boolean`);if(ge(/^%?[^%]*%?$/,e)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=_e(e),r=n.length>0?n[0]:``,i=ve(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,c=i.alias;c&&(r=c[0],he(n,me([0,1],c)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=X(p,0,1),h=X(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new l(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,pe(q,a))o=q[a];else if(o!=null){if(!(p in o)){if(!t)throw new u(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(V&&d+1>=n.length){var g=V(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=pe(o,p),o=o[p];f&&!s&&(q[a]=o)}}return o}}),B=e.__commonJSMin((exports,t)=>{var n=z(),r=L(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}}),V=e.__commonJSMin((exports,t)=>{var n=z(),r=B(),i=l(),a=s(),o=n(`%Map%`,!0),c=r(`Map.prototype.get`,!0),u=r(`Map.prototype.set`,!0),d=r(`Map.prototype.has`,!0),f=r(`Map.prototype.delete`,!0),p=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=f(e,t);return p(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return c(e,t)},has:function(t){return e?d(e,t):!1},set:function(t,n){e||=new o,u(e,t,n)}};return t}}),ie=e.__commonJSMin((exports,t)=>{var n=z(),r=B(),i=l(),a=V(),o=s(),c=n(`%WeakMap%`,!0),u=r(`WeakMap.prototype.get`,!0),d=r(`WeakMap.prototype.set`,!0),f=r(`WeakMap.prototype.has`,!0),p=r(`WeakMap.prototype.delete`,!0);t.exports=c?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(c&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return p(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return c&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):t&&t.get(n)},has:function(n){return c&&n&&(typeof n==`object`||typeof n==`function`)&&e?f(e,n):!!t&&t.has(n)},set:function(n,r){c&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new c,d(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a}),ae=e.__commonJSMin((exports,t)=>{var n=s(),r=l(),i=u(),a=V(),o=ie(),c=o||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+r(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=c(),e.set(t,n)}};return t}}),oe=e.__commonJSMin((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),H=e.__commonJSMin((exports,t)=>{var n=oe(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a<n.length;++a)n[a]!==void 0&&r.push(n[a]);t.obj[t.prop]=r}}},s=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},c=function e(t,n,a){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(i(t))t.push(n);else if(t&&typeof t==`object`)(a&&(a.plainObjects||a.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!=`object`)return[t].concat(n);var o=t;return i(t)&&!i(n)&&(o=s(t,a)),i(t)&&i(n)?(n.forEach(function(n,i){if(r.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,a):t.push(n)}else t[i]=n}),t):Object.keys(n).reduce(function(t,i){var o=n[i];return r.call(t,i)?t[i]=e(t[i],o,a):t[i]=o,t},o)},l=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},u=function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},d=1024,f=function(e,t,r,i,o){if(e.length===0)return e;var s=e;if(typeof e==`symbol`?s=Symbol.prototype.toString.call(e):typeof e!=`string`&&(s=String(e)),r===`iso-8859-1`)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});for(var c=``,l=0;l<s.length;l+=d){for(var u=s.length>=d?s.slice(l,l+d):s,f=[],p=0;p<u.length;++p){var m=u.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u==`object`&&u&&n.indexOf(u)===-1&&(t.push({obj:a,prop:l}),n.push(u))}return o(t),e},m=function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},h=function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},g=function(e,t){return[].concat(e,t)},_=function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)};t.exports={arrayToObject:s,assign:l,combine:g,compact:p,decode:u,encode:f,isBuffer:h,isRegExp:m,maybeMap:_,merge:c}}),U=e.__commonJSMin((exports,t)=>{var n=ae(),r=H(),i=oe(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,ee=0,O=!1;(D=D.get(m))!==void 0&&!O;){var te=D.get(t);if(ee+=1,te!==void 0){if(te===ee)throw RangeError(`Cyclic object value`);O=!0}D.get(m)===void 0&&(ee=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var k=C?i:g(i,f.encoder,w,`key`,x);return[S(k)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var A=[];if(E===void 0)return A;var j;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),j=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))j=_;else{var M=Object.keys(E);j=v?M.sort(v):M}var N=h?String(i).replace(/\./g,`%2E`):String(i),P=o&&s(E)&&E.length===1?N+`[]`:N;if(c&&s(E)&&E.length===0)return P+`[]`;for(var F=0;F<j.length;++F){var I=j[F],L=typeof I==`object`&&I&&I.value!==void 0?I.value:E[I];if(!(d&&L===null)){var R=y&&h?String(I).replace(/\./g,`%2E`):String(I),ne=s(E)?typeof a==`function`?a(P,R):P:P+(y?`.`+R:`[`+R+`]`);T.set(t,ee);var re=n();re.set(m,T),l(A,e(L,ne,a,o,c,u,d,h,a===`comma`&&C&&s(E)?null:g,_,v,y,b,x,S,C,w,re))}}return A},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l;if(l=e.arrayFormat in o?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat,`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0?!0:f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m],v=r[_];i.skipNulls&&v===null||l(u,h(v,_,d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B&`:b+=`utf8=%E2%9C%93&`),y.length>0?b+y:``}}),se=e.__commonJSMin((exports,t)=>{var n=H(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<p.length;++h)p[h].indexOf(`utf8=`)===0&&(p[h]===l?g=`utf-8`:p[h]===c&&(g=`iso-8859-1`),m=h,h=p.length);for(h=0;h<p.length;++h)if(h!==m){var _=p[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b,x;y===-1?(b=t.decoder(_,a.decoder,g,`key`),x=t.strictNullHandling?null:``):(b=t.decoder(_.slice(0,y),a.decoder,g,`key`),x=n.maybeMap(s(_.slice(y+1),t,i(u[b])?u[b].length:0),function(e){return t.decoder(e,a.decoder,g,`value`)})),x&&t.interpretNumericEntities&&g===`iso-8859-1`&&(x=o(String(x))),_.indexOf(`[]=`)>-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f<n.depth;){if(f+=1,!n.plainObjects&&r.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}if(c){if(n.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+n.depth+` and strictDepth is true`);u.push(`[`+a.slice(c.index)+`]`)}return d(u,t,n,i)}},p=function(e){if(!e)return a;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?a.charset:e.charset,r=e.duplicates===void 0?a.duplicates:e.duplicates;if(r!==`combine`&&r!==`first`&&r!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);var i=e.allowDots===void 0?e.decodeDotInKeys===!0?!0:a.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:a.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:a.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:a.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:a.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:a.decoder,delimiter:typeof e.delimiter==`string`||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:a.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:a.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:a.strictDepth,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`?e.throwOnLimitExceeded:!1}};t.exports=function(e,t){var r=p(t);if(e===``||e==null)return r.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?u(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],l=f(c,i[c],r,typeof e==`string`);a=n.merge(a,l,r)}return r.allowSparse===!0?a:n.compact(a)}}),ce=e.__commonJSMin((exports,t)=>{var n=U(),r=se(),i=oe();t.exports={formats:i,parse:r,stringify:n}}),le=e.__toESM(ce(),1);const W=[`PATCH`,`POST`,`PUT`,`DELETE`,`OPTIONS`],G=[`GET`,`HEAD`];function K(e,t,n,i={arrayFormat:`repeat`}){if(!e)return null;if(e instanceof FormData)return e;let a=null;if(W.includes(t.toUpperCase())){let t=new Headers(n||{}),o=t.get(`Content-Type`)||r.JSON;if(o.includes(r.JSON))a=JSON.stringify(e);else if(o.includes(r.FORM_URLENCODED))a=le.default.stringify(e,i);else if(o.includes(r.FORM_DATA)){let t=new FormData;if(!(e instanceof FormData)&&typeof e==`object`){let n=e;Object.keys(n).forEach(e=>{n.prototype.hasOwnProperty.call(e)&&t.append(e,n[e])}),a=t}}else (typeof e==`string`||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof ReadableStream<`u`&&e instanceof ReadableStream)&&(a=e)}return G.includes(t.toUpperCase())&&(a=null),a}function q(e){if(e instanceof FormData)return e;let t=new FormData;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];r instanceof File||r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}var ue=e.__toESM(ce(),1);const de={arrayFormat:`repeat`};function fe(e,t,n={arrayFormat:`repeat`}){if(t){let r=ue.default.stringify(t,n);r&&(e=e.includes(`?`)?`${e}&${r}`:`${e}?${r}`)}return e}function J(e={},t={}){let n=e instanceof Headers?e:new Headers(e),r=e=>{e instanceof Headers||(e=new Headers(e)),e.forEach((e,t)=>{n.set(t,e)})};return r(t),n}function pe(e){return e[Symbol.toStringTag]===`Generator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.iterator]==`function`}function me(e){return e[Symbol.toStringTag]===`AsyncGenerator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.asyncIterator]==`function`}function he(e){let t=new Map;e.forEach(e=>{t.set(e.name,e)});let n=Array.from(t.values()).sort((e,t)=>(e.priority??0)-(t.priority??0)),r=[],i=[],a=[],o=[],s=[],c=[];return n.forEach(e=>{e.beforeRequest&&r.push(e.beforeRequest),e.afterResponse&&i.push(e.afterResponse),e.onError&&a.push(e.onError),e.onFinally&&o.push(e.onFinally),e.transformStreamChunk&&s.push(e.transformStreamChunk),e.beforeStream&&c.push(e.beforeStream)}),{beforeRequestPlugins:r,afterResponsePlugins:i,errorPlugins:a,finallyPlugins:o,beforeStreamPlugins:c,transformStreamChunkPlugins:s}}var Y=function(e){return e.JSON=`json`,e.BLOB=`blob`,e.TEXT=`text`,e.ARRAY_BUFFER=`arrayBuffer`,e.FORM_DATA=`formData`,e.BYTES=`bytes`,e}(Y||{}),X=class e{#plugins;#sourcePlugins;#controller;#config;#promise=null;#isTimeout=!1;#executor=null;#finallyCallbacks=new Set;#responseType=`json`;#fullOptions;constructor(e){this.#fullOptions=e;let{plugins:t=[],controller:n}=e;this.#controller=n??new AbortController,this.#sourcePlugins=t,this.#plugins=he(t),this.#config=this.#buildConfig(e),this.#promise=this.#init(e)}#buildConfig({baseURL:e=``,method:t=`GET`,qsConfig:n={},withCredentials:r=!1,headers:i={},...a}){return{...a,baseURL:e,method:t,data:a.data,extra:a.extra,withCredentials:r,headers:i,qsConfig:Object.assign(de,n)}}#init({timeout:e}){return new Promise(async(t,r)=>{let a=this.#config,{beforeRequestPlugins:s}=this.#plugins,c=null;for(let e of s)try{if(a=await e(a),a.resolve){let e=a.resolve();return e instanceof Response?t(e):t(new Response(e))}}catch(e){c=e;break}if(c)return this.#promise=null,r(c);let l=fe(a.baseURL+a.url,a.params,a.qsConfig),u=K(a.data??null,a.method,a.headers,a.qsConfig),d=n(a??{},[`baseURL`,`data`,`extra`,`headers`,`method`,`params`,`url`,`withCredentials`]),f={...d,method:a.method,headers:a.headers,signal:this.#controller.signal,credentials:a.withCredentials?`include`:`omit`,body:u},p=fetch(l,f),m=[p],h=null;if(e){let t=new Promise(t=>{h=setTimeout(()=>{this.#isTimeout=!0,this.#controller?.abort()},e)});m.push(t)}try{let e=await Promise.race(m);e?(e.ok&&t(e),c=new o({message:`Fail Request`,status:e.status,statusText:e.statusText,config:this.#config,name:`Fail Request`,response:e})):c=new o({message:`NETWORK_ERROR`,status:i.NETWORK_ERROR,statusText:`Network Error`,config:this.#config,name:`Network Error`})}catch(e){c=e,this.#promise=null}finally{c&&r(c),h&&clearTimeout(h)}})}async#createNormalizeError(e){if(e instanceof o)return e;let t;return t=this.#promise?await this.#response:void 0,e instanceof TypeError?e.name===`AbortError`?this.#isTimeout?new o({message:`Request timeout`,status:i.TIME_OUT,statusText:`Request timeout`,config:this.#config,name:`Request timeout`,response:t}):new o({message:`Request aborted`,status:i.ABORTED,statusText:`Request aborted`,config:this.#config,name:`Request aborted`,response:t}):new o({message:e.message,status:i.NETWORK_ERROR,statusText:`Unknown Request Error`,config:this.#config,name:e.name,response:t}):new o({message:e?.message??`Unknown Request Error`,status:i.UNKNOWN,statusText:`Unknown Request Error`,config:this.#config,name:`Unknown Request Error`,response:t})}async#normalizeError(e){let t=await this.#createNormalizeError(e);for(let e of this.#plugins.errorPlugins)t=await e(t,this.#config);return t.__normalized=!0,t}#execFinally(){for(let e of this.#finallyCallbacks)e();this.#plugins.finallyPlugins.forEach(e=>{e({config:this.#config})}),this.#finallyCallbacks.clear(),this.#plugins.finallyPlugins.length!==this.#sourcePlugins?.length&&(this.#plugins=he(this.#sourcePlugins))}get#getExecutor(){return this.#executor?this.#executor:this.#response}async#resolve(e){let t=this.#plugins.afterResponsePlugins,n={config:this.#config,response:await this.#response,responseType:this.#responseType,controller:this.#controller,result:e};try{for(let e of t)n=await e(n,this.#config);return n.result}catch(e){return Promise.reject(e)}}then(e,t){return this.#getExecutor.then(async t=>e?.call(this,await this.#resolve(t)),async e=>t?.call(this,await this.#normalizeError(e)))}catch(e){return this.#getExecutor.catch(e)}finally(e){this.#finallyCallbacks.add(e)}abort(){this.#controller.abort()}get#response(){return this.#promise?this.#promise.then(e=>e.clone()).catch(async e=>{throw await this.#normalizeError(e)}):Promise.reject(Error(`Response is null`))}json(){return this.#then(Y.JSON,this.#response?.then(e=>e.json()))}blob(){return this.#then(Y.BLOB,this.#response?.then(e=>e.blob()))}text(){return this.#then(Y.TEXT,this.#response?.then(e=>e.text()))}arrayBuffer(){return this.#then(Y.ARRAY_BUFFER,this.#response.then(e=>e.arrayBuffer()))}#then(e,t){return this.#executor=t.then(t=>(this.#responseType=e,this.#resolve(t))).catch(async t=>{throw this.#responseType=e,t.__normalized?t:await this.#normalizeError(t)}).finally(this.#execFinally.bind(this)),this.#executor}formData(){return this.#then(Y.FORM_DATA,this.#response.then(e=>e.formData()))}bytes(){return this.#then(Y.BYTES,this.#response.then(e=>e.bytes()))}__injectPlugins__(e){let t=[...this.#sourcePlugins,...e];this.#plugins=he(t)}async*stream(){let e=(await this.#response)?.body;if(!e)throw Error(`Response body is null`);for(let t of this.#plugins.beforeStreamPlugins)e=await t(e,this.#config);let t=e.getReader();if(!t)throw Error(`Response body reader is null`);try{for(;;){let{done:e,value:n}=await t.read();if(e)break;let r={source:n,result:n,error:null};try{for(let e of this.#plugins.transformStreamChunkPlugins)r=await e(r,this.#config);if(r.result&&(pe(r.result)||me(r.result)))for await(let e of r.result){let t={source:r.source,result:e,error:null};yield t}else yield r}catch(e){r.error=e,r.result=null,yield r}}}catch(e){throw await this.#normalizeError(e)}finally{t.releaseLock(),this.#execFinally()}}retry(){let{controller:t,...n}=this.#fullOptions;return new e(n)}get response(){return this.#response}};function ge(e){return new X(e)}var Z=class{#timeout;#baseURL;#commonHeaders;#queue=[];#plugins=[];#withCredentials;#qsConfig;constructor({timeout:e=0,baseURL:t=``,headers:n={},plugins:r=[],withCredentials:i=!1,qsConfig:a={}}){this.#timeout=e,this.#baseURL=t,this.#commonHeaders=n,this.#plugins=r,this.#withCredentials=i,this.#qsConfig=a,this.request=this.request.bind(this),this.get=this.get.bind(this),this.head=this.head.bind(this),this.options=this.options.bind(this),this.delete=this.delete.bind(this),this.post=this.post.bind(this),this.put=this.put.bind(this),this.patch=this.patch.bind(this),this.abortAll=this.abortAll.bind(this),this.use=this.use.bind(this)}use(e){return this.#plugins.push(e),this}request(e,{timeout:t,headers:n,method:r=`GET`,params:i={},data:a={},qsConfig:o={},withCredentials:s,extra:c={},plugins:l=[]}={}){let u=new AbortController;this.#queue.push(u);let d=this,f={name:`hook-fetch-inner-wrapper`,priority:2**53-1,onFinally(){d.#queue=d.#queue.filter(e=>e!==u)}},p=ge({url:e,baseURL:this.#baseURL,timeout:t??this.#timeout,plugins:[...this.#plugins,...l,f],headers:J(this.#commonHeaders,n),controller:u,method:r,params:i,data:a,qsConfig:Object.assign(this.#qsConfig,o),withCredentials:s??this.#withCredentials,extra:c});return p}#requestWithParams(e,t={},n={}){return this.request(e,{...n,params:t})}#requestWithBody(e,t={},n={}){return this.request(e,{...n,data:t})}get(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`GET`})}head(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`HEAD`})}options(e,t={},n){return this.request(e,{...n,method:`OPTIONS`,params:t})}delete(e,t){return this.request(e,{...t,method:`DELETE`})}post(e,t,n){return this.#requestWithBody(e,t,{...n,method:`POST`})}upload(e,t,n){return this.#requestWithBody(e,q(t??{}),{...n,method:`POST`})}put(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PUT`})}patch(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PATCH`})}abortAll(){this.#queue.forEach(e=>e.abort()),this.#queue=[]}};function Q(e,t={}){return ge({url:e,baseURL:``,...t})}function _e(e,t,n={}){return Q(e,{...n,params:t})}function ve(e,t=null,n={}){return Q(e,{...n,data:t})}const ye=Q;function be(e,t={},n){return _e(e,t,{...n,method:`GET`})}function xe(e,t={},n){return _e(e,t,{...n,method:`HEAD`})}function Se(e,t={},n){return Q(e,{...n,params:t,method:`OPTIONS`})}function Ce(e,t){return Q(e,{...t,method:`DELETE`})}function we(e,t,n){return ve(e,t,{...n,method:`POST`})}function Te(e,t,n){return ve(e,q(t??{}),{...n,method:`POST`})}function Ee(e,t,n){return ve(e,t,{...n,method:`PUT`})}function De(e,t,n){return ve(e,t,{...n,method:`PATCH`})}const $=Q;$.create=e=>{let t=new Z(e),n=t.request.bind(void 0);return Object.assign(n,Z.prototype,t),n},$.get=be,$.head=xe,$.options=Se,$.delete=Ce,$.post=we,$.put=Ee,$.patch=De,$.upload=Te;var Oe=$,ke=Oe;exports.ContentType=r,exports.Method=a,exports.ResponseError=t.ResponseError,exports.StatusCode=i,exports.default=ke,exports.del=Ce,exports.get=be,exports.head=xe,exports.options=Se,exports.patch=De,exports.post=we,exports.put=Ee,exports.request=ye,exports.upload=Te;
|
|
5
5
|
//# sourceMappingURL=index.cjs.map
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{ResponseError as e}from"./error.mjs";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e));const u=(e,t)=>e?!t||t.length===0?e:t.reduce((e,t)=>(delete e[t],e),{...e}):{};let d=function(e){return e.JSON=`application/json`,e.FORM_URLENCODED=`application/x-www-form-urlencoded`,e.FORM_DATA=`multipart/form-data`,e.TEXT=`text/plain`,e.HTML=`text/html`,e.XML=`text/xml`,e.CSV=`text/csv`,e.STREAM=`application/octet-stream`,e}({}),f=function(e){return e[e.TIME_OUT=408]=`TIME_OUT`,e[e.ABORTED=499]=`ABORTED`,e[e.NETWORK_ERROR=599]=`NETWORK_ERROR`,e[e.BODY_NULL=502]=`BODY_NULL`,e[e.UNKNOWN=601]=`UNKNOWN`,e}({}),p=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.DELETE=`DELETE`,e.PATCH=`PATCH`,e.HEAD=`HEAD`,e.OPTIONS=`OPTIONS`,e}({});const m=[`PATCH`,`POST`,`PUT`,`DELETE`,`OPTIONS`],h=[`GET`,`HEAD`];function g(e,t,n,r={arrayFormat:`repeat`}){if(!e)return null;if(e instanceof FormData)return e;let i=null;if(m.includes(t.toUpperCase())){let t=new Headers(n||{}),a=t.get(`Content-Type`)||d.JSON;if(a.includes(d.JSON))i=JSON.stringify(e);else if(a.includes(d.FORM_URLENCODED))i=qs.stringify(e,r);else if(a.includes(d.FORM_DATA)){let t=new FormData;if(!(e instanceof FormData)&&typeof e==`object`){let n=e;Object.keys(n).forEach(e=>{n.prototype.hasOwnProperty.call(e)&&t.append(e,n[e])}),i=t}}else (typeof e==`string`||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof ReadableStream<`u`&&e instanceof ReadableStream)&&(i=e)}return h.includes(t.toUpperCase())&&(i=null),i}function _(e){if(e instanceof FormData)return e;let t=new FormData;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];r instanceof File||r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}var v=s((exports,t)=>{t.exports=TypeError}),y=s(()=>{}),b=s((exports,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype,d=u?WeakMap.prototype.has:null,f=typeof WeakSet==`function`&&WeakSet.prototype,p=f?WeakSet.prototype.has:null,m=typeof WeakRef==`function`&&WeakRef.prototype,h=m?WeakRef.prototype.deref:null,g=Boolean.prototype.valueOf,_=Object.prototype.toString,v=Function.prototype.toString,b=String.prototype.match,x=String.prototype.slice,S=String.prototype.replace,C=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,E=Array.prototype.concat,D=Array.prototype.join,O=Array.prototype.slice,k=Math.floor,ee=typeof BigInt==`function`?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,j=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,M=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,N=typeof Symbol==`function`&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||`symbol`)?Symbol.toStringTag:null,te=Object.prototype.propertyIsEnumerable,P=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function F(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||T.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-k(-e):k(e);if(r!==e){var i=String(r),a=x.call(t,i.length+1);return S.call(i,n,`$&_`)+`.`+S.call(S.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return S.call(t,n,`$&_`)}var I=y(),L=I.custom,R=le(L)?L:null,ne={__proto__:null,double:`"`,single:`'`},z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(K(s,`quoteStyle`)&&!K(ne,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(K(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=K(s,`customInspect`)?s.customInspect:!0;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return Y(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?F(t,f):f}if(typeof t==`bigint`){var p=String(t)+`n`;return d?F(t,p):p}var m=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=m&&m>0&&typeof t==`object`)return H(t)?`[Array]`:`[Object]`;var h=be(s,r);if(o===void 0)o=[];else if(de(o,t)>=0)return`[Circular]`;function _(t,n,i){if(n&&(o=O.call(o),o.push(n)),i){var a={depth:s.depth};return K(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!U(t)){var v=ue(t),y=Se(t,_);return`[Function`+(v?`: `+v:` (anonymous)`)+`]`+(y.length>0?` { `+D.call(y,`, `)+` }`:``)}if(le(t)){var b=M?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):j.call(t);return typeof t==`object`&&!M?X(b):b}if(ge(t)){for(var C=`<`+w.call(String(t.nodeName)),T=t.attributes||[],k=0;k<T.length;k++)C+=` `+T[k].name+`=`+re(B(T[k].value),`double`,s);return C+=`>`,t.childNodes&&t.childNodes.length&&(C+=`...`),C+=`</`+w.call(String(t.nodeName))+`>`,C}if(H(t)){if(t.length===0)return`[]`;var A=Se(t,_);return h&&!Z(A)?`[`+xe(A,h)+`]`:`[ `+D.call(A,`, `)+` ]`}if(ae(t)){var L=Se(t,_);return!(`cause`in Error.prototype)&&`cause`in t&&!te.call(t,`cause`)?`{ [`+String(t)+`] `+D.call(E.call(`[cause]: `+_(t.cause),L),`, `)+` }`:L.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+D.call(L,`, `)+` }`}if(typeof t==`object`&&u){if(R&&typeof t[R]==`function`&&I)return I(t,{depth:m-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(fe(t)){var z=[];return a&&a.call(t,function(e,n){z.push(_(n,t,!0)+` => `+_(e,t))}),ye(`Map`,i.call(t),z,h)}if(me(t)){var V=[];return l&&l.call(t,function(e){V.push(_(e,t))}),ye(`Set`,c.call(t),V,h)}if(J(t))return ve(`WeakMap`);if(he(t))return ve(`WeakSet`);if(pe(t))return ve(`WeakRef`);if(se(t))return X(_(Number(t)));if(W(t))return X(_(ee.call(t)));if(ce(t))return X(g.call(t));if(oe(t))return X(_(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!ie(t)&&!U(t)){var G=Se(t,_),_e=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,Q=t instanceof Object?``:`null prototype`,Ce=!_e&&N&&Object(t)===t&&N in t?x.call(q(t),8,-1):Q?`Object`:``,we=_e||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``,Te=we+(Ce||Q?`[`+D.call(E.call([],Ce||[],Q||[]),`: `)+`] `:``);return G.length===0?Te+`{}`:h?Te+`{`+xe(G,h)+`}`:Te+`{ `+D.call(G,`, `)+` }`}return String(t)};function re(e,t,n){var r=n.quoteStyle||t,i=ne[r];return i+e+i}function B(e){return S.call(String(e),/"/g,`"`)}function V(e){return!N||!(typeof e==`object`&&(N in e||e[N]!==void 0))}function H(e){return q(e)===`[object Array]`&&V(e)}function ie(e){return q(e)===`[object Date]`&&V(e)}function U(e){return q(e)===`[object RegExp]`&&V(e)}function ae(e){return q(e)===`[object Error]`&&V(e)}function oe(e){return q(e)===`[object String]`&&V(e)}function se(e){return q(e)===`[object Number]`&&V(e)}function ce(e){return q(e)===`[object Boolean]`&&V(e)}function le(e){if(M)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!j)return!1;try{return j.call(e),!0}catch{}return!1}function W(e){if(!e||typeof e!=`object`||!ee)return!1;try{return ee.call(e),!0}catch{}return!1}var G=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return G.call(e,t)}function q(e){return _.call(e)}function ue(e){if(e.name)return e.name;var t=b.call(v.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function de(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function fe(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function J(e){if(!d||!e||typeof e!=`object`)return!1;try{d.call(e,d);try{p.call(e,p)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function pe(e){if(!h||!e||typeof e!=`object`)return!1;try{return h.call(e),!0}catch{}return!1}function me(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function he(e){if(!p||!e||typeof e!=`object`)return!1;try{p.call(e,p);try{d.call(e,d)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ge(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement?!0:typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function Y(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return Y(x.call(e,0,t.maxStringLength),t)+r}var i=z[t.quoteStyle||`single`];i.lastIndex=0;var a=S.call(S.call(e,i,`\\$1`),/[\x00-\x1f]/g,_e);return re(a,`single`,t)}function _e(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+C.call(t.toString(16))}function X(e){return`Object(`+e+`)`}function ve(e){return e+` { ? }`}function ye(e,t,n,r){var i=r?xe(n,r):D.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function Z(e){for(var t=0;t<e.length;t++)if(de(e[t],`
|
|
2
|
-
`)>=0)return!1;return!0}function
|
|
1
|
+
import{ResponseError as e}from"./error.mjs";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e));const u=(e,t)=>e?!t||t.length===0?e:t.reduce((e,t)=>(delete e[t],e),{...e}):{};let d=function(e){return e.JSON=`application/json`,e.FORM_URLENCODED=`application/x-www-form-urlencoded`,e.FORM_DATA=`multipart/form-data`,e.TEXT=`text/plain`,e.HTML=`text/html`,e.XML=`text/xml`,e.CSV=`text/csv`,e.STREAM=`application/octet-stream`,e}({}),f=function(e){return e[e.TIME_OUT=408]=`TIME_OUT`,e[e.ABORTED=499]=`ABORTED`,e[e.NETWORK_ERROR=599]=`NETWORK_ERROR`,e[e.BODY_NULL=502]=`BODY_NULL`,e[e.UNKNOWN=601]=`UNKNOWN`,e}({}),p=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.DELETE=`DELETE`,e.PATCH=`PATCH`,e.HEAD=`HEAD`,e.OPTIONS=`OPTIONS`,e}({});var m=class e extends Error{message;name;status;statusText;response;config;constructor({message:t,status:n,statusText:r,response:i,config:a,name:o}){super(t),this.message=t,this.status=n,this.statusText=r,this.response=i,this.config=a,this.name=o??t,Object.setPrototypeOf(this,e.prototype)}},h=s((exports,t)=>{t.exports=TypeError}),g=s(()=>{}),_=s((exports,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype,d=u?WeakMap.prototype.has:null,f=typeof WeakSet==`function`&&WeakSet.prototype,p=f?WeakSet.prototype.has:null,m=typeof WeakRef==`function`&&WeakRef.prototype,h=m?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,v=Object.prototype.toString,y=Function.prototype.toString,b=String.prototype.match,x=String.prototype.slice,S=String.prototype.replace,C=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,E=Array.prototype.concat,D=Array.prototype.join,O=Array.prototype.slice,k=Math.floor,ee=typeof BigInt==`function`?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,j=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,M=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,N=typeof Symbol==`function`&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||`symbol`)?Symbol.toStringTag:null,te=Object.prototype.propertyIsEnumerable,P=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function F(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||T.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-k(-e):k(e);if(r!==e){var i=String(r),a=x.call(t,i.length+1);return S.call(i,n,`$&_`)+`.`+S.call(S.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return S.call(t,n,`$&_`)}var I=g(),L=I.custom,R=U(L)?L:null,ne={__proto__:null,double:`"`,single:`'`},z={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(K(s,`quoteStyle`)&&!K(ne,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(K(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=K(s,`customInspect`)?s.customInspect:!0;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return Y(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?F(t,f):f}if(typeof t==`bigint`){var p=String(t)+`n`;return d?F(t,p):p}var m=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=m&&m>0&&typeof t==`object`)return ae(t)?`[Array]`:`[Object]`;var h=xe(s,r);if(o===void 0)o=[];else if(de(o,t)>=0)return`[Circular]`;function g(t,n,i){if(n&&(o=O.call(o),o.push(n)),i){var a={depth:s.depth};return K(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!H(t)){var v=ue(t),y=Se(t,g);return`[Function`+(v?`: `+v:` (anonymous)`)+`]`+(y.length>0?` { `+D.call(y,`, `)+` }`:``)}if(U(t)){var b=M?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):j.call(t);return typeof t==`object`&&!M?X(b):b}if(ge(t)){for(var C=`<`+w.call(String(t.nodeName)),T=t.attributes||[],k=0;k<T.length;k++)C+=` `+T[k].name+`=`+re(ie(T[k].value),`double`,s);return C+=`>`,t.childNodes&&t.childNodes.length&&(C+=`...`),C+=`</`+w.call(String(t.nodeName))+`>`,C}if(ae(t)){if(t.length===0)return`[]`;var A=Se(t,g);return h&&!be(A)?`[`+Z(A,h)+`]`:`[ `+D.call(A,`, `)+` ]`}if(oe(t)){var L=Se(t,g);return!(`cause`in Error.prototype)&&`cause`in t&&!te.call(t,`cause`)?`{ [`+String(t)+`] `+D.call(E.call(`[cause]: `+g(t.cause),L),`, `)+` }`:L.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+D.call(L,`, `)+` }`}if(typeof t==`object`&&u){if(R&&typeof t[R]==`function`&&I)return I(t,{depth:m-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(fe(t)){var z=[];return a&&a.call(t,function(e,n){z.push(g(n,t,!0)+` => `+g(e,t))}),ye(`Map`,i.call(t),z,h)}if(me(t)){var B=[];return l&&l.call(t,function(e){B.push(g(e,t))}),ye(`Set`,c.call(t),B,h)}if(J(t))return ve(`WeakMap`);if(he(t))return ve(`WeakSet`);if(pe(t))return ve(`WeakRef`);if(ce(t))return X(g(Number(t)));if(W(t))return X(g(ee.call(t)));if(le(t))return X(_.call(t));if(se(t))return X(g(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!V(t)&&!H(t)){var G=Se(t,g),_e=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,Ce=t instanceof Object?``:`null prototype`,we=!_e&&N&&Object(t)===t&&N in t?x.call(q(t),8,-1):Ce?`Object`:``,Q=_e||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``,Te=Q+(we||Ce?`[`+D.call(E.call([],we||[],Ce||[]),`: `)+`] `:``);return G.length===0?Te+`{}`:h?Te+`{`+Z(G,h)+`}`:Te+`{ `+D.call(G,`, `)+` }`}return String(t)};function re(e,t,n){var r=n.quoteStyle||t,i=ne[r];return i+e+i}function ie(e){return S.call(String(e),/"/g,`"`)}function B(e){return!N||!(typeof e==`object`&&(N in e||e[N]!==void 0))}function ae(e){return q(e)===`[object Array]`&&B(e)}function V(e){return q(e)===`[object Date]`&&B(e)}function H(e){return q(e)===`[object RegExp]`&&B(e)}function oe(e){return q(e)===`[object Error]`&&B(e)}function se(e){return q(e)===`[object String]`&&B(e)}function ce(e){return q(e)===`[object Number]`&&B(e)}function le(e){return q(e)===`[object Boolean]`&&B(e)}function U(e){if(M)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!j)return!1;try{return j.call(e),!0}catch{}return!1}function W(e){if(!e||typeof e!=`object`||!ee)return!1;try{return ee.call(e),!0}catch{}return!1}var G=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return G.call(e,t)}function q(e){return v.call(e)}function ue(e){if(e.name)return e.name;var t=b.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function de(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function fe(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function J(e){if(!d||!e||typeof e!=`object`)return!1;try{d.call(e,d);try{p.call(e,p)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function pe(e){if(!h||!e||typeof e!=`object`)return!1;try{return h.call(e),!0}catch{}return!1}function me(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function he(e){if(!p||!e||typeof e!=`object`)return!1;try{p.call(e,p);try{d.call(e,d)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ge(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement?!0:typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function Y(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return Y(x.call(e,0,t.maxStringLength),t)+r}var i=z[t.quoteStyle||`single`];i.lastIndex=0;var a=S.call(S.call(e,i,`\\$1`),/[\x00-\x1f]/g,_e);return re(a,`single`,t)}function _e(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+C.call(t.toString(16))}function X(e){return`Object(`+e+`)`}function ve(e){return e+` { ? }`}function ye(e,t,n,r){var i=r?Z(n,r):D.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function be(e){for(var t=0;t<e.length;t++)if(de(e[t],`
|
|
2
|
+
`)>=0)return!1;return!0}function xe(e,t){var n;if(e.indent===` `)n=` `;else if(typeof e.indent==`number`&&e.indent>0)n=D.call(Array(e.indent+1),` `);else return null;return{base:n,prev:D.call(Array(t+1),n)}}function Z(e,t){if(e.length===0)return``;var n=`
|
|
3
3
|
`+t.prev+t.base;return n+D.call(e,`,`+n)+`
|
|
4
|
-
`+t.prev}function Se(e,t){var n=H(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=K(e,i)?t(e[i],e):``}var a=typeof A==`function`?A(e):[],o;if(M){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e){if(!K(e,c)||n&&String(Number(c))===c&&c<e.length||M&&o[`$`+c]instanceof Symbol)continue;T.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))}if(typeof A==`function`)for(var l=0;l<a.length;l++)te.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}}),x=s((exports,t)=>{var n=b(),r=v(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=e&&e.next,r=c(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}}),S=s((exports,t)=>{t.exports=Object}),C=s((exports,t)=>{t.exports=Error}),w=s((exports,t)=>{t.exports=EvalError}),T=s((exports,t)=>{t.exports=RangeError}),E=s((exports,t)=>{t.exports=ReferenceError}),D=s((exports,t)=>{t.exports=SyntaxError}),O=s((exports,t)=>{t.exports=URIError}),k=s((exports,t)=>{t.exports=Math.abs}),ee=s((exports,t)=>{t.exports=Math.floor}),A=s((exports,t)=>{t.exports=Math.max}),j=s((exports,t)=>{t.exports=Math.min}),M=s((exports,t)=>{t.exports=Math.pow}),N=s((exports,t)=>{t.exports=Math.round}),te=s((exports,t)=>{t.exports=Number.isNaN||function(e){return e!==e}}),P=s((exports,t)=>{var n=te();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}}),F=s((exports,t)=>{t.exports=Object.getOwnPropertyDescriptor}),I=s((exports,t)=>{var n=F();if(n)try{n([],`length`)}catch{n=null}t.exports=n}),L=s((exports,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n}),R=s((exports,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}}),ne=s((exports,t)=>{var n=typeof Symbol<`u`&&Symbol,r=R();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}}),z=s((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null}),re=s((exports,t)=>{var n=S();t.exports=n.getPrototypeOf||null}),B=s((exports,t)=>{var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}}),V=s((exports,t)=>{var n=B();t.exports=Function.prototype.bind||n}),H=s((exports,t)=>{t.exports=Function.prototype.call}),ie=s((exports,t)=>{t.exports=Function.prototype.apply}),U=s((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply}),ae=s((exports,t)=>{var n=V(),r=ie(),i=H(),a=U();t.exports=a||n.call(i,r)}),oe=s((exports,t)=>{var n=V(),r=v(),i=H(),a=ae();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}}),se=s((exports,t)=>{var n=oe(),r=I(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1}),ce=s((exports,t)=>{var n=z(),r=re(),i=se();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null}),le=s((exports,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty,i=V();t.exports=i.call(n,r)}),W=s((exports,t)=>{var n,r=S(),i=C(),a=w(),o=T(),s=E(),c=D(),l=v(),u=O(),d=k(),f=ee(),p=A(),m=j(),h=M(),g=N(),_=P(),y=Function,b=function(e){try{return y(`"use strict"; return (`+e+`).constructor;`)()}catch{}},x=I(),te=L(),F=function(){throw new l},R=x?function(){try{return arguments.callee,F}catch{try{return x(arguments,`callee`).get}catch{return F}}}():F,B=ne()(),U=ce(),ae=re(),oe=z(),se=ie(),W=H(),G={},K=typeof Uint8Array>`u`||!U?n:U(Uint8Array),q={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":B&&U?U([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":G,"%AsyncGenerator%":G,"%AsyncGeneratorFunction%":G,"%AsyncIteratorPrototype%":G,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":G,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":B&&U?U(U([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!B||!U?n:U(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!B||!U?n:U(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":B&&U?U(``[Symbol.iterator]()):n,"%Symbol%":B?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":R,"%TypedArray%":K,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":W,"%Function.prototype.apply%":se,"%Object.defineProperty%":te,"%Object.getPrototypeOf%":ae,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":oe};if(U)try{null.error}catch(e){var ue=U(U(e));q[`%Error.prototype%`]=ue}var de=function e(t){var n;if(t===`%AsyncFunction%`)n=b(`async function () {}`);else if(t===`%GeneratorFunction%`)n=b(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=b(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&U&&(n=U(i.prototype))}return q[t]=n,n},fe={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},J=V(),pe=le(),me=J.call(W,Array.prototype.concat),he=J.call(se,Array.prototype.splice),ge=J.call(W,String.prototype.replace),Y=J.call(W,String.prototype.slice),_e=J.call(W,RegExp.prototype.exec),X=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ve=/\\(\\)?/g,ye=function(e){var t=Y(e,0,1),n=Y(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return ge(e,X,function(e,t,n,i){r[r.length]=n?ge(i,ve,`$1`):t||e}),r},Z=function(e,t){var n=e,r;if(pe(fe,n)&&(r=fe[n],n=`%`+r[0]+`%`),pe(q,n)){var i=q[n];if(i===G&&(i=de(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(_e(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ye(e),r=n.length>0?n[0]:``,i=Z(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],he(n,me([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=Y(p,0,1),h=Y(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,pe(q,a))o=q[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(x&&d+1>=n.length){var g=x(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=pe(o,p),o=o[p];f&&!s&&(q[a]=o)}}return o}}),G=s((exports,t)=>{var n=W(),r=oe(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}}),K=s((exports,t)=>{var n=W(),r=G(),i=b(),a=v(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}}),q=s((exports,t)=>{var n=W(),r=G(),i=b(),a=K(),o=v(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a}),ue=s((exports,t)=>{var n=v(),r=b(),i=x(),a=K(),o=q(),s=o||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+r(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=s(),e.set(t,n)}};return t}}),de=s((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),fe=s((exports,t)=>{var n=de(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a<n.length;++a)n[a]!==void 0&&r.push(n[a]);t.obj[t.prop]=r}}},s=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},c=function e(t,n,a){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(i(t))t.push(n);else if(t&&typeof t==`object`)(a&&(a.plainObjects||a.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!=`object`)return[t].concat(n);var o=t;return i(t)&&!i(n)&&(o=s(t,a)),i(t)&&i(n)?(n.forEach(function(n,i){if(r.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,a):t.push(n)}else t[i]=n}),t):Object.keys(n).reduce(function(t,i){var o=n[i];return r.call(t,i)?t[i]=e(t[i],o,a):t[i]=o,t},o)},l=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},u=function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},d=1024,f=function(e,t,r,i,o){if(e.length===0)return e;var s=e;if(typeof e==`symbol`?s=Symbol.prototype.toString.call(e):typeof e!=`string`&&(s=String(e)),r===`iso-8859-1`)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});for(var c=``,l=0;l<s.length;l+=d){for(var u=s.length>=d?s.slice(l,l+d):s,f=[],p=0;p<u.length;++p){var m=u.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u==`object`&&u&&n.indexOf(u)===-1&&(t.push({obj:a,prop:l}),n.push(u))}return o(t),e},m=function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},h=function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},g=function(e,t){return[].concat(e,t)},_=function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)};t.exports={arrayToObject:s,assign:l,combine:g,compact:p,decode:u,encode:f,isBuffer:h,isRegExp:m,maybeMap:_,merge:c}}),J=s((exports,t)=>{var n=ue(),r=fe(),i=de(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var ee=D.get(t);if(O+=1,ee!==void 0){if(ee===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var A=C?i:g(i,f.encoder,w,`key`,x);return[S(A)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var j=[];if(E===void 0)return j;var M;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),M=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))M=_;else{var N=Object.keys(E);M=v?N.sort(v):N}var te=h?String(i).replace(/\./g,`%2E`):String(i),P=o&&s(E)&&E.length===1?te+`[]`:te;if(c&&s(E)&&E.length===0)return P+`[]`;for(var F=0;F<M.length;++F){var I=M[F],L=typeof I==`object`&&I&&I.value!==void 0?I.value:E[I];if(!(d&&L===null)){var R=y&&h?String(I).replace(/\./g,`%2E`):String(I),ne=s(E)?typeof a==`function`?a(P,R):P:P+(y?`.`+R:`[`+R+`]`);T.set(t,O);var z=n();z.set(m,T),l(j,e(L,ne,a,o,c,u,d,h,a===`comma`&&C&&s(E)?null:g,_,v,y,b,x,S,C,w,z))}}return j},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l;if(l=e.arrayFormat in o?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat,`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0?!0:f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m],v=r[_];i.skipNulls&&v===null||l(u,h(v,_,d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B&`:b+=`utf8=%E2%9C%93&`),y.length>0?b+y:``}}),pe=s((exports,t)=>{var n=fe(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<p.length;++h)p[h].indexOf(`utf8=`)===0&&(p[h]===l?g=`utf-8`:p[h]===c&&(g=`iso-8859-1`),m=h,h=p.length);for(h=0;h<p.length;++h)if(h!==m){var _=p[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b,x;y===-1?(b=t.decoder(_,a.decoder,g,`key`),x=t.strictNullHandling?null:``):(b=t.decoder(_.slice(0,y),a.decoder,g,`key`),x=n.maybeMap(s(_.slice(y+1),t,i(u[b])?u[b].length:0),function(e){return t.decoder(e,a.decoder,g,`value`)})),x&&t.interpretNumericEntities&&g===`iso-8859-1`&&(x=o(String(x))),_.indexOf(`[]=`)>-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f<n.depth;){if(f+=1,!n.plainObjects&&r.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}if(c){if(n.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+n.depth+` and strictDepth is true`);u.push(`[`+a.slice(c.index)+`]`)}return d(u,t,n,i)}},p=function(e){if(!e)return a;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?a.charset:e.charset,r=e.duplicates===void 0?a.duplicates:e.duplicates;if(r!==`combine`&&r!==`first`&&r!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);var i=e.allowDots===void 0?e.decodeDotInKeys===!0?!0:a.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:a.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:a.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:a.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:a.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:a.decoder,delimiter:typeof e.delimiter==`string`||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:a.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:a.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:a.strictDepth,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`?e.throwOnLimitExceeded:!1}};t.exports=function(e,t){var r=p(t);if(e===``||e==null)return r.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?u(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],l=f(c,i[c],r,typeof e==`string`);a=n.merge(a,l,r)}return r.allowSparse===!0?a:n.compact(a)}}),me=s((exports,t)=>{var n=J(),r=pe(),i=de();t.exports={formats:i,parse:r,stringify:n}}),he=l(me(),1);const ge={arrayFormat:`repeat`};function Y(e,t,n={arrayFormat:`repeat`}){if(t){let r=he.default.stringify(t,n);r&&(e=e.includes(`?`)?`${e}&${r}`:`${e}?${r}`)}return e}function _e(e={},t={}){let n=e instanceof Headers?e:new Headers(e),r=e=>{e instanceof Headers||(e=new Headers(e)),e.forEach((e,t)=>{n.set(t,e)})};return r(t),n}function X(e){return e[Symbol.toStringTag]===`Generator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.iterator]==`function`}function ve(e){return e[Symbol.toStringTag]===`AsyncGenerator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.asyncIterator]==`function`}function ye(e){let t=new Map;e.forEach(e=>{t.set(e.name,e)});let n=Array.from(t.values()).sort((e,t)=>(e.priority??0)-(t.priority??0)),r=[],i=[],a=[],o=[],s=[],c=[];return n.forEach(e=>{e.beforeRequest&&r.push(e.beforeRequest),e.afterResponse&&i.push(e.afterResponse),e.onError&&a.push(e.onError),e.onFinally&&o.push(e.onFinally),e.transformStreamChunk&&s.push(e.transformStreamChunk),e.beforeStream&&c.push(e.beforeStream)}),{beforeRequestPlugins:r,afterResponsePlugins:i,errorPlugins:a,finallyPlugins:o,beforeStreamPlugins:c,transformStreamChunkPlugins:s}}var Z=function(e){return e.JSON=`json`,e.BLOB=`blob`,e.TEXT=`text`,e.ARRAY_BUFFER=`arrayBuffer`,e.FORM_DATA=`formData`,e.BYTES=`bytes`,e}(Z||{}),be=class t{#plugins;#sourcePlugins;#controller;#config;#promise=null;#isTimeout=!1;#executor=null;#finallyCallbacks=new Set;#responseType=`json`;#fullOptions;constructor(e){this.#fullOptions=e;let{plugins:t=[],controller:n,url:r,baseURL:i=``,params:a,data:o,qsConfig:s={},withCredentials:c=!1,extra:l,method:u=`GET`,headers:d={}}=e;this.#controller=n??new AbortController,this.#sourcePlugins=t,this.#plugins=ye(t),this.#config={url:r,baseURL:i,params:a,data:o,withCredentials:c,extra:l,method:u,headers:d,qsConfig:Object.assign(ge,s)},this.#promise=this.#init(e)}#init({timeout:t}){return new Promise(async(n,r)=>{let i=this.#config,{beforeRequestPlugins:a}=this.#plugins,o=null;for(let e of a)try{if(i=await e(i),i.resolve){let e=i.resolve();e instanceof Response?n(e):n(new Response(e))}}catch(e){o=e;break}if(o)return this.#promise=null,r(o);let s=Y(i.baseURL+i.url,i.params,i.qsConfig),c=g(i.data??null,i.method,i.headers,i.qsConfig),l=u(i??{},[`baseURL`,`data`,`extra`,`headers`,`method`,`params`,`url`,`withCredentials`]),d={...l,method:i.method,headers:i.headers,signal:this.#controller.signal,credentials:i.withCredentials?`include`:`omit`,body:c},p=fetch(s,d),m=[p],h=null;if(t){let e=new Promise(e=>{h=setTimeout(()=>{this.#isTimeout=!0,this.#controller?.abort()},t)});m.push(e)}try{let t=await Promise.race(m);t?(t.ok&&n(t),o=new e({message:`Fail Request`,status:t.status,statusText:t.statusText,config:this.#config,name:`Fail Request`,response:t})):o=new e({message:`NETWORK_ERROR`,status:f.NETWORK_ERROR,statusText:`Network Error`,config:this.#config,name:`Network Error`})}catch(e){o=e,this.#promise=null}finally{o&&r(o),h&&clearTimeout(h)}})}async#createNormalizeError(t){if(t instanceof e)return t;let n;return n=this.#promise?await this.#response:void 0,t instanceof TypeError?t.name===`AbortError`?this.#isTimeout?new e({message:`Request timeout`,status:f.TIME_OUT,statusText:`Request timeout`,config:this.#config,name:`Request timeout`,response:n}):new e({message:`Request aborted`,status:f.ABORTED,statusText:`Request aborted`,config:this.#config,name:`Request aborted`,response:n}):new e({message:t.message,status:f.NETWORK_ERROR,statusText:`Unknown Request Error`,config:this.#config,name:t.name,response:n}):new e({message:t?.message??`Unknown Request Error`,status:f.UNKNOWN,statusText:`Unknown Request Error`,config:this.#config,name:`Unknown Request Error`,response:n})}async#normalizeError(e){let t=await this.#createNormalizeError(e);for(let e of this.#plugins.errorPlugins)t=await e(t,this.#config);return t.__normalized=!0,t}#execFinally(){for(let e of this.#finallyCallbacks)e();this.#plugins.finallyPlugins.forEach(e=>{e({config:this.#config})}),this.#finallyCallbacks.clear(),this.#plugins.finallyPlugins.length!==this.#sourcePlugins?.length&&(this.#plugins=ye(this.#sourcePlugins))}get#getExecutor(){return this.#executor?this.#executor:this.#response}async#resolve(e){let t=this.#plugins.afterResponsePlugins,n={config:this.#config,response:await this.#response,responseType:this.#responseType,controller:this.#controller,result:e};try{for(let e of t)n=await e(n,this.#config);return n.result}catch(e){return Promise.reject(e)}}then(e,t){return this.#getExecutor.then(async t=>e?.call(this,await this.#resolve(t)),async e=>t?.call(this,await this.#normalizeError(e)))}catch(e){return this.#getExecutor.catch(e)}finally(e){this.#finallyCallbacks.add(e)}abort(){this.#controller.abort()}get#response(){return this.#promise?this.#promise.then(e=>e.clone()).catch(async e=>{throw await this.#normalizeError(e)}):Promise.reject(Error(`Response is null`))}json(){return this.#then(Z.JSON,this.#response?.then(e=>e.json()))}blob(){return this.#then(Z.BLOB,this.#response?.then(e=>e.blob()))}text(){return this.#then(Z.TEXT,this.#response?.then(e=>e.text()))}arrayBuffer(){return this.#then(Z.ARRAY_BUFFER,this.#response.then(e=>e.arrayBuffer()))}#then(e,t){return this.#executor=t.then(t=>(this.#responseType=e,this.#resolve(t))).catch(async t=>{throw this.#responseType=e,t.__normalized?t:await this.#normalizeError(t)}).finally(this.#execFinally.bind(this)),this.#executor}formData(){return this.#then(Z.FORM_DATA,this.#response.then(e=>e.formData()))}bytes(){return this.#then(Z.BYTES,this.#response.then(e=>e.bytes()))}__injectPlugins__(e){let t=[...this.#sourcePlugins,...e];this.#plugins=ye(t)}async*stream(){let e=(await this.#response)?.body;if(!e)throw Error(`Response body is null`);for(let t of this.#plugins.beforeStreamPlugins)e=await t(e,this.#config);let t=e.getReader();if(!t)throw Error(`Response body reader is null`);try{for(;;){let{done:e,value:n}=await t.read();if(e)break;let r={source:n,result:n,error:null};try{for(let e of this.#plugins.transformStreamChunkPlugins)r=await e(r,this.#config);if(r.result&&(X(r.result)||ve(r.result)))for await(let e of r.result){let t={source:r.source,result:e,error:null};yield t}else yield r}catch(e){r.error=e,r.result=null,yield r}}}catch(e){return this.#normalizeError(e)}finally{t.releaseLock(),this.#execFinally()}}retry(){let{controller:e,...n}=this.#fullOptions;return new t(n)}get response(){return this.#response}};function xe(e){return new be(e)}var Se=class{#timeout;#baseURL;#commonHeaders;#queue=[];#plugins=[];#withCredentials;#qsConfig;constructor({timeout:e=0,baseURL:t=``,headers:n={},plugins:r=[],withCredentials:i=!1,qsConfig:a={}}){this.#timeout=e,this.#baseURL=t,this.#commonHeaders=n,this.#plugins=r,this.#withCredentials=i,this.#qsConfig=a,this.request=this.request.bind(this),this.get=this.get.bind(this),this.head=this.head.bind(this),this.options=this.options.bind(this),this.delete=this.delete.bind(this),this.post=this.post.bind(this),this.put=this.put.bind(this),this.patch=this.patch.bind(this),this.abortAll=this.abortAll.bind(this),this.use=this.use.bind(this)}use(e){return this.#plugins.push(e),this}request(e,{timeout:t,headers:n,method:r=`GET`,params:i={},data:a={},qsConfig:o={},withCredentials:s,extra:c={},plugins:l=[]}={}){let u=new AbortController;this.#queue.push(u);let d=this,f={name:`hook-fetch-inner-wrapper`,priority:2**53-1,onFinally(){d.#queue=d.#queue.filter(e=>e!==u)}},p=xe({url:e,baseURL:this.#baseURL,timeout:t??this.#timeout,plugins:[...this.#plugins,...l,f],headers:_e(this.#commonHeaders,n),controller:u,method:r,params:i,data:a,qsConfig:Object.assign(this.#qsConfig,o),withCredentials:s??this.#withCredentials,extra:c});return p}#requestWithParams(e,t={},n={}){return this.request(e,{...n,params:t})}#requestWithBody(e,t={},n={}){return this.request(e,{...n,data:t})}get(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`GET`})}head(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`HEAD`})}options(e,t={},n){return this.request(e,{...n,method:`OPTIONS`,params:t})}delete(e,t){return this.request(e,{...t,method:`DELETE`})}post(e,t,n){return this.#requestWithBody(e,t,{...n,method:`POST`})}upload(e,t,n){return this.#requestWithBody(e,_(t??{}),{...n,method:`POST`})}put(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PUT`})}patch(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PATCH`})}abortAll(){this.#queue.forEach(e=>e.abort()),this.#queue=[]}};function Q(e,t={}){return xe({url:e,baseURL:``,...t})}function Ce(e,t,n={}){return Q(e,{...n,params:t})}function we(e,t=null,n={}){return Q(e,{...n,data:t})}const Te=Q;function Ee(e,t={},n){return Ce(e,t,{...n,method:`GET`})}function De(e,t={},n){return Ce(e,t,{...n,method:`HEAD`})}function Oe(e,t={},n){return Q(e,{...n,params:t,method:`OPTIONS`})}function ke(e,t){return Q(e,{...t,method:`DELETE`})}function Ae(e,t,n){return we(e,t,{...n,method:`POST`})}function je(e,t,n){return we(e,_(t??{}),{...n,method:`POST`})}function Me(e,t,n){return we(e,t,{...n,method:`PUT`})}function Ne(e,t,n){return we(e,t,{...n,method:`PATCH`})}const $=Q;$.create=e=>{let t=new Se(e),n=t.request.bind(void 0);return Object.assign(n,Se.prototype,t),n},$.get=Ee,$.head=De,$.options=Oe,$.delete=ke,$.post=Ae,$.put=Me,$.patch=Ne,$.upload=je;var Pe=$,Fe=Pe;export{d as ContentType,p as Method,e as ResponseError,f as StatusCode,Fe as default,ke as del,Ee as get,De as head,Oe as options,Ne as patch,Ae as post,Me as put,Te as request,je as upload};
|
|
4
|
+
`+t.prev}function Se(e,t){var n=ae(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=K(e,i)?t(e[i],e):``}var a=typeof A==`function`?A(e):[],o;if(M){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e){if(!K(e,c)||n&&String(Number(c))===c&&c<e.length||M&&o[`$`+c]instanceof Symbol)continue;T.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))}if(typeof A==`function`)for(var l=0;l<a.length;l++)te.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}}),v=s((exports,t)=>{var n=_(),r=h(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=e&&e.next,r=c(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}}),y=s((exports,t)=>{t.exports=Object}),b=s((exports,t)=>{t.exports=Error}),x=s((exports,t)=>{t.exports=EvalError}),S=s((exports,t)=>{t.exports=RangeError}),C=s((exports,t)=>{t.exports=ReferenceError}),w=s((exports,t)=>{t.exports=SyntaxError}),T=s((exports,t)=>{t.exports=URIError}),E=s((exports,t)=>{t.exports=Math.abs}),D=s((exports,t)=>{t.exports=Math.floor}),O=s((exports,t)=>{t.exports=Math.max}),k=s((exports,t)=>{t.exports=Math.min}),ee=s((exports,t)=>{t.exports=Math.pow}),A=s((exports,t)=>{t.exports=Math.round}),j=s((exports,t)=>{t.exports=Number.isNaN||function(e){return e!==e}}),M=s((exports,t)=>{var n=j();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}}),N=s((exports,t)=>{t.exports=Object.getOwnPropertyDescriptor}),te=s((exports,t)=>{var n=N();if(n)try{n([],`length`)}catch{n=null}t.exports=n}),P=s((exports,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n}),F=s((exports,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}}),I=s((exports,t)=>{var n=typeof Symbol<`u`&&Symbol,r=F();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}}),L=s((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null}),R=s((exports,t)=>{var n=y();t.exports=n.getPrototypeOf||null}),ne=s((exports,t)=>{var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}}),z=s((exports,t)=>{var n=ne();t.exports=Function.prototype.bind||n}),re=s((exports,t)=>{t.exports=Function.prototype.call}),ie=s((exports,t)=>{t.exports=Function.prototype.apply}),B=s((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply}),ae=s((exports,t)=>{var n=z(),r=ie(),i=re(),a=B();t.exports=a||n.call(i,r)}),V=s((exports,t)=>{var n=z(),r=h(),i=re(),a=ae();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}}),H=s((exports,t)=>{var n=V(),r=te(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1}),oe=s((exports,t)=>{var n=L(),r=R(),i=H();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null}),se=s((exports,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty,i=z();t.exports=i.call(n,r)}),ce=s((exports,t)=>{var n,r=y(),i=b(),a=x(),o=S(),s=C(),c=w(),l=h(),u=T(),d=E(),f=D(),p=O(),m=k(),g=ee(),_=A(),v=M(),j=Function,N=function(e){try{return j(`"use strict"; return (`+e+`).constructor;`)()}catch{}},F=te(),ne=P(),B=function(){throw new l},ae=F?function(){try{return arguments.callee,B}catch{try{return F(arguments,`callee`).get}catch{return B}}}():B,V=I()(),H=oe(),ce=R(),le=L(),U=ie(),W=re(),G={},K=typeof Uint8Array>`u`||!H?n:H(Uint8Array),q={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":V&&H?H([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":G,"%AsyncGenerator%":G,"%AsyncGeneratorFunction%":G,"%AsyncIteratorPrototype%":G,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":j,"%GeneratorFunction%":G,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":V&&H?H(H([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!V||!H?n:H(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":F,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!V||!H?n:H(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":V&&H?H(``[Symbol.iterator]()):n,"%Symbol%":V?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":ae,"%TypedArray%":K,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":W,"%Function.prototype.apply%":U,"%Object.defineProperty%":ne,"%Object.getPrototypeOf%":ce,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":g,"%Math.round%":_,"%Math.sign%":v,"%Reflect.getPrototypeOf%":le};if(H)try{null.error}catch(e){var ue=H(H(e));q[`%Error.prototype%`]=ue}var de=function e(t){var n;if(t===`%AsyncFunction%`)n=N(`async function () {}`);else if(t===`%GeneratorFunction%`)n=N(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=N(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&H&&(n=H(i.prototype))}return q[t]=n,n},fe={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},J=z(),pe=se(),me=J.call(W,Array.prototype.concat),he=J.call(U,Array.prototype.splice),ge=J.call(W,String.prototype.replace),Y=J.call(W,String.prototype.slice),_e=J.call(W,RegExp.prototype.exec),X=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ve=/\\(\\)?/g,ye=function(e){var t=Y(e,0,1),n=Y(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return ge(e,X,function(e,t,n,i){r[r.length]=n?ge(i,ve,`$1`):t||e}),r},be=function(e,t){var n=e,r;if(pe(fe,n)&&(r=fe[n],n=`%`+r[0]+`%`),pe(q,n)){var i=q[n];if(i===G&&(i=de(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(_e(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ye(e),r=n.length>0?n[0]:``,i=be(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],he(n,me([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=Y(p,0,1),h=Y(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,pe(q,a))o=q[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(F&&d+1>=n.length){var g=F(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=pe(o,p),o=o[p];f&&!s&&(q[a]=o)}}return o}}),le=s((exports,t)=>{var n=ce(),r=V(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}}),U=s((exports,t)=>{var n=ce(),r=le(),i=_(),a=h(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}}),W=s((exports,t)=>{var n=ce(),r=le(),i=_(),a=U(),o=h(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a}),G=s((exports,t)=>{var n=h(),r=_(),i=v(),a=U(),o=W(),s=o||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+r(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=s(),e.set(t,n)}};return t}}),K=s((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),q=s((exports,t)=>{var n=K(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a<n.length;++a)n[a]!==void 0&&r.push(n[a]);t.obj[t.prop]=r}}},s=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},c=function e(t,n,a){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(i(t))t.push(n);else if(t&&typeof t==`object`)(a&&(a.plainObjects||a.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!=`object`)return[t].concat(n);var o=t;return i(t)&&!i(n)&&(o=s(t,a)),i(t)&&i(n)?(n.forEach(function(n,i){if(r.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,a):t.push(n)}else t[i]=n}),t):Object.keys(n).reduce(function(t,i){var o=n[i];return r.call(t,i)?t[i]=e(t[i],o,a):t[i]=o,t},o)},l=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},u=function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},d=1024,f=function(e,t,r,i,o){if(e.length===0)return e;var s=e;if(typeof e==`symbol`?s=Symbol.prototype.toString.call(e):typeof e!=`string`&&(s=String(e)),r===`iso-8859-1`)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});for(var c=``,l=0;l<s.length;l+=d){for(var u=s.length>=d?s.slice(l,l+d):s,f=[],p=0;p<u.length;++p){var m=u.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u==`object`&&u&&n.indexOf(u)===-1&&(t.push({obj:a,prop:l}),n.push(u))}return o(t),e},m=function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},h=function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},g=function(e,t){return[].concat(e,t)},_=function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)};t.exports={arrayToObject:s,assign:l,combine:g,compact:p,decode:u,encode:f,isBuffer:h,isRegExp:m,maybeMap:_,merge:c}}),ue=s((exports,t)=>{var n=G(),r=q(),i=K(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var ee=D.get(t);if(O+=1,ee!==void 0){if(ee===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var A=C?i:g(i,f.encoder,w,`key`,x);return[S(A)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var j=[];if(E===void 0)return j;var M;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),M=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))M=_;else{var N=Object.keys(E);M=v?N.sort(v):N}var te=h?String(i).replace(/\./g,`%2E`):String(i),P=o&&s(E)&&E.length===1?te+`[]`:te;if(c&&s(E)&&E.length===0)return P+`[]`;for(var F=0;F<M.length;++F){var I=M[F],L=typeof I==`object`&&I&&I.value!==void 0?I.value:E[I];if(!(d&&L===null)){var R=y&&h?String(I).replace(/\./g,`%2E`):String(I),ne=s(E)?typeof a==`function`?a(P,R):P:P+(y?`.`+R:`[`+R+`]`);T.set(t,O);var z=n();z.set(m,T),l(j,e(L,ne,a,o,c,u,d,h,a===`comma`&&C&&s(E)?null:g,_,v,y,b,x,S,C,w,z))}}return j},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l;if(l=e.arrayFormat in o?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat,`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0?!0:f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m],v=r[_];i.skipNulls&&v===null||l(u,h(v,_,d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B&`:b+=`utf8=%E2%9C%93&`),y.length>0?b+y:``}}),de=s((exports,t)=>{var n=q(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<p.length;++h)p[h].indexOf(`utf8=`)===0&&(p[h]===l?g=`utf-8`:p[h]===c&&(g=`iso-8859-1`),m=h,h=p.length);for(h=0;h<p.length;++h)if(h!==m){var _=p[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b,x;y===-1?(b=t.decoder(_,a.decoder,g,`key`),x=t.strictNullHandling?null:``):(b=t.decoder(_.slice(0,y),a.decoder,g,`key`),x=n.maybeMap(s(_.slice(y+1),t,i(u[b])?u[b].length:0),function(e){return t.decoder(e,a.decoder,g,`value`)})),x&&t.interpretNumericEntities&&g===`iso-8859-1`&&(x=o(String(x))),_.indexOf(`[]=`)>-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f<n.depth;){if(f+=1,!n.plainObjects&&r.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}if(c){if(n.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+n.depth+` and strictDepth is true`);u.push(`[`+a.slice(c.index)+`]`)}return d(u,t,n,i)}},p=function(e){if(!e)return a;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?a.charset:e.charset,r=e.duplicates===void 0?a.duplicates:e.duplicates;if(r!==`combine`&&r!==`first`&&r!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);var i=e.allowDots===void 0?e.decodeDotInKeys===!0?!0:a.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:a.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:a.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:a.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:a.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:a.decoder,delimiter:typeof e.delimiter==`string`||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:a.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:a.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:a.strictDepth,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`?e.throwOnLimitExceeded:!1}};t.exports=function(e,t){var r=p(t);if(e===``||e==null)return r.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?u(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],l=f(c,i[c],r,typeof e==`string`);a=n.merge(a,l,r)}return r.allowSparse===!0?a:n.compact(a)}}),fe=s((exports,t)=>{var n=ue(),r=de(),i=K();t.exports={formats:i,parse:r,stringify:n}}),J=l(fe(),1);const pe=[`PATCH`,`POST`,`PUT`,`DELETE`,`OPTIONS`],me=[`GET`,`HEAD`];function he(e,t,n,r={arrayFormat:`repeat`}){if(!e)return null;if(e instanceof FormData)return e;let i=null;if(pe.includes(t.toUpperCase())){let t=new Headers(n||{}),a=t.get(`Content-Type`)||d.JSON;if(a.includes(d.JSON))i=JSON.stringify(e);else if(a.includes(d.FORM_URLENCODED))i=J.default.stringify(e,r);else if(a.includes(d.FORM_DATA)){let t=new FormData;if(!(e instanceof FormData)&&typeof e==`object`){let n=e;Object.keys(n).forEach(e=>{n.prototype.hasOwnProperty.call(e)&&t.append(e,n[e])}),i=t}}else (typeof e==`string`||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof ReadableStream<`u`&&e instanceof ReadableStream)&&(i=e)}return me.includes(t.toUpperCase())&&(i=null),i}function ge(e){if(e instanceof FormData)return e;let t=new FormData;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];r instanceof File||r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}var Y=l(fe(),1);const _e={arrayFormat:`repeat`};function X(e,t,n={arrayFormat:`repeat`}){if(t){let r=Y.default.stringify(t,n);r&&(e=e.includes(`?`)?`${e}&${r}`:`${e}?${r}`)}return e}function ve(e={},t={}){let n=e instanceof Headers?e:new Headers(e),r=e=>{e instanceof Headers||(e=new Headers(e)),e.forEach((e,t)=>{n.set(t,e)})};return r(t),n}function ye(e){return e[Symbol.toStringTag]===`Generator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.iterator]==`function`}function be(e){return e[Symbol.toStringTag]===`AsyncGenerator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.asyncIterator]==`function`}function xe(e){let t=new Map;e.forEach(e=>{t.set(e.name,e)});let n=Array.from(t.values()).sort((e,t)=>(e.priority??0)-(t.priority??0)),r=[],i=[],a=[],o=[],s=[],c=[];return n.forEach(e=>{e.beforeRequest&&r.push(e.beforeRequest),e.afterResponse&&i.push(e.afterResponse),e.onError&&a.push(e.onError),e.onFinally&&o.push(e.onFinally),e.transformStreamChunk&&s.push(e.transformStreamChunk),e.beforeStream&&c.push(e.beforeStream)}),{beforeRequestPlugins:r,afterResponsePlugins:i,errorPlugins:a,finallyPlugins:o,beforeStreamPlugins:c,transformStreamChunkPlugins:s}}var Z=function(e){return e.JSON=`json`,e.BLOB=`blob`,e.TEXT=`text`,e.ARRAY_BUFFER=`arrayBuffer`,e.FORM_DATA=`formData`,e.BYTES=`bytes`,e}(Z||{}),Se=class e{#plugins;#sourcePlugins;#controller;#config;#promise=null;#isTimeout=!1;#executor=null;#finallyCallbacks=new Set;#responseType=`json`;#fullOptions;constructor(e){this.#fullOptions=e;let{plugins:t=[],controller:n}=e;this.#controller=n??new AbortController,this.#sourcePlugins=t,this.#plugins=xe(t),this.#config=this.#buildConfig(e),this.#promise=this.#init(e)}#buildConfig({baseURL:e=``,method:t=`GET`,qsConfig:n={},withCredentials:r=!1,headers:i={},...a}){return{...a,baseURL:e,method:t,data:a.data,extra:a.extra,withCredentials:r,headers:i,qsConfig:Object.assign(_e,n)}}#init({timeout:e}){return new Promise(async(t,n)=>{let r=this.#config,{beforeRequestPlugins:i}=this.#plugins,a=null;for(let e of i)try{if(r=await e(r),r.resolve){let e=r.resolve();return e instanceof Response?t(e):t(new Response(e))}}catch(e){a=e;break}if(a)return this.#promise=null,n(a);let o=X(r.baseURL+r.url,r.params,r.qsConfig),s=he(r.data??null,r.method,r.headers,r.qsConfig),c=u(r??{},[`baseURL`,`data`,`extra`,`headers`,`method`,`params`,`url`,`withCredentials`]),l={...c,method:r.method,headers:r.headers,signal:this.#controller.signal,credentials:r.withCredentials?`include`:`omit`,body:s},d=fetch(o,l),p=[d],h=null;if(e){let t=new Promise(t=>{h=setTimeout(()=>{this.#isTimeout=!0,this.#controller?.abort()},e)});p.push(t)}try{let e=await Promise.race(p);e?(e.ok&&t(e),a=new m({message:`Fail Request`,status:e.status,statusText:e.statusText,config:this.#config,name:`Fail Request`,response:e})):a=new m({message:`NETWORK_ERROR`,status:f.NETWORK_ERROR,statusText:`Network Error`,config:this.#config,name:`Network Error`})}catch(e){a=e,this.#promise=null}finally{a&&n(a),h&&clearTimeout(h)}})}async#createNormalizeError(e){if(e instanceof m)return e;let t;return t=this.#promise?await this.#response:void 0,e instanceof TypeError?e.name===`AbortError`?this.#isTimeout?new m({message:`Request timeout`,status:f.TIME_OUT,statusText:`Request timeout`,config:this.#config,name:`Request timeout`,response:t}):new m({message:`Request aborted`,status:f.ABORTED,statusText:`Request aborted`,config:this.#config,name:`Request aborted`,response:t}):new m({message:e.message,status:f.NETWORK_ERROR,statusText:`Unknown Request Error`,config:this.#config,name:e.name,response:t}):new m({message:e?.message??`Unknown Request Error`,status:f.UNKNOWN,statusText:`Unknown Request Error`,config:this.#config,name:`Unknown Request Error`,response:t})}async#normalizeError(e){let t=await this.#createNormalizeError(e);for(let e of this.#plugins.errorPlugins)t=await e(t,this.#config);return t.__normalized=!0,t}#execFinally(){for(let e of this.#finallyCallbacks)e();this.#plugins.finallyPlugins.forEach(e=>{e({config:this.#config})}),this.#finallyCallbacks.clear(),this.#plugins.finallyPlugins.length!==this.#sourcePlugins?.length&&(this.#plugins=xe(this.#sourcePlugins))}get#getExecutor(){return this.#executor?this.#executor:this.#response}async#resolve(e){let t=this.#plugins.afterResponsePlugins,n={config:this.#config,response:await this.#response,responseType:this.#responseType,controller:this.#controller,result:e};try{for(let e of t)n=await e(n,this.#config);return n.result}catch(e){return Promise.reject(e)}}then(e,t){return this.#getExecutor.then(async t=>e?.call(this,await this.#resolve(t)),async e=>t?.call(this,await this.#normalizeError(e)))}catch(e){return this.#getExecutor.catch(e)}finally(e){this.#finallyCallbacks.add(e)}abort(){this.#controller.abort()}get#response(){return this.#promise?this.#promise.then(e=>e.clone()).catch(async e=>{throw await this.#normalizeError(e)}):Promise.reject(Error(`Response is null`))}json(){return this.#then(Z.JSON,this.#response?.then(e=>e.json()))}blob(){return this.#then(Z.BLOB,this.#response?.then(e=>e.blob()))}text(){return this.#then(Z.TEXT,this.#response?.then(e=>e.text()))}arrayBuffer(){return this.#then(Z.ARRAY_BUFFER,this.#response.then(e=>e.arrayBuffer()))}#then(e,t){return this.#executor=t.then(t=>(this.#responseType=e,this.#resolve(t))).catch(async t=>{throw this.#responseType=e,t.__normalized?t:await this.#normalizeError(t)}).finally(this.#execFinally.bind(this)),this.#executor}formData(){return this.#then(Z.FORM_DATA,this.#response.then(e=>e.formData()))}bytes(){return this.#then(Z.BYTES,this.#response.then(e=>e.bytes()))}__injectPlugins__(e){let t=[...this.#sourcePlugins,...e];this.#plugins=xe(t)}async*stream(){let e=(await this.#response)?.body;if(!e)throw Error(`Response body is null`);for(let t of this.#plugins.beforeStreamPlugins)e=await t(e,this.#config);let t=e.getReader();if(!t)throw Error(`Response body reader is null`);try{for(;;){let{done:e,value:n}=await t.read();if(e)break;let r={source:n,result:n,error:null};try{for(let e of this.#plugins.transformStreamChunkPlugins)r=await e(r,this.#config);if(r.result&&(ye(r.result)||be(r.result)))for await(let e of r.result){let t={source:r.source,result:e,error:null};yield t}else yield r}catch(e){r.error=e,r.result=null,yield r}}}catch(e){throw await this.#normalizeError(e)}finally{t.releaseLock(),this.#execFinally()}}retry(){let{controller:t,...n}=this.#fullOptions;return new e(n)}get response(){return this.#response}};function Ce(e){return new Se(e)}var we=class{#timeout;#baseURL;#commonHeaders;#queue=[];#plugins=[];#withCredentials;#qsConfig;constructor({timeout:e=0,baseURL:t=``,headers:n={},plugins:r=[],withCredentials:i=!1,qsConfig:a={}}){this.#timeout=e,this.#baseURL=t,this.#commonHeaders=n,this.#plugins=r,this.#withCredentials=i,this.#qsConfig=a,this.request=this.request.bind(this),this.get=this.get.bind(this),this.head=this.head.bind(this),this.options=this.options.bind(this),this.delete=this.delete.bind(this),this.post=this.post.bind(this),this.put=this.put.bind(this),this.patch=this.patch.bind(this),this.abortAll=this.abortAll.bind(this),this.use=this.use.bind(this)}use(e){return this.#plugins.push(e),this}request(e,{timeout:t,headers:n,method:r=`GET`,params:i={},data:a={},qsConfig:o={},withCredentials:s,extra:c={},plugins:l=[]}={}){let u=new AbortController;this.#queue.push(u);let d=this,f={name:`hook-fetch-inner-wrapper`,priority:2**53-1,onFinally(){d.#queue=d.#queue.filter(e=>e!==u)}},p=Ce({url:e,baseURL:this.#baseURL,timeout:t??this.#timeout,plugins:[...this.#plugins,...l,f],headers:ve(this.#commonHeaders,n),controller:u,method:r,params:i,data:a,qsConfig:Object.assign(this.#qsConfig,o),withCredentials:s??this.#withCredentials,extra:c});return p}#requestWithParams(e,t={},n={}){return this.request(e,{...n,params:t})}#requestWithBody(e,t={},n={}){return this.request(e,{...n,data:t})}get(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`GET`})}head(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`HEAD`})}options(e,t={},n){return this.request(e,{...n,method:`OPTIONS`,params:t})}delete(e,t){return this.request(e,{...t,method:`DELETE`})}post(e,t,n){return this.#requestWithBody(e,t,{...n,method:`POST`})}upload(e,t,n){return this.#requestWithBody(e,ge(t??{}),{...n,method:`POST`})}put(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PUT`})}patch(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PATCH`})}abortAll(){this.#queue.forEach(e=>e.abort()),this.#queue=[]}};function Q(e,t={}){return Ce({url:e,baseURL:``,...t})}function Te(e,t,n={}){return Q(e,{...n,params:t})}function Ee(e,t=null,n={}){return Q(e,{...n,data:t})}const De=Q;function Oe(e,t={},n){return Te(e,t,{...n,method:`GET`})}function ke(e,t={},n){return Te(e,t,{...n,method:`HEAD`})}function Ae(e,t={},n){return Q(e,{...n,params:t,method:`OPTIONS`})}function je(e,t){return Q(e,{...t,method:`DELETE`})}function Me(e,t,n){return Ee(e,t,{...n,method:`POST`})}function Ne(e,t,n){return Ee(e,ge(t??{}),{...n,method:`POST`})}function Pe(e,t,n){return Ee(e,t,{...n,method:`PUT`})}function Fe(e,t,n){return Ee(e,t,{...n,method:`PATCH`})}const $=Q;$.create=e=>{let t=new we(e),n=t.request.bind(void 0);return Object.assign(n,we.prototype,t),n},$.get=Oe,$.head=ke,$.options=Ae,$.delete=je,$.post=Me,$.put=Pe,$.patch=Fe,$.upload=Ne;var Ie=$,Le=Ie;export{d as ContentType,p as Method,e as ResponseError,f as StatusCode,Le as default,je as del,Oe as get,ke as head,Ae as options,Fe as patch,Me as post,Pe as put,De as request,Ne as upload};
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
package/dist/umd/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.HookFetch={}))})(this,function(exports){Object.defineProperty(exports,`__esModule`,{value:!0});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e));let u=(e,t)=>e?!t||t.length===0?e:t.reduce((e,t)=>(delete e[t],e),{...e}):{},d=function(e){return e.JSON=`application/json`,e.FORM_URLENCODED=`application/x-www-form-urlencoded`,e.FORM_DATA=`multipart/form-data`,e.TEXT=`text/plain`,e.HTML=`text/html`,e.XML=`text/xml`,e.CSV=`text/csv`,e.STREAM=`application/octet-stream`,e}({}),f=function(e){return e[e.TIME_OUT=408]=`TIME_OUT`,e[e.ABORTED=499]=`ABORTED`,e[e.NETWORK_ERROR=599]=`NETWORK_ERROR`,e[e.BODY_NULL=502]=`BODY_NULL`,e[e.UNKNOWN=601]=`UNKNOWN`,e}({}),p=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.DELETE=`DELETE`,e.PATCH=`PATCH`,e.HEAD=`HEAD`,e.OPTIONS=`OPTIONS`,e}({});var m=class extends Error{#message;#name;#status;#statusText;#response;#config;constructor({message:e,status:t,statusText:n,response:r,config:i,name:a}){super(e),this.#message=e,this.#status=t,this.#statusText=n,this.#response=r,this.#config=i,this.#name=a??e}get message(){return this.#message}get status(){return this.#status}get statusText(){return this.#statusText}get response(){return this.#response}get config(){return this.#config}get name(){return this.#name}};let h=[`PATCH`,`POST`,`PUT`,`DELETE`,`OPTIONS`],g=[`GET`,`HEAD`];function _(e,t,n,r={arrayFormat:`repeat`}){if(!e)return null;if(e instanceof FormData)return e;let i=null;if(h.includes(t.toUpperCase())){let t=new Headers(n||{}),a=t.get(`Content-Type`)||d.JSON;if(a.includes(d.JSON))i=JSON.stringify(e);else if(a.includes(d.FORM_URLENCODED))i=qs.stringify(e,r);else if(a.includes(d.FORM_DATA)){let t=new FormData;if(!(e instanceof FormData)&&typeof e==`object`){let n=e;Object.keys(n).forEach(e=>{n.prototype.hasOwnProperty.call(e)&&t.append(e,n[e])}),i=t}}else (typeof e==`string`||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof ReadableStream<`u`&&e instanceof ReadableStream)&&(i=e)}return g.includes(t.toUpperCase())&&(i=null),i}function v(e){if(e instanceof FormData)return e;let t=new FormData;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];r instanceof File||r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}var y=s((exports,t)=>{t.exports=TypeError}),b=s(()=>{}),x=s((exports,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype,d=u?WeakMap.prototype.has:null,f=typeof WeakSet==`function`&&WeakSet.prototype,p=f?WeakSet.prototype.has:null,m=typeof WeakRef==`function`&&WeakRef.prototype,h=m?WeakRef.prototype.deref:null,g=Boolean.prototype.valueOf,_=Object.prototype.toString,v=Function.prototype.toString,y=String.prototype.match,x=String.prototype.slice,S=String.prototype.replace,C=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,E=Array.prototype.concat,D=Array.prototype.join,O=Array.prototype.slice,k=Math.floor,ee=typeof BigInt==`function`?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,j=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,M=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,N=typeof Symbol==`function`&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||`symbol`)?Symbol.toStringTag:null,te=Object.prototype.propertyIsEnumerable,P=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function F(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||T.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-k(-e):k(e);if(r!==e){var i=String(r),a=x.call(t,i.length+1);return S.call(i,n,`$&_`)+`.`+S.call(S.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return S.call(t,n,`$&_`)}var I=b(),L=I.custom,R=ue(L)?L:null,z={__proto__:null,double:`"`,single:`'`},ne={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(W(s,`quoteStyle`)&&!W(z,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(W(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=W(s,`customInspect`)?s.customInspect:!0;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return J(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?F(t,f):f}if(typeof t==`bigint`){var p=String(t)+`n`;return d?F(t,p):p}var m=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=m&&m>0&&typeof t==`object`)return V(t)?`[Array]`:`[Object]`;var h=X(s,r);if(o===void 0)o=[];else if(pe(o,t)>=0)return`[Circular]`;function _(t,n,i){if(n&&(o=O.call(o),o.push(n)),i){var a={depth:s.depth};return W(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!oe(t)){var v=fe(t),y=Ce(t,_);return`[Function`+(v?`: `+v:` (anonymous)`)+`]`+(y.length>0?` { `+D.call(y,`, `)+` }`:``)}if(ue(t)){var b=M?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):j.call(t);return typeof t==`object`&&!M?Y(b):b}if(_e(t)){for(var C=`<`+w.call(String(t.nodeName)),T=t.attributes||[],k=0;k<T.length;k++)C+=` `+T[k].name+`=`+re(ie(T[k].value),`double`,s);return C+=`>`,t.childNodes&&t.childNodes.length&&(C+=`...`),C+=`</`+w.call(String(t.nodeName))+`>`,C}if(V(t)){if(t.length===0)return`[]`;var A=Ce(t,_);return h&&!xe(A)?`[`+Se(A,h)+`]`:`[ `+D.call(A,`, `)+` ]`}if(se(t)){var L=Ce(t,_);return!(`cause`in Error.prototype)&&`cause`in t&&!te.call(t,`cause`)?`{ [`+String(t)+`] `+D.call(E.call(`[cause]: `+_(t.cause),L),`, `)+` }`:L.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+D.call(L,`, `)+` }`}if(typeof t==`object`&&u){if(R&&typeof t[R]==`function`&&I)return I(t,{depth:m-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(K(t)){var ne=[];return a&&a.call(t,function(e,n){ne.push(_(n,t,!0)+` => `+_(e,t))}),be(`Map`,i.call(t),ne,h)}if(he(t)){var B=[];return l&&l.call(t,function(e){B.push(_(e,t))}),be(`Set`,c.call(t),B,h)}if(q(t))return ye(`WeakMap`);if(ge(t))return ye(`WeakSet`);if(me(t))return ye(`WeakRef`);if(le(t))return Y(_(Number(t)));if(de(t))return Y(_(ee.call(t)));if(H(t))return Y(g.call(t));if(ce(t))return Y(_(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!ae(t)&&!oe(t)){var U=Ce(t,_),ve=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,we=t instanceof Object?``:`null prototype`,Z=!ve&&N&&Object(t)===t&&N in t?x.call(G(t),8,-1):we?`Object`:``,Te=ve||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``,Q=Te+(Z||we?`[`+D.call(E.call([],Z||[],we||[]),`: `)+`] `:``);return U.length===0?Q+`{}`:h?Q+`{`+Se(U,h)+`}`:Q+`{ `+D.call(U,`, `)+` }`}return String(t)};function re(e,t,n){var r=n.quoteStyle||t,i=z[r];return i+e+i}function ie(e){return S.call(String(e),/"/g,`"`)}function B(e){return!N||!(typeof e==`object`&&(N in e||e[N]!==void 0))}function V(e){return G(e)===`[object Array]`&&B(e)}function ae(e){return G(e)===`[object Date]`&&B(e)}function oe(e){return G(e)===`[object RegExp]`&&B(e)}function se(e){return G(e)===`[object Error]`&&B(e)}function ce(e){return G(e)===`[object String]`&&B(e)}function le(e){return G(e)===`[object Number]`&&B(e)}function H(e){return G(e)===`[object Boolean]`&&B(e)}function ue(e){if(M)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!j)return!1;try{return j.call(e),!0}catch{}return!1}function de(e){if(!e||typeof e!=`object`||!ee)return!1;try{return ee.call(e),!0}catch{}return!1}var U=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return U.call(e,t)}function G(e){return _.call(e)}function fe(e){if(e.name)return e.name;var t=y.call(v.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function pe(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function K(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function q(e){if(!d||!e||typeof e!=`object`)return!1;try{d.call(e,d);try{p.call(e,p)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function me(e){if(!h||!e||typeof e!=`object`)return!1;try{return h.call(e),!0}catch{}return!1}function he(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ge(e){if(!p||!e||typeof e!=`object`)return!1;try{p.call(e,p);try{d.call(e,d)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function _e(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement?!0:typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function J(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return J(x.call(e,0,t.maxStringLength),t)+r}var i=ne[t.quoteStyle||`single`];i.lastIndex=0;var a=S.call(S.call(e,i,`\\$1`),/[\x00-\x1f]/g,ve);return re(a,`single`,t)}function ve(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+C.call(t.toString(16))}function Y(e){return`Object(`+e+`)`}function ye(e){return e+` { ? }`}function be(e,t,n,r){var i=r?Se(n,r):D.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function xe(e){for(var t=0;t<e.length;t++)if(pe(e[t],`
|
|
2
|
-
`)>=0)return!1;return!0}function
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.HookFetch={}))})(this,function(exports){Object.defineProperty(exports,`__esModule`,{value:!0});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},l=(e,r,i)=>(i=e==null?{}:t(a(e)),c(r||!e||!e.__esModule?n(i,`default`,{value:e,enumerable:!0}):i,e));let u=(e,t)=>e?!t||t.length===0?e:t.reduce((e,t)=>(delete e[t],e),{...e}):{},d=function(e){return e.JSON=`application/json`,e.FORM_URLENCODED=`application/x-www-form-urlencoded`,e.FORM_DATA=`multipart/form-data`,e.TEXT=`text/plain`,e.HTML=`text/html`,e.XML=`text/xml`,e.CSV=`text/csv`,e.STREAM=`application/octet-stream`,e}({}),f=function(e){return e[e.TIME_OUT=408]=`TIME_OUT`,e[e.ABORTED=499]=`ABORTED`,e[e.NETWORK_ERROR=599]=`NETWORK_ERROR`,e[e.BODY_NULL=502]=`BODY_NULL`,e[e.UNKNOWN=601]=`UNKNOWN`,e}({}),p=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.DELETE=`DELETE`,e.PATCH=`PATCH`,e.HEAD=`HEAD`,e.OPTIONS=`OPTIONS`,e}({});var m=class e extends Error{message;name;status;statusText;response;config;constructor({message:t,status:n,statusText:r,response:i,config:a,name:o}){super(t),this.message=t,this.status=n,this.statusText=r,this.response=i,this.config=a,this.name=o??t,Object.setPrototypeOf(this,e.prototype)}},h=s((exports,t)=>{t.exports=TypeError}),g=s(()=>{}),_=s((exports,t)=>{var n=typeof Map==`function`&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,`size`):null,i=n&&r&&typeof r.get==`function`?r.get:null,a=n&&Map.prototype.forEach,o=typeof Set==`function`&&Set.prototype,s=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,`size`):null,c=o&&s&&typeof s.get==`function`?s.get:null,l=o&&Set.prototype.forEach,u=typeof WeakMap==`function`&&WeakMap.prototype,d=u?WeakMap.prototype.has:null,f=typeof WeakSet==`function`&&WeakSet.prototype,p=f?WeakSet.prototype.has:null,m=typeof WeakRef==`function`&&WeakRef.prototype,h=m?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,v=Object.prototype.toString,y=Function.prototype.toString,b=String.prototype.match,x=String.prototype.slice,S=String.prototype.replace,C=String.prototype.toUpperCase,w=String.prototype.toLowerCase,T=RegExp.prototype.test,E=Array.prototype.concat,D=Array.prototype.join,ee=Array.prototype.slice,O=Math.floor,k=typeof BigInt==`function`?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,j=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?Symbol.prototype.toString:null,M=typeof Symbol==`function`&&typeof Symbol.iterator==`object`,N=typeof Symbol==`function`&&Symbol.toStringTag&&(typeof Symbol.toStringTag===M||`symbol`)?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,F=(typeof Reflect==`function`?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function I(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||T.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e==`number`){var r=e<0?-O(-e):O(e);if(r!==e){var i=String(r),a=x.call(t,i.length+1);return S.call(i,n,`$&_`)+`.`+S.call(S.call(a,/([0-9]{3})/g,`$&_`),/_$/,``)}}return S.call(t,n,`$&_`)}var L=g(),R=L.custom,z=le(R)?R:null,te={__proto__:null,double:`"`,single:`'`},B={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};t.exports=function e(t,n,r,o){var s=n||{};if(K(s,`quoteStyle`)&&!K(te,s.quoteStyle))throw TypeError(`option "quoteStyle" must be "single" or "double"`);if(K(s,`maxStringLength`)&&(typeof s.maxStringLength==`number`?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=K(s,`customInspect`)?s.customInspect:!0;if(typeof u!=`boolean`&&u!==`symbol`)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(s,`indent`)&&s.indent!==null&&s.indent!==` `&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(s,`numericSeparator`)&&typeof s.numericSeparator!=`boolean`)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=s.numericSeparator;if(t===void 0)return`undefined`;if(t===null)return`null`;if(typeof t==`boolean`)return t?`true`:`false`;if(typeof t==`string`)return Y(t,s);if(typeof t==`number`){if(t===0)return 1/0/t>0?`0`:`-0`;var f=String(t);return d?I(t,f):f}if(typeof t==`bigint`){var p=String(t)+`n`;return d?I(t,p):p}var m=s.depth===void 0?5:s.depth;if(r===void 0&&(r=0),r>=m&&m>0&&typeof t==`object`)return ie(t)?`[Array]`:`[Object]`;var h=xe(s,r);if(o===void 0)o=[];else if(de(o,t)>=0)return`[Circular]`;function g(t,n,i){if(n&&(o=ee.call(o),o.push(n)),i){var a={depth:s.depth};return K(s,`quoteStyle`)&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if(typeof t==`function`&&!U(t)){var v=ue(t),y=Se(t,g);return`[Function`+(v?`: `+v:` (anonymous)`)+`]`+(y.length>0?` { `+D.call(y,`, `)+` }`:``)}if(le(t)){var b=M?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,`$1`):j.call(t);return typeof t==`object`&&!M?X(b):b}if(ge(t)){for(var C=`<`+w.call(String(t.nodeName)),T=t.attributes||[],O=0;O<T.length;O++)C+=` `+T[O].name+`=`+ne(re(T[O].value),`double`,s);return C+=`>`,t.childNodes&&t.childNodes.length&&(C+=`...`),C+=`</`+w.call(String(t.nodeName))+`>`,C}if(ie(t)){if(t.length===0)return`[]`;var A=Se(t,g);return h&&!be(A)?`[`+Z(A,h)+`]`:`[ `+D.call(A,`, `)+` ]`}if(ae(t)){var R=Se(t,g);return!(`cause`in Error.prototype)&&`cause`in t&&!P.call(t,`cause`)?`{ [`+String(t)+`] `+D.call(E.call(`[cause]: `+g(t.cause),R),`, `)+` }`:R.length===0?`[`+String(t)+`]`:`{ [`+String(t)+`] `+D.call(R,`, `)+` }`}if(typeof t==`object`&&u){if(z&&typeof t[z]==`function`&&L)return L(t,{depth:m-r});if(u!==`symbol`&&typeof t.inspect==`function`)return t.inspect()}if(fe(t)){var B=[];return a&&a.call(t,function(e,n){B.push(g(n,t,!0)+` => `+g(e,t))}),ye(`Map`,i.call(t),B,h)}if(me(t)){var V=[];return l&&l.call(t,function(e){V.push(g(e,t))}),ye(`Set`,c.call(t),V,h)}if(J(t))return ve(`WeakMap`);if(he(t))return ve(`WeakSet`);if(pe(t))return ve(`WeakRef`);if(se(t))return X(g(Number(t)));if(W(t))return X(g(k.call(t)));if(ce(t))return X(_.call(t));if(oe(t))return X(g(String(t)));if(typeof window<`u`&&t===window)return`{ [object Window] }`;if(typeof globalThis<`u`&&t===globalThis||typeof global<`u`&&t===global)return`{ [object globalThis] }`;if(!H(t)&&!U(t)){var G=Se(t,g),_e=F?F(t)===Object.prototype:t instanceof Object||t.constructor===Object,Ce=t instanceof Object?``:`null prototype`,we=!_e&&N&&Object(t)===t&&N in t?x.call(q(t),8,-1):Ce?`Object`:``,Q=_e||typeof t.constructor!=`function`?``:t.constructor.name?t.constructor.name+` `:``,Te=Q+(we||Ce?`[`+D.call(E.call([],we||[],Ce||[]),`: `)+`] `:``);return G.length===0?Te+`{}`:h?Te+`{`+Z(G,h)+`}`:Te+`{ `+D.call(G,`, `)+` }`}return String(t)};function ne(e,t,n){var r=n.quoteStyle||t,i=te[r];return i+e+i}function re(e){return S.call(String(e),/"/g,`"`)}function V(e){return!N||!(typeof e==`object`&&(N in e||e[N]!==void 0))}function ie(e){return q(e)===`[object Array]`&&V(e)}function H(e){return q(e)===`[object Date]`&&V(e)}function U(e){return q(e)===`[object RegExp]`&&V(e)}function ae(e){return q(e)===`[object Error]`&&V(e)}function oe(e){return q(e)===`[object String]`&&V(e)}function se(e){return q(e)===`[object Number]`&&V(e)}function ce(e){return q(e)===`[object Boolean]`&&V(e)}function le(e){if(M)return e&&typeof e==`object`&&e instanceof Symbol;if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||!j)return!1;try{return j.call(e),!0}catch{}return!1}function W(e){if(!e||typeof e!=`object`||!k)return!1;try{return k.call(e),!0}catch{}return!1}var G=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return G.call(e,t)}function q(e){return v.call(e)}function ue(e){if(e.name)return e.name;var t=b.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function de(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function fe(e){if(!i||!e||typeof e!=`object`)return!1;try{i.call(e);try{c.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function J(e){if(!d||!e||typeof e!=`object`)return!1;try{d.call(e,d);try{p.call(e,p)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function pe(e){if(!h||!e||typeof e!=`object`)return!1;try{return h.call(e),!0}catch{}return!1}function me(e){if(!c||!e||typeof e!=`object`)return!1;try{c.call(e);try{i.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function he(e){if(!p||!e||typeof e!=`object`)return!1;try{p.call(e,p);try{d.call(e,d)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ge(e){return!e||typeof e!=`object`?!1:typeof HTMLElement<`u`&&e instanceof HTMLElement?!0:typeof e.nodeName==`string`&&typeof e.getAttribute==`function`}function Y(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r=`... `+n+` more character`+(n>1?`s`:``);return Y(x.call(e,0,t.maxStringLength),t)+r}var i=B[t.quoteStyle||`single`];i.lastIndex=0;var a=S.call(S.call(e,i,`\\$1`),/[\x00-\x1f]/g,_e);return ne(a,`single`,t)}function _e(e){var t=e.charCodeAt(0),n={8:`b`,9:`t`,10:`n`,12:`f`,13:`r`}[t];return n?`\\`+n:`\\x`+(t<16?`0`:``)+C.call(t.toString(16))}function X(e){return`Object(`+e+`)`}function ve(e){return e+` { ? }`}function ye(e,t,n,r){var i=r?Z(n,r):D.call(n,`, `);return e+` (`+t+`) {`+i+`}`}function be(e){for(var t=0;t<e.length;t++)if(de(e[t],`
|
|
2
|
+
`)>=0)return!1;return!0}function xe(e,t){var n;if(e.indent===` `)n=` `;else if(typeof e.indent==`number`&&e.indent>0)n=D.call(Array(e.indent+1),` `);else return null;return{base:n,prev:D.call(Array(t+1),n)}}function Z(e,t){if(e.length===0)return``;var n=`
|
|
3
3
|
`+t.prev+t.base;return n+D.call(e,`,`+n)+`
|
|
4
|
-
`+t.prev}function Ce(e,t){var n=V(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=W(e,i)?t(e[i],e):``}var a=typeof A==`function`?A(e):[],o;if(M){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e){if(!W(e,c)||n&&String(Number(c))===c&&c<e.length||M&&o[`$`+c]instanceof Symbol)continue;T.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))}if(typeof A==`function`)for(var l=0;l<a.length;l++)te.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}}),S=s((exports,t)=>{var n=x(),r=y(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=e&&e.next,r=c(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}}),C=s((exports,t)=>{t.exports=Object}),w=s((exports,t)=>{t.exports=Error}),T=s((exports,t)=>{t.exports=EvalError}),E=s((exports,t)=>{t.exports=RangeError}),D=s((exports,t)=>{t.exports=ReferenceError}),O=s((exports,t)=>{t.exports=SyntaxError}),k=s((exports,t)=>{t.exports=URIError}),ee=s((exports,t)=>{t.exports=Math.abs}),A=s((exports,t)=>{t.exports=Math.floor}),j=s((exports,t)=>{t.exports=Math.max}),M=s((exports,t)=>{t.exports=Math.min}),N=s((exports,t)=>{t.exports=Math.pow}),te=s((exports,t)=>{t.exports=Math.round}),P=s((exports,t)=>{t.exports=Number.isNaN||function(e){return e!==e}}),F=s((exports,t)=>{var n=P();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}}),I=s((exports,t)=>{t.exports=Object.getOwnPropertyDescriptor}),L=s((exports,t)=>{var n=I();if(n)try{n([],`length`)}catch{n=null}t.exports=n}),R=s((exports,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n}),z=s((exports,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}}),ne=s((exports,t)=>{var n=typeof Symbol<`u`&&Symbol,r=z();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}}),re=s((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null}),ie=s((exports,t)=>{var n=C();t.exports=n.getPrototypeOf||null}),B=s((exports,t)=>{var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}}),V=s((exports,t)=>{var n=B();t.exports=Function.prototype.bind||n}),ae=s((exports,t)=>{t.exports=Function.prototype.call}),oe=s((exports,t)=>{t.exports=Function.prototype.apply}),se=s((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply}),ce=s((exports,t)=>{var n=V(),r=oe(),i=ae(),a=se();t.exports=a||n.call(i,r)}),le=s((exports,t)=>{var n=V(),r=y(),i=ae(),a=ce();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}}),H=s((exports,t)=>{var n=le(),r=L(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1}),ue=s((exports,t)=>{var n=re(),r=ie(),i=H();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null}),de=s((exports,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty,i=V();t.exports=i.call(n,r)}),U=s((exports,t)=>{var n,r=C(),i=w(),a=T(),o=E(),s=D(),c=O(),l=y(),u=k(),d=ee(),f=A(),p=j(),m=M(),h=N(),g=te(),_=F(),v=Function,b=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},x=L(),S=R(),P=function(){throw new l},I=x?function(){try{return arguments.callee,P}catch{try{return x(arguments,`callee`).get}catch{return P}}}():P,z=ne()(),B=ue(),se=ie(),ce=re(),le=oe(),H=ae(),U={},W=typeof Uint8Array>`u`||!B?n:B(Uint8Array),G={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":z&&B?B([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":U,"%AsyncGenerator%":U,"%AsyncGeneratorFunction%":U,"%AsyncIteratorPrototype%":U,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":U,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":z&&B?B(B([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!z||!B?n:B(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!z||!B?n:B(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":z&&B?B(``[Symbol.iterator]()):n,"%Symbol%":z?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":I,"%TypedArray%":W,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":H,"%Function.prototype.apply%":le,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":se,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":ce};if(B)try{null.error}catch(e){var fe=B(B(e));G[`%Error.prototype%`]=fe}var pe=function e(t){var n;if(t===`%AsyncFunction%`)n=b(`async function () {}`);else if(t===`%GeneratorFunction%`)n=b(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=b(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&B&&(n=B(i.prototype))}return G[t]=n,n},K={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},q=V(),me=de(),he=q.call(H,Array.prototype.concat),ge=q.call(le,Array.prototype.splice),_e=q.call(H,String.prototype.replace),J=q.call(H,String.prototype.slice),ve=q.call(H,RegExp.prototype.exec),Y=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ye=/\\(\\)?/g,be=function(e){var t=J(e,0,1),n=J(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return _e(e,Y,function(e,t,n,i){r[r.length]=n?_e(i,ye,`$1`):t||e}),r},xe=function(e,t){var n=e,r;if(me(K,n)&&(r=K[n],n=`%`+r[0]+`%`),me(G,n)){var i=G[n];if(i===U&&(i=pe(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(ve(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=be(e),r=n.length>0?n[0]:``,i=xe(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],ge(n,he([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=J(p,0,1),h=J(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,me(G,a))o=G[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(x&&d+1>=n.length){var g=x(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=me(o,p),o=o[p];f&&!s&&(G[a]=o)}}return o}}),W=s((exports,t)=>{var n=U(),r=le(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}}),G=s((exports,t)=>{var n=U(),r=W(),i=x(),a=y(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}}),fe=s((exports,t)=>{var n=U(),r=W(),i=x(),a=G(),o=y(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a}),pe=s((exports,t)=>{var n=y(),r=x(),i=S(),a=G(),o=fe(),s=o||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+r(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=s(),e.set(t,n)}};return t}}),K=s((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),q=s((exports,t)=>{var n=K(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a<n.length;++a)n[a]!==void 0&&r.push(n[a]);t.obj[t.prop]=r}}},s=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},c=function e(t,n,a){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(i(t))t.push(n);else if(t&&typeof t==`object`)(a&&(a.plainObjects||a.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!=`object`)return[t].concat(n);var o=t;return i(t)&&!i(n)&&(o=s(t,a)),i(t)&&i(n)?(n.forEach(function(n,i){if(r.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,a):t.push(n)}else t[i]=n}),t):Object.keys(n).reduce(function(t,i){var o=n[i];return r.call(t,i)?t[i]=e(t[i],o,a):t[i]=o,t},o)},l=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},u=function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},d=1024,f=function(e,t,r,i,o){if(e.length===0)return e;var s=e;if(typeof e==`symbol`?s=Symbol.prototype.toString.call(e):typeof e!=`string`&&(s=String(e)),r===`iso-8859-1`)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});for(var c=``,l=0;l<s.length;l+=d){for(var u=s.length>=d?s.slice(l,l+d):s,f=[],p=0;p<u.length;++p){var m=u.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u==`object`&&u&&n.indexOf(u)===-1&&(t.push({obj:a,prop:l}),n.push(u))}return o(t),e},m=function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},h=function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},g=function(e,t){return[].concat(e,t)},_=function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)};t.exports={arrayToObject:s,assign:l,combine:g,compact:p,decode:u,encode:f,isBuffer:h,isRegExp:m,maybeMap:_,merge:c}}),me=s((exports,t)=>{var n=pe(),r=q(),i=K(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,O=0,k=!1;(D=D.get(m))!==void 0&&!k;){var ee=D.get(t);if(O+=1,ee!==void 0){if(ee===O)throw RangeError(`Cyclic object value`);k=!0}D.get(m)===void 0&&(O=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var A=C?i:g(i,f.encoder,w,`key`,x);return[S(A)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var j=[];if(E===void 0)return j;var M;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),M=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))M=_;else{var N=Object.keys(E);M=v?N.sort(v):N}var te=h?String(i).replace(/\./g,`%2E`):String(i),P=o&&s(E)&&E.length===1?te+`[]`:te;if(c&&s(E)&&E.length===0)return P+`[]`;for(var F=0;F<M.length;++F){var I=M[F],L=typeof I==`object`&&I&&I.value!==void 0?I.value:E[I];if(!(d&&L===null)){var R=y&&h?String(I).replace(/\./g,`%2E`):String(I),z=s(E)?typeof a==`function`?a(P,R):P:P+(y?`.`+R:`[`+R+`]`);T.set(t,O);var ne=n();ne.set(m,T),l(j,e(L,z,a,o,c,u,d,h,a===`comma`&&C&&s(E)?null:g,_,v,y,b,x,S,C,w,ne))}}return j},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l;if(l=e.arrayFormat in o?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat,`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0?!0:f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m],v=r[_];i.skipNulls&&v===null||l(u,h(v,_,d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B&`:b+=`utf8=%E2%9C%93&`),y.length>0?b+y:``}}),he=s((exports,t)=>{var n=q(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<p.length;++h)p[h].indexOf(`utf8=`)===0&&(p[h]===l?g=`utf-8`:p[h]===c&&(g=`iso-8859-1`),m=h,h=p.length);for(h=0;h<p.length;++h)if(h!==m){var _=p[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b,x;y===-1?(b=t.decoder(_,a.decoder,g,`key`),x=t.strictNullHandling?null:``):(b=t.decoder(_.slice(0,y),a.decoder,g,`key`),x=n.maybeMap(s(_.slice(y+1),t,i(u[b])?u[b].length:0),function(e){return t.decoder(e,a.decoder,g,`value`)})),x&&t.interpretNumericEntities&&g===`iso-8859-1`&&(x=o(String(x))),_.indexOf(`[]=`)>-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f<n.depth;){if(f+=1,!n.plainObjects&&r.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}if(c){if(n.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+n.depth+` and strictDepth is true`);u.push(`[`+a.slice(c.index)+`]`)}return d(u,t,n,i)}},p=function(e){if(!e)return a;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?a.charset:e.charset,r=e.duplicates===void 0?a.duplicates:e.duplicates;if(r!==`combine`&&r!==`first`&&r!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);var i=e.allowDots===void 0?e.decodeDotInKeys===!0?!0:a.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:a.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:a.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:a.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:a.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:a.decoder,delimiter:typeof e.delimiter==`string`||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:a.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:a.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:a.strictDepth,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`?e.throwOnLimitExceeded:!1}};t.exports=function(e,t){var r=p(t);if(e===``||e==null)return r.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?u(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],l=f(c,i[c],r,typeof e==`string`);a=n.merge(a,l,r)}return r.allowSparse===!0?a:n.compact(a)}}),ge=s((exports,t)=>{var n=me(),r=he(),i=K();t.exports={formats:i,parse:r,stringify:n}}),_e=l(ge(),1);let J={arrayFormat:`repeat`};function ve(e,t,n={arrayFormat:`repeat`}){if(t){let r=_e.default.stringify(t,n);r&&(e=e.includes(`?`)?`${e}&${r}`:`${e}?${r}`)}return e}function Y(e={},t={}){let n=e instanceof Headers?e:new Headers(e),r=e=>{e instanceof Headers||(e=new Headers(e)),e.forEach((e,t)=>{n.set(t,e)})};return r(t),n}function ye(e){return e[Symbol.toStringTag]===`Generator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.iterator]==`function`}function be(e){return e[Symbol.toStringTag]===`AsyncGenerator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.asyncIterator]==`function`}function xe(e){let t=new Map;e.forEach(e=>{t.set(e.name,e)});let n=Array.from(t.values()).sort((e,t)=>(e.priority??0)-(t.priority??0)),r=[],i=[],a=[],o=[],s=[],c=[];return n.forEach(e=>{e.beforeRequest&&r.push(e.beforeRequest),e.afterResponse&&i.push(e.afterResponse),e.onError&&a.push(e.onError),e.onFinally&&o.push(e.onFinally),e.transformStreamChunk&&s.push(e.transformStreamChunk),e.beforeStream&&c.push(e.beforeStream)}),{beforeRequestPlugins:r,afterResponsePlugins:i,errorPlugins:a,finallyPlugins:o,beforeStreamPlugins:c,transformStreamChunkPlugins:s}}var X=function(e){return e.JSON=`json`,e.BLOB=`blob`,e.TEXT=`text`,e.ARRAY_BUFFER=`arrayBuffer`,e.FORM_DATA=`formData`,e.BYTES=`bytes`,e}(X||{}),Se=class e{#plugins;#sourcePlugins;#controller;#config;#promise=null;#isTimeout=!1;#executor=null;#finallyCallbacks=new Set;#responseType=`json`;#fullOptions;constructor(e){this.#fullOptions=e;let{plugins:t=[],controller:n,url:r,baseURL:i=``,params:a,data:o,qsConfig:s={},withCredentials:c=!1,extra:l,method:u=`GET`,headers:d={}}=e;this.#controller=n??new AbortController,this.#sourcePlugins=t,this.#plugins=xe(t),this.#config={url:r,baseURL:i,params:a,data:o,withCredentials:c,extra:l,method:u,headers:d,qsConfig:Object.assign(J,s)},this.#promise=this.#init(e)}#init({timeout:e}){return new Promise(async(t,n)=>{let r=this.#config,{beforeRequestPlugins:i}=this.#plugins,a=null;for(let e of i)try{if(r=await e(r),r.resolve){let e=r.resolve();e instanceof Response?t(e):t(new Response(e))}}catch(e){a=e;break}if(a)return this.#promise=null,n(a);let o=ve(r.baseURL+r.url,r.params,r.qsConfig),s=_(r.data??null,r.method,r.headers,r.qsConfig),c=u(r??{},[`baseURL`,`data`,`extra`,`headers`,`method`,`params`,`url`,`withCredentials`]),l={...c,method:r.method,headers:r.headers,signal:this.#controller.signal,credentials:r.withCredentials?`include`:`omit`,body:s},d=fetch(o,l),p=[d],h=null;if(e){let t=new Promise(t=>{h=setTimeout(()=>{this.#isTimeout=!0,this.#controller?.abort()},e)});p.push(t)}try{let e=await Promise.race(p);e?(e.ok&&t(e),a=new m({message:`Fail Request`,status:e.status,statusText:e.statusText,config:this.#config,name:`Fail Request`,response:e})):a=new m({message:`NETWORK_ERROR`,status:f.NETWORK_ERROR,statusText:`Network Error`,config:this.#config,name:`Network Error`})}catch(e){a=e,this.#promise=null}finally{a&&n(a),h&&clearTimeout(h)}})}async#createNormalizeError(e){if(e instanceof m)return e;let t;return t=this.#promise?await this.#response:void 0,e instanceof TypeError?e.name===`AbortError`?this.#isTimeout?new m({message:`Request timeout`,status:f.TIME_OUT,statusText:`Request timeout`,config:this.#config,name:`Request timeout`,response:t}):new m({message:`Request aborted`,status:f.ABORTED,statusText:`Request aborted`,config:this.#config,name:`Request aborted`,response:t}):new m({message:e.message,status:f.NETWORK_ERROR,statusText:`Unknown Request Error`,config:this.#config,name:e.name,response:t}):new m({message:e?.message??`Unknown Request Error`,status:f.UNKNOWN,statusText:`Unknown Request Error`,config:this.#config,name:`Unknown Request Error`,response:t})}async#normalizeError(e){let t=await this.#createNormalizeError(e);for(let e of this.#plugins.errorPlugins)t=await e(t,this.#config);return t.__normalized=!0,t}#execFinally(){for(let e of this.#finallyCallbacks)e();this.#plugins.finallyPlugins.forEach(e=>{e({config:this.#config})}),this.#finallyCallbacks.clear(),this.#plugins.finallyPlugins.length!==this.#sourcePlugins?.length&&(this.#plugins=xe(this.#sourcePlugins))}get#getExecutor(){return this.#executor?this.#executor:this.#response}async#resolve(e){let t=this.#plugins.afterResponsePlugins,n={config:this.#config,response:await this.#response,responseType:this.#responseType,controller:this.#controller,result:e};try{for(let e of t)n=await e(n,this.#config);return n.result}catch(e){return Promise.reject(e)}}then(e,t){return this.#getExecutor.then(async t=>e?.call(this,await this.#resolve(t)),async e=>t?.call(this,await this.#normalizeError(e)))}catch(e){return this.#getExecutor.catch(e)}finally(e){this.#finallyCallbacks.add(e)}abort(){this.#controller.abort()}get#response(){return this.#promise?this.#promise.then(e=>e.clone()).catch(async e=>{throw await this.#normalizeError(e)}):Promise.reject(Error(`Response is null`))}json(){return this.#then(X.JSON,this.#response?.then(e=>e.json()))}blob(){return this.#then(X.BLOB,this.#response?.then(e=>e.blob()))}text(){return this.#then(X.TEXT,this.#response?.then(e=>e.text()))}arrayBuffer(){return this.#then(X.ARRAY_BUFFER,this.#response.then(e=>e.arrayBuffer()))}#then(e,t){return this.#executor=t.then(t=>(this.#responseType=e,this.#resolve(t))).catch(async t=>{throw this.#responseType=e,t.__normalized?t:await this.#normalizeError(t)}).finally(this.#execFinally.bind(this)),this.#executor}formData(){return this.#then(X.FORM_DATA,this.#response.then(e=>e.formData()))}bytes(){return this.#then(X.BYTES,this.#response.then(e=>e.bytes()))}__injectPlugins__(e){let t=[...this.#sourcePlugins,...e];this.#plugins=xe(t)}async*stream(){let e=(await this.#response)?.body;if(!e)throw Error(`Response body is null`);for(let t of this.#plugins.beforeStreamPlugins)e=await t(e,this.#config);let t=e.getReader();if(!t)throw Error(`Response body reader is null`);try{for(;;){let{done:e,value:n}=await t.read();if(e)break;let r={source:n,result:n,error:null};try{for(let e of this.#plugins.transformStreamChunkPlugins)r=await e(r,this.#config);if(r.result&&(ye(r.result)||be(r.result)))for await(let e of r.result){let t={source:r.source,result:e,error:null};yield t}else yield r}catch(e){r.error=e,r.result=null,yield r}}}catch(e){return this.#normalizeError(e)}finally{t.releaseLock(),this.#execFinally()}}retry(){let{controller:t,...n}=this.#fullOptions;return new e(n)}get response(){return this.#response}};function Ce(e){return new Se(e)}var we=class{#timeout;#baseURL;#commonHeaders;#queue=[];#plugins=[];#withCredentials;#qsConfig;constructor({timeout:e=0,baseURL:t=``,headers:n={},plugins:r=[],withCredentials:i=!1,qsConfig:a={}}){this.#timeout=e,this.#baseURL=t,this.#commonHeaders=n,this.#plugins=r,this.#withCredentials=i,this.#qsConfig=a,this.request=this.request.bind(this),this.get=this.get.bind(this),this.head=this.head.bind(this),this.options=this.options.bind(this),this.delete=this.delete.bind(this),this.post=this.post.bind(this),this.put=this.put.bind(this),this.patch=this.patch.bind(this),this.abortAll=this.abortAll.bind(this),this.use=this.use.bind(this)}use(e){return this.#plugins.push(e),this}request(e,{timeout:t,headers:n,method:r=`GET`,params:i={},data:a={},qsConfig:o={},withCredentials:s,extra:c={},plugins:l=[]}={}){let u=new AbortController;this.#queue.push(u);let d=this,f={name:`hook-fetch-inner-wrapper`,priority:2**53-1,onFinally(){d.#queue=d.#queue.filter(e=>e!==u)}},p=Ce({url:e,baseURL:this.#baseURL,timeout:t??this.#timeout,plugins:[...this.#plugins,...l,f],headers:Y(this.#commonHeaders,n),controller:u,method:r,params:i,data:a,qsConfig:Object.assign(this.#qsConfig,o),withCredentials:s??this.#withCredentials,extra:c});return p}#requestWithParams(e,t={},n={}){return this.request(e,{...n,params:t})}#requestWithBody(e,t={},n={}){return this.request(e,{...n,data:t})}get(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`GET`})}head(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`HEAD`})}options(e,t={},n){return this.request(e,{...n,method:`OPTIONS`,params:t})}delete(e,t){return this.request(e,{...t,method:`DELETE`})}post(e,t,n){return this.#requestWithBody(e,t,{...n,method:`POST`})}upload(e,t,n){return this.#requestWithBody(e,v(t??{}),{...n,method:`POST`})}put(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PUT`})}patch(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PATCH`})}abortAll(){this.#queue.forEach(e=>e.abort()),this.#queue=[]}};function Z(e,t={}){return Ce({url:e,baseURL:``,...t})}function Te(e,t,n={}){return Z(e,{...n,params:t})}function Q(e,t=null,n={}){return Z(e,{...n,data:t})}let Ee=Z;function De(e,t={},n){return Te(e,t,{...n,method:`GET`})}function Oe(e,t={},n){return Te(e,t,{...n,method:`HEAD`})}function ke(e,t={},n){return Z(e,{...n,params:t,method:`OPTIONS`})}function Ae(e,t){return Z(e,{...t,method:`DELETE`})}function je(e,t,n){return Q(e,t,{...n,method:`POST`})}function Me(e,t,n){return Q(e,v(t??{}),{...n,method:`POST`})}function Ne(e,t,n){return Q(e,t,{...n,method:`PUT`})}function Pe(e,t,n){return Q(e,t,{...n,method:`PATCH`})}let $=Z;$.create=e=>{let t=new we(e),n=t.request.bind(void 0);return Object.assign(n,we.prototype,t),n},$.get=De,$.head=Oe,$.options=ke,$.delete=Ae,$.post=je,$.put=Ne,$.patch=Pe,$.upload=Me;var Fe=$;function Ie(e,t,n,r){return`${e}::${t}::${JSON.stringify(n)}::${JSON.stringify(r)}`}let Le=`DedupeError`;function Re(e){return e instanceof m&&e.name===Le}function ze(e={}){let t=new Map;return{name:`dedupe`,async beforeRequest(e){if(e.extra?.dedupeAble??!0){let n=Ie(e.url,e.method,e.params,e.data),r=t.get(n);if(r)throw new m({message:`Dedupe error`,status:400,statusText:`Dedupe error`,config:e,name:Le});t.set(n,!0)}return e},afterResponse:e=>{let n=Ie(e.config.url,e.config.method,e.config.params,e.config.data);return t.has(n)&&t.delete(n),e},onError:e=>{if(e.config){let n=Ie(e.config.url,e.config.method,e.config.params,e.config.data);t.has(n)&&t.delete(n)}return e}}}function Be({splitSeparator:e=`
|
|
4
|
+
`+t.prev}function Se(e,t){var n=ie(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=K(e,i)?t(e[i],e):``}var a=typeof A==`function`?A(e):[],o;if(M){o={};for(var s=0;s<a.length;s++)o[`$`+a[s]]=a[s]}for(var c in e){if(!K(e,c)||n&&String(Number(c))===c&&c<e.length||M&&o[`$`+c]instanceof Symbol)continue;T.call(/[^\w$]/,c)?r.push(t(c,e)+`: `+t(e[c],e)):r.push(c+`: `+t(e[c],e))}if(typeof A==`function`)for(var l=0;l<a.length;l++)P.call(e,a[l])&&r.push(`[`+t(a[l])+`]: `+t(e[a[l]],e));return r}}),v=s((exports,t)=>{var n=_(),r=h(),i=function(e,t,n){for(var r=e,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,n||(i.next=e.next,e.next=i),i},a=function(e,t){if(e){var n=i(e,t);return n&&n.value}},o=function(e,t,n){var r=i(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},s=function(e,t){return e?!!i(e,t):!1},c=function(e,t){if(e)return i(e,t,!0)};t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new r(`Side channel does not contain `+n(e))},delete:function(t){var n=e&&e.next,r=c(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return a(e,t)},has:function(t){return s(e,t)},set:function(t,n){e||={next:void 0},o(e,t,n)}};return t}}),y=s((exports,t)=>{t.exports=Object}),b=s((exports,t)=>{t.exports=Error}),x=s((exports,t)=>{t.exports=EvalError}),S=s((exports,t)=>{t.exports=RangeError}),C=s((exports,t)=>{t.exports=ReferenceError}),w=s((exports,t)=>{t.exports=SyntaxError}),T=s((exports,t)=>{t.exports=URIError}),E=s((exports,t)=>{t.exports=Math.abs}),D=s((exports,t)=>{t.exports=Math.floor}),ee=s((exports,t)=>{t.exports=Math.max}),O=s((exports,t)=>{t.exports=Math.min}),k=s((exports,t)=>{t.exports=Math.pow}),A=s((exports,t)=>{t.exports=Math.round}),j=s((exports,t)=>{t.exports=Number.isNaN||function(e){return e!==e}}),M=s((exports,t)=>{var n=j();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}}),N=s((exports,t)=>{t.exports=Object.getOwnPropertyDescriptor}),P=s((exports,t)=>{var n=N();if(n)try{n([],`length`)}catch{n=null}t.exports=n}),F=s((exports,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n}),I=s((exports,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}}),L=s((exports,t)=>{var n=typeof Symbol<`u`&&Symbol,r=I();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}}),R=s((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null}),z=s((exports,t)=>{var n=y();t.exports=n.getPrototypeOf||null}),te=s((exports,t)=>{var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}}),B=s((exports,t)=>{var n=te();t.exports=Function.prototype.bind||n}),ne=s((exports,t)=>{t.exports=Function.prototype.call}),re=s((exports,t)=>{t.exports=Function.prototype.apply}),V=s((exports,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply}),ie=s((exports,t)=>{var n=B(),r=re(),i=ne(),a=V();t.exports=a||n.call(i,r)}),H=s((exports,t)=>{var n=B(),r=h(),i=ne(),a=ie();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}}),U=s((exports,t)=>{var n=H(),r=P(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?function(e){return s(e==null?e:o(e))}:!1}),ae=s((exports,t)=>{var n=R(),r=z(),i=U();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null}),oe=s((exports,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty,i=B();t.exports=i.call(n,r)}),se=s((exports,t)=>{var n,r=y(),i=b(),a=x(),o=S(),s=C(),c=w(),l=h(),u=T(),d=E(),f=D(),p=ee(),m=O(),g=k(),_=A(),v=M(),j=Function,N=function(e){try{return j(`"use strict"; return (`+e+`).constructor;`)()}catch{}},I=P(),te=F(),V=function(){throw new l},ie=I?function(){try{return arguments.callee,V}catch{try{return I(arguments,`callee`).get}catch{return V}}}():V,H=L()(),U=ae(),se=z(),ce=R(),le=re(),W=ne(),G={},K=typeof Uint8Array>`u`||!U?n:U(Uint8Array),q={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":H&&U?U([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":G,"%AsyncGenerator%":G,"%AsyncGeneratorFunction%":G,"%AsyncIteratorPrototype%":G,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":j,"%GeneratorFunction%":G,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":H&&U?U(U([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!H||!U?n:U(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":I,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!H||!U?n:U(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":H&&U?U(``[Symbol.iterator]()):n,"%Symbol%":H?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":ie,"%TypedArray%":K,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":W,"%Function.prototype.apply%":le,"%Object.defineProperty%":te,"%Object.getPrototypeOf%":se,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":g,"%Math.round%":_,"%Math.sign%":v,"%Reflect.getPrototypeOf%":ce};if(U)try{null.error}catch(e){var ue=U(U(e));q[`%Error.prototype%`]=ue}var de=function e(t){var n;if(t===`%AsyncFunction%`)n=N(`async function () {}`);else if(t===`%GeneratorFunction%`)n=N(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=N(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&U&&(n=U(i.prototype))}return q[t]=n,n},fe={__proto__:null,"%ArrayBufferPrototype%":[`ArrayBuffer`,`prototype`],"%ArrayPrototype%":[`Array`,`prototype`],"%ArrayProto_entries%":[`Array`,`prototype`,`entries`],"%ArrayProto_forEach%":[`Array`,`prototype`,`forEach`],"%ArrayProto_keys%":[`Array`,`prototype`,`keys`],"%ArrayProto_values%":[`Array`,`prototype`,`values`],"%AsyncFunctionPrototype%":[`AsyncFunction`,`prototype`],"%AsyncGenerator%":[`AsyncGeneratorFunction`,`prototype`],"%AsyncGeneratorPrototype%":[`AsyncGeneratorFunction`,`prototype`,`prototype`],"%BooleanPrototype%":[`Boolean`,`prototype`],"%DataViewPrototype%":[`DataView`,`prototype`],"%DatePrototype%":[`Date`,`prototype`],"%ErrorPrototype%":[`Error`,`prototype`],"%EvalErrorPrototype%":[`EvalError`,`prototype`],"%Float32ArrayPrototype%":[`Float32Array`,`prototype`],"%Float64ArrayPrototype%":[`Float64Array`,`prototype`],"%FunctionPrototype%":[`Function`,`prototype`],"%Generator%":[`GeneratorFunction`,`prototype`],"%GeneratorPrototype%":[`GeneratorFunction`,`prototype`,`prototype`],"%Int8ArrayPrototype%":[`Int8Array`,`prototype`],"%Int16ArrayPrototype%":[`Int16Array`,`prototype`],"%Int32ArrayPrototype%":[`Int32Array`,`prototype`],"%JSONParse%":[`JSON`,`parse`],"%JSONStringify%":[`JSON`,`stringify`],"%MapPrototype%":[`Map`,`prototype`],"%NumberPrototype%":[`Number`,`prototype`],"%ObjectPrototype%":[`Object`,`prototype`],"%ObjProto_toString%":[`Object`,`prototype`,`toString`],"%ObjProto_valueOf%":[`Object`,`prototype`,`valueOf`],"%PromisePrototype%":[`Promise`,`prototype`],"%PromiseProto_then%":[`Promise`,`prototype`,`then`],"%Promise_all%":[`Promise`,`all`],"%Promise_reject%":[`Promise`,`reject`],"%Promise_resolve%":[`Promise`,`resolve`],"%RangeErrorPrototype%":[`RangeError`,`prototype`],"%ReferenceErrorPrototype%":[`ReferenceError`,`prototype`],"%RegExpPrototype%":[`RegExp`,`prototype`],"%SetPrototype%":[`Set`,`prototype`],"%SharedArrayBufferPrototype%":[`SharedArrayBuffer`,`prototype`],"%StringPrototype%":[`String`,`prototype`],"%SymbolPrototype%":[`Symbol`,`prototype`],"%SyntaxErrorPrototype%":[`SyntaxError`,`prototype`],"%TypedArrayPrototype%":[`TypedArray`,`prototype`],"%TypeErrorPrototype%":[`TypeError`,`prototype`],"%Uint8ArrayPrototype%":[`Uint8Array`,`prototype`],"%Uint8ClampedArrayPrototype%":[`Uint8ClampedArray`,`prototype`],"%Uint16ArrayPrototype%":[`Uint16Array`,`prototype`],"%Uint32ArrayPrototype%":[`Uint32Array`,`prototype`],"%URIErrorPrototype%":[`URIError`,`prototype`],"%WeakMapPrototype%":[`WeakMap`,`prototype`],"%WeakSetPrototype%":[`WeakSet`,`prototype`]},J=B(),pe=oe(),me=J.call(W,Array.prototype.concat),he=J.call(le,Array.prototype.splice),ge=J.call(W,String.prototype.replace),Y=J.call(W,String.prototype.slice),_e=J.call(W,RegExp.prototype.exec),X=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ve=/\\(\\)?/g,ye=function(e){var t=Y(e,0,1),n=Y(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return ge(e,X,function(e,t,n,i){r[r.length]=n?ge(i,ve,`$1`):t||e}),r},be=function(e,t){var n=e,r;if(pe(fe,n)&&(r=fe[n],n=`%`+r[0]+`%`),pe(q,n)){var i=q[n];if(i===G&&(i=de(n)),i===void 0&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(_e(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ye(e),r=n.length>0?n[0]:``,i=be(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],he(n,me([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=Y(p,0,1),h=Y(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,pe(q,a))o=q[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(I&&d+1>=n.length){var g=I(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=pe(o,p),o=o[p];f&&!s&&(q[a]=o)}}return o}}),ce=s((exports,t)=>{var n=se(),r=H(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}}),le=s((exports,t)=>{var n=se(),r=ce(),i=_(),a=h(),o=n(`%Map%`,!0),s=r(`Map.prototype.get`,!0),c=r(`Map.prototype.set`,!0),l=r(`Map.prototype.has`,!0),u=r(`Map.prototype.delete`,!0),d=r(`Map.prototype.size`,!0);t.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new a(`Side channel does not contain `+i(e))},delete:function(t){if(e){var n=u(e,t);return d(e)===0&&(e=void 0),n}return!1},get:function(t){if(e)return s(e,t)},has:function(t){return e?l(e,t):!1},set:function(t,n){e||=new o,c(e,t,n)}};return t}}),W=s((exports,t)=>{var n=se(),r=ce(),i=_(),a=le(),o=h(),s=n(`%WeakMap%`,!0),c=r(`WeakMap.prototype.get`,!0),l=r(`WeakMap.prototype.set`,!0),u=r(`WeakMap.prototype.has`,!0),d=r(`WeakMap.prototype.delete`,!0);t.exports=s?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new o(`Side channel does not contain `+i(e))},delete:function(n){if(s&&n&&(typeof n==`object`||typeof n==`function`)){if(e)return d(e,n)}else if(a&&t)return t.delete(n);return!1},get:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?c(e,n):t&&t.get(n)},has:function(n){return s&&n&&(typeof n==`object`||typeof n==`function`)&&e?u(e,n):!!t&&t.has(n)},set:function(n,r){s&&n&&(typeof n==`object`||typeof n==`function`)?(e||=new s,l(e,n,r)):a&&(t||=a(),t.set(n,r))}};return n}:a}),G=s((exports,t)=>{var n=h(),r=_(),i=v(),a=le(),o=W(),s=o||a||i;t.exports=function(){var e,t={assert:function(e){if(!t.has(e))throw new n(`Side channel does not contain `+r(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||=s(),e.set(t,n)}};return t}}),K=s((exports,t)=>{var n=String.prototype.replace,r=/%20/g,i={RFC1738:`RFC1738`,RFC3986:`RFC3986`};t.exports={default:i.RFC3986,formatters:{RFC1738:function(e){return n.call(e,r,`+`)},RFC3986:function(e){return String(e)}},RFC1738:i.RFC1738,RFC3986:i.RFC3986}}),q=s((exports,t)=>{var n=K(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push(`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a<n.length;++a)n[a]!==void 0&&r.push(n[a]);t.obj[t.prop]=r}}},s=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)e[r]!==void 0&&(n[r]=e[r]);return n},c=function e(t,n,a){if(!n)return t;if(typeof n!=`object`&&typeof n!=`function`){if(i(t))t.push(n);else if(t&&typeof t==`object`)(a&&(a.plainObjects||a.allowPrototypes)||!r.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!=`object`)return[t].concat(n);var o=t;return i(t)&&!i(n)&&(o=s(t,a)),i(t)&&i(n)?(n.forEach(function(n,i){if(r.call(t,i)){var o=t[i];o&&typeof o==`object`&&n&&typeof n==`object`?t[i]=e(o,n,a):t.push(n)}else t[i]=n}),t):Object.keys(n).reduce(function(t,i){var o=n[i];return r.call(t,i)?t[i]=e(t[i],o,a):t[i]=o,t},o)},l=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},u=function(e,t,n){var r=e.replace(/\+/g,` `);if(n===`iso-8859-1`)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},d=1024,f=function(e,t,r,i,o){if(e.length===0)return e;var s=e;if(typeof e==`symbol`?s=Symbol.prototype.toString.call(e):typeof e!=`string`&&(s=String(e)),r===`iso-8859-1`)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return`%26%23`+parseInt(e.slice(2),16)+`%3B`});for(var c=``,l=0;l<s.length;l+=d){for(var u=s.length>=d?s.slice(l,l+d):s,f=[],p=0;p<u.length;++p){var m=u.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||o===n.RFC1738&&(m===40||m===41)){f[f.length]=u.charAt(p);continue}if(m<128){f[f.length]=a[m];continue}if(m<2048){f[f.length]=a[192|m>>6]+a[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=a[224|m>>12]+a[128|m>>6&63]+a[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|u.charCodeAt(p)&1023),f[f.length]=a[240|m>>18]+a[128|m>>12&63]+a[128|m>>6&63]+a[128|m&63]}c+=f.join(``)}return c},p=function(e){for(var t=[{obj:{o:e},prop:`o`}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u==`object`&&u&&n.indexOf(u)===-1&&(t.push({obj:a,prop:l}),n.push(u))}return o(t),e},m=function(e){return Object.prototype.toString.call(e)===`[object RegExp]`},h=function(e){return!e||typeof e!=`object`?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},g=function(e,t){return[].concat(e,t)},_=function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)};t.exports={arrayToObject:s,assign:l,combine:g,compact:p,decode:u,encode:f,isBuffer:h,isRegExp:m,maybeMap:_,merge:c}}),ue=s((exports,t)=>{var n=G(),r=q(),i=K(),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+`[]`},comma:`comma`,indices:function(e,t){return e+`[`+t+`]`},repeat:function(e){return e}},s=Array.isArray,c=Array.prototype.push,l=function(e,t){c.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:`indices`,charset:`utf-8`,charsetSentinel:!1,commaRoundTrip:!1,delimiter:`&`,encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},p=function(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`||typeof e==`bigint`},m={},h=function e(t,i,a,o,c,u,d,h,g,_,v,y,b,x,S,C,w,T){for(var E=t,D=T,ee=0,O=!1;(D=D.get(m))!==void 0&&!O;){var k=D.get(t);if(ee+=1,k!==void 0){if(k===ee)throw RangeError(`Cyclic object value`);O=!0}D.get(m)===void 0&&(ee=0)}if(typeof _==`function`?E=_(i,E):E instanceof Date?E=b(E):a===`comma`&&s(E)&&(E=r.maybeMap(E,function(e){return e instanceof Date?b(e):e})),E===null){if(u)return g&&!C?g(i,f.encoder,w,`key`,x):i;E=``}if(p(E)||r.isBuffer(E)){if(g){var A=C?i:g(i,f.encoder,w,`key`,x);return[S(A)+`=`+S(g(E,f.encoder,w,`value`,x))]}return[S(i)+`=`+S(String(E))]}var j=[];if(E===void 0)return j;var M;if(a===`comma`&&s(E))C&&g&&(E=r.maybeMap(E,g)),M=[{value:E.length>0?E.join(`,`)||null:void 0}];else if(s(_))M=_;else{var N=Object.keys(E);M=v?N.sort(v):N}var P=h?String(i).replace(/\./g,`%2E`):String(i),F=o&&s(E)&&E.length===1?P+`[]`:P;if(c&&s(E)&&E.length===0)return F+`[]`;for(var I=0;I<M.length;++I){var L=M[I],R=typeof L==`object`&&L&&L.value!==void 0?L.value:E[L];if(!(d&&R===null)){var z=y&&h?String(L).replace(/\./g,`%2E`):String(L),te=s(E)?typeof a==`function`?a(F,z):F:F+(y?`.`+z:`[`+z+`]`);T.set(t,ee);var B=n();B.set(m,T),l(j,e(R,te,a,o,c,u,d,h,a===`comma`&&C&&s(E)?null:g,_,v,y,b,x,S,C,w,B))}}return j},g=function(e){if(!e)return f;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.encodeDotInKeys!==void 0&&typeof e.encodeDotInKeys!=`boolean`)throw TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!=`function`)throw TypeError(`Encoder has to be a function.`);var t=e.charset||f.charset;if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);var n=i.default;if(e.format!==void 0){if(!a.call(i.formatters,e.format))throw TypeError(`Unknown format option provided.`);n=e.format}var r=i.formatters[n],c=f.filter;(typeof e.filter==`function`||s(e.filter))&&(c=e.filter);var l;if(l=e.arrayFormat in o?e.arrayFormat:`indices`in e?e.indices?`indices`:`repeat`:f.arrayFormat,`commaRoundTrip`in e&&typeof e.commaRoundTrip!=`boolean`)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u=e.allowDots===void 0?e.encodeDotInKeys===!0?!0:f.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix==`boolean`?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:e.delimiter===void 0?f.delimiter:e.delimiter,encode:typeof e.encode==`boolean`?e.encode:f.encode,encodeDotInKeys:typeof e.encodeDotInKeys==`boolean`?e.encodeDotInKeys:f.encodeDotInKeys,encoder:typeof e.encoder==`function`?e.encoder:f.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==`boolean`?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:n,formatter:r,serializeDate:typeof e.serializeDate==`function`?e.serializeDate:f.serializeDate,skipNulls:typeof e.skipNulls==`boolean`?e.skipNulls:f.skipNulls,sort:typeof e.sort==`function`?e.sort:null,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:f.strictNullHandling}};t.exports=function(e,t){var r=e,i=g(t),a,c;typeof i.filter==`function`?(c=i.filter,r=c(``,r)):s(i.filter)&&(c=i.filter,a=c);var u=[];if(typeof r!=`object`||!r)return``;var d=o[i.arrayFormat],f=d===`comma`&&i.commaRoundTrip;a||=Object.keys(r),i.sort&&a.sort(i.sort);for(var p=n(),m=0;m<a.length;++m){var _=a[m],v=r[_];i.skipNulls&&v===null||l(u,h(v,_,d,f,i.allowEmptyArrays,i.strictNullHandling,i.skipNulls,i.encodeDotInKeys,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,p))}var y=u.join(i.delimiter),b=i.addQueryPrefix===!0?`?`:``;return i.charsetSentinel&&(i.charset===`iso-8859-1`?b+=`utf8=%26%2310003%3B&`:b+=`utf8=%E2%9C%93&`),y.length>0?b+y:``}}),de=s((exports,t)=>{var n=q(),r=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:`utf-8`,charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:`&`,depth:5,duplicates:`combine`,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},s=function(e,t,n){if(e&&typeof e==`string`&&t.comma&&e.indexOf(`,`)>-1)return e.split(`,`);if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw RangeError(`Array limit exceeded. Only `+t.arrayLimit+` element`+(t.arrayLimit===1?``:`s`)+` allowed in an array.`);return e},c=`utf8=%26%2310003%3B`,l=`utf8=%E2%9C%93`,u=function(e,t){var u={__proto__:null},d=t.ignoreQueryPrefix?e.replace(/^\?/,``):e;d=d.replace(/%5B/gi,`[`).replace(/%5D/gi,`]`);var f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=d.split(t.delimiter,t.throwOnLimitExceeded?f+1:f);if(t.throwOnLimitExceeded&&p.length>f)throw RangeError(`Parameter limit exceeded. Only `+f+` parameter`+(f===1?``:`s`)+` allowed.`);var m=-1,h,g=t.charset;if(t.charsetSentinel)for(h=0;h<p.length;++h)p[h].indexOf(`utf8=`)===0&&(p[h]===l?g=`utf-8`:p[h]===c&&(g=`iso-8859-1`),m=h,h=p.length);for(h=0;h<p.length;++h)if(h!==m){var _=p[h],v=_.indexOf(`]=`),y=v===-1?_.indexOf(`=`):v+1,b,x;y===-1?(b=t.decoder(_,a.decoder,g,`key`),x=t.strictNullHandling?null:``):(b=t.decoder(_.slice(0,y),a.decoder,g,`key`),x=n.maybeMap(s(_.slice(y+1),t,i(u[b])?u[b].length:0),function(e){return t.decoder(e,a.decoder,g,`value`)})),x&&t.interpretNumericEntities&&g===`iso-8859-1`&&(x=o(String(x))),_.indexOf(`[]=`)>-1&&(x=i(x)?[x]:x);var S=r.call(u,b);S&&t.duplicates===`combine`?u[b]=n.combine(u[b],x):(!S||t.duplicates===`last`)&&(u[b]=x)}return u},d=function(e,t,r,i){var a=0;if(e.length>0&&e[e.length-1]===`[]`){var o=e.slice(0,-1).join(``);a=Array.isArray(t)&&t[o]?t[o].length:0}for(var c=i?t:s(t,r,a),l=e.length-1;l>=0;--l){var u,d=e[l];if(d===`[]`&&r.parseArrays)u=r.allowEmptyArrays&&(c===``||r.strictNullHandling&&c===null)?[]:n.combine([],c);else{u=r.plainObjects?{__proto__:null}:{};var f=d.charAt(0)===`[`&&d.charAt(d.length-1)===`]`?d.slice(1,-1):d,p=r.decodeDotInKeys?f.replace(/%2E/g,`.`):f,m=parseInt(p,10);!r.parseArrays&&p===``?u={0:c}:!isNaN(m)&&d!==p&&String(m)===p&&m>=0&&r.parseArrays&&m<=r.arrayLimit?(u=[],u[m]=c):p!==`__proto__`&&(u[p]=c)}c=u}return c},f=function(e,t,n,i){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,`[$1]`):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(a),l=c?a.slice(0,c.index):a,u=[];if(l){if(!n.plainObjects&&r.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var f=0;n.depth>0&&(c=s.exec(a))!==null&&f<n.depth;){if(f+=1,!n.plainObjects&&r.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}if(c){if(n.strictDepth===!0)throw RangeError(`Input depth exceeded depth option of `+n.depth+` and strictDepth is true`);u.push(`[`+a.slice(c.index)+`]`)}return d(u,t,n,i)}},p=function(e){if(!e)return a;if(e.allowEmptyArrays!==void 0&&typeof e.allowEmptyArrays!=`boolean`)throw TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(e.decodeDotInKeys!==void 0&&typeof e.decodeDotInKeys!=`boolean`)throw TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!=`function`)throw TypeError(`Decoder has to be a function.`);if(e.charset!==void 0&&e.charset!==`utf-8`&&e.charset!==`iso-8859-1`)throw TypeError(`The charset option must be either utf-8, iso-8859-1, or undefined`);if(e.throwOnLimitExceeded!==void 0&&typeof e.throwOnLimitExceeded!=`boolean`)throw TypeError("`throwOnLimitExceeded` option must be a boolean");var t=e.charset===void 0?a.charset:e.charset,r=e.duplicates===void 0?a.duplicates:e.duplicates;if(r!==`combine`&&r!==`first`&&r!==`last`)throw TypeError(`The duplicates option must be either combine, first, or last`);var i=e.allowDots===void 0?e.decodeDotInKeys===!0?!0:a.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays==`boolean`?!!e.allowEmptyArrays:a.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes==`boolean`?e.allowPrototypes:a.allowPrototypes,allowSparse:typeof e.allowSparse==`boolean`?e.allowSparse:a.allowSparse,arrayLimit:typeof e.arrayLimit==`number`?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel==`boolean`?e.charsetSentinel:a.charsetSentinel,comma:typeof e.comma==`boolean`?e.comma:a.comma,decodeDotInKeys:typeof e.decodeDotInKeys==`boolean`?e.decodeDotInKeys:a.decodeDotInKeys,decoder:typeof e.decoder==`function`?e.decoder:a.decoder,delimiter:typeof e.delimiter==`string`||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:typeof e.depth==`number`||e.depth===!1?+e.depth:a.depth,duplicates:r,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities==`boolean`?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==`number`?e.parameterLimit:a.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects==`boolean`?e.plainObjects:a.plainObjects,strictDepth:typeof e.strictDepth==`boolean`?!!e.strictDepth:a.strictDepth,strictNullHandling:typeof e.strictNullHandling==`boolean`?e.strictNullHandling:a.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded==`boolean`?e.throwOnLimitExceeded:!1}};t.exports=function(e,t){var r=p(t);if(e===``||e==null)return r.plainObjects?{__proto__:null}:{};for(var i=typeof e==`string`?u(e,r):e,a=r.plainObjects?{__proto__:null}:{},o=Object.keys(i),s=0;s<o.length;++s){var c=o[s],l=f(c,i[c],r,typeof e==`string`);a=n.merge(a,l,r)}return r.allowSparse===!0?a:n.compact(a)}}),fe=s((exports,t)=>{var n=ue(),r=de(),i=K();t.exports={formats:i,parse:r,stringify:n}}),J=l(fe(),1);let pe=[`PATCH`,`POST`,`PUT`,`DELETE`,`OPTIONS`],me=[`GET`,`HEAD`];function he(e,t,n,r={arrayFormat:`repeat`}){if(!e)return null;if(e instanceof FormData)return e;let i=null;if(pe.includes(t.toUpperCase())){let t=new Headers(n||{}),a=t.get(`Content-Type`)||d.JSON;if(a.includes(d.JSON))i=JSON.stringify(e);else if(a.includes(d.FORM_URLENCODED))i=J.default.stringify(e,r);else if(a.includes(d.FORM_DATA)){let t=new FormData;if(!(e instanceof FormData)&&typeof e==`object`){let n=e;Object.keys(n).forEach(e=>{n.prototype.hasOwnProperty.call(e)&&t.append(e,n[e])}),i=t}}else (typeof e==`string`||e instanceof URLSearchParams||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||typeof ReadableStream<`u`&&e instanceof ReadableStream)&&(i=e)}return me.includes(t.toUpperCase())&&(i=null),i}function ge(e){if(e instanceof FormData)return e;let t=new FormData;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n];r instanceof File||r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}var Y=l(fe(),1);let _e={arrayFormat:`repeat`};function X(e,t,n={arrayFormat:`repeat`}){if(t){let r=Y.default.stringify(t,n);r&&(e=e.includes(`?`)?`${e}&${r}`:`${e}?${r}`)}return e}function ve(e={},t={}){let n=e instanceof Headers?e:new Headers(e),r=e=>{e instanceof Headers||(e=new Headers(e)),e.forEach((e,t)=>{n.set(t,e)})};return r(t),n}function ye(e){return e[Symbol.toStringTag]===`Generator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.iterator]==`function`}function be(e){return e[Symbol.toStringTag]===`AsyncGenerator`&&typeof e.next==`function`&&typeof e.return==`function`&&typeof e.throw==`function`&&typeof e[Symbol.asyncIterator]==`function`}function xe(e){let t=new Map;e.forEach(e=>{t.set(e.name,e)});let n=Array.from(t.values()).sort((e,t)=>(e.priority??0)-(t.priority??0)),r=[],i=[],a=[],o=[],s=[],c=[];return n.forEach(e=>{e.beforeRequest&&r.push(e.beforeRequest),e.afterResponse&&i.push(e.afterResponse),e.onError&&a.push(e.onError),e.onFinally&&o.push(e.onFinally),e.transformStreamChunk&&s.push(e.transformStreamChunk),e.beforeStream&&c.push(e.beforeStream)}),{beforeRequestPlugins:r,afterResponsePlugins:i,errorPlugins:a,finallyPlugins:o,beforeStreamPlugins:c,transformStreamChunkPlugins:s}}var Z=function(e){return e.JSON=`json`,e.BLOB=`blob`,e.TEXT=`text`,e.ARRAY_BUFFER=`arrayBuffer`,e.FORM_DATA=`formData`,e.BYTES=`bytes`,e}(Z||{}),Se=class e{#plugins;#sourcePlugins;#controller;#config;#promise=null;#isTimeout=!1;#executor=null;#finallyCallbacks=new Set;#responseType=`json`;#fullOptions;constructor(e){this.#fullOptions=e;let{plugins:t=[],controller:n}=e;this.#controller=n??new AbortController,this.#sourcePlugins=t,this.#plugins=xe(t),this.#config=this.#buildConfig(e),this.#promise=this.#init(e)}#buildConfig({baseURL:e=``,method:t=`GET`,qsConfig:n={},withCredentials:r=!1,headers:i={},...a}){return{...a,baseURL:e,method:t,data:a.data,extra:a.extra,withCredentials:r,headers:i,qsConfig:Object.assign(_e,n)}}#init({timeout:e}){return new Promise(async(t,n)=>{let r=this.#config,{beforeRequestPlugins:i}=this.#plugins,a=null;for(let e of i)try{if(r=await e(r),r.resolve){let e=r.resolve();return e instanceof Response?t(e):t(new Response(e))}}catch(e){a=e;break}if(a)return this.#promise=null,n(a);let o=X(r.baseURL+r.url,r.params,r.qsConfig),s=he(r.data??null,r.method,r.headers,r.qsConfig),c=u(r??{},[`baseURL`,`data`,`extra`,`headers`,`method`,`params`,`url`,`withCredentials`]),l={...c,method:r.method,headers:r.headers,signal:this.#controller.signal,credentials:r.withCredentials?`include`:`omit`,body:s},d=fetch(o,l),p=[d],h=null;if(e){let t=new Promise(t=>{h=setTimeout(()=>{this.#isTimeout=!0,this.#controller?.abort()},e)});p.push(t)}try{let e=await Promise.race(p);e?(e.ok&&t(e),a=new m({message:`Fail Request`,status:e.status,statusText:e.statusText,config:this.#config,name:`Fail Request`,response:e})):a=new m({message:`NETWORK_ERROR`,status:f.NETWORK_ERROR,statusText:`Network Error`,config:this.#config,name:`Network Error`})}catch(e){a=e,this.#promise=null}finally{a&&n(a),h&&clearTimeout(h)}})}async#createNormalizeError(e){if(e instanceof m)return e;let t;return t=this.#promise?await this.#response:void 0,e instanceof TypeError?e.name===`AbortError`?this.#isTimeout?new m({message:`Request timeout`,status:f.TIME_OUT,statusText:`Request timeout`,config:this.#config,name:`Request timeout`,response:t}):new m({message:`Request aborted`,status:f.ABORTED,statusText:`Request aborted`,config:this.#config,name:`Request aborted`,response:t}):new m({message:e.message,status:f.NETWORK_ERROR,statusText:`Unknown Request Error`,config:this.#config,name:e.name,response:t}):new m({message:e?.message??`Unknown Request Error`,status:f.UNKNOWN,statusText:`Unknown Request Error`,config:this.#config,name:`Unknown Request Error`,response:t})}async#normalizeError(e){let t=await this.#createNormalizeError(e);for(let e of this.#plugins.errorPlugins)t=await e(t,this.#config);return t.__normalized=!0,t}#execFinally(){for(let e of this.#finallyCallbacks)e();this.#plugins.finallyPlugins.forEach(e=>{e({config:this.#config})}),this.#finallyCallbacks.clear(),this.#plugins.finallyPlugins.length!==this.#sourcePlugins?.length&&(this.#plugins=xe(this.#sourcePlugins))}get#getExecutor(){return this.#executor?this.#executor:this.#response}async#resolve(e){let t=this.#plugins.afterResponsePlugins,n={config:this.#config,response:await this.#response,responseType:this.#responseType,controller:this.#controller,result:e};try{for(let e of t)n=await e(n,this.#config);return n.result}catch(e){return Promise.reject(e)}}then(e,t){return this.#getExecutor.then(async t=>e?.call(this,await this.#resolve(t)),async e=>t?.call(this,await this.#normalizeError(e)))}catch(e){return this.#getExecutor.catch(e)}finally(e){this.#finallyCallbacks.add(e)}abort(){this.#controller.abort()}get#response(){return this.#promise?this.#promise.then(e=>e.clone()).catch(async e=>{throw await this.#normalizeError(e)}):Promise.reject(Error(`Response is null`))}json(){return this.#then(Z.JSON,this.#response?.then(e=>e.json()))}blob(){return this.#then(Z.BLOB,this.#response?.then(e=>e.blob()))}text(){return this.#then(Z.TEXT,this.#response?.then(e=>e.text()))}arrayBuffer(){return this.#then(Z.ARRAY_BUFFER,this.#response.then(e=>e.arrayBuffer()))}#then(e,t){return this.#executor=t.then(t=>(this.#responseType=e,this.#resolve(t))).catch(async t=>{throw this.#responseType=e,t.__normalized?t:await this.#normalizeError(t)}).finally(this.#execFinally.bind(this)),this.#executor}formData(){return this.#then(Z.FORM_DATA,this.#response.then(e=>e.formData()))}bytes(){return this.#then(Z.BYTES,this.#response.then(e=>e.bytes()))}__injectPlugins__(e){let t=[...this.#sourcePlugins,...e];this.#plugins=xe(t)}async*stream(){let e=(await this.#response)?.body;if(!e)throw Error(`Response body is null`);for(let t of this.#plugins.beforeStreamPlugins)e=await t(e,this.#config);let t=e.getReader();if(!t)throw Error(`Response body reader is null`);try{for(;;){let{done:e,value:n}=await t.read();if(e)break;let r={source:n,result:n,error:null};try{for(let e of this.#plugins.transformStreamChunkPlugins)r=await e(r,this.#config);if(r.result&&(ye(r.result)||be(r.result)))for await(let e of r.result){let t={source:r.source,result:e,error:null};yield t}else yield r}catch(e){r.error=e,r.result=null,yield r}}}catch(e){throw await this.#normalizeError(e)}finally{t.releaseLock(),this.#execFinally()}}retry(){let{controller:t,...n}=this.#fullOptions;return new e(n)}get response(){return this.#response}};function Ce(e){return new Se(e)}var we=class{#timeout;#baseURL;#commonHeaders;#queue=[];#plugins=[];#withCredentials;#qsConfig;constructor({timeout:e=0,baseURL:t=``,headers:n={},plugins:r=[],withCredentials:i=!1,qsConfig:a={}}){this.#timeout=e,this.#baseURL=t,this.#commonHeaders=n,this.#plugins=r,this.#withCredentials=i,this.#qsConfig=a,this.request=this.request.bind(this),this.get=this.get.bind(this),this.head=this.head.bind(this),this.options=this.options.bind(this),this.delete=this.delete.bind(this),this.post=this.post.bind(this),this.put=this.put.bind(this),this.patch=this.patch.bind(this),this.abortAll=this.abortAll.bind(this),this.use=this.use.bind(this)}use(e){return this.#plugins.push(e),this}request(e,{timeout:t,headers:n,method:r=`GET`,params:i={},data:a={},qsConfig:o={},withCredentials:s,extra:c={},plugins:l=[]}={}){let u=new AbortController;this.#queue.push(u);let d=this,f={name:`hook-fetch-inner-wrapper`,priority:2**53-1,onFinally(){d.#queue=d.#queue.filter(e=>e!==u)}},p=Ce({url:e,baseURL:this.#baseURL,timeout:t??this.#timeout,plugins:[...this.#plugins,...l,f],headers:ve(this.#commonHeaders,n),controller:u,method:r,params:i,data:a,qsConfig:Object.assign(this.#qsConfig,o),withCredentials:s??this.#withCredentials,extra:c});return p}#requestWithParams(e,t={},n={}){return this.request(e,{...n,params:t})}#requestWithBody(e,t={},n={}){return this.request(e,{...n,data:t})}get(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`GET`})}head(e,t={},n){return this.#requestWithParams(e,t,{...n,method:`HEAD`})}options(e,t={},n){return this.request(e,{...n,method:`OPTIONS`,params:t})}delete(e,t){return this.request(e,{...t,method:`DELETE`})}post(e,t,n){return this.#requestWithBody(e,t,{...n,method:`POST`})}upload(e,t,n){return this.#requestWithBody(e,ge(t??{}),{...n,method:`POST`})}put(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PUT`})}patch(e,t,n){return this.#requestWithBody(e,t,{...n,method:`PATCH`})}abortAll(){this.#queue.forEach(e=>e.abort()),this.#queue=[]}};function Q(e,t={}){return Ce({url:e,baseURL:``,...t})}function Te(e,t,n={}){return Q(e,{...n,params:t})}function Ee(e,t=null,n={}){return Q(e,{...n,data:t})}let De=Q;function Oe(e,t={},n){return Te(e,t,{...n,method:`GET`})}function ke(e,t={},n){return Te(e,t,{...n,method:`HEAD`})}function Ae(e,t={},n){return Q(e,{...n,params:t,method:`OPTIONS`})}function je(e,t){return Q(e,{...t,method:`DELETE`})}function Me(e,t,n){return Ee(e,t,{...n,method:`POST`})}function Ne(e,t,n){return Ee(e,ge(t??{}),{...n,method:`POST`})}function Pe(e,t,n){return Ee(e,t,{...n,method:`PUT`})}function Fe(e,t,n){return Ee(e,t,{...n,method:`PATCH`})}let $=Q;$.create=e=>{let t=new we(e),n=t.request.bind(void 0);return Object.assign(n,we.prototype,t),n},$.get=Oe,$.head=ke,$.options=Ae,$.delete=je,$.post=Me,$.put=Pe,$.patch=Fe,$.upload=Ne;var Ie=$,Le=class extends Error{#message;#name;#status;#statusText;#response;#config;constructor({message:e,status:t,statusText:n,response:r,config:i,name:a}){super(e),this.#message=e,this.#status=t,this.#statusText=n,this.#response=r,this.#config=i,this.#name=a??e}get message(){return this.#message}get status(){return this.#status}get statusText(){return this.#statusText}get response(){return this.#response}get config(){return this.#config}get name(){return this.#name}};function Re(e,t,n,r){return`${e}::${t}::${JSON.stringify(n)}::${JSON.stringify(r)}`}let ze=`DedupeError`;function Be(e){return e instanceof Le&&e.name===ze}function Ve(e={}){let t=new Map;return{name:`dedupe`,async beforeRequest(e){if(e.extra?.dedupeAble??!0){let n=Re(e.url,e.method,e.params,e.data),r=t.get(n);if(r)throw new Le({message:`Dedupe error`,status:400,statusText:`Dedupe error`,config:e,name:ze});t.set(n,!0)}return e},afterResponse:e=>{let n=Re(e.config.url,e.config.method,e.config.params,e.config.data);return t.has(n)&&t.delete(n),e},onError:e=>{if(e.config){let n=Re(e.config.url,e.config.method,e.config.params,e.config.data);t.has(n)&&t.delete(n)}return e}}}function He({splitSeparator:e=`
|
|
5
5
|
|
|
6
|
-
`,lineSeparator:t=void 0,trim:n=!0,json:r=!1,prefix:i=``,doneSymbol:a=void 0}={}){return{name:`sse`,async beforeStream(o,s){if(!(s.extra?.sseAble??!0))return o;let c=new TextDecoderStream,l=new
|
|
6
|
+
`,lineSeparator:t=void 0,trim:n=!0,json:r=!1,prefix:i=``,doneSymbol:a=void 0}={}){return{name:`sse`,async beforeStream(o,s){if(!(s.extra?.sseAble??!0))return o;let c=new TextDecoderStream,l=new We({splitSeparator:e}),u=new Ge({splitSeparator:t??``,trim:n,json:r,prefix:i,doneSymbol:a??``});return o.pipeThrough(c).pipeThrough(l).pipeThrough(u)}}}let Ue=e=>(e??``).trim()!==``;var We=class extends TransformStream{constructor({splitSeparator:e=`
|
|
7
7
|
|
|
8
|
-
`}={}){let t=``,n={transform(n,r){t+=n;let i=t.split(e);i.slice(0,-1).forEach(e=>{
|
|
8
|
+
`}={}){let t=``,n={transform(n,r){t+=n;let i=t.split(e);i.slice(0,-1).forEach(e=>{Ue(e)&&r.enqueue(e)}),t=i[i.length-1]},flush(e){Ue(t)&&e.enqueue(t)}};super(n)}},Ge=class extends TransformStream{constructor({splitSeparator:e=void 0,trim:t=!0,json:n=!1,prefix:r=``,doneSymbol:i=void 0}={}){let a=(e,t)=>t?e.trim():e,o=e=>!!i&&e.slice(r.length).trim()===i,s={transform(i,s){let c=e?i.split(e):[i];for(let e of c)if(n)try{let t=JSON.parse(e.slice(r.length).trim());s.enqueue(t)}catch{o(e)?s.terminate():s.enqueue(a(e,t))}else o(e)?s.terminate():s.enqueue(a(e,t))}};super(s)}},Ke=Ie;globalThis&&(globalThis.hookFetch=Ie),exports.ContentType=d,exports.Method=p,exports.ResponseError=Le,exports.StatusCode=f,exports.dedupePlugin=Ve,exports.default=Ke,exports.del=je,exports.get=Oe,exports.head=ke,exports.isDedupeError=Be,exports.options=Ae,exports.patch=Fe,exports.post=Me,exports.put=Pe,exports.request=De,exports.sseTextDecoderPlugin=He,exports.upload=Ne});
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseRequestOptions, BodyType, HookFetchPlugin, StreamContext } from "./types-DOFlmwin.js";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/baseClass.d.ts
|
|
4
|
+
declare class HookFetchRequest<T = unknown, E = unknown> implements PromiseLike<T> {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(options: BaseRequestOptions<unknown, BodyType, E>);
|
|
7
|
+
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
8
|
+
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null | undefined): Promise<T | TResult>;
|
|
9
|
+
finally(onfinally?: (() => void) | null | undefined): void;
|
|
10
|
+
abort(): void;
|
|
11
|
+
json(): Promise<T>;
|
|
12
|
+
blob(): Promise<Blob>;
|
|
13
|
+
text(): Promise<string>;
|
|
14
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
15
|
+
formData(): Promise<FormData>;
|
|
16
|
+
bytes(): Promise<Uint8Array<ArrayBufferLike>>;
|
|
17
|
+
__injectPlugins__(plugins: HookFetchPlugin<any, any, any, any>[]): void;
|
|
18
|
+
stream<U = T>(): AsyncGenerator<StreamContext<U> | StreamContext<null>, void, unknown>;
|
|
19
|
+
retry(): HookFetchRequest<unknown, E>;
|
|
20
|
+
get response(): Promise<Response>;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { HookFetchRequest };
|
package/types/index.d.ts
CHANGED
|
@@ -1,3 +1,93 @@
|
|
|
1
|
-
import { AfterResponseHandler, BaseOptions, BaseRequestOptions, BeforeRequestHandler, BeforeStreamHandler, BodyType, DeleteOptions, FetchPluginContext, FetchResponseType, GetOptions, HeadOptions, HookFetchPlugin, OnErrorHandler, OnFinallyHandler, OptionProps, OptionsOptions, PatchOptions, PostOptions, PutOptions, RequestConfig, RequestMethod, RequestMethodWithBody, RequestMethodWithParams, RequestOptions, RequestUseOptions, RequestWithBodyFnOptions, RequestWithBodyOptions, RequestWithParamsFnOptions, RequestWithParamsOptions, ResponseError, ResponseErrorOptions, StreamContext, TransformStreamChunkHandler } from "./types-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { AfterResponseHandler, BaseOptions, BaseRequestOptions, BeforeRequestHandler, BeforeStreamHandler, BodyType, DeleteOptions, FetchPluginContext, FetchResponseType, GetOptions, HeadOptions, HookFetchPlugin, OnErrorHandler, OnFinallyHandler, OptionProps, OptionsOptions, PatchOptions, PostOptions, PutOptions, RequestConfig, RequestMethod, RequestMethodWithBody, RequestMethodWithParams, RequestOptions, RequestUseOptions, RequestWithBodyFnOptions, RequestWithBodyOptions, RequestWithParamsFnOptions, RequestWithParamsOptions, ResponseError, ResponseErrorOptions, StreamContext, TransformStreamChunkHandler } from "./types-DOFlmwin.js";
|
|
2
|
+
import { HookFetchRequest } from "./baseClass-BYjVeiZn.js";
|
|
3
|
+
import { AnyObject, Generic } from "typescript-api-pro";
|
|
4
|
+
|
|
5
|
+
//#region src/base.d.ts
|
|
6
|
+
type GenericWithNull<T, R extends AnyObject | null, K extends keyof R> = R extends null ? T : Generic<Exclude<R, null>, K, T>;
|
|
7
|
+
declare class HookFetch<R extends AnyObject | null = null, K extends keyof R = never, E = AnyObject> {
|
|
8
|
+
#private;
|
|
9
|
+
constructor({
|
|
10
|
+
timeout,
|
|
11
|
+
baseURL,
|
|
12
|
+
headers,
|
|
13
|
+
plugins,
|
|
14
|
+
withCredentials,
|
|
15
|
+
qsConfig
|
|
16
|
+
}: BaseOptions);
|
|
17
|
+
use(plugin: HookFetchPlugin<any, any, any, any>): this;
|
|
18
|
+
request<T = AnyObject, P = AnyObject, D extends BodyType = BodyType>(url: string, {
|
|
19
|
+
timeout,
|
|
20
|
+
headers,
|
|
21
|
+
method,
|
|
22
|
+
params,
|
|
23
|
+
data,
|
|
24
|
+
qsConfig,
|
|
25
|
+
withCredentials,
|
|
26
|
+
extra,
|
|
27
|
+
plugins
|
|
28
|
+
}?: RequestOptions<P, D, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
29
|
+
get<T = AnyObject, P = AnyObject>(url: string, params?: P, options?: GetOptions<P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
30
|
+
head<T = AnyObject, P = AnyObject>(url: string, params?: P, options?: HeadOptions<P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
31
|
+
options<T = AnyObject, P = AnyObject, D extends BodyType = BodyType>(url: string, params?: P, options?: OptionsOptions<P, D, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
32
|
+
delete<T = AnyObject, D extends BodyType = BodyType, P = AnyObject>(url: string, options?: DeleteOptions<P, D, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
33
|
+
post<T = AnyObject, D extends BodyType = BodyType, P = AnyObject>(url: string, data?: D, options?: PostOptions<D, P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
34
|
+
upload<T = AnyObject, D extends AnyObject | FormData = AnyObject, P = AnyObject>(url: string, data?: D, options?: PostOptions<D, P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
35
|
+
put<T = AnyObject, D extends BodyType = BodyType, P = AnyObject>(url: string, data?: D, options?: PutOptions<D, P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
36
|
+
patch<T = AnyObject, D extends BodyType = BodyType, P = AnyObject>(url: string, data?: D, options?: PatchOptions<D, P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
37
|
+
abortAll(): void;
|
|
38
|
+
}
|
|
39
|
+
declare function useRequest<R = AnyObject, P = AnyObject, D extends BodyType = BodyType, E = AnyObject>(url: string, options?: RequestOptions<P, D, E>): HookFetchRequest<R, E>;
|
|
40
|
+
declare const request: typeof useRequest;
|
|
41
|
+
declare function get<R = AnyObject, P = AnyObject, E = AnyObject>(url: string, params?: P, options?: GetOptions<P, E>): HookFetchRequest<R, E>;
|
|
42
|
+
declare function head<R = AnyObject, P = AnyObject, E = AnyObject>(url: string, params?: P, options?: HeadOptions<P, E>): HookFetchRequest<R, E>;
|
|
43
|
+
declare function options<R = AnyObject, P = AnyObject, D extends BodyType = BodyType, E = AnyObject>(url: string, params?: P, options?: OptionsOptions<P, D, E>): HookFetchRequest<R, E>;
|
|
44
|
+
declare function del<R = AnyObject, D extends BodyType = BodyType, P = AnyObject, E = AnyObject>(url: string, options?: DeleteOptions<P, D, E>): HookFetchRequest<R, E>;
|
|
45
|
+
declare function post<R = AnyObject, D extends BodyType = BodyType, P = AnyObject, E = AnyObject>(url: string, data?: D, options?: PostOptions<D, P, E>): HookFetchRequest<R, E>;
|
|
46
|
+
declare function upload<R = AnyObject, D extends AnyObject | FormData = AnyObject, P = AnyObject, E = AnyObject>(url: string, data?: D, options?: PostOptions<D, P, E>): HookFetchRequest<R, E>;
|
|
47
|
+
declare function put<R = AnyObject, D extends BodyType = BodyType, P = AnyObject, E = AnyObject>(url: string, data?: D, options?: PutOptions<D, P, E>): HookFetchRequest<R, E>;
|
|
48
|
+
declare function patch<R = AnyObject, D extends BodyType = BodyType, P = AnyObject, E = AnyObject>(url: string, data?: D, options?: PatchOptions<D, P, E>): HookFetchRequest<R, E>;
|
|
49
|
+
type ExportDefault = typeof useRequest & {
|
|
50
|
+
create: <R extends AnyObject | null = null, K extends keyof R = never, E = AnyObject>(options: BaseOptions) => (HookFetch<R, K, E>['request'] & HookFetch<R, K, E>);
|
|
51
|
+
get: typeof get;
|
|
52
|
+
head: typeof head;
|
|
53
|
+
options: typeof options;
|
|
54
|
+
delete: typeof del;
|
|
55
|
+
post: typeof post;
|
|
56
|
+
put: typeof put;
|
|
57
|
+
patch: typeof patch;
|
|
58
|
+
upload: typeof upload;
|
|
59
|
+
};
|
|
60
|
+
declare const hookFetch: ExportDefault;
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/enum.d.ts
|
|
63
|
+
declare enum ContentType {
|
|
64
|
+
JSON = "application/json",
|
|
65
|
+
FORM_URLENCODED = "application/x-www-form-urlencoded",
|
|
66
|
+
FORM_DATA = "multipart/form-data",
|
|
67
|
+
TEXT = "text/plain",
|
|
68
|
+
HTML = "text/html",
|
|
69
|
+
XML = "text/xml",
|
|
70
|
+
CSV = "text/csv",
|
|
71
|
+
STREAM = "application/octet-stream",
|
|
72
|
+
}
|
|
73
|
+
declare enum StatusCode {
|
|
74
|
+
TIME_OUT = 408,
|
|
75
|
+
ABORTED = 499,
|
|
76
|
+
NETWORK_ERROR = 599,
|
|
77
|
+
BODY_NULL = 502,
|
|
78
|
+
UNKNOWN = 601,
|
|
79
|
+
}
|
|
80
|
+
declare enum Method {
|
|
81
|
+
GET = "GET",
|
|
82
|
+
POST = "POST",
|
|
83
|
+
PUT = "PUT",
|
|
84
|
+
DELETE = "DELETE",
|
|
85
|
+
PATCH = "PATCH",
|
|
86
|
+
HEAD = "HEAD",
|
|
87
|
+
OPTIONS = "OPTIONS",
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/index.d.ts
|
|
91
|
+
type HookFetchRequest$1<T = unknown, E = unknown> = HookFetchRequest<T, E>;
|
|
92
|
+
//#endregion
|
|
93
|
+
export { AfterResponseHandler, BaseOptions, BaseRequestOptions, BeforeRequestHandler, BeforeStreamHandler, BodyType, ContentType, DeleteOptions, FetchPluginContext, FetchResponseType, GetOptions, HeadOptions, HookFetchPlugin, HookFetchRequest$1 as HookFetchRequest, Method, OnErrorHandler, OnFinallyHandler, OptionProps, OptionsOptions, PatchOptions, PostOptions, PutOptions, RequestConfig, RequestMethod, RequestMethodWithBody, RequestMethodWithParams, RequestOptions, RequestUseOptions, RequestWithBodyFnOptions, RequestWithBodyOptions, RequestWithParamsFnOptions, RequestWithParamsOptions, ResponseError, ResponseErrorOptions, StatusCode, StreamContext, TransformStreamChunkHandler, hookFetch as default, del, get, head, options, patch, post, put, request, upload };
|
package/types/plugins/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HookFetchPlugin } from "../types-
|
|
2
|
-
import { SSETextDecoderPluginOptions, sseTextDecoderPlugin } from "../sse-
|
|
1
|
+
import { HookFetchPlugin } from "../types-DOFlmwin.js";
|
|
2
|
+
import { SSETextDecoderPluginOptions, sseTextDecoderPlugin } from "../sse-B2EqUaS9.js";
|
|
3
3
|
|
|
4
4
|
//#region src/plugins/dedupe.d.ts
|
|
5
5
|
interface DedupePluginOptions {}
|
package/types/plugins/sse.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { SSETextDecoderPluginOptions, sseTextDecoderPlugin } from "../sse-
|
|
1
|
+
import "../types-DOFlmwin.js";
|
|
2
|
+
import { SSETextDecoderPluginOptions, sseTextDecoderPlugin } from "../sse-B2EqUaS9.js";
|
|
3
3
|
export { SSETextDecoderPluginOptions, sseTextDecoderPlugin };
|
package/types/react/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HookFetchRequest
|
|
1
|
+
import { StreamContext } from "../types-DOFlmwin.js";
|
|
2
|
+
import { HookFetchRequest } from "../baseClass-BYjVeiZn.js";
|
|
3
3
|
import * as react0 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/react/index.d.ts
|
|
@@ -12,7 +12,7 @@ declare function useHookFetch<Q extends (...args: any[]) => any>({
|
|
|
12
12
|
onError
|
|
13
13
|
}: UseHookFetchOptions<Q>): {
|
|
14
14
|
request: (...args: any[]) => HookFetchRequest<any, any> | react0.RefObject<HookFetchRequest<any, any> | null>;
|
|
15
|
-
stream: <T = unknown>(...args: Parameters<Q>) => AsyncGenerator<StreamContext<null> | StreamContext<T>,
|
|
15
|
+
stream: <T = unknown>(...args: Parameters<Q>) => AsyncGenerator<StreamContext<null> | StreamContext<T>, void, unknown>;
|
|
16
16
|
text: (...args: Parameters<Q>) => Promise<string>;
|
|
17
17
|
blob: (...args: Parameters<Q>) => Promise<Blob>;
|
|
18
18
|
arrayBufferData: (...args: Parameters<Q>) => Promise<ArrayBuffer>;
|
|
@@ -8,7 +8,7 @@ interface ResponseErrorOptions<E = unknown> {
|
|
|
8
8
|
status?: number;
|
|
9
9
|
statusText?: string;
|
|
10
10
|
response?: Response;
|
|
11
|
-
config?: RequestConfig<unknown,
|
|
11
|
+
config?: RequestConfig<unknown, BodyType, E>;
|
|
12
12
|
}
|
|
13
13
|
declare class ResponseError<E = unknown> extends Error {
|
|
14
14
|
#private;
|
|
@@ -24,7 +24,7 @@ declare class ResponseError<E = unknown> extends Error {
|
|
|
24
24
|
get status(): number | undefined;
|
|
25
25
|
get statusText(): string | undefined;
|
|
26
26
|
get response(): Response | undefined;
|
|
27
|
-
get config(): RequestConfig<unknown,
|
|
27
|
+
get config(): RequestConfig<unknown, BodyType, E> | undefined;
|
|
28
28
|
get name(): string;
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
package/types/vue/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { HookFetchRequest
|
|
1
|
+
import { StreamContext } from "../types-DOFlmwin.js";
|
|
2
|
+
import { HookFetchRequest } from "../baseClass-BYjVeiZn.js";
|
|
3
3
|
import * as vue0 from "vue";
|
|
4
4
|
|
|
5
5
|
//#region src/vue/index.d.ts
|
|
@@ -12,7 +12,7 @@ declare function useHookFetch<Q extends (...args: any[]) => any>({
|
|
|
12
12
|
onError
|
|
13
13
|
}: UseHookFetchOptions<Q>): {
|
|
14
14
|
request: (...args: any[]) => HookFetchRequest<any, any>;
|
|
15
|
-
stream: <T = unknown>(...args: Parameters<Q>) => AsyncGenerator<StreamContext<null> | StreamContext<T>,
|
|
15
|
+
stream: <T = unknown>(...args: Parameters<Q>) => AsyncGenerator<StreamContext<null> | StreamContext<T>, void, unknown>;
|
|
16
16
|
text: (...args: Parameters<Q>) => Promise<string>;
|
|
17
17
|
blob: (...args: Parameters<Q>) => Promise<Blob>;
|
|
18
18
|
arrayBufferData: (...args: Parameters<Q>) => Promise<ArrayBuffer>;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { BaseOptions, BaseRequestOptions, BodyType, DeleteOptions, GetOptions, HeadOptions, HookFetchPlugin, OptionsOptions, PatchOptions, PostOptions, PutOptions, RequestOptions, ResponseError, StreamContext } from "./types-DKk321dw.js";
|
|
2
|
-
import { AnyObject, Generic } from "typescript-api-pro";
|
|
3
|
-
|
|
4
|
-
//#region src/utils/baseClass.d.ts
|
|
5
|
-
declare class HookFetchRequest<T = unknown, E = unknown> implements PromiseLike<T> {
|
|
6
|
-
#private;
|
|
7
|
-
constructor(options: BaseRequestOptions<unknown, BodyType, E>);
|
|
8
|
-
then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
9
|
-
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null | undefined): Promise<T | TResult>;
|
|
10
|
-
finally(onfinally?: (() => void) | null | undefined): void;
|
|
11
|
-
abort(): void;
|
|
12
|
-
json(): Promise<T>;
|
|
13
|
-
blob(): Promise<Blob>;
|
|
14
|
-
text(): Promise<string>;
|
|
15
|
-
arrayBuffer(): Promise<ArrayBuffer>;
|
|
16
|
-
formData(): Promise<FormData>;
|
|
17
|
-
bytes(): Promise<Uint8Array<ArrayBufferLike>>;
|
|
18
|
-
__injectPlugins__(plugins: HookFetchPlugin<any, any, any, any>[]): void;
|
|
19
|
-
stream<U = T>(): AsyncGenerator<StreamContext<U> | StreamContext<null>, ResponseError<unknown> | undefined, unknown>;
|
|
20
|
-
retry(): HookFetchRequest<unknown, E>;
|
|
21
|
-
get response(): Promise<Response>;
|
|
22
|
-
}
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/base.d.ts
|
|
25
|
-
type GenericWithNull<T, R extends AnyObject | null, K extends keyof R> = R extends null ? T : Generic<Exclude<R, null>, K, T>;
|
|
26
|
-
declare class HookFetch<R extends AnyObject | null = null, K extends keyof R = never, E = AnyObject> {
|
|
27
|
-
#private;
|
|
28
|
-
constructor({
|
|
29
|
-
timeout,
|
|
30
|
-
baseURL,
|
|
31
|
-
headers,
|
|
32
|
-
plugins,
|
|
33
|
-
withCredentials,
|
|
34
|
-
qsConfig
|
|
35
|
-
}: BaseOptions);
|
|
36
|
-
use(plugin: HookFetchPlugin<any, any, any, any>): this;
|
|
37
|
-
request<T = AnyObject, P = AnyObject, D extends BodyType = BodyType>(url: string, {
|
|
38
|
-
timeout,
|
|
39
|
-
headers,
|
|
40
|
-
method,
|
|
41
|
-
params,
|
|
42
|
-
data,
|
|
43
|
-
qsConfig,
|
|
44
|
-
withCredentials,
|
|
45
|
-
extra,
|
|
46
|
-
plugins
|
|
47
|
-
}?: RequestOptions<P, D, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
48
|
-
get<T = AnyObject, P = AnyObject>(url: string, params?: P, options?: GetOptions<P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
49
|
-
head<T = AnyObject, P = AnyObject>(url: string, params?: P, options?: HeadOptions<P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
50
|
-
options<T = AnyObject, P = AnyObject, D extends BodyType = BodyType>(url: string, params?: P, options?: OptionsOptions<P, D, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
51
|
-
delete<T = AnyObject, D extends BodyType = BodyType, P = AnyObject>(url: string, options?: DeleteOptions<P, D, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
52
|
-
post<T = AnyObject, D extends BodyType = BodyType, P = AnyObject>(url: string, data?: D, options?: PostOptions<D, P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
53
|
-
upload<T = AnyObject, D extends AnyObject | FormData = AnyObject, P = AnyObject>(url: string, data?: D, options?: PostOptions<D, P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
54
|
-
put<T = AnyObject, D extends BodyType = BodyType, P = AnyObject>(url: string, data?: D, options?: PutOptions<D, P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
55
|
-
patch<T = AnyObject, D extends BodyType = BodyType, P = AnyObject>(url: string, data?: D, options?: PatchOptions<D, P, E>): HookFetchRequest<GenericWithNull<T, R, K>, E>;
|
|
56
|
-
abortAll(): void;
|
|
57
|
-
}
|
|
58
|
-
declare function useRequest<R = AnyObject, P = AnyObject, D extends BodyType = BodyType, E = AnyObject>(url: string, options?: RequestOptions<P, D, E>): HookFetchRequest<R, E>;
|
|
59
|
-
declare const request: typeof useRequest;
|
|
60
|
-
declare function get<R = AnyObject, P = AnyObject, E = AnyObject>(url: string, params?: P, options?: GetOptions<P, E>): HookFetchRequest<R, E>;
|
|
61
|
-
declare function head<R = AnyObject, P = AnyObject, E = AnyObject>(url: string, params?: P, options?: HeadOptions<P, E>): HookFetchRequest<R, E>;
|
|
62
|
-
declare function options<R = AnyObject, P = AnyObject, D extends BodyType = BodyType, E = AnyObject>(url: string, params?: P, options?: OptionsOptions<P, D, E>): HookFetchRequest<R, E>;
|
|
63
|
-
declare function del<R = AnyObject, D extends BodyType = BodyType, P = AnyObject, E = AnyObject>(url: string, options?: DeleteOptions<P, D, E>): HookFetchRequest<R, E>;
|
|
64
|
-
declare function post<R = AnyObject, D extends BodyType = BodyType, P = AnyObject, E = AnyObject>(url: string, data?: D, options?: PostOptions<D, P, E>): HookFetchRequest<R, E>;
|
|
65
|
-
declare function upload<R = AnyObject, D extends AnyObject | FormData = AnyObject, P = AnyObject, E = AnyObject>(url: string, data?: D, options?: PostOptions<D, P, E>): HookFetchRequest<R, E>;
|
|
66
|
-
declare function put<R = AnyObject, D extends BodyType = BodyType, P = AnyObject, E = AnyObject>(url: string, data?: D, options?: PutOptions<D, P, E>): HookFetchRequest<R, E>;
|
|
67
|
-
declare function patch<R = AnyObject, D extends BodyType = BodyType, P = AnyObject, E = AnyObject>(url: string, data?: D, options?: PatchOptions<D, P, E>): HookFetchRequest<R, E>;
|
|
68
|
-
type ExportDefault = typeof useRequest & {
|
|
69
|
-
create: <R extends AnyObject | null = null, K extends keyof R = never, E = AnyObject>(options: BaseOptions) => (HookFetch<R, K, E>['request'] & HookFetch<R, K, E>);
|
|
70
|
-
get: typeof get;
|
|
71
|
-
head: typeof head;
|
|
72
|
-
options: typeof options;
|
|
73
|
-
delete: typeof del;
|
|
74
|
-
post: typeof post;
|
|
75
|
-
put: typeof put;
|
|
76
|
-
patch: typeof patch;
|
|
77
|
-
upload: typeof upload;
|
|
78
|
-
};
|
|
79
|
-
declare const hookFetch: ExportDefault;
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/enum.d.ts
|
|
82
|
-
declare enum ContentType {
|
|
83
|
-
JSON = "application/json",
|
|
84
|
-
FORM_URLENCODED = "application/x-www-form-urlencoded",
|
|
85
|
-
FORM_DATA = "multipart/form-data",
|
|
86
|
-
TEXT = "text/plain",
|
|
87
|
-
HTML = "text/html",
|
|
88
|
-
XML = "text/xml",
|
|
89
|
-
CSV = "text/csv",
|
|
90
|
-
STREAM = "application/octet-stream",
|
|
91
|
-
}
|
|
92
|
-
declare enum StatusCode {
|
|
93
|
-
TIME_OUT = 408,
|
|
94
|
-
ABORTED = 499,
|
|
95
|
-
NETWORK_ERROR = 599,
|
|
96
|
-
BODY_NULL = 502,
|
|
97
|
-
UNKNOWN = 601,
|
|
98
|
-
}
|
|
99
|
-
declare enum Method {
|
|
100
|
-
GET = "GET",
|
|
101
|
-
POST = "POST",
|
|
102
|
-
PUT = "PUT",
|
|
103
|
-
DELETE = "DELETE",
|
|
104
|
-
PATCH = "PATCH",
|
|
105
|
-
HEAD = "HEAD",
|
|
106
|
-
OPTIONS = "OPTIONS",
|
|
107
|
-
}
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region src/index.d.ts
|
|
110
|
-
type HookFetchRequest$1<T = unknown, E = unknown> = HookFetchRequest<T, E>;
|
|
111
|
-
//#endregion
|
|
112
|
-
export { ContentType, HookFetchRequest$1 as HookFetchRequest, HookFetchRequest as HookFetchRequest$1, Method, StatusCode, del, get, head, hookFetch, options, patch, post, put, request, upload };
|