!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).axios={})}(this,(function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{},s=i.allOwnKeys,a=void 0!==s&&s;if(null!=e)if("object"!==t(e)&&(e=[e]),d(e))for(n=0,o=e.length;n3&&void 0!==arguments[3]?arguments[3]:{},o=n.allOwnKeys;return A(t,(function(t,n){r&&v(t)?e[n]=i(t,r):e[n]=t}),{allOwnKeys:o}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(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:function(e,t,r,n){var o,i,s,a={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&u(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:f,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(d(e))return e;var t=e.length;if(!y(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var o=r.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:x,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:P,freezeMethods:function(e){P(e,(function(t,r){var n=e[r];v(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not read-only method '"+r+"'")}))}))},toObjectSet:function(e,t){var r={},n=function(e){e.forEach((function(e){r[e]=!0}))};return d(e)?n(e):n(String(e).split(t)),r},toCamelCase:function(e){return e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r}))},noop:function(){},toFiniteNumber:function(e,t){return e=+e,Number.isFinite(e)?e:t}};function B(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)}_.inherits(B,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var D=B.prototype,F={};["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((function(e){F[e]={value:e}})),Object.defineProperties(B,F),Object.defineProperty(D,"isAxiosError",{value:!0}),B.from=function(e,t,r,n,o,i){var s=Object.create(D);return _.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(function(e){return"isAxiosError"!==e})),B.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};var U="object"==("undefined"==typeof self?"undefined":t(self))?self.FormData:window.FormData;function k(e){return _.isPlainObject(e)||_.isArray(e)}function L(e){return _.endsWith(e,"[]")?e.slice(0,-2):e}function q(e,t,r){return e?e.concat(t).map((function(e,t){return e=L(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var M=_.toFlatObject(_,{},null,(function(e){return/^is[A-Z]/.test(e)}));function z(e,r,n){if(!_.isObject(e))throw new TypeError("target must be an object");r=r||new(U||FormData);var o,i=(n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!_.isUndefined(t[e])}))).metaTokens,s=n.visitor||l,a=n.dots,u=n.indexes,c=(n.Blob||"undefined"!=typeof Blob&&Blob)&&((o=r)&&_.isFunction(o.append)&&"FormData"===o[Symbol.toStringTag]&&o[Symbol.iterator]);if(!_.isFunction(s))throw new TypeError("visitor must be a function");function f(e){if(null===e)return"";if(_.isDate(e))return e.toISOString();if(!c&&_.isBlob(e))throw new B("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(e)||_.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){var s=e;if(e&&!o&&"object"===t(e))if(_.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(_.isArray(e)&&function(e){return _.isArray(e)&&!e.some(k)}(e)||_.isFileList(e)||_.endsWith(n,"[]")&&(s=_.toArray(e)))return n=L(n),s.forEach((function(e,t){!_.isUndefined(e)&&r.append(!0===u?q([n],t,a):null===u?n:n+"[]",f(e))})),!1;return!!k(e)||(r.append(q(o,n,a),f(e)),!1)}var d=[],h=Object.assign(M,{defaultVisitor:l,convertValue:f,isVisitable:k});if(!_.isObject(e))throw new TypeError("data must be an object");return function e(t,n){if(!_.isUndefined(t)){if(-1!==d.indexOf(t))throw Error("Circular reference detected in "+n.join("."));d.push(t),_.forEach(t,(function(t,o){!0===(!_.isUndefined(t)&&s.call(r,t,_.isString(o)?o.trim():o,n,h))&&e(t,n?n.concat(o):[o])})),d.pop()}}(e),r}function I(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function J(e,t){this._pairs=[],e&&z(e,this,t)}var H=J.prototype;function V(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function W(e,t,r){if(!t)return e;var n=e.indexOf("#");-1!==n&&(e=e.slice(0,n));var o=r&&r.encode||V,i=_.isURLSearchParams(t)?t.toString():new J(t,r).toString(o);return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}H.append=function(e,t){this._pairs.push([e,t])},H.toString=function(e){var t=e?function(t){return e.call(this,t,I)}:I;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var K,X=function(){function e(){r(this,e),this.handlers=[]}return o(e,[{key:"use",value:function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){_.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}]),e}(),$={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Q="undefined"!=typeof URLSearchParams?URLSearchParams:J,G=FormData,Y=("undefined"==typeof navigator||"ReactNative"!==(K=navigator.product)&&"NativeScript"!==K&&"NS"!==K)&&"undefined"!=typeof window&&"undefined"!=typeof document,Z={isBrowser:!0,classes:{URLSearchParams:Q,FormData:G,Blob:Blob},isStandardBrowserEnv:Y,protocols:["http","https","file","blob","url","data"]};function ee(e){function t(e,r,n,o){var i=e[o++],s=Number.isFinite(+i),a=o>=e.length;return i=!i&&_.isArray(n)?n.length:i,a?(_.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s):(n[i]&&_.isObject(n[i])||(n[i]=[]),t(e,r,n[i],o)&&_.isArray(n[i])&&(n[i]=function(e){var t,r,n={},o=Object.keys(e),i=o.length;for(t=0;t0;)if(t===(r=n[o]).toLowerCase())return r;return null}function de(e,t){e&&this.set(e),this[ae]=t||null}function he(e,t){var r=0,n=function(e,t){e=e||10;var r,n=new Array(e),o=new Array(e),i=0,s=0;return t=void 0!==t?t:1e3,function(a){var u=Date.now(),c=o[s];r||(r=u),n[i]=a,o[i]=u;for(var f=s,l=0;f!==i;)l+=n[f++],f%=e;if((i=(i+1)%e)===s&&(s=(s+1)%e),!(u-r-1,i=_.isObject(e);if(i&&_.isHTMLForm(e)&&(e=new FormData(e)),_.isFormData(e))return o&&o?JSON.stringify(ee(e)):e;if(_.isArrayBuffer(e)||_.isBuffer(e)||_.isStream(e)||_.isFile(e)||_.isBlob(e))return e;if(_.isArrayBufferView(e))return e.buffer;if(_.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return z(e,new Z.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return Z.isNode&&_.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=_.isFileList(e))||n.indexOf("multipart/form-data")>-1){var s=this.env&&this.env.FormData;return z(r?{"files[]":e}:e,s&&new s,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,r){if(_.isString(e))try{return(t||JSON.parse)(e),_.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||ge.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&_.isString(e)&&(r&&!this.responseType||n)){var o=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw B.from(e,B.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:Z.classes.FormData,Blob:Z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};function Ee(e,t){var r=this||ge,n=t||r,o=de.from(n.headers),i=n.data;return _.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function we(e){return!(!e||!e.__CANCEL__)}function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new oe}function Re(e){return Oe(e),e.headers=de.from(e.headers),e.data=Ee.call(e,e.transformRequest),(e.adapter||ge.adapter)(e).then((function(t){return Oe(e),t.data=Ee.call(e,e.transformResponse,t),t.headers=de.from(t.headers),t}),(function(t){return we(t)||(Oe(e),t&&t.response&&(t.response.data=Ee.call(e,e.transformResponse,t.response),t.response.headers=de.from(t.response.headers))),Promise.reject(t)}))}function Se(e,t){t=t||{};var r={};function n(e,t){return _.isPlainObject(e)&&_.isPlainObject(t)?_.merge(e,t):_.isPlainObject(t)?_.merge({},t):_.isArray(t)?t.slice():t}function o(r){return _.isUndefined(t[r])?_.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function i(e){if(!_.isUndefined(t[e]))return n(void 0,t[e])}function s(r){return _.isUndefined(t[r])?_.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function a(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a};return _.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||o,n=t(e);_.isUndefined(n)&&t!==a||(r[e]=n)})),r}_.forEach(["delete","get","head"],(function(e){ge.headers[e]={}})),_.forEach(["post","put","patch"],(function(e){ge.headers[e]=_.merge(ye)}));var Ae="1.1.0",je={};["object","boolean","number","function","string","symbol"].forEach((function(e,r){je[e]=function(n){return t(n)===e||"a"+(r<1?"n ":" ")+e}}));var Te={};je.transitional=function(e,t,r){function n(e,t){return"[Axios v1.1.0] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new B(n(o," has been removed"+(t?" in "+t:"")),B.ERR_DEPRECATED);return t&&!Te[o]&&(Te[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var xe={assertOptions:function(e,r,n){if("object"!==t(e))throw new B("options must be an object",B.ERR_BAD_OPTION_VALUE);for(var o=Object.keys(e),i=o.length;i-- >0;){var s=o[i],a=r[s];if(a){var u=e[s],c=void 0===u||a(u,s,e);if(!0!==c)throw new B("option "+s+" must be "+c,B.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new B("Unknown option "+s,B.ERR_BAD_OPTION)}},validators:je},Ce=xe.validators,Ne=function(){function e(t){r(this,e),this.defaults=t,this.interceptors={request:new X,response:new X}}return o(e,[{key:"request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=(t=Se(this.defaults,t)).transitional;void 0!==r&&xe.assertOptions(r,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),t.method=(t.method||this.defaults.method||"get").toLowerCase();var n=t.headers&&_.merge(t.headers.common,t.headers[t.method]);n&&_.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),t.headers=new de(t.headers,n);var o=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));var s,a=[];this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)}));var u,c=0;if(!i){var f=[Re.bind(this),void 0];for(f.unshift.apply(f,o),f.push.apply(f,a),u=f.length,s=Promise.resolve(t);c0;)o._listeners[t](e);o._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){o.subscribe(e),t=e})).then(e);return r.cancel=function(){o.unsubscribe(t)},r},t((function(e,t,r){o.reason||(o.reason=new oe(e,t,r),n(o.reason))}))}return o(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}}],[{key:"source",value:function(){var t;return{token:new e((function(e){t=e})),cancel:t}}}]),e}();var _e=function e(t){var r=new Ne(t),n=i(Ne.prototype.request,r);return _.extend(n,Ne.prototype,r,{allOwnKeys:!0}),_.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Se(t,r))},n}(ge);_e.Axios=Ne,_e.CanceledError=oe,_e.CancelToken=Pe,_e.isCancel=we,_e.VERSION=Ae,_e.toFormData=z,_e.AxiosError=B,_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 _.isObject(e)&&!0===e.isAxiosError},_e.formToJSON=function(e){return ee(_.isHTMLForm(e)?new FormData(e):e)},e.Axios=Ne,e.AxiosError=B,e.AxiosHeaders=de,e.CanceledError=oe,e.default=_e,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=axios.min.js.map