@acrool/react-fetcher 0.0.2-alpha.7 → 0.0.2-alpha.8
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var Jt = Object.defineProperty;
|
|
2
|
-
var Wt = (e, t,
|
|
3
|
-
var $ = (e, t,
|
|
2
|
+
var Wt = (e, t, r) => t in e ? Jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var $ = (e, t, r) => Wt(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import Vt, { createContext as dt, useContext as Yt, useState as We, useEffect as Kt, useLayoutEffect as Xt } from "react";
|
|
5
5
|
function pt(e) {
|
|
6
6
|
return new Promise((t) => {
|
|
@@ -9,31 +9,31 @@ function pt(e) {
|
|
|
9
9
|
}, e);
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
const ht = 400, Gt = (e) => "File" in window && e instanceof File, Zt = (e) => "Blob" in window && e instanceof Blob, mt = (e, t = ["variables"]) => e && Object.keys(e).reduce((
|
|
13
|
-
const s = e[
|
|
12
|
+
const ht = 400, Gt = (e) => "File" in window && e instanceof File, Zt = (e) => "Blob" in window && e instanceof Blob, mt = (e, t = ["variables"]) => e && Object.keys(e).reduce((r, n) => {
|
|
13
|
+
const s = e[n];
|
|
14
14
|
if (Gt(s) || Zt(s)) {
|
|
15
15
|
const o = s;
|
|
16
16
|
return {
|
|
17
|
-
variables: { ...
|
|
18
|
-
map: [...
|
|
19
|
-
values: [...
|
|
17
|
+
variables: { ...r.variables, [n]: null },
|
|
18
|
+
map: [...r.map, t.concat(n).join(".")],
|
|
19
|
+
values: [...r.values, o]
|
|
20
20
|
};
|
|
21
21
|
} else if (s && typeof s == "object") {
|
|
22
|
-
const o = mt(s, t.concat(
|
|
22
|
+
const o = mt(s, t.concat(n));
|
|
23
23
|
return {
|
|
24
|
-
variables: { ...
|
|
25
|
-
map: [...
|
|
26
|
-
values: [...
|
|
24
|
+
variables: { ...r.variables, [n]: o.variables },
|
|
25
|
+
map: [...r.map, ...o.map],
|
|
26
|
+
values: [...r.values, ...o.values]
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
return {
|
|
30
|
-
...
|
|
31
|
-
variables: { ...
|
|
32
|
-
values:
|
|
30
|
+
...r,
|
|
31
|
+
variables: { ...r.variables, [n]: s },
|
|
32
|
+
values: r.values
|
|
33
33
|
};
|
|
34
|
-
}, { variables: {}, map: [], values: [] }),
|
|
35
|
-
let
|
|
36
|
-
const o =
|
|
34
|
+
}, { variables: {}, map: [], values: [] }), Jn = (e, t) => async (r) => {
|
|
35
|
+
let n, s;
|
|
36
|
+
const o = r == null ? void 0 : r.fetchOptions, i = r == null ? void 0 : r.variables;
|
|
37
37
|
let c = !1;
|
|
38
38
|
if (i) {
|
|
39
39
|
const p = mt(i);
|
|
@@ -47,19 +47,19 @@ const ht = 400, Gt = (e) => "File" in window && e instanceof File, Zt = (e) => "
|
|
|
47
47
|
{ name: "map", value: JSON.stringify(T) },
|
|
48
48
|
...p.values.map((R, m) => ({ name: m, value: R }))
|
|
49
49
|
];
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
n = new FormData(), h.forEach((R) => {
|
|
51
|
+
n.append(R.name.toString(), R.value);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
c || (s = "application/json",
|
|
55
|
+
c || (s = "application/json", n = JSON.stringify({ query: t, variables: i }));
|
|
56
56
|
const d = "", l = {
|
|
57
57
|
"Content-Type": s,
|
|
58
58
|
"Apollo-Require-Preflight": "true",
|
|
59
59
|
"X-Requested-With": "XMLHttpRequest",
|
|
60
60
|
...o == null ? void 0 : o.headers
|
|
61
61
|
}, [u] = await Promise.all([
|
|
62
|
-
e.post(d,
|
|
62
|
+
e.post(d, n, {
|
|
63
63
|
...o,
|
|
64
64
|
headers: l
|
|
65
65
|
}),
|
|
@@ -69,8 +69,8 @@ const ht = 400, Gt = (e) => "File" in window && e instanceof File, Zt = (e) => "
|
|
|
69
69
|
};
|
|
70
70
|
var V = /* @__PURE__ */ ((e) => (e.formData = "multipart/form-data", e.formUrlDecode = "application/x-www-form-urlencoded", e.json = "application/json", e))(V || {});
|
|
71
71
|
function Qt(e) {
|
|
72
|
-
const t = new FormData(),
|
|
73
|
-
for (const [o, i] of Object.entries(
|
|
72
|
+
const t = new FormData(), r = (n, s = "") => {
|
|
73
|
+
for (const [o, i] of Object.entries(n)) {
|
|
74
74
|
const c = s ? `${s}[${o}]` : o;
|
|
75
75
|
if (i instanceof File)
|
|
76
76
|
t.append(c, i);
|
|
@@ -78,18 +78,18 @@ function Qt(e) {
|
|
|
78
78
|
const d = i.type.split("/")[1] || "bin", l = `${o}.${d}`;
|
|
79
79
|
t.append(c, i, l);
|
|
80
80
|
} else Array.isArray(i) ? i.forEach((d, l) => {
|
|
81
|
-
typeof d == "object" && d !== null ?
|
|
82
|
-
}) : typeof i == "object" && i !== null ?
|
|
81
|
+
typeof d == "object" && d !== null ? r(d, `${c}[${l}]`) : t.append(`${c}[${l}]`, d);
|
|
82
|
+
}) : typeof i == "object" && i !== null ? r(i, c) : i != null && t.append(c, i);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
return
|
|
85
|
+
return r(e), t;
|
|
86
86
|
}
|
|
87
87
|
function Ve(e, t) {
|
|
88
88
|
if (t === V.formData) {
|
|
89
|
-
const
|
|
89
|
+
const r = Qt(e);
|
|
90
90
|
return {
|
|
91
91
|
contentType: t,
|
|
92
|
-
body:
|
|
92
|
+
body: r
|
|
93
93
|
};
|
|
94
94
|
} else return t === V.formUrlDecode ? {
|
|
95
95
|
contentType: t,
|
|
@@ -99,27 +99,29 @@ function Ve(e, t) {
|
|
|
99
99
|
body: JSON.stringify(e)
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const Wn = (e, t) => async (r) => {
|
|
103
103
|
var d;
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
106
|
-
const { body: l, contentType: u } = Ve((
|
|
104
|
+
const n = t == null ? void 0 : t.method, s = (d = r == null ? void 0 : r.fetchOptions) == null ? void 0 : d.fetchOptions, o = r == null ? void 0 : r.params, i = () => {
|
|
105
|
+
if (n && ["post", "put"].includes(n.toLowerCase())) {
|
|
106
|
+
const { body: l, contentType: u } = Ve((r == null ? void 0 : r.body) ?? {}, V.formData);
|
|
107
107
|
return {
|
|
108
108
|
url: t.url,
|
|
109
|
-
method:
|
|
109
|
+
method: n,
|
|
110
110
|
data: l,
|
|
111
|
+
...s,
|
|
111
112
|
headers: {
|
|
112
113
|
...s == null ? void 0 : s.headers,
|
|
113
114
|
"Content-Type": u
|
|
114
115
|
}
|
|
115
116
|
};
|
|
116
117
|
}
|
|
117
|
-
if (
|
|
118
|
-
const { body: l, contentType: u } = Ve((
|
|
118
|
+
if (n && ["delete"].includes(n.toLowerCase())) {
|
|
119
|
+
const { body: l, contentType: u } = Ve((r == null ? void 0 : r.body) ?? {}, V.formUrlDecode);
|
|
119
120
|
return {
|
|
120
121
|
url: t.url,
|
|
121
|
-
method:
|
|
122
|
+
method: n,
|
|
122
123
|
data: l,
|
|
124
|
+
...s,
|
|
123
125
|
headers: {
|
|
124
126
|
...s == null ? void 0 : s.headers,
|
|
125
127
|
"Content-Type": u
|
|
@@ -128,8 +130,9 @@ const Wr = (e, t) => async (n) => {
|
|
|
128
130
|
}
|
|
129
131
|
return {
|
|
130
132
|
url: t.url,
|
|
131
|
-
method:
|
|
133
|
+
method: n,
|
|
132
134
|
params: o,
|
|
135
|
+
...s,
|
|
133
136
|
headers: {
|
|
134
137
|
...s == null ? void 0 : s.headers,
|
|
135
138
|
"Content-Type": V.json
|
|
@@ -152,11 +155,11 @@ var ce = { exports: {} }, G = {};
|
|
|
152
155
|
* LICENSE file in the root directory of this source tree.
|
|
153
156
|
*/
|
|
154
157
|
var Ye;
|
|
155
|
-
function
|
|
158
|
+
function er() {
|
|
156
159
|
if (Ye) return G;
|
|
157
160
|
Ye = 1;
|
|
158
161
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
159
|
-
function n
|
|
162
|
+
function r(n, s, o) {
|
|
160
163
|
var i = null;
|
|
161
164
|
if (o !== void 0 && (i = "" + o), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
162
165
|
o = {};
|
|
@@ -165,13 +168,13 @@ function en() {
|
|
|
165
168
|
} else o = s;
|
|
166
169
|
return s = o.ref, {
|
|
167
170
|
$$typeof: e,
|
|
168
|
-
type:
|
|
171
|
+
type: n,
|
|
169
172
|
key: i,
|
|
170
173
|
ref: s !== void 0 ? s : null,
|
|
171
174
|
props: o
|
|
172
175
|
};
|
|
173
176
|
}
|
|
174
|
-
return G.Fragment = t, G.jsx =
|
|
177
|
+
return G.Fragment = t, G.jsx = r, G.jsxs = r, G;
|
|
175
178
|
}
|
|
176
179
|
var Z = {};
|
|
177
180
|
/**
|
|
@@ -184,7 +187,7 @@ var Z = {};
|
|
|
184
187
|
* LICENSE file in the root directory of this source tree.
|
|
185
188
|
*/
|
|
186
189
|
var Ke;
|
|
187
|
-
function
|
|
190
|
+
function tr() {
|
|
188
191
|
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
189
192
|
function e(f) {
|
|
190
193
|
if (f == null) return null;
|
|
@@ -220,7 +223,7 @@ function tn() {
|
|
|
220
223
|
return f = f.displayName, f || (f = w.displayName || w.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
221
224
|
case U:
|
|
222
225
|
return w = f.displayName || null, w !== null ? w : e(f.type) || "Memo";
|
|
223
|
-
case
|
|
226
|
+
case P:
|
|
224
227
|
w = f._payload, f = f._init;
|
|
225
228
|
try {
|
|
226
229
|
return e(f(w));
|
|
@@ -232,7 +235,7 @@ function tn() {
|
|
|
232
235
|
function t(f) {
|
|
233
236
|
return "" + f;
|
|
234
237
|
}
|
|
235
|
-
function
|
|
238
|
+
function r(f) {
|
|
236
239
|
try {
|
|
237
240
|
t(f);
|
|
238
241
|
var w = !1;
|
|
@@ -241,17 +244,17 @@ function tn() {
|
|
|
241
244
|
}
|
|
242
245
|
if (w) {
|
|
243
246
|
w = console;
|
|
244
|
-
var _ = w.error,
|
|
247
|
+
var _ = w.error, C = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
245
248
|
return _.call(
|
|
246
249
|
w,
|
|
247
250
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
248
|
-
|
|
251
|
+
C
|
|
249
252
|
), t(f);
|
|
250
253
|
}
|
|
251
254
|
}
|
|
252
|
-
function
|
|
255
|
+
function n(f) {
|
|
253
256
|
if (f === R) return "<>";
|
|
254
|
-
if (typeof f == "object" && f !== null && f.$$typeof ===
|
|
257
|
+
if (typeof f == "object" && f !== null && f.$$typeof === P)
|
|
255
258
|
return "<...>";
|
|
256
259
|
try {
|
|
257
260
|
var w = e(f);
|
|
@@ -292,7 +295,7 @@ function tn() {
|
|
|
292
295
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
293
296
|
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
294
297
|
}
|
|
295
|
-
function l(f, w, _,
|
|
298
|
+
function l(f, w, _, C, M, B, ge, Oe) {
|
|
296
299
|
return _ = B.ref, f = {
|
|
297
300
|
$$typeof: T,
|
|
298
301
|
type: f,
|
|
@@ -324,13 +327,13 @@ function tn() {
|
|
|
324
327
|
value: Oe
|
|
325
328
|
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
326
329
|
}
|
|
327
|
-
function u(f, w, _,
|
|
330
|
+
function u(f, w, _, C, M, B, ge, Oe) {
|
|
328
331
|
var k = w.children;
|
|
329
332
|
if (k !== void 0)
|
|
330
|
-
if (
|
|
333
|
+
if (C)
|
|
331
334
|
if (Ht(k)) {
|
|
332
|
-
for (
|
|
333
|
-
p(k[
|
|
335
|
+
for (C = 0; C < k.length; C++)
|
|
336
|
+
p(k[C]);
|
|
334
337
|
Object.freeze && Object.freeze(k);
|
|
335
338
|
} else
|
|
336
339
|
console.error(
|
|
@@ -342,20 +345,20 @@ function tn() {
|
|
|
342
345
|
var W = Object.keys(w).filter(function(zt) {
|
|
343
346
|
return zt !== "key";
|
|
344
347
|
});
|
|
345
|
-
|
|
348
|
+
C = 0 < W.length ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}", Je[k + C] || (W = 0 < W.length ? "{" + W.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
346
349
|
`A props object containing a "key" prop is being spread into JSX:
|
|
347
350
|
let props = %s;
|
|
348
351
|
<%s {...props} />
|
|
349
352
|
React keys must be passed directly to JSX without using spread:
|
|
350
353
|
let props = %s;
|
|
351
354
|
<%s key={someKey} {...props} />`,
|
|
352
|
-
|
|
355
|
+
C,
|
|
353
356
|
k,
|
|
354
357
|
W,
|
|
355
358
|
k
|
|
356
|
-
), Je[k +
|
|
359
|
+
), Je[k + C] = !0);
|
|
357
360
|
}
|
|
358
|
-
if (k = null, _ !== void 0 && (
|
|
361
|
+
if (k = null, _ !== void 0 && (r(_), k = "" + _), i(w) && (r(w.key), k = "" + w.key), "key" in w) {
|
|
359
362
|
_ = {};
|
|
360
363
|
for (var Ae in w)
|
|
361
364
|
Ae !== "key" && (_[Ae] = w[Ae]);
|
|
@@ -377,7 +380,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
377
380
|
function p(f) {
|
|
378
381
|
typeof f == "object" && f !== null && f.$$typeof === T && f._store && (f._store.validated = 1);
|
|
379
382
|
}
|
|
380
|
-
var b = Vt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), S = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"),
|
|
383
|
+
var b = Vt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), S = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), N = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), I = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), Te = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ie = Object.prototype.hasOwnProperty, Ht = Array.isArray, Se = console.createTask ? console.createTask : function() {
|
|
381
384
|
return null;
|
|
382
385
|
};
|
|
383
386
|
b = {
|
|
@@ -388,40 +391,40 @@ React keys must be passed directly to JSX without using spread:
|
|
|
388
391
|
var $e, Me = {}, He = b["react-stack-bottom-frame"].bind(
|
|
389
392
|
b,
|
|
390
393
|
o
|
|
391
|
-
)(), ze = Se(
|
|
392
|
-
Z.Fragment = R, Z.jsx = function(f, w, _,
|
|
394
|
+
)(), ze = Se(n(o)), Je = {};
|
|
395
|
+
Z.Fragment = R, Z.jsx = function(f, w, _, C, M) {
|
|
393
396
|
var B = 1e4 > Te.recentlyCreatedOwnerStacks++;
|
|
394
397
|
return u(
|
|
395
398
|
f,
|
|
396
399
|
w,
|
|
397
400
|
_,
|
|
398
401
|
!1,
|
|
399
|
-
|
|
402
|
+
C,
|
|
400
403
|
M,
|
|
401
404
|
B ? Error("react-stack-top-frame") : He,
|
|
402
|
-
B ? Se(
|
|
405
|
+
B ? Se(n(f)) : ze
|
|
403
406
|
);
|
|
404
|
-
}, Z.jsxs = function(f, w, _,
|
|
407
|
+
}, Z.jsxs = function(f, w, _, C, M) {
|
|
405
408
|
var B = 1e4 > Te.recentlyCreatedOwnerStacks++;
|
|
406
409
|
return u(
|
|
407
410
|
f,
|
|
408
411
|
w,
|
|
409
412
|
_,
|
|
410
413
|
!0,
|
|
411
|
-
|
|
414
|
+
C,
|
|
412
415
|
M,
|
|
413
416
|
B ? Error("react-stack-top-frame") : He,
|
|
414
|
-
B ? Se(
|
|
417
|
+
B ? Se(n(f)) : ze
|
|
415
418
|
);
|
|
416
419
|
};
|
|
417
420
|
}()), Z;
|
|
418
421
|
}
|
|
419
422
|
var Xe;
|
|
420
|
-
function
|
|
421
|
-
return Xe || (Xe = 1, process.env.NODE_ENV === "production" ? ce.exports =
|
|
423
|
+
function rr() {
|
|
424
|
+
return Xe || (Xe = 1, process.env.NODE_ENV === "production" ? ce.exports = er() : ce.exports = tr()), ce.exports;
|
|
422
425
|
}
|
|
423
|
-
var Rt =
|
|
424
|
-
const
|
|
426
|
+
var Rt = rr();
|
|
427
|
+
const ne = [
|
|
425
428
|
"color: #fff",
|
|
426
429
|
"display: inline-block",
|
|
427
430
|
"font-size: 11px",
|
|
@@ -435,52 +438,52 @@ const re = [
|
|
|
435
438
|
warning: "#d7a000",
|
|
436
439
|
danger: "#ec2127"
|
|
437
440
|
};
|
|
438
|
-
function oe(e, t, ...
|
|
439
|
-
console.log(`%c ${e}`, t, ...
|
|
441
|
+
function oe(e, t, ...r) {
|
|
442
|
+
console.log(`%c ${e}`, t, ...r);
|
|
440
443
|
}
|
|
441
|
-
function
|
|
442
|
-
const
|
|
444
|
+
function nr(e, ...t) {
|
|
445
|
+
const r = ne.concat([
|
|
443
446
|
`background-color: ${se.primary}`
|
|
444
447
|
]).join(";");
|
|
445
|
-
oe(e,
|
|
448
|
+
oe(e, r, ...t);
|
|
446
449
|
}
|
|
447
|
-
function
|
|
448
|
-
const
|
|
450
|
+
function sr(e, ...t) {
|
|
451
|
+
const r = ne.concat([
|
|
449
452
|
`background-color: ${se.success}`
|
|
450
453
|
]).join(";");
|
|
451
|
-
oe(e,
|
|
454
|
+
oe(e, r, ...t);
|
|
452
455
|
}
|
|
453
|
-
function
|
|
454
|
-
const
|
|
456
|
+
function or(e, ...t) {
|
|
457
|
+
const r = ne.concat([
|
|
455
458
|
`background-color: ${se.info}`
|
|
456
459
|
]).join(";");
|
|
457
|
-
oe(e,
|
|
460
|
+
oe(e, r, ...t);
|
|
458
461
|
}
|
|
459
|
-
function
|
|
460
|
-
const
|
|
462
|
+
function ir(e, ...t) {
|
|
463
|
+
const r = ne.concat([
|
|
461
464
|
`background-color: ${se.warning}`
|
|
462
465
|
]).join(";");
|
|
463
|
-
oe(e,
|
|
466
|
+
oe(e, r, ...t);
|
|
464
467
|
}
|
|
465
|
-
function
|
|
466
|
-
const
|
|
468
|
+
function ar(e, ...t) {
|
|
469
|
+
const r = ne.concat([
|
|
467
470
|
`background-color: ${se.danger}`
|
|
468
471
|
]).join(";");
|
|
469
|
-
oe(e,
|
|
472
|
+
oe(e, r, ...t);
|
|
470
473
|
}
|
|
471
474
|
const v = {
|
|
472
|
-
primary:
|
|
473
|
-
success:
|
|
474
|
-
info:
|
|
475
|
-
warning:
|
|
476
|
-
danger:
|
|
475
|
+
primary: nr,
|
|
476
|
+
success: sr,
|
|
477
|
+
info: or,
|
|
478
|
+
warning: ir,
|
|
479
|
+
danger: ar
|
|
477
480
|
};
|
|
478
481
|
function Ue(e, t) {
|
|
479
|
-
const
|
|
482
|
+
const r = {
|
|
480
483
|
isZero: (t == null ? void 0 : t.isZero) ?? !0,
|
|
481
484
|
isFalse: (t == null ? void 0 : t.isFalse) ?? !0
|
|
482
485
|
};
|
|
483
|
-
return e == null ||
|
|
486
|
+
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;
|
|
484
487
|
}
|
|
485
488
|
function Ge(e, t) {
|
|
486
489
|
return !Ue(e, {
|
|
@@ -489,13 +492,13 @@ function Ge(e, t) {
|
|
|
489
492
|
});
|
|
490
493
|
}
|
|
491
494
|
class te extends Error {
|
|
492
|
-
constructor(
|
|
493
|
-
super(
|
|
495
|
+
constructor(r) {
|
|
496
|
+
super(r.message);
|
|
494
497
|
$(this, "code");
|
|
495
498
|
$(this, "devInfo");
|
|
496
499
|
$(this, "args");
|
|
497
500
|
$(this, "path");
|
|
498
|
-
this.response =
|
|
501
|
+
this.response = r, this.code = r.code, this.args = r.args, this.path = r.path, this.initName();
|
|
499
502
|
}
|
|
500
503
|
initName() {
|
|
501
504
|
this.name = this.constructor.name;
|
|
@@ -518,11 +521,11 @@ const Et = dt({
|
|
|
518
521
|
refreshTokens: async () => {
|
|
519
522
|
v.warning("AuthStateContext", "refreshToken not yet ready");
|
|
520
523
|
}
|
|
521
|
-
}),
|
|
524
|
+
}), cr = () => Yt(Et), Vn = ({
|
|
522
525
|
children: e,
|
|
523
526
|
onGetTokens: t,
|
|
524
|
-
onSetTokens:
|
|
525
|
-
onRefreshTokens:
|
|
527
|
+
onSetTokens: r,
|
|
528
|
+
onRefreshTokens: n,
|
|
526
529
|
onForceLogout: s
|
|
527
530
|
}) => {
|
|
528
531
|
const [o, i] = We(0), [c, d] = We(!1);
|
|
@@ -531,15 +534,15 @@ const Et = dt({
|
|
|
531
534
|
}, []);
|
|
532
535
|
const l = (b) => {
|
|
533
536
|
let T;
|
|
534
|
-
typeof b == "function" ? T = b(t()) : T = b, v.danger("更新Token", T),
|
|
537
|
+
typeof b == "function" ? T = b(t()) : T = b, v.danger("更新Token", T), r(T), d(Ge(T)), i(Date.now());
|
|
535
538
|
}, u = () => {
|
|
536
539
|
l(null), s && s();
|
|
537
540
|
}, p = async () => {
|
|
538
541
|
var T;
|
|
539
542
|
const b = (T = t()) == null ? void 0 : T.refreshToken;
|
|
540
|
-
if (!(!b || !
|
|
543
|
+
if (!(!b || !n))
|
|
541
544
|
try {
|
|
542
|
-
const h = await
|
|
545
|
+
const h = await n(b);
|
|
543
546
|
if (Ue(h))
|
|
544
547
|
throw new te({ message: "refresh token fail", code: "REFRESH_TOKEN_EMPTY" });
|
|
545
548
|
l(h);
|
|
@@ -606,14 +609,14 @@ const Et = dt({
|
|
|
606
609
|
TIMEOUT_ERROR: "服务器已超过 {sec} 秒未响应。请确认您的网络连接状态或联系客服"
|
|
607
610
|
}
|
|
608
611
|
};
|
|
609
|
-
class
|
|
610
|
-
constructor(
|
|
611
|
-
super(
|
|
612
|
+
class lr extends Error {
|
|
613
|
+
constructor(r) {
|
|
614
|
+
super(r.message);
|
|
612
615
|
$(this, "code");
|
|
613
616
|
$(this, "devInfo");
|
|
614
617
|
$(this, "args");
|
|
615
618
|
$(this, "path");
|
|
616
|
-
this.response =
|
|
619
|
+
this.response = r, this.code = r.code, this.args = r.args, this.path = r.path, this.initName();
|
|
617
620
|
}
|
|
618
621
|
initName() {
|
|
619
622
|
this.name = this.constructor.name;
|
|
@@ -627,19 +630,19 @@ class un extends Error {
|
|
|
627
630
|
};
|
|
628
631
|
}
|
|
629
632
|
}
|
|
630
|
-
const
|
|
631
|
-
var t,
|
|
632
|
-
return (t = e == null ? void 0 : e.data) != null && t.errors[0] ? (
|
|
633
|
+
const ur = (e) => {
|
|
634
|
+
var t, r;
|
|
635
|
+
return (t = e == null ? void 0 : e.data) != null && t.errors[0] ? (r = e == null ? void 0 : e.data) == null ? void 0 : r.errors[0] : {
|
|
633
636
|
message: "Axios error",
|
|
634
637
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
635
638
|
};
|
|
636
639
|
};
|
|
637
640
|
let Q = !1, _e = [];
|
|
638
|
-
const
|
|
641
|
+
const fr = dt(null), Yn = ({
|
|
639
642
|
children: e,
|
|
640
643
|
axiosInstance: t,
|
|
641
|
-
locale:
|
|
642
|
-
onError:
|
|
644
|
+
locale: r = "en-US",
|
|
645
|
+
onError: n,
|
|
643
646
|
checkIsRefreshTokenRequest: s,
|
|
644
647
|
authorizationPrefix: o = "Bearer",
|
|
645
648
|
i18nDict: i,
|
|
@@ -650,7 +653,7 @@ const dn = dt(null), Yr = ({
|
|
|
650
653
|
updateTokens: l,
|
|
651
654
|
refreshTokens: u,
|
|
652
655
|
forceLogout: p
|
|
653
|
-
} =
|
|
656
|
+
} = cr();
|
|
654
657
|
Xt(() => {
|
|
655
658
|
const E = t.interceptors.request.use(h), S = t.interceptors.response.use(R, g);
|
|
656
659
|
return () => {
|
|
@@ -671,11 +674,11 @@ const dn = dt(null), Yr = ({
|
|
|
671
674
|
}));
|
|
672
675
|
});
|
|
673
676
|
}, h = (E) => new Promise((S, O) => {
|
|
674
|
-
var
|
|
675
|
-
E.headers["Accept-Language"] =
|
|
676
|
-
const A = (
|
|
677
|
+
var P, I;
|
|
678
|
+
E.headers["Accept-Language"] = r;
|
|
679
|
+
const A = (P = d()) == null ? void 0 : P.accessToken;
|
|
677
680
|
if (!((I = E.fetchOptions) == null ? void 0 : I.forceGuest) && A && (E.headers.Authorization = [o, A].filter((X) => X).join(" ")), !(E && s ? s(E) : !1) && Q) {
|
|
678
|
-
T(S, O)(E), O(new
|
|
681
|
+
T(S, O)(E), O(new lr({
|
|
679
682
|
message: "Token refreshing, so request save queues not send",
|
|
680
683
|
code: "REFRESH_TOKEN"
|
|
681
684
|
}));
|
|
@@ -683,15 +686,15 @@ const dn = dt(null), Yr = ({
|
|
|
683
686
|
}
|
|
684
687
|
S(E);
|
|
685
688
|
}), R = (E) => (c && v.info("[FetcherProvider] interceptorsResponseSuccess", { response: E }), E), m = (E) => {
|
|
686
|
-
const S = (i == null ? void 0 : i[
|
|
689
|
+
const S = (i == null ? void 0 : i[r]) || Ze[r] || Ze["en-US"];
|
|
687
690
|
return (S == null ? void 0 : S[E]) || `Error: ${E}`;
|
|
688
691
|
}, g = (E) => {
|
|
689
|
-
const S = E.response, O = E.config, A = E.status, N =
|
|
690
|
-
c && v.warning("[FetcherProvider] interceptorsResponseError", { status: A, responseFirstError: N }),
|
|
692
|
+
const S = E.response, O = E.config, A = E.status, N = ur(S);
|
|
693
|
+
c && v.warning("[FetcherProvider] interceptorsResponseError", { status: A, responseFirstError: N }), n && n(N);
|
|
691
694
|
const U = O && s ? s(O) : !1;
|
|
692
695
|
if (S && O && (A === 401 || N.code === "UNAUTHENTICATED")) {
|
|
693
|
-
const
|
|
694
|
-
return c && v.warning("[FetcherProvider] enter refresh token flow", { refreshToken:
|
|
696
|
+
const P = d();
|
|
697
|
+
return c && v.warning("[FetcherProvider] enter refresh token flow", { refreshToken: P == null ? void 0 : P.refreshToken }), Ue(P == null ? void 0 : P.refreshToken) || U || O.pendingRequest ? (Q = !1, c && v.warning("[FetcherProvider] no refreshToken/refreshAPI|pendingRequest fail, force logout"), p(), Promise.reject(new te(N))) : (Q || (Q = !0, c && v.warning("[FetcherProvider] refreshTokens"), u().then(() => {
|
|
695
698
|
c && v.info("[FetcherProvider] refreshTokens success"), b(!0);
|
|
696
699
|
}).catch(() => {
|
|
697
700
|
c && v.danger("[FetcherProvider] refreshTokens fail"), b(!1);
|
|
@@ -702,7 +705,7 @@ const dn = dt(null), Yr = ({
|
|
|
702
705
|
return Promise.reject(new te(N));
|
|
703
706
|
};
|
|
704
707
|
return /* @__PURE__ */ Rt.jsx(
|
|
705
|
-
|
|
708
|
+
fr.Provider,
|
|
706
709
|
{
|
|
707
710
|
value: t,
|
|
708
711
|
children: e
|
|
@@ -714,226 +717,226 @@ function bt(e, t) {
|
|
|
714
717
|
return e.apply(t, arguments);
|
|
715
718
|
};
|
|
716
719
|
}
|
|
717
|
-
const { toString:
|
|
718
|
-
const
|
|
719
|
-
return e[
|
|
720
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => me(t) === e), Re = (e) => (t) => typeof t === e, { isArray: Y } = Array,
|
|
721
|
-
function
|
|
722
|
-
return e !== null && !
|
|
720
|
+
const { toString: dr } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: he, toStringTag: yt } = Symbol, me = /* @__PURE__ */ ((e) => (t) => {
|
|
721
|
+
const r = dr.call(t);
|
|
722
|
+
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
723
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => me(t) === e), Re = (e) => (t) => typeof t === e, { isArray: Y } = Array, re = Re("undefined");
|
|
724
|
+
function pr(e) {
|
|
725
|
+
return e !== null && !re(e) && e.constructor !== null && !re(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
723
726
|
}
|
|
724
727
|
const wt = D("ArrayBuffer");
|
|
725
|
-
function
|
|
728
|
+
function hr(e) {
|
|
726
729
|
let t;
|
|
727
730
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && wt(e.buffer), t;
|
|
728
731
|
}
|
|
729
|
-
const
|
|
732
|
+
const mr = Re("string"), j = Re("function"), Tt = Re("number"), Ee = (e) => e !== null && typeof e == "object", Rr = (e) => e === !0 || e === !1, le = (e) => {
|
|
730
733
|
if (me(e) !== "object")
|
|
731
734
|
return !1;
|
|
732
735
|
const t = De(e);
|
|
733
736
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(yt in e) && !(he in e);
|
|
734
|
-
},
|
|
737
|
+
}, Er = D("Date"), br = D("File"), yr = D("Blob"), wr = D("FileList"), Tr = (e) => Ee(e) && j(e.pipe), Sr = (e) => {
|
|
735
738
|
let t;
|
|
736
739
|
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = me(e)) === "formdata" || // detect form-data instance
|
|
737
740
|
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
738
|
-
},
|
|
739
|
-
function ie(e, t, { allOwnKeys:
|
|
741
|
+
}, gr = D("URLSearchParams"), [Or, Ar, _r, xr] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Nr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
742
|
+
function ie(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
740
743
|
if (e === null || typeof e > "u")
|
|
741
744
|
return;
|
|
742
|
-
let
|
|
745
|
+
let n, s;
|
|
743
746
|
if (typeof e != "object" && (e = [e]), Y(e))
|
|
744
|
-
for (
|
|
745
|
-
t.call(null, e[
|
|
747
|
+
for (n = 0, s = e.length; n < s; n++)
|
|
748
|
+
t.call(null, e[n], n, e);
|
|
746
749
|
else {
|
|
747
|
-
const o =
|
|
750
|
+
const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
748
751
|
let c;
|
|
749
|
-
for (
|
|
750
|
-
c = o[
|
|
752
|
+
for (n = 0; n < i; n++)
|
|
753
|
+
c = o[n], t.call(null, e[c], c, e);
|
|
751
754
|
}
|
|
752
755
|
}
|
|
753
756
|
function St(e, t) {
|
|
754
757
|
t = t.toLowerCase();
|
|
755
|
-
const
|
|
756
|
-
let
|
|
757
|
-
for (;
|
|
758
|
-
if (s = n
|
|
758
|
+
const r = Object.keys(e);
|
|
759
|
+
let n = r.length, s;
|
|
760
|
+
for (; n-- > 0; )
|
|
761
|
+
if (s = r[n], t === s.toLowerCase())
|
|
759
762
|
return s;
|
|
760
763
|
return null;
|
|
761
764
|
}
|
|
762
|
-
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gt = (e) => !
|
|
763
|
-
function
|
|
764
|
-
const { caseless: e } = gt(this) && this || {}, t = {},
|
|
765
|
+
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gt = (e) => !re(e) && e !== H;
|
|
766
|
+
function Ce() {
|
|
767
|
+
const { caseless: e } = gt(this) && this || {}, t = {}, r = (n, s) => {
|
|
765
768
|
const o = e && St(t, s) || s;
|
|
766
|
-
le(t[o]) && le(
|
|
769
|
+
le(t[o]) && le(n) ? t[o] = Ce(t[o], n) : le(n) ? t[o] = Ce({}, n) : Y(n) ? t[o] = n.slice() : t[o] = n;
|
|
767
770
|
};
|
|
768
|
-
for (let
|
|
769
|
-
arguments[
|
|
771
|
+
for (let n = 0, s = arguments.length; n < s; n++)
|
|
772
|
+
arguments[n] && ie(arguments[n], r);
|
|
770
773
|
return t;
|
|
771
774
|
}
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
}, { allOwnKeys:
|
|
775
|
-
e.prototype = Object.create(t.prototype,
|
|
775
|
+
const Pr = (e, t, r, { allOwnKeys: n } = {}) => (ie(t, (s, o) => {
|
|
776
|
+
r && j(s) ? e[o] = bt(s, r) : e[o] = s;
|
|
777
|
+
}, { allOwnKeys: n }), e), Cr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), kr = (e, t, r, n) => {
|
|
778
|
+
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
776
779
|
value: t.prototype
|
|
777
|
-
}),
|
|
778
|
-
},
|
|
780
|
+
}), r && Object.assign(e.prototype, r);
|
|
781
|
+
}, Fr = (e, t, r, n) => {
|
|
779
782
|
let s, o, i;
|
|
780
783
|
const c = {};
|
|
781
784
|
if (t = t || {}, e == null) return t;
|
|
782
785
|
do {
|
|
783
786
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
784
|
-
i = s[o], (!
|
|
785
|
-
e =
|
|
786
|
-
} while (e && (!
|
|
787
|
+
i = s[o], (!n || n(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
788
|
+
e = r !== !1 && De(e);
|
|
789
|
+
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
787
790
|
return t;
|
|
788
|
-
},
|
|
789
|
-
e = String(e), (
|
|
790
|
-
const
|
|
791
|
-
return
|
|
792
|
-
},
|
|
791
|
+
}, vr = (e, t, r) => {
|
|
792
|
+
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
793
|
+
const n = e.indexOf(t, r);
|
|
794
|
+
return n !== -1 && n === r;
|
|
795
|
+
}, jr = (e) => {
|
|
793
796
|
if (!e) return null;
|
|
794
797
|
if (Y(e)) return e;
|
|
795
798
|
let t = e.length;
|
|
796
799
|
if (!Tt(t)) return null;
|
|
797
|
-
const
|
|
800
|
+
const r = new Array(t);
|
|
798
801
|
for (; t-- > 0; )
|
|
799
|
-
|
|
800
|
-
return
|
|
801
|
-
},
|
|
802
|
-
const
|
|
802
|
+
r[t] = e[t];
|
|
803
|
+
return r;
|
|
804
|
+
}, Lr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), Ur = (e, t) => {
|
|
805
|
+
const n = (e && e[he]).call(e);
|
|
803
806
|
let s;
|
|
804
|
-
for (; (s =
|
|
807
|
+
for (; (s = n.next()) && !s.done; ) {
|
|
805
808
|
const o = s.value;
|
|
806
809
|
t.call(e, o[0], o[1]);
|
|
807
810
|
}
|
|
808
|
-
},
|
|
809
|
-
let
|
|
810
|
-
const
|
|
811
|
-
for (; (
|
|
812
|
-
|
|
813
|
-
return
|
|
814
|
-
},
|
|
811
|
+
}, Dr = (e, t) => {
|
|
812
|
+
let r;
|
|
813
|
+
const n = [];
|
|
814
|
+
for (; (r = e.exec(t)) !== null; )
|
|
815
|
+
n.push(r);
|
|
816
|
+
return n;
|
|
817
|
+
}, Br = D("HTMLFormElement"), qr = (e) => e.toLowerCase().replace(
|
|
815
818
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
816
|
-
function(
|
|
817
|
-
return
|
|
819
|
+
function(r, n, s) {
|
|
820
|
+
return n.toUpperCase() + s;
|
|
818
821
|
}
|
|
819
|
-
), Qe = (({ hasOwnProperty: e }) => (t,
|
|
820
|
-
const
|
|
821
|
-
ie(
|
|
822
|
+
), Qe = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Ir = D("RegExp"), Ot = (e, t) => {
|
|
823
|
+
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
824
|
+
ie(r, (s, o) => {
|
|
822
825
|
let i;
|
|
823
|
-
(i = t(s, o, e)) !== !1 && (
|
|
824
|
-
}), Object.defineProperties(e,
|
|
825
|
-
},
|
|
826
|
-
Ot(e, (t,
|
|
827
|
-
if (j(e) && ["arguments", "caller", "callee"].indexOf(
|
|
826
|
+
(i = t(s, o, e)) !== !1 && (n[o] = i || s);
|
|
827
|
+
}), Object.defineProperties(e, n);
|
|
828
|
+
}, $r = (e) => {
|
|
829
|
+
Ot(e, (t, r) => {
|
|
830
|
+
if (j(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
828
831
|
return !1;
|
|
829
|
-
const
|
|
830
|
-
if (j(
|
|
832
|
+
const n = e[r];
|
|
833
|
+
if (j(n)) {
|
|
831
834
|
if (t.enumerable = !1, "writable" in t) {
|
|
832
835
|
t.writable = !1;
|
|
833
836
|
return;
|
|
834
837
|
}
|
|
835
838
|
t.set || (t.set = () => {
|
|
836
|
-
throw Error("Can not rewrite read-only method '" +
|
|
839
|
+
throw Error("Can not rewrite read-only method '" + r + "'");
|
|
837
840
|
});
|
|
838
841
|
}
|
|
839
842
|
});
|
|
840
|
-
},
|
|
841
|
-
const
|
|
843
|
+
}, Mr = (e, t) => {
|
|
844
|
+
const r = {}, n = (s) => {
|
|
842
845
|
s.forEach((o) => {
|
|
843
|
-
|
|
846
|
+
r[o] = !0;
|
|
844
847
|
});
|
|
845
848
|
};
|
|
846
|
-
return Y(e) ?
|
|
847
|
-
},
|
|
848
|
-
},
|
|
849
|
-
function
|
|
849
|
+
return Y(e) ? n(e) : n(String(e).split(t)), r;
|
|
850
|
+
}, Hr = () => {
|
|
851
|
+
}, zr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
852
|
+
function Jr(e) {
|
|
850
853
|
return !!(e && j(e.append) && e[yt] === "FormData" && e[he]);
|
|
851
854
|
}
|
|
852
|
-
const
|
|
853
|
-
const t = new Array(10),
|
|
854
|
-
if (Ee(
|
|
855
|
-
if (t.indexOf(
|
|
855
|
+
const Wr = (e) => {
|
|
856
|
+
const t = new Array(10), r = (n, s) => {
|
|
857
|
+
if (Ee(n)) {
|
|
858
|
+
if (t.indexOf(n) >= 0)
|
|
856
859
|
return;
|
|
857
|
-
if (!("toJSON" in
|
|
858
|
-
t[s] =
|
|
859
|
-
const o = Y(
|
|
860
|
-
return ie(
|
|
861
|
-
const d =
|
|
862
|
-
!
|
|
860
|
+
if (!("toJSON" in n)) {
|
|
861
|
+
t[s] = n;
|
|
862
|
+
const o = Y(n) ? [] : {};
|
|
863
|
+
return ie(n, (i, c) => {
|
|
864
|
+
const d = r(i, s + 1);
|
|
865
|
+
!re(d) && (o[c] = d);
|
|
863
866
|
}), t[s] = void 0, o;
|
|
864
867
|
}
|
|
865
868
|
}
|
|
866
|
-
return
|
|
869
|
+
return n;
|
|
867
870
|
};
|
|
868
|
-
return
|
|
869
|
-
},
|
|
870
|
-
s === H && o ===
|
|
871
|
+
return r(e, 0);
|
|
872
|
+
}, Vr = D("AsyncFunction"), Yr = (e) => e && (Ee(e) || j(e)) && j(e.then) && j(e.catch), At = ((e, t) => e ? setImmediate : t ? ((r, n) => (H.addEventListener("message", ({ source: s, data: o }) => {
|
|
873
|
+
s === H && o === r && n.length && n.shift()();
|
|
871
874
|
}, !1), (s) => {
|
|
872
|
-
|
|
873
|
-
}))(`axios@${Math.random()}`, []) : (
|
|
875
|
+
n.push(s), H.postMessage(r, "*");
|
|
876
|
+
}))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
|
|
874
877
|
typeof setImmediate == "function",
|
|
875
878
|
j(H.postMessage)
|
|
876
|
-
),
|
|
879
|
+
), Kr = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || At, Xr = (e) => e != null && j(e[he]), a = {
|
|
877
880
|
isArray: Y,
|
|
878
881
|
isArrayBuffer: wt,
|
|
879
|
-
isBuffer:
|
|
880
|
-
isFormData:
|
|
881
|
-
isArrayBufferView:
|
|
882
|
-
isString:
|
|
882
|
+
isBuffer: pr,
|
|
883
|
+
isFormData: Sr,
|
|
884
|
+
isArrayBufferView: hr,
|
|
885
|
+
isString: mr,
|
|
883
886
|
isNumber: Tt,
|
|
884
|
-
isBoolean:
|
|
887
|
+
isBoolean: Rr,
|
|
885
888
|
isObject: Ee,
|
|
886
889
|
isPlainObject: le,
|
|
887
|
-
isReadableStream:
|
|
888
|
-
isRequest:
|
|
889
|
-
isResponse:
|
|
890
|
-
isHeaders:
|
|
891
|
-
isUndefined:
|
|
892
|
-
isDate:
|
|
893
|
-
isFile:
|
|
894
|
-
isBlob:
|
|
895
|
-
isRegExp:
|
|
890
|
+
isReadableStream: Or,
|
|
891
|
+
isRequest: Ar,
|
|
892
|
+
isResponse: _r,
|
|
893
|
+
isHeaders: xr,
|
|
894
|
+
isUndefined: re,
|
|
895
|
+
isDate: Er,
|
|
896
|
+
isFile: br,
|
|
897
|
+
isBlob: yr,
|
|
898
|
+
isRegExp: Ir,
|
|
896
899
|
isFunction: j,
|
|
897
|
-
isStream:
|
|
898
|
-
isURLSearchParams:
|
|
899
|
-
isTypedArray:
|
|
900
|
-
isFileList:
|
|
900
|
+
isStream: Tr,
|
|
901
|
+
isURLSearchParams: gr,
|
|
902
|
+
isTypedArray: Lr,
|
|
903
|
+
isFileList: wr,
|
|
901
904
|
forEach: ie,
|
|
902
|
-
merge:
|
|
903
|
-
extend:
|
|
904
|
-
trim:
|
|
905
|
-
stripBOM:
|
|
906
|
-
inherits:
|
|
907
|
-
toFlatObject:
|
|
905
|
+
merge: Ce,
|
|
906
|
+
extend: Pr,
|
|
907
|
+
trim: Nr,
|
|
908
|
+
stripBOM: Cr,
|
|
909
|
+
inherits: kr,
|
|
910
|
+
toFlatObject: Fr,
|
|
908
911
|
kindOf: me,
|
|
909
912
|
kindOfTest: D,
|
|
910
|
-
endsWith:
|
|
911
|
-
toArray:
|
|
912
|
-
forEachEntry:
|
|
913
|
-
matchAll:
|
|
914
|
-
isHTMLForm:
|
|
913
|
+
endsWith: vr,
|
|
914
|
+
toArray: jr,
|
|
915
|
+
forEachEntry: Ur,
|
|
916
|
+
matchAll: Dr,
|
|
917
|
+
isHTMLForm: Br,
|
|
915
918
|
hasOwnProperty: Qe,
|
|
916
919
|
hasOwnProp: Qe,
|
|
917
920
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
918
921
|
reduceDescriptors: Ot,
|
|
919
|
-
freezeMethods:
|
|
920
|
-
toObjectSet:
|
|
921
|
-
toCamelCase:
|
|
922
|
-
noop:
|
|
923
|
-
toFiniteNumber:
|
|
922
|
+
freezeMethods: $r,
|
|
923
|
+
toObjectSet: Mr,
|
|
924
|
+
toCamelCase: qr,
|
|
925
|
+
noop: Hr,
|
|
926
|
+
toFiniteNumber: zr,
|
|
924
927
|
findKey: St,
|
|
925
928
|
global: H,
|
|
926
929
|
isContextDefined: gt,
|
|
927
|
-
isSpecCompliantForm:
|
|
928
|
-
toJSONObject:
|
|
929
|
-
isAsyncFn:
|
|
930
|
-
isThenable:
|
|
930
|
+
isSpecCompliantForm: Jr,
|
|
931
|
+
toJSONObject: Wr,
|
|
932
|
+
isAsyncFn: Vr,
|
|
933
|
+
isThenable: Yr,
|
|
931
934
|
setImmediate: At,
|
|
932
|
-
asap:
|
|
933
|
-
isIterable:
|
|
935
|
+
asap: Kr,
|
|
936
|
+
isIterable: Xr
|
|
934
937
|
};
|
|
935
|
-
function y(e, t,
|
|
936
|
-
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),
|
|
938
|
+
function y(e, t, r, n, s) {
|
|
939
|
+
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);
|
|
937
940
|
}
|
|
938
941
|
a.inherits(y, Error, {
|
|
939
942
|
toJSON: function() {
|
|
@@ -976,41 +979,41 @@ const _t = y.prototype, xt = {};
|
|
|
976
979
|
});
|
|
977
980
|
Object.defineProperties(y, xt);
|
|
978
981
|
Object.defineProperty(_t, "isAxiosError", { value: !0 });
|
|
979
|
-
y.from = (e, t,
|
|
982
|
+
y.from = (e, t, r, n, s, o) => {
|
|
980
983
|
const i = Object.create(_t);
|
|
981
984
|
return a.toFlatObject(e, i, function(d) {
|
|
982
985
|
return d !== Error.prototype;
|
|
983
|
-
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t,
|
|
986
|
+
}, (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;
|
|
984
987
|
};
|
|
985
|
-
const
|
|
988
|
+
const Gr = null;
|
|
986
989
|
function ke(e) {
|
|
987
990
|
return a.isPlainObject(e) || a.isArray(e);
|
|
988
991
|
}
|
|
989
992
|
function Nt(e) {
|
|
990
993
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
991
994
|
}
|
|
992
|
-
function et(e, t,
|
|
995
|
+
function et(e, t, r) {
|
|
993
996
|
return e ? e.concat(t).map(function(s, o) {
|
|
994
|
-
return s = Nt(s), !
|
|
995
|
-
}).join(
|
|
997
|
+
return s = Nt(s), !r && o ? "[" + s + "]" : s;
|
|
998
|
+
}).join(r ? "." : "") : t;
|
|
996
999
|
}
|
|
997
|
-
function
|
|
1000
|
+
function Zr(e) {
|
|
998
1001
|
return a.isArray(e) && !e.some(ke);
|
|
999
1002
|
}
|
|
1000
|
-
const
|
|
1003
|
+
const Qr = a.toFlatObject(a, {}, null, function(t) {
|
|
1001
1004
|
return /^is[A-Z]/.test(t);
|
|
1002
1005
|
});
|
|
1003
|
-
function be(e, t,
|
|
1006
|
+
function be(e, t, r) {
|
|
1004
1007
|
if (!a.isObject(e))
|
|
1005
1008
|
throw new TypeError("target must be an object");
|
|
1006
|
-
t = t || new FormData(),
|
|
1009
|
+
t = t || new FormData(), r = a.toFlatObject(r, {
|
|
1007
1010
|
metaTokens: !0,
|
|
1008
1011
|
dots: !1,
|
|
1009
1012
|
indexes: !1
|
|
1010
1013
|
}, !1, function(R, m) {
|
|
1011
1014
|
return !a.isUndefined(m[R]);
|
|
1012
1015
|
});
|
|
1013
|
-
const
|
|
1016
|
+
const n = r.metaTokens, s = r.visitor || u, o = r.dots, i = r.indexes, d = (r.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
1014
1017
|
if (!a.isFunction(s))
|
|
1015
1018
|
throw new TypeError("visitor must be a function");
|
|
1016
1019
|
function l(h) {
|
|
@@ -1025,8 +1028,8 @@ function be(e, t, n) {
|
|
|
1025
1028
|
let g = h;
|
|
1026
1029
|
if (h && !m && typeof h == "object") {
|
|
1027
1030
|
if (a.endsWith(R, "{}"))
|
|
1028
|
-
R =
|
|
1029
|
-
else if (a.isArray(h) &&
|
|
1031
|
+
R = n ? R : R.slice(0, -2), h = JSON.stringify(h);
|
|
1032
|
+
else if (a.isArray(h) && Zr(h) || (a.isFileList(h) || a.endsWith(R, "[]")) && (g = a.toArray(h)))
|
|
1030
1033
|
return R = Nt(R), g.forEach(function(S, O) {
|
|
1031
1034
|
!(a.isUndefined(S) || S === null) && t.append(
|
|
1032
1035
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -1037,7 +1040,7 @@ function be(e, t, n) {
|
|
|
1037
1040
|
}
|
|
1038
1041
|
return ke(h) ? !0 : (t.append(et(m, R, o), l(h)), !1);
|
|
1039
1042
|
}
|
|
1040
|
-
const p = [], b = Object.assign(
|
|
1043
|
+
const p = [], b = Object.assign(Qr, {
|
|
1041
1044
|
defaultVisitor: u,
|
|
1042
1045
|
convertValue: l,
|
|
1043
1046
|
isVisitable: ke
|
|
@@ -1071,44 +1074,44 @@ function tt(e) {
|
|
|
1071
1074
|
"%20": "+",
|
|
1072
1075
|
"%00": "\0"
|
|
1073
1076
|
};
|
|
1074
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
1075
|
-
return t[
|
|
1077
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
1078
|
+
return t[n];
|
|
1076
1079
|
});
|
|
1077
1080
|
}
|
|
1078
1081
|
function Be(e, t) {
|
|
1079
1082
|
this._pairs = [], e && be(e, this, t);
|
|
1080
1083
|
}
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1083
|
-
this._pairs.push([t,
|
|
1084
|
+
const Pt = Be.prototype;
|
|
1085
|
+
Pt.append = function(t, r) {
|
|
1086
|
+
this._pairs.push([t, r]);
|
|
1084
1087
|
};
|
|
1085
|
-
|
|
1086
|
-
const
|
|
1087
|
-
return t.call(this,
|
|
1088
|
+
Pt.toString = function(t) {
|
|
1089
|
+
const r = t ? function(n) {
|
|
1090
|
+
return t.call(this, n, tt);
|
|
1088
1091
|
} : tt;
|
|
1089
1092
|
return this._pairs.map(function(s) {
|
|
1090
|
-
return
|
|
1093
|
+
return r(s[0]) + "=" + r(s[1]);
|
|
1091
1094
|
}, "").join("&");
|
|
1092
1095
|
};
|
|
1093
|
-
function
|
|
1096
|
+
function en(e) {
|
|
1094
1097
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1095
1098
|
}
|
|
1096
|
-
function
|
|
1099
|
+
function Ct(e, t, r) {
|
|
1097
1100
|
if (!t)
|
|
1098
1101
|
return e;
|
|
1099
|
-
const
|
|
1100
|
-
a.isFunction(
|
|
1101
|
-
serialize:
|
|
1102
|
+
const n = r && r.encode || en;
|
|
1103
|
+
a.isFunction(r) && (r = {
|
|
1104
|
+
serialize: r
|
|
1102
1105
|
});
|
|
1103
|
-
const s =
|
|
1106
|
+
const s = r && r.serialize;
|
|
1104
1107
|
let o;
|
|
1105
|
-
if (s ? o = s(t,
|
|
1108
|
+
if (s ? o = s(t, r) : o = a.isURLSearchParams(t) ? t.toString() : new Be(t, r).toString(n), o) {
|
|
1106
1109
|
const i = e.indexOf("#");
|
|
1107
1110
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
1108
1111
|
}
|
|
1109
1112
|
return e;
|
|
1110
1113
|
}
|
|
1111
|
-
class
|
|
1114
|
+
class rt {
|
|
1112
1115
|
constructor() {
|
|
1113
1116
|
this.handlers = [];
|
|
1114
1117
|
}
|
|
@@ -1120,12 +1123,12 @@ class nt {
|
|
|
1120
1123
|
*
|
|
1121
1124
|
* @return {Number} An ID used to remove interceptor later
|
|
1122
1125
|
*/
|
|
1123
|
-
use(t,
|
|
1126
|
+
use(t, r, n) {
|
|
1124
1127
|
return this.handlers.push({
|
|
1125
1128
|
fulfilled: t,
|
|
1126
|
-
rejected:
|
|
1127
|
-
synchronous:
|
|
1128
|
-
runWhen:
|
|
1129
|
+
rejected: r,
|
|
1130
|
+
synchronous: n ? n.synchronous : !1,
|
|
1131
|
+
runWhen: n ? n.runWhen : null
|
|
1129
1132
|
}), this.handlers.length - 1;
|
|
1130
1133
|
}
|
|
1131
1134
|
/**
|
|
@@ -1157,8 +1160,8 @@ class nt {
|
|
|
1157
1160
|
* @returns {void}
|
|
1158
1161
|
*/
|
|
1159
1162
|
forEach(t) {
|
|
1160
|
-
a.forEach(this.handlers, function(
|
|
1161
|
-
|
|
1163
|
+
a.forEach(this.handlers, function(n) {
|
|
1164
|
+
n !== null && t(n);
|
|
1162
1165
|
});
|
|
1163
1166
|
}
|
|
1164
1167
|
}
|
|
@@ -1166,75 +1169,75 @@ const kt = {
|
|
|
1166
1169
|
silentJSONParsing: !0,
|
|
1167
1170
|
forcedJSONParsing: !0,
|
|
1168
1171
|
clarifyTimeoutError: !1
|
|
1169
|
-
},
|
|
1172
|
+
}, tn = typeof URLSearchParams < "u" ? URLSearchParams : Be, rn = typeof FormData < "u" ? FormData : null, nn = typeof Blob < "u" ? Blob : null, sn = {
|
|
1170
1173
|
isBrowser: !0,
|
|
1171
1174
|
classes: {
|
|
1172
|
-
URLSearchParams:
|
|
1173
|
-
FormData:
|
|
1174
|
-
Blob:
|
|
1175
|
+
URLSearchParams: tn,
|
|
1176
|
+
FormData: rn,
|
|
1177
|
+
Blob: nn
|
|
1175
1178
|
},
|
|
1176
1179
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1177
|
-
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0,
|
|
1178
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1180
|
+
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, on = qe && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), an = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1181
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn = qe && window.location.href || "http://localhost", ln = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1179
1182
|
__proto__: null,
|
|
1180
1183
|
hasBrowserEnv: qe,
|
|
1181
|
-
hasStandardBrowserEnv:
|
|
1182
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1184
|
+
hasStandardBrowserEnv: on,
|
|
1185
|
+
hasStandardBrowserWebWorkerEnv: an,
|
|
1183
1186
|
navigator: Fe,
|
|
1184
|
-
origin:
|
|
1187
|
+
origin: cn
|
|
1185
1188
|
}, Symbol.toStringTag, { value: "Module" })), F = {
|
|
1186
|
-
...
|
|
1187
|
-
...
|
|
1189
|
+
...ln,
|
|
1190
|
+
...sn
|
|
1188
1191
|
};
|
|
1189
|
-
function
|
|
1192
|
+
function un(e, t) {
|
|
1190
1193
|
return be(e, new F.classes.URLSearchParams(), Object.assign({
|
|
1191
|
-
visitor: function(
|
|
1192
|
-
return F.isNode && a.isBuffer(
|
|
1194
|
+
visitor: function(r, n, s, o) {
|
|
1195
|
+
return F.isNode && a.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1193
1196
|
}
|
|
1194
1197
|
}, t));
|
|
1195
1198
|
}
|
|
1196
|
-
function
|
|
1199
|
+
function fn(e) {
|
|
1197
1200
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1198
1201
|
}
|
|
1199
|
-
function
|
|
1200
|
-
const t = {},
|
|
1201
|
-
let
|
|
1202
|
-
const s =
|
|
1202
|
+
function dn(e) {
|
|
1203
|
+
const t = {}, r = Object.keys(e);
|
|
1204
|
+
let n;
|
|
1205
|
+
const s = r.length;
|
|
1203
1206
|
let o;
|
|
1204
|
-
for (
|
|
1205
|
-
o = n
|
|
1207
|
+
for (n = 0; n < s; n++)
|
|
1208
|
+
o = r[n], t[o] = e[o];
|
|
1206
1209
|
return t;
|
|
1207
1210
|
}
|
|
1208
1211
|
function Ft(e) {
|
|
1209
|
-
function t(
|
|
1210
|
-
let i =
|
|
1212
|
+
function t(r, n, s, o) {
|
|
1213
|
+
let i = r[o++];
|
|
1211
1214
|
if (i === "__proto__") return !0;
|
|
1212
|
-
const c = Number.isFinite(+i), d = o >=
|
|
1213
|
-
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i],
|
|
1215
|
+
const c = Number.isFinite(+i), d = o >= r.length;
|
|
1216
|
+
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] = dn(s[i])), !c);
|
|
1214
1217
|
}
|
|
1215
1218
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
1216
|
-
const
|
|
1217
|
-
return a.forEachEntry(e, (
|
|
1218
|
-
t(
|
|
1219
|
-
}),
|
|
1219
|
+
const r = {};
|
|
1220
|
+
return a.forEachEntry(e, (n, s) => {
|
|
1221
|
+
t(fn(n), s, r, 0);
|
|
1222
|
+
}), r;
|
|
1220
1223
|
}
|
|
1221
1224
|
return null;
|
|
1222
1225
|
}
|
|
1223
|
-
function
|
|
1226
|
+
function pn(e, t, r) {
|
|
1224
1227
|
if (a.isString(e))
|
|
1225
1228
|
try {
|
|
1226
1229
|
return (t || JSON.parse)(e), a.trim(e);
|
|
1227
|
-
} catch (
|
|
1228
|
-
if (
|
|
1229
|
-
throw
|
|
1230
|
+
} catch (n) {
|
|
1231
|
+
if (n.name !== "SyntaxError")
|
|
1232
|
+
throw n;
|
|
1230
1233
|
}
|
|
1231
|
-
return (
|
|
1234
|
+
return (r || JSON.stringify)(e);
|
|
1232
1235
|
}
|
|
1233
1236
|
const ae = {
|
|
1234
1237
|
transitional: kt,
|
|
1235
1238
|
adapter: ["xhr", "http", "fetch"],
|
|
1236
|
-
transformRequest: [function(t,
|
|
1237
|
-
const
|
|
1239
|
+
transformRequest: [function(t, r) {
|
|
1240
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = a.isObject(t);
|
|
1238
1241
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
1239
1242
|
return s ? JSON.stringify(Ft(t)) : t;
|
|
1240
1243
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
@@ -1242,12 +1245,12 @@ const ae = {
|
|
|
1242
1245
|
if (a.isArrayBufferView(t))
|
|
1243
1246
|
return t.buffer;
|
|
1244
1247
|
if (a.isURLSearchParams(t))
|
|
1245
|
-
return
|
|
1248
|
+
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1246
1249
|
let c;
|
|
1247
1250
|
if (o) {
|
|
1248
|
-
if (
|
|
1249
|
-
return
|
|
1250
|
-
if ((c = a.isFileList(t)) ||
|
|
1251
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1252
|
+
return un(t, this.formSerializer).toString();
|
|
1253
|
+
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
1251
1254
|
const d = this.env && this.env.FormData;
|
|
1252
1255
|
return be(
|
|
1253
1256
|
c ? { "files[]": t } : t,
|
|
@@ -1256,14 +1259,14 @@ const ae = {
|
|
|
1256
1259
|
);
|
|
1257
1260
|
}
|
|
1258
1261
|
}
|
|
1259
|
-
return o || s ? (
|
|
1262
|
+
return o || s ? (r.setContentType("application/json", !1), pn(t)) : t;
|
|
1260
1263
|
}],
|
|
1261
1264
|
transformResponse: [function(t) {
|
|
1262
|
-
const
|
|
1265
|
+
const r = this.transitional || ae.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
1263
1266
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
1264
1267
|
return t;
|
|
1265
|
-
if (t && a.isString(t) && (
|
|
1266
|
-
const i = !(
|
|
1268
|
+
if (t && a.isString(t) && (n && !this.responseType || s)) {
|
|
1269
|
+
const i = !(r && r.silentJSONParsing) && s;
|
|
1267
1270
|
try {
|
|
1268
1271
|
return JSON.parse(t);
|
|
1269
1272
|
} catch (c) {
|
|
@@ -1299,7 +1302,7 @@ const ae = {
|
|
|
1299
1302
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1300
1303
|
ae.headers[e] = {};
|
|
1301
1304
|
});
|
|
1302
|
-
const
|
|
1305
|
+
const hn = a.toObjectSet([
|
|
1303
1306
|
"age",
|
|
1304
1307
|
"authorization",
|
|
1305
1308
|
"content-length",
|
|
@@ -1317,47 +1320,47 @@ const hr = a.toObjectSet([
|
|
|
1317
1320
|
"referer",
|
|
1318
1321
|
"retry-after",
|
|
1319
1322
|
"user-agent"
|
|
1320
|
-
]),
|
|
1323
|
+
]), mn = (e) => {
|
|
1321
1324
|
const t = {};
|
|
1322
|
-
let
|
|
1325
|
+
let r, n, s;
|
|
1323
1326
|
return e && e.split(`
|
|
1324
1327
|
`).forEach(function(i) {
|
|
1325
|
-
s = i.indexOf(":"),
|
|
1328
|
+
s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || t[r] && hn[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
1326
1329
|
}), t;
|
|
1327
|
-
},
|
|
1330
|
+
}, nt = Symbol("internals");
|
|
1328
1331
|
function ee(e) {
|
|
1329
1332
|
return e && String(e).trim().toLowerCase();
|
|
1330
1333
|
}
|
|
1331
1334
|
function ue(e) {
|
|
1332
1335
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ue) : String(e);
|
|
1333
1336
|
}
|
|
1334
|
-
function
|
|
1335
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
1336
|
-
let
|
|
1337
|
-
for (;
|
|
1338
|
-
t[
|
|
1337
|
+
function Rn(e) {
|
|
1338
|
+
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1339
|
+
let n;
|
|
1340
|
+
for (; n = r.exec(e); )
|
|
1341
|
+
t[n[1]] = n[2];
|
|
1339
1342
|
return t;
|
|
1340
1343
|
}
|
|
1341
|
-
const
|
|
1342
|
-
function xe(e, t,
|
|
1343
|
-
if (a.isFunction(
|
|
1344
|
-
return
|
|
1345
|
-
if (s && (t =
|
|
1346
|
-
if (a.isString(
|
|
1347
|
-
return t.indexOf(
|
|
1348
|
-
if (a.isRegExp(
|
|
1349
|
-
return
|
|
1344
|
+
const En = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1345
|
+
function xe(e, t, r, n, s) {
|
|
1346
|
+
if (a.isFunction(n))
|
|
1347
|
+
return n.call(this, t, r);
|
|
1348
|
+
if (s && (t = r), !!a.isString(t)) {
|
|
1349
|
+
if (a.isString(n))
|
|
1350
|
+
return t.indexOf(n) !== -1;
|
|
1351
|
+
if (a.isRegExp(n))
|
|
1352
|
+
return n.test(t);
|
|
1350
1353
|
}
|
|
1351
1354
|
}
|
|
1352
|
-
function
|
|
1353
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
1355
|
+
function bn(e) {
|
|
1356
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
1354
1357
|
}
|
|
1355
|
-
function
|
|
1356
|
-
const
|
|
1357
|
-
["get", "set", "has"].forEach((
|
|
1358
|
-
Object.defineProperty(e,
|
|
1358
|
+
function yn(e, t) {
|
|
1359
|
+
const r = a.toCamelCase(" " + t);
|
|
1360
|
+
["get", "set", "has"].forEach((n) => {
|
|
1361
|
+
Object.defineProperty(e, n + r, {
|
|
1359
1362
|
value: function(s, o, i) {
|
|
1360
|
-
return this[
|
|
1363
|
+
return this[n].call(this, t, s, o, i);
|
|
1361
1364
|
},
|
|
1362
1365
|
configurable: !0
|
|
1363
1366
|
});
|
|
@@ -1367,7 +1370,7 @@ let L = class {
|
|
|
1367
1370
|
constructor(t) {
|
|
1368
1371
|
t && this.set(t);
|
|
1369
1372
|
}
|
|
1370
|
-
set(t,
|
|
1373
|
+
set(t, r, n) {
|
|
1371
1374
|
const s = this;
|
|
1372
1375
|
function o(c, d, l) {
|
|
1373
1376
|
const u = ee(d);
|
|
@@ -1378,9 +1381,9 @@ let L = class {
|
|
|
1378
1381
|
}
|
|
1379
1382
|
const i = (c, d) => a.forEach(c, (l, u) => o(l, u, d));
|
|
1380
1383
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
1381
|
-
i(t,
|
|
1382
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
1383
|
-
i(
|
|
1384
|
+
i(t, r);
|
|
1385
|
+
else if (a.isString(t) && (t = t.trim()) && !En(t))
|
|
1386
|
+
i(mn(t), r);
|
|
1384
1387
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
1385
1388
|
let c = {}, d, l;
|
|
1386
1389
|
for (const u of t) {
|
|
@@ -1388,81 +1391,81 @@ let L = class {
|
|
|
1388
1391
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1389
1392
|
c[l = u[0]] = (d = c[l]) ? a.isArray(d) ? [...d, u[1]] : [d, u[1]] : u[1];
|
|
1390
1393
|
}
|
|
1391
|
-
i(c,
|
|
1394
|
+
i(c, r);
|
|
1392
1395
|
} else
|
|
1393
|
-
t != null && o(
|
|
1396
|
+
t != null && o(r, t, n);
|
|
1394
1397
|
return this;
|
|
1395
1398
|
}
|
|
1396
|
-
get(t,
|
|
1399
|
+
get(t, r) {
|
|
1397
1400
|
if (t = ee(t), t) {
|
|
1398
|
-
const
|
|
1399
|
-
if (
|
|
1400
|
-
const s = this[
|
|
1401
|
-
if (!
|
|
1401
|
+
const n = a.findKey(this, t);
|
|
1402
|
+
if (n) {
|
|
1403
|
+
const s = this[n];
|
|
1404
|
+
if (!r)
|
|
1402
1405
|
return s;
|
|
1403
|
-
if (
|
|
1404
|
-
return
|
|
1405
|
-
if (a.isFunction(
|
|
1406
|
-
return
|
|
1407
|
-
if (a.isRegExp(
|
|
1408
|
-
return
|
|
1406
|
+
if (r === !0)
|
|
1407
|
+
return Rn(s);
|
|
1408
|
+
if (a.isFunction(r))
|
|
1409
|
+
return r.call(this, s, n);
|
|
1410
|
+
if (a.isRegExp(r))
|
|
1411
|
+
return r.exec(s);
|
|
1409
1412
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1410
1413
|
}
|
|
1411
1414
|
}
|
|
1412
1415
|
}
|
|
1413
|
-
has(t,
|
|
1416
|
+
has(t, r) {
|
|
1414
1417
|
if (t = ee(t), t) {
|
|
1415
|
-
const
|
|
1416
|
-
return !!(
|
|
1418
|
+
const n = a.findKey(this, t);
|
|
1419
|
+
return !!(n && this[n] !== void 0 && (!r || xe(this, this[n], n, r)));
|
|
1417
1420
|
}
|
|
1418
1421
|
return !1;
|
|
1419
1422
|
}
|
|
1420
|
-
delete(t,
|
|
1421
|
-
const
|
|
1423
|
+
delete(t, r) {
|
|
1424
|
+
const n = this;
|
|
1422
1425
|
let s = !1;
|
|
1423
1426
|
function o(i) {
|
|
1424
1427
|
if (i = ee(i), i) {
|
|
1425
|
-
const c = a.findKey(
|
|
1426
|
-
c && (!
|
|
1428
|
+
const c = a.findKey(n, i);
|
|
1429
|
+
c && (!r || xe(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
1427
1430
|
}
|
|
1428
1431
|
}
|
|
1429
1432
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
1430
1433
|
}
|
|
1431
1434
|
clear(t) {
|
|
1432
|
-
const
|
|
1433
|
-
let
|
|
1434
|
-
for (;
|
|
1435
|
-
const o = n
|
|
1435
|
+
const r = Object.keys(this);
|
|
1436
|
+
let n = r.length, s = !1;
|
|
1437
|
+
for (; n--; ) {
|
|
1438
|
+
const o = r[n];
|
|
1436
1439
|
(!t || xe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
1437
1440
|
}
|
|
1438
1441
|
return s;
|
|
1439
1442
|
}
|
|
1440
1443
|
normalize(t) {
|
|
1441
|
-
const
|
|
1444
|
+
const r = this, n = {};
|
|
1442
1445
|
return a.forEach(this, (s, o) => {
|
|
1443
|
-
const i = a.findKey(
|
|
1446
|
+
const i = a.findKey(n, o);
|
|
1444
1447
|
if (i) {
|
|
1445
|
-
|
|
1448
|
+
r[i] = ue(s), delete r[o];
|
|
1446
1449
|
return;
|
|
1447
1450
|
}
|
|
1448
|
-
const c = t ?
|
|
1449
|
-
c !== o && delete
|
|
1451
|
+
const c = t ? bn(o) : String(o).trim();
|
|
1452
|
+
c !== o && delete r[o], r[c] = ue(s), n[c] = !0;
|
|
1450
1453
|
}), this;
|
|
1451
1454
|
}
|
|
1452
1455
|
concat(...t) {
|
|
1453
1456
|
return this.constructor.concat(this, ...t);
|
|
1454
1457
|
}
|
|
1455
1458
|
toJSON(t) {
|
|
1456
|
-
const
|
|
1457
|
-
return a.forEach(this, (
|
|
1458
|
-
|
|
1459
|
-
}),
|
|
1459
|
+
const r = /* @__PURE__ */ Object.create(null);
|
|
1460
|
+
return a.forEach(this, (n, s) => {
|
|
1461
|
+
n != null && n !== !1 && (r[s] = t && a.isArray(n) ? n.join(", ") : n);
|
|
1462
|
+
}), r;
|
|
1460
1463
|
}
|
|
1461
1464
|
[Symbol.iterator]() {
|
|
1462
1465
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1463
1466
|
}
|
|
1464
1467
|
toString() {
|
|
1465
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
1468
|
+
return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
|
|
1466
1469
|
`);
|
|
1467
1470
|
}
|
|
1468
1471
|
getSetCookie() {
|
|
@@ -1474,96 +1477,96 @@ let L = class {
|
|
|
1474
1477
|
static from(t) {
|
|
1475
1478
|
return t instanceof this ? t : new this(t);
|
|
1476
1479
|
}
|
|
1477
|
-
static concat(t, ...
|
|
1478
|
-
const
|
|
1479
|
-
return
|
|
1480
|
+
static concat(t, ...r) {
|
|
1481
|
+
const n = new this(t);
|
|
1482
|
+
return r.forEach((s) => n.set(s)), n;
|
|
1480
1483
|
}
|
|
1481
1484
|
static accessor(t) {
|
|
1482
|
-
const
|
|
1485
|
+
const n = (this[nt] = this[nt] = {
|
|
1483
1486
|
accessors: {}
|
|
1484
1487
|
}).accessors, s = this.prototype;
|
|
1485
1488
|
function o(i) {
|
|
1486
1489
|
const c = ee(i);
|
|
1487
|
-
|
|
1490
|
+
n[c] || (yn(s, i), n[c] = !0);
|
|
1488
1491
|
}
|
|
1489
1492
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1490
1493
|
}
|
|
1491
1494
|
};
|
|
1492
1495
|
L.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1493
1496
|
a.reduceDescriptors(L.prototype, ({ value: e }, t) => {
|
|
1494
|
-
let
|
|
1497
|
+
let r = t[0].toUpperCase() + t.slice(1);
|
|
1495
1498
|
return {
|
|
1496
1499
|
get: () => e,
|
|
1497
|
-
set(
|
|
1498
|
-
this[
|
|
1500
|
+
set(n) {
|
|
1501
|
+
this[r] = n;
|
|
1499
1502
|
}
|
|
1500
1503
|
};
|
|
1501
1504
|
});
|
|
1502
1505
|
a.freezeMethods(L);
|
|
1503
1506
|
function Ne(e, t) {
|
|
1504
|
-
const
|
|
1505
|
-
let o =
|
|
1507
|
+
const r = this || ae, n = t || r, s = L.from(n.headers);
|
|
1508
|
+
let o = n.data;
|
|
1506
1509
|
return a.forEach(e, function(c) {
|
|
1507
|
-
o = c.call(
|
|
1510
|
+
o = c.call(r, o, s.normalize(), t ? t.status : void 0);
|
|
1508
1511
|
}), s.normalize(), o;
|
|
1509
1512
|
}
|
|
1510
1513
|
function vt(e) {
|
|
1511
1514
|
return !!(e && e.__CANCEL__);
|
|
1512
1515
|
}
|
|
1513
|
-
function K(e, t,
|
|
1514
|
-
y.call(this, e ?? "canceled", y.ERR_CANCELED, t,
|
|
1516
|
+
function K(e, t, r) {
|
|
1517
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
1515
1518
|
}
|
|
1516
1519
|
a.inherits(K, y, {
|
|
1517
1520
|
__CANCEL__: !0
|
|
1518
1521
|
});
|
|
1519
|
-
function jt(e, t,
|
|
1520
|
-
const
|
|
1521
|
-
!
|
|
1522
|
-
"Request failed with status code " +
|
|
1523
|
-
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1522
|
+
function jt(e, t, r) {
|
|
1523
|
+
const n = r.config.validateStatus;
|
|
1524
|
+
!r.status || !n || n(r.status) ? e(r) : t(new y(
|
|
1525
|
+
"Request failed with status code " + r.status,
|
|
1526
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
1527
|
+
r.config,
|
|
1528
|
+
r.request,
|
|
1529
|
+
r
|
|
1527
1530
|
));
|
|
1528
1531
|
}
|
|
1529
|
-
function
|
|
1532
|
+
function wn(e) {
|
|
1530
1533
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1531
1534
|
return t && t[1] || "";
|
|
1532
1535
|
}
|
|
1533
|
-
function
|
|
1536
|
+
function Tn(e, t) {
|
|
1534
1537
|
e = e || 10;
|
|
1535
|
-
const
|
|
1538
|
+
const r = new Array(e), n = new Array(e);
|
|
1536
1539
|
let s = 0, o = 0, i;
|
|
1537
1540
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1538
|
-
const l = Date.now(), u =
|
|
1539
|
-
i || (i = l),
|
|
1541
|
+
const l = Date.now(), u = n[o];
|
|
1542
|
+
i || (i = l), r[s] = d, n[s] = l;
|
|
1540
1543
|
let p = o, b = 0;
|
|
1541
1544
|
for (; p !== s; )
|
|
1542
|
-
b +=
|
|
1545
|
+
b += r[p++], p = p % e;
|
|
1543
1546
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
1544
1547
|
return;
|
|
1545
1548
|
const T = u && l - u;
|
|
1546
1549
|
return T ? Math.round(b * 1e3 / T) : void 0;
|
|
1547
1550
|
};
|
|
1548
1551
|
}
|
|
1549
|
-
function
|
|
1550
|
-
let
|
|
1552
|
+
function Sn(e, t) {
|
|
1553
|
+
let r = 0, n = 1e3 / t, s, o;
|
|
1551
1554
|
const i = (l, u = Date.now()) => {
|
|
1552
|
-
|
|
1555
|
+
r = u, s = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
|
1553
1556
|
};
|
|
1554
1557
|
return [(...l) => {
|
|
1555
|
-
const u = Date.now(), p = u -
|
|
1556
|
-
p >=
|
|
1558
|
+
const u = Date.now(), p = u - r;
|
|
1559
|
+
p >= n ? i(l, u) : (s = l, o || (o = setTimeout(() => {
|
|
1557
1560
|
o = null, i(s);
|
|
1558
|
-
},
|
|
1561
|
+
}, n - p)));
|
|
1559
1562
|
}, () => s && i(s)];
|
|
1560
1563
|
}
|
|
1561
|
-
const de = (e, t,
|
|
1562
|
-
let
|
|
1563
|
-
const s =
|
|
1564
|
-
return
|
|
1565
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i -
|
|
1566
|
-
|
|
1564
|
+
const de = (e, t, r = 3) => {
|
|
1565
|
+
let n = 0;
|
|
1566
|
+
const s = Tn(50, 250);
|
|
1567
|
+
return Sn((o) => {
|
|
1568
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - n, l = s(d), u = i <= c;
|
|
1569
|
+
n = i;
|
|
1567
1570
|
const p = {
|
|
1568
1571
|
loaded: i,
|
|
1569
1572
|
total: c,
|
|
@@ -1576,23 +1579,23 @@ const de = (e, t, n = 3) => {
|
|
|
1576
1579
|
[t ? "download" : "upload"]: !0
|
|
1577
1580
|
};
|
|
1578
1581
|
e(p);
|
|
1579
|
-
},
|
|
1582
|
+
}, r);
|
|
1580
1583
|
}, st = (e, t) => {
|
|
1581
|
-
const
|
|
1582
|
-
return [(
|
|
1583
|
-
lengthComputable:
|
|
1584
|
+
const r = e != null;
|
|
1585
|
+
return [(n) => t[0]({
|
|
1586
|
+
lengthComputable: r,
|
|
1584
1587
|
total: e,
|
|
1585
|
-
loaded:
|
|
1588
|
+
loaded: n
|
|
1586
1589
|
}), t[1]];
|
|
1587
|
-
}, ot = (e) => (...t) => a.asap(() => e(...t)),
|
|
1590
|
+
}, ot = (e) => (...t) => a.asap(() => e(...t)), gn = 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)))(
|
|
1588
1591
|
new URL(F.origin),
|
|
1589
1592
|
F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)
|
|
1590
|
-
) : () => !0,
|
|
1593
|
+
) : () => !0, On = F.hasStandardBrowserEnv ? (
|
|
1591
1594
|
// Standard browser envs support document.cookie
|
|
1592
1595
|
{
|
|
1593
|
-
write(e, t,
|
|
1596
|
+
write(e, t, r, n, s, o) {
|
|
1594
1597
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
1595
|
-
a.isNumber(
|
|
1598
|
+
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("; ");
|
|
1596
1599
|
},
|
|
1597
1600
|
read(e) {
|
|
1598
1601
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -1614,44 +1617,44 @@ const de = (e, t, n = 3) => {
|
|
|
1614
1617
|
}
|
|
1615
1618
|
}
|
|
1616
1619
|
);
|
|
1617
|
-
function
|
|
1620
|
+
function An(e) {
|
|
1618
1621
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1619
1622
|
}
|
|
1620
|
-
function
|
|
1623
|
+
function _n(e, t) {
|
|
1621
1624
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1622
1625
|
}
|
|
1623
|
-
function Lt(e, t,
|
|
1624
|
-
let
|
|
1625
|
-
return e && (
|
|
1626
|
+
function Lt(e, t, r) {
|
|
1627
|
+
let n = !An(t);
|
|
1628
|
+
return e && (n || r == !1) ? _n(e, t) : t;
|
|
1626
1629
|
}
|
|
1627
1630
|
const it = (e) => e instanceof L ? { ...e } : e;
|
|
1628
1631
|
function J(e, t) {
|
|
1629
1632
|
t = t || {};
|
|
1630
|
-
const
|
|
1631
|
-
function
|
|
1633
|
+
const r = {};
|
|
1634
|
+
function n(l, u, p, b) {
|
|
1632
1635
|
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;
|
|
1633
1636
|
}
|
|
1634
1637
|
function s(l, u, p, b) {
|
|
1635
1638
|
if (a.isUndefined(u)) {
|
|
1636
1639
|
if (!a.isUndefined(l))
|
|
1637
|
-
return
|
|
1638
|
-
} else return
|
|
1640
|
+
return n(void 0, l, p, b);
|
|
1641
|
+
} else return n(l, u, p, b);
|
|
1639
1642
|
}
|
|
1640
1643
|
function o(l, u) {
|
|
1641
1644
|
if (!a.isUndefined(u))
|
|
1642
|
-
return
|
|
1645
|
+
return n(void 0, u);
|
|
1643
1646
|
}
|
|
1644
1647
|
function i(l, u) {
|
|
1645
1648
|
if (a.isUndefined(u)) {
|
|
1646
1649
|
if (!a.isUndefined(l))
|
|
1647
|
-
return
|
|
1648
|
-
} else return
|
|
1650
|
+
return n(void 0, l);
|
|
1651
|
+
} else return n(void 0, u);
|
|
1649
1652
|
}
|
|
1650
1653
|
function c(l, u, p) {
|
|
1651
1654
|
if (p in t)
|
|
1652
|
-
return
|
|
1655
|
+
return n(l, u);
|
|
1653
1656
|
if (p in e)
|
|
1654
|
-
return
|
|
1657
|
+
return n(void 0, l);
|
|
1655
1658
|
}
|
|
1656
1659
|
const d = {
|
|
1657
1660
|
url: o,
|
|
@@ -1686,18 +1689,18 @@ function J(e, t) {
|
|
|
1686
1689
|
};
|
|
1687
1690
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
1688
1691
|
const p = d[u] || s, b = p(e[u], t[u], u);
|
|
1689
|
-
a.isUndefined(b) && p !== c || (
|
|
1690
|
-
}),
|
|
1692
|
+
a.isUndefined(b) && p !== c || (r[u] = b);
|
|
1693
|
+
}), r;
|
|
1691
1694
|
}
|
|
1692
1695
|
const Ut = (e) => {
|
|
1693
1696
|
const t = J({}, e);
|
|
1694
|
-
let { data:
|
|
1695
|
-
t.headers = i = L.from(i), t.url =
|
|
1697
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1698
|
+
t.headers = i = L.from(i), t.url = Ct(Lt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1696
1699
|
"Authorization",
|
|
1697
1700
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1698
1701
|
);
|
|
1699
1702
|
let d;
|
|
1700
|
-
if (a.isFormData(
|
|
1703
|
+
if (a.isFormData(r)) {
|
|
1701
1704
|
if (F.hasStandardBrowserEnv || F.hasStandardBrowserWebWorkerEnv)
|
|
1702
1705
|
i.setContentType(void 0);
|
|
1703
1706
|
else if ((d = i.getContentType()) !== !1) {
|
|
@@ -1705,13 +1708,13 @@ const Ut = (e) => {
|
|
|
1705
1708
|
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1706
1709
|
}
|
|
1707
1710
|
}
|
|
1708
|
-
if (F.hasStandardBrowserEnv && (
|
|
1709
|
-
const l = s && o &&
|
|
1711
|
+
if (F.hasStandardBrowserEnv && (n && a.isFunction(n) && (n = n(t)), n || n !== !1 && gn(t.url))) {
|
|
1712
|
+
const l = s && o && On.read(o);
|
|
1710
1713
|
l && i.set(s, l);
|
|
1711
1714
|
}
|
|
1712
1715
|
return t;
|
|
1713
|
-
},
|
|
1714
|
-
return new Promise(function(
|
|
1716
|
+
}, xn = typeof XMLHttpRequest < "u", Nn = xn && function(e) {
|
|
1717
|
+
return new Promise(function(r, n) {
|
|
1715
1718
|
const s = Ut(e);
|
|
1716
1719
|
let o = s.data;
|
|
1717
1720
|
const i = L.from(s.headers).normalize();
|
|
@@ -1735,21 +1738,21 @@ const Ut = (e) => {
|
|
|
1735
1738
|
request: m
|
|
1736
1739
|
};
|
|
1737
1740
|
jt(function(U) {
|
|
1738
|
-
n(U), R();
|
|
1739
|
-
}, function(U) {
|
|
1740
1741
|
r(U), R();
|
|
1742
|
+
}, function(U) {
|
|
1743
|
+
n(U), R();
|
|
1741
1744
|
}, A), m = null;
|
|
1742
1745
|
}
|
|
1743
1746
|
"onloadend" in m ? m.onloadend = g : m.onreadystatechange = function() {
|
|
1744
1747
|
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1745
1748
|
}, m.onabort = function() {
|
|
1746
|
-
m && (
|
|
1749
|
+
m && (n(new y("Request aborted", y.ECONNABORTED, e, m)), m = null);
|
|
1747
1750
|
}, m.onerror = function() {
|
|
1748
|
-
|
|
1751
|
+
n(new y("Network Error", y.ERR_NETWORK, e, m)), m = null;
|
|
1749
1752
|
}, m.ontimeout = function() {
|
|
1750
1753
|
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1751
1754
|
const A = s.transitional || kt;
|
|
1752
|
-
s.timeoutErrorMessage && (O = s.timeoutErrorMessage),
|
|
1755
|
+
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), n(new y(
|
|
1753
1756
|
O,
|
|
1754
1757
|
A.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1755
1758
|
e,
|
|
@@ -1758,24 +1761,24 @@ const Ut = (e) => {
|
|
|
1758
1761
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(O, A) {
|
|
1759
1762
|
m.setRequestHeader(A, O);
|
|
1760
1763
|
}), a.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), c && c !== "json" && (m.responseType = s.responseType), l && ([b, h] = de(l, !0), m.addEventListener("progress", b)), d && m.upload && ([p, T] = de(d), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", T)), (s.cancelToken || s.signal) && (u = (S) => {
|
|
1761
|
-
m && (
|
|
1764
|
+
m && (n(!S || S.type ? new K(null, e, m) : S), m.abort(), m = null);
|
|
1762
1765
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1763
|
-
const E =
|
|
1766
|
+
const E = wn(s.url);
|
|
1764
1767
|
if (E && F.protocols.indexOf(E) === -1) {
|
|
1765
|
-
|
|
1768
|
+
n(new y("Unsupported protocol " + E + ":", y.ERR_BAD_REQUEST, e));
|
|
1766
1769
|
return;
|
|
1767
1770
|
}
|
|
1768
1771
|
m.send(o || null);
|
|
1769
1772
|
});
|
|
1770
|
-
},
|
|
1771
|
-
const { length:
|
|
1772
|
-
if (t ||
|
|
1773
|
-
let
|
|
1773
|
+
}, Pn = (e, t) => {
|
|
1774
|
+
const { length: r } = e = e ? e.filter(Boolean) : [];
|
|
1775
|
+
if (t || r) {
|
|
1776
|
+
let n = new AbortController(), s;
|
|
1774
1777
|
const o = function(l) {
|
|
1775
1778
|
if (!s) {
|
|
1776
1779
|
s = !0, c();
|
|
1777
1780
|
const u = l instanceof Error ? l : this.reason;
|
|
1778
|
-
|
|
1781
|
+
n.abort(u instanceof y ? u : new K(u instanceof Error ? u.message : u));
|
|
1779
1782
|
}
|
|
1780
1783
|
};
|
|
1781
1784
|
let i = t && setTimeout(() => {
|
|
@@ -1787,22 +1790,22 @@ const Ut = (e) => {
|
|
|
1787
1790
|
}), e = null);
|
|
1788
1791
|
};
|
|
1789
1792
|
e.forEach((l) => l.addEventListener("abort", o));
|
|
1790
|
-
const { signal: d } =
|
|
1793
|
+
const { signal: d } = n;
|
|
1791
1794
|
return d.unsubscribe = () => a.asap(c), d;
|
|
1792
1795
|
}
|
|
1793
|
-
},
|
|
1794
|
-
let
|
|
1795
|
-
if (
|
|
1796
|
+
}, Cn = function* (e, t) {
|
|
1797
|
+
let r = e.byteLength;
|
|
1798
|
+
if (r < t) {
|
|
1796
1799
|
yield e;
|
|
1797
1800
|
return;
|
|
1798
1801
|
}
|
|
1799
|
-
let
|
|
1800
|
-
for (;
|
|
1801
|
-
s =
|
|
1802
|
-
},
|
|
1803
|
-
for await (const
|
|
1804
|
-
yield*
|
|
1805
|
-
},
|
|
1802
|
+
let n = 0, s;
|
|
1803
|
+
for (; n < r; )
|
|
1804
|
+
s = n + t, yield e.slice(n, s), n = s;
|
|
1805
|
+
}, kn = async function* (e, t) {
|
|
1806
|
+
for await (const r of Fn(e))
|
|
1807
|
+
yield* Cn(r, t);
|
|
1808
|
+
}, Fn = async function* (e) {
|
|
1806
1809
|
if (e[Symbol.asyncIterator]) {
|
|
1807
1810
|
yield* e;
|
|
1808
1811
|
return;
|
|
@@ -1810,18 +1813,18 @@ const Ut = (e) => {
|
|
|
1810
1813
|
const t = e.getReader();
|
|
1811
1814
|
try {
|
|
1812
1815
|
for (; ; ) {
|
|
1813
|
-
const { done:
|
|
1814
|
-
if (
|
|
1816
|
+
const { done: r, value: n } = await t.read();
|
|
1817
|
+
if (r)
|
|
1815
1818
|
break;
|
|
1816
|
-
yield
|
|
1819
|
+
yield n;
|
|
1817
1820
|
}
|
|
1818
1821
|
} finally {
|
|
1819
1822
|
await t.cancel();
|
|
1820
1823
|
}
|
|
1821
|
-
}, at = (e, t,
|
|
1822
|
-
const s =
|
|
1824
|
+
}, at = (e, t, r, n) => {
|
|
1825
|
+
const s = kn(e, t);
|
|
1823
1826
|
let o = 0, i, c = (d) => {
|
|
1824
|
-
i || (i = !0,
|
|
1827
|
+
i || (i = !0, n && n(d));
|
|
1825
1828
|
};
|
|
1826
1829
|
return new ReadableStream({
|
|
1827
1830
|
async pull(d) {
|
|
@@ -1832,9 +1835,9 @@ const Ut = (e) => {
|
|
|
1832
1835
|
return;
|
|
1833
1836
|
}
|
|
1834
1837
|
let p = u.byteLength;
|
|
1835
|
-
if (
|
|
1838
|
+
if (r) {
|
|
1836
1839
|
let b = o += p;
|
|
1837
|
-
|
|
1840
|
+
r(b);
|
|
1838
1841
|
}
|
|
1839
1842
|
d.enqueue(new Uint8Array(u));
|
|
1840
1843
|
} catch (l) {
|
|
@@ -1847,13 +1850,13 @@ const Ut = (e) => {
|
|
|
1847
1850
|
}, {
|
|
1848
1851
|
highWaterMark: 2
|
|
1849
1852
|
});
|
|
1850
|
-
}, ye = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Dt = ye && typeof ReadableStream == "function",
|
|
1853
|
+
}, ye = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Dt = ye && typeof ReadableStream == "function", vn = ye && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Bt = (e, ...t) => {
|
|
1851
1854
|
try {
|
|
1852
1855
|
return !!e(...t);
|
|
1853
1856
|
} catch {
|
|
1854
1857
|
return !1;
|
|
1855
1858
|
}
|
|
1856
|
-
},
|
|
1859
|
+
}, jn = Dt && Bt(() => {
|
|
1857
1860
|
let e = !1;
|
|
1858
1861
|
const t = new Request(F.origin, {
|
|
1859
1862
|
body: new ReadableStream(),
|
|
@@ -1868,12 +1871,12 @@ const Ut = (e) => {
|
|
|
1868
1871
|
};
|
|
1869
1872
|
ye && ((e) => {
|
|
1870
1873
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1871
|
-
!pe[t] && (pe[t] = a.isFunction(e[t]) ? (
|
|
1872
|
-
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT,
|
|
1874
|
+
!pe[t] && (pe[t] = a.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1875
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, n);
|
|
1873
1876
|
});
|
|
1874
1877
|
});
|
|
1875
1878
|
})(new Response());
|
|
1876
|
-
const
|
|
1879
|
+
const Ln = async (e) => {
|
|
1877
1880
|
if (e == null)
|
|
1878
1881
|
return 0;
|
|
1879
1882
|
if (a.isBlob(e))
|
|
@@ -1886,15 +1889,15 @@ const Lr = async (e) => {
|
|
|
1886
1889
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1887
1890
|
return e.byteLength;
|
|
1888
1891
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1889
|
-
return (await
|
|
1890
|
-
},
|
|
1891
|
-
const
|
|
1892
|
-
return
|
|
1893
|
-
},
|
|
1892
|
+
return (await vn(e)).byteLength;
|
|
1893
|
+
}, Un = async (e, t) => {
|
|
1894
|
+
const r = a.toFiniteNumber(e.getContentLength());
|
|
1895
|
+
return r ?? Ln(t);
|
|
1896
|
+
}, Dn = ye && (async (e) => {
|
|
1894
1897
|
let {
|
|
1895
1898
|
url: t,
|
|
1896
|
-
method:
|
|
1897
|
-
data:
|
|
1899
|
+
method: r,
|
|
1900
|
+
data: n,
|
|
1898
1901
|
signal: s,
|
|
1899
1902
|
cancelToken: o,
|
|
1900
1903
|
timeout: i,
|
|
@@ -1906,24 +1909,24 @@ const Lr = async (e) => {
|
|
|
1906
1909
|
fetchOptions: b
|
|
1907
1910
|
} = Ut(e);
|
|
1908
1911
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1909
|
-
let T =
|
|
1912
|
+
let T = Pn([s, o && o.toAbortSignal()], i), h;
|
|
1910
1913
|
const R = T && T.unsubscribe && (() => {
|
|
1911
1914
|
T.unsubscribe();
|
|
1912
1915
|
});
|
|
1913
1916
|
let m;
|
|
1914
1917
|
try {
|
|
1915
|
-
if (d &&
|
|
1918
|
+
if (d && jn && r !== "get" && r !== "head" && (m = await Un(u, n)) !== 0) {
|
|
1916
1919
|
let A = new Request(t, {
|
|
1917
1920
|
method: "POST",
|
|
1918
|
-
body:
|
|
1921
|
+
body: n,
|
|
1919
1922
|
duplex: "half"
|
|
1920
1923
|
}), N;
|
|
1921
|
-
if (a.isFormData(
|
|
1922
|
-
const [U,
|
|
1924
|
+
if (a.isFormData(n) && (N = A.headers.get("content-type")) && u.setContentType(N), A.body) {
|
|
1925
|
+
const [U, P] = st(
|
|
1923
1926
|
m,
|
|
1924
1927
|
de(ot(d))
|
|
1925
1928
|
);
|
|
1926
|
-
|
|
1929
|
+
n = at(A.body, ct, U, P);
|
|
1927
1930
|
}
|
|
1928
1931
|
}
|
|
1929
1932
|
a.isString(p) || (p = p ? "include" : "omit");
|
|
@@ -1931,9 +1934,9 @@ const Lr = async (e) => {
|
|
|
1931
1934
|
h = new Request(t, {
|
|
1932
1935
|
...b,
|
|
1933
1936
|
signal: T,
|
|
1934
|
-
method:
|
|
1937
|
+
method: r.toUpperCase(),
|
|
1935
1938
|
headers: u.normalize().toJSON(),
|
|
1936
|
-
body:
|
|
1939
|
+
body: n,
|
|
1937
1940
|
duplex: "half",
|
|
1938
1941
|
credentials: g ? p : void 0
|
|
1939
1942
|
});
|
|
@@ -1944,13 +1947,13 @@ const Lr = async (e) => {
|
|
|
1944
1947
|
["status", "statusText", "headers"].forEach((I) => {
|
|
1945
1948
|
A[I] = E[I];
|
|
1946
1949
|
});
|
|
1947
|
-
const N = a.toFiniteNumber(E.headers.get("content-length")), [U,
|
|
1950
|
+
const N = a.toFiniteNumber(E.headers.get("content-length")), [U, P] = c && st(
|
|
1948
1951
|
N,
|
|
1949
1952
|
de(ot(c), !0)
|
|
1950
1953
|
) || [];
|
|
1951
1954
|
E = new Response(
|
|
1952
1955
|
at(E.body, ct, U, () => {
|
|
1953
|
-
|
|
1956
|
+
P && P(), R && R();
|
|
1954
1957
|
}),
|
|
1955
1958
|
A
|
|
1956
1959
|
);
|
|
@@ -1976,9 +1979,9 @@ const Lr = async (e) => {
|
|
|
1976
1979
|
) : y.from(g, g && g.code, e, h);
|
|
1977
1980
|
}
|
|
1978
1981
|
}), je = {
|
|
1979
|
-
http:
|
|
1980
|
-
xhr:
|
|
1981
|
-
fetch:
|
|
1982
|
+
http: Gr,
|
|
1983
|
+
xhr: Nn,
|
|
1984
|
+
fetch: Dn
|
|
1982
1985
|
};
|
|
1983
1986
|
a.forEach(je, (e, t) => {
|
|
1984
1987
|
if (e) {
|
|
@@ -1989,22 +1992,22 @@ a.forEach(je, (e, t) => {
|
|
|
1989
1992
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1990
1993
|
}
|
|
1991
1994
|
});
|
|
1992
|
-
const lt = (e) => `- ${e}`,
|
|
1995
|
+
const lt = (e) => `- ${e}`, Bn = (e) => a.isFunction(e) || e === null || e === !1, qt = {
|
|
1993
1996
|
getAdapter: (e) => {
|
|
1994
1997
|
e = a.isArray(e) ? e : [e];
|
|
1995
1998
|
const { length: t } = e;
|
|
1996
|
-
let
|
|
1999
|
+
let r, n;
|
|
1997
2000
|
const s = {};
|
|
1998
2001
|
for (let o = 0; o < t; o++) {
|
|
1999
|
-
|
|
2002
|
+
r = e[o];
|
|
2000
2003
|
let i;
|
|
2001
|
-
if (
|
|
2004
|
+
if (n = r, !Bn(r) && (n = je[(i = String(r)).toLowerCase()], n === void 0))
|
|
2002
2005
|
throw new y(`Unknown adapter '${i}'`);
|
|
2003
|
-
if (
|
|
2006
|
+
if (n)
|
|
2004
2007
|
break;
|
|
2005
|
-
s[i || "#" + o] =
|
|
2008
|
+
s[i || "#" + o] = n;
|
|
2006
2009
|
}
|
|
2007
|
-
if (!
|
|
2010
|
+
if (!n) {
|
|
2008
2011
|
const o = Object.entries(s).map(
|
|
2009
2012
|
([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2010
2013
|
);
|
|
@@ -2016,86 +2019,86 @@ const lt = (e) => `- ${e}`, Br = (e) => a.isFunction(e) || e === null || e === !
|
|
|
2016
2019
|
"ERR_NOT_SUPPORT"
|
|
2017
2020
|
);
|
|
2018
2021
|
}
|
|
2019
|
-
return
|
|
2022
|
+
return n;
|
|
2020
2023
|
},
|
|
2021
2024
|
adapters: je
|
|
2022
2025
|
};
|
|
2023
|
-
function
|
|
2026
|
+
function Pe(e) {
|
|
2024
2027
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2025
2028
|
throw new K(null, e);
|
|
2026
2029
|
}
|
|
2027
2030
|
function ut(e) {
|
|
2028
|
-
return
|
|
2031
|
+
return Pe(e), e.headers = L.from(e.headers), e.data = Ne.call(
|
|
2029
2032
|
e,
|
|
2030
2033
|
e.transformRequest
|
|
2031
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), qt.getAdapter(e.adapter || ae.adapter)(e).then(function(
|
|
2032
|
-
return
|
|
2034
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), qt.getAdapter(e.adapter || ae.adapter)(e).then(function(n) {
|
|
2035
|
+
return Pe(e), n.data = Ne.call(
|
|
2033
2036
|
e,
|
|
2034
2037
|
e.transformResponse,
|
|
2035
|
-
|
|
2036
|
-
),
|
|
2037
|
-
}, function(
|
|
2038
|
-
return vt(
|
|
2038
|
+
n
|
|
2039
|
+
), n.headers = L.from(n.headers), n;
|
|
2040
|
+
}, function(n) {
|
|
2041
|
+
return vt(n) || (Pe(e), n && n.response && (n.response.data = Ne.call(
|
|
2039
2042
|
e,
|
|
2040
2043
|
e.transformResponse,
|
|
2041
|
-
|
|
2042
|
-
),
|
|
2044
|
+
n.response
|
|
2045
|
+
), n.response.headers = L.from(n.response.headers))), Promise.reject(n);
|
|
2043
2046
|
});
|
|
2044
2047
|
}
|
|
2045
2048
|
const It = "1.9.0", we = {};
|
|
2046
2049
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2047
|
-
we[e] = function(
|
|
2048
|
-
return typeof
|
|
2050
|
+
we[e] = function(n) {
|
|
2051
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2049
2052
|
};
|
|
2050
2053
|
});
|
|
2051
2054
|
const ft = {};
|
|
2052
|
-
we.transitional = function(t,
|
|
2055
|
+
we.transitional = function(t, r, n) {
|
|
2053
2056
|
function s(o, i) {
|
|
2054
|
-
return "[Axios v" + It + "] Transitional option '" + o + "'" + i + (
|
|
2057
|
+
return "[Axios v" + It + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
2055
2058
|
}
|
|
2056
2059
|
return (o, i, c) => {
|
|
2057
2060
|
if (t === !1)
|
|
2058
2061
|
throw new y(
|
|
2059
|
-
s(i, " has been removed" + (
|
|
2062
|
+
s(i, " has been removed" + (r ? " in " + r : "")),
|
|
2060
2063
|
y.ERR_DEPRECATED
|
|
2061
2064
|
);
|
|
2062
|
-
return
|
|
2065
|
+
return r && !ft[i] && (ft[i] = !0, console.warn(
|
|
2063
2066
|
s(
|
|
2064
2067
|
i,
|
|
2065
|
-
" has been deprecated since v" +
|
|
2068
|
+
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
2066
2069
|
)
|
|
2067
2070
|
)), t ? t(o, i, c) : !0;
|
|
2068
2071
|
};
|
|
2069
2072
|
};
|
|
2070
2073
|
we.spelling = function(t) {
|
|
2071
|
-
return (
|
|
2074
|
+
return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
|
|
2072
2075
|
};
|
|
2073
|
-
function
|
|
2076
|
+
function qn(e, t, r) {
|
|
2074
2077
|
if (typeof e != "object")
|
|
2075
2078
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
2076
|
-
const
|
|
2077
|
-
let s =
|
|
2079
|
+
const n = Object.keys(e);
|
|
2080
|
+
let s = n.length;
|
|
2078
2081
|
for (; s-- > 0; ) {
|
|
2079
|
-
const o =
|
|
2082
|
+
const o = n[s], i = t[o];
|
|
2080
2083
|
if (i) {
|
|
2081
2084
|
const c = e[o], d = c === void 0 || i(c, o, e);
|
|
2082
2085
|
if (d !== !0)
|
|
2083
2086
|
throw new y("option " + o + " must be " + d, y.ERR_BAD_OPTION_VALUE);
|
|
2084
2087
|
continue;
|
|
2085
2088
|
}
|
|
2086
|
-
if (
|
|
2089
|
+
if (r !== !0)
|
|
2087
2090
|
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
2088
2091
|
}
|
|
2089
2092
|
}
|
|
2090
2093
|
const fe = {
|
|
2091
|
-
assertOptions:
|
|
2094
|
+
assertOptions: qn,
|
|
2092
2095
|
validators: we
|
|
2093
2096
|
}, q = fe.validators;
|
|
2094
2097
|
let z = class {
|
|
2095
2098
|
constructor(t) {
|
|
2096
2099
|
this.defaults = t || {}, this.interceptors = {
|
|
2097
|
-
request: new
|
|
2098
|
-
response: new
|
|
2100
|
+
request: new rt(),
|
|
2101
|
+
response: new rt()
|
|
2099
2102
|
};
|
|
2100
2103
|
}
|
|
2101
2104
|
/**
|
|
@@ -2106,53 +2109,53 @@ let z = class {
|
|
|
2106
2109
|
*
|
|
2107
2110
|
* @returns {Promise} The Promise to be fulfilled
|
|
2108
2111
|
*/
|
|
2109
|
-
async request(t,
|
|
2112
|
+
async request(t, r) {
|
|
2110
2113
|
try {
|
|
2111
|
-
return await this._request(t,
|
|
2112
|
-
} catch (
|
|
2113
|
-
if (
|
|
2114
|
+
return await this._request(t, r);
|
|
2115
|
+
} catch (n) {
|
|
2116
|
+
if (n instanceof Error) {
|
|
2114
2117
|
let s = {};
|
|
2115
2118
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2116
2119
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
2117
2120
|
try {
|
|
2118
|
-
|
|
2119
|
-
` + o) :
|
|
2121
|
+
n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
2122
|
+
` + o) : n.stack = o;
|
|
2120
2123
|
} catch {
|
|
2121
2124
|
}
|
|
2122
2125
|
}
|
|
2123
|
-
throw
|
|
2126
|
+
throw n;
|
|
2124
2127
|
}
|
|
2125
2128
|
}
|
|
2126
|
-
_request(t,
|
|
2127
|
-
typeof t == "string" ? (
|
|
2128
|
-
const { transitional:
|
|
2129
|
-
|
|
2129
|
+
_request(t, r) {
|
|
2130
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = J(this.defaults, r);
|
|
2131
|
+
const { transitional: n, paramsSerializer: s, headers: o } = r;
|
|
2132
|
+
n !== void 0 && fe.assertOptions(n, {
|
|
2130
2133
|
silentJSONParsing: q.transitional(q.boolean),
|
|
2131
2134
|
forcedJSONParsing: q.transitional(q.boolean),
|
|
2132
2135
|
clarifyTimeoutError: q.transitional(q.boolean)
|
|
2133
|
-
}, !1), s != null && (a.isFunction(s) ?
|
|
2136
|
+
}, !1), s != null && (a.isFunction(s) ? r.paramsSerializer = {
|
|
2134
2137
|
serialize: s
|
|
2135
2138
|
} : fe.assertOptions(s, {
|
|
2136
2139
|
encode: q.function,
|
|
2137
2140
|
serialize: q.function
|
|
2138
|
-
}, !0)),
|
|
2141
|
+
}, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), fe.assertOptions(r, {
|
|
2139
2142
|
baseUrl: q.spelling("baseURL"),
|
|
2140
2143
|
withXsrfToken: q.spelling("withXSRFToken")
|
|
2141
|
-
}, !0),
|
|
2144
|
+
}, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
2142
2145
|
let i = o && a.merge(
|
|
2143
2146
|
o.common,
|
|
2144
|
-
o[
|
|
2147
|
+
o[r.method]
|
|
2145
2148
|
);
|
|
2146
2149
|
o && a.forEach(
|
|
2147
2150
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2148
2151
|
(h) => {
|
|
2149
2152
|
delete o[h];
|
|
2150
2153
|
}
|
|
2151
|
-
),
|
|
2154
|
+
), r.headers = L.concat(i, o);
|
|
2152
2155
|
const c = [];
|
|
2153
2156
|
let d = !0;
|
|
2154
2157
|
this.interceptors.request.forEach(function(R) {
|
|
2155
|
-
typeof R.runWhen == "function" && R.runWhen(
|
|
2158
|
+
typeof R.runWhen == "function" && R.runWhen(r) === !1 || (d = d && R.synchronous, c.unshift(R.fulfilled, R.rejected));
|
|
2156
2159
|
});
|
|
2157
2160
|
const l = [];
|
|
2158
2161
|
this.interceptors.response.forEach(function(R) {
|
|
@@ -2161,12 +2164,12 @@ let z = class {
|
|
|
2161
2164
|
let u, p = 0, b;
|
|
2162
2165
|
if (!d) {
|
|
2163
2166
|
const h = [ut.bind(this), void 0];
|
|
2164
|
-
for (h.unshift.apply(h, c), h.push.apply(h, l), b = h.length, u = Promise.resolve(
|
|
2167
|
+
for (h.unshift.apply(h, c), h.push.apply(h, l), b = h.length, u = Promise.resolve(r); p < b; )
|
|
2165
2168
|
u = u.then(h[p++], h[p++]);
|
|
2166
2169
|
return u;
|
|
2167
2170
|
}
|
|
2168
2171
|
b = c.length;
|
|
2169
|
-
let T =
|
|
2172
|
+
let T = r;
|
|
2170
2173
|
for (p = 0; p < b; ) {
|
|
2171
2174
|
const h = c[p++], R = c[p++];
|
|
2172
2175
|
try {
|
|
@@ -2187,25 +2190,25 @@ let z = class {
|
|
|
2187
2190
|
}
|
|
2188
2191
|
getUri(t) {
|
|
2189
2192
|
t = J(this.defaults, t);
|
|
2190
|
-
const
|
|
2191
|
-
return
|
|
2193
|
+
const r = Lt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2194
|
+
return Ct(r, t.params, t.paramsSerializer);
|
|
2192
2195
|
}
|
|
2193
2196
|
};
|
|
2194
2197
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2195
|
-
z.prototype[t] = function(
|
|
2196
|
-
return this.request(J(
|
|
2198
|
+
z.prototype[t] = function(r, n) {
|
|
2199
|
+
return this.request(J(n || {}, {
|
|
2197
2200
|
method: t,
|
|
2198
|
-
url:
|
|
2199
|
-
data: (
|
|
2201
|
+
url: r,
|
|
2202
|
+
data: (n || {}).data
|
|
2200
2203
|
}));
|
|
2201
2204
|
};
|
|
2202
2205
|
});
|
|
2203
2206
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
2204
|
-
function n
|
|
2207
|
+
function r(n) {
|
|
2205
2208
|
return function(o, i, c) {
|
|
2206
2209
|
return this.request(J(c || {}, {
|
|
2207
2210
|
method: t,
|
|
2208
|
-
headers:
|
|
2211
|
+
headers: n ? {
|
|
2209
2212
|
"Content-Type": "multipart/form-data"
|
|
2210
2213
|
} : {},
|
|
2211
2214
|
url: o,
|
|
@@ -2213,33 +2216,33 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
2213
2216
|
}));
|
|
2214
2217
|
};
|
|
2215
2218
|
}
|
|
2216
|
-
z.prototype[t] =
|
|
2219
|
+
z.prototype[t] = r(), z.prototype[t + "Form"] = r(!0);
|
|
2217
2220
|
});
|
|
2218
|
-
let
|
|
2221
|
+
let In = class $t {
|
|
2219
2222
|
constructor(t) {
|
|
2220
2223
|
if (typeof t != "function")
|
|
2221
2224
|
throw new TypeError("executor must be a function.");
|
|
2222
|
-
let
|
|
2225
|
+
let r;
|
|
2223
2226
|
this.promise = new Promise(function(o) {
|
|
2224
|
-
|
|
2227
|
+
r = o;
|
|
2225
2228
|
});
|
|
2226
|
-
const
|
|
2229
|
+
const n = this;
|
|
2227
2230
|
this.promise.then((s) => {
|
|
2228
|
-
if (!
|
|
2229
|
-
let o =
|
|
2231
|
+
if (!n._listeners) return;
|
|
2232
|
+
let o = n._listeners.length;
|
|
2230
2233
|
for (; o-- > 0; )
|
|
2231
|
-
|
|
2232
|
-
|
|
2234
|
+
n._listeners[o](s);
|
|
2235
|
+
n._listeners = null;
|
|
2233
2236
|
}), this.promise.then = (s) => {
|
|
2234
2237
|
let o;
|
|
2235
2238
|
const i = new Promise((c) => {
|
|
2236
|
-
|
|
2239
|
+
n.subscribe(c), o = c;
|
|
2237
2240
|
}).then(s);
|
|
2238
2241
|
return i.cancel = function() {
|
|
2239
|
-
|
|
2242
|
+
n.unsubscribe(o);
|
|
2240
2243
|
}, i;
|
|
2241
2244
|
}, t(function(o, i, c) {
|
|
2242
|
-
|
|
2245
|
+
n.reason || (n.reason = new K(o, i, c), r(n.reason));
|
|
2243
2246
|
});
|
|
2244
2247
|
}
|
|
2245
2248
|
/**
|
|
@@ -2265,14 +2268,14 @@ let Ir = class $t {
|
|
|
2265
2268
|
unsubscribe(t) {
|
|
2266
2269
|
if (!this._listeners)
|
|
2267
2270
|
return;
|
|
2268
|
-
const
|
|
2269
|
-
|
|
2271
|
+
const r = this._listeners.indexOf(t);
|
|
2272
|
+
r !== -1 && this._listeners.splice(r, 1);
|
|
2270
2273
|
}
|
|
2271
2274
|
toAbortSignal() {
|
|
2272
|
-
const t = new AbortController(),
|
|
2273
|
-
t.abort(
|
|
2275
|
+
const t = new AbortController(), r = (n) => {
|
|
2276
|
+
t.abort(n);
|
|
2274
2277
|
};
|
|
2275
|
-
return this.subscribe(
|
|
2278
|
+
return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), t.signal;
|
|
2276
2279
|
}
|
|
2277
2280
|
/**
|
|
2278
2281
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -2288,12 +2291,12 @@ let Ir = class $t {
|
|
|
2288
2291
|
};
|
|
2289
2292
|
}
|
|
2290
2293
|
};
|
|
2291
|
-
function $
|
|
2292
|
-
return function(
|
|
2293
|
-
return e.apply(null,
|
|
2294
|
+
function $n(e) {
|
|
2295
|
+
return function(r) {
|
|
2296
|
+
return e.apply(null, r);
|
|
2294
2297
|
};
|
|
2295
2298
|
}
|
|
2296
|
-
function
|
|
2299
|
+
function Mn(e) {
|
|
2297
2300
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
2298
2301
|
}
|
|
2299
2302
|
const Le = {
|
|
@@ -2365,15 +2368,15 @@ Object.entries(Le).forEach(([e, t]) => {
|
|
|
2365
2368
|
Le[t] = e;
|
|
2366
2369
|
});
|
|
2367
2370
|
function Mt(e) {
|
|
2368
|
-
const t = new z(e),
|
|
2369
|
-
return a.extend(
|
|
2371
|
+
const t = new z(e), r = bt(z.prototype.request, t);
|
|
2372
|
+
return a.extend(r, z.prototype, t, { allOwnKeys: !0 }), a.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
2370
2373
|
return Mt(J(e, s));
|
|
2371
|
-
},
|
|
2374
|
+
}, r;
|
|
2372
2375
|
}
|
|
2373
2376
|
const x = Mt(ae);
|
|
2374
2377
|
x.Axios = z;
|
|
2375
2378
|
x.CanceledError = K;
|
|
2376
|
-
x.CancelToken =
|
|
2379
|
+
x.CancelToken = In;
|
|
2377
2380
|
x.isCancel = vt;
|
|
2378
2381
|
x.VERSION = It;
|
|
2379
2382
|
x.toFormData = be;
|
|
@@ -2382,8 +2385,8 @@ x.Cancel = x.CanceledError;
|
|
|
2382
2385
|
x.all = function(t) {
|
|
2383
2386
|
return Promise.all(t);
|
|
2384
2387
|
};
|
|
2385
|
-
x.spread = $
|
|
2386
|
-
x.isAxiosError =
|
|
2388
|
+
x.spread = $n;
|
|
2389
|
+
x.isAxiosError = Mn;
|
|
2387
2390
|
x.mergeConfig = J;
|
|
2388
2391
|
x.AxiosHeaders = L;
|
|
2389
2392
|
x.formToJSON = (e) => Ft(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -2391,13 +2394,13 @@ x.getAdapter = qt.getAdapter;
|
|
|
2391
2394
|
x.HttpStatusCode = Le;
|
|
2392
2395
|
x.default = x;
|
|
2393
2396
|
const {
|
|
2394
|
-
Axios:
|
|
2395
|
-
AxiosError:
|
|
2396
|
-
CanceledError:
|
|
2397
|
+
Axios: Gn,
|
|
2398
|
+
AxiosError: Zn,
|
|
2399
|
+
CanceledError: Qn,
|
|
2397
2400
|
isCancel: es,
|
|
2398
2401
|
CancelToken: ts,
|
|
2399
|
-
VERSION:
|
|
2400
|
-
all:
|
|
2402
|
+
VERSION: rs,
|
|
2403
|
+
all: ns,
|
|
2401
2404
|
Cancel: ss,
|
|
2402
2405
|
isAxiosError: os,
|
|
2403
2406
|
spread: is,
|
|
@@ -2412,10 +2415,10 @@ const {
|
|
|
2412
2415
|
...e
|
|
2413
2416
|
});
|
|
2414
2417
|
export {
|
|
2415
|
-
|
|
2416
|
-
|
|
2418
|
+
Vn as AuthStateProvider,
|
|
2419
|
+
Yn as FetcherProvider,
|
|
2417
2420
|
ps as createAxiosInstance,
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
+
Jn as createGraphQLFetcher,
|
|
2422
|
+
Wn as createRestFulFetcher,
|
|
2423
|
+
cr as useAuthState
|
|
2421
2424
|
};
|