@acrool/react-fetcher 0.0.2-alpha.11 → 0.0.2-alpha.14
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/acrool-react-fetcher.es.js +647 -645
- package/dist/fetchers/createRestFulFetcher/config.d.ts +12 -0
- package/dist/fetchers/createRestFulFetcher/index.d.ts +2 -1
- package/dist/fetchers/createRestFulFetcher/types.d.ts +2 -6
- package/dist/fetchers/createRestFulFetcher/utils.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var zt = Object.defineProperty;
|
|
2
|
-
var Jt = (e, t,
|
|
3
|
-
var $ = (e, t,
|
|
2
|
+
var Jt = (e, t, r) => t in e ? zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var $ = (e, t, r) => Jt(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import Wt, { createContext as ft, useContext as Vt, useState as We, useEffect as Yt, useLayoutEffect as Kt } from "react";
|
|
5
5
|
function dt(e) {
|
|
6
6
|
return new Promise((t) => {
|
|
@@ -9,30 +9,30 @@ function dt(e) {
|
|
|
9
9
|
}, e);
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
const pt = 400, Xt = (e) => "File" in window && e instanceof File, Gt = (e) => "Blob" in window && e instanceof Blob, ht = (e, t = ["variables"]) => e && Object.keys(e).reduce((
|
|
13
|
-
const s = e[
|
|
12
|
+
const pt = 400, Xt = (e) => "File" in window && e instanceof File, Gt = (e) => "Blob" in window && e instanceof Blob, ht = (e, t = ["variables"]) => e && Object.keys(e).reduce((r, n) => {
|
|
13
|
+
const s = e[n];
|
|
14
14
|
if (Xt(s) || Gt(s))
|
|
15
15
|
return {
|
|
16
|
-
variables: { ...
|
|
17
|
-
map: [...
|
|
18
|
-
values: [...
|
|
16
|
+
variables: { ...r.variables, [n]: null },
|
|
17
|
+
map: [...r.map, t.concat(n).join(".")],
|
|
18
|
+
values: [...r.values, s]
|
|
19
19
|
};
|
|
20
20
|
if (s && typeof s == "object") {
|
|
21
|
-
const o = ht(s, t.concat(
|
|
21
|
+
const o = ht(s, t.concat(n));
|
|
22
22
|
return {
|
|
23
|
-
variables: { ...
|
|
24
|
-
map: [...
|
|
25
|
-
values: [...
|
|
23
|
+
variables: { ...r.variables, [n]: o.variables },
|
|
24
|
+
map: [...r.map, ...o.map],
|
|
25
|
+
values: [...r.values, ...o.values]
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
return {
|
|
29
|
-
...
|
|
30
|
-
variables: { ...
|
|
31
|
-
values:
|
|
29
|
+
...r,
|
|
30
|
+
variables: { ...r.variables, [n]: s },
|
|
31
|
+
values: r.values
|
|
32
32
|
};
|
|
33
|
-
}, { variables: {}, map: [], values: [] }),
|
|
34
|
-
let
|
|
35
|
-
const o =
|
|
33
|
+
}, { variables: {}, map: [], values: [] }), Vn = (e, t) => async (r) => {
|
|
34
|
+
let n, s;
|
|
35
|
+
const o = r == null ? void 0 : r.fetchOptions, i = r == null ? void 0 : r.variables;
|
|
36
36
|
let c = !1;
|
|
37
37
|
if (i) {
|
|
38
38
|
const p = ht(i);
|
|
@@ -46,19 +46,19 @@ const pt = 400, Xt = (e) => "File" in window && e instanceof File, Gt = (e) => "
|
|
|
46
46
|
{ name: "map", value: JSON.stringify(T) },
|
|
47
47
|
...p.values.map((R, m) => ({ name: m, value: R }))
|
|
48
48
|
];
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
n = new FormData(), h.forEach((R) => {
|
|
50
|
+
n.append(R.name.toString(), R.value);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
c || (s = "application/json",
|
|
54
|
+
c || (s = "application/json", n = JSON.stringify({ query: t, variables: i }));
|
|
55
55
|
const d = "", l = {
|
|
56
56
|
"Content-Type": s,
|
|
57
57
|
"Apollo-Require-Preflight": "true",
|
|
58
58
|
"X-Requested-With": "XMLHttpRequest",
|
|
59
59
|
...o == null ? void 0 : o.headers
|
|
60
60
|
}, [u] = await Promise.all([
|
|
61
|
-
e.post(d,
|
|
61
|
+
e.post(d, n, {
|
|
62
62
|
...o,
|
|
63
63
|
headers: l
|
|
64
64
|
}),
|
|
@@ -67,8 +67,8 @@ const pt = 400, Xt = (e) => "File" in window && e instanceof File, Gt = (e) => "
|
|
|
67
67
|
return u.data.data;
|
|
68
68
|
};
|
|
69
69
|
function Zt(e) {
|
|
70
|
-
const t = new FormData(),
|
|
71
|
-
for (const [o, i] of Object.entries(
|
|
70
|
+
const t = new FormData(), r = (n, s = "") => {
|
|
71
|
+
for (const [o, i] of Object.entries(n)) {
|
|
72
72
|
const c = s ? `${s}[${o}]` : o;
|
|
73
73
|
if (i instanceof File)
|
|
74
74
|
t.append(c, i);
|
|
@@ -76,20 +76,20 @@ function Zt(e) {
|
|
|
76
76
|
const d = i.type.split("/")[1] || "bin", l = `${o}.${d}`;
|
|
77
77
|
t.append(c, i, l);
|
|
78
78
|
} else Array.isArray(i) ? i.forEach((d, l) => {
|
|
79
|
-
typeof d == "object" && d !== null ?
|
|
80
|
-
}) : typeof i == "object" && i !== null ?
|
|
79
|
+
typeof d == "object" && d !== null ? r(d, `${c}[${l}]`) : t.append(`${c}[${l}]`, d);
|
|
80
|
+
}) : typeof i == "object" && i !== null ? r(i, c) : i != null && t.append(c, i);
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
return
|
|
83
|
+
return r(e), t;
|
|
84
84
|
}
|
|
85
|
-
var de = /* @__PURE__ */ ((e) => (e.formData = "multipart/form-data", e.formUrlDecode = "application/x-www-form-urlencoded", e.json = "application/json", e))(de || {});
|
|
86
|
-
const
|
|
85
|
+
var de = /* @__PURE__ */ ((e) => (e.formData = "multipart/form-data", e.formUrlDecode = "application/x-www-form-urlencoded", e.json = "application/json", e))(de || {}), Qt = /* @__PURE__ */ ((e) => (e.GET = "GET", e.POST = "POST", e.PUT = "PUT", e.DELETE = "DELETE", e.PATCH = "PATCH", e))(Qt || {});
|
|
86
|
+
const er = (e, t = {}) => e === de.formData ? Zt(t) : (e === de.formUrlDecode && new URLSearchParams(t).toString(), JSON.stringify(t)), tr = (e) => de.json, Yn = (e, t, r = tr) => async (n) => {
|
|
87
87
|
var u, p;
|
|
88
|
-
const s = (t == null ? void 0 : t.method) || "", o = (u =
|
|
88
|
+
const s = (t == null ? void 0 : t.method) || "", o = (u = n == null ? void 0 : n.fetchOptions) == null ? void 0 : u.fetchOptions, i = n == null ? void 0 : n.params, c = ((p = o == null ? void 0 : o.headers) == null ? void 0 : p.contentType) ?? r(s.toUpperCase()), d = {
|
|
89
89
|
url: t.url,
|
|
90
90
|
method: s,
|
|
91
91
|
params: i,
|
|
92
|
-
data:
|
|
92
|
+
data: er(c, n == null ? void 0 : n.body),
|
|
93
93
|
...o,
|
|
94
94
|
headers: {
|
|
95
95
|
...o == null ? void 0 : o.headers,
|
|
@@ -112,11 +112,11 @@ var ce = { exports: {} }, G = {};
|
|
|
112
112
|
* LICENSE file in the root directory of this source tree.
|
|
113
113
|
*/
|
|
114
114
|
var Ve;
|
|
115
|
-
function
|
|
115
|
+
function rr() {
|
|
116
116
|
if (Ve) return G;
|
|
117
117
|
Ve = 1;
|
|
118
118
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
119
|
-
function n
|
|
119
|
+
function r(n, s, o) {
|
|
120
120
|
var i = null;
|
|
121
121
|
if (o !== void 0 && (i = "" + o), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
122
122
|
o = {};
|
|
@@ -125,13 +125,13 @@ function tn() {
|
|
|
125
125
|
} else o = s;
|
|
126
126
|
return s = o.ref, {
|
|
127
127
|
$$typeof: e,
|
|
128
|
-
type:
|
|
128
|
+
type: n,
|
|
129
129
|
key: i,
|
|
130
130
|
ref: s !== void 0 ? s : null,
|
|
131
131
|
props: o
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
return G.Fragment = t, G.jsx =
|
|
134
|
+
return G.Fragment = t, G.jsx = r, G.jsxs = r, G;
|
|
135
135
|
}
|
|
136
136
|
var Z = {};
|
|
137
137
|
/**
|
|
@@ -144,7 +144,7 @@ var Z = {};
|
|
|
144
144
|
* LICENSE file in the root directory of this source tree.
|
|
145
145
|
*/
|
|
146
146
|
var Ye;
|
|
147
|
-
function
|
|
147
|
+
function nr() {
|
|
148
148
|
return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
|
|
149
149
|
function e(f) {
|
|
150
150
|
if (f == null) return null;
|
|
@@ -160,7 +160,7 @@ function nn() {
|
|
|
160
160
|
return "StrictMode";
|
|
161
161
|
case g:
|
|
162
162
|
return "Suspense";
|
|
163
|
-
case
|
|
163
|
+
case x:
|
|
164
164
|
return "SuspenseList";
|
|
165
165
|
case v:
|
|
166
166
|
return "Activity";
|
|
@@ -178,7 +178,7 @@ function nn() {
|
|
|
178
178
|
case O:
|
|
179
179
|
var w = f.render;
|
|
180
180
|
return f = f.displayName, f || (f = w.displayName || w.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
181
|
-
case
|
|
181
|
+
case N:
|
|
182
182
|
return w = f.displayName || null, w !== null ? w : e(f.type) || "Memo";
|
|
183
183
|
case B:
|
|
184
184
|
w = f._payload, f = f._init;
|
|
@@ -192,7 +192,7 @@ function nn() {
|
|
|
192
192
|
function t(f) {
|
|
193
193
|
return "" + f;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function r(f) {
|
|
196
196
|
try {
|
|
197
197
|
t(f);
|
|
198
198
|
var w = !1;
|
|
@@ -209,7 +209,7 @@ function nn() {
|
|
|
209
209
|
), t(f);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function n(f) {
|
|
213
213
|
if (f === R) return "<>";
|
|
214
214
|
if (typeof f == "object" && f !== null && f.$$typeof === B)
|
|
215
215
|
return "<...>";
|
|
@@ -315,7 +315,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
315
315
|
k
|
|
316
316
|
), Je[k + C] = !0);
|
|
317
317
|
}
|
|
318
|
-
if (k = null, _ !== void 0 && (
|
|
318
|
+
if (k = null, _ !== void 0 && (r(_), k = "" + _), i(w) && (r(w.key), k = "" + w.key), "key" in w) {
|
|
319
319
|
_ = {};
|
|
320
320
|
for (var Ae in w)
|
|
321
321
|
Ae !== "key" && (_[Ae] = w[Ae]);
|
|
@@ -337,7 +337,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
337
337
|
function p(f) {
|
|
338
338
|
typeof f == "object" && f !== null && f.$$typeof === T && f._store && (f._store.validated = 1);
|
|
339
339
|
}
|
|
340
|
-
var b = Wt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), E = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"),
|
|
340
|
+
var b = Wt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), E = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), v = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), H = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ie = Object.prototype.hasOwnProperty, Mt = Array.isArray, ge = console.createTask ? console.createTask : function() {
|
|
341
341
|
return null;
|
|
342
342
|
};
|
|
343
343
|
b = {
|
|
@@ -348,7 +348,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
348
348
|
var $e, Me = {}, He = b["react-stack-bottom-frame"].bind(
|
|
349
349
|
b,
|
|
350
350
|
o
|
|
351
|
-
)(), ze = ge(
|
|
351
|
+
)(), ze = ge(n(o)), Je = {};
|
|
352
352
|
Z.Fragment = R, Z.jsx = function(f, w, _, C, M) {
|
|
353
353
|
var q = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
354
354
|
return u(
|
|
@@ -359,7 +359,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
359
359
|
C,
|
|
360
360
|
M,
|
|
361
361
|
q ? Error("react-stack-top-frame") : He,
|
|
362
|
-
q ? ge(
|
|
362
|
+
q ? ge(n(f)) : ze
|
|
363
363
|
);
|
|
364
364
|
}, Z.jsxs = function(f, w, _, C, M) {
|
|
365
365
|
var q = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
@@ -371,17 +371,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
371
371
|
C,
|
|
372
372
|
M,
|
|
373
373
|
q ? Error("react-stack-top-frame") : He,
|
|
374
|
-
q ? ge(
|
|
374
|
+
q ? ge(n(f)) : ze
|
|
375
375
|
);
|
|
376
376
|
};
|
|
377
377
|
}()), Z;
|
|
378
378
|
}
|
|
379
379
|
var Ke;
|
|
380
|
-
function
|
|
381
|
-
return Ke || (Ke = 1, process.env.NODE_ENV === "production" ? ce.exports =
|
|
380
|
+
function sr() {
|
|
381
|
+
return Ke || (Ke = 1, process.env.NODE_ENV === "production" ? ce.exports = rr() : ce.exports = nr()), ce.exports;
|
|
382
382
|
}
|
|
383
|
-
var mt =
|
|
384
|
-
const
|
|
383
|
+
var mt = sr();
|
|
384
|
+
const ne = [
|
|
385
385
|
"color: #fff",
|
|
386
386
|
"display: inline-block",
|
|
387
387
|
"font-size: 11px",
|
|
@@ -395,52 +395,52 @@ const re = [
|
|
|
395
395
|
warning: "#d7a000",
|
|
396
396
|
danger: "#ec2127"
|
|
397
397
|
};
|
|
398
|
-
function oe(e, t, ...
|
|
399
|
-
console.log(`%c ${e}`, t, ...
|
|
398
|
+
function oe(e, t, ...r) {
|
|
399
|
+
console.log(`%c ${e}`, t, ...r);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
const
|
|
401
|
+
function or(e, ...t) {
|
|
402
|
+
const r = ne.concat([
|
|
403
403
|
`background-color: ${se.primary}`
|
|
404
404
|
]).join(";");
|
|
405
|
-
oe(e,
|
|
405
|
+
oe(e, r, ...t);
|
|
406
406
|
}
|
|
407
|
-
function
|
|
408
|
-
const
|
|
407
|
+
function ir(e, ...t) {
|
|
408
|
+
const r = ne.concat([
|
|
409
409
|
`background-color: ${se.success}`
|
|
410
410
|
]).join(";");
|
|
411
|
-
oe(e,
|
|
411
|
+
oe(e, r, ...t);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
const
|
|
413
|
+
function ar(e, ...t) {
|
|
414
|
+
const r = ne.concat([
|
|
415
415
|
`background-color: ${se.info}`
|
|
416
416
|
]).join(";");
|
|
417
|
-
oe(e,
|
|
417
|
+
oe(e, r, ...t);
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
const
|
|
419
|
+
function cr(e, ...t) {
|
|
420
|
+
const r = ne.concat([
|
|
421
421
|
`background-color: ${se.warning}`
|
|
422
422
|
]).join(";");
|
|
423
|
-
oe(e,
|
|
423
|
+
oe(e, r, ...t);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
const
|
|
425
|
+
function lr(e, ...t) {
|
|
426
|
+
const r = ne.concat([
|
|
427
427
|
`background-color: ${se.danger}`
|
|
428
428
|
]).join(";");
|
|
429
|
-
oe(e,
|
|
429
|
+
oe(e, r, ...t);
|
|
430
430
|
}
|
|
431
431
|
const U = {
|
|
432
|
-
primary:
|
|
433
|
-
success:
|
|
434
|
-
info:
|
|
435
|
-
warning:
|
|
436
|
-
danger:
|
|
432
|
+
primary: or,
|
|
433
|
+
success: ir,
|
|
434
|
+
info: ar,
|
|
435
|
+
warning: cr,
|
|
436
|
+
danger: lr
|
|
437
437
|
};
|
|
438
438
|
function Ue(e, t) {
|
|
439
|
-
const
|
|
439
|
+
const r = {
|
|
440
440
|
isZero: (t == null ? void 0 : t.isZero) ?? !0,
|
|
441
441
|
isFalse: (t == null ? void 0 : t.isFalse) ?? !0
|
|
442
442
|
};
|
|
443
|
-
return e == null ||
|
|
443
|
+
return e == null || r.isFalse && (e === !1 || e === "false") || r.isZero && (e === 0 || e === "0") || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0 || typeof e == "string" && e.trim().length === 0;
|
|
444
444
|
}
|
|
445
445
|
function Xe(e, t) {
|
|
446
446
|
return !Ue(e, {
|
|
@@ -449,13 +449,13 @@ function Xe(e, t) {
|
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
class te extends Error {
|
|
452
|
-
constructor(
|
|
453
|
-
super(
|
|
452
|
+
constructor(r) {
|
|
453
|
+
super(r.message);
|
|
454
454
|
$(this, "code");
|
|
455
455
|
$(this, "devInfo");
|
|
456
456
|
$(this, "args");
|
|
457
457
|
$(this, "path");
|
|
458
|
-
this.response =
|
|
458
|
+
this.response = r, this.code = r.code, this.args = r.args, this.path = r.path, this.initName();
|
|
459
459
|
}
|
|
460
460
|
initName() {
|
|
461
461
|
this.name = this.constructor.name;
|
|
@@ -478,11 +478,11 @@ const Rt = ft({
|
|
|
478
478
|
refreshTokens: async () => {
|
|
479
479
|
U.warning("AuthStateContext", "refreshToken not yet ready");
|
|
480
480
|
}
|
|
481
|
-
}),
|
|
481
|
+
}), ur = () => Vt(Rt), Kn = ({
|
|
482
482
|
children: e,
|
|
483
483
|
onGetTokens: t,
|
|
484
|
-
onSetTokens:
|
|
485
|
-
onRefreshTokens:
|
|
484
|
+
onSetTokens: r,
|
|
485
|
+
onRefreshTokens: n,
|
|
486
486
|
onForceLogout: s
|
|
487
487
|
}) => {
|
|
488
488
|
const [o, i] = We(0), [c, d] = We(!1);
|
|
@@ -491,15 +491,15 @@ const Rt = ft({
|
|
|
491
491
|
}, []);
|
|
492
492
|
const l = (b) => {
|
|
493
493
|
let T;
|
|
494
|
-
typeof b == "function" ? T = b(t()) : T = b,
|
|
494
|
+
typeof b == "function" ? T = b(t()) : T = b, r(T), d(Xe(T)), i(Date.now());
|
|
495
495
|
}, u = () => {
|
|
496
496
|
l(null), s && s();
|
|
497
497
|
}, p = async () => {
|
|
498
498
|
var T;
|
|
499
499
|
const b = (T = t()) == null ? void 0 : T.refreshToken;
|
|
500
|
-
if (!(!b || !
|
|
500
|
+
if (!(!b || !n))
|
|
501
501
|
try {
|
|
502
|
-
const h = await
|
|
502
|
+
const h = await n(b);
|
|
503
503
|
if (Ue(h))
|
|
504
504
|
throw new te({ message: "refresh token fail", code: "REFRESH_TOKEN_EMPTY" });
|
|
505
505
|
l(h);
|
|
@@ -566,14 +566,14 @@ const Rt = ft({
|
|
|
566
566
|
TIMEOUT_ERROR: "服务器已超过 {sec} 秒未响应。请确认您的网络连接状态或联系客服"
|
|
567
567
|
}
|
|
568
568
|
};
|
|
569
|
-
class
|
|
570
|
-
constructor(
|
|
571
|
-
super(
|
|
569
|
+
class fr extends Error {
|
|
570
|
+
constructor(r) {
|
|
571
|
+
super(r.message);
|
|
572
572
|
$(this, "code");
|
|
573
573
|
$(this, "devInfo");
|
|
574
574
|
$(this, "args");
|
|
575
575
|
$(this, "path");
|
|
576
|
-
this.response =
|
|
576
|
+
this.response = r, this.code = r.code, this.args = r.args, this.path = r.path, this.initName();
|
|
577
577
|
}
|
|
578
578
|
initName() {
|
|
579
579
|
this.name = this.constructor.name;
|
|
@@ -587,22 +587,22 @@ class fn extends Error {
|
|
|
587
587
|
};
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
const
|
|
591
|
-
var t,
|
|
592
|
-
return (
|
|
590
|
+
const Xn = (e) => {
|
|
591
|
+
var t, r, n, s;
|
|
592
|
+
return (r = (t = e == null ? void 0 : e.data) == null ? void 0 : t.errors) != null && r[0] ? (s = (n = e == null ? void 0 : e.data) == null ? void 0 : n.errors) == null ? void 0 : s[0] : {
|
|
593
593
|
message: "Axios error",
|
|
594
594
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
595
595
|
};
|
|
596
|
-
},
|
|
596
|
+
}, dr = (e) => e != null && e.data ? e == null ? void 0 : e.data : {
|
|
597
597
|
message: "Axios error",
|
|
598
598
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
599
599
|
};
|
|
600
600
|
let Q = !1, _e = [];
|
|
601
|
-
const
|
|
601
|
+
const pr = ft(null), Gn = ({
|
|
602
602
|
children: e,
|
|
603
603
|
axiosInstance: t,
|
|
604
|
-
locale:
|
|
605
|
-
getResponseFormatError:
|
|
604
|
+
locale: r = "en-US",
|
|
605
|
+
getResponseFormatError: n = dr,
|
|
606
606
|
onError: s,
|
|
607
607
|
checkIsRefreshTokenRequest: o,
|
|
608
608
|
authorizationPrefix: i = "Bearer",
|
|
@@ -614,7 +614,7 @@ const pn = ft(null), Xr = ({
|
|
|
614
614
|
updateTokens: u,
|
|
615
615
|
refreshTokens: p,
|
|
616
616
|
forceLogout: b
|
|
617
|
-
} =
|
|
617
|
+
} = ur();
|
|
618
618
|
Kt(() => {
|
|
619
619
|
const E = t.interceptors.request.use(R), O = t.interceptors.response.use(m, A);
|
|
620
620
|
return () => {
|
|
@@ -627,8 +627,8 @@ const pn = ft(null), Xr = ({
|
|
|
627
627
|
O(E);
|
|
628
628
|
_e = [];
|
|
629
629
|
}, h = (E, O) => (g) => {
|
|
630
|
-
d && U.info("[FetcherProvider] Request add pending queue", { originConfig: g }), _e.push((
|
|
631
|
-
|
|
630
|
+
d && U.info("[FetcherProvider] Request add pending queue", { originConfig: g }), _e.push((x) => {
|
|
631
|
+
x ? (g.pendingRequest = !0, E(t(g))) : O(new te({
|
|
632
632
|
message: S(401),
|
|
633
633
|
code: "UNAUTHORIZED",
|
|
634
634
|
path: "AxiosClientProvider.pushPendingRequestQueues"
|
|
@@ -636,10 +636,10 @@ const pn = ft(null), Xr = ({
|
|
|
636
636
|
});
|
|
637
637
|
}, R = (E) => new Promise((O, g) => {
|
|
638
638
|
var v, V;
|
|
639
|
-
E.headers["Accept-Language"] =
|
|
640
|
-
const
|
|
641
|
-
if (!((V = E.fetchOptions) == null ? void 0 : V.forceGuest) &&
|
|
642
|
-
h(O, g)(E), g(new
|
|
639
|
+
E.headers["Accept-Language"] = r;
|
|
640
|
+
const x = (v = l()) == null ? void 0 : v.accessToken;
|
|
641
|
+
if (!((V = E.fetchOptions) == null ? void 0 : V.forceGuest) && x && (E.headers.Authorization = [i, x].filter((H) => H).join(" ")), !(E && o ? o(E) : !1) && Q) {
|
|
642
|
+
h(O, g)(E), g(new fr({
|
|
643
643
|
message: "Token refreshing, so request save queues not send",
|
|
644
644
|
code: "REFRESH_TOKEN"
|
|
645
645
|
}));
|
|
@@ -647,15 +647,15 @@ const pn = ft(null), Xr = ({
|
|
|
647
647
|
}
|
|
648
648
|
O(E);
|
|
649
649
|
}), m = (E) => (d && U.info("[FetcherProvider] interceptorsResponseSuccess", { response: E }), E), S = (E) => {
|
|
650
|
-
const O = (c == null ? void 0 : c[
|
|
650
|
+
const O = (c == null ? void 0 : c[r]) || Ge[r] || Ge["en-US"];
|
|
651
651
|
return (O == null ? void 0 : O[E]) || `Error: ${E}`;
|
|
652
652
|
}, A = (E) => {
|
|
653
|
-
const O = E.response, g = E.config,
|
|
654
|
-
d && U.warning("[FetcherProvider] interceptorsResponseError", { status:
|
|
653
|
+
const O = E.response, g = E.config, x = E.status, N = n(O);
|
|
654
|
+
d && U.warning("[FetcherProvider] interceptorsResponseError", { status: x, responseFirstError: N }), s && s(N);
|
|
655
655
|
const B = g && o ? o(g) : !1;
|
|
656
|
-
if (O && g && (
|
|
656
|
+
if (O && g && (x === 401 || N.code === "UNAUTHENTICATED")) {
|
|
657
657
|
const v = l();
|
|
658
|
-
return d && U.warning("[FetcherProvider] enter refresh token flow", { refreshToken: v == null ? void 0 : v.refreshToken }), Ue(v == null ? void 0 : v.refreshToken) || B || g.pendingRequest ? (Q = !1, d && U.warning("[FetcherProvider] no refreshToken/refreshAPI|pendingRequest fail, force logout"), b(), Promise.reject(new te(
|
|
658
|
+
return d && U.warning("[FetcherProvider] enter refresh token flow", { refreshToken: v == null ? void 0 : v.refreshToken }), Ue(v == null ? void 0 : v.refreshToken) || B || g.pendingRequest ? (Q = !1, d && U.warning("[FetcherProvider] no refreshToken/refreshAPI|pendingRequest fail, force logout"), b(), Promise.reject(new te(N))) : (Q || (Q = !0, d && U.warning("[FetcherProvider] refreshTokens"), p().then(() => {
|
|
659
659
|
d && U.info("[FetcherProvider] refreshTokens success"), T(!0);
|
|
660
660
|
}).catch(() => {
|
|
661
661
|
d && U.danger("[FetcherProvider] refreshTokens fail"), T(!1);
|
|
@@ -663,10 +663,10 @@ const pn = ft(null), Xr = ({
|
|
|
663
663
|
h(V, H)(g);
|
|
664
664
|
}));
|
|
665
665
|
}
|
|
666
|
-
return Promise.reject(new te(
|
|
666
|
+
return Promise.reject(new te(N));
|
|
667
667
|
};
|
|
668
668
|
return /* @__PURE__ */ mt.jsx(
|
|
669
|
-
|
|
669
|
+
pr.Provider,
|
|
670
670
|
{
|
|
671
671
|
value: t,
|
|
672
672
|
children: e
|
|
@@ -678,226 +678,226 @@ function Et(e, t) {
|
|
|
678
678
|
return e.apply(t, arguments);
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
|
-
const { toString:
|
|
682
|
-
const
|
|
683
|
-
return e[
|
|
684
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Re(t) === e), Ee = (e) => (t) => typeof t === e, { isArray: K } = Array,
|
|
685
|
-
function
|
|
686
|
-
return e !== null && !
|
|
681
|
+
const { toString: hr } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: me, toStringTag: bt } = Symbol, Re = /* @__PURE__ */ ((e) => (t) => {
|
|
682
|
+
const r = hr.call(t);
|
|
683
|
+
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
684
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Re(t) === e), Ee = (e) => (t) => typeof t === e, { isArray: K } = Array, re = Ee("undefined");
|
|
685
|
+
function mr(e) {
|
|
686
|
+
return e !== null && !re(e) && e.constructor !== null && !re(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
687
687
|
}
|
|
688
688
|
const yt = D("ArrayBuffer");
|
|
689
|
-
function
|
|
689
|
+
function Rr(e) {
|
|
690
690
|
let t;
|
|
691
691
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && yt(e.buffer), t;
|
|
692
692
|
}
|
|
693
|
-
const
|
|
693
|
+
const Er = Ee("string"), j = Ee("function"), wt = Ee("number"), be = (e) => e !== null && typeof e == "object", br = (e) => e === !0 || e === !1, le = (e) => {
|
|
694
694
|
if (Re(e) !== "object")
|
|
695
695
|
return !1;
|
|
696
696
|
const t = De(e);
|
|
697
697
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(bt in e) && !(me in e);
|
|
698
|
-
},
|
|
698
|
+
}, yr = D("Date"), wr = D("File"), Tr = D("Blob"), gr = D("FileList"), Sr = (e) => be(e) && j(e.pipe), Or = (e) => {
|
|
699
699
|
let t;
|
|
700
700
|
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = Re(e)) === "formdata" || // detect form-data instance
|
|
701
701
|
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
702
|
-
},
|
|
703
|
-
function ie(e, t, { allOwnKeys:
|
|
702
|
+
}, Ar = D("URLSearchParams"), [_r, Pr, xr, Nr] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Cr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
703
|
+
function ie(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
704
704
|
if (e === null || typeof e > "u")
|
|
705
705
|
return;
|
|
706
|
-
let
|
|
706
|
+
let n, s;
|
|
707
707
|
if (typeof e != "object" && (e = [e]), K(e))
|
|
708
|
-
for (
|
|
709
|
-
t.call(null, e[
|
|
708
|
+
for (n = 0, s = e.length; n < s; n++)
|
|
709
|
+
t.call(null, e[n], n, e);
|
|
710
710
|
else {
|
|
711
|
-
const o =
|
|
711
|
+
const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
712
712
|
let c;
|
|
713
|
-
for (
|
|
714
|
-
c = o[
|
|
713
|
+
for (n = 0; n < i; n++)
|
|
714
|
+
c = o[n], t.call(null, e[c], c, e);
|
|
715
715
|
}
|
|
716
716
|
}
|
|
717
717
|
function Tt(e, t) {
|
|
718
718
|
t = t.toLowerCase();
|
|
719
|
-
const
|
|
720
|
-
let
|
|
721
|
-
for (;
|
|
722
|
-
if (s = n
|
|
719
|
+
const r = Object.keys(e);
|
|
720
|
+
let n = r.length, s;
|
|
721
|
+
for (; n-- > 0; )
|
|
722
|
+
if (s = r[n], t === s.toLowerCase())
|
|
723
723
|
return s;
|
|
724
724
|
return null;
|
|
725
725
|
}
|
|
726
|
-
const z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gt = (e) => !
|
|
726
|
+
const z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gt = (e) => !re(e) && e !== z;
|
|
727
727
|
function Ce() {
|
|
728
|
-
const { caseless: e } = gt(this) && this || {}, t = {},
|
|
728
|
+
const { caseless: e } = gt(this) && this || {}, t = {}, r = (n, s) => {
|
|
729
729
|
const o = e && Tt(t, s) || s;
|
|
730
|
-
le(t[o]) && le(
|
|
730
|
+
le(t[o]) && le(n) ? t[o] = Ce(t[o], n) : le(n) ? t[o] = Ce({}, n) : K(n) ? t[o] = n.slice() : t[o] = n;
|
|
731
731
|
};
|
|
732
|
-
for (let
|
|
733
|
-
arguments[
|
|
732
|
+
for (let n = 0, s = arguments.length; n < s; n++)
|
|
733
|
+
arguments[n] && ie(arguments[n], r);
|
|
734
734
|
return t;
|
|
735
735
|
}
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
}, { allOwnKeys:
|
|
739
|
-
e.prototype = Object.create(t.prototype,
|
|
736
|
+
const kr = (e, t, r, { allOwnKeys: n } = {}) => (ie(t, (s, o) => {
|
|
737
|
+
r && j(s) ? e[o] = Et(s, r) : e[o] = s;
|
|
738
|
+
}, { allOwnKeys: n }), e), Fr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), vr = (e, t, r, n) => {
|
|
739
|
+
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
740
740
|
value: t.prototype
|
|
741
|
-
}),
|
|
742
|
-
},
|
|
741
|
+
}), r && Object.assign(e.prototype, r);
|
|
742
|
+
}, jr = (e, t, r, n) => {
|
|
743
743
|
let s, o, i;
|
|
744
744
|
const c = {};
|
|
745
745
|
if (t = t || {}, e == null) return t;
|
|
746
746
|
do {
|
|
747
747
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
748
|
-
i = s[o], (!
|
|
749
|
-
e =
|
|
750
|
-
} while (e && (!
|
|
748
|
+
i = s[o], (!n || n(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
749
|
+
e = r !== !1 && De(e);
|
|
750
|
+
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
751
751
|
return t;
|
|
752
|
-
},
|
|
753
|
-
e = String(e), (
|
|
754
|
-
const
|
|
755
|
-
return
|
|
756
|
-
},
|
|
752
|
+
}, Lr = (e, t, r) => {
|
|
753
|
+
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
754
|
+
const n = e.indexOf(t, r);
|
|
755
|
+
return n !== -1 && n === r;
|
|
756
|
+
}, Ur = (e) => {
|
|
757
757
|
if (!e) return null;
|
|
758
758
|
if (K(e)) return e;
|
|
759
759
|
let t = e.length;
|
|
760
760
|
if (!wt(t)) return null;
|
|
761
|
-
const
|
|
761
|
+
const r = new Array(t);
|
|
762
762
|
for (; t-- > 0; )
|
|
763
|
-
|
|
764
|
-
return
|
|
765
|
-
},
|
|
766
|
-
const
|
|
763
|
+
r[t] = e[t];
|
|
764
|
+
return r;
|
|
765
|
+
}, Dr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), Br = (e, t) => {
|
|
766
|
+
const n = (e && e[me]).call(e);
|
|
767
767
|
let s;
|
|
768
|
-
for (; (s =
|
|
768
|
+
for (; (s = n.next()) && !s.done; ) {
|
|
769
769
|
const o = s.value;
|
|
770
770
|
t.call(e, o[0], o[1]);
|
|
771
771
|
}
|
|
772
|
-
},
|
|
773
|
-
let
|
|
774
|
-
const
|
|
775
|
-
for (; (
|
|
776
|
-
|
|
777
|
-
return
|
|
778
|
-
},
|
|
772
|
+
}, qr = (e, t) => {
|
|
773
|
+
let r;
|
|
774
|
+
const n = [];
|
|
775
|
+
for (; (r = e.exec(t)) !== null; )
|
|
776
|
+
n.push(r);
|
|
777
|
+
return n;
|
|
778
|
+
}, Ir = D("HTMLFormElement"), $r = (e) => e.toLowerCase().replace(
|
|
779
779
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
780
|
-
function(
|
|
781
|
-
return
|
|
780
|
+
function(r, n, s) {
|
|
781
|
+
return n.toUpperCase() + s;
|
|
782
782
|
}
|
|
783
|
-
), Ze = (({ hasOwnProperty: e }) => (t,
|
|
784
|
-
const
|
|
785
|
-
ie(
|
|
783
|
+
), Ze = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Mr = D("RegExp"), St = (e, t) => {
|
|
784
|
+
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
785
|
+
ie(r, (s, o) => {
|
|
786
786
|
let i;
|
|
787
|
-
(i = t(s, o, e)) !== !1 && (
|
|
788
|
-
}), Object.defineProperties(e,
|
|
789
|
-
},
|
|
790
|
-
St(e, (t,
|
|
791
|
-
if (j(e) && ["arguments", "caller", "callee"].indexOf(
|
|
787
|
+
(i = t(s, o, e)) !== !1 && (n[o] = i || s);
|
|
788
|
+
}), Object.defineProperties(e, n);
|
|
789
|
+
}, Hr = (e) => {
|
|
790
|
+
St(e, (t, r) => {
|
|
791
|
+
if (j(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
792
792
|
return !1;
|
|
793
|
-
const
|
|
794
|
-
if (j(
|
|
793
|
+
const n = e[r];
|
|
794
|
+
if (j(n)) {
|
|
795
795
|
if (t.enumerable = !1, "writable" in t) {
|
|
796
796
|
t.writable = !1;
|
|
797
797
|
return;
|
|
798
798
|
}
|
|
799
799
|
t.set || (t.set = () => {
|
|
800
|
-
throw Error("Can not rewrite read-only method '" +
|
|
800
|
+
throw Error("Can not rewrite read-only method '" + r + "'");
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
803
|
});
|
|
804
|
-
},
|
|
805
|
-
const
|
|
804
|
+
}, zr = (e, t) => {
|
|
805
|
+
const r = {}, n = (s) => {
|
|
806
806
|
s.forEach((o) => {
|
|
807
|
-
|
|
807
|
+
r[o] = !0;
|
|
808
808
|
});
|
|
809
809
|
};
|
|
810
|
-
return K(e) ?
|
|
811
|
-
},
|
|
812
|
-
},
|
|
813
|
-
function
|
|
810
|
+
return K(e) ? n(e) : n(String(e).split(t)), r;
|
|
811
|
+
}, Jr = () => {
|
|
812
|
+
}, Wr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
813
|
+
function Vr(e) {
|
|
814
814
|
return !!(e && j(e.append) && e[bt] === "FormData" && e[me]);
|
|
815
815
|
}
|
|
816
|
-
const
|
|
817
|
-
const t = new Array(10),
|
|
818
|
-
if (be(
|
|
819
|
-
if (t.indexOf(
|
|
816
|
+
const Yr = (e) => {
|
|
817
|
+
const t = new Array(10), r = (n, s) => {
|
|
818
|
+
if (be(n)) {
|
|
819
|
+
if (t.indexOf(n) >= 0)
|
|
820
820
|
return;
|
|
821
|
-
if (!("toJSON" in
|
|
822
|
-
t[s] =
|
|
823
|
-
const o = K(
|
|
824
|
-
return ie(
|
|
825
|
-
const d =
|
|
826
|
-
!
|
|
821
|
+
if (!("toJSON" in n)) {
|
|
822
|
+
t[s] = n;
|
|
823
|
+
const o = K(n) ? [] : {};
|
|
824
|
+
return ie(n, (i, c) => {
|
|
825
|
+
const d = r(i, s + 1);
|
|
826
|
+
!re(d) && (o[c] = d);
|
|
827
827
|
}), t[s] = void 0, o;
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
|
-
return
|
|
830
|
+
return n;
|
|
831
831
|
};
|
|
832
|
-
return
|
|
833
|
-
},
|
|
834
|
-
s === z && o ===
|
|
832
|
+
return r(e, 0);
|
|
833
|
+
}, Kr = D("AsyncFunction"), Xr = (e) => e && (be(e) || j(e)) && j(e.then) && j(e.catch), Ot = ((e, t) => e ? setImmediate : t ? ((r, n) => (z.addEventListener("message", ({ source: s, data: o }) => {
|
|
834
|
+
s === z && o === r && n.length && n.shift()();
|
|
835
835
|
}, !1), (s) => {
|
|
836
|
-
|
|
837
|
-
}))(`axios@${Math.random()}`, []) : (
|
|
836
|
+
n.push(s), z.postMessage(r, "*");
|
|
837
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
838
838
|
typeof setImmediate == "function",
|
|
839
839
|
j(z.postMessage)
|
|
840
|
-
),
|
|
840
|
+
), Gr = typeof queueMicrotask < "u" ? queueMicrotask.bind(z) : typeof process < "u" && process.nextTick || Ot, Zr = (e) => e != null && j(e[me]), a = {
|
|
841
841
|
isArray: K,
|
|
842
842
|
isArrayBuffer: yt,
|
|
843
|
-
isBuffer:
|
|
844
|
-
isFormData:
|
|
845
|
-
isArrayBufferView:
|
|
846
|
-
isString:
|
|
843
|
+
isBuffer: mr,
|
|
844
|
+
isFormData: Or,
|
|
845
|
+
isArrayBufferView: Rr,
|
|
846
|
+
isString: Er,
|
|
847
847
|
isNumber: wt,
|
|
848
|
-
isBoolean:
|
|
848
|
+
isBoolean: br,
|
|
849
849
|
isObject: be,
|
|
850
850
|
isPlainObject: le,
|
|
851
|
-
isReadableStream:
|
|
852
|
-
isRequest:
|
|
853
|
-
isResponse:
|
|
854
|
-
isHeaders:
|
|
855
|
-
isUndefined:
|
|
856
|
-
isDate:
|
|
857
|
-
isFile:
|
|
858
|
-
isBlob:
|
|
859
|
-
isRegExp:
|
|
851
|
+
isReadableStream: _r,
|
|
852
|
+
isRequest: Pr,
|
|
853
|
+
isResponse: xr,
|
|
854
|
+
isHeaders: Nr,
|
|
855
|
+
isUndefined: re,
|
|
856
|
+
isDate: yr,
|
|
857
|
+
isFile: wr,
|
|
858
|
+
isBlob: Tr,
|
|
859
|
+
isRegExp: Mr,
|
|
860
860
|
isFunction: j,
|
|
861
|
-
isStream:
|
|
862
|
-
isURLSearchParams:
|
|
863
|
-
isTypedArray:
|
|
864
|
-
isFileList:
|
|
861
|
+
isStream: Sr,
|
|
862
|
+
isURLSearchParams: Ar,
|
|
863
|
+
isTypedArray: Dr,
|
|
864
|
+
isFileList: gr,
|
|
865
865
|
forEach: ie,
|
|
866
866
|
merge: Ce,
|
|
867
|
-
extend:
|
|
868
|
-
trim:
|
|
869
|
-
stripBOM:
|
|
870
|
-
inherits:
|
|
871
|
-
toFlatObject:
|
|
867
|
+
extend: kr,
|
|
868
|
+
trim: Cr,
|
|
869
|
+
stripBOM: Fr,
|
|
870
|
+
inherits: vr,
|
|
871
|
+
toFlatObject: jr,
|
|
872
872
|
kindOf: Re,
|
|
873
873
|
kindOfTest: D,
|
|
874
|
-
endsWith:
|
|
875
|
-
toArray:
|
|
876
|
-
forEachEntry:
|
|
877
|
-
matchAll:
|
|
878
|
-
isHTMLForm:
|
|
874
|
+
endsWith: Lr,
|
|
875
|
+
toArray: Ur,
|
|
876
|
+
forEachEntry: Br,
|
|
877
|
+
matchAll: qr,
|
|
878
|
+
isHTMLForm: Ir,
|
|
879
879
|
hasOwnProperty: Ze,
|
|
880
880
|
hasOwnProp: Ze,
|
|
881
881
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
882
882
|
reduceDescriptors: St,
|
|
883
|
-
freezeMethods:
|
|
884
|
-
toObjectSet:
|
|
885
|
-
toCamelCase: $
|
|
886
|
-
noop:
|
|
887
|
-
toFiniteNumber:
|
|
883
|
+
freezeMethods: Hr,
|
|
884
|
+
toObjectSet: zr,
|
|
885
|
+
toCamelCase: $r,
|
|
886
|
+
noop: Jr,
|
|
887
|
+
toFiniteNumber: Wr,
|
|
888
888
|
findKey: Tt,
|
|
889
889
|
global: z,
|
|
890
890
|
isContextDefined: gt,
|
|
891
|
-
isSpecCompliantForm:
|
|
892
|
-
toJSONObject:
|
|
893
|
-
isAsyncFn:
|
|
894
|
-
isThenable:
|
|
891
|
+
isSpecCompliantForm: Vr,
|
|
892
|
+
toJSONObject: Yr,
|
|
893
|
+
isAsyncFn: Kr,
|
|
894
|
+
isThenable: Xr,
|
|
895
895
|
setImmediate: Ot,
|
|
896
|
-
asap:
|
|
897
|
-
isIterable:
|
|
896
|
+
asap: Gr,
|
|
897
|
+
isIterable: Zr
|
|
898
898
|
};
|
|
899
|
-
function y(e, t,
|
|
900
|
-
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),
|
|
899
|
+
function y(e, t, r, n, s) {
|
|
900
|
+
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), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
901
901
|
}
|
|
902
902
|
a.inherits(y, Error, {
|
|
903
903
|
toJSON: function() {
|
|
@@ -940,41 +940,41 @@ const At = y.prototype, _t = {};
|
|
|
940
940
|
});
|
|
941
941
|
Object.defineProperties(y, _t);
|
|
942
942
|
Object.defineProperty(At, "isAxiosError", { value: !0 });
|
|
943
|
-
y.from = (e, t,
|
|
943
|
+
y.from = (e, t, r, n, s, o) => {
|
|
944
944
|
const i = Object.create(At);
|
|
945
945
|
return a.toFlatObject(e, i, function(d) {
|
|
946
946
|
return d !== Error.prototype;
|
|
947
|
-
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t,
|
|
947
|
+
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, r, n, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
948
948
|
};
|
|
949
|
-
const
|
|
949
|
+
const Qr = null;
|
|
950
950
|
function ke(e) {
|
|
951
951
|
return a.isPlainObject(e) || a.isArray(e);
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function Pt(e) {
|
|
954
954
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
955
955
|
}
|
|
956
|
-
function Qe(e, t,
|
|
956
|
+
function Qe(e, t, r) {
|
|
957
957
|
return e ? e.concat(t).map(function(s, o) {
|
|
958
|
-
return s =
|
|
959
|
-
}).join(
|
|
958
|
+
return s = Pt(s), !r && o ? "[" + s + "]" : s;
|
|
959
|
+
}).join(r ? "." : "") : t;
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function en(e) {
|
|
962
962
|
return a.isArray(e) && !e.some(ke);
|
|
963
963
|
}
|
|
964
|
-
const
|
|
964
|
+
const tn = a.toFlatObject(a, {}, null, function(t) {
|
|
965
965
|
return /^is[A-Z]/.test(t);
|
|
966
966
|
});
|
|
967
|
-
function ye(e, t,
|
|
967
|
+
function ye(e, t, r) {
|
|
968
968
|
if (!a.isObject(e))
|
|
969
969
|
throw new TypeError("target must be an object");
|
|
970
|
-
t = t || new FormData(),
|
|
970
|
+
t = t || new FormData(), r = a.toFlatObject(r, {
|
|
971
971
|
metaTokens: !0,
|
|
972
972
|
dots: !1,
|
|
973
973
|
indexes: !1
|
|
974
974
|
}, !1, function(R, m) {
|
|
975
975
|
return !a.isUndefined(m[R]);
|
|
976
976
|
});
|
|
977
|
-
const
|
|
977
|
+
const n = r.metaTokens, s = r.visitor || u, o = r.dots, i = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
978
978
|
if (!a.isFunction(s))
|
|
979
979
|
throw new TypeError("visitor must be a function");
|
|
980
980
|
function l(h) {
|
|
@@ -989,9 +989,9 @@ function ye(e, t, n) {
|
|
|
989
989
|
let S = h;
|
|
990
990
|
if (h && !m && typeof h == "object") {
|
|
991
991
|
if (a.endsWith(R, "{}"))
|
|
992
|
-
R =
|
|
993
|
-
else if (a.isArray(h) &&
|
|
994
|
-
return R =
|
|
992
|
+
R = n ? R : R.slice(0, -2), h = JSON.stringify(h);
|
|
993
|
+
else if (a.isArray(h) && en(h) || (a.isFileList(h) || a.endsWith(R, "[]")) && (S = a.toArray(h)))
|
|
994
|
+
return R = Pt(R), S.forEach(function(E, O) {
|
|
995
995
|
!(a.isUndefined(E) || E === null) && t.append(
|
|
996
996
|
// eslint-disable-next-line no-nested-ternary
|
|
997
997
|
i === !0 ? Qe([R], O, o) : i === null ? R : R + "[]",
|
|
@@ -1001,7 +1001,7 @@ function ye(e, t, n) {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
return ke(h) ? !0 : (t.append(Qe(m, R, o), l(h)), !1);
|
|
1003
1003
|
}
|
|
1004
|
-
const p = [], b = Object.assign(
|
|
1004
|
+
const p = [], b = Object.assign(tn, {
|
|
1005
1005
|
defaultVisitor: u,
|
|
1006
1006
|
convertValue: l,
|
|
1007
1007
|
isVisitable: ke
|
|
@@ -1035,38 +1035,38 @@ function et(e) {
|
|
|
1035
1035
|
"%20": "+",
|
|
1036
1036
|
"%00": "\0"
|
|
1037
1037
|
};
|
|
1038
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
1039
|
-
return t[
|
|
1038
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
1039
|
+
return t[n];
|
|
1040
1040
|
});
|
|
1041
1041
|
}
|
|
1042
1042
|
function Be(e, t) {
|
|
1043
1043
|
this._pairs = [], e && ye(e, this, t);
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1047
|
-
this._pairs.push([t,
|
|
1045
|
+
const xt = Be.prototype;
|
|
1046
|
+
xt.append = function(t, r) {
|
|
1047
|
+
this._pairs.push([t, r]);
|
|
1048
1048
|
};
|
|
1049
|
-
|
|
1050
|
-
const
|
|
1051
|
-
return t.call(this,
|
|
1049
|
+
xt.toString = function(t) {
|
|
1050
|
+
const r = t ? function(n) {
|
|
1051
|
+
return t.call(this, n, et);
|
|
1052
1052
|
} : et;
|
|
1053
1053
|
return this._pairs.map(function(s) {
|
|
1054
|
-
return
|
|
1054
|
+
return r(s[0]) + "=" + r(s[1]);
|
|
1055
1055
|
}, "").join("&");
|
|
1056
1056
|
};
|
|
1057
|
-
function
|
|
1057
|
+
function rn(e) {
|
|
1058
1058
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function Nt(e, t, r) {
|
|
1061
1061
|
if (!t)
|
|
1062
1062
|
return e;
|
|
1063
|
-
const
|
|
1064
|
-
a.isFunction(
|
|
1065
|
-
serialize:
|
|
1063
|
+
const n = r && r.encode || rn;
|
|
1064
|
+
a.isFunction(r) && (r = {
|
|
1065
|
+
serialize: r
|
|
1066
1066
|
});
|
|
1067
|
-
const s =
|
|
1067
|
+
const s = r && r.serialize;
|
|
1068
1068
|
let o;
|
|
1069
|
-
if (s ? o = s(t,
|
|
1069
|
+
if (s ? o = s(t, r) : o = a.isURLSearchParams(t) ? t.toString() : new Be(t, r).toString(n), o) {
|
|
1070
1070
|
const i = e.indexOf("#");
|
|
1071
1071
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
1072
1072
|
}
|
|
@@ -1084,12 +1084,12 @@ class tt {
|
|
|
1084
1084
|
*
|
|
1085
1085
|
* @return {Number} An ID used to remove interceptor later
|
|
1086
1086
|
*/
|
|
1087
|
-
use(t,
|
|
1087
|
+
use(t, r, n) {
|
|
1088
1088
|
return this.handlers.push({
|
|
1089
1089
|
fulfilled: t,
|
|
1090
|
-
rejected:
|
|
1091
|
-
synchronous:
|
|
1092
|
-
runWhen:
|
|
1090
|
+
rejected: r,
|
|
1091
|
+
synchronous: n ? n.synchronous : !1,
|
|
1092
|
+
runWhen: n ? n.runWhen : null
|
|
1093
1093
|
}), this.handlers.length - 1;
|
|
1094
1094
|
}
|
|
1095
1095
|
/**
|
|
@@ -1121,8 +1121,8 @@ class tt {
|
|
|
1121
1121
|
* @returns {void}
|
|
1122
1122
|
*/
|
|
1123
1123
|
forEach(t) {
|
|
1124
|
-
a.forEach(this.handlers, function(
|
|
1125
|
-
|
|
1124
|
+
a.forEach(this.handlers, function(n) {
|
|
1125
|
+
n !== null && t(n);
|
|
1126
1126
|
});
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
@@ -1130,75 +1130,75 @@ const Ct = {
|
|
|
1130
1130
|
silentJSONParsing: !0,
|
|
1131
1131
|
forcedJSONParsing: !0,
|
|
1132
1132
|
clarifyTimeoutError: !1
|
|
1133
|
-
},
|
|
1133
|
+
}, nn = typeof URLSearchParams < "u" ? URLSearchParams : Be, sn = typeof FormData < "u" ? FormData : null, on = typeof Blob < "u" ? Blob : null, an = {
|
|
1134
1134
|
isBrowser: !0,
|
|
1135
1135
|
classes: {
|
|
1136
|
-
URLSearchParams:
|
|
1137
|
-
FormData:
|
|
1138
|
-
Blob:
|
|
1136
|
+
URLSearchParams: nn,
|
|
1137
|
+
FormData: sn,
|
|
1138
|
+
Blob: on
|
|
1139
1139
|
},
|
|
1140
1140
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1141
|
-
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0,
|
|
1142
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1141
|
+
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, cn = qe && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1142
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", un = qe && window.location.href || "http://localhost", fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1143
1143
|
__proto__: null,
|
|
1144
1144
|
hasBrowserEnv: qe,
|
|
1145
|
-
hasStandardBrowserEnv:
|
|
1146
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1145
|
+
hasStandardBrowserEnv: cn,
|
|
1146
|
+
hasStandardBrowserWebWorkerEnv: ln,
|
|
1147
1147
|
navigator: Fe,
|
|
1148
|
-
origin:
|
|
1148
|
+
origin: un
|
|
1149
1149
|
}, Symbol.toStringTag, { value: "Module" })), F = {
|
|
1150
|
-
...
|
|
1151
|
-
...
|
|
1150
|
+
...fn,
|
|
1151
|
+
...an
|
|
1152
1152
|
};
|
|
1153
|
-
function
|
|
1153
|
+
function dn(e, t) {
|
|
1154
1154
|
return ye(e, new F.classes.URLSearchParams(), Object.assign({
|
|
1155
|
-
visitor: function(
|
|
1156
|
-
return F.isNode && a.isBuffer(
|
|
1155
|
+
visitor: function(r, n, s, o) {
|
|
1156
|
+
return F.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1157
1157
|
}
|
|
1158
1158
|
}, t));
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function pn(e) {
|
|
1161
1161
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1164
|
-
const t = {},
|
|
1165
|
-
let
|
|
1166
|
-
const s =
|
|
1163
|
+
function hn(e) {
|
|
1164
|
+
const t = {}, r = Object.keys(e);
|
|
1165
|
+
let n;
|
|
1166
|
+
const s = r.length;
|
|
1167
1167
|
let o;
|
|
1168
|
-
for (
|
|
1169
|
-
o = n
|
|
1168
|
+
for (n = 0; n < s; n++)
|
|
1169
|
+
o = r[n], t[o] = e[o];
|
|
1170
1170
|
return t;
|
|
1171
1171
|
}
|
|
1172
1172
|
function kt(e) {
|
|
1173
|
-
function t(
|
|
1174
|
-
let i =
|
|
1173
|
+
function t(r, n, s, o) {
|
|
1174
|
+
let i = r[o++];
|
|
1175
1175
|
if (i === "__proto__") return !0;
|
|
1176
|
-
const c = Number.isFinite(+i), d = o >=
|
|
1177
|
-
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i],
|
|
1176
|
+
const c = Number.isFinite(+i), d = o >= r.length;
|
|
1177
|
+
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(r, n, s[i], o) && a.isArray(s[i]) && (s[i] = hn(s[i])), !c);
|
|
1178
1178
|
}
|
|
1179
1179
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
1180
|
-
const
|
|
1181
|
-
return a.forEachEntry(e, (
|
|
1182
|
-
t(
|
|
1183
|
-
}),
|
|
1180
|
+
const r = {};
|
|
1181
|
+
return a.forEachEntry(e, (n, s) => {
|
|
1182
|
+
t(pn(n), s, r, 0);
|
|
1183
|
+
}), r;
|
|
1184
1184
|
}
|
|
1185
1185
|
return null;
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function mn(e, t, r) {
|
|
1188
1188
|
if (a.isString(e))
|
|
1189
1189
|
try {
|
|
1190
1190
|
return (t || JSON.parse)(e), a.trim(e);
|
|
1191
|
-
} catch (
|
|
1192
|
-
if (
|
|
1193
|
-
throw
|
|
1191
|
+
} catch (n) {
|
|
1192
|
+
if (n.name !== "SyntaxError")
|
|
1193
|
+
throw n;
|
|
1194
1194
|
}
|
|
1195
|
-
return (
|
|
1195
|
+
return (r || JSON.stringify)(e);
|
|
1196
1196
|
}
|
|
1197
1197
|
const ae = {
|
|
1198
1198
|
transitional: Ct,
|
|
1199
1199
|
adapter: ["xhr", "http", "fetch"],
|
|
1200
|
-
transformRequest: [function(t,
|
|
1201
|
-
const
|
|
1200
|
+
transformRequest: [function(t, r) {
|
|
1201
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = a.isObject(t);
|
|
1202
1202
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
1203
1203
|
return s ? JSON.stringify(kt(t)) : t;
|
|
1204
1204
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
@@ -1206,12 +1206,12 @@ const ae = {
|
|
|
1206
1206
|
if (a.isArrayBufferView(t))
|
|
1207
1207
|
return t.buffer;
|
|
1208
1208
|
if (a.isURLSearchParams(t))
|
|
1209
|
-
return
|
|
1209
|
+
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1210
1210
|
let c;
|
|
1211
1211
|
if (o) {
|
|
1212
|
-
if (
|
|
1213
|
-
return
|
|
1214
|
-
if ((c = a.isFileList(t)) ||
|
|
1212
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1213
|
+
return dn(t, this.formSerializer).toString();
|
|
1214
|
+
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
1215
1215
|
const d = this.env && this.env.FormData;
|
|
1216
1216
|
return ye(
|
|
1217
1217
|
c ? { "files[]": t } : t,
|
|
@@ -1220,14 +1220,14 @@ const ae = {
|
|
|
1220
1220
|
);
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
return o || s ? (
|
|
1223
|
+
return o || s ? (r.setContentType("application/json", !1), mn(t)) : t;
|
|
1224
1224
|
}],
|
|
1225
1225
|
transformResponse: [function(t) {
|
|
1226
|
-
const
|
|
1226
|
+
const r = this.transitional || ae.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
1227
1227
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
1228
1228
|
return t;
|
|
1229
|
-
if (t && a.isString(t) && (
|
|
1230
|
-
const i = !(
|
|
1229
|
+
if (t && a.isString(t) && (n && !this.responseType || s)) {
|
|
1230
|
+
const i = !(r && r.silentJSONParsing) && s;
|
|
1231
1231
|
try {
|
|
1232
1232
|
return JSON.parse(t);
|
|
1233
1233
|
} catch (c) {
|
|
@@ -1263,7 +1263,7 @@ const ae = {
|
|
|
1263
1263
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1264
1264
|
ae.headers[e] = {};
|
|
1265
1265
|
});
|
|
1266
|
-
const
|
|
1266
|
+
const Rn = a.toObjectSet([
|
|
1267
1267
|
"age",
|
|
1268
1268
|
"authorization",
|
|
1269
1269
|
"content-length",
|
|
@@ -1281,47 +1281,47 @@ const mr = a.toObjectSet([
|
|
|
1281
1281
|
"referer",
|
|
1282
1282
|
"retry-after",
|
|
1283
1283
|
"user-agent"
|
|
1284
|
-
]),
|
|
1284
|
+
]), En = (e) => {
|
|
1285
1285
|
const t = {};
|
|
1286
|
-
let
|
|
1286
|
+
let r, n, s;
|
|
1287
1287
|
return e && e.split(`
|
|
1288
1288
|
`).forEach(function(i) {
|
|
1289
|
-
s = i.indexOf(":"),
|
|
1289
|
+
s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || t[r] && Rn[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
1290
1290
|
}), t;
|
|
1291
|
-
},
|
|
1291
|
+
}, rt = Symbol("internals");
|
|
1292
1292
|
function ee(e) {
|
|
1293
1293
|
return e && String(e).trim().toLowerCase();
|
|
1294
1294
|
}
|
|
1295
1295
|
function ue(e) {
|
|
1296
1296
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ue) : String(e);
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1299
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
1300
|
-
let
|
|
1301
|
-
for (;
|
|
1302
|
-
t[
|
|
1298
|
+
function bn(e) {
|
|
1299
|
+
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1300
|
+
let n;
|
|
1301
|
+
for (; n = r.exec(e); )
|
|
1302
|
+
t[n[1]] = n[2];
|
|
1303
1303
|
return t;
|
|
1304
1304
|
}
|
|
1305
|
-
const
|
|
1306
|
-
function
|
|
1307
|
-
if (a.isFunction(
|
|
1308
|
-
return
|
|
1309
|
-
if (s && (t =
|
|
1310
|
-
if (a.isString(
|
|
1311
|
-
return t.indexOf(
|
|
1312
|
-
if (a.isRegExp(
|
|
1313
|
-
return
|
|
1305
|
+
const yn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1306
|
+
function Pe(e, t, r, n, s) {
|
|
1307
|
+
if (a.isFunction(n))
|
|
1308
|
+
return n.call(this, t, r);
|
|
1309
|
+
if (s && (t = r), !!a.isString(t)) {
|
|
1310
|
+
if (a.isString(n))
|
|
1311
|
+
return t.indexOf(n) !== -1;
|
|
1312
|
+
if (a.isRegExp(n))
|
|
1313
|
+
return n.test(t);
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1317
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
1316
|
+
function wn(e) {
|
|
1317
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1320
|
-
const
|
|
1321
|
-
["get", "set", "has"].forEach((
|
|
1322
|
-
Object.defineProperty(e,
|
|
1319
|
+
function Tn(e, t) {
|
|
1320
|
+
const r = a.toCamelCase(" " + t);
|
|
1321
|
+
["get", "set", "has"].forEach((n) => {
|
|
1322
|
+
Object.defineProperty(e, n + r, {
|
|
1323
1323
|
value: function(s, o, i) {
|
|
1324
|
-
return this[
|
|
1324
|
+
return this[n].call(this, t, s, o, i);
|
|
1325
1325
|
},
|
|
1326
1326
|
configurable: !0
|
|
1327
1327
|
});
|
|
@@ -1331,7 +1331,7 @@ let L = class {
|
|
|
1331
1331
|
constructor(t) {
|
|
1332
1332
|
t && this.set(t);
|
|
1333
1333
|
}
|
|
1334
|
-
set(t,
|
|
1334
|
+
set(t, r, n) {
|
|
1335
1335
|
const s = this;
|
|
1336
1336
|
function o(c, d, l) {
|
|
1337
1337
|
const u = ee(d);
|
|
@@ -1342,9 +1342,9 @@ let L = class {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
const i = (c, d) => a.forEach(c, (l, u) => o(l, u, d));
|
|
1344
1344
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
1345
|
-
i(t,
|
|
1346
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
1347
|
-
i(
|
|
1345
|
+
i(t, r);
|
|
1346
|
+
else if (a.isString(t) && (t = t.trim()) && !yn(t))
|
|
1347
|
+
i(En(t), r);
|
|
1348
1348
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
1349
1349
|
let c = {}, d, l;
|
|
1350
1350
|
for (const u of t) {
|
|
@@ -1352,81 +1352,81 @@ let L = class {
|
|
|
1352
1352
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1353
1353
|
c[l = u[0]] = (d = c[l]) ? a.isArray(d) ? [...d, u[1]] : [d, u[1]] : u[1];
|
|
1354
1354
|
}
|
|
1355
|
-
i(c,
|
|
1355
|
+
i(c, r);
|
|
1356
1356
|
} else
|
|
1357
|
-
t != null && o(
|
|
1357
|
+
t != null && o(r, t, n);
|
|
1358
1358
|
return this;
|
|
1359
1359
|
}
|
|
1360
|
-
get(t,
|
|
1360
|
+
get(t, r) {
|
|
1361
1361
|
if (t = ee(t), t) {
|
|
1362
|
-
const
|
|
1363
|
-
if (
|
|
1364
|
-
const s = this[
|
|
1365
|
-
if (!
|
|
1362
|
+
const n = a.findKey(this, t);
|
|
1363
|
+
if (n) {
|
|
1364
|
+
const s = this[n];
|
|
1365
|
+
if (!r)
|
|
1366
1366
|
return s;
|
|
1367
|
-
if (
|
|
1368
|
-
return
|
|
1369
|
-
if (a.isFunction(
|
|
1370
|
-
return
|
|
1371
|
-
if (a.isRegExp(
|
|
1372
|
-
return
|
|
1367
|
+
if (r === !0)
|
|
1368
|
+
return bn(s);
|
|
1369
|
+
if (a.isFunction(r))
|
|
1370
|
+
return r.call(this, s, n);
|
|
1371
|
+
if (a.isRegExp(r))
|
|
1372
|
+
return r.exec(s);
|
|
1373
1373
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
|
-
has(t,
|
|
1377
|
+
has(t, r) {
|
|
1378
1378
|
if (t = ee(t), t) {
|
|
1379
|
-
const
|
|
1380
|
-
return !!(
|
|
1379
|
+
const n = a.findKey(this, t);
|
|
1380
|
+
return !!(n && this[n] !== void 0 && (!r || Pe(this, this[n], n, r)));
|
|
1381
1381
|
}
|
|
1382
1382
|
return !1;
|
|
1383
1383
|
}
|
|
1384
|
-
delete(t,
|
|
1385
|
-
const
|
|
1384
|
+
delete(t, r) {
|
|
1385
|
+
const n = this;
|
|
1386
1386
|
let s = !1;
|
|
1387
1387
|
function o(i) {
|
|
1388
1388
|
if (i = ee(i), i) {
|
|
1389
|
-
const c = a.findKey(
|
|
1390
|
-
c && (!
|
|
1389
|
+
const c = a.findKey(n, i);
|
|
1390
|
+
c && (!r || Pe(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
1393
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
1394
1394
|
}
|
|
1395
1395
|
clear(t) {
|
|
1396
|
-
const
|
|
1397
|
-
let
|
|
1398
|
-
for (;
|
|
1399
|
-
const o = n
|
|
1400
|
-
(!t ||
|
|
1396
|
+
const r = Object.keys(this);
|
|
1397
|
+
let n = r.length, s = !1;
|
|
1398
|
+
for (; n--; ) {
|
|
1399
|
+
const o = r[n];
|
|
1400
|
+
(!t || Pe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
1401
1401
|
}
|
|
1402
1402
|
return s;
|
|
1403
1403
|
}
|
|
1404
1404
|
normalize(t) {
|
|
1405
|
-
const
|
|
1405
|
+
const r = this, n = {};
|
|
1406
1406
|
return a.forEach(this, (s, o) => {
|
|
1407
|
-
const i = a.findKey(
|
|
1407
|
+
const i = a.findKey(n, o);
|
|
1408
1408
|
if (i) {
|
|
1409
|
-
|
|
1409
|
+
r[i] = ue(s), delete r[o];
|
|
1410
1410
|
return;
|
|
1411
1411
|
}
|
|
1412
|
-
const c = t ?
|
|
1413
|
-
c !== o && delete
|
|
1412
|
+
const c = t ? wn(o) : String(o).trim();
|
|
1413
|
+
c !== o && delete r[o], r[c] = ue(s), n[c] = !0;
|
|
1414
1414
|
}), this;
|
|
1415
1415
|
}
|
|
1416
1416
|
concat(...t) {
|
|
1417
1417
|
return this.constructor.concat(this, ...t);
|
|
1418
1418
|
}
|
|
1419
1419
|
toJSON(t) {
|
|
1420
|
-
const
|
|
1421
|
-
return a.forEach(this, (
|
|
1422
|
-
|
|
1423
|
-
}),
|
|
1420
|
+
const r = /* @__PURE__ */ Object.create(null);
|
|
1421
|
+
return a.forEach(this, (n, s) => {
|
|
1422
|
+
n != null && n !== !1 && (r[s] = t && a.isArray(n) ? n.join(", ") : n);
|
|
1423
|
+
}), r;
|
|
1424
1424
|
}
|
|
1425
1425
|
[Symbol.iterator]() {
|
|
1426
1426
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1427
1427
|
}
|
|
1428
1428
|
toString() {
|
|
1429
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
1429
|
+
return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
|
|
1430
1430
|
`);
|
|
1431
1431
|
}
|
|
1432
1432
|
getSetCookie() {
|
|
@@ -1438,96 +1438,96 @@ let L = class {
|
|
|
1438
1438
|
static from(t) {
|
|
1439
1439
|
return t instanceof this ? t : new this(t);
|
|
1440
1440
|
}
|
|
1441
|
-
static concat(t, ...
|
|
1442
|
-
const
|
|
1443
|
-
return
|
|
1441
|
+
static concat(t, ...r) {
|
|
1442
|
+
const n = new this(t);
|
|
1443
|
+
return r.forEach((s) => n.set(s)), n;
|
|
1444
1444
|
}
|
|
1445
1445
|
static accessor(t) {
|
|
1446
|
-
const
|
|
1446
|
+
const n = (this[rt] = this[rt] = {
|
|
1447
1447
|
accessors: {}
|
|
1448
1448
|
}).accessors, s = this.prototype;
|
|
1449
1449
|
function o(i) {
|
|
1450
1450
|
const c = ee(i);
|
|
1451
|
-
|
|
1451
|
+
n[c] || (Tn(s, i), n[c] = !0);
|
|
1452
1452
|
}
|
|
1453
1453
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1454
1454
|
}
|
|
1455
1455
|
};
|
|
1456
1456
|
L.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1457
1457
|
a.reduceDescriptors(L.prototype, ({ value: e }, t) => {
|
|
1458
|
-
let
|
|
1458
|
+
let r = t[0].toUpperCase() + t.slice(1);
|
|
1459
1459
|
return {
|
|
1460
1460
|
get: () => e,
|
|
1461
|
-
set(
|
|
1462
|
-
this[
|
|
1461
|
+
set(n) {
|
|
1462
|
+
this[r] = n;
|
|
1463
1463
|
}
|
|
1464
1464
|
};
|
|
1465
1465
|
});
|
|
1466
1466
|
a.freezeMethods(L);
|
|
1467
|
-
function
|
|
1468
|
-
const
|
|
1469
|
-
let o =
|
|
1467
|
+
function xe(e, t) {
|
|
1468
|
+
const r = this || ae, n = t || r, s = L.from(n.headers);
|
|
1469
|
+
let o = n.data;
|
|
1470
1470
|
return a.forEach(e, function(c) {
|
|
1471
|
-
o = c.call(
|
|
1471
|
+
o = c.call(r, o, s.normalize(), t ? t.status : void 0);
|
|
1472
1472
|
}), s.normalize(), o;
|
|
1473
1473
|
}
|
|
1474
1474
|
function Ft(e) {
|
|
1475
1475
|
return !!(e && e.__CANCEL__);
|
|
1476
1476
|
}
|
|
1477
|
-
function X(e, t,
|
|
1478
|
-
y.call(this, e ?? "canceled", y.ERR_CANCELED, t,
|
|
1477
|
+
function X(e, t, r) {
|
|
1478
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
1479
1479
|
}
|
|
1480
1480
|
a.inherits(X, y, {
|
|
1481
1481
|
__CANCEL__: !0
|
|
1482
1482
|
});
|
|
1483
|
-
function vt(e, t,
|
|
1484
|
-
const
|
|
1485
|
-
!
|
|
1486
|
-
"Request failed with status code " +
|
|
1487
|
-
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1483
|
+
function vt(e, t, r) {
|
|
1484
|
+
const n = r.config.validateStatus;
|
|
1485
|
+
!r.status || !n || n(r.status) ? e(r) : t(new y(
|
|
1486
|
+
"Request failed with status code " + r.status,
|
|
1487
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
1488
|
+
r.config,
|
|
1489
|
+
r.request,
|
|
1490
|
+
r
|
|
1491
1491
|
));
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function gn(e) {
|
|
1494
1494
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1495
1495
|
return t && t[1] || "";
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function Sn(e, t) {
|
|
1498
1498
|
e = e || 10;
|
|
1499
|
-
const
|
|
1499
|
+
const r = new Array(e), n = new Array(e);
|
|
1500
1500
|
let s = 0, o = 0, i;
|
|
1501
1501
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1502
|
-
const l = Date.now(), u =
|
|
1503
|
-
i || (i = l),
|
|
1502
|
+
const l = Date.now(), u = n[o];
|
|
1503
|
+
i || (i = l), r[s] = d, n[s] = l;
|
|
1504
1504
|
let p = o, b = 0;
|
|
1505
1505
|
for (; p !== s; )
|
|
1506
|
-
b +=
|
|
1506
|
+
b += r[p++], p = p % e;
|
|
1507
1507
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
1508
1508
|
return;
|
|
1509
1509
|
const T = u && l - u;
|
|
1510
1510
|
return T ? Math.round(b * 1e3 / T) : void 0;
|
|
1511
1511
|
};
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1514
|
-
let
|
|
1513
|
+
function On(e, t) {
|
|
1514
|
+
let r = 0, n = 1e3 / t, s, o;
|
|
1515
1515
|
const i = (l, u = Date.now()) => {
|
|
1516
|
-
|
|
1516
|
+
r = u, s = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
|
1517
1517
|
};
|
|
1518
1518
|
return [(...l) => {
|
|
1519
|
-
const u = Date.now(), p = u -
|
|
1520
|
-
p >=
|
|
1519
|
+
const u = Date.now(), p = u - r;
|
|
1520
|
+
p >= n ? i(l, u) : (s = l, o || (o = setTimeout(() => {
|
|
1521
1521
|
o = null, i(s);
|
|
1522
|
-
},
|
|
1522
|
+
}, n - p)));
|
|
1523
1523
|
}, () => s && i(s)];
|
|
1524
1524
|
}
|
|
1525
|
-
const pe = (e, t,
|
|
1526
|
-
let
|
|
1527
|
-
const s =
|
|
1528
|
-
return
|
|
1529
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i -
|
|
1530
|
-
|
|
1525
|
+
const pe = (e, t, r = 3) => {
|
|
1526
|
+
let n = 0;
|
|
1527
|
+
const s = Sn(50, 250);
|
|
1528
|
+
return On((o) => {
|
|
1529
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - n, l = s(d), u = i <= c;
|
|
1530
|
+
n = i;
|
|
1531
1531
|
const p = {
|
|
1532
1532
|
loaded: i,
|
|
1533
1533
|
total: c,
|
|
@@ -1540,23 +1540,23 @@ const pe = (e, t, n = 3) => {
|
|
|
1540
1540
|
[t ? "download" : "upload"]: !0
|
|
1541
1541
|
};
|
|
1542
1542
|
e(p);
|
|
1543
|
-
},
|
|
1544
|
-
},
|
|
1545
|
-
const
|
|
1546
|
-
return [(
|
|
1547
|
-
lengthComputable:
|
|
1543
|
+
}, r);
|
|
1544
|
+
}, nt = (e, t) => {
|
|
1545
|
+
const r = e != null;
|
|
1546
|
+
return [(n) => t[0]({
|
|
1547
|
+
lengthComputable: r,
|
|
1548
1548
|
total: e,
|
|
1549
|
-
loaded:
|
|
1549
|
+
loaded: n
|
|
1550
1550
|
}), t[1]];
|
|
1551
|
-
}, st = (e) => (...t) => a.asap(() => e(...t)),
|
|
1551
|
+
}, st = (e) => (...t) => a.asap(() => e(...t)), An = F.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, F.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
|
|
1552
1552
|
new URL(F.origin),
|
|
1553
1553
|
F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)
|
|
1554
|
-
) : () => !0,
|
|
1554
|
+
) : () => !0, _n = F.hasStandardBrowserEnv ? (
|
|
1555
1555
|
// Standard browser envs support document.cookie
|
|
1556
1556
|
{
|
|
1557
|
-
write(e, t,
|
|
1557
|
+
write(e, t, r, n, s, o) {
|
|
1558
1558
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
1559
|
-
a.isNumber(
|
|
1559
|
+
a.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), a.isString(n) && i.push("path=" + n), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
1560
1560
|
},
|
|
1561
1561
|
read(e) {
|
|
1562
1562
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -1578,44 +1578,44 @@ const pe = (e, t, n = 3) => {
|
|
|
1578
1578
|
}
|
|
1579
1579
|
}
|
|
1580
1580
|
);
|
|
1581
|
-
function
|
|
1581
|
+
function Pn(e) {
|
|
1582
1582
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function xn(e, t) {
|
|
1585
1585
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1586
1586
|
}
|
|
1587
|
-
function jt(e, t,
|
|
1588
|
-
let
|
|
1589
|
-
return e && (
|
|
1587
|
+
function jt(e, t, r) {
|
|
1588
|
+
let n = !Pn(t);
|
|
1589
|
+
return e && (n || r == !1) ? xn(e, t) : t;
|
|
1590
1590
|
}
|
|
1591
1591
|
const ot = (e) => e instanceof L ? { ...e } : e;
|
|
1592
1592
|
function W(e, t) {
|
|
1593
1593
|
t = t || {};
|
|
1594
|
-
const
|
|
1595
|
-
function
|
|
1594
|
+
const r = {};
|
|
1595
|
+
function n(l, u, p, b) {
|
|
1596
1596
|
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: b }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
1597
1597
|
}
|
|
1598
1598
|
function s(l, u, p, b) {
|
|
1599
1599
|
if (a.isUndefined(u)) {
|
|
1600
1600
|
if (!a.isUndefined(l))
|
|
1601
|
-
return
|
|
1602
|
-
} else return
|
|
1601
|
+
return n(void 0, l, p, b);
|
|
1602
|
+
} else return n(l, u, p, b);
|
|
1603
1603
|
}
|
|
1604
1604
|
function o(l, u) {
|
|
1605
1605
|
if (!a.isUndefined(u))
|
|
1606
|
-
return
|
|
1606
|
+
return n(void 0, u);
|
|
1607
1607
|
}
|
|
1608
1608
|
function i(l, u) {
|
|
1609
1609
|
if (a.isUndefined(u)) {
|
|
1610
1610
|
if (!a.isUndefined(l))
|
|
1611
|
-
return
|
|
1612
|
-
} else return
|
|
1611
|
+
return n(void 0, l);
|
|
1612
|
+
} else return n(void 0, u);
|
|
1613
1613
|
}
|
|
1614
1614
|
function c(l, u, p) {
|
|
1615
1615
|
if (p in t)
|
|
1616
|
-
return
|
|
1616
|
+
return n(l, u);
|
|
1617
1617
|
if (p in e)
|
|
1618
|
-
return
|
|
1618
|
+
return n(void 0, l);
|
|
1619
1619
|
}
|
|
1620
1620
|
const d = {
|
|
1621
1621
|
url: o,
|
|
@@ -1650,18 +1650,18 @@ function W(e, t) {
|
|
|
1650
1650
|
};
|
|
1651
1651
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
1652
1652
|
const p = d[u] || s, b = p(e[u], t[u], u);
|
|
1653
|
-
a.isUndefined(b) && p !== c || (
|
|
1654
|
-
}),
|
|
1653
|
+
a.isUndefined(b) && p !== c || (r[u] = b);
|
|
1654
|
+
}), r;
|
|
1655
1655
|
}
|
|
1656
1656
|
const Lt = (e) => {
|
|
1657
1657
|
const t = W({}, e);
|
|
1658
|
-
let { data:
|
|
1659
|
-
t.headers = i = L.from(i), t.url =
|
|
1658
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1659
|
+
t.headers = i = L.from(i), t.url = Nt(jt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1660
1660
|
"Authorization",
|
|
1661
1661
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1662
1662
|
);
|
|
1663
1663
|
let d;
|
|
1664
|
-
if (a.isFormData(
|
|
1664
|
+
if (a.isFormData(r)) {
|
|
1665
1665
|
if (F.hasStandardBrowserEnv || F.hasStandardBrowserWebWorkerEnv)
|
|
1666
1666
|
i.setContentType(void 0);
|
|
1667
1667
|
else if ((d = i.getContentType()) !== !1) {
|
|
@@ -1669,13 +1669,13 @@ const Lt = (e) => {
|
|
|
1669
1669
|
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
|
-
if (F.hasStandardBrowserEnv && (
|
|
1673
|
-
const l = s && o &&
|
|
1672
|
+
if (F.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && An(t.url))) {
|
|
1673
|
+
const l = s && o && _n.read(o);
|
|
1674
1674
|
l && i.set(s, l);
|
|
1675
1675
|
}
|
|
1676
1676
|
return t;
|
|
1677
|
-
},
|
|
1678
|
-
return new Promise(function(
|
|
1677
|
+
}, Nn = typeof XMLHttpRequest < "u", Cn = Nn && function(e) {
|
|
1678
|
+
return new Promise(function(r, n) {
|
|
1679
1679
|
const s = Lt(e);
|
|
1680
1680
|
let o = s.data;
|
|
1681
1681
|
const i = L.from(s.headers).normalize();
|
|
@@ -1698,22 +1698,22 @@ const Lt = (e) => {
|
|
|
1698
1698
|
config: e,
|
|
1699
1699
|
request: m
|
|
1700
1700
|
};
|
|
1701
|
-
vt(function(
|
|
1702
|
-
|
|
1703
|
-
}, function(
|
|
1704
|
-
|
|
1701
|
+
vt(function(N) {
|
|
1702
|
+
r(N), R();
|
|
1703
|
+
}, function(N) {
|
|
1704
|
+
n(N), R();
|
|
1705
1705
|
}, g), m = null;
|
|
1706
1706
|
}
|
|
1707
1707
|
"onloadend" in m ? m.onloadend = S : m.onreadystatechange = function() {
|
|
1708
1708
|
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1709
1709
|
}, m.onabort = function() {
|
|
1710
|
-
m && (
|
|
1710
|
+
m && (n(new y("Request aborted", y.ECONNABORTED, e, m)), m = null);
|
|
1711
1711
|
}, m.onerror = function() {
|
|
1712
|
-
|
|
1712
|
+
n(new y("Network Error", y.ERR_NETWORK, e, m)), m = null;
|
|
1713
1713
|
}, m.ontimeout = function() {
|
|
1714
1714
|
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1715
1715
|
const g = s.transitional || Ct;
|
|
1716
|
-
s.timeoutErrorMessage && (O = s.timeoutErrorMessage),
|
|
1716
|
+
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), n(new y(
|
|
1717
1717
|
O,
|
|
1718
1718
|
g.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1719
1719
|
e,
|
|
@@ -1722,24 +1722,24 @@ const Lt = (e) => {
|
|
|
1722
1722
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(O, g) {
|
|
1723
1723
|
m.setRequestHeader(g, O);
|
|
1724
1724
|
}), a.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), c && c !== "json" && (m.responseType = s.responseType), l && ([b, h] = pe(l, !0), m.addEventListener("progress", b)), d && m.upload && ([p, T] = pe(d), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", T)), (s.cancelToken || s.signal) && (u = (E) => {
|
|
1725
|
-
m && (
|
|
1725
|
+
m && (n(!E || E.type ? new X(null, e, m) : E), m.abort(), m = null);
|
|
1726
1726
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1727
|
-
const A =
|
|
1727
|
+
const A = gn(s.url);
|
|
1728
1728
|
if (A && F.protocols.indexOf(A) === -1) {
|
|
1729
|
-
|
|
1729
|
+
n(new y("Unsupported protocol " + A + ":", y.ERR_BAD_REQUEST, e));
|
|
1730
1730
|
return;
|
|
1731
1731
|
}
|
|
1732
1732
|
m.send(o || null);
|
|
1733
1733
|
});
|
|
1734
|
-
},
|
|
1735
|
-
const { length:
|
|
1736
|
-
if (t ||
|
|
1737
|
-
let
|
|
1734
|
+
}, kn = (e, t) => {
|
|
1735
|
+
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1736
|
+
if (t || r) {
|
|
1737
|
+
let n = new AbortController(), s;
|
|
1738
1738
|
const o = function(l) {
|
|
1739
1739
|
if (!s) {
|
|
1740
1740
|
s = !0, c();
|
|
1741
1741
|
const u = l instanceof Error ? l : this.reason;
|
|
1742
|
-
|
|
1742
|
+
n.abort(u instanceof y ? u : new X(u instanceof Error ? u.message : u));
|
|
1743
1743
|
}
|
|
1744
1744
|
};
|
|
1745
1745
|
let i = t && setTimeout(() => {
|
|
@@ -1751,22 +1751,22 @@ const Lt = (e) => {
|
|
|
1751
1751
|
}), e = null);
|
|
1752
1752
|
};
|
|
1753
1753
|
e.forEach((l) => l.addEventListener("abort", o));
|
|
1754
|
-
const { signal: d } =
|
|
1754
|
+
const { signal: d } = n;
|
|
1755
1755
|
return d.unsubscribe = () => a.asap(c), d;
|
|
1756
1756
|
}
|
|
1757
|
-
},
|
|
1758
|
-
let
|
|
1759
|
-
if (
|
|
1757
|
+
}, Fn = function* (e, t) {
|
|
1758
|
+
let r = e.byteLength;
|
|
1759
|
+
if (r < t) {
|
|
1760
1760
|
yield e;
|
|
1761
1761
|
return;
|
|
1762
1762
|
}
|
|
1763
|
-
let
|
|
1764
|
-
for (;
|
|
1765
|
-
s =
|
|
1766
|
-
},
|
|
1767
|
-
for await (const
|
|
1768
|
-
yield*
|
|
1769
|
-
},
|
|
1763
|
+
let n = 0, s;
|
|
1764
|
+
for (; n < r; )
|
|
1765
|
+
s = n + t, yield e.slice(n, s), n = s;
|
|
1766
|
+
}, vn = async function* (e, t) {
|
|
1767
|
+
for await (const r of jn(e))
|
|
1768
|
+
yield* Fn(r, t);
|
|
1769
|
+
}, jn = async function* (e) {
|
|
1770
1770
|
if (e[Symbol.asyncIterator]) {
|
|
1771
1771
|
yield* e;
|
|
1772
1772
|
return;
|
|
@@ -1774,18 +1774,18 @@ const Lt = (e) => {
|
|
|
1774
1774
|
const t = e.getReader();
|
|
1775
1775
|
try {
|
|
1776
1776
|
for (; ; ) {
|
|
1777
|
-
const { done:
|
|
1778
|
-
if (
|
|
1777
|
+
const { done: r, value: n } = await t.read();
|
|
1778
|
+
if (r)
|
|
1779
1779
|
break;
|
|
1780
|
-
yield
|
|
1780
|
+
yield n;
|
|
1781
1781
|
}
|
|
1782
1782
|
} finally {
|
|
1783
1783
|
await t.cancel();
|
|
1784
1784
|
}
|
|
1785
|
-
}, it = (e, t,
|
|
1786
|
-
const s =
|
|
1785
|
+
}, it = (e, t, r, n) => {
|
|
1786
|
+
const s = vn(e, t);
|
|
1787
1787
|
let o = 0, i, c = (d) => {
|
|
1788
|
-
i || (i = !0,
|
|
1788
|
+
i || (i = !0, n && n(d));
|
|
1789
1789
|
};
|
|
1790
1790
|
return new ReadableStream({
|
|
1791
1791
|
async pull(d) {
|
|
@@ -1796,9 +1796,9 @@ const Lt = (e) => {
|
|
|
1796
1796
|
return;
|
|
1797
1797
|
}
|
|
1798
1798
|
let p = u.byteLength;
|
|
1799
|
-
if (
|
|
1799
|
+
if (r) {
|
|
1800
1800
|
let b = o += p;
|
|
1801
|
-
|
|
1801
|
+
r(b);
|
|
1802
1802
|
}
|
|
1803
1803
|
d.enqueue(new Uint8Array(u));
|
|
1804
1804
|
} catch (l) {
|
|
@@ -1811,13 +1811,13 @@ const Lt = (e) => {
|
|
|
1811
1811
|
}, {
|
|
1812
1812
|
highWaterMark: 2
|
|
1813
1813
|
});
|
|
1814
|
-
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = we && typeof ReadableStream == "function",
|
|
1814
|
+
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = we && typeof ReadableStream == "function", Ln = we && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Dt = (e, ...t) => {
|
|
1815
1815
|
try {
|
|
1816
1816
|
return !!e(...t);
|
|
1817
1817
|
} catch {
|
|
1818
1818
|
return !1;
|
|
1819
1819
|
}
|
|
1820
|
-
},
|
|
1820
|
+
}, Un = Ut && Dt(() => {
|
|
1821
1821
|
let e = !1;
|
|
1822
1822
|
const t = new Request(F.origin, {
|
|
1823
1823
|
body: new ReadableStream(),
|
|
@@ -1832,12 +1832,12 @@ const Lt = (e) => {
|
|
|
1832
1832
|
};
|
|
1833
1833
|
we && ((e) => {
|
|
1834
1834
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1835
|
-
!he[t] && (he[t] = a.isFunction(e[t]) ? (
|
|
1836
|
-
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT,
|
|
1835
|
+
!he[t] && (he[t] = a.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1836
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, n);
|
|
1837
1837
|
});
|
|
1838
1838
|
});
|
|
1839
1839
|
})(new Response());
|
|
1840
|
-
const
|
|
1840
|
+
const Dn = async (e) => {
|
|
1841
1841
|
if (e == null)
|
|
1842
1842
|
return 0;
|
|
1843
1843
|
if (a.isBlob(e))
|
|
@@ -1850,15 +1850,15 @@ const Ur = async (e) => {
|
|
|
1850
1850
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1851
1851
|
return e.byteLength;
|
|
1852
1852
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1853
|
-
return (await
|
|
1854
|
-
},
|
|
1855
|
-
const
|
|
1856
|
-
return
|
|
1857
|
-
},
|
|
1853
|
+
return (await Ln(e)).byteLength;
|
|
1854
|
+
}, Bn = async (e, t) => {
|
|
1855
|
+
const r = a.toFiniteNumber(e.getContentLength());
|
|
1856
|
+
return r ?? Dn(t);
|
|
1857
|
+
}, qn = we && (async (e) => {
|
|
1858
1858
|
let {
|
|
1859
1859
|
url: t,
|
|
1860
|
-
method:
|
|
1861
|
-
data:
|
|
1860
|
+
method: r,
|
|
1861
|
+
data: n,
|
|
1862
1862
|
signal: s,
|
|
1863
1863
|
cancelToken: o,
|
|
1864
1864
|
timeout: i,
|
|
@@ -1870,24 +1870,24 @@ const Ur = async (e) => {
|
|
|
1870
1870
|
fetchOptions: b
|
|
1871
1871
|
} = Lt(e);
|
|
1872
1872
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1873
|
-
let T =
|
|
1873
|
+
let T = kn([s, o && o.toAbortSignal()], i), h;
|
|
1874
1874
|
const R = T && T.unsubscribe && (() => {
|
|
1875
1875
|
T.unsubscribe();
|
|
1876
1876
|
});
|
|
1877
1877
|
let m;
|
|
1878
1878
|
try {
|
|
1879
|
-
if (d &&
|
|
1879
|
+
if (d && Un && r !== "get" && r !== "head" && (m = await Bn(u, n)) !== 0) {
|
|
1880
1880
|
let g = new Request(t, {
|
|
1881
1881
|
method: "POST",
|
|
1882
|
-
body:
|
|
1882
|
+
body: n,
|
|
1883
1883
|
duplex: "half"
|
|
1884
|
-
}),
|
|
1885
|
-
if (a.isFormData(
|
|
1886
|
-
const [
|
|
1884
|
+
}), x;
|
|
1885
|
+
if (a.isFormData(n) && (x = g.headers.get("content-type")) && u.setContentType(x), g.body) {
|
|
1886
|
+
const [N, B] = nt(
|
|
1887
1887
|
m,
|
|
1888
1888
|
pe(st(d))
|
|
1889
1889
|
);
|
|
1890
|
-
|
|
1890
|
+
n = it(g.body, at, N, B);
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
1893
|
a.isString(p) || (p = p ? "include" : "omit");
|
|
@@ -1895,9 +1895,9 @@ const Ur = async (e) => {
|
|
|
1895
1895
|
h = new Request(t, {
|
|
1896
1896
|
...b,
|
|
1897
1897
|
signal: T,
|
|
1898
|
-
method:
|
|
1898
|
+
method: r.toUpperCase(),
|
|
1899
1899
|
headers: u.normalize().toJSON(),
|
|
1900
|
-
body:
|
|
1900
|
+
body: n,
|
|
1901
1901
|
duplex: "half",
|
|
1902
1902
|
credentials: S ? p : void 0
|
|
1903
1903
|
});
|
|
@@ -1908,12 +1908,12 @@ const Ur = async (e) => {
|
|
|
1908
1908
|
["status", "statusText", "headers"].forEach((v) => {
|
|
1909
1909
|
g[v] = A[v];
|
|
1910
1910
|
});
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1911
|
+
const x = a.toFiniteNumber(A.headers.get("content-length")), [N, B] = c && nt(
|
|
1912
|
+
x,
|
|
1913
1913
|
pe(st(c), !0)
|
|
1914
1914
|
) || [];
|
|
1915
1915
|
A = new Response(
|
|
1916
|
-
it(A.body, at,
|
|
1916
|
+
it(A.body, at, N, () => {
|
|
1917
1917
|
B && B(), R && R();
|
|
1918
1918
|
}),
|
|
1919
1919
|
g
|
|
@@ -1921,8 +1921,8 @@ const Ur = async (e) => {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
l = l || "text";
|
|
1923
1923
|
let O = await he[a.findKey(he, l) || "text"](A, e);
|
|
1924
|
-
return !E && R && R(), await new Promise((g,
|
|
1925
|
-
vt(g,
|
|
1924
|
+
return !E && R && R(), await new Promise((g, x) => {
|
|
1925
|
+
vt(g, x, {
|
|
1926
1926
|
data: O,
|
|
1927
1927
|
headers: L.from(A.headers),
|
|
1928
1928
|
status: A.status,
|
|
@@ -1940,9 +1940,9 @@ const Ur = async (e) => {
|
|
|
1940
1940
|
) : y.from(S, S && S.code, e, h);
|
|
1941
1941
|
}
|
|
1942
1942
|
}), je = {
|
|
1943
|
-
http:
|
|
1944
|
-
xhr:
|
|
1945
|
-
fetch:
|
|
1943
|
+
http: Qr,
|
|
1944
|
+
xhr: Cn,
|
|
1945
|
+
fetch: qn
|
|
1946
1946
|
};
|
|
1947
1947
|
a.forEach(je, (e, t) => {
|
|
1948
1948
|
if (e) {
|
|
@@ -1953,22 +1953,22 @@ a.forEach(je, (e, t) => {
|
|
|
1953
1953
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1954
1954
|
}
|
|
1955
1955
|
});
|
|
1956
|
-
const ct = (e) => `- ${e}`,
|
|
1956
|
+
const ct = (e) => `- ${e}`, In = (e) => a.isFunction(e) || e === null || e === !1, Bt = {
|
|
1957
1957
|
getAdapter: (e) => {
|
|
1958
1958
|
e = a.isArray(e) ? e : [e];
|
|
1959
1959
|
const { length: t } = e;
|
|
1960
|
-
let
|
|
1960
|
+
let r, n;
|
|
1961
1961
|
const s = {};
|
|
1962
1962
|
for (let o = 0; o < t; o++) {
|
|
1963
|
-
|
|
1963
|
+
r = e[o];
|
|
1964
1964
|
let i;
|
|
1965
|
-
if (
|
|
1965
|
+
if (n = r, !In(r) && (n = je[(i = String(r)).toLowerCase()], n === void 0))
|
|
1966
1966
|
throw new y(`Unknown adapter '${i}'`);
|
|
1967
|
-
if (
|
|
1967
|
+
if (n)
|
|
1968
1968
|
break;
|
|
1969
|
-
s[i || "#" + o] =
|
|
1969
|
+
s[i || "#" + o] = n;
|
|
1970
1970
|
}
|
|
1971
|
-
if (!
|
|
1971
|
+
if (!n) {
|
|
1972
1972
|
const o = Object.entries(s).map(
|
|
1973
1973
|
([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1974
1974
|
);
|
|
@@ -1980,79 +1980,79 @@ const ct = (e) => `- ${e}`, qr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1980
1980
|
"ERR_NOT_SUPPORT"
|
|
1981
1981
|
);
|
|
1982
1982
|
}
|
|
1983
|
-
return
|
|
1983
|
+
return n;
|
|
1984
1984
|
},
|
|
1985
1985
|
adapters: je
|
|
1986
1986
|
};
|
|
1987
|
-
function
|
|
1987
|
+
function Ne(e) {
|
|
1988
1988
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1989
1989
|
throw new X(null, e);
|
|
1990
1990
|
}
|
|
1991
1991
|
function lt(e) {
|
|
1992
|
-
return
|
|
1992
|
+
return Ne(e), e.headers = L.from(e.headers), e.data = xe.call(
|
|
1993
1993
|
e,
|
|
1994
1994
|
e.transformRequest
|
|
1995
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Bt.getAdapter(e.adapter || ae.adapter)(e).then(function(
|
|
1996
|
-
return
|
|
1995
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Bt.getAdapter(e.adapter || ae.adapter)(e).then(function(n) {
|
|
1996
|
+
return Ne(e), n.data = xe.call(
|
|
1997
1997
|
e,
|
|
1998
1998
|
e.transformResponse,
|
|
1999
|
-
|
|
2000
|
-
),
|
|
2001
|
-
}, function(
|
|
2002
|
-
return Ft(
|
|
1999
|
+
n
|
|
2000
|
+
), n.headers = L.from(n.headers), n;
|
|
2001
|
+
}, function(n) {
|
|
2002
|
+
return Ft(n) || (Ne(e), n && n.response && (n.response.data = xe.call(
|
|
2003
2003
|
e,
|
|
2004
2004
|
e.transformResponse,
|
|
2005
|
-
|
|
2006
|
-
),
|
|
2005
|
+
n.response
|
|
2006
|
+
), n.response.headers = L.from(n.response.headers))), Promise.reject(n);
|
|
2007
2007
|
});
|
|
2008
2008
|
}
|
|
2009
2009
|
const qt = "1.9.0", Te = {};
|
|
2010
2010
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2011
|
-
Te[e] = function(
|
|
2012
|
-
return typeof
|
|
2011
|
+
Te[e] = function(n) {
|
|
2012
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2013
2013
|
};
|
|
2014
2014
|
});
|
|
2015
2015
|
const ut = {};
|
|
2016
|
-
Te.transitional = function(t,
|
|
2016
|
+
Te.transitional = function(t, r, n) {
|
|
2017
2017
|
function s(o, i) {
|
|
2018
|
-
return "[Axios v" + qt + "] Transitional option '" + o + "'" + i + (
|
|
2018
|
+
return "[Axios v" + qt + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
2019
2019
|
}
|
|
2020
2020
|
return (o, i, c) => {
|
|
2021
2021
|
if (t === !1)
|
|
2022
2022
|
throw new y(
|
|
2023
|
-
s(i, " has been removed" + (
|
|
2023
|
+
s(i, " has been removed" + (r ? " in " + r : "")),
|
|
2024
2024
|
y.ERR_DEPRECATED
|
|
2025
2025
|
);
|
|
2026
|
-
return
|
|
2026
|
+
return r && !ut[i] && (ut[i] = !0, console.warn(
|
|
2027
2027
|
s(
|
|
2028
2028
|
i,
|
|
2029
|
-
" has been deprecated since v" +
|
|
2029
|
+
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
2030
2030
|
)
|
|
2031
2031
|
)), t ? t(o, i, c) : !0;
|
|
2032
2032
|
};
|
|
2033
2033
|
};
|
|
2034
2034
|
Te.spelling = function(t) {
|
|
2035
|
-
return (
|
|
2035
|
+
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
2036
2036
|
};
|
|
2037
|
-
function
|
|
2037
|
+
function $n(e, t, r) {
|
|
2038
2038
|
if (typeof e != "object")
|
|
2039
2039
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
2040
|
-
const
|
|
2041
|
-
let s =
|
|
2040
|
+
const n = Object.keys(e);
|
|
2041
|
+
let s = n.length;
|
|
2042
2042
|
for (; s-- > 0; ) {
|
|
2043
|
-
const o =
|
|
2043
|
+
const o = n[s], i = t[o];
|
|
2044
2044
|
if (i) {
|
|
2045
2045
|
const c = e[o], d = c === void 0 || i(c, o, e);
|
|
2046
2046
|
if (d !== !0)
|
|
2047
2047
|
throw new y("option " + o + " must be " + d, y.ERR_BAD_OPTION_VALUE);
|
|
2048
2048
|
continue;
|
|
2049
2049
|
}
|
|
2050
|
-
if (
|
|
2050
|
+
if (r !== !0)
|
|
2051
2051
|
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
2052
2052
|
}
|
|
2053
2053
|
}
|
|
2054
2054
|
const fe = {
|
|
2055
|
-
assertOptions:
|
|
2055
|
+
assertOptions: $n,
|
|
2056
2056
|
validators: Te
|
|
2057
2057
|
}, I = fe.validators;
|
|
2058
2058
|
let J = class {
|
|
@@ -2070,53 +2070,53 @@ let J = class {
|
|
|
2070
2070
|
*
|
|
2071
2071
|
* @returns {Promise} The Promise to be fulfilled
|
|
2072
2072
|
*/
|
|
2073
|
-
async request(t,
|
|
2073
|
+
async request(t, r) {
|
|
2074
2074
|
try {
|
|
2075
|
-
return await this._request(t,
|
|
2076
|
-
} catch (
|
|
2077
|
-
if (
|
|
2075
|
+
return await this._request(t, r);
|
|
2076
|
+
} catch (n) {
|
|
2077
|
+
if (n instanceof Error) {
|
|
2078
2078
|
let s = {};
|
|
2079
2079
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2080
2080
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
2081
2081
|
try {
|
|
2082
|
-
|
|
2083
|
-
` + o) :
|
|
2082
|
+
n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
2083
|
+
` + o) : n.stack = o;
|
|
2084
2084
|
} catch {
|
|
2085
2085
|
}
|
|
2086
2086
|
}
|
|
2087
|
-
throw
|
|
2087
|
+
throw n;
|
|
2088
2088
|
}
|
|
2089
2089
|
}
|
|
2090
|
-
_request(t,
|
|
2091
|
-
typeof t == "string" ? (
|
|
2092
|
-
const { transitional:
|
|
2093
|
-
|
|
2090
|
+
_request(t, r) {
|
|
2091
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = W(this.defaults, r);
|
|
2092
|
+
const { transitional: n, paramsSerializer: s, headers: o } = r;
|
|
2093
|
+
n !== void 0 && fe.assertOptions(n, {
|
|
2094
2094
|
silentJSONParsing: I.transitional(I.boolean),
|
|
2095
2095
|
forcedJSONParsing: I.transitional(I.boolean),
|
|
2096
2096
|
clarifyTimeoutError: I.transitional(I.boolean)
|
|
2097
|
-
}, !1), s != null && (a.isFunction(s) ?
|
|
2097
|
+
}, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
2098
2098
|
serialize: s
|
|
2099
2099
|
} : fe.assertOptions(s, {
|
|
2100
2100
|
encode: I.function,
|
|
2101
2101
|
serialize: I.function
|
|
2102
|
-
}, !0)),
|
|
2102
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), fe.assertOptions(r, {
|
|
2103
2103
|
baseUrl: I.spelling("baseURL"),
|
|
2104
2104
|
withXsrfToken: I.spelling("withXSRFToken")
|
|
2105
|
-
}, !0),
|
|
2105
|
+
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
2106
2106
|
let i = o && a.merge(
|
|
2107
2107
|
o.common,
|
|
2108
|
-
o[
|
|
2108
|
+
o[r.method]
|
|
2109
2109
|
);
|
|
2110
2110
|
o && a.forEach(
|
|
2111
2111
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2112
2112
|
(h) => {
|
|
2113
2113
|
delete o[h];
|
|
2114
2114
|
}
|
|
2115
|
-
),
|
|
2115
|
+
), r.headers = L.concat(i, o);
|
|
2116
2116
|
const c = [];
|
|
2117
2117
|
let d = !0;
|
|
2118
2118
|
this.interceptors.request.forEach(function(R) {
|
|
2119
|
-
typeof R.runWhen == "function" && R.runWhen(
|
|
2119
|
+
typeof R.runWhen == "function" && R.runWhen(r) === !1 || (d = d && R.synchronous, c.unshift(R.fulfilled, R.rejected));
|
|
2120
2120
|
});
|
|
2121
2121
|
const l = [];
|
|
2122
2122
|
this.interceptors.response.forEach(function(R) {
|
|
@@ -2125,12 +2125,12 @@ let J = class {
|
|
|
2125
2125
|
let u, p = 0, b;
|
|
2126
2126
|
if (!d) {
|
|
2127
2127
|
const h = [lt.bind(this), void 0];
|
|
2128
|
-
for (h.unshift.apply(h, c), h.push.apply(h, l), b = h.length, u = Promise.resolve(
|
|
2128
|
+
for (h.unshift.apply(h, c), h.push.apply(h, l), b = h.length, u = Promise.resolve(r); p < b; )
|
|
2129
2129
|
u = u.then(h[p++], h[p++]);
|
|
2130
2130
|
return u;
|
|
2131
2131
|
}
|
|
2132
2132
|
b = c.length;
|
|
2133
|
-
let T =
|
|
2133
|
+
let T = r;
|
|
2134
2134
|
for (p = 0; p < b; ) {
|
|
2135
2135
|
const h = c[p++], R = c[p++];
|
|
2136
2136
|
try {
|
|
@@ -2151,25 +2151,25 @@ let J = class {
|
|
|
2151
2151
|
}
|
|
2152
2152
|
getUri(t) {
|
|
2153
2153
|
t = W(this.defaults, t);
|
|
2154
|
-
const
|
|
2155
|
-
return
|
|
2154
|
+
const r = jt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2155
|
+
return Nt(r, t.params, t.paramsSerializer);
|
|
2156
2156
|
}
|
|
2157
2157
|
};
|
|
2158
2158
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2159
|
-
J.prototype[t] = function(
|
|
2160
|
-
return this.request(W(
|
|
2159
|
+
J.prototype[t] = function(r, n) {
|
|
2160
|
+
return this.request(W(n || {}, {
|
|
2161
2161
|
method: t,
|
|
2162
|
-
url:
|
|
2163
|
-
data: (
|
|
2162
|
+
url: r,
|
|
2163
|
+
data: (n || {}).data
|
|
2164
2164
|
}));
|
|
2165
2165
|
};
|
|
2166
2166
|
});
|
|
2167
2167
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
2168
|
-
function n
|
|
2168
|
+
function r(n) {
|
|
2169
2169
|
return function(o, i, c) {
|
|
2170
2170
|
return this.request(W(c || {}, {
|
|
2171
2171
|
method: t,
|
|
2172
|
-
headers:
|
|
2172
|
+
headers: n ? {
|
|
2173
2173
|
"Content-Type": "multipart/form-data"
|
|
2174
2174
|
} : {},
|
|
2175
2175
|
url: o,
|
|
@@ -2177,33 +2177,33 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
2177
2177
|
}));
|
|
2178
2178
|
};
|
|
2179
2179
|
}
|
|
2180
|
-
J.prototype[t] =
|
|
2180
|
+
J.prototype[t] = r(), J.prototype[t + "Form"] = r(!0);
|
|
2181
2181
|
});
|
|
2182
|
-
let
|
|
2182
|
+
let Mn = class It {
|
|
2183
2183
|
constructor(t) {
|
|
2184
2184
|
if (typeof t != "function")
|
|
2185
2185
|
throw new TypeError("executor must be a function.");
|
|
2186
|
-
let
|
|
2186
|
+
let r;
|
|
2187
2187
|
this.promise = new Promise(function(o) {
|
|
2188
|
-
|
|
2188
|
+
r = o;
|
|
2189
2189
|
});
|
|
2190
|
-
const
|
|
2190
|
+
const n = this;
|
|
2191
2191
|
this.promise.then((s) => {
|
|
2192
|
-
if (!
|
|
2193
|
-
let o =
|
|
2192
|
+
if (!n._listeners) return;
|
|
2193
|
+
let o = n._listeners.length;
|
|
2194
2194
|
for (; o-- > 0; )
|
|
2195
|
-
|
|
2196
|
-
|
|
2195
|
+
n._listeners[o](s);
|
|
2196
|
+
n._listeners = null;
|
|
2197
2197
|
}), this.promise.then = (s) => {
|
|
2198
2198
|
let o;
|
|
2199
2199
|
const i = new Promise((c) => {
|
|
2200
|
-
|
|
2200
|
+
n.subscribe(c), o = c;
|
|
2201
2201
|
}).then(s);
|
|
2202
2202
|
return i.cancel = function() {
|
|
2203
|
-
|
|
2203
|
+
n.unsubscribe(o);
|
|
2204
2204
|
}, i;
|
|
2205
2205
|
}, t(function(o, i, c) {
|
|
2206
|
-
|
|
2206
|
+
n.reason || (n.reason = new X(o, i, c), r(n.reason));
|
|
2207
2207
|
});
|
|
2208
2208
|
}
|
|
2209
2209
|
/**
|
|
@@ -2229,14 +2229,14 @@ let $r = class It {
|
|
|
2229
2229
|
unsubscribe(t) {
|
|
2230
2230
|
if (!this._listeners)
|
|
2231
2231
|
return;
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2232
|
+
const r = this._listeners.indexOf(t);
|
|
2233
|
+
r !== -1 && this._listeners.splice(r, 1);
|
|
2234
2234
|
}
|
|
2235
2235
|
toAbortSignal() {
|
|
2236
|
-
const t = new AbortController(),
|
|
2237
|
-
t.abort(
|
|
2236
|
+
const t = new AbortController(), r = (n) => {
|
|
2237
|
+
t.abort(n);
|
|
2238
2238
|
};
|
|
2239
|
-
return this.subscribe(
|
|
2239
|
+
return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), t.signal;
|
|
2240
2240
|
}
|
|
2241
2241
|
/**
|
|
2242
2242
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -2252,12 +2252,12 @@ let $r = class It {
|
|
|
2252
2252
|
};
|
|
2253
2253
|
}
|
|
2254
2254
|
};
|
|
2255
|
-
function
|
|
2256
|
-
return function(
|
|
2257
|
-
return e.apply(null,
|
|
2255
|
+
function Hn(e) {
|
|
2256
|
+
return function(r) {
|
|
2257
|
+
return e.apply(null, r);
|
|
2258
2258
|
};
|
|
2259
2259
|
}
|
|
2260
|
-
function
|
|
2260
|
+
function zn(e) {
|
|
2261
2261
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
2262
2262
|
}
|
|
2263
2263
|
const Le = {
|
|
@@ -2329,59 +2329,61 @@ Object.entries(Le).forEach(([e, t]) => {
|
|
|
2329
2329
|
Le[t] = e;
|
|
2330
2330
|
});
|
|
2331
2331
|
function $t(e) {
|
|
2332
|
-
const t = new J(e),
|
|
2333
|
-
return a.extend(
|
|
2332
|
+
const t = new J(e), r = Et(J.prototype.request, t);
|
|
2333
|
+
return a.extend(r, J.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
2334
2334
|
return $t(W(e, s));
|
|
2335
|
-
},
|
|
2335
|
+
}, r;
|
|
2336
2336
|
}
|
|
2337
|
-
const
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2337
|
+
const P = $t(ae);
|
|
2338
|
+
P.Axios = J;
|
|
2339
|
+
P.CanceledError = X;
|
|
2340
|
+
P.CancelToken = Mn;
|
|
2341
|
+
P.isCancel = Ft;
|
|
2342
|
+
P.VERSION = qt;
|
|
2343
|
+
P.toFormData = ye;
|
|
2344
|
+
P.AxiosError = y;
|
|
2345
|
+
P.Cancel = P.CanceledError;
|
|
2346
|
+
P.all = function(t) {
|
|
2347
2347
|
return Promise.all(t);
|
|
2348
2348
|
};
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2349
|
+
P.spread = Hn;
|
|
2350
|
+
P.isAxiosError = zn;
|
|
2351
|
+
P.mergeConfig = W;
|
|
2352
|
+
P.AxiosHeaders = L;
|
|
2353
|
+
P.formToJSON = (e) => kt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
2354
|
+
P.getAdapter = Bt.getAdapter;
|
|
2355
|
+
P.HttpStatusCode = Le;
|
|
2356
|
+
P.default = P;
|
|
2357
2357
|
const {
|
|
2358
|
-
Axios:
|
|
2359
|
-
AxiosError:
|
|
2360
|
-
CanceledError:
|
|
2358
|
+
Axios: es,
|
|
2359
|
+
AxiosError: ts,
|
|
2360
|
+
CanceledError: rs,
|
|
2361
2361
|
isCancel: ns,
|
|
2362
|
-
CancelToken:
|
|
2363
|
-
VERSION:
|
|
2364
|
-
all:
|
|
2365
|
-
Cancel:
|
|
2366
|
-
isAxiosError:
|
|
2367
|
-
spread:
|
|
2368
|
-
toFormData:
|
|
2369
|
-
AxiosHeaders:
|
|
2370
|
-
HttpStatusCode:
|
|
2371
|
-
formToJSON:
|
|
2372
|
-
getAdapter:
|
|
2373
|
-
mergeConfig:
|
|
2374
|
-
} =
|
|
2362
|
+
CancelToken: ss,
|
|
2363
|
+
VERSION: os,
|
|
2364
|
+
all: is,
|
|
2365
|
+
Cancel: as,
|
|
2366
|
+
isAxiosError: cs,
|
|
2367
|
+
spread: ls,
|
|
2368
|
+
toFormData: us,
|
|
2369
|
+
AxiosHeaders: fs,
|
|
2370
|
+
HttpStatusCode: ds,
|
|
2371
|
+
formToJSON: ps,
|
|
2372
|
+
getAdapter: hs,
|
|
2373
|
+
mergeConfig: ms
|
|
2374
|
+
} = P, Rs = (e) => P.create({
|
|
2375
2375
|
timeout: 2 * 60 * 1e3,
|
|
2376
2376
|
...e
|
|
2377
2377
|
});
|
|
2378
2378
|
export {
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2379
|
+
Kn as AuthStateProvider,
|
|
2380
|
+
de as ERequestContentType,
|
|
2381
|
+
Qt as ERequestMethod,
|
|
2382
|
+
Gn as FetcherProvider,
|
|
2383
|
+
Rs as createAxiosInstance,
|
|
2384
|
+
Vn as createGraphQLFetcher,
|
|
2385
|
+
Yn as createRestFulFetcher,
|
|
2386
|
+
Xn as getGraphQLResponseFormatError,
|
|
2387
|
+
dr as getRestFulResponseFormatError,
|
|
2388
|
+
ur as useAuthState
|
|
2387
2389
|
};
|