@delta-comic/request 0.0.0-semantically-released → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +13 -1493
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -6
- package/dist/index.umd.cjs.map +1 -1
- package/dist/pack.tgz +0 -0
- package/package.json +7 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
let r = {};
|
|
3
|
-
for (var i in t) __defProp(r, i, {
|
|
4
|
-
get: t[i],
|
|
5
|
-
enumerable: !0
|
|
6
|
-
});
|
|
7
|
-
return n || __defProp(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
8
|
-
};
|
|
1
|
+
import axios, { isAxiosError, isCancel } from "axios";
|
|
9
2
|
function mitt_default(e) {
|
|
10
3
|
return {
|
|
11
4
|
all: e ||= /* @__PURE__ */ new Map(),
|
|
@@ -45,1480 +38,7 @@ var SmartAbortController = class {
|
|
|
45
38
|
};
|
|
46
39
|
this.mitt.on("abort", t);
|
|
47
40
|
}
|
|
48
|
-
}
|
|
49
|
-
function bind(e, t) {
|
|
50
|
-
return function() {
|
|
51
|
-
return e.apply(t, arguments);
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
var { toString } = Object.prototype, { getPrototypeOf } = Object, { iterator, toStringTag } = Symbol, kindOf = ((e) => (t) => {
|
|
55
|
-
let n = toString.call(t);
|
|
56
|
-
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
57
|
-
})(Object.create(null)), kindOfTest = (e) => (e = e.toLowerCase(), (t) => kindOf(t) === e), typeOfTest = (e) => (t) => typeof t === e, { isArray } = Array, isUndefined = typeOfTest("undefined");
|
|
58
|
-
function isBuffer(e) {
|
|
59
|
-
return e !== null && !isUndefined(e) && e.constructor !== null && !isUndefined(e.constructor) && isFunction$1(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
60
|
-
}
|
|
61
|
-
var isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
62
|
-
function isArrayBufferView(e) {
|
|
63
|
-
let t;
|
|
64
|
-
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && isArrayBuffer(e.buffer), t;
|
|
65
|
-
}
|
|
66
|
-
var isString = typeOfTest("string"), isFunction$1 = typeOfTest("function"), isNumber = typeOfTest("number"), isObject = (e) => typeof e == "object" && !!e, isBoolean = (e) => e === !0 || e === !1, isPlainObject = (e) => {
|
|
67
|
-
if (kindOf(e) !== "object") return !1;
|
|
68
|
-
let t = getPrototypeOf(e);
|
|
69
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(toStringTag in e) && !(iterator in e);
|
|
70
|
-
}, isEmptyObject = (e) => {
|
|
71
|
-
if (!isObject(e) || isBuffer(e)) return !1;
|
|
72
|
-
try {
|
|
73
|
-
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
74
|
-
} catch {
|
|
75
|
-
return !1;
|
|
76
|
-
}
|
|
77
|
-
}, isDate = kindOfTest("Date"), isFile = kindOfTest("File"), isBlob = kindOfTest("Blob"), isFileList = kindOfTest("FileList"), isStream = (e) => isObject(e) && isFunction$1(e.pipe), isFormData = (e) => {
|
|
78
|
-
let t;
|
|
79
|
-
return e && (typeof FormData == "function" && e instanceof FormData || isFunction$1(e.append) && ((t = kindOf(e)) === "formdata" || t === "object" && isFunction$1(e.toString) && e.toString() === "[object FormData]"));
|
|
80
|
-
}, isURLSearchParams = kindOfTest("URLSearchParams"), [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
81
|
-
"ReadableStream",
|
|
82
|
-
"Request",
|
|
83
|
-
"Response",
|
|
84
|
-
"Headers"
|
|
85
|
-
].map(kindOfTest), trim = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
86
|
-
function forEach(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
87
|
-
if (e == null) return;
|
|
88
|
-
let r, i;
|
|
89
|
-
if (typeof e != "object" && (e = [e]), isArray(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e);
|
|
90
|
-
else {
|
|
91
|
-
if (isBuffer(e)) return;
|
|
92
|
-
let i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = i.length, o;
|
|
93
|
-
for (r = 0; r < a; r++) o = i[r], t.call(null, e[o], o, e);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
function findKey(e, t) {
|
|
97
|
-
if (isBuffer(e)) return null;
|
|
98
|
-
t = t.toLowerCase();
|
|
99
|
-
let n = Object.keys(e), r = n.length, i;
|
|
100
|
-
for (; r-- > 0;) if (i = n[r], t === i.toLowerCase()) return i;
|
|
101
|
-
return null;
|
|
102
|
-
}
|
|
103
|
-
var _global = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, isContextDefined = (e) => !isUndefined(e) && e !== _global;
|
|
104
|
-
function merge() {
|
|
105
|
-
let { caseless: e, skipUndefined: t } = isContextDefined(this) && this || {}, n = {}, r = (r, i) => {
|
|
106
|
-
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
107
|
-
let a = e && findKey(n, i) || i;
|
|
108
|
-
isPlainObject(n[a]) && isPlainObject(r) ? n[a] = merge(n[a], r) : isPlainObject(r) ? n[a] = merge({}, r) : isArray(r) ? n[a] = r.slice() : (!t || !isUndefined(r)) && (n[a] = r);
|
|
109
|
-
};
|
|
110
|
-
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] && forEach(arguments[e], r);
|
|
111
|
-
return n;
|
|
112
|
-
}
|
|
113
|
-
var extend = (e, t, n, { allOwnKeys: r } = {}) => (forEach(t, (t, r) => {
|
|
114
|
-
n && isFunction$1(t) ? Object.defineProperty(e, r, {
|
|
115
|
-
value: bind(t, n),
|
|
116
|
-
writable: !0,
|
|
117
|
-
enumerable: !0,
|
|
118
|
-
configurable: !0
|
|
119
|
-
}) : Object.defineProperty(e, r, {
|
|
120
|
-
value: t,
|
|
121
|
-
writable: !0,
|
|
122
|
-
enumerable: !0,
|
|
123
|
-
configurable: !0
|
|
124
|
-
});
|
|
125
|
-
}, { allOwnKeys: r }), e), stripBOM = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), inherits = (e, t, n, r) => {
|
|
126
|
-
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
127
|
-
value: e,
|
|
128
|
-
writable: !0,
|
|
129
|
-
enumerable: !1,
|
|
130
|
-
configurable: !0
|
|
131
|
-
}), Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n);
|
|
132
|
-
}, toFlatObject = (e, t, n, r) => {
|
|
133
|
-
let i, a, s, c = {};
|
|
134
|
-
if (t ||= {}, e == null) return t;
|
|
135
|
-
do {
|
|
136
|
-
for (i = Object.getOwnPropertyNames(e), a = i.length; a-- > 0;) s = i[a], (!r || r(s, e, t)) && !c[s] && (t[s] = e[s], c[s] = !0);
|
|
137
|
-
e = n !== !1 && getPrototypeOf(e);
|
|
138
|
-
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
139
|
-
return t;
|
|
140
|
-
}, endsWith = (e, t, n) => {
|
|
141
|
-
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
142
|
-
let r = e.indexOf(t, n);
|
|
143
|
-
return r !== -1 && r === n;
|
|
144
|
-
}, toArray = (e) => {
|
|
145
|
-
if (!e) return null;
|
|
146
|
-
if (isArray(e)) return e;
|
|
147
|
-
let t = e.length;
|
|
148
|
-
if (!isNumber(t)) return null;
|
|
149
|
-
let n = Array(t);
|
|
150
|
-
for (; t-- > 0;) n[t] = e[t];
|
|
151
|
-
return n;
|
|
152
|
-
}, isTypedArray = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && getPrototypeOf(Uint8Array)), forEachEntry = (e, t) => {
|
|
153
|
-
let n = (e && e[iterator]).call(e), r;
|
|
154
|
-
for (; (r = n.next()) && !r.done;) {
|
|
155
|
-
let n = r.value;
|
|
156
|
-
t.call(e, n[0], n[1]);
|
|
157
|
-
}
|
|
158
|
-
}, matchAll = (e, t) => {
|
|
159
|
-
let n, r = [];
|
|
160
|
-
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
161
|
-
return r;
|
|
162
|
-
}, isHTMLForm = kindOfTest("HTMLFormElement"), toCamelCase = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, t, n) {
|
|
163
|
-
return t.toUpperCase() + n;
|
|
164
|
-
}), hasOwnProperty = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), isRegExp = kindOfTest("RegExp"), reduceDescriptors = (e, t) => {
|
|
165
|
-
let n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
166
|
-
forEach(n, (n, i) => {
|
|
167
|
-
let a;
|
|
168
|
-
(a = t(n, i, e)) !== !1 && (r[i] = a || n);
|
|
169
|
-
}), Object.defineProperties(e, r);
|
|
170
|
-
}, freezeMethods = (e) => {
|
|
171
|
-
reduceDescriptors(e, (t, n) => {
|
|
172
|
-
if (isFunction$1(e) && [
|
|
173
|
-
"arguments",
|
|
174
|
-
"caller",
|
|
175
|
-
"callee"
|
|
176
|
-
].indexOf(n) !== -1) return !1;
|
|
177
|
-
let r = e[n];
|
|
178
|
-
if (isFunction$1(r)) {
|
|
179
|
-
if (t.enumerable = !1, "writable" in t) {
|
|
180
|
-
t.writable = !1;
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
t.set ||= () => {
|
|
184
|
-
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}, toObjectSet = (e, t) => {
|
|
189
|
-
let n = {}, r = (e) => {
|
|
190
|
-
e.forEach((e) => {
|
|
191
|
-
n[e] = !0;
|
|
192
|
-
});
|
|
193
|
-
};
|
|
194
|
-
return isArray(e) ? r(e) : r(String(e).split(t)), n;
|
|
195
|
-
}, noop = () => {}, toFiniteNumber = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
196
|
-
function isSpecCompliantForm(e) {
|
|
197
|
-
return !!(e && isFunction$1(e.append) && e[toStringTag] === "FormData" && e[iterator]);
|
|
198
|
-
}
|
|
199
|
-
var toJSONObject = (e) => {
|
|
200
|
-
let t = Array(10), n = (e, r) => {
|
|
201
|
-
if (isObject(e)) {
|
|
202
|
-
if (t.indexOf(e) >= 0) return;
|
|
203
|
-
if (isBuffer(e)) return e;
|
|
204
|
-
if (!("toJSON" in e)) {
|
|
205
|
-
t[r] = e;
|
|
206
|
-
let i = isArray(e) ? [] : {};
|
|
207
|
-
return forEach(e, (e, t) => {
|
|
208
|
-
let a = n(e, r + 1);
|
|
209
|
-
!isUndefined(a) && (i[t] = a);
|
|
210
|
-
}), t[r] = void 0, i;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
return e;
|
|
214
|
-
};
|
|
215
|
-
return n(e, 0);
|
|
216
|
-
}, isAsyncFn = kindOfTest("AsyncFunction"), isThenable = (e) => e && (isObject(e) || isFunction$1(e)) && isFunction$1(e.then) && isFunction$1(e.catch), _setImmediate = ((e, t) => e ? setImmediate : t ? ((e, t) => (_global.addEventListener("message", ({ source: n, data: r }) => {
|
|
217
|
-
n === _global && r === e && t.length && t.shift()();
|
|
218
|
-
}, !1), (n) => {
|
|
219
|
-
t.push(n), _global.postMessage(e, "*");
|
|
220
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", isFunction$1(_global.postMessage)), utils_default = {
|
|
221
|
-
isArray,
|
|
222
|
-
isArrayBuffer,
|
|
223
|
-
isBuffer,
|
|
224
|
-
isFormData,
|
|
225
|
-
isArrayBufferView,
|
|
226
|
-
isString,
|
|
227
|
-
isNumber,
|
|
228
|
-
isBoolean,
|
|
229
|
-
isObject,
|
|
230
|
-
isPlainObject,
|
|
231
|
-
isEmptyObject,
|
|
232
|
-
isReadableStream,
|
|
233
|
-
isRequest,
|
|
234
|
-
isResponse,
|
|
235
|
-
isHeaders,
|
|
236
|
-
isUndefined,
|
|
237
|
-
isDate,
|
|
238
|
-
isFile,
|
|
239
|
-
isBlob,
|
|
240
|
-
isRegExp,
|
|
241
|
-
isFunction: isFunction$1,
|
|
242
|
-
isStream,
|
|
243
|
-
isURLSearchParams,
|
|
244
|
-
isTypedArray,
|
|
245
|
-
isFileList,
|
|
246
|
-
forEach,
|
|
247
|
-
merge,
|
|
248
|
-
extend,
|
|
249
|
-
trim,
|
|
250
|
-
stripBOM,
|
|
251
|
-
inherits,
|
|
252
|
-
toFlatObject,
|
|
253
|
-
kindOf,
|
|
254
|
-
kindOfTest,
|
|
255
|
-
endsWith,
|
|
256
|
-
toArray,
|
|
257
|
-
forEachEntry,
|
|
258
|
-
matchAll,
|
|
259
|
-
isHTMLForm,
|
|
260
|
-
hasOwnProperty,
|
|
261
|
-
hasOwnProp: hasOwnProperty,
|
|
262
|
-
reduceDescriptors,
|
|
263
|
-
freezeMethods,
|
|
264
|
-
toObjectSet,
|
|
265
|
-
toCamelCase,
|
|
266
|
-
noop,
|
|
267
|
-
toFiniteNumber,
|
|
268
|
-
findKey,
|
|
269
|
-
global: _global,
|
|
270
|
-
isContextDefined,
|
|
271
|
-
isSpecCompliantForm,
|
|
272
|
-
toJSONObject,
|
|
273
|
-
isAsyncFn,
|
|
274
|
-
isThenable,
|
|
275
|
-
setImmediate: _setImmediate,
|
|
276
|
-
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(_global) : typeof process < "u" && process.nextTick || _setImmediate,
|
|
277
|
-
isIterable: (e) => e != null && isFunction$1(e[iterator])
|
|
278
|
-
}, AxiosError$1 = class e extends Error {
|
|
279
|
-
static from(t, n, r, i, a, o) {
|
|
280
|
-
let s = new e(t.message, n || t.code, r, i, a);
|
|
281
|
-
return s.cause = t, s.name = t.name, o && Object.assign(s, o), s;
|
|
282
|
-
}
|
|
283
|
-
constructor(e, t, n, r, i) {
|
|
284
|
-
super(e), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), n && (this.config = n), r && (this.request = r), i && (this.response = i, this.status = i.status);
|
|
285
|
-
}
|
|
286
|
-
toJSON() {
|
|
287
|
-
return {
|
|
288
|
-
message: this.message,
|
|
289
|
-
name: this.name,
|
|
290
|
-
description: this.description,
|
|
291
|
-
number: this.number,
|
|
292
|
-
fileName: this.fileName,
|
|
293
|
-
lineNumber: this.lineNumber,
|
|
294
|
-
columnNumber: this.columnNumber,
|
|
295
|
-
stack: this.stack,
|
|
296
|
-
config: utils_default.toJSONObject(this.config),
|
|
297
|
-
code: this.code,
|
|
298
|
-
status: this.status
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
AxiosError$1.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", AxiosError$1.ERR_BAD_OPTION = "ERR_BAD_OPTION", AxiosError$1.ECONNABORTED = "ECONNABORTED", AxiosError$1.ETIMEDOUT = "ETIMEDOUT", AxiosError$1.ERR_NETWORK = "ERR_NETWORK", AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", AxiosError$1.ERR_DEPRECATED = "ERR_DEPRECATED", AxiosError$1.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", AxiosError$1.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", AxiosError$1.ERR_CANCELED = "ERR_CANCELED", AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
303
|
-
function isVisitable(e) {
|
|
304
|
-
return utils_default.isPlainObject(e) || utils_default.isArray(e);
|
|
305
|
-
}
|
|
306
|
-
function removeBrackets(e) {
|
|
307
|
-
return utils_default.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
308
|
-
}
|
|
309
|
-
function renderKey(e, t, n) {
|
|
310
|
-
return e ? e.concat(t).map(function(e, t) {
|
|
311
|
-
return e = removeBrackets(e), !n && t ? "[" + e + "]" : e;
|
|
312
|
-
}).join(n ? "." : "") : t;
|
|
313
|
-
}
|
|
314
|
-
function isFlatArray(e) {
|
|
315
|
-
return utils_default.isArray(e) && !e.some(isVisitable);
|
|
316
|
-
}
|
|
317
|
-
var predicates = utils_default.toFlatObject(utils_default, {}, null, function(e) {
|
|
318
|
-
return /^is[A-Z]/.test(e);
|
|
319
|
-
});
|
|
320
|
-
function toFormData$1(e, t, n) {
|
|
321
|
-
if (!utils_default.isObject(e)) throw TypeError("target must be an object");
|
|
322
|
-
t ||= new FormData(), n = utils_default.toFlatObject(n, {
|
|
323
|
-
metaTokens: !0,
|
|
324
|
-
dots: !1,
|
|
325
|
-
indexes: !1
|
|
326
|
-
}, !1, function(e, t) {
|
|
327
|
-
return !utils_default.isUndefined(t[e]);
|
|
328
|
-
});
|
|
329
|
-
let r = n.metaTokens, i = n.visitor || l, a = n.dots, o = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && utils_default.isSpecCompliantForm(t);
|
|
330
|
-
if (!utils_default.isFunction(i)) throw TypeError("visitor must be a function");
|
|
331
|
-
function c(e) {
|
|
332
|
-
if (e === null) return "";
|
|
333
|
-
if (utils_default.isDate(e)) return e.toISOString();
|
|
334
|
-
if (utils_default.isBoolean(e)) return e.toString();
|
|
335
|
-
if (!s && utils_default.isBlob(e)) throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
|
|
336
|
-
return utils_default.isArrayBuffer(e) || utils_default.isTypedArray(e) ? s && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
337
|
-
}
|
|
338
|
-
function l(e, n, i) {
|
|
339
|
-
let s = e;
|
|
340
|
-
if (e && !i && typeof e == "object") {
|
|
341
|
-
if (utils_default.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
342
|
-
else if (utils_default.isArray(e) && isFlatArray(e) || (utils_default.isFileList(e) || utils_default.endsWith(n, "[]")) && (s = utils_default.toArray(e))) return n = removeBrackets(n), s.forEach(function(e, r) {
|
|
343
|
-
!(utils_default.isUndefined(e) || e === null) && t.append(o === !0 ? renderKey([n], r, a) : o === null ? n : n + "[]", c(e));
|
|
344
|
-
}), !1;
|
|
345
|
-
}
|
|
346
|
-
return isVisitable(e) ? !0 : (t.append(renderKey(i, n, a), c(e)), !1);
|
|
347
|
-
}
|
|
348
|
-
let u = [], d = Object.assign(predicates, {
|
|
349
|
-
defaultVisitor: l,
|
|
350
|
-
convertValue: c,
|
|
351
|
-
isVisitable
|
|
352
|
-
});
|
|
353
|
-
function f(e, n) {
|
|
354
|
-
if (!utils_default.isUndefined(e)) {
|
|
355
|
-
if (u.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
356
|
-
u.push(e), utils_default.forEach(e, function(e, r) {
|
|
357
|
-
(!(utils_default.isUndefined(e) || e === null) && i.call(t, e, utils_default.isString(r) ? r.trim() : r, n, d)) === !0 && f(e, n ? n.concat(r) : [r]);
|
|
358
|
-
}), u.pop();
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
if (!utils_default.isObject(e)) throw TypeError("data must be an object");
|
|
362
|
-
return f(e), t;
|
|
363
|
-
}
|
|
364
|
-
function encode$1(e) {
|
|
365
|
-
let t = {
|
|
366
|
-
"!": "%21",
|
|
367
|
-
"'": "%27",
|
|
368
|
-
"(": "%28",
|
|
369
|
-
")": "%29",
|
|
370
|
-
"~": "%7E",
|
|
371
|
-
"%20": "+",
|
|
372
|
-
"%00": "\0"
|
|
373
|
-
};
|
|
374
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(e) {
|
|
375
|
-
return t[e];
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
function AxiosURLSearchParams(e, t) {
|
|
379
|
-
this._pairs = [], e && toFormData$1(e, this, t);
|
|
380
|
-
}
|
|
381
|
-
var prototype = AxiosURLSearchParams.prototype;
|
|
382
|
-
prototype.append = function(e, t) {
|
|
383
|
-
this._pairs.push([e, t]);
|
|
384
|
-
}, prototype.toString = function(e) {
|
|
385
|
-
let t = e ? function(t) {
|
|
386
|
-
return e.call(this, t, encode$1);
|
|
387
|
-
} : encode$1;
|
|
388
|
-
return this._pairs.map(function(e) {
|
|
389
|
-
return t(e[0]) + "=" + t(e[1]);
|
|
390
|
-
}, "").join("&");
|
|
391
|
-
};
|
|
392
|
-
function encode(e) {
|
|
393
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
394
|
-
}
|
|
395
|
-
function buildURL(e, t, n) {
|
|
396
|
-
if (!t) return e;
|
|
397
|
-
let r = n && n.encode || encode, i = utils_default.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
398
|
-
if (o = a ? a(t, i) : utils_default.isURLSearchParams(t) ? t.toString() : new AxiosURLSearchParams(t, i).toString(r), o) {
|
|
399
|
-
let t = e.indexOf("#");
|
|
400
|
-
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
401
|
-
}
|
|
402
|
-
return e;
|
|
403
|
-
}
|
|
404
|
-
var InterceptorManager = class {
|
|
405
|
-
constructor() {
|
|
406
|
-
this.handlers = [];
|
|
407
|
-
}
|
|
408
|
-
use(e, t, n) {
|
|
409
|
-
return this.handlers.push({
|
|
410
|
-
fulfilled: e,
|
|
411
|
-
rejected: t,
|
|
412
|
-
synchronous: n ? n.synchronous : !1,
|
|
413
|
-
runWhen: n ? n.runWhen : null
|
|
414
|
-
}), this.handlers.length - 1;
|
|
415
|
-
}
|
|
416
|
-
eject(e) {
|
|
417
|
-
this.handlers[e] && (this.handlers[e] = null);
|
|
418
|
-
}
|
|
419
|
-
clear() {
|
|
420
|
-
this.handlers &&= [];
|
|
421
|
-
}
|
|
422
|
-
forEach(e) {
|
|
423
|
-
utils_default.forEach(this.handlers, function(t) {
|
|
424
|
-
t !== null && e(t);
|
|
425
|
-
});
|
|
426
|
-
}
|
|
427
|
-
}, transitional_default = {
|
|
428
|
-
silentJSONParsing: !0,
|
|
429
|
-
forcedJSONParsing: !0,
|
|
430
|
-
clarifyTimeoutError: !1,
|
|
431
|
-
legacyInterceptorReqResOrdering: !0
|
|
432
|
-
}, browser_default = {
|
|
433
|
-
isBrowser: !0,
|
|
434
|
-
classes: {
|
|
435
|
-
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : AxiosURLSearchParams,
|
|
436
|
-
FormData: typeof FormData < "u" ? FormData : null,
|
|
437
|
-
Blob: typeof Blob < "u" ? Blob : null
|
|
438
|
-
},
|
|
439
|
-
protocols: [
|
|
440
|
-
"http",
|
|
441
|
-
"https",
|
|
442
|
-
"file",
|
|
443
|
-
"blob",
|
|
444
|
-
"url",
|
|
445
|
-
"data"
|
|
446
|
-
]
|
|
447
|
-
}, utils_exports = /* @__PURE__ */ __exportAll({
|
|
448
|
-
hasBrowserEnv: () => hasBrowserEnv,
|
|
449
|
-
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
|
450
|
-
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv,
|
|
451
|
-
navigator: () => _navigator,
|
|
452
|
-
origin: () => origin
|
|
453
|
-
}), hasBrowserEnv = typeof window < "u" && typeof document < "u", _navigator = typeof navigator == "object" && navigator || void 0, hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || [
|
|
454
|
-
"ReactNative",
|
|
455
|
-
"NativeScript",
|
|
456
|
-
"NS"
|
|
457
|
-
].indexOf(_navigator.product) < 0), hasStandardBrowserWebWorkerEnv = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", origin = hasBrowserEnv && window.location.href || "http://localhost", platform_default = {
|
|
458
|
-
...utils_exports,
|
|
459
|
-
...browser_default
|
|
460
|
-
};
|
|
461
|
-
function toURLEncodedForm(e, t) {
|
|
462
|
-
return toFormData$1(e, new platform_default.classes.URLSearchParams(), {
|
|
463
|
-
visitor: function(e, t, n, r) {
|
|
464
|
-
return platform_default.isNode && utils_default.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
465
|
-
},
|
|
466
|
-
...t
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
function parsePropPath(e) {
|
|
470
|
-
return utils_default.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
471
|
-
}
|
|
472
|
-
function arrayToObject(e) {
|
|
473
|
-
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
474
|
-
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
475
|
-
return t;
|
|
476
|
-
}
|
|
477
|
-
function formDataToJSON(e) {
|
|
478
|
-
function t(e, n, r, i) {
|
|
479
|
-
let a = e[i++];
|
|
480
|
-
if (a === "__proto__") return !0;
|
|
481
|
-
let o = Number.isFinite(+a), s = i >= e.length;
|
|
482
|
-
return a = !a && utils_default.isArray(r) ? r.length : a, s ? (utils_default.hasOwnProp(r, a) ? r[a] = [r[a], n] : r[a] = n, !o) : ((!r[a] || !utils_default.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && utils_default.isArray(r[a]) && (r[a] = arrayToObject(r[a])), !o);
|
|
483
|
-
}
|
|
484
|
-
if (utils_default.isFormData(e) && utils_default.isFunction(e.entries)) {
|
|
485
|
-
let n = {};
|
|
486
|
-
return utils_default.forEachEntry(e, (e, r) => {
|
|
487
|
-
t(parsePropPath(e), r, n, 0);
|
|
488
|
-
}), n;
|
|
489
|
-
}
|
|
490
|
-
return null;
|
|
491
|
-
}
|
|
492
|
-
function stringifySafely(e, t, n) {
|
|
493
|
-
if (utils_default.isString(e)) try {
|
|
494
|
-
return (t || JSON.parse)(e), utils_default.trim(e);
|
|
495
|
-
} catch (e) {
|
|
496
|
-
if (e.name !== "SyntaxError") throw e;
|
|
497
|
-
}
|
|
498
|
-
return (n || JSON.stringify)(e);
|
|
499
|
-
}
|
|
500
|
-
var defaults = {
|
|
501
|
-
transitional: transitional_default,
|
|
502
|
-
adapter: [
|
|
503
|
-
"xhr",
|
|
504
|
-
"http",
|
|
505
|
-
"fetch"
|
|
506
|
-
],
|
|
507
|
-
transformRequest: [function(e, t) {
|
|
508
|
-
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = utils_default.isObject(e);
|
|
509
|
-
if (i && utils_default.isHTMLForm(e) && (e = new FormData(e)), utils_default.isFormData(e)) return r ? JSON.stringify(formDataToJSON(e)) : e;
|
|
510
|
-
if (utils_default.isArrayBuffer(e) || utils_default.isBuffer(e) || utils_default.isStream(e) || utils_default.isFile(e) || utils_default.isBlob(e) || utils_default.isReadableStream(e)) return e;
|
|
511
|
-
if (utils_default.isArrayBufferView(e)) return e.buffer;
|
|
512
|
-
if (utils_default.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
513
|
-
let a;
|
|
514
|
-
if (i) {
|
|
515
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1) return toURLEncodedForm(e, this.formSerializer).toString();
|
|
516
|
-
if ((a = utils_default.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
517
|
-
let t = this.env && this.env.FormData;
|
|
518
|
-
return toFormData$1(a ? { "files[]": e } : e, t && new t(), this.formSerializer);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
return i || r ? (t.setContentType("application/json", !1), stringifySafely(e)) : e;
|
|
522
|
-
}],
|
|
523
|
-
transformResponse: [function(e) {
|
|
524
|
-
let t = this.transitional || defaults.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
525
|
-
if (utils_default.isResponse(e) || utils_default.isReadableStream(e)) return e;
|
|
526
|
-
if (e && utils_default.isString(e) && (n && !this.responseType || r)) {
|
|
527
|
-
let n = !(t && t.silentJSONParsing) && r;
|
|
528
|
-
try {
|
|
529
|
-
return JSON.parse(e, this.parseReviver);
|
|
530
|
-
} catch (e) {
|
|
531
|
-
if (n) throw e.name === "SyntaxError" ? AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response) : e;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
return e;
|
|
535
|
-
}],
|
|
536
|
-
timeout: 0,
|
|
537
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
538
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
539
|
-
maxContentLength: -1,
|
|
540
|
-
maxBodyLength: -1,
|
|
541
|
-
env: {
|
|
542
|
-
FormData: platform_default.classes.FormData,
|
|
543
|
-
Blob: platform_default.classes.Blob
|
|
544
|
-
},
|
|
545
|
-
validateStatus: function(e) {
|
|
546
|
-
return e >= 200 && e < 300;
|
|
547
|
-
},
|
|
548
|
-
headers: { common: {
|
|
549
|
-
Accept: "application/json, text/plain, */*",
|
|
550
|
-
"Content-Type": void 0
|
|
551
|
-
} }
|
|
552
|
-
};
|
|
553
|
-
utils_default.forEach([
|
|
554
|
-
"delete",
|
|
555
|
-
"get",
|
|
556
|
-
"head",
|
|
557
|
-
"post",
|
|
558
|
-
"put",
|
|
559
|
-
"patch"
|
|
560
|
-
], (e) => {
|
|
561
|
-
defaults.headers[e] = {};
|
|
562
|
-
});
|
|
563
|
-
var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
564
|
-
"age",
|
|
565
|
-
"authorization",
|
|
566
|
-
"content-length",
|
|
567
|
-
"content-type",
|
|
568
|
-
"etag",
|
|
569
|
-
"expires",
|
|
570
|
-
"from",
|
|
571
|
-
"host",
|
|
572
|
-
"if-modified-since",
|
|
573
|
-
"if-unmodified-since",
|
|
574
|
-
"last-modified",
|
|
575
|
-
"location",
|
|
576
|
-
"max-forwards",
|
|
577
|
-
"proxy-authorization",
|
|
578
|
-
"referer",
|
|
579
|
-
"retry-after",
|
|
580
|
-
"user-agent"
|
|
581
|
-
]), parseHeaders_default = (e) => {
|
|
582
|
-
let t = {}, n, r, i;
|
|
583
|
-
return e && e.split("\n").forEach(function(e) {
|
|
584
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && ignoreDuplicateOf[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
585
|
-
}), t;
|
|
586
|
-
}, $internals = Symbol("internals");
|
|
587
|
-
function normalizeHeader(e) {
|
|
588
|
-
return e && String(e).trim().toLowerCase();
|
|
589
|
-
}
|
|
590
|
-
function normalizeValue(e) {
|
|
591
|
-
return e === !1 || e == null ? e : utils_default.isArray(e) ? e.map(normalizeValue) : String(e);
|
|
592
|
-
}
|
|
593
|
-
function parseTokens(e) {
|
|
594
|
-
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
595
|
-
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
596
|
-
return t;
|
|
597
|
-
}
|
|
598
|
-
var isValidHeaderName = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
599
|
-
function matchHeaderValue(e, t, n, r, i) {
|
|
600
|
-
if (utils_default.isFunction(r)) return r.call(this, t, n);
|
|
601
|
-
if (i && (t = n), utils_default.isString(t)) {
|
|
602
|
-
if (utils_default.isString(r)) return t.indexOf(r) !== -1;
|
|
603
|
-
if (utils_default.isRegExp(r)) return r.test(t);
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
function formatHeader(e) {
|
|
607
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
608
|
-
}
|
|
609
|
-
function buildAccessors(e, t) {
|
|
610
|
-
let n = utils_default.toCamelCase(" " + t);
|
|
611
|
-
[
|
|
612
|
-
"get",
|
|
613
|
-
"set",
|
|
614
|
-
"has"
|
|
615
|
-
].forEach((r) => {
|
|
616
|
-
Object.defineProperty(e, r + n, {
|
|
617
|
-
value: function(e, n, i) {
|
|
618
|
-
return this[r].call(this, t, e, n, i);
|
|
619
|
-
},
|
|
620
|
-
configurable: !0
|
|
621
|
-
});
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
var AxiosHeaders$1 = class {
|
|
625
|
-
constructor(e) {
|
|
626
|
-
e && this.set(e);
|
|
627
|
-
}
|
|
628
|
-
set(e, t, n) {
|
|
629
|
-
let r = this;
|
|
630
|
-
function i(e, t, n) {
|
|
631
|
-
let i = normalizeHeader(t);
|
|
632
|
-
if (!i) throw Error("header name must be a non-empty string");
|
|
633
|
-
let a = utils_default.findKey(r, i);
|
|
634
|
-
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = normalizeValue(e));
|
|
635
|
-
}
|
|
636
|
-
let a = (e, t) => utils_default.forEach(e, (e, n) => i(e, n, t));
|
|
637
|
-
if (utils_default.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
638
|
-
else if (utils_default.isString(e) && (e = e.trim()) && !isValidHeaderName(e)) a(parseHeaders_default(e), t);
|
|
639
|
-
else if (utils_default.isObject(e) && utils_default.isIterable(e)) {
|
|
640
|
-
let n = {}, r, i;
|
|
641
|
-
for (let t of e) {
|
|
642
|
-
if (!utils_default.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
|
|
643
|
-
n[i = t[0]] = (r = n[i]) ? utils_default.isArray(r) ? [...r, t[1]] : [r, t[1]] : t[1];
|
|
644
|
-
}
|
|
645
|
-
a(n, t);
|
|
646
|
-
} else e != null && i(t, e, n);
|
|
647
|
-
return this;
|
|
648
|
-
}
|
|
649
|
-
get(e, t) {
|
|
650
|
-
if (e = normalizeHeader(e), e) {
|
|
651
|
-
let n = utils_default.findKey(this, e);
|
|
652
|
-
if (n) {
|
|
653
|
-
let e = this[n];
|
|
654
|
-
if (!t) return e;
|
|
655
|
-
if (t === !0) return parseTokens(e);
|
|
656
|
-
if (utils_default.isFunction(t)) return t.call(this, e, n);
|
|
657
|
-
if (utils_default.isRegExp(t)) return t.exec(e);
|
|
658
|
-
throw TypeError("parser must be boolean|regexp|function");
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
has(e, t) {
|
|
663
|
-
if (e = normalizeHeader(e), e) {
|
|
664
|
-
let n = utils_default.findKey(this, e);
|
|
665
|
-
return !!(n && this[n] !== void 0 && (!t || matchHeaderValue(this, this[n], n, t)));
|
|
666
|
-
}
|
|
667
|
-
return !1;
|
|
668
|
-
}
|
|
669
|
-
delete(e, t) {
|
|
670
|
-
let n = this, r = !1;
|
|
671
|
-
function i(e) {
|
|
672
|
-
if (e = normalizeHeader(e), e) {
|
|
673
|
-
let i = utils_default.findKey(n, e);
|
|
674
|
-
i && (!t || matchHeaderValue(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
return utils_default.isArray(e) ? e.forEach(i) : i(e), r;
|
|
678
|
-
}
|
|
679
|
-
clear(e) {
|
|
680
|
-
let t = Object.keys(this), n = t.length, r = !1;
|
|
681
|
-
for (; n--;) {
|
|
682
|
-
let i = t[n];
|
|
683
|
-
(!e || matchHeaderValue(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
684
|
-
}
|
|
685
|
-
return r;
|
|
686
|
-
}
|
|
687
|
-
normalize(e) {
|
|
688
|
-
let t = this, n = {};
|
|
689
|
-
return utils_default.forEach(this, (r, i) => {
|
|
690
|
-
let a = utils_default.findKey(n, i);
|
|
691
|
-
if (a) {
|
|
692
|
-
t[a] = normalizeValue(r), delete t[i];
|
|
693
|
-
return;
|
|
694
|
-
}
|
|
695
|
-
let o = e ? formatHeader(i) : String(i).trim();
|
|
696
|
-
o !== i && delete t[i], t[o] = normalizeValue(r), n[o] = !0;
|
|
697
|
-
}), this;
|
|
698
|
-
}
|
|
699
|
-
concat(...e) {
|
|
700
|
-
return this.constructor.concat(this, ...e);
|
|
701
|
-
}
|
|
702
|
-
toJSON(e) {
|
|
703
|
-
let t = Object.create(null);
|
|
704
|
-
return utils_default.forEach(this, (n, r) => {
|
|
705
|
-
n != null && n !== !1 && (t[r] = e && utils_default.isArray(n) ? n.join(", ") : n);
|
|
706
|
-
}), t;
|
|
707
|
-
}
|
|
708
|
-
[Symbol.iterator]() {
|
|
709
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
710
|
-
}
|
|
711
|
-
toString() {
|
|
712
|
-
return Object.entries(this.toJSON()).map(([e, t]) => e + ": " + t).join("\n");
|
|
713
|
-
}
|
|
714
|
-
getSetCookie() {
|
|
715
|
-
return this.get("set-cookie") || [];
|
|
716
|
-
}
|
|
717
|
-
get [Symbol.toStringTag]() {
|
|
718
|
-
return "AxiosHeaders";
|
|
719
|
-
}
|
|
720
|
-
static from(e) {
|
|
721
|
-
return e instanceof this ? e : new this(e);
|
|
722
|
-
}
|
|
723
|
-
static concat(e, ...t) {
|
|
724
|
-
let n = new this(e);
|
|
725
|
-
return t.forEach((e) => n.set(e)), n;
|
|
726
|
-
}
|
|
727
|
-
static accessor(e) {
|
|
728
|
-
let t = (this[$internals] = this[$internals] = { accessors: {} }).accessors, n = this.prototype;
|
|
729
|
-
function r(e) {
|
|
730
|
-
let r = normalizeHeader(e);
|
|
731
|
-
t[r] || (buildAccessors(n, e), t[r] = !0);
|
|
732
|
-
}
|
|
733
|
-
return utils_default.isArray(e) ? e.forEach(r) : r(e), this;
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
AxiosHeaders$1.accessor([
|
|
737
|
-
"Content-Type",
|
|
738
|
-
"Content-Length",
|
|
739
|
-
"Accept",
|
|
740
|
-
"Accept-Encoding",
|
|
741
|
-
"User-Agent",
|
|
742
|
-
"Authorization"
|
|
743
|
-
]), utils_default.reduceDescriptors(AxiosHeaders$1.prototype, ({ value: e }, t) => {
|
|
744
|
-
let n = t[0].toUpperCase() + t.slice(1);
|
|
745
|
-
return {
|
|
746
|
-
get: () => e,
|
|
747
|
-
set(e) {
|
|
748
|
-
this[n] = e;
|
|
749
|
-
}
|
|
750
|
-
};
|
|
751
|
-
}), utils_default.freezeMethods(AxiosHeaders$1);
|
|
752
|
-
function transformData(e, t) {
|
|
753
|
-
let n = this || defaults, r = t || n, i = AxiosHeaders$1.from(r.headers), a = r.data;
|
|
754
|
-
return utils_default.forEach(e, function(e) {
|
|
755
|
-
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
756
|
-
}), i.normalize(), a;
|
|
757
|
-
}
|
|
758
|
-
function isCancel$1(e) {
|
|
759
|
-
return !!(e && e.__CANCEL__);
|
|
760
|
-
}
|
|
761
|
-
var CanceledError$1 = class extends AxiosError$1 {
|
|
762
|
-
constructor(e, t, n) {
|
|
763
|
-
super(e ?? "canceled", AxiosError$1.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
764
|
-
}
|
|
765
|
-
};
|
|
766
|
-
function settle(e, t, n) {
|
|
767
|
-
let r = n.config.validateStatus;
|
|
768
|
-
!n.status || !r || r(n.status) ? e(n) : t(new AxiosError$1("Request failed with status code " + n.status, [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
769
|
-
}
|
|
770
|
-
function parseProtocol(e) {
|
|
771
|
-
let t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
772
|
-
return t && t[1] || "";
|
|
773
|
-
}
|
|
774
|
-
function speedometer(e, t) {
|
|
775
|
-
e ||= 10;
|
|
776
|
-
let n = Array(e), r = Array(e), i = 0, a = 0, o;
|
|
777
|
-
return t = t === void 0 ? 1e3 : t, function(s) {
|
|
778
|
-
let c = Date.now(), l = r[a];
|
|
779
|
-
o ||= c, n[i] = s, r[i] = c;
|
|
780
|
-
let u = a, d = 0;
|
|
781
|
-
for (; u !== i;) d += n[u++], u %= e;
|
|
782
|
-
if (i = (i + 1) % e, i === a && (a = (a + 1) % e), c - o < t) return;
|
|
783
|
-
let f = l && c - l;
|
|
784
|
-
return f ? Math.round(d * 1e3 / f) : void 0;
|
|
785
|
-
};
|
|
786
|
-
}
|
|
787
|
-
function throttle(e, t) {
|
|
788
|
-
let n = 0, r = 1e3 / t, i, a, o = (t, r = Date.now()) => {
|
|
789
|
-
n = r, i = null, a &&= (clearTimeout(a), null), e(...t);
|
|
790
|
-
};
|
|
791
|
-
return [(...e) => {
|
|
792
|
-
let t = Date.now(), s = t - n;
|
|
793
|
-
s >= r ? o(e, t) : (i = e, a ||= setTimeout(() => {
|
|
794
|
-
a = null, o(i);
|
|
795
|
-
}, r - s));
|
|
796
|
-
}, () => i && o(i)];
|
|
797
|
-
}
|
|
798
|
-
const progressEventReducer = (e, t, n = 3) => {
|
|
799
|
-
let r = 0, i = speedometer(50, 250);
|
|
800
|
-
return throttle((n) => {
|
|
801
|
-
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = a - r, c = i(s), l = a <= o;
|
|
802
|
-
r = a, e({
|
|
803
|
-
loaded: a,
|
|
804
|
-
total: o,
|
|
805
|
-
progress: o ? a / o : void 0,
|
|
806
|
-
bytes: s,
|
|
807
|
-
rate: c || void 0,
|
|
808
|
-
estimated: c && o && l ? (o - a) / c : void 0,
|
|
809
|
-
event: n,
|
|
810
|
-
lengthComputable: o != null,
|
|
811
|
-
[t ? "download" : "upload"]: !0
|
|
812
|
-
});
|
|
813
|
-
}, n);
|
|
814
|
-
}, progressEventDecorator = (e, t) => {
|
|
815
|
-
let n = e != null;
|
|
816
|
-
return [(r) => t[0]({
|
|
817
|
-
lengthComputable: n,
|
|
818
|
-
total: e,
|
|
819
|
-
loaded: r
|
|
820
|
-
}), t[1]];
|
|
821
|
-
}, asyncDecorator = (e) => (...t) => utils_default.asap(() => e(...t));
|
|
822
|
-
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, platform_default.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => !0, cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
823
|
-
write(e, t, n, r, i, a, o) {
|
|
824
|
-
if (typeof document > "u") return;
|
|
825
|
-
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
826
|
-
utils_default.isNumber(n) && s.push(`expires=${new Date(n).toUTCString()}`), utils_default.isString(r) && s.push(`path=${r}`), utils_default.isString(i) && s.push(`domain=${i}`), a === !0 && s.push("secure"), utils_default.isString(o) && s.push(`SameSite=${o}`), document.cookie = s.join("; ");
|
|
827
|
-
},
|
|
828
|
-
read(e) {
|
|
829
|
-
if (typeof document > "u") return null;
|
|
830
|
-
let t = document.cookie.match(RegExp("(?:^|; )" + e + "=([^;]*)"));
|
|
831
|
-
return t ? decodeURIComponent(t[1]) : null;
|
|
832
|
-
},
|
|
833
|
-
remove(e) {
|
|
834
|
-
this.write(e, "", Date.now() - 864e5, "/");
|
|
835
|
-
}
|
|
836
|
-
} : {
|
|
837
|
-
write() {},
|
|
838
|
-
read() {
|
|
839
|
-
return null;
|
|
840
|
-
},
|
|
841
|
-
remove() {}
|
|
842
|
-
};
|
|
843
|
-
function isAbsoluteURL(e) {
|
|
844
|
-
return typeof e == "string" ? /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) : !1;
|
|
845
|
-
}
|
|
846
|
-
function combineURLs(e, t) {
|
|
847
|
-
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
848
|
-
}
|
|
849
|
-
function buildFullPath(e, t, n) {
|
|
850
|
-
let r = !isAbsoluteURL(t);
|
|
851
|
-
return e && (r || n == 0) ? combineURLs(e, t) : t;
|
|
852
|
-
}
|
|
853
|
-
var headersToObject = (e) => e instanceof AxiosHeaders$1 ? { ...e } : e;
|
|
854
|
-
function mergeConfig$1(e, t) {
|
|
855
|
-
t ||= {};
|
|
856
|
-
let n = {};
|
|
857
|
-
function r(e, t, n, r) {
|
|
858
|
-
return utils_default.isPlainObject(e) && utils_default.isPlainObject(t) ? utils_default.merge.call({ caseless: r }, e, t) : utils_default.isPlainObject(t) ? utils_default.merge({}, t) : utils_default.isArray(t) ? t.slice() : t;
|
|
859
|
-
}
|
|
860
|
-
function i(e, t, n, i) {
|
|
861
|
-
if (!utils_default.isUndefined(t)) return r(e, t, n, i);
|
|
862
|
-
if (!utils_default.isUndefined(e)) return r(void 0, e, n, i);
|
|
863
|
-
}
|
|
864
|
-
function a(e, t) {
|
|
865
|
-
if (!utils_default.isUndefined(t)) return r(void 0, t);
|
|
866
|
-
}
|
|
867
|
-
function o(e, t) {
|
|
868
|
-
if (!utils_default.isUndefined(t)) return r(void 0, t);
|
|
869
|
-
if (!utils_default.isUndefined(e)) return r(void 0, e);
|
|
870
|
-
}
|
|
871
|
-
function s(n, i, a) {
|
|
872
|
-
if (a in t) return r(n, i);
|
|
873
|
-
if (a in e) return r(void 0, n);
|
|
874
|
-
}
|
|
875
|
-
let c = {
|
|
876
|
-
url: a,
|
|
877
|
-
method: a,
|
|
878
|
-
data: a,
|
|
879
|
-
baseURL: o,
|
|
880
|
-
transformRequest: o,
|
|
881
|
-
transformResponse: o,
|
|
882
|
-
paramsSerializer: o,
|
|
883
|
-
timeout: o,
|
|
884
|
-
timeoutMessage: o,
|
|
885
|
-
withCredentials: o,
|
|
886
|
-
withXSRFToken: o,
|
|
887
|
-
adapter: o,
|
|
888
|
-
responseType: o,
|
|
889
|
-
xsrfCookieName: o,
|
|
890
|
-
xsrfHeaderName: o,
|
|
891
|
-
onUploadProgress: o,
|
|
892
|
-
onDownloadProgress: o,
|
|
893
|
-
decompress: o,
|
|
894
|
-
maxContentLength: o,
|
|
895
|
-
maxBodyLength: o,
|
|
896
|
-
beforeRedirect: o,
|
|
897
|
-
transport: o,
|
|
898
|
-
httpAgent: o,
|
|
899
|
-
httpsAgent: o,
|
|
900
|
-
cancelToken: o,
|
|
901
|
-
socketPath: o,
|
|
902
|
-
responseEncoding: o,
|
|
903
|
-
validateStatus: s,
|
|
904
|
-
headers: (e, t, n) => i(headersToObject(e), headersToObject(t), n, !0)
|
|
905
|
-
};
|
|
906
|
-
return utils_default.forEach(Object.keys({
|
|
907
|
-
...e,
|
|
908
|
-
...t
|
|
909
|
-
}), function(r) {
|
|
910
|
-
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
911
|
-
let a = utils_default.hasOwnProp(c, r) ? c[r] : i, o = a(e[r], t[r], r);
|
|
912
|
-
utils_default.isUndefined(o) && a !== s || (n[r] = o);
|
|
913
|
-
}), n;
|
|
914
|
-
}
|
|
915
|
-
var resolveConfig_default = (e) => {
|
|
916
|
-
let t = mergeConfig$1({}, e), { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: a, headers: o, auth: s } = t;
|
|
917
|
-
if (t.headers = o = AxiosHeaders$1.from(o), t.url = buildURL(buildFullPath(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), s && o.set("Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))), utils_default.isFormData(n)) {
|
|
918
|
-
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) o.setContentType(void 0);
|
|
919
|
-
else if (utils_default.isFunction(n.getHeaders)) {
|
|
920
|
-
let e = n.getHeaders(), t = ["content-type", "content-length"];
|
|
921
|
-
Object.entries(e).forEach(([e, n]) => {
|
|
922
|
-
t.includes(e.toLowerCase()) && o.set(e, n);
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
if (platform_default.hasStandardBrowserEnv && (r && utils_default.isFunction(r) && (r = r(t)), r || r !== !1 && isURLSameOrigin_default(t.url))) {
|
|
927
|
-
let e = i && a && cookies_default.read(a);
|
|
928
|
-
e && o.set(i, e);
|
|
929
|
-
}
|
|
930
|
-
return t;
|
|
931
|
-
}, xhr_default = typeof XMLHttpRequest < "u" && function(e) {
|
|
932
|
-
return new Promise(function(t, n) {
|
|
933
|
-
let r = resolveConfig_default(e), i = r.data, a = AxiosHeaders$1.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
934
|
-
function m() {
|
|
935
|
-
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
936
|
-
}
|
|
937
|
-
let h = new XMLHttpRequest();
|
|
938
|
-
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
939
|
-
function g() {
|
|
940
|
-
if (!h) return;
|
|
941
|
-
let r = AxiosHeaders$1.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
942
|
-
settle(function(e) {
|
|
943
|
-
t(e), m();
|
|
944
|
-
}, function(e) {
|
|
945
|
-
n(e), m();
|
|
946
|
-
}, {
|
|
947
|
-
data: !o || o === "text" || o === "json" ? h.responseText : h.response,
|
|
948
|
-
status: h.status,
|
|
949
|
-
statusText: h.statusText,
|
|
950
|
-
headers: r,
|
|
951
|
-
config: e,
|
|
952
|
-
request: h
|
|
953
|
-
}), h = null;
|
|
954
|
-
}
|
|
955
|
-
"onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
|
|
956
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
957
|
-
}, h.onabort = function() {
|
|
958
|
-
h &&= (n(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, e, h)), null);
|
|
959
|
-
}, h.onerror = function(t) {
|
|
960
|
-
let r = new AxiosError$1(t && t.message ? t.message : "Network Error", AxiosError$1.ERR_NETWORK, e, h);
|
|
961
|
-
r.event = t || null, n(r), h = null;
|
|
962
|
-
}, h.ontimeout = function() {
|
|
963
|
-
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || transitional_default;
|
|
964
|
-
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new AxiosError$1(t, i.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, e, h)), h = null;
|
|
965
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && utils_default.forEach(a.toJSON(), function(e, t) {
|
|
966
|
-
h.setRequestHeader(t, e);
|
|
967
|
-
}), utils_default.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = progressEventReducer(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = progressEventReducer(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
968
|
-
h &&= (n(!t || t.type ? new CanceledError$1(null, e, h) : t), h.abort(), null);
|
|
969
|
-
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
970
|
-
let _ = parseProtocol(r.url);
|
|
971
|
-
if (_ && platform_default.protocols.indexOf(_) === -1) {
|
|
972
|
-
n(new AxiosError$1("Unsupported protocol " + _ + ":", AxiosError$1.ERR_BAD_REQUEST, e));
|
|
973
|
-
return;
|
|
974
|
-
}
|
|
975
|
-
h.send(i || null);
|
|
976
|
-
});
|
|
977
|
-
}, composeSignals = (e, t) => {
|
|
978
|
-
let { length: n } = e = e ? e.filter(Boolean) : [];
|
|
979
|
-
if (t || n) {
|
|
980
|
-
let n = new AbortController(), r, i = function(e) {
|
|
981
|
-
if (!r) {
|
|
982
|
-
r = !0, o();
|
|
983
|
-
let t = e instanceof Error ? e : this.reason;
|
|
984
|
-
n.abort(t instanceof AxiosError$1 ? t : new CanceledError$1(t instanceof Error ? t.message : t));
|
|
985
|
-
}
|
|
986
|
-
}, a = t && setTimeout(() => {
|
|
987
|
-
a = null, i(new AxiosError$1(`timeout of ${t}ms exceeded`, AxiosError$1.ETIMEDOUT));
|
|
988
|
-
}, t), o = () => {
|
|
989
|
-
e &&= (a && clearTimeout(a), a = null, e.forEach((e) => {
|
|
990
|
-
e.unsubscribe ? e.unsubscribe(i) : e.removeEventListener("abort", i);
|
|
991
|
-
}), null);
|
|
992
|
-
};
|
|
993
|
-
e.forEach((e) => e.addEventListener("abort", i));
|
|
994
|
-
let { signal: s } = n;
|
|
995
|
-
return s.unsubscribe = () => utils_default.asap(o), s;
|
|
996
|
-
}
|
|
997
|
-
};
|
|
998
|
-
const streamChunk = function* (e, t) {
|
|
999
|
-
let n = e.byteLength;
|
|
1000
|
-
if (!t || n < t) {
|
|
1001
|
-
yield e;
|
|
1002
|
-
return;
|
|
1003
|
-
}
|
|
1004
|
-
let r = 0, i;
|
|
1005
|
-
for (; r < n;) i = r + t, yield e.slice(r, i), r = i;
|
|
1006
|
-
}, readBytes = async function* (e, t) {
|
|
1007
|
-
for await (let n of readStream(e)) yield* streamChunk(n, t);
|
|
1008
|
-
};
|
|
1009
|
-
var readStream = async function* (e) {
|
|
1010
|
-
if (e[Symbol.asyncIterator]) {
|
|
1011
|
-
yield* e;
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
let t = e.getReader();
|
|
1015
|
-
try {
|
|
1016
|
-
for (;;) {
|
|
1017
|
-
let { done: e, value: n } = await t.read();
|
|
1018
|
-
if (e) break;
|
|
1019
|
-
yield n;
|
|
1020
|
-
}
|
|
1021
|
-
} finally {
|
|
1022
|
-
await t.cancel();
|
|
1023
|
-
}
|
|
1024
|
-
};
|
|
1025
|
-
const trackStream = (e, t, n, r) => {
|
|
1026
|
-
let i = readBytes(e, t), a = 0, o, s = (e) => {
|
|
1027
|
-
o || (o = !0, r && r(e));
|
|
1028
|
-
};
|
|
1029
|
-
return new ReadableStream({
|
|
1030
|
-
async pull(e) {
|
|
1031
|
-
try {
|
|
1032
|
-
let { done: t, value: r } = await i.next();
|
|
1033
|
-
if (t) {
|
|
1034
|
-
s(), e.close();
|
|
1035
|
-
return;
|
|
1036
|
-
}
|
|
1037
|
-
let o = r.byteLength;
|
|
1038
|
-
n && n(a += o), e.enqueue(new Uint8Array(r));
|
|
1039
|
-
} catch (e) {
|
|
1040
|
-
throw s(e), e;
|
|
1041
|
-
}
|
|
1042
|
-
},
|
|
1043
|
-
cancel(e) {
|
|
1044
|
-
return s(e), i.return();
|
|
1045
|
-
}
|
|
1046
|
-
}, { highWaterMark: 2 });
|
|
1047
|
-
};
|
|
1048
|
-
var DEFAULT_CHUNK_SIZE = 64 * 1024, { isFunction } = utils_default, globalFetchAPI = (({ Request: e, Response: t }) => ({
|
|
1049
|
-
Request: e,
|
|
1050
|
-
Response: t
|
|
1051
|
-
}))(utils_default.global), { ReadableStream: ReadableStream$1, TextEncoder } = utils_default.global, test = (e, ...t) => {
|
|
1052
|
-
try {
|
|
1053
|
-
return !!e(...t);
|
|
1054
|
-
} catch {
|
|
1055
|
-
return !1;
|
|
1056
|
-
}
|
|
1057
|
-
}, factory = (e) => {
|
|
1058
|
-
e = utils_default.merge.call({ skipUndefined: !0 }, globalFetchAPI, e);
|
|
1059
|
-
let { fetch: t, Request: n, Response: r } = e, i = t ? isFunction(t) : typeof fetch == "function", a = isFunction(n), o = isFunction(r);
|
|
1060
|
-
if (!i) return !1;
|
|
1061
|
-
let s = i && isFunction(ReadableStream$1), c = i && (typeof TextEncoder == "function" ? ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new n(e).arrayBuffer())), l = a && s && test(() => {
|
|
1062
|
-
let e = !1, t = new n(platform_default.origin, {
|
|
1063
|
-
body: new ReadableStream$1(),
|
|
1064
|
-
method: "POST",
|
|
1065
|
-
get duplex() {
|
|
1066
|
-
return e = !0, "half";
|
|
1067
|
-
}
|
|
1068
|
-
}).headers.has("Content-Type");
|
|
1069
|
-
return e && !t;
|
|
1070
|
-
}), u = o && s && test(() => utils_default.isReadableStream(new r("").body)), d = { stream: u && ((e) => e.body) };
|
|
1071
|
-
i && [
|
|
1072
|
-
"text",
|
|
1073
|
-
"arrayBuffer",
|
|
1074
|
-
"blob",
|
|
1075
|
-
"formData",
|
|
1076
|
-
"stream"
|
|
1077
|
-
].forEach((e) => {
|
|
1078
|
-
!d[e] && (d[e] = (t, n) => {
|
|
1079
|
-
let r = t && t[e];
|
|
1080
|
-
if (r) return r.call(t);
|
|
1081
|
-
throw new AxiosError$1(`Response type '${e}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, n);
|
|
1082
|
-
});
|
|
1083
|
-
});
|
|
1084
|
-
let f = async (e) => {
|
|
1085
|
-
if (e == null) return 0;
|
|
1086
|
-
if (utils_default.isBlob(e)) return e.size;
|
|
1087
|
-
if (utils_default.isSpecCompliantForm(e)) return (await new n(platform_default.origin, {
|
|
1088
|
-
method: "POST",
|
|
1089
|
-
body: e
|
|
1090
|
-
}).arrayBuffer()).byteLength;
|
|
1091
|
-
if (utils_default.isArrayBufferView(e) || utils_default.isArrayBuffer(e)) return e.byteLength;
|
|
1092
|
-
if (utils_default.isURLSearchParams(e) && (e += ""), utils_default.isString(e)) return (await c(e)).byteLength;
|
|
1093
|
-
}, p = async (e, t) => utils_default.toFiniteNumber(e.getContentLength()) ?? f(t);
|
|
1094
|
-
return async (e) => {
|
|
1095
|
-
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } = resolveConfig_default(e), x = t || fetch;
|
|
1096
|
-
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
1097
|
-
let S = composeSignals([c, f && f.toAbortSignal()], m), C = null, w = S && S.unsubscribe && (() => {
|
|
1098
|
-
S.unsubscribe();
|
|
1099
|
-
}), T;
|
|
1100
|
-
try {
|
|
1101
|
-
if (g && l && o !== "get" && o !== "head" && (T = await p(v, s)) !== 0) {
|
|
1102
|
-
let e = new n(i, {
|
|
1103
|
-
method: "POST",
|
|
1104
|
-
body: s,
|
|
1105
|
-
duplex: "half"
|
|
1106
|
-
}), t;
|
|
1107
|
-
if (utils_default.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1108
|
-
let [t, n] = progressEventDecorator(T, progressEventReducer(asyncDecorator(g)));
|
|
1109
|
-
s = trackStream(e.body, DEFAULT_CHUNK_SIZE, t, n);
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
utils_default.isString(y) || (y = y ? "include" : "omit");
|
|
1113
|
-
let t = a && "credentials" in n.prototype, c = {
|
|
1114
|
-
...b,
|
|
1115
|
-
signal: S,
|
|
1116
|
-
method: o.toUpperCase(),
|
|
1117
|
-
headers: v.normalize().toJSON(),
|
|
1118
|
-
body: s,
|
|
1119
|
-
duplex: "half",
|
|
1120
|
-
credentials: t ? y : void 0
|
|
1121
|
-
};
|
|
1122
|
-
C = a && new n(i, c);
|
|
1123
|
-
let f = await (a ? x(C, b) : x(i, c)), m = u && (_ === "stream" || _ === "response");
|
|
1124
|
-
if (u && (h || m && w)) {
|
|
1125
|
-
let e = {};
|
|
1126
|
-
[
|
|
1127
|
-
"status",
|
|
1128
|
-
"statusText",
|
|
1129
|
-
"headers"
|
|
1130
|
-
].forEach((t) => {
|
|
1131
|
-
e[t] = f[t];
|
|
1132
|
-
});
|
|
1133
|
-
let t = utils_default.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && progressEventDecorator(t, progressEventReducer(asyncDecorator(h), !0)) || [];
|
|
1134
|
-
f = new r(trackStream(f.body, DEFAULT_CHUNK_SIZE, n, () => {
|
|
1135
|
-
i && i(), w && w();
|
|
1136
|
-
}), e);
|
|
1137
|
-
}
|
|
1138
|
-
_ ||= "text";
|
|
1139
|
-
let E = await d[utils_default.findKey(d, _) || "text"](f, e);
|
|
1140
|
-
return !m && w && w(), await new Promise((t, n) => {
|
|
1141
|
-
settle(t, n, {
|
|
1142
|
-
data: E,
|
|
1143
|
-
headers: AxiosHeaders$1.from(f.headers),
|
|
1144
|
-
status: f.status,
|
|
1145
|
-
statusText: f.statusText,
|
|
1146
|
-
config: e,
|
|
1147
|
-
request: C
|
|
1148
|
-
});
|
|
1149
|
-
});
|
|
1150
|
-
} catch (t) {
|
|
1151
|
-
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, e, C, t && t.response), { cause: t.cause || t }) : AxiosError$1.from(t, t && t.code, e, C, t && t.response);
|
|
1152
|
-
}
|
|
1153
|
-
};
|
|
1154
|
-
}, seedCache = /* @__PURE__ */ new Map();
|
|
1155
|
-
const getFetch = (e) => {
|
|
1156
|
-
let t = e && e.env || {}, { fetch: n, Request: r, Response: i } = t, a = [
|
|
1157
|
-
r,
|
|
1158
|
-
i,
|
|
1159
|
-
n
|
|
1160
|
-
], o = a.length, s, c, l = seedCache;
|
|
1161
|
-
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() : factory(t)), l = c;
|
|
1162
|
-
return c;
|
|
1163
|
-
};
|
|
1164
|
-
getFetch();
|
|
1165
|
-
var knownAdapters = {
|
|
1166
|
-
http: null,
|
|
1167
|
-
xhr: xhr_default,
|
|
1168
|
-
fetch: { get: getFetch }
|
|
1169
|
-
};
|
|
1170
|
-
utils_default.forEach(knownAdapters, (e, t) => {
|
|
1171
|
-
if (e) {
|
|
1172
|
-
try {
|
|
1173
|
-
Object.defineProperty(e, "name", { value: t });
|
|
1174
|
-
} catch {}
|
|
1175
|
-
Object.defineProperty(e, "adapterName", { value: t });
|
|
1176
|
-
}
|
|
1177
|
-
});
|
|
1178
|
-
var renderReason = (e) => `- ${e}`, isResolvedHandle = (e) => utils_default.isFunction(e) || e === null || e === !1;
|
|
1179
|
-
function getAdapter$1(e, t) {
|
|
1180
|
-
e = utils_default.isArray(e) ? e : [e];
|
|
1181
|
-
let { length: n } = e, r, i, a = {};
|
|
1182
|
-
for (let o = 0; o < n; o++) {
|
|
1183
|
-
r = e[o];
|
|
1184
|
-
let n;
|
|
1185
|
-
if (i = r, !isResolvedHandle(r) && (i = knownAdapters[(n = String(r)).toLowerCase()], i === void 0)) throw new AxiosError$1(`Unknown adapter '${n}'`);
|
|
1186
|
-
if (i && (utils_default.isFunction(i) || (i = i.get(t)))) break;
|
|
1187
|
-
a[n || "#" + o] = i;
|
|
1188
|
-
}
|
|
1189
|
-
if (!i) {
|
|
1190
|
-
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1191
|
-
throw new AxiosError$1("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(renderReason).join("\n") : " " + renderReason(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1192
|
-
}
|
|
1193
|
-
return i;
|
|
1194
|
-
}
|
|
1195
|
-
var adapters_default = {
|
|
1196
|
-
getAdapter: getAdapter$1,
|
|
1197
|
-
adapters: knownAdapters
|
|
1198
|
-
};
|
|
1199
|
-
function throwIfCancellationRequested(e) {
|
|
1200
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new CanceledError$1(null, e);
|
|
1201
|
-
}
|
|
1202
|
-
function dispatchRequest(e) {
|
|
1203
|
-
return throwIfCancellationRequested(e), e.headers = AxiosHeaders$1.from(e.headers), e.data = transformData.call(e, e.transformRequest), [
|
|
1204
|
-
"post",
|
|
1205
|
-
"put",
|
|
1206
|
-
"patch"
|
|
1207
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), adapters_default.getAdapter(e.adapter || defaults.adapter, e)(e).then(function(t) {
|
|
1208
|
-
return throwIfCancellationRequested(e), t.data = transformData.call(e, e.transformResponse, t), t.headers = AxiosHeaders$1.from(t.headers), t;
|
|
1209
|
-
}, function(t) {
|
|
1210
|
-
return isCancel$1(t) || (throwIfCancellationRequested(e), t && t.response && (t.response.data = transformData.call(e, e.transformResponse, t.response), t.response.headers = AxiosHeaders$1.from(t.response.headers))), Promise.reject(t);
|
|
1211
|
-
});
|
|
1212
|
-
}
|
|
1213
|
-
const VERSION$1 = "1.13.5";
|
|
1214
|
-
var validators$1 = {};
|
|
1215
|
-
[
|
|
1216
|
-
"object",
|
|
1217
|
-
"boolean",
|
|
1218
|
-
"number",
|
|
1219
|
-
"function",
|
|
1220
|
-
"string",
|
|
1221
|
-
"symbol"
|
|
1222
|
-
].forEach((e, t) => {
|
|
1223
|
-
validators$1[e] = function(n) {
|
|
1224
|
-
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1225
|
-
};
|
|
1226
|
-
});
|
|
1227
|
-
var deprecatedWarnings = {};
|
|
1228
|
-
validators$1.transitional = function(e, t, n) {
|
|
1229
|
-
function r(e, t) {
|
|
1230
|
-
return "[Axios v" + VERSION$1 + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1231
|
-
}
|
|
1232
|
-
return (n, i, a) => {
|
|
1233
|
-
if (e === !1) throw new AxiosError$1(r(i, " has been removed" + (t ? " in " + t : "")), AxiosError$1.ERR_DEPRECATED);
|
|
1234
|
-
return t && !deprecatedWarnings[i] && (deprecatedWarnings[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1235
|
-
};
|
|
1236
|
-
}, validators$1.spelling = function(e) {
|
|
1237
|
-
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1238
|
-
};
|
|
1239
|
-
function assertOptions(e, t, n) {
|
|
1240
|
-
if (typeof e != "object") throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
1241
|
-
let r = Object.keys(e), i = r.length;
|
|
1242
|
-
for (; i-- > 0;) {
|
|
1243
|
-
let a = r[i], o = t[a];
|
|
1244
|
-
if (o) {
|
|
1245
|
-
let t = e[a], n = t === void 0 || o(t, a, e);
|
|
1246
|
-
if (n !== !0) throw new AxiosError$1("option " + a + " must be " + n, AxiosError$1.ERR_BAD_OPTION_VALUE);
|
|
1247
|
-
continue;
|
|
1248
|
-
}
|
|
1249
|
-
if (n !== !0) throw new AxiosError$1("Unknown option " + a, AxiosError$1.ERR_BAD_OPTION);
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
var validator_default = {
|
|
1253
|
-
assertOptions,
|
|
1254
|
-
validators: validators$1
|
|
1255
|
-
}, validators = validator_default.validators, Axios$1 = class {
|
|
1256
|
-
constructor(e) {
|
|
1257
|
-
this.defaults = e || {}, this.interceptors = {
|
|
1258
|
-
request: new InterceptorManager(),
|
|
1259
|
-
response: new InterceptorManager()
|
|
1260
|
-
};
|
|
1261
|
-
}
|
|
1262
|
-
async request(e, t) {
|
|
1263
|
-
try {
|
|
1264
|
-
return await this._request(e, t);
|
|
1265
|
-
} catch (e) {
|
|
1266
|
-
if (e instanceof Error) {
|
|
1267
|
-
let t = {};
|
|
1268
|
-
Error.captureStackTrace ? Error.captureStackTrace(t) : t = /* @__PURE__ */ Error();
|
|
1269
|
-
let n = t.stack ? t.stack.replace(/^.+\n/, "") : "";
|
|
1270
|
-
try {
|
|
1271
|
-
e.stack ? n && !String(e.stack).endsWith(n.replace(/^.+\n.+\n/, "")) && (e.stack += "\n" + n) : e.stack = n;
|
|
1272
|
-
} catch {}
|
|
1273
|
-
}
|
|
1274
|
-
throw e;
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
_request(e, t) {
|
|
1278
|
-
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t = mergeConfig$1(this.defaults, t);
|
|
1279
|
-
let { transitional: n, paramsSerializer: r, headers: i } = t;
|
|
1280
|
-
n !== void 0 && validator_default.assertOptions(n, {
|
|
1281
|
-
silentJSONParsing: validators.transitional(validators.boolean),
|
|
1282
|
-
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
1283
|
-
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
1284
|
-
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
1285
|
-
}, !1), r != null && (utils_default.isFunction(r) ? t.paramsSerializer = { serialize: r } : validator_default.assertOptions(r, {
|
|
1286
|
-
encode: validators.function,
|
|
1287
|
-
serialize: validators.function
|
|
1288
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), validator_default.assertOptions(t, {
|
|
1289
|
-
baseUrl: validators.spelling("baseURL"),
|
|
1290
|
-
withXsrfToken: validators.spelling("withXSRFToken")
|
|
1291
|
-
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1292
|
-
let a = i && utils_default.merge(i.common, i[t.method]);
|
|
1293
|
-
i && utils_default.forEach([
|
|
1294
|
-
"delete",
|
|
1295
|
-
"get",
|
|
1296
|
-
"head",
|
|
1297
|
-
"post",
|
|
1298
|
-
"put",
|
|
1299
|
-
"patch",
|
|
1300
|
-
"common"
|
|
1301
|
-
], (e) => {
|
|
1302
|
-
delete i[e];
|
|
1303
|
-
}), t.headers = AxiosHeaders$1.concat(a, i);
|
|
1304
|
-
let o = [], s = !0;
|
|
1305
|
-
this.interceptors.request.forEach(function(e) {
|
|
1306
|
-
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1307
|
-
s &&= e.synchronous;
|
|
1308
|
-
let n = t.transitional || transitional_default;
|
|
1309
|
-
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1310
|
-
});
|
|
1311
|
-
let c = [];
|
|
1312
|
-
this.interceptors.response.forEach(function(e) {
|
|
1313
|
-
c.push(e.fulfilled, e.rejected);
|
|
1314
|
-
});
|
|
1315
|
-
let l, u = 0, d;
|
|
1316
|
-
if (!s) {
|
|
1317
|
-
let e = [dispatchRequest.bind(this), void 0];
|
|
1318
|
-
for (e.unshift(...o), e.push(...c), d = e.length, l = Promise.resolve(t); u < d;) l = l.then(e[u++], e[u++]);
|
|
1319
|
-
return l;
|
|
1320
|
-
}
|
|
1321
|
-
d = o.length;
|
|
1322
|
-
let f = t;
|
|
1323
|
-
for (; u < d;) {
|
|
1324
|
-
let e = o[u++], t = o[u++];
|
|
1325
|
-
try {
|
|
1326
|
-
f = e(f);
|
|
1327
|
-
} catch (e) {
|
|
1328
|
-
t.call(this, e);
|
|
1329
|
-
break;
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
try {
|
|
1333
|
-
l = dispatchRequest.call(this, f);
|
|
1334
|
-
} catch (e) {
|
|
1335
|
-
return Promise.reject(e);
|
|
1336
|
-
}
|
|
1337
|
-
for (u = 0, d = c.length; u < d;) l = l.then(c[u++], c[u++]);
|
|
1338
|
-
return l;
|
|
1339
|
-
}
|
|
1340
|
-
getUri(e) {
|
|
1341
|
-
return e = mergeConfig$1(this.defaults, e), buildURL(buildFullPath(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1342
|
-
}
|
|
1343
|
-
};
|
|
1344
|
-
utils_default.forEach([
|
|
1345
|
-
"delete",
|
|
1346
|
-
"get",
|
|
1347
|
-
"head",
|
|
1348
|
-
"options"
|
|
1349
|
-
], function(e) {
|
|
1350
|
-
Axios$1.prototype[e] = function(t, n) {
|
|
1351
|
-
return this.request(mergeConfig$1(n || {}, {
|
|
1352
|
-
method: e,
|
|
1353
|
-
url: t,
|
|
1354
|
-
data: (n || {}).data
|
|
1355
|
-
}));
|
|
1356
|
-
};
|
|
1357
|
-
}), utils_default.forEach([
|
|
1358
|
-
"post",
|
|
1359
|
-
"put",
|
|
1360
|
-
"patch"
|
|
1361
|
-
], function(e) {
|
|
1362
|
-
function t(t) {
|
|
1363
|
-
return function(n, r, i) {
|
|
1364
|
-
return this.request(mergeConfig$1(i || {}, {
|
|
1365
|
-
method: e,
|
|
1366
|
-
headers: t ? { "Content-Type": "multipart/form-data" } : {},
|
|
1367
|
-
url: n,
|
|
1368
|
-
data: r
|
|
1369
|
-
}));
|
|
1370
|
-
};
|
|
1371
|
-
}
|
|
1372
|
-
Axios$1.prototype[e] = t(), Axios$1.prototype[e + "Form"] = t(!0);
|
|
1373
|
-
});
|
|
1374
|
-
var CancelToken$1 = class e {
|
|
1375
|
-
constructor(e) {
|
|
1376
|
-
if (typeof e != "function") throw TypeError("executor must be a function.");
|
|
1377
|
-
let t;
|
|
1378
|
-
this.promise = new Promise(function(e) {
|
|
1379
|
-
t = e;
|
|
1380
|
-
});
|
|
1381
|
-
let n = this;
|
|
1382
|
-
this.promise.then((e) => {
|
|
1383
|
-
if (!n._listeners) return;
|
|
1384
|
-
let t = n._listeners.length;
|
|
1385
|
-
for (; t-- > 0;) n._listeners[t](e);
|
|
1386
|
-
n._listeners = null;
|
|
1387
|
-
}), this.promise.then = (e) => {
|
|
1388
|
-
let t, r = new Promise((e) => {
|
|
1389
|
-
n.subscribe(e), t = e;
|
|
1390
|
-
}).then(e);
|
|
1391
|
-
return r.cancel = function() {
|
|
1392
|
-
n.unsubscribe(t);
|
|
1393
|
-
}, r;
|
|
1394
|
-
}, e(function(e, r, i) {
|
|
1395
|
-
n.reason || (n.reason = new CanceledError$1(e, r, i), t(n.reason));
|
|
1396
|
-
});
|
|
1397
|
-
}
|
|
1398
|
-
throwIfRequested() {
|
|
1399
|
-
if (this.reason) throw this.reason;
|
|
1400
|
-
}
|
|
1401
|
-
subscribe(e) {
|
|
1402
|
-
if (this.reason) {
|
|
1403
|
-
e(this.reason);
|
|
1404
|
-
return;
|
|
1405
|
-
}
|
|
1406
|
-
this._listeners ? this._listeners.push(e) : this._listeners = [e];
|
|
1407
|
-
}
|
|
1408
|
-
unsubscribe(e) {
|
|
1409
|
-
if (!this._listeners) return;
|
|
1410
|
-
let t = this._listeners.indexOf(e);
|
|
1411
|
-
t !== -1 && this._listeners.splice(t, 1);
|
|
1412
|
-
}
|
|
1413
|
-
toAbortSignal() {
|
|
1414
|
-
let e = new AbortController(), t = (t) => {
|
|
1415
|
-
e.abort(t);
|
|
1416
|
-
};
|
|
1417
|
-
return this.subscribe(t), e.signal.unsubscribe = () => this.unsubscribe(t), e.signal;
|
|
1418
|
-
}
|
|
1419
|
-
static source() {
|
|
1420
|
-
let t;
|
|
1421
|
-
return {
|
|
1422
|
-
token: new e(function(e) {
|
|
1423
|
-
t = e;
|
|
1424
|
-
}),
|
|
1425
|
-
cancel: t
|
|
1426
|
-
};
|
|
1427
|
-
}
|
|
1428
|
-
};
|
|
1429
|
-
function spread$1(e) {
|
|
1430
|
-
return function(t) {
|
|
1431
|
-
return e.apply(null, t);
|
|
1432
|
-
};
|
|
1433
|
-
}
|
|
1434
|
-
function isAxiosError$1(e) {
|
|
1435
|
-
return utils_default.isObject(e) && e.isAxiosError === !0;
|
|
1436
|
-
}
|
|
1437
|
-
var HttpStatusCode$1 = {
|
|
1438
|
-
Continue: 100,
|
|
1439
|
-
SwitchingProtocols: 101,
|
|
1440
|
-
Processing: 102,
|
|
1441
|
-
EarlyHints: 103,
|
|
1442
|
-
Ok: 200,
|
|
1443
|
-
Created: 201,
|
|
1444
|
-
Accepted: 202,
|
|
1445
|
-
NonAuthoritativeInformation: 203,
|
|
1446
|
-
NoContent: 204,
|
|
1447
|
-
ResetContent: 205,
|
|
1448
|
-
PartialContent: 206,
|
|
1449
|
-
MultiStatus: 207,
|
|
1450
|
-
AlreadyReported: 208,
|
|
1451
|
-
ImUsed: 226,
|
|
1452
|
-
MultipleChoices: 300,
|
|
1453
|
-
MovedPermanently: 301,
|
|
1454
|
-
Found: 302,
|
|
1455
|
-
SeeOther: 303,
|
|
1456
|
-
NotModified: 304,
|
|
1457
|
-
UseProxy: 305,
|
|
1458
|
-
Unused: 306,
|
|
1459
|
-
TemporaryRedirect: 307,
|
|
1460
|
-
PermanentRedirect: 308,
|
|
1461
|
-
BadRequest: 400,
|
|
1462
|
-
Unauthorized: 401,
|
|
1463
|
-
PaymentRequired: 402,
|
|
1464
|
-
Forbidden: 403,
|
|
1465
|
-
NotFound: 404,
|
|
1466
|
-
MethodNotAllowed: 405,
|
|
1467
|
-
NotAcceptable: 406,
|
|
1468
|
-
ProxyAuthenticationRequired: 407,
|
|
1469
|
-
RequestTimeout: 408,
|
|
1470
|
-
Conflict: 409,
|
|
1471
|
-
Gone: 410,
|
|
1472
|
-
LengthRequired: 411,
|
|
1473
|
-
PreconditionFailed: 412,
|
|
1474
|
-
PayloadTooLarge: 413,
|
|
1475
|
-
UriTooLong: 414,
|
|
1476
|
-
UnsupportedMediaType: 415,
|
|
1477
|
-
RangeNotSatisfiable: 416,
|
|
1478
|
-
ExpectationFailed: 417,
|
|
1479
|
-
ImATeapot: 418,
|
|
1480
|
-
MisdirectedRequest: 421,
|
|
1481
|
-
UnprocessableEntity: 422,
|
|
1482
|
-
Locked: 423,
|
|
1483
|
-
FailedDependency: 424,
|
|
1484
|
-
TooEarly: 425,
|
|
1485
|
-
UpgradeRequired: 426,
|
|
1486
|
-
PreconditionRequired: 428,
|
|
1487
|
-
TooManyRequests: 429,
|
|
1488
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
1489
|
-
UnavailableForLegalReasons: 451,
|
|
1490
|
-
InternalServerError: 500,
|
|
1491
|
-
NotImplemented: 501,
|
|
1492
|
-
BadGateway: 502,
|
|
1493
|
-
ServiceUnavailable: 503,
|
|
1494
|
-
GatewayTimeout: 504,
|
|
1495
|
-
HttpVersionNotSupported: 505,
|
|
1496
|
-
VariantAlsoNegotiates: 506,
|
|
1497
|
-
InsufficientStorage: 507,
|
|
1498
|
-
LoopDetected: 508,
|
|
1499
|
-
NotExtended: 510,
|
|
1500
|
-
NetworkAuthenticationRequired: 511,
|
|
1501
|
-
WebServerIsDown: 521,
|
|
1502
|
-
ConnectionTimedOut: 522,
|
|
1503
|
-
OriginIsUnreachable: 523,
|
|
1504
|
-
TimeoutOccurred: 524,
|
|
1505
|
-
SslHandshakeFailed: 525,
|
|
1506
|
-
InvalidSslCertificate: 526
|
|
1507
|
-
};
|
|
1508
|
-
Object.entries(HttpStatusCode$1).forEach(([e, t]) => {
|
|
1509
|
-
HttpStatusCode$1[t] = e;
|
|
1510
|
-
});
|
|
1511
|
-
function createInstance(e) {
|
|
1512
|
-
let t = new Axios$1(e), n = bind(Axios$1.prototype.request, t);
|
|
1513
|
-
return utils_default.extend(n, Axios$1.prototype, t, { allOwnKeys: !0 }), utils_default.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1514
|
-
return createInstance(mergeConfig$1(e, t));
|
|
1515
|
-
}, n;
|
|
1516
|
-
}
|
|
1517
|
-
var axios = createInstance(defaults);
|
|
1518
|
-
axios.Axios = Axios$1, axios.CanceledError = CanceledError$1, axios.CancelToken = CancelToken$1, axios.isCancel = isCancel$1, axios.VERSION = VERSION$1, axios.toFormData = toFormData$1, axios.AxiosError = AxiosError$1, axios.Cancel = axios.CanceledError, axios.all = function(e) {
|
|
1519
|
-
return Promise.all(e);
|
|
1520
|
-
}, axios.spread = spread$1, axios.isAxiosError = isAxiosError$1, axios.mergeConfig = mergeConfig$1, axios.AxiosHeaders = AxiosHeaders$1, axios.formToJSON = (e) => formDataToJSON(utils_default.isHTMLForm(e) ? new FormData(e) : e), axios.getAdapter = adapters_default.getAdapter, axios.HttpStatusCode = HttpStatusCode$1, axios.default = axios;
|
|
1521
|
-
var { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig } = axios, AbortError = class extends Error {
|
|
41
|
+
}, AbortError = class extends Error {
|
|
1522
42
|
constructor(e = "The operation was aborted") {
|
|
1523
43
|
super(e), this.name = "AbortError";
|
|
1524
44
|
}
|
|
@@ -1582,17 +102,17 @@ const checkType = {
|
|
|
1582
102
|
if (e.code === "ERR_NETWORK" && !e.response) throw Promise.reject(e);
|
|
1583
103
|
return Promise.reject(e);
|
|
1584
104
|
}
|
|
1585
|
-
}, createAxios = (
|
|
1586
|
-
let
|
|
1587
|
-
return
|
|
1588
|
-
get: async (e, t = {}) => interceptors.useUnreadableRetry(() =>
|
|
1589
|
-
post: async (e, t, n = {}) => interceptors.useUnreadableRetry(() =>
|
|
1590
|
-
postForm: async (e, t, n = {}) => interceptors.useUnreadableRetry(() =>
|
|
1591
|
-
put: async (e, t, n = {}) => interceptors.useUnreadableRetry(() =>
|
|
1592
|
-
putForm: async (e, t, n = {}) => interceptors.useUnreadableRetry(() =>
|
|
1593
|
-
delete: async (e, t = {}) => interceptors.useUnreadableRetry(() =>
|
|
1594
|
-
patch: async (e, t, n = {}) => interceptors.useUnreadableRetry(() =>
|
|
1595
|
-
patchForm: async (e, t, n = {}) => interceptors.useUnreadableRetry(() =>
|
|
105
|
+
}, createAxios = (t, n = {}, r) => {
|
|
106
|
+
let i = axios.create(n);
|
|
107
|
+
return r?.(i), i.interceptors.request.use(async (e) => (e.baseURL ??= await t(), e)), n.noPassClientError || i.interceptors.response.use(void 0, interceptors.isClientError), i.interceptors.response.use(void 0, interceptors.createAutoRetry(i, 10)), {
|
|
108
|
+
get: async (e, t = {}) => interceptors.useUnreadableRetry(() => i.get(e, t)),
|
|
109
|
+
post: async (e, t, n = {}) => interceptors.useUnreadableRetry(() => i.post(e, t, n)),
|
|
110
|
+
postForm: async (e, t, n = {}) => interceptors.useUnreadableRetry(() => i.postForm(e, t, n)),
|
|
111
|
+
put: async (e, t, n = {}) => interceptors.useUnreadableRetry(() => i.put(e, t, n)),
|
|
112
|
+
putForm: async (e, t, n = {}) => interceptors.useUnreadableRetry(() => i.putForm(e, t, n)),
|
|
113
|
+
delete: async (e, t = {}) => interceptors.useUnreadableRetry(() => i.delete(e, t)),
|
|
114
|
+
patch: async (e, t, n = {}) => interceptors.useUnreadableRetry(() => i.patch(e, t, n)),
|
|
115
|
+
patchForm: async (e, t, n = {}) => interceptors.useUnreadableRetry(() => i.patchForm(e, t, n))
|
|
1596
116
|
};
|
|
1597
117
|
};
|
|
1598
118
|
export { SmartAbortController, checkType, createAxios, interceptors };
|