@acrool/react-fetcher 0.0.2-alpha.15 → 0.0.2-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acrool-react-fetcher.es.js +266 -270
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var zt = Object.defineProperty;
|
|
2
2
|
var Jt = (e, t, n) => t in e ? zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var $ = (e, t, n) => Jt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import Wt, { createContext as ft, useContext as Vt, useState as We,
|
|
4
|
+
import Wt, { createContext as ft, useContext as Vt, useState as We, useLayoutEffect as Yt } from "react";
|
|
5
5
|
function dt(e) {
|
|
6
6
|
return new Promise((t) => {
|
|
7
7
|
setTimeout(() => {
|
|
@@ -9,9 +9,9 @@ function dt(e) {
|
|
|
9
9
|
}, e);
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
const pt = 400,
|
|
12
|
+
const pt = 400, Kt = (e) => "File" in window && e instanceof File, Xt = (e) => "Blob" in window && e instanceof Blob, ht = (e, t = ["variables"]) => e && Object.keys(e).reduce((n, r) => {
|
|
13
13
|
const s = e[r];
|
|
14
|
-
if (
|
|
14
|
+
if (Kt(s) || Xt(s))
|
|
15
15
|
return {
|
|
16
16
|
variables: { ...n.variables, [r]: null },
|
|
17
17
|
map: [...n.map, t.concat(r).join(".")],
|
|
@@ -30,7 +30,7 @@ const pt = 400, Xt = (e) => "File" in window && e instanceof File, Gt = (e) => "
|
|
|
30
30
|
variables: { ...n.variables, [r]: s },
|
|
31
31
|
values: n.values
|
|
32
32
|
};
|
|
33
|
-
}, { variables: {}, map: [], values: [] }),
|
|
33
|
+
}, { variables: {}, map: [], values: [] }), Wr = (e, t) => async (n) => {
|
|
34
34
|
let r, s;
|
|
35
35
|
const o = n == null ? void 0 : n.fetchOptions, i = n == null ? void 0 : n.variables;
|
|
36
36
|
let c = !1;
|
|
@@ -41,13 +41,13 @@ const pt = 400, Xt = (e) => "File" in window && e instanceof File, Gt = (e) => "
|
|
|
41
41
|
const b = JSON.stringify({
|
|
42
42
|
query: t,
|
|
43
43
|
variables: p.variables
|
|
44
|
-
}), T = p.map.reduce((
|
|
44
|
+
}), T = p.map.reduce((R, m, S) => (R[S] = [m], R), {}), h = [
|
|
45
45
|
{ name: "operations", value: b },
|
|
46
46
|
{ name: "map", value: JSON.stringify(T) },
|
|
47
|
-
...p.values.map((
|
|
47
|
+
...p.values.map((R, m) => ({ name: m, value: R }))
|
|
48
48
|
];
|
|
49
|
-
r = new FormData(), h.forEach((
|
|
50
|
-
r.append(
|
|
49
|
+
r = new FormData(), h.forEach((R) => {
|
|
50
|
+
r.append(R.name.toString(), R.value);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -66,7 +66,7 @@ const pt = 400, Xt = (e) => "File" in window && e instanceof File, Gt = (e) => "
|
|
|
66
66
|
]);
|
|
67
67
|
return u.data.data;
|
|
68
68
|
};
|
|
69
|
-
function
|
|
69
|
+
function Gt(e) {
|
|
70
70
|
const t = new FormData(), n = (r, s = "") => {
|
|
71
71
|
for (const [o, i] of Object.entries(r)) {
|
|
72
72
|
const c = s ? `${s}[${o}]` : o;
|
|
@@ -82,14 +82,14 @@ function Zt(e) {
|
|
|
82
82
|
};
|
|
83
83
|
return n(e), t;
|
|
84
84
|
}
|
|
85
|
-
var de = /* @__PURE__ */ ((e) => (e.formData = "multipart/form-data", e.formUrlDecode = "application/x-www-form-urlencoded", e.json = "application/json", e))(de || {}),
|
|
86
|
-
const
|
|
85
|
+
var de = /* @__PURE__ */ ((e) => (e.formData = "multipart/form-data", e.formUrlDecode = "application/x-www-form-urlencoded", e.json = "application/json", e))(de || {}), Zt = /* @__PURE__ */ ((e) => (e.GET = "GET", e.POST = "POST", e.PUT = "PUT", e.DELETE = "DELETE", e.PATCH = "PATCH", e))(Zt || {});
|
|
86
|
+
const Qt = (e, t = {}) => [de.formData, de.formUrlDecode].includes(e) ? Gt(t) : JSON.stringify(t), en = (e) => de.json, Vr = (e, t, n = en) => async (r) => {
|
|
87
87
|
var u, p;
|
|
88
88
|
const s = (t == null ? void 0 : t.method) || "", o = (u = r == null ? void 0 : r.fetchOptions) == null ? void 0 : u.fetchOptions, i = r == null ? void 0 : r.params, c = ((p = o == null ? void 0 : o.headers) == null ? void 0 : p.contentType) ?? n(s.toUpperCase()), d = {
|
|
89
89
|
url: t.url,
|
|
90
90
|
method: s,
|
|
91
91
|
params: i,
|
|
92
|
-
data:
|
|
92
|
+
data: Qt(c, r == null ? void 0 : r.body),
|
|
93
93
|
...o,
|
|
94
94
|
headers: {
|
|
95
95
|
...o == null ? void 0 : o.headers,
|
|
@@ -112,7 +112,7 @@ var ce = { exports: {} }, G = {};
|
|
|
112
112
|
* LICENSE file in the root directory of this source tree.
|
|
113
113
|
*/
|
|
114
114
|
var Ve;
|
|
115
|
-
function
|
|
115
|
+
function tn() {
|
|
116
116
|
if (Ve) return G;
|
|
117
117
|
Ve = 1;
|
|
118
118
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
@@ -144,7 +144,7 @@ var Z = {};
|
|
|
144
144
|
* LICENSE file in the root directory of this source tree.
|
|
145
145
|
*/
|
|
146
146
|
var Ye;
|
|
147
|
-
function
|
|
147
|
+
function nn() {
|
|
148
148
|
return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
|
|
149
149
|
function e(f) {
|
|
150
150
|
if (f == null) return null;
|
|
@@ -152,7 +152,7 @@ function rn() {
|
|
|
152
152
|
return f.$$typeof === V ? null : f.displayName || f.name || null;
|
|
153
153
|
if (typeof f == "string") return f;
|
|
154
154
|
switch (f) {
|
|
155
|
-
case
|
|
155
|
+
case R:
|
|
156
156
|
return "Fragment";
|
|
157
157
|
case S:
|
|
158
158
|
return "Profiler";
|
|
@@ -171,7 +171,7 @@ function rn() {
|
|
|
171
171
|
), f.$$typeof) {
|
|
172
172
|
case h:
|
|
173
173
|
return "Portal";
|
|
174
|
-
case
|
|
174
|
+
case E:
|
|
175
175
|
return (f.displayName || "Context") + ".Provider";
|
|
176
176
|
case A:
|
|
177
177
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
@@ -210,7 +210,7 @@ function rn() {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
function r(f) {
|
|
213
|
-
if (f ===
|
|
213
|
+
if (f === R) return "<>";
|
|
214
214
|
if (typeof f == "object" && f !== null && f.$$typeof === B)
|
|
215
215
|
return "<...>";
|
|
216
216
|
try {
|
|
@@ -337,7 +337,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
337
337
|
function p(f) {
|
|
338
338
|
typeof f == "object" && f !== null && f.$$typeof === T && f._store && (f._store.validated = 1);
|
|
339
339
|
}
|
|
340
|
-
var b = Wt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"),
|
|
340
|
+
var b = Wt, T = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), R = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), E = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), v = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), H = b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ie = Object.prototype.hasOwnProperty, Mt = Array.isArray, ge = console.createTask ? console.createTask : function() {
|
|
341
341
|
return null;
|
|
342
342
|
};
|
|
343
343
|
b = {
|
|
@@ -349,7 +349,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
349
349
|
b,
|
|
350
350
|
o
|
|
351
351
|
)(), ze = ge(r(o)), Je = {};
|
|
352
|
-
Z.Fragment =
|
|
352
|
+
Z.Fragment = R, Z.jsx = function(f, w, _, C, M) {
|
|
353
353
|
var q = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
354
354
|
return u(
|
|
355
355
|
f,
|
|
@@ -377,10 +377,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
377
377
|
}()), Z;
|
|
378
378
|
}
|
|
379
379
|
var Ke;
|
|
380
|
-
function
|
|
381
|
-
return Ke || (Ke = 1, process.env.NODE_ENV === "production" ? ce.exports =
|
|
380
|
+
function rn() {
|
|
381
|
+
return Ke || (Ke = 1, process.env.NODE_ENV === "production" ? ce.exports = tn() : ce.exports = nn()), ce.exports;
|
|
382
382
|
}
|
|
383
|
-
var mt =
|
|
383
|
+
var mt = rn();
|
|
384
384
|
const re = [
|
|
385
385
|
"color: #fff",
|
|
386
386
|
"display: inline-block",
|
|
@@ -398,42 +398,42 @@ const re = [
|
|
|
398
398
|
function oe(e, t, ...n) {
|
|
399
399
|
console.log(`%c ${e}`, t, ...n);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function sn(e, ...t) {
|
|
402
402
|
const n = re.concat([
|
|
403
403
|
`background-color: ${se.primary}`
|
|
404
404
|
]).join(";");
|
|
405
405
|
oe(e, n, ...t);
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function on(e, ...t) {
|
|
408
408
|
const n = re.concat([
|
|
409
409
|
`background-color: ${se.success}`
|
|
410
410
|
]).join(";");
|
|
411
411
|
oe(e, n, ...t);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function an(e, ...t) {
|
|
414
414
|
const n = re.concat([
|
|
415
415
|
`background-color: ${se.info}`
|
|
416
416
|
]).join(";");
|
|
417
417
|
oe(e, n, ...t);
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function cn(e, ...t) {
|
|
420
420
|
const n = re.concat([
|
|
421
421
|
`background-color: ${se.warning}`
|
|
422
422
|
]).join(";");
|
|
423
423
|
oe(e, n, ...t);
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function ln(e, ...t) {
|
|
426
426
|
const n = re.concat([
|
|
427
427
|
`background-color: ${se.danger}`
|
|
428
428
|
]).join(";");
|
|
429
429
|
oe(e, n, ...t);
|
|
430
430
|
}
|
|
431
431
|
const U = {
|
|
432
|
-
primary:
|
|
433
|
-
success:
|
|
434
|
-
info:
|
|
435
|
-
warning:
|
|
436
|
-
danger:
|
|
432
|
+
primary: sn,
|
|
433
|
+
success: on,
|
|
434
|
+
info: an,
|
|
435
|
+
warning: cn,
|
|
436
|
+
danger: ln
|
|
437
437
|
};
|
|
438
438
|
function Ue(e, t) {
|
|
439
439
|
const n = {
|
|
@@ -469,7 +469,7 @@ class te extends Error {
|
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
const
|
|
472
|
+
const Rt = ft({
|
|
473
473
|
lastUpdateTimestamp: 0,
|
|
474
474
|
isAuth: !1,
|
|
475
475
|
getTokens: () => (U.warning("AuthStateContext", "getTokens not yet ready"), null),
|
|
@@ -478,18 +478,14 @@ const Et = ft({
|
|
|
478
478
|
refreshTokens: async () => {
|
|
479
479
|
U.warning("AuthStateContext", "refreshToken not yet ready");
|
|
480
480
|
}
|
|
481
|
-
}),
|
|
481
|
+
}), un = () => Vt(Rt), Yr = ({
|
|
482
482
|
children: e,
|
|
483
483
|
onGetTokens: t,
|
|
484
484
|
onSetTokens: n,
|
|
485
485
|
onRefreshTokens: r,
|
|
486
486
|
onForceLogout: s
|
|
487
487
|
}) => {
|
|
488
|
-
const [o, i] = We(0), [c, d] = We(
|
|
489
|
-
Yt(() => {
|
|
490
|
-
d(Xe(t()));
|
|
491
|
-
}, []);
|
|
492
|
-
const l = (b) => {
|
|
488
|
+
const [o, i] = We(0), [c, d] = We(() => Xe(t())), l = (b) => {
|
|
493
489
|
let T;
|
|
494
490
|
typeof b == "function" ? T = b(t()) : T = b, n(T), d(Xe(T)), i(Date.now());
|
|
495
491
|
}, u = () => {
|
|
@@ -508,7 +504,7 @@ const Et = ft({
|
|
|
508
504
|
throw u(), new te({ message: "refresh token fail", code: "REFRESH_TOKEN_CATCH" });
|
|
509
505
|
}
|
|
510
506
|
};
|
|
511
|
-
return /* @__PURE__ */ mt.jsx(
|
|
507
|
+
return /* @__PURE__ */ mt.jsx(Rt.Provider, { value: {
|
|
512
508
|
lastUpdateTimestamp: o,
|
|
513
509
|
isAuth: c,
|
|
514
510
|
getTokens: t,
|
|
@@ -566,7 +562,7 @@ const Et = ft({
|
|
|
566
562
|
TIMEOUT_ERROR: "服务器已超过 {sec} 秒未响应。请确认您的网络连接状态或联系客服"
|
|
567
563
|
}
|
|
568
564
|
};
|
|
569
|
-
class
|
|
565
|
+
class fn extends Error {
|
|
570
566
|
constructor(n) {
|
|
571
567
|
super(n.message);
|
|
572
568
|
$(this, "code");
|
|
@@ -587,22 +583,22 @@ class dn extends Error {
|
|
|
587
583
|
};
|
|
588
584
|
}
|
|
589
585
|
}
|
|
590
|
-
const
|
|
586
|
+
const Kr = (e) => {
|
|
591
587
|
var t, n, r, s;
|
|
592
588
|
return (n = (t = e == null ? void 0 : e.data) == null ? void 0 : t.errors) != null && n[0] ? (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.errors) == null ? void 0 : s[0] : {
|
|
593
589
|
message: "Axios error",
|
|
594
590
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
595
591
|
};
|
|
596
|
-
},
|
|
592
|
+
}, dn = (e) => e != null && e.data ? e == null ? void 0 : e.data : {
|
|
597
593
|
message: "Axios error",
|
|
598
594
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
599
595
|
};
|
|
600
596
|
let Q = !1, _e = [];
|
|
601
|
-
const
|
|
597
|
+
const pn = ft(null), Xr = ({
|
|
602
598
|
children: e,
|
|
603
599
|
axiosInstance: t,
|
|
604
600
|
locale: n = "en-US",
|
|
605
|
-
getResponseFormatError: r =
|
|
601
|
+
getResponseFormatError: r = dn,
|
|
606
602
|
onError: s,
|
|
607
603
|
checkIsRefreshTokenRequest: o,
|
|
608
604
|
authorizationPrefix: i = "Bearer",
|
|
@@ -614,43 +610,43 @@ const hn = ft(null), Gr = ({
|
|
|
614
610
|
updateTokens: u,
|
|
615
611
|
refreshTokens: p,
|
|
616
612
|
forceLogout: b
|
|
617
|
-
} =
|
|
618
|
-
|
|
619
|
-
const
|
|
613
|
+
} = un();
|
|
614
|
+
Yt(() => {
|
|
615
|
+
const E = t.interceptors.request.use(R), O = t.interceptors.response.use(m, A);
|
|
620
616
|
return () => {
|
|
621
|
-
t.interceptors.request.eject(
|
|
617
|
+
t.interceptors.request.eject(E), t.interceptors.response.eject(O);
|
|
622
618
|
};
|
|
623
619
|
}, [l, p, u, b]);
|
|
624
|
-
const T = (
|
|
625
|
-
d && U.warning("[FetcherProvider] runPendingRequest", { isSuccess:
|
|
620
|
+
const T = (E) => {
|
|
621
|
+
d && U.warning("[FetcherProvider] runPendingRequest", { isSuccess: E }), Q = !1;
|
|
626
622
|
for (const O of _e)
|
|
627
|
-
O(
|
|
623
|
+
O(E);
|
|
628
624
|
_e = [];
|
|
629
|
-
}, h = (
|
|
625
|
+
}, h = (E, O) => (g) => {
|
|
630
626
|
d && U.info("[FetcherProvider] Request add pending queue", { originConfig: g }), _e.push((P) => {
|
|
631
|
-
P ? (g.pendingRequest = !0,
|
|
627
|
+
P ? (g.pendingRequest = !0, E(t(g))) : O(new te({
|
|
632
628
|
message: S(401),
|
|
633
629
|
code: "UNAUTHORIZED",
|
|
634
630
|
path: "AxiosClientProvider.pushPendingRequestQueues"
|
|
635
631
|
}));
|
|
636
632
|
});
|
|
637
|
-
},
|
|
633
|
+
}, R = (E) => new Promise((O, g) => {
|
|
638
634
|
var v, V;
|
|
639
|
-
|
|
635
|
+
E.headers["Accept-Language"] = n;
|
|
640
636
|
const P = (v = l()) == null ? void 0 : v.accessToken;
|
|
641
|
-
if (!((V =
|
|
642
|
-
h(O, g)(
|
|
637
|
+
if (!((V = E.fetchOptions) == null ? void 0 : V.forceGuest) && P && (E.headers.Authorization = [i, P].filter((H) => H).join(" ")), !(E && o ? o(E) : !1) && Q) {
|
|
638
|
+
h(O, g)(E), g(new fn({
|
|
643
639
|
message: "Token refreshing, so request save queues not send",
|
|
644
640
|
code: "REFRESH_TOKEN"
|
|
645
641
|
}));
|
|
646
642
|
return;
|
|
647
643
|
}
|
|
648
|
-
O(
|
|
649
|
-
}), m = (
|
|
644
|
+
O(E);
|
|
645
|
+
}), m = (E) => (d && U.info("[FetcherProvider] interceptorsResponseSuccess", { response: E }), E), S = (E) => {
|
|
650
646
|
const O = (c == null ? void 0 : c[n]) || Ge[n] || Ge["en-US"];
|
|
651
|
-
return (O == null ? void 0 : O[
|
|
652
|
-
}, A = (
|
|
653
|
-
const O =
|
|
647
|
+
return (O == null ? void 0 : O[E]) || `Error: ${E}`;
|
|
648
|
+
}, A = (E) => {
|
|
649
|
+
const O = E.response, g = E.config, P = E.status, N = r(O);
|
|
654
650
|
d && U.warning("[FetcherProvider] interceptorsResponseError", { status: P, responseFirstError: N }), s && s(N);
|
|
655
651
|
const B = g && o ? o(g) : !1;
|
|
656
652
|
if (O && g && (P === 401 || N.code === "UNAUTHENTICATED")) {
|
|
@@ -666,23 +662,23 @@ const hn = ft(null), Gr = ({
|
|
|
666
662
|
return Promise.reject(new te(N));
|
|
667
663
|
};
|
|
668
664
|
return /* @__PURE__ */ mt.jsx(
|
|
669
|
-
|
|
665
|
+
pn.Provider,
|
|
670
666
|
{
|
|
671
667
|
value: t,
|
|
672
668
|
children: e
|
|
673
669
|
}
|
|
674
670
|
);
|
|
675
671
|
};
|
|
676
|
-
function
|
|
672
|
+
function Et(e, t) {
|
|
677
673
|
return function() {
|
|
678
674
|
return e.apply(t, arguments);
|
|
679
675
|
};
|
|
680
676
|
}
|
|
681
|
-
const { toString:
|
|
682
|
-
const n =
|
|
677
|
+
const { toString: hn } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: me, toStringTag: bt } = Symbol, Re = /* @__PURE__ */ ((e) => (t) => {
|
|
678
|
+
const n = hn.call(t);
|
|
683
679
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
684
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) =>
|
|
685
|
-
function
|
|
680
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Re(t) === e), Ee = (e) => (t) => typeof t === e, { isArray: K } = Array, ne = Ee("undefined");
|
|
681
|
+
function mn(e) {
|
|
686
682
|
return e !== null && !ne(e) && e.constructor !== null && !ne(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
687
683
|
}
|
|
688
684
|
const yt = D("ArrayBuffer");
|
|
@@ -690,16 +686,16 @@ function Rn(e) {
|
|
|
690
686
|
let t;
|
|
691
687
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && yt(e.buffer), t;
|
|
692
688
|
}
|
|
693
|
-
const
|
|
694
|
-
if (
|
|
689
|
+
const En = Ee("string"), j = Ee("function"), wt = Ee("number"), be = (e) => e !== null && typeof e == "object", bn = (e) => e === !0 || e === !1, le = (e) => {
|
|
690
|
+
if (Re(e) !== "object")
|
|
695
691
|
return !1;
|
|
696
692
|
const t = De(e);
|
|
697
693
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(bt in e) && !(me in e);
|
|
698
|
-
},
|
|
694
|
+
}, yn = D("Date"), wn = D("File"), Tn = D("Blob"), gn = D("FileList"), Sn = (e) => be(e) && j(e.pipe), On = (e) => {
|
|
699
695
|
let t;
|
|
700
|
-
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t =
|
|
696
|
+
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = Re(e)) === "formdata" || // detect form-data instance
|
|
701
697
|
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
702
|
-
},
|
|
698
|
+
}, An = D("URLSearchParams"), [_n, xn, Pn, Nn] = ["ReadableStream", "Request", "Response", "Headers"].map(D), Cn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
703
699
|
function ie(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
704
700
|
if (e === null || typeof e > "u")
|
|
705
701
|
return;
|
|
@@ -733,13 +729,13 @@ function Ce() {
|
|
|
733
729
|
arguments[r] && ie(arguments[r], n);
|
|
734
730
|
return t;
|
|
735
731
|
}
|
|
736
|
-
const
|
|
737
|
-
n && j(s) ? e[o] =
|
|
738
|
-
}, { allOwnKeys: r }), e),
|
|
732
|
+
const kn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
733
|
+
n && j(s) ? e[o] = Et(s, n) : e[o] = s;
|
|
734
|
+
}, { allOwnKeys: r }), e), Fn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), vn = (e, t, n, r) => {
|
|
739
735
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
740
736
|
value: t.prototype
|
|
741
737
|
}), n && Object.assign(e.prototype, n);
|
|
742
|
-
},
|
|
738
|
+
}, jn = (e, t, n, r) => {
|
|
743
739
|
let s, o, i;
|
|
744
740
|
const c = {};
|
|
745
741
|
if (t = t || {}, e == null) return t;
|
|
@@ -749,11 +745,11 @@ const Fn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
|
749
745
|
e = n !== !1 && De(e);
|
|
750
746
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
751
747
|
return t;
|
|
752
|
-
},
|
|
748
|
+
}, Ln = (e, t, n) => {
|
|
753
749
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
754
750
|
const r = e.indexOf(t, n);
|
|
755
751
|
return r !== -1 && r === n;
|
|
756
|
-
},
|
|
752
|
+
}, Un = (e) => {
|
|
757
753
|
if (!e) return null;
|
|
758
754
|
if (K(e)) return e;
|
|
759
755
|
let t = e.length;
|
|
@@ -762,31 +758,31 @@ const Fn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
|
762
758
|
for (; t-- > 0; )
|
|
763
759
|
n[t] = e[t];
|
|
764
760
|
return n;
|
|
765
|
-
},
|
|
761
|
+
}, Dn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), Bn = (e, t) => {
|
|
766
762
|
const r = (e && e[me]).call(e);
|
|
767
763
|
let s;
|
|
768
764
|
for (; (s = r.next()) && !s.done; ) {
|
|
769
765
|
const o = s.value;
|
|
770
766
|
t.call(e, o[0], o[1]);
|
|
771
767
|
}
|
|
772
|
-
},
|
|
768
|
+
}, qn = (e, t) => {
|
|
773
769
|
let n;
|
|
774
770
|
const r = [];
|
|
775
771
|
for (; (n = e.exec(t)) !== null; )
|
|
776
772
|
r.push(n);
|
|
777
773
|
return r;
|
|
778
|
-
},
|
|
774
|
+
}, In = D("HTMLFormElement"), $n = (e) => e.toLowerCase().replace(
|
|
779
775
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
780
776
|
function(n, r, s) {
|
|
781
777
|
return r.toUpperCase() + s;
|
|
782
778
|
}
|
|
783
|
-
), Ze = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
779
|
+
), Ze = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Mn = D("RegExp"), St = (e, t) => {
|
|
784
780
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
785
781
|
ie(n, (s, o) => {
|
|
786
782
|
let i;
|
|
787
783
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
788
784
|
}), Object.defineProperties(e, r);
|
|
789
|
-
},
|
|
785
|
+
}, Hn = (e) => {
|
|
790
786
|
St(e, (t, n) => {
|
|
791
787
|
if (j(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
792
788
|
return !1;
|
|
@@ -801,19 +797,19 @@ const Fn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
|
801
797
|
});
|
|
802
798
|
}
|
|
803
799
|
});
|
|
804
|
-
},
|
|
800
|
+
}, zn = (e, t) => {
|
|
805
801
|
const n = {}, r = (s) => {
|
|
806
802
|
s.forEach((o) => {
|
|
807
803
|
n[o] = !0;
|
|
808
804
|
});
|
|
809
805
|
};
|
|
810
806
|
return K(e) ? r(e) : r(String(e).split(t)), n;
|
|
811
|
-
},
|
|
812
|
-
},
|
|
813
|
-
function
|
|
807
|
+
}, Jn = () => {
|
|
808
|
+
}, Wn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
809
|
+
function Vn(e) {
|
|
814
810
|
return !!(e && j(e.append) && e[bt] === "FormData" && e[me]);
|
|
815
811
|
}
|
|
816
|
-
const
|
|
812
|
+
const Yn = (e) => {
|
|
817
813
|
const t = new Array(10), n = (r, s) => {
|
|
818
814
|
if (be(r)) {
|
|
819
815
|
if (t.indexOf(r) >= 0)
|
|
@@ -830,71 +826,71 @@ const Kn = (e) => {
|
|
|
830
826
|
return r;
|
|
831
827
|
};
|
|
832
828
|
return n(e, 0);
|
|
833
|
-
},
|
|
829
|
+
}, Kn = D("AsyncFunction"), Xn = (e) => e && (be(e) || j(e)) && j(e.then) && j(e.catch), Ot = ((e, t) => e ? setImmediate : t ? ((n, r) => (z.addEventListener("message", ({ source: s, data: o }) => {
|
|
834
830
|
s === z && o === n && r.length && r.shift()();
|
|
835
831
|
}, !1), (s) => {
|
|
836
832
|
r.push(s), z.postMessage(n, "*");
|
|
837
833
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
838
834
|
typeof setImmediate == "function",
|
|
839
835
|
j(z.postMessage)
|
|
840
|
-
),
|
|
836
|
+
), Gn = typeof queueMicrotask < "u" ? queueMicrotask.bind(z) : typeof process < "u" && process.nextTick || Ot, Zn = (e) => e != null && j(e[me]), a = {
|
|
841
837
|
isArray: K,
|
|
842
838
|
isArrayBuffer: yt,
|
|
843
|
-
isBuffer:
|
|
844
|
-
isFormData:
|
|
839
|
+
isBuffer: mn,
|
|
840
|
+
isFormData: On,
|
|
845
841
|
isArrayBufferView: Rn,
|
|
846
|
-
isString:
|
|
842
|
+
isString: En,
|
|
847
843
|
isNumber: wt,
|
|
848
|
-
isBoolean:
|
|
844
|
+
isBoolean: bn,
|
|
849
845
|
isObject: be,
|
|
850
846
|
isPlainObject: le,
|
|
851
|
-
isReadableStream:
|
|
852
|
-
isRequest:
|
|
853
|
-
isResponse:
|
|
854
|
-
isHeaders:
|
|
847
|
+
isReadableStream: _n,
|
|
848
|
+
isRequest: xn,
|
|
849
|
+
isResponse: Pn,
|
|
850
|
+
isHeaders: Nn,
|
|
855
851
|
isUndefined: ne,
|
|
856
|
-
isDate:
|
|
857
|
-
isFile:
|
|
858
|
-
isBlob:
|
|
859
|
-
isRegExp:
|
|
852
|
+
isDate: yn,
|
|
853
|
+
isFile: wn,
|
|
854
|
+
isBlob: Tn,
|
|
855
|
+
isRegExp: Mn,
|
|
860
856
|
isFunction: j,
|
|
861
|
-
isStream:
|
|
862
|
-
isURLSearchParams:
|
|
863
|
-
isTypedArray:
|
|
864
|
-
isFileList:
|
|
857
|
+
isStream: Sn,
|
|
858
|
+
isURLSearchParams: An,
|
|
859
|
+
isTypedArray: Dn,
|
|
860
|
+
isFileList: gn,
|
|
865
861
|
forEach: ie,
|
|
866
862
|
merge: Ce,
|
|
867
|
-
extend:
|
|
868
|
-
trim:
|
|
869
|
-
stripBOM:
|
|
870
|
-
inherits:
|
|
871
|
-
toFlatObject:
|
|
872
|
-
kindOf:
|
|
863
|
+
extend: kn,
|
|
864
|
+
trim: Cn,
|
|
865
|
+
stripBOM: Fn,
|
|
866
|
+
inherits: vn,
|
|
867
|
+
toFlatObject: jn,
|
|
868
|
+
kindOf: Re,
|
|
873
869
|
kindOfTest: D,
|
|
874
|
-
endsWith:
|
|
875
|
-
toArray:
|
|
876
|
-
forEachEntry:
|
|
877
|
-
matchAll:
|
|
878
|
-
isHTMLForm:
|
|
870
|
+
endsWith: Ln,
|
|
871
|
+
toArray: Un,
|
|
872
|
+
forEachEntry: Bn,
|
|
873
|
+
matchAll: qn,
|
|
874
|
+
isHTMLForm: In,
|
|
879
875
|
hasOwnProperty: Ze,
|
|
880
876
|
hasOwnProp: Ze,
|
|
881
877
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
882
878
|
reduceDescriptors: St,
|
|
883
|
-
freezeMethods:
|
|
884
|
-
toObjectSet:
|
|
885
|
-
toCamelCase:
|
|
886
|
-
noop:
|
|
887
|
-
toFiniteNumber:
|
|
879
|
+
freezeMethods: Hn,
|
|
880
|
+
toObjectSet: zn,
|
|
881
|
+
toCamelCase: $n,
|
|
882
|
+
noop: Jn,
|
|
883
|
+
toFiniteNumber: Wn,
|
|
888
884
|
findKey: Tt,
|
|
889
885
|
global: z,
|
|
890
886
|
isContextDefined: gt,
|
|
891
|
-
isSpecCompliantForm:
|
|
892
|
-
toJSONObject:
|
|
893
|
-
isAsyncFn:
|
|
894
|
-
isThenable:
|
|
887
|
+
isSpecCompliantForm: Vn,
|
|
888
|
+
toJSONObject: Yn,
|
|
889
|
+
isAsyncFn: Kn,
|
|
890
|
+
isThenable: Xn,
|
|
895
891
|
setImmediate: Ot,
|
|
896
|
-
asap:
|
|
897
|
-
isIterable:
|
|
892
|
+
asap: Gn,
|
|
893
|
+
isIterable: Zn
|
|
898
894
|
};
|
|
899
895
|
function y(e, t, n, r, s) {
|
|
900
896
|
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), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -946,7 +942,7 @@ y.from = (e, t, n, r, s, o) => {
|
|
|
946
942
|
return d !== Error.prototype;
|
|
947
943
|
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
948
944
|
};
|
|
949
|
-
const
|
|
945
|
+
const Qn = null;
|
|
950
946
|
function ke(e) {
|
|
951
947
|
return a.isPlainObject(e) || a.isArray(e);
|
|
952
948
|
}
|
|
@@ -958,10 +954,10 @@ function Qe(e, t, n) {
|
|
|
958
954
|
return s = xt(s), !n && o ? "[" + s + "]" : s;
|
|
959
955
|
}).join(n ? "." : "") : t;
|
|
960
956
|
}
|
|
961
|
-
function
|
|
957
|
+
function er(e) {
|
|
962
958
|
return a.isArray(e) && !e.some(ke);
|
|
963
959
|
}
|
|
964
|
-
const
|
|
960
|
+
const tr = a.toFlatObject(a, {}, null, function(t) {
|
|
965
961
|
return /^is[A-Z]/.test(t);
|
|
966
962
|
});
|
|
967
963
|
function ye(e, t, n) {
|
|
@@ -971,8 +967,8 @@ function ye(e, t, n) {
|
|
|
971
967
|
metaTokens: !0,
|
|
972
968
|
dots: !1,
|
|
973
969
|
indexes: !1
|
|
974
|
-
}, !1, function(
|
|
975
|
-
return !a.isUndefined(m[
|
|
970
|
+
}, !1, function(R, m) {
|
|
971
|
+
return !a.isUndefined(m[R]);
|
|
976
972
|
});
|
|
977
973
|
const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
978
974
|
if (!a.isFunction(s))
|
|
@@ -985,39 +981,39 @@ function ye(e, t, n) {
|
|
|
985
981
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
986
982
|
return a.isArrayBuffer(h) || a.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
987
983
|
}
|
|
988
|
-
function u(h,
|
|
984
|
+
function u(h, R, m) {
|
|
989
985
|
let S = h;
|
|
990
986
|
if (h && !m && typeof h == "object") {
|
|
991
|
-
if (a.endsWith(
|
|
992
|
-
|
|
993
|
-
else if (a.isArray(h) &&
|
|
994
|
-
return
|
|
995
|
-
!(a.isUndefined(
|
|
987
|
+
if (a.endsWith(R, "{}"))
|
|
988
|
+
R = r ? R : R.slice(0, -2), h = JSON.stringify(h);
|
|
989
|
+
else if (a.isArray(h) && er(h) || (a.isFileList(h) || a.endsWith(R, "[]")) && (S = a.toArray(h)))
|
|
990
|
+
return R = xt(R), S.forEach(function(E, O) {
|
|
991
|
+
!(a.isUndefined(E) || E === null) && t.append(
|
|
996
992
|
// eslint-disable-next-line no-nested-ternary
|
|
997
|
-
i === !0 ? Qe([
|
|
998
|
-
l(
|
|
993
|
+
i === !0 ? Qe([R], O, o) : i === null ? R : R + "[]",
|
|
994
|
+
l(E)
|
|
999
995
|
);
|
|
1000
996
|
}), !1;
|
|
1001
997
|
}
|
|
1002
|
-
return ke(h) ? !0 : (t.append(Qe(m,
|
|
998
|
+
return ke(h) ? !0 : (t.append(Qe(m, R, o), l(h)), !1);
|
|
1003
999
|
}
|
|
1004
|
-
const p = [], b = Object.assign(
|
|
1000
|
+
const p = [], b = Object.assign(tr, {
|
|
1005
1001
|
defaultVisitor: u,
|
|
1006
1002
|
convertValue: l,
|
|
1007
1003
|
isVisitable: ke
|
|
1008
1004
|
});
|
|
1009
|
-
function T(h,
|
|
1005
|
+
function T(h, R) {
|
|
1010
1006
|
if (!a.isUndefined(h)) {
|
|
1011
1007
|
if (p.indexOf(h) !== -1)
|
|
1012
|
-
throw Error("Circular reference detected in " +
|
|
1008
|
+
throw Error("Circular reference detected in " + R.join("."));
|
|
1013
1009
|
p.push(h), a.forEach(h, function(S, A) {
|
|
1014
1010
|
(!(a.isUndefined(S) || S === null) && s.call(
|
|
1015
1011
|
t,
|
|
1016
1012
|
S,
|
|
1017
1013
|
a.isString(A) ? A.trim() : A,
|
|
1018
|
-
|
|
1014
|
+
R,
|
|
1019
1015
|
b
|
|
1020
|
-
)) === !0 && T(S,
|
|
1016
|
+
)) === !0 && T(S, R ? R.concat(A) : [A]);
|
|
1021
1017
|
}), p.pop();
|
|
1022
1018
|
}
|
|
1023
1019
|
}
|
|
@@ -1054,13 +1050,13 @@ Pt.toString = function(t) {
|
|
|
1054
1050
|
return n(s[0]) + "=" + n(s[1]);
|
|
1055
1051
|
}, "").join("&");
|
|
1056
1052
|
};
|
|
1057
|
-
function
|
|
1053
|
+
function nr(e) {
|
|
1058
1054
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1059
1055
|
}
|
|
1060
1056
|
function Nt(e, t, n) {
|
|
1061
1057
|
if (!t)
|
|
1062
1058
|
return e;
|
|
1063
|
-
const r = n && n.encode ||
|
|
1059
|
+
const r = n && n.encode || nr;
|
|
1064
1060
|
a.isFunction(n) && (n = {
|
|
1065
1061
|
serialize: n
|
|
1066
1062
|
});
|
|
@@ -1130,37 +1126,37 @@ const Ct = {
|
|
|
1130
1126
|
silentJSONParsing: !0,
|
|
1131
1127
|
forcedJSONParsing: !0,
|
|
1132
1128
|
clarifyTimeoutError: !1
|
|
1133
|
-
},
|
|
1129
|
+
}, rr = typeof URLSearchParams < "u" ? URLSearchParams : Be, sr = typeof FormData < "u" ? FormData : null, or = typeof Blob < "u" ? Blob : null, ir = {
|
|
1134
1130
|
isBrowser: !0,
|
|
1135
1131
|
classes: {
|
|
1136
|
-
URLSearchParams:
|
|
1137
|
-
FormData:
|
|
1138
|
-
Blob:
|
|
1132
|
+
URLSearchParams: rr,
|
|
1133
|
+
FormData: sr,
|
|
1134
|
+
Blob: or
|
|
1139
1135
|
},
|
|
1140
1136
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1141
|
-
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0,
|
|
1142
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1137
|
+
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, ar = qe && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), cr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1138
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", lr = qe && window.location.href || "http://localhost", ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1143
1139
|
__proto__: null,
|
|
1144
1140
|
hasBrowserEnv: qe,
|
|
1145
|
-
hasStandardBrowserEnv:
|
|
1146
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1141
|
+
hasStandardBrowserEnv: ar,
|
|
1142
|
+
hasStandardBrowserWebWorkerEnv: cr,
|
|
1147
1143
|
navigator: Fe,
|
|
1148
|
-
origin:
|
|
1144
|
+
origin: lr
|
|
1149
1145
|
}, Symbol.toStringTag, { value: "Module" })), F = {
|
|
1150
|
-
...
|
|
1151
|
-
...
|
|
1146
|
+
...ur,
|
|
1147
|
+
...ir
|
|
1152
1148
|
};
|
|
1153
|
-
function
|
|
1149
|
+
function fr(e, t) {
|
|
1154
1150
|
return ye(e, new F.classes.URLSearchParams(), Object.assign({
|
|
1155
1151
|
visitor: function(n, r, s, o) {
|
|
1156
1152
|
return F.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1157
1153
|
}
|
|
1158
1154
|
}, t));
|
|
1159
1155
|
}
|
|
1160
|
-
function
|
|
1156
|
+
function dr(e) {
|
|
1161
1157
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1162
1158
|
}
|
|
1163
|
-
function
|
|
1159
|
+
function pr(e) {
|
|
1164
1160
|
const t = {}, n = Object.keys(e);
|
|
1165
1161
|
let r;
|
|
1166
1162
|
const s = n.length;
|
|
@@ -1174,17 +1170,17 @@ function kt(e) {
|
|
|
1174
1170
|
let i = n[o++];
|
|
1175
1171
|
if (i === "__proto__") return !0;
|
|
1176
1172
|
const c = Number.isFinite(+i), d = o >= n.length;
|
|
1177
|
-
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] =
|
|
1173
|
+
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = pr(s[i])), !c);
|
|
1178
1174
|
}
|
|
1179
1175
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
1180
1176
|
const n = {};
|
|
1181
1177
|
return a.forEachEntry(e, (r, s) => {
|
|
1182
|
-
t(
|
|
1178
|
+
t(dr(r), s, n, 0);
|
|
1183
1179
|
}), n;
|
|
1184
1180
|
}
|
|
1185
1181
|
return null;
|
|
1186
1182
|
}
|
|
1187
|
-
function
|
|
1183
|
+
function hr(e, t, n) {
|
|
1188
1184
|
if (a.isString(e))
|
|
1189
1185
|
try {
|
|
1190
1186
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -1210,7 +1206,7 @@ const ae = {
|
|
|
1210
1206
|
let c;
|
|
1211
1207
|
if (o) {
|
|
1212
1208
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1213
|
-
return
|
|
1209
|
+
return fr(t, this.formSerializer).toString();
|
|
1214
1210
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
1215
1211
|
const d = this.env && this.env.FormData;
|
|
1216
1212
|
return ye(
|
|
@@ -1220,7 +1216,7 @@ const ae = {
|
|
|
1220
1216
|
);
|
|
1221
1217
|
}
|
|
1222
1218
|
}
|
|
1223
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
1219
|
+
return o || s ? (n.setContentType("application/json", !1), hr(t)) : t;
|
|
1224
1220
|
}],
|
|
1225
1221
|
transformResponse: [function(t) {
|
|
1226
1222
|
const n = this.transitional || ae.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -1263,7 +1259,7 @@ const ae = {
|
|
|
1263
1259
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1264
1260
|
ae.headers[e] = {};
|
|
1265
1261
|
});
|
|
1266
|
-
const
|
|
1262
|
+
const mr = a.toObjectSet([
|
|
1267
1263
|
"age",
|
|
1268
1264
|
"authorization",
|
|
1269
1265
|
"content-length",
|
|
@@ -1286,7 +1282,7 @@ const Er = a.toObjectSet([
|
|
|
1286
1282
|
let n, r, s;
|
|
1287
1283
|
return e && e.split(`
|
|
1288
1284
|
`).forEach(function(i) {
|
|
1289
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
1285
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && mr[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1290
1286
|
}), t;
|
|
1291
1287
|
}, nt = Symbol("internals");
|
|
1292
1288
|
function ee(e) {
|
|
@@ -1295,14 +1291,14 @@ function ee(e) {
|
|
|
1295
1291
|
function ue(e) {
|
|
1296
1292
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ue) : String(e);
|
|
1297
1293
|
}
|
|
1298
|
-
function
|
|
1294
|
+
function Er(e) {
|
|
1299
1295
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1300
1296
|
let r;
|
|
1301
1297
|
for (; r = n.exec(e); )
|
|
1302
1298
|
t[r[1]] = r[2];
|
|
1303
1299
|
return t;
|
|
1304
1300
|
}
|
|
1305
|
-
const
|
|
1301
|
+
const br = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1306
1302
|
function xe(e, t, n, r, s) {
|
|
1307
1303
|
if (a.isFunction(r))
|
|
1308
1304
|
return r.call(this, t, n);
|
|
@@ -1313,10 +1309,10 @@ function xe(e, t, n, r, s) {
|
|
|
1313
1309
|
return r.test(t);
|
|
1314
1310
|
}
|
|
1315
1311
|
}
|
|
1316
|
-
function
|
|
1312
|
+
function yr(e) {
|
|
1317
1313
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1318
1314
|
}
|
|
1319
|
-
function
|
|
1315
|
+
function wr(e, t) {
|
|
1320
1316
|
const n = a.toCamelCase(" " + t);
|
|
1321
1317
|
["get", "set", "has"].forEach((r) => {
|
|
1322
1318
|
Object.defineProperty(e, r + n, {
|
|
@@ -1343,7 +1339,7 @@ let L = class {
|
|
|
1343
1339
|
const i = (c, d) => a.forEach(c, (l, u) => o(l, u, d));
|
|
1344
1340
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
1345
1341
|
i(t, n);
|
|
1346
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
1342
|
+
else if (a.isString(t) && (t = t.trim()) && !br(t))
|
|
1347
1343
|
i(Rr(t), n);
|
|
1348
1344
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
1349
1345
|
let c = {}, d, l;
|
|
@@ -1365,7 +1361,7 @@ let L = class {
|
|
|
1365
1361
|
if (!n)
|
|
1366
1362
|
return s;
|
|
1367
1363
|
if (n === !0)
|
|
1368
|
-
return
|
|
1364
|
+
return Er(s);
|
|
1369
1365
|
if (a.isFunction(n))
|
|
1370
1366
|
return n.call(this, s, r);
|
|
1371
1367
|
if (a.isRegExp(n))
|
|
@@ -1409,7 +1405,7 @@ let L = class {
|
|
|
1409
1405
|
n[i] = ue(s), delete n[o];
|
|
1410
1406
|
return;
|
|
1411
1407
|
}
|
|
1412
|
-
const c = t ?
|
|
1408
|
+
const c = t ? yr(o) : String(o).trim();
|
|
1413
1409
|
c !== o && delete n[o], n[c] = ue(s), r[c] = !0;
|
|
1414
1410
|
}), this;
|
|
1415
1411
|
}
|
|
@@ -1448,7 +1444,7 @@ let L = class {
|
|
|
1448
1444
|
}).accessors, s = this.prototype;
|
|
1449
1445
|
function o(i) {
|
|
1450
1446
|
const c = ee(i);
|
|
1451
|
-
r[c] || (
|
|
1447
|
+
r[c] || (wr(s, i), r[c] = !0);
|
|
1452
1448
|
}
|
|
1453
1449
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1454
1450
|
}
|
|
@@ -1490,11 +1486,11 @@ function vt(e, t, n) {
|
|
|
1490
1486
|
n
|
|
1491
1487
|
));
|
|
1492
1488
|
}
|
|
1493
|
-
function
|
|
1489
|
+
function Tr(e) {
|
|
1494
1490
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1495
1491
|
return t && t[1] || "";
|
|
1496
1492
|
}
|
|
1497
|
-
function
|
|
1493
|
+
function gr(e, t) {
|
|
1498
1494
|
e = e || 10;
|
|
1499
1495
|
const n = new Array(e), r = new Array(e);
|
|
1500
1496
|
let s = 0, o = 0, i;
|
|
@@ -1510,7 +1506,7 @@ function Sr(e, t) {
|
|
|
1510
1506
|
return T ? Math.round(b * 1e3 / T) : void 0;
|
|
1511
1507
|
};
|
|
1512
1508
|
}
|
|
1513
|
-
function
|
|
1509
|
+
function Sr(e, t) {
|
|
1514
1510
|
let n = 0, r = 1e3 / t, s, o;
|
|
1515
1511
|
const i = (l, u = Date.now()) => {
|
|
1516
1512
|
n = u, s = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
|
@@ -1524,8 +1520,8 @@ function Or(e, t) {
|
|
|
1524
1520
|
}
|
|
1525
1521
|
const pe = (e, t, n = 3) => {
|
|
1526
1522
|
let r = 0;
|
|
1527
|
-
const s =
|
|
1528
|
-
return
|
|
1523
|
+
const s = gr(50, 250);
|
|
1524
|
+
return Sr((o) => {
|
|
1529
1525
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - r, l = s(d), u = i <= c;
|
|
1530
1526
|
r = i;
|
|
1531
1527
|
const p = {
|
|
@@ -1548,10 +1544,10 @@ const pe = (e, t, n = 3) => {
|
|
|
1548
1544
|
total: e,
|
|
1549
1545
|
loaded: r
|
|
1550
1546
|
}), t[1]];
|
|
1551
|
-
}, st = (e) => (...t) => a.asap(() => e(...t)),
|
|
1547
|
+
}, st = (e) => (...t) => a.asap(() => e(...t)), Or = F.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, F.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1552
1548
|
new URL(F.origin),
|
|
1553
1549
|
F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)
|
|
1554
|
-
) : () => !0,
|
|
1550
|
+
) : () => !0, Ar = F.hasStandardBrowserEnv ? (
|
|
1555
1551
|
// Standard browser envs support document.cookie
|
|
1556
1552
|
{
|
|
1557
1553
|
write(e, t, n, r, s, o) {
|
|
@@ -1578,15 +1574,15 @@ const pe = (e, t, n = 3) => {
|
|
|
1578
1574
|
}
|
|
1579
1575
|
}
|
|
1580
1576
|
);
|
|
1581
|
-
function
|
|
1577
|
+
function _r(e) {
|
|
1582
1578
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1583
1579
|
}
|
|
1584
|
-
function
|
|
1580
|
+
function xr(e, t) {
|
|
1585
1581
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1586
1582
|
}
|
|
1587
1583
|
function jt(e, t, n) {
|
|
1588
|
-
let r = !
|
|
1589
|
-
return e && (r || n == !1) ?
|
|
1584
|
+
let r = !_r(t);
|
|
1585
|
+
return e && (r || n == !1) ? xr(e, t) : t;
|
|
1590
1586
|
}
|
|
1591
1587
|
const ot = (e) => e instanceof L ? { ...e } : e;
|
|
1592
1588
|
function W(e, t) {
|
|
@@ -1669,18 +1665,18 @@ const Lt = (e) => {
|
|
|
1669
1665
|
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1670
1666
|
}
|
|
1671
1667
|
}
|
|
1672
|
-
if (F.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1673
|
-
const l = s && o &&
|
|
1668
|
+
if (F.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Or(t.url))) {
|
|
1669
|
+
const l = s && o && Ar.read(o);
|
|
1674
1670
|
l && i.set(s, l);
|
|
1675
1671
|
}
|
|
1676
1672
|
return t;
|
|
1677
|
-
},
|
|
1673
|
+
}, Pr = typeof XMLHttpRequest < "u", Nr = Pr && function(e) {
|
|
1678
1674
|
return new Promise(function(n, r) {
|
|
1679
1675
|
const s = Lt(e);
|
|
1680
1676
|
let o = s.data;
|
|
1681
1677
|
const i = L.from(s.headers).normalize();
|
|
1682
1678
|
let { responseType: c, onUploadProgress: d, onDownloadProgress: l } = s, u, p, b, T, h;
|
|
1683
|
-
function
|
|
1679
|
+
function R() {
|
|
1684
1680
|
T && T(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1685
1681
|
}
|
|
1686
1682
|
let m = new XMLHttpRequest();
|
|
@@ -1688,20 +1684,20 @@ const Lt = (e) => {
|
|
|
1688
1684
|
function S() {
|
|
1689
1685
|
if (!m)
|
|
1690
1686
|
return;
|
|
1691
|
-
const
|
|
1687
|
+
const E = L.from(
|
|
1692
1688
|
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1693
1689
|
), g = {
|
|
1694
1690
|
data: !c || c === "text" || c === "json" ? m.responseText : m.response,
|
|
1695
1691
|
status: m.status,
|
|
1696
1692
|
statusText: m.statusText,
|
|
1697
|
-
headers:
|
|
1693
|
+
headers: E,
|
|
1698
1694
|
config: e,
|
|
1699
1695
|
request: m
|
|
1700
1696
|
};
|
|
1701
1697
|
vt(function(N) {
|
|
1702
|
-
n(N),
|
|
1698
|
+
n(N), R();
|
|
1703
1699
|
}, function(N) {
|
|
1704
|
-
r(N),
|
|
1700
|
+
r(N), R();
|
|
1705
1701
|
}, g), m = null;
|
|
1706
1702
|
}
|
|
1707
1703
|
"onloadend" in m ? m.onloadend = S : m.onreadystatechange = function() {
|
|
@@ -1721,17 +1717,17 @@ const Lt = (e) => {
|
|
|
1721
1717
|
)), m = null;
|
|
1722
1718
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(O, g) {
|
|
1723
1719
|
m.setRequestHeader(g, O);
|
|
1724
|
-
}), a.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), c && c !== "json" && (m.responseType = s.responseType), l && ([b, h] = pe(l, !0), m.addEventListener("progress", b)), d && m.upload && ([p, T] = pe(d), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", T)), (s.cancelToken || s.signal) && (u = (
|
|
1725
|
-
m && (r(!
|
|
1720
|
+
}), a.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), c && c !== "json" && (m.responseType = s.responseType), l && ([b, h] = pe(l, !0), m.addEventListener("progress", b)), d && m.upload && ([p, T] = pe(d), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", T)), (s.cancelToken || s.signal) && (u = (E) => {
|
|
1721
|
+
m && (r(!E || E.type ? new X(null, e, m) : E), m.abort(), m = null);
|
|
1726
1722
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1727
|
-
const A =
|
|
1723
|
+
const A = Tr(s.url);
|
|
1728
1724
|
if (A && F.protocols.indexOf(A) === -1) {
|
|
1729
1725
|
r(new y("Unsupported protocol " + A + ":", y.ERR_BAD_REQUEST, e));
|
|
1730
1726
|
return;
|
|
1731
1727
|
}
|
|
1732
1728
|
m.send(o || null);
|
|
1733
1729
|
});
|
|
1734
|
-
},
|
|
1730
|
+
}, Cr = (e, t) => {
|
|
1735
1731
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1736
1732
|
if (t || n) {
|
|
1737
1733
|
let r = new AbortController(), s;
|
|
@@ -1754,7 +1750,7 @@ const Lt = (e) => {
|
|
|
1754
1750
|
const { signal: d } = r;
|
|
1755
1751
|
return d.unsubscribe = () => a.asap(c), d;
|
|
1756
1752
|
}
|
|
1757
|
-
},
|
|
1753
|
+
}, kr = function* (e, t) {
|
|
1758
1754
|
let n = e.byteLength;
|
|
1759
1755
|
if (n < t) {
|
|
1760
1756
|
yield e;
|
|
@@ -1763,10 +1759,10 @@ const Lt = (e) => {
|
|
|
1763
1759
|
let r = 0, s;
|
|
1764
1760
|
for (; r < n; )
|
|
1765
1761
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1766
|
-
},
|
|
1767
|
-
for await (const n of
|
|
1768
|
-
yield*
|
|
1769
|
-
},
|
|
1762
|
+
}, Fr = async function* (e, t) {
|
|
1763
|
+
for await (const n of vr(e))
|
|
1764
|
+
yield* kr(n, t);
|
|
1765
|
+
}, vr = async function* (e) {
|
|
1770
1766
|
if (e[Symbol.asyncIterator]) {
|
|
1771
1767
|
yield* e;
|
|
1772
1768
|
return;
|
|
@@ -1783,7 +1779,7 @@ const Lt = (e) => {
|
|
|
1783
1779
|
await t.cancel();
|
|
1784
1780
|
}
|
|
1785
1781
|
}, it = (e, t, n, r) => {
|
|
1786
|
-
const s =
|
|
1782
|
+
const s = Fr(e, t);
|
|
1787
1783
|
let o = 0, i, c = (d) => {
|
|
1788
1784
|
i || (i = !0, r && r(d));
|
|
1789
1785
|
};
|
|
@@ -1811,13 +1807,13 @@ const Lt = (e) => {
|
|
|
1811
1807
|
}, {
|
|
1812
1808
|
highWaterMark: 2
|
|
1813
1809
|
});
|
|
1814
|
-
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = we && typeof ReadableStream == "function",
|
|
1810
|
+
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = we && typeof ReadableStream == "function", jr = we && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Dt = (e, ...t) => {
|
|
1815
1811
|
try {
|
|
1816
1812
|
return !!e(...t);
|
|
1817
1813
|
} catch {
|
|
1818
1814
|
return !1;
|
|
1819
1815
|
}
|
|
1820
|
-
},
|
|
1816
|
+
}, Lr = Ut && Dt(() => {
|
|
1821
1817
|
let e = !1;
|
|
1822
1818
|
const t = new Request(F.origin, {
|
|
1823
1819
|
body: new ReadableStream(),
|
|
@@ -1837,7 +1833,7 @@ we && ((e) => {
|
|
|
1837
1833
|
});
|
|
1838
1834
|
});
|
|
1839
1835
|
})(new Response());
|
|
1840
|
-
const
|
|
1836
|
+
const Ur = async (e) => {
|
|
1841
1837
|
if (e == null)
|
|
1842
1838
|
return 0;
|
|
1843
1839
|
if (a.isBlob(e))
|
|
@@ -1850,11 +1846,11 @@ const Dr = async (e) => {
|
|
|
1850
1846
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1851
1847
|
return e.byteLength;
|
|
1852
1848
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1853
|
-
return (await
|
|
1854
|
-
},
|
|
1849
|
+
return (await jr(e)).byteLength;
|
|
1850
|
+
}, Dr = async (e, t) => {
|
|
1855
1851
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1856
|
-
return n ??
|
|
1857
|
-
},
|
|
1852
|
+
return n ?? Ur(t);
|
|
1853
|
+
}, Br = we && (async (e) => {
|
|
1858
1854
|
let {
|
|
1859
1855
|
url: t,
|
|
1860
1856
|
method: n,
|
|
@@ -1870,13 +1866,13 @@ const Dr = async (e) => {
|
|
|
1870
1866
|
fetchOptions: b
|
|
1871
1867
|
} = Lt(e);
|
|
1872
1868
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1873
|
-
let T =
|
|
1874
|
-
const
|
|
1869
|
+
let T = Cr([s, o && o.toAbortSignal()], i), h;
|
|
1870
|
+
const R = T && T.unsubscribe && (() => {
|
|
1875
1871
|
T.unsubscribe();
|
|
1876
1872
|
});
|
|
1877
1873
|
let m;
|
|
1878
1874
|
try {
|
|
1879
|
-
if (d &&
|
|
1875
|
+
if (d && Lr && n !== "get" && n !== "head" && (m = await Dr(u, r)) !== 0) {
|
|
1880
1876
|
let g = new Request(t, {
|
|
1881
1877
|
method: "POST",
|
|
1882
1878
|
body: r,
|
|
@@ -1902,8 +1898,8 @@ const Dr = async (e) => {
|
|
|
1902
1898
|
credentials: S ? p : void 0
|
|
1903
1899
|
});
|
|
1904
1900
|
let A = await fetch(h);
|
|
1905
|
-
const
|
|
1906
|
-
if (ve && (c ||
|
|
1901
|
+
const E = ve && (l === "stream" || l === "response");
|
|
1902
|
+
if (ve && (c || E && R)) {
|
|
1907
1903
|
const g = {};
|
|
1908
1904
|
["status", "statusText", "headers"].forEach((v) => {
|
|
1909
1905
|
g[v] = A[v];
|
|
@@ -1914,14 +1910,14 @@ const Dr = async (e) => {
|
|
|
1914
1910
|
) || [];
|
|
1915
1911
|
A = new Response(
|
|
1916
1912
|
it(A.body, at, N, () => {
|
|
1917
|
-
B && B(),
|
|
1913
|
+
B && B(), R && R();
|
|
1918
1914
|
}),
|
|
1919
1915
|
g
|
|
1920
1916
|
);
|
|
1921
1917
|
}
|
|
1922
1918
|
l = l || "text";
|
|
1923
1919
|
let O = await he[a.findKey(he, l) || "text"](A, e);
|
|
1924
|
-
return !
|
|
1920
|
+
return !E && R && R(), await new Promise((g, P) => {
|
|
1925
1921
|
vt(g, P, {
|
|
1926
1922
|
data: O,
|
|
1927
1923
|
headers: L.from(A.headers),
|
|
@@ -1932,7 +1928,7 @@ const Dr = async (e) => {
|
|
|
1932
1928
|
});
|
|
1933
1929
|
});
|
|
1934
1930
|
} catch (S) {
|
|
1935
|
-
throw
|
|
1931
|
+
throw R && R(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
|
|
1936
1932
|
new y("Network Error", y.ERR_NETWORK, e, h),
|
|
1937
1933
|
{
|
|
1938
1934
|
cause: S.cause || S
|
|
@@ -1940,9 +1936,9 @@ const Dr = async (e) => {
|
|
|
1940
1936
|
) : y.from(S, S && S.code, e, h);
|
|
1941
1937
|
}
|
|
1942
1938
|
}), je = {
|
|
1943
|
-
http:
|
|
1944
|
-
xhr:
|
|
1945
|
-
fetch:
|
|
1939
|
+
http: Qn,
|
|
1940
|
+
xhr: Nr,
|
|
1941
|
+
fetch: Br
|
|
1946
1942
|
};
|
|
1947
1943
|
a.forEach(je, (e, t) => {
|
|
1948
1944
|
if (e) {
|
|
@@ -1953,7 +1949,7 @@ a.forEach(je, (e, t) => {
|
|
|
1953
1949
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1954
1950
|
}
|
|
1955
1951
|
});
|
|
1956
|
-
const ct = (e) => `- ${e}`,
|
|
1952
|
+
const ct = (e) => `- ${e}`, qr = (e) => a.isFunction(e) || e === null || e === !1, Bt = {
|
|
1957
1953
|
getAdapter: (e) => {
|
|
1958
1954
|
e = a.isArray(e) ? e : [e];
|
|
1959
1955
|
const { length: t } = e;
|
|
@@ -1962,7 +1958,7 @@ const ct = (e) => `- ${e}`, Ir = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1962
1958
|
for (let o = 0; o < t; o++) {
|
|
1963
1959
|
n = e[o];
|
|
1964
1960
|
let i;
|
|
1965
|
-
if (r = n, !
|
|
1961
|
+
if (r = n, !qr(n) && (r = je[(i = String(n)).toLowerCase()], r === void 0))
|
|
1966
1962
|
throw new y(`Unknown adapter '${i}'`);
|
|
1967
1963
|
if (r)
|
|
1968
1964
|
break;
|
|
@@ -2034,7 +2030,7 @@ Te.transitional = function(t, n, r) {
|
|
|
2034
2030
|
Te.spelling = function(t) {
|
|
2035
2031
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
2036
2032
|
};
|
|
2037
|
-
function
|
|
2033
|
+
function Ir(e, t, n) {
|
|
2038
2034
|
if (typeof e != "object")
|
|
2039
2035
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
2040
2036
|
const r = Object.keys(e);
|
|
@@ -2052,7 +2048,7 @@ function $r(e, t, n) {
|
|
|
2052
2048
|
}
|
|
2053
2049
|
}
|
|
2054
2050
|
const fe = {
|
|
2055
|
-
assertOptions:
|
|
2051
|
+
assertOptions: Ir,
|
|
2056
2052
|
validators: Te
|
|
2057
2053
|
}, I = fe.validators;
|
|
2058
2054
|
let J = class {
|
|
@@ -2115,12 +2111,12 @@ let J = class {
|
|
|
2115
2111
|
), n.headers = L.concat(i, o);
|
|
2116
2112
|
const c = [];
|
|
2117
2113
|
let d = !0;
|
|
2118
|
-
this.interceptors.request.forEach(function(
|
|
2119
|
-
typeof
|
|
2114
|
+
this.interceptors.request.forEach(function(R) {
|
|
2115
|
+
typeof R.runWhen == "function" && R.runWhen(n) === !1 || (d = d && R.synchronous, c.unshift(R.fulfilled, R.rejected));
|
|
2120
2116
|
});
|
|
2121
2117
|
const l = [];
|
|
2122
|
-
this.interceptors.response.forEach(function(
|
|
2123
|
-
l.push(
|
|
2118
|
+
this.interceptors.response.forEach(function(R) {
|
|
2119
|
+
l.push(R.fulfilled, R.rejected);
|
|
2124
2120
|
});
|
|
2125
2121
|
let u, p = 0, b;
|
|
2126
2122
|
if (!d) {
|
|
@@ -2132,11 +2128,11 @@ let J = class {
|
|
|
2132
2128
|
b = c.length;
|
|
2133
2129
|
let T = n;
|
|
2134
2130
|
for (p = 0; p < b; ) {
|
|
2135
|
-
const h = c[p++],
|
|
2131
|
+
const h = c[p++], R = c[p++];
|
|
2136
2132
|
try {
|
|
2137
2133
|
T = h(T);
|
|
2138
2134
|
} catch (m) {
|
|
2139
|
-
|
|
2135
|
+
R.call(this, m);
|
|
2140
2136
|
break;
|
|
2141
2137
|
}
|
|
2142
2138
|
}
|
|
@@ -2179,7 +2175,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
2179
2175
|
}
|
|
2180
2176
|
J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
|
|
2181
2177
|
});
|
|
2182
|
-
let
|
|
2178
|
+
let $r = class It {
|
|
2183
2179
|
constructor(t) {
|
|
2184
2180
|
if (typeof t != "function")
|
|
2185
2181
|
throw new TypeError("executor must be a function.");
|
|
@@ -2252,12 +2248,12 @@ let Mr = class It {
|
|
|
2252
2248
|
};
|
|
2253
2249
|
}
|
|
2254
2250
|
};
|
|
2255
|
-
function
|
|
2251
|
+
function Mr(e) {
|
|
2256
2252
|
return function(n) {
|
|
2257
2253
|
return e.apply(null, n);
|
|
2258
2254
|
};
|
|
2259
2255
|
}
|
|
2260
|
-
function
|
|
2256
|
+
function Hr(e) {
|
|
2261
2257
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
2262
2258
|
}
|
|
2263
2259
|
const Le = {
|
|
@@ -2329,7 +2325,7 @@ Object.entries(Le).forEach(([e, t]) => {
|
|
|
2329
2325
|
Le[t] = e;
|
|
2330
2326
|
});
|
|
2331
2327
|
function $t(e) {
|
|
2332
|
-
const t = new J(e), n =
|
|
2328
|
+
const t = new J(e), n = Et(J.prototype.request, t);
|
|
2333
2329
|
return a.extend(n, J.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2334
2330
|
return $t(W(e, s));
|
|
2335
2331
|
}, n;
|
|
@@ -2337,7 +2333,7 @@ function $t(e) {
|
|
|
2337
2333
|
const x = $t(ae);
|
|
2338
2334
|
x.Axios = J;
|
|
2339
2335
|
x.CanceledError = X;
|
|
2340
|
-
x.CancelToken =
|
|
2336
|
+
x.CancelToken = $r;
|
|
2341
2337
|
x.isCancel = Ft;
|
|
2342
2338
|
x.VERSION = qt;
|
|
2343
2339
|
x.toFormData = ye;
|
|
@@ -2346,8 +2342,8 @@ x.Cancel = x.CanceledError;
|
|
|
2346
2342
|
x.all = function(t) {
|
|
2347
2343
|
return Promise.all(t);
|
|
2348
2344
|
};
|
|
2349
|
-
x.spread =
|
|
2350
|
-
x.isAxiosError =
|
|
2345
|
+
x.spread = Mr;
|
|
2346
|
+
x.isAxiosError = Hr;
|
|
2351
2347
|
x.mergeConfig = W;
|
|
2352
2348
|
x.AxiosHeaders = L;
|
|
2353
2349
|
x.formToJSON = (e) => kt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -2355,35 +2351,35 @@ x.getAdapter = Bt.getAdapter;
|
|
|
2355
2351
|
x.HttpStatusCode = Le;
|
|
2356
2352
|
x.default = x;
|
|
2357
2353
|
const {
|
|
2358
|
-
Axios:
|
|
2359
|
-
AxiosError:
|
|
2360
|
-
CanceledError:
|
|
2361
|
-
isCancel:
|
|
2362
|
-
CancelToken:
|
|
2363
|
-
VERSION:
|
|
2364
|
-
all:
|
|
2365
|
-
Cancel:
|
|
2366
|
-
isAxiosError:
|
|
2367
|
-
spread:
|
|
2368
|
-
toFormData:
|
|
2369
|
-
AxiosHeaders:
|
|
2370
|
-
HttpStatusCode:
|
|
2371
|
-
formToJSON:
|
|
2372
|
-
getAdapter:
|
|
2373
|
-
mergeConfig:
|
|
2374
|
-
} = x,
|
|
2354
|
+
Axios: Qr,
|
|
2355
|
+
AxiosError: es,
|
|
2356
|
+
CanceledError: ts,
|
|
2357
|
+
isCancel: ns,
|
|
2358
|
+
CancelToken: rs,
|
|
2359
|
+
VERSION: ss,
|
|
2360
|
+
all: os,
|
|
2361
|
+
Cancel: is,
|
|
2362
|
+
isAxiosError: as,
|
|
2363
|
+
spread: cs,
|
|
2364
|
+
toFormData: ls,
|
|
2365
|
+
AxiosHeaders: us,
|
|
2366
|
+
HttpStatusCode: fs,
|
|
2367
|
+
formToJSON: ds,
|
|
2368
|
+
getAdapter: ps,
|
|
2369
|
+
mergeConfig: hs
|
|
2370
|
+
} = x, ms = (e) => x.create({
|
|
2375
2371
|
timeout: 2 * 60 * 1e3,
|
|
2376
2372
|
...e
|
|
2377
2373
|
});
|
|
2378
2374
|
export {
|
|
2379
|
-
|
|
2375
|
+
Yr as AuthStateProvider,
|
|
2380
2376
|
de as ERequestContentType,
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2377
|
+
Zt as ERequestMethod,
|
|
2378
|
+
Xr as FetcherProvider,
|
|
2379
|
+
ms as createAxiosInstance,
|
|
2380
|
+
Wr as createGraphQLFetcher,
|
|
2381
|
+
Vr as createRestFulFetcher,
|
|
2382
|
+
Kr as getGraphQLResponseFormatError,
|
|
2383
|
+
dn as getRestFulResponseFormatError,
|
|
2384
|
+
un as useAuthState
|
|
2389
2385
|
};
|