UNPKG

@ferry-core/oar

Version:

A RESTful HTTP request lib with default config

7 lines 64 kB
/*! * @ferry-core/oar with v0.2.1 * Author: Michael Pan * Built on 2023-09-17, 19:14:39 * Released under the MIT License Copyright (c) 2023 */ define((function(){"use strict";function e(e,t){return function(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype,{getPrototypeOf:r}=Object,n=(o=Object.create(null),e=>{const r=t.call(e);return o[r]||(o[r]=r.slice(8,-1).toLowerCase())});var o;const i=e=>(e=e.toLowerCase(),t=>n(t)===e),a=e=>t=>typeof t===e,{isArray:s}=Array,c=a("undefined");const u=i("ArrayBuffer");const l=a("string"),f=a("function"),p=a("number"),y=e=>null!==e&&"object"==typeof e,d=e=>{if("object"!==n(e))return!1;const t=r(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},h=i("Date"),m=i("File"),g=i("Blob"),b=i("FileList"),v=i("URLSearchParams");function S(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),s(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function w(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!c(e)&&e!==O;const E=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&r(Uint8Array)),j=i("HTMLFormElement"),P=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),R=i("RegExp"),x=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};S(r,((r,o)=>{!1!==t(r,o,e)&&(n[o]=r)})),Object.defineProperties(e,n)},N="abcdefghijklmnopqrstuvwxyz",T="0123456789",_={DIGIT:T,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+T};const F=i("AsyncFunction");var C={isArray:s,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&f(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||f(e.append)&&("formdata"===(t=n(e))||"object"===t&&f(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t},isString:l,isNumber:p,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:d,isUndefined:c,isDate:h,isFile:m,isBlob:g,isRegExp:R,isFunction:f,isStream:e=>y(e)&&f(e.pipe),isURLSearchParams:v,isTypedArray:E,isFileList:b,forEach:S,merge:function e(){const{caseless:t}=A(this)&&this||{},r={},n=(n,o)=>{const i=t&&w(r,o)||o;d(r[i])&&d(n)?r[i]=e(r[i],n):d(n)?r[i]=e({},n):s(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&S(arguments[e],n);return r},extend:(t,r,n,{allOwnKeys:o}={})=>(S(r,((r,o)=>{n&&f(r)?t[o]=e(r,n):t[o]=r}),{allOwnKeys:o}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,n,o)=>{let i,a,s;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],o&&!o(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==n&&r(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:n,kindOfTest:i,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(s(e))return e;let t=e.length;if(!p(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:j,hasOwnProperty:P,hasOwnProp:P,reduceDescriptors:x,freezeMethods:e=>{x(e,((t,r)=>{if(f(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];f(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return s(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:w,global:O,isContextDefined:A,ALPHABET:_,generateString:(e=16,t=_.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&f(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=s(e)?[]:{};return S(e,((e,t)=>{const i=r(e,n+1);!c(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:F,isThenable:e=>e&&(y(e)||f(e))&&f(e.then)&&f(e.catch)};function k(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}C.inherits(k,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:C.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const U=k.prototype,D={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{D[e]={value:e}})),Object.defineProperties(k,D),Object.defineProperty(U,"isAxiosError",{value:!0}),k.from=(e,t,r,n,o,i)=>{const a=Object.create(U);return C.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),k.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function I(e){return C.isPlainObject(e)||C.isArray(e)}function B(e){return C.endsWith(e,"[]")?e.slice(0,-2):e}function L(e,t,r){return e?e.concat(t).map((function(e,t){return e=B(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const M=C.toFlatObject(C,{},null,(function(e){return/^is[A-Z]/.test(e)}));function W(e,t,r){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=C.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!C.isUndefined(t[e])}))).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(C.isDate(e))return e.toISOString();if(!s&&C.isBlob(e))throw new k("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(e)||C.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(C.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(C.isArray(e)&&function(e){return C.isArray(e)&&!e.some(I)}(e)||(C.isFileList(e)||C.endsWith(r,"[]"))&&(s=C.toArray(e)))return r=B(r),s.forEach((function(e,n){!C.isUndefined(e)&&null!==e&&t.append(!0===a?L([r],n,i):null===a?r:r+"[]",c(e))})),!1;return!!I(e)||(t.append(L(o,r,i),c(e)),!1)}const l=[],f=Object.assign(M,{defaultVisitor:u,convertValue:c,isVisitable:I});if(!C.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!C.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),C.forEach(r,(function(r,i){!0===(!(C.isUndefined(r)||null===r)&&o.call(t,r,C.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function q(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function z(e,t){this._pairs=[],e&&W(e,this,t)}const H=z.prototype;function $(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function J(e,t,r){if(!t)return e;const n=r&&r.encode||$,o=r&&r.serialize;let i;if(i=o?o(t,r):C.isURLSearchParams(t)?t.toString():new z(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}H.append=function(e,t){this._pairs.push([e,t])},H.toString=function(e){const t=e?function(t){return e.call(this,t,q)}:q;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var G=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){C.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},V={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var K={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function Q(e){function t(e,r,n,o){let i=e[o++];const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&C.isArray(n)?n.length:i,s)return C.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&C.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&C.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a}if(C.isFormData(e)&&C.isFunction(e.entries)){const r={};return C.forEachEntry(e,((e,n)=>{t(function(e){return C.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const X={"Content-Type":void 0};const Z={transitional:V,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=C.isObject(e);o&&C.isHTMLForm(e)&&(e=new FormData(e));if(C.isFormData(e))return n&&n?JSON.stringify(Q(e)):e;if(C.isArrayBuffer(e)||C.isBuffer(e)||C.isStream(e)||C.isFile(e)||C.isBlob(e))return e;if(C.isArrayBufferView(e))return e.buffer;if(C.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return W(e,new K.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return K.isNode&&C.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=C.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return W(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(C.isString(e))try{return(t||JSON.parse)(e),C.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Z.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&C.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw k.from(e,k.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:K.classes.FormData,Blob:K.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};C.forEach(["delete","get","head"],(function(e){Z.headers[e]={}})),C.forEach(["post","put","patch"],(function(e){Z.headers[e]=C.merge(X)}));var Y=Z;const ee=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const te=Symbol("internals");function re(e){return e&&String(e).trim().toLowerCase()}function ne(e){return!1===e||null==e?e:C.isArray(e)?e.map(ne):String(e)}function oe(e,t,r,n,o){return C.isFunction(n)?n.call(this,t,r):(o&&(t=r),C.isString(t)?C.isString(n)?-1!==t.indexOf(n):C.isRegExp(n)?n.test(t):void 0:void 0)}class ie{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=re(t);if(!o)throw new Error("header name must be a non-empty string");const i=C.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=ne(e))}const i=(e,t)=>C.forEach(e,((e,r)=>o(e,r,t)));return C.isPlainObject(e)||e instanceof this.constructor?i(e,t):C.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&ee[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=re(e)){const r=C.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(C.isFunction(t))return t.call(this,e,r);if(C.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=re(e)){const r=C.findKey(this,e);return!(!r||void 0===this[r]||t&&!oe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=re(e)){const o=C.findKey(r,e);!o||t&&!oe(0,r[o],o,t)||(delete r[o],n=!0)}}return C.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!oe(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return C.forEach(this,((n,o)=>{const i=C.findKey(r,o);if(i)return t[i]=ne(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=ne(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return C.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&C.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[te]=this[te]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=re(e);t[n]||(!function(e,t){const r=C.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return C.isArray(e)?e.forEach(n):n(e),this}}ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.freezeMethods(ie.prototype),C.freezeMethods(ie);var ae=ie;function se(e,t){const r=this||Y,n=t||r,o=ae.from(n.headers);let i=n.data;return C.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function ce(e){return!(!e||!e.__CANCEL__)}function ue(e,t,r){k.call(this,null==e?"canceled":e,k.ERR_CANCELED,t,r),this.name="CanceledError"}C.inherits(ue,k,{__CANCEL__:!0});var le=K.isStandardBrowserEnv?{write:function(e,t,r,n,o,i){const a=[];a.push(e+"="+encodeURIComponent(t)),C.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),C.isString(n)&&a.push("path="+n),C.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function fe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var pe=K.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=C.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function ye(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(1e3*f/p):void 0}}(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,c=n(s);r=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const de={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const o=ae.from(e.headers).normalize(),i=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}C.isFormData(n)&&(K.isStandardBrowserEnv||K.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const u=fe(e.baseURL,e.url);function l(){if(!c)return;const n=ae.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new k("Request failed with status code "+r.status,[k.ERR_BAD_REQUEST,k.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),s()}),(function(e){r(e),s()}),{data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),J(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(r(new k("Request aborted",k.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new k("Network Error",k.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||V;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new k(t,n.clarifyTimeoutError?k.ETIMEDOUT:k.ECONNABORTED,e,c)),c=null},K.isStandardBrowserEnv){const t=(e.withCredentials||pe(u))&&e.xsrfCookieName&&le.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in c&&C.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),C.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&"json"!==i&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",ye(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",ye(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{c&&(r(!t||t.type?new ue(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);f&&-1===K.protocols.indexOf(f)?r(new k("Unsupported protocol "+f+":",k.ERR_BAD_REQUEST,e)):c.send(n||null)}))}};C.forEach(de,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var he=e=>{e=C.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=C.isString(r)?de[r.toLowerCase()]:r));o++);if(!n){if(!1===n)throw new k(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(C.hasOwnProp(de,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`)}if(!C.isFunction(n))throw new TypeError("adapter is not a function");return n};function me(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ue(null,e)}function ge(e){me(e),e.headers=ae.from(e.headers),e.data=se.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return he(e.adapter||Y.adapter)(e).then((function(t){return me(e),t.data=se.call(e,e.transformResponse,t),t.headers=ae.from(t.headers),t}),(function(t){return ce(t)||(me(e),t&&t.response&&(t.response.data=se.call(e,e.transformResponse,t.response),t.response.headers=ae.from(t.response.headers))),Promise.reject(t)}))}const be=e=>e instanceof ae?e.toJSON():e;function ve(e,t){t=t||{};const r={};function n(e,t,r){return C.isPlainObject(e)&&C.isPlainObject(t)?C.merge.call({caseless:r},e,t):C.isPlainObject(t)?C.merge({},t):C.isArray(t)?t.slice():t}function o(e,t,r){return C.isUndefined(t)?C.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function i(e,t){if(!C.isUndefined(t))return n(void 0,t)}function a(e,t){return C.isUndefined(t)?C.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>o(be(e),be(t),!0)};return C.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,a=i(e[n],t[n],n);C.isUndefined(a)&&i!==s||(r[n]=a)})),r}const Se="1.4.0",we={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{we[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Oe={};we.transitional=function(e,t,r){return(n,o,i)=>{if(!1===e)throw new k(function(e,t){return"[Axios v1.4.0] Transitional option '"+e+"'"+t+(r?". "+r:"")}(o," has been removed"+(t?" in "+t:"")),k.ERR_DEPRECATED);return t&&!Oe[o]&&(Oe[o]=!0),!e||e(n,o,i)}};var Ae={assertOptions:function(e,t,r){if("object"!=typeof e)throw new k("options must be an object",k.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new k("option "+i+" must be "+r,k.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new k("Unknown option "+i,k.ERR_BAD_OPTION)}},validators:we};const Ee=Ae.validators;let je=class{constructor(e){this.defaults=e,this.interceptors={request:new G,response:new G}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ve(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;let i;void 0!==r&&Ae.assertOptions(r,{silentJSONParsing:Ee.transitional(Ee.boolean),forcedJSONParsing:Ee.transitional(Ee.boolean),clarifyTimeoutError:Ee.transitional(Ee.boolean)},!1),null!=n&&(C.isFunction(n)?t.paramsSerializer={serialize:n}:Ae.assertOptions(n,{encode:Ee.function,serialize:Ee.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase(),i=o&&C.merge(o.common,o[t.method]),i&&C.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ae.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!s){const e=[ge.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=a.length;let p=t;for(f=0;f<l;){const e=a[f++],t=a[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{u=ge.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return J(fe((e=ve(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}};C.forEach(["delete","get","head","options"],(function(e){je.prototype[e]=function(t,r){return this.request(ve(r||{},{method:e,url:t,data:(r||{}).data}))}})),C.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(ve(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}je.prototype[e]=t(),je.prototype[e+"Form"]=t(!0)}));var Pe=je;class Re{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new ue(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Re((function(t){e=t})),cancel:e}}}var xe=Re;const Ne={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ne).forEach((([e,t])=>{Ne[t]=e}));var Te=Ne;const _e=function t(r){const n=new Pe(r),o=e(Pe.prototype.request,n);return C.extend(o,Pe.prototype,n,{allOwnKeys:!0}),C.extend(o,n,null,{allOwnKeys:!0}),o.create=function(e){return t(ve(r,e))},o}(Y);_e.Axios=Pe,_e.CanceledError=ue,_e.CancelToken=xe,_e.isCancel=ce,_e.VERSION=Se,_e.toFormData=W,_e.AxiosError=k,_e.Cancel=_e.CanceledError,_e.all=function(e){return Promise.all(e)},_e.spread=function(e){return function(t){return e.apply(null,t)}},_e.isAxiosError=function(e){return C.isObject(e)&&!0===e.isAxiosError},_e.mergeConfig=ve,_e.AxiosHeaders=ae,_e.formToJSON=e=>Q(C.isHTMLForm(e)?new FormData(e):e),_e.HttpStatusCode=Te,_e.default=_e;var Fe=_e;function Ce(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var ke,Ue="undefined"!=typeof Symbol&&Symbol,De=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},Ie={foo:{}},Be=Object,Le=Array.prototype.slice,Me=Object.prototype.toString,We=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Me.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,n=Le.call(arguments,1),o=Math.max(0,t.length-n.length),i=[],a=0;a<o;a++)i.push("$"+a);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var o=t.apply(this,n.concat(Le.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(Le.call(arguments)))})),t.prototype){var s=function(){};s.prototype=t.prototype,r.prototype=new s,s.prototype=null}return r},qe=Function.prototype.bind||We,ze=qe.call(Function.call,Object.prototype.hasOwnProperty),He=SyntaxError,$e=Function,Je=TypeError,Ge=function(e){try{return $e('"use strict"; return ('+e+").constructor;")()}catch(e){}},Ve=Object.getOwnPropertyDescriptor;if(Ve)try{Ve({},"")}catch(e){Ve=null}var Ke=function(){throw new Je},Qe=Ve?function(){try{return Ke}catch(e){try{return Ve(arguments,"callee").get}catch(e){return Ke}}}():Ke,Xe="function"==typeof Ue&&"function"==typeof Symbol&&"symbol"==typeof Ue("foo")&&"symbol"==typeof Symbol("bar")&&De(),Ze={__proto__:Ie}.foo===Ie.foo&&!({__proto__:null}instanceof Be),Ye=Object.getPrototypeOf||(Ze?function(e){return e.__proto__}:null),et={},tt="undefined"!=typeof Uint8Array&&Ye?Ye(Uint8Array):ke,rt={"%AggregateError%":"undefined"==typeof AggregateError?ke:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?ke:ArrayBuffer,"%ArrayIteratorPrototype%":Xe&&Ye?Ye([][Symbol.iterator]()):ke,"%AsyncFromSyncIteratorPrototype%":ke,"%AsyncFunction%":et,"%AsyncGenerator%":et,"%AsyncGeneratorFunction%":et,"%AsyncIteratorPrototype%":et,"%Atomics%":"undefined"==typeof Atomics?ke:Atomics,"%BigInt%":"undefined"==typeof BigInt?ke:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?ke:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?ke:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?ke:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?ke:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?ke:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?ke:FinalizationRegistry,"%Function%":$e,"%GeneratorFunction%":et,"%Int8Array%":"undefined"==typeof Int8Array?ke:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?ke:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?ke:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Xe&&Ye?Ye(Ye([][Symbol.iterator]())):ke,"%JSON%":"object"==typeof JSON?JSON:ke,"%Map%":"undefined"==typeof Map?ke:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Xe&&Ye?Ye((new Map)[Symbol.iterator]()):ke,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?ke:Promise,"%Proxy%":"undefined"==typeof Proxy?ke:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?ke:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?ke:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Xe&&Ye?Ye((new Set)[Symbol.iterator]()):ke,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?ke:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Xe&&Ye?Ye(""[Symbol.iterator]()):ke,"%Symbol%":Xe?Symbol:ke,"%SyntaxError%":He,"%ThrowTypeError%":Qe,"%TypedArray%":tt,"%TypeError%":Je,"%Uint8Array%":"undefined"==typeof Uint8Array?ke:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?ke:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?ke:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?ke:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?ke:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?ke:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?ke:WeakSet};if(Ye)try{null.error}catch(e){var nt=Ye(Ye(e));rt["%Error.prototype%"]=nt}var ot=function e(t){var r;if("%AsyncFunction%"===t)r=Ge("async function () {}");else if("%GeneratorFunction%"===t)r=Ge("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=Ge("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&Ye&&(r=Ye(o.prototype))}return rt[t]=r,r},it={"%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"]},at=qe,st=ze,ct=at.call(Function.call,Array.prototype.concat),ut=at.call(Function.apply,Array.prototype.splice),lt=at.call(Function.call,String.prototype.replace),ft=at.call(Function.call,String.prototype.slice),pt=at.call(Function.call,RegExp.prototype.exec),yt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,dt=/\\(\\)?/g,ht=function(e,t){var r,n=e;if(st(it,n)&&(n="%"+(r=it[n])[0]+"%"),st(rt,n)){var o=rt[n];if(o===et&&(o=ot(n)),void 0===o&&!t)throw new Je("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new He("intrinsic "+e+" does not exist!")},mt=function(e,t){if("string"!=typeof e||0===e.length)throw new Je("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Je('"allowMissing" argument must be a boolean');if(null===pt(/^%?[^%]*%?$/,e))throw new He("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=ft(e,0,1),r=ft(e,-1);if("%"===t&&"%"!==r)throw new He("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new He("invalid intrinsic syntax, expected opening `%`");var n=[];return lt(e,yt,(function(e,t,r,o){n[n.length]=r?lt(o,dt,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=ht("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],ut(r,ct([0,1],c)));for(var u=1,l=!0;u<r.length;u+=1){var f=r[u],p=ft(f,0,1),y=ft(f,-1);if(('"'===p||"'"===p||"`"===p||'"'===y||"'"===y||"`"===y)&&p!==y)throw new He("property names with quotes must have matching quotes");if("constructor"!==f&&l||(s=!0),st(rt,i="%"+(n+="."+f)+"%"))a=rt[i];else if(null!=a){if(!(f in a)){if(!t)throw new Je("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ve&&u+1>=r.length){var d=Ve(a,f);a=(l=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:a[f]}else l=st(a,f),a=a[f];l&&!s&&(rt[i]=a)}}return a},gt={exports:{}};!function(e){var t=qe,r=mt,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var r=i(t,o,arguments);a&&s&&(a(r,"length").configurable&&s(r,"length",{value:1+c(0,e.length-(arguments.length-1))}));return r};var u=function(){return i(t,n,arguments)};s?s(e.exports,"apply",{value:u}):e.exports.apply=u}(gt);var bt=mt,vt=gt.exports,St=vt(bt("String.prototype.indexOf")),wt=Ce(Object.freeze({__proto__:null,default:{}})),Ot="function"==typeof Map&&Map.prototype,At=Object.getOwnPropertyDescriptor&&Ot?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Et=Ot&&At&&"function"==typeof At.get?At.get:null,jt=Ot&&Map.prototype.forEach,Pt="function"==typeof Set&&Set.prototype,Rt=Object.getOwnPropertyDescriptor&&Pt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,xt=Pt&&Rt&&"function"==typeof Rt.get?Rt.get:null,Nt=Pt&&Set.prototype.forEach,Tt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,_t="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Ft="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Ct=Boolean.prototype.valueOf,kt=Object.prototype.toString,Ut=Function.prototype.toString,Dt=String.prototype.match,It=String.prototype.slice,Bt=String.prototype.replace,Lt=String.prototype.toUpperCase,Mt=String.prototype.toLowerCase,Wt=RegExp.prototype.test,qt=Array.prototype.concat,zt=Array.prototype.join,Ht=Array.prototype.slice,$t=Math.floor,Jt="function"==typeof BigInt?BigInt.prototype.valueOf:null,Gt=Object.getOwnPropertySymbols,Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Kt="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Qt="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Kt||"symbol")?Symbol.toStringTag:null,Xt=Object.prototype.propertyIsEnumerable,Zt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Yt(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Wt.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-$t(-e):$t(e);if(n!==e){var o=String(n),i=It.call(t,o.length+1);return Bt.call(o,r,"$&_")+"."+Bt.call(Bt.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Bt.call(t,r,"$&_")}var er=wt,tr=er.custom,rr=sr(tr)?tr:null;function nr(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function or(e){return Bt.call(String(e),/"/g,"&quot;")}function ir(e){return!("[object Array]"!==lr(e)||Qt&&"object"==typeof e&&Qt in e)}function ar(e){return!("[object RegExp]"!==lr(e)||Qt&&"object"==typeof e&&Qt in e)}function sr(e){if(Kt)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!Vt)return!1;try{return Vt.call(e),!0}catch(e){}return!1}var cr=Object.prototype.hasOwnProperty||function(e){return e in this};function ur(e,t){return cr.call(e,t)}function lr(e){return kt.call(e)}function fr(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function pr(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return pr(It.call(e,0,t.maxStringLength),t)+n}return nr(Bt.call(Bt.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,yr),"single",t)}function yr(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Lt.call(t.toString(16))}function dr(e){return"Object("+e+")"}function hr(e){return e+" { ? }"}function mr(e,t,r,n){return e+" ("+t+") {"+(n?gr(r,n):zt.call(r,", "))+"}"}function gr(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+zt.call(e,","+r)+"\n"+t.prev}function br(e,t){var r=ir(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=ur(e,o)?t(e[o],e):""}var i,a="function"==typeof Gt?Gt(e):[];if(Kt){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)ur(e,c)&&(r&&String(Number(c))===c&&c<e.length||Kt&&i["$"+c]instanceof Symbol||(Wt.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof Gt)for(var u=0;u<a.length;u++)Xt.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}var vr=mt,Sr=function(e,t){var r=bt(e,!!t);return"function"==typeof r&&St(e,".prototype.")>-1?vt(r):r},wr=function e(t,r,n,o){var i=r||{};if(ur(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ur(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!ur(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ur(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ur(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return pr(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var c=String(t);return s?Yt(t,c):c}if("bigint"==typeof t){var u=String(t)+"n";return s?Yt(t,u):u}var l=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=l&&l>0&&"object"==typeof t)return ir(t)?"[Array]":"[Object]";var f=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=zt.call(Array(e.indent+1)," ")}return{base:r,prev:zt.call(Array(t+1),r)}}(i,n);if(void 0===o)o=[];else if(fr(o,t)>=0)return"[Circular]";function p(t,r,a){if(r&&(o=Ht.call(o)).push(r),a){var s={depth:i.depth};return ur(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t&&!ar(t)){var y=function(e){if(e.name)return e.name;var t=Dt.call(Ut.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),d=br(t,p);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(d.length>0?" { "+zt.call(d,", ")+" }":"")}if(sr(t)){var h=Kt?Bt.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Vt.call(t);return"object"!=typeof t||Kt?h:dr(h)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var m="<"+Mt.call(String(t.nodeName)),g=t.attributes||[],b=0;b<g.length;b++)m+=" "+g[b].name+"="+nr(or(g[b].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+Mt.call(String(t.nodeName))+">"}if(ir(t)){if(0===t.length)return"[]";var v=br(t,p);return f&&!function(e){for(var t=0;t<e.length;t++)if(fr(e[t],"\n")>=0)return!1;return!0}(v)?"["+gr(v,f)+"]":"[ "+zt.call(v,", ")+" ]"}if(function(e){return!("[object Error]"!==lr(e)||Qt&&"object"==typeof e&&Qt in e)}(t)){var S=br(t,p);return"cause"in Error.prototype||!("cause"in t)||Xt.call(t,"cause")?0===S.length?"["+String(t)+"]":"{ ["+String(t)+"] "+zt.call(S,", ")+" }":"{ ["+String(t)+"] "+zt.call(qt.call("[cause]: "+p(t.cause),S),", ")+" }"}if("object"==typeof t&&a){if(rr&&"function"==typeof t[rr]&&er)return er(t,{depth:l-n});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Et||!e||"object"!=typeof e)return!1;try{Et.call(e);try{xt.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var w=[];return jt&&jt.call(t,(function(e,r){w.push(p(r,t,!0)+" => "+p(e,t))})),mr("Map",Et.call(t),w,f)}if(function(e){if(!xt||!e||"object"!=typeof e)return!1;try{xt.call(e);try{Et.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var O=[];return Nt&&Nt.call(t,(function(e){O.push(p(e,t))})),mr("Set",xt.call(t),O,f)}if(function(e){if(!Tt||!e||"object"!=typeof e)return!1;try{Tt.call(e,Tt);try{_t.call(e,_t)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return hr("WeakMap");if(function(e){if(!_t||!e||"object"!=typeof e)return!1;try{_t.call(e,_t);try{Tt.call(e,Tt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return hr("WeakSet");if(function(e){if(!Ft||!e||"object"!=typeof e)return!1;try{return Ft.call(e),!0}catch(e){}return!1}(t))return hr("WeakRef");if(function(e){return!("[object Number]"!==lr(e)||Qt&&"object"==typeof e&&Qt in e)}(t))return dr(p(Number(t)));if(function(e){if(!e||"object"!=typeof e||!Jt)return!1;try{return Jt.call(e),!0}catch(e){}return!1}(t))return dr(p(Jt.call(t)));if(function(e){return!("[object Boolean]"!==lr(e)||Qt&&"object"==typeof e&&Qt in e)}(t))return dr(Ct.call(t));if(function(e){return!("[object String]"!==lr(e)||Qt&&"object"==typeof e&&Qt in e)}(t))return dr(p(String(t)));if(!function(e){return!("[object Date]"!==lr(e)||Qt&&"object"==typeof e&&Qt in e)}(t)&&!ar(t)){var A=br(t,p),E=Zt?Zt(t)===Object.prototype:t instanceof Object||t.constructor===Object,j=t instanceof Object?"":"null prototype",P=!E&&Qt&&Object(t)===t&&Qt in t?It.call(lr(t),8,-1):j?"Object":"",R=(E||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(P||j?"["+zt.call(qt.call([],P||[],j||[]),": ")+"] ":"");return 0===A.length?R+"{}":f?R+"{"+gr(A,f)+"}":R+"{ "+zt.call(A,", ")+" }"}return String(t)},Or=vr("%TypeError%"),Ar=vr("%WeakMap%",!0),Er=vr("%Map%",!0),jr=Sr("WeakMap.prototype.get",!0),Pr=Sr("WeakMap.prototype.set",!0),Rr=Sr("WeakMap.prototype.has",!0),xr=Sr("Map.prototype.get",!0),Nr=Sr("Map.prototype.set",!0),Tr=Sr("Map.prototype.has",!0),_r=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Fr=String.prototype.replace,Cr=/%20/g,kr="RFC3986",Ur={default:kr,formatters:{RFC1738:function(e){return Fr.call(e,Cr,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:kr},Dr=Ur,Ir=Object.prototype.hasOwnProperty,Br=Array.isArray,Lr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Mr=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},Wr={arrayToObject:Mr,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<