@acrool/react-fetcher 0.0.2-alpha.12 → 0.0.2-alpha.15
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 +290 -289
- package/dist/fetchers/createRestFulFetcher/config.d.ts +8 -1
- package/dist/fetchers/createRestFulFetcher/index.d.ts +1 -1
- package/dist/fetchers/createRestFulFetcher/types.d.ts +2 -1
- package/dist/fetchers/createRestFulFetcher/utils.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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: [] }), Vr = (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((E, m, S) => (E[S] = [m], E), {}), h = [
|
|
45
45
|
{ name: "operations", value: b },
|
|
46
46
|
{ name: "map", value: JSON.stringify(T) },
|
|
47
|
-
...p.values.map((
|
|
47
|
+
...p.values.map((E, m) => ({ name: m, value: E }))
|
|
48
48
|
];
|
|
49
|
-
r = new FormData(), h.forEach((
|
|
50
|
-
r.append(
|
|
49
|
+
r = new FormData(), h.forEach((E) => {
|
|
50
|
+
r.append(E.name.toString(), E.value);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -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 || {}), Qt = /* @__PURE__ */ ((e) => (e.GET = "GET", e.POST = "POST", e.PUT = "PUT", e.DELETE = "DELETE", e.PATCH = "PATCH", e))(Qt || {});
|
|
86
|
+
const en = (e, t = {}) => [de.formData, de.formUrlDecode].includes(e) ? Zt(t) : JSON.stringify(t), tn = (e) => de.json, Yr = (e, t, n = tn) => async (r) => {
|
|
87
87
|
var u, p;
|
|
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), d = {
|
|
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: en(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 nn() {
|
|
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 rn() {
|
|
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 nn() {
|
|
|
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 E:
|
|
156
156
|
return "Fragment";
|
|
157
157
|
case S:
|
|
158
158
|
return "Profiler";
|
|
@@ -160,7 +160,7 @@ function nn() {
|
|
|
160
160
|
return "StrictMode";
|
|
161
161
|
case g:
|
|
162
162
|
return "Suspense";
|
|
163
|
-
case
|
|
163
|
+
case P:
|
|
164
164
|
return "SuspenseList";
|
|
165
165
|
case v:
|
|
166
166
|
return "Activity";
|
|
@@ -171,14 +171,14 @@ function nn() {
|
|
|
171
171
|
), f.$$typeof) {
|
|
172
172
|
case h:
|
|
173
173
|
return "Portal";
|
|
174
|
-
case
|
|
174
|
+
case R:
|
|
175
175
|
return (f.displayName || "Context") + ".Provider";
|
|
176
176
|
case A:
|
|
177
177
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
178
178
|
case O:
|
|
179
179
|
var w = f.render;
|
|
180
180
|
return f = f.displayName, f || (f = w.displayName || w.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
181
|
-
case
|
|
181
|
+
case N:
|
|
182
182
|
return w = f.displayName || null, w !== null ? w : e(f.type) || "Memo";
|
|
183
183
|
case B:
|
|
184
184
|
w = f._payload, f = f._init;
|
|
@@ -210,7 +210,7 @@ function nn() {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
function r(f) {
|
|
213
|
-
if (f ===
|
|
213
|
+
if (f === E) 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"), E = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), R = 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 = E, 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 sn() {
|
|
381
|
+
return Ke || (Ke = 1, process.env.NODE_ENV === "production" ? ce.exports = nn() : ce.exports = rn()), ce.exports;
|
|
382
382
|
}
|
|
383
|
-
var mt =
|
|
383
|
+
var mt = sn();
|
|
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 on(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 an(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 cn(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 ln(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 un(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: on,
|
|
433
|
+
success: an,
|
|
434
|
+
info: cn,
|
|
435
|
+
warning: ln,
|
|
436
|
+
danger: un
|
|
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 Et = ft({
|
|
473
473
|
lastUpdateTimestamp: 0,
|
|
474
474
|
isAuth: !1,
|
|
475
475
|
getTokens: () => (U.warning("AuthStateContext", "getTokens not yet ready"), null),
|
|
@@ -478,7 +478,7 @@ const Rt = ft({
|
|
|
478
478
|
refreshTokens: async () => {
|
|
479
479
|
U.warning("AuthStateContext", "refreshToken not yet ready");
|
|
480
480
|
}
|
|
481
|
-
}),
|
|
481
|
+
}), fn = () => Vt(Et), Kr = ({
|
|
482
482
|
children: e,
|
|
483
483
|
onGetTokens: t,
|
|
484
484
|
onSetTokens: n,
|
|
@@ -508,7 +508,7 @@ const Rt = ft({
|
|
|
508
508
|
throw u(), new te({ message: "refresh token fail", code: "REFRESH_TOKEN_CATCH" });
|
|
509
509
|
}
|
|
510
510
|
};
|
|
511
|
-
return /* @__PURE__ */ mt.jsx(
|
|
511
|
+
return /* @__PURE__ */ mt.jsx(Et.Provider, { value: {
|
|
512
512
|
lastUpdateTimestamp: o,
|
|
513
513
|
isAuth: c,
|
|
514
514
|
getTokens: t,
|
|
@@ -566,7 +566,7 @@ const Rt = ft({
|
|
|
566
566
|
TIMEOUT_ERROR: "服务器已超过 {sec} 秒未响应。请确认您的网络连接状态或联系客服"
|
|
567
567
|
}
|
|
568
568
|
};
|
|
569
|
-
class
|
|
569
|
+
class dn extends Error {
|
|
570
570
|
constructor(n) {
|
|
571
571
|
super(n.message);
|
|
572
572
|
$(this, "code");
|
|
@@ -587,22 +587,22 @@ class fn extends Error {
|
|
|
587
587
|
};
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
const
|
|
590
|
+
const Xr = (e) => {
|
|
591
591
|
var t, n, r, s;
|
|
592
592
|
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
593
|
message: "Axios error",
|
|
594
594
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
595
595
|
};
|
|
596
|
-
},
|
|
596
|
+
}, pn = (e) => e != null && e.data ? e == null ? void 0 : e.data : {
|
|
597
597
|
message: "Axios error",
|
|
598
598
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
599
599
|
};
|
|
600
600
|
let Q = !1, _e = [];
|
|
601
|
-
const
|
|
601
|
+
const hn = ft(null), Gr = ({
|
|
602
602
|
children: e,
|
|
603
603
|
axiosInstance: t,
|
|
604
604
|
locale: n = "en-US",
|
|
605
|
-
getResponseFormatError: r =
|
|
605
|
+
getResponseFormatError: r = pn,
|
|
606
606
|
onError: s,
|
|
607
607
|
checkIsRefreshTokenRequest: o,
|
|
608
608
|
authorizationPrefix: i = "Bearer",
|
|
@@ -614,48 +614,48 @@ const pn = ft(null), Xr = ({
|
|
|
614
614
|
updateTokens: u,
|
|
615
615
|
refreshTokens: p,
|
|
616
616
|
forceLogout: b
|
|
617
|
-
} =
|
|
617
|
+
} = fn();
|
|
618
618
|
Kt(() => {
|
|
619
|
-
const
|
|
619
|
+
const R = t.interceptors.request.use(E), O = t.interceptors.response.use(m, A);
|
|
620
620
|
return () => {
|
|
621
|
-
t.interceptors.request.eject(
|
|
621
|
+
t.interceptors.request.eject(R), t.interceptors.response.eject(O);
|
|
622
622
|
};
|
|
623
623
|
}, [l, p, u, b]);
|
|
624
|
-
const T = (
|
|
625
|
-
d && U.warning("[FetcherProvider] runPendingRequest", { isSuccess:
|
|
624
|
+
const T = (R) => {
|
|
625
|
+
d && U.warning("[FetcherProvider] runPendingRequest", { isSuccess: R }), Q = !1;
|
|
626
626
|
for (const O of _e)
|
|
627
|
-
O(
|
|
627
|
+
O(R);
|
|
628
628
|
_e = [];
|
|
629
|
-
}, h = (
|
|
630
|
-
d && U.info("[FetcherProvider] Request add pending queue", { originConfig: g }), _e.push((
|
|
631
|
-
|
|
629
|
+
}, h = (R, O) => (g) => {
|
|
630
|
+
d && U.info("[FetcherProvider] Request add pending queue", { originConfig: g }), _e.push((P) => {
|
|
631
|
+
P ? (g.pendingRequest = !0, R(t(g))) : O(new te({
|
|
632
632
|
message: S(401),
|
|
633
633
|
code: "UNAUTHORIZED",
|
|
634
634
|
path: "AxiosClientProvider.pushPendingRequestQueues"
|
|
635
635
|
}));
|
|
636
636
|
});
|
|
637
|
-
},
|
|
637
|
+
}, E = (R) => new Promise((O, g) => {
|
|
638
638
|
var v, V;
|
|
639
|
-
|
|
640
|
-
const
|
|
641
|
-
if (!((V =
|
|
642
|
-
h(O, g)(
|
|
639
|
+
R.headers["Accept-Language"] = n;
|
|
640
|
+
const P = (v = l()) == null ? void 0 : v.accessToken;
|
|
641
|
+
if (!((V = R.fetchOptions) == null ? void 0 : V.forceGuest) && P && (R.headers.Authorization = [i, P].filter((H) => H).join(" ")), !(R && o ? o(R) : !1) && Q) {
|
|
642
|
+
h(O, g)(R), g(new dn({
|
|
643
643
|
message: "Token refreshing, so request save queues not send",
|
|
644
644
|
code: "REFRESH_TOKEN"
|
|
645
645
|
}));
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
648
|
-
O(
|
|
649
|
-
}), m = (
|
|
648
|
+
O(R);
|
|
649
|
+
}), m = (R) => (d && U.info("[FetcherProvider] interceptorsResponseSuccess", { response: R }), R), S = (R) => {
|
|
650
650
|
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 =
|
|
654
|
-
d && U.warning("[FetcherProvider] interceptorsResponseError", { status:
|
|
651
|
+
return (O == null ? void 0 : O[R]) || `Error: ${R}`;
|
|
652
|
+
}, A = (R) => {
|
|
653
|
+
const O = R.response, g = R.config, P = R.status, N = r(O);
|
|
654
|
+
d && U.warning("[FetcherProvider] interceptorsResponseError", { status: P, responseFirstError: N }), s && s(N);
|
|
655
655
|
const B = g && o ? o(g) : !1;
|
|
656
|
-
if (O && g && (
|
|
656
|
+
if (O && g && (P === 401 || N.code === "UNAUTHENTICATED")) {
|
|
657
657
|
const v = l();
|
|
658
|
-
return d && U.warning("[FetcherProvider] enter refresh token flow", { refreshToken: v == null ? void 0 : v.refreshToken }), Ue(v == null ? void 0 : v.refreshToken) || B || g.pendingRequest ? (Q = !1, d && U.warning("[FetcherProvider] no refreshToken/refreshAPI|pendingRequest fail, force logout"), b(), Promise.reject(new te(
|
|
658
|
+
return d && U.warning("[FetcherProvider] enter refresh token flow", { refreshToken: v == null ? void 0 : v.refreshToken }), Ue(v == null ? void 0 : v.refreshToken) || B || g.pendingRequest ? (Q = !1, d && U.warning("[FetcherProvider] no refreshToken/refreshAPI|pendingRequest fail, force logout"), b(), Promise.reject(new te(N))) : (Q || (Q = !0, d && U.warning("[FetcherProvider] refreshTokens"), p().then(() => {
|
|
659
659
|
d && U.info("[FetcherProvider] refreshTokens success"), T(!0);
|
|
660
660
|
}).catch(() => {
|
|
661
661
|
d && U.danger("[FetcherProvider] refreshTokens fail"), T(!1);
|
|
@@ -663,26 +663,26 @@ const pn = ft(null), Xr = ({
|
|
|
663
663
|
h(V, H)(g);
|
|
664
664
|
}));
|
|
665
665
|
}
|
|
666
|
-
return Promise.reject(new te(
|
|
666
|
+
return Promise.reject(new te(N));
|
|
667
667
|
};
|
|
668
668
|
return /* @__PURE__ */ mt.jsx(
|
|
669
|
-
|
|
669
|
+
hn.Provider,
|
|
670
670
|
{
|
|
671
671
|
value: t,
|
|
672
672
|
children: e
|
|
673
673
|
}
|
|
674
674
|
);
|
|
675
675
|
};
|
|
676
|
-
function
|
|
676
|
+
function Rt(e, t) {
|
|
677
677
|
return function() {
|
|
678
678
|
return e.apply(t, arguments);
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
|
-
const { toString:
|
|
682
|
-
const n =
|
|
681
|
+
const { toString: mn } = Object.prototype, { getPrototypeOf: De } = Object, { iterator: me, toStringTag: bt } = Symbol, Ee = /* @__PURE__ */ ((e) => (t) => {
|
|
682
|
+
const n = mn.call(t);
|
|
683
683
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
684
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) =>
|
|
685
|
-
function
|
|
684
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Ee(t) === e), Re = (e) => (t) => typeof t === e, { isArray: K } = Array, ne = Re("undefined");
|
|
685
|
+
function En(e) {
|
|
686
686
|
return e !== null && !ne(e) && e.constructor !== null && !ne(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
687
687
|
}
|
|
688
688
|
const yt = D("ArrayBuffer");
|
|
@@ -690,16 +690,16 @@ function Rn(e) {
|
|
|
690
690
|
let t;
|
|
691
691
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && yt(e.buffer), t;
|
|
692
692
|
}
|
|
693
|
-
const
|
|
694
|
-
if (
|
|
693
|
+
const bn = Re("string"), j = Re("function"), wt = Re("number"), be = (e) => e !== null && typeof e == "object", yn = (e) => e === !0 || e === !1, le = (e) => {
|
|
694
|
+
if (Ee(e) !== "object")
|
|
695
695
|
return !1;
|
|
696
696
|
const t = De(e);
|
|
697
697
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(bt in e) && !(me in e);
|
|
698
|
-
},
|
|
698
|
+
}, wn = D("Date"), Tn = D("File"), gn = D("Blob"), Sn = D("FileList"), On = (e) => be(e) && j(e.pipe), An = (e) => {
|
|
699
699
|
let t;
|
|
700
|
-
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t =
|
|
700
|
+
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = Ee(e)) === "formdata" || // detect form-data instance
|
|
701
701
|
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
702
|
-
},
|
|
702
|
+
}, _n = D("URLSearchParams"), [xn, Pn, Nn, Cn] = ["ReadableStream", "Request", "Response", "Headers"].map(D), kn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
703
703
|
function ie(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
704
704
|
if (e === null || typeof e > "u")
|
|
705
705
|
return;
|
|
@@ -733,13 +733,13 @@ function Ce() {
|
|
|
733
733
|
arguments[r] && ie(arguments[r], n);
|
|
734
734
|
return t;
|
|
735
735
|
}
|
|
736
|
-
const
|
|
737
|
-
n && j(s) ? e[o] =
|
|
738
|
-
}, { allOwnKeys: r }), e),
|
|
736
|
+
const Fn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
737
|
+
n && j(s) ? e[o] = Rt(s, n) : e[o] = s;
|
|
738
|
+
}, { allOwnKeys: r }), e), vn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), jn = (e, t, n, r) => {
|
|
739
739
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
740
740
|
value: t.prototype
|
|
741
741
|
}), n && Object.assign(e.prototype, n);
|
|
742
|
-
},
|
|
742
|
+
}, Ln = (e, t, n, r) => {
|
|
743
743
|
let s, o, i;
|
|
744
744
|
const c = {};
|
|
745
745
|
if (t = t || {}, e == null) return t;
|
|
@@ -749,11 +749,11 @@ const kn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
|
749
749
|
e = n !== !1 && De(e);
|
|
750
750
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
751
751
|
return t;
|
|
752
|
-
},
|
|
752
|
+
}, Un = (e, t, n) => {
|
|
753
753
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
754
754
|
const r = e.indexOf(t, n);
|
|
755
755
|
return r !== -1 && r === n;
|
|
756
|
-
},
|
|
756
|
+
}, Dn = (e) => {
|
|
757
757
|
if (!e) return null;
|
|
758
758
|
if (K(e)) return e;
|
|
759
759
|
let t = e.length;
|
|
@@ -762,31 +762,31 @@ const kn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
|
762
762
|
for (; t-- > 0; )
|
|
763
763
|
n[t] = e[t];
|
|
764
764
|
return n;
|
|
765
|
-
},
|
|
765
|
+
}, Bn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && De(Uint8Array)), qn = (e, t) => {
|
|
766
766
|
const r = (e && e[me]).call(e);
|
|
767
767
|
let s;
|
|
768
768
|
for (; (s = r.next()) && !s.done; ) {
|
|
769
769
|
const o = s.value;
|
|
770
770
|
t.call(e, o[0], o[1]);
|
|
771
771
|
}
|
|
772
|
-
},
|
|
772
|
+
}, In = (e, t) => {
|
|
773
773
|
let n;
|
|
774
774
|
const r = [];
|
|
775
775
|
for (; (n = e.exec(t)) !== null; )
|
|
776
776
|
r.push(n);
|
|
777
777
|
return r;
|
|
778
|
-
},
|
|
778
|
+
}, $n = D("HTMLFormElement"), Mn = (e) => e.toLowerCase().replace(
|
|
779
779
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
780
780
|
function(n, r, s) {
|
|
781
781
|
return r.toUpperCase() + s;
|
|
782
782
|
}
|
|
783
|
-
), Ze = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
783
|
+
), Ze = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Hn = D("RegExp"), St = (e, t) => {
|
|
784
784
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
785
785
|
ie(n, (s, o) => {
|
|
786
786
|
let i;
|
|
787
787
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
788
788
|
}), Object.defineProperties(e, r);
|
|
789
|
-
},
|
|
789
|
+
}, zn = (e) => {
|
|
790
790
|
St(e, (t, n) => {
|
|
791
791
|
if (j(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
792
792
|
return !1;
|
|
@@ -801,19 +801,19 @@ const kn = (e, t, n, { allOwnKeys: r } = {}) => (ie(t, (s, o) => {
|
|
|
801
801
|
});
|
|
802
802
|
}
|
|
803
803
|
});
|
|
804
|
-
},
|
|
804
|
+
}, Jn = (e, t) => {
|
|
805
805
|
const n = {}, r = (s) => {
|
|
806
806
|
s.forEach((o) => {
|
|
807
807
|
n[o] = !0;
|
|
808
808
|
});
|
|
809
809
|
};
|
|
810
810
|
return K(e) ? r(e) : r(String(e).split(t)), n;
|
|
811
|
-
},
|
|
812
|
-
},
|
|
813
|
-
function
|
|
811
|
+
}, Wn = () => {
|
|
812
|
+
}, Vn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
813
|
+
function Yn(e) {
|
|
814
814
|
return !!(e && j(e.append) && e[bt] === "FormData" && e[me]);
|
|
815
815
|
}
|
|
816
|
-
const
|
|
816
|
+
const Kn = (e) => {
|
|
817
817
|
const t = new Array(10), n = (r, s) => {
|
|
818
818
|
if (be(r)) {
|
|
819
819
|
if (t.indexOf(r) >= 0)
|
|
@@ -830,71 +830,71 @@ const Yn = (e) => {
|
|
|
830
830
|
return r;
|
|
831
831
|
};
|
|
832
832
|
return n(e, 0);
|
|
833
|
-
},
|
|
833
|
+
}, Xn = D("AsyncFunction"), Gn = (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
834
|
s === z && o === n && r.length && r.shift()();
|
|
835
835
|
}, !1), (s) => {
|
|
836
836
|
r.push(s), z.postMessage(n, "*");
|
|
837
837
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
838
838
|
typeof setImmediate == "function",
|
|
839
839
|
j(z.postMessage)
|
|
840
|
-
),
|
|
840
|
+
), Zn = typeof queueMicrotask < "u" ? queueMicrotask.bind(z) : typeof process < "u" && process.nextTick || Ot, Qn = (e) => e != null && j(e[me]), a = {
|
|
841
841
|
isArray: K,
|
|
842
842
|
isArrayBuffer: yt,
|
|
843
|
-
isBuffer:
|
|
844
|
-
isFormData:
|
|
843
|
+
isBuffer: En,
|
|
844
|
+
isFormData: An,
|
|
845
845
|
isArrayBufferView: Rn,
|
|
846
|
-
isString:
|
|
846
|
+
isString: bn,
|
|
847
847
|
isNumber: wt,
|
|
848
|
-
isBoolean:
|
|
848
|
+
isBoolean: yn,
|
|
849
849
|
isObject: be,
|
|
850
850
|
isPlainObject: le,
|
|
851
|
-
isReadableStream:
|
|
852
|
-
isRequest:
|
|
851
|
+
isReadableStream: xn,
|
|
852
|
+
isRequest: Pn,
|
|
853
853
|
isResponse: Nn,
|
|
854
|
-
isHeaders:
|
|
854
|
+
isHeaders: Cn,
|
|
855
855
|
isUndefined: ne,
|
|
856
|
-
isDate:
|
|
857
|
-
isFile:
|
|
858
|
-
isBlob:
|
|
859
|
-
isRegExp:
|
|
856
|
+
isDate: wn,
|
|
857
|
+
isFile: Tn,
|
|
858
|
+
isBlob: gn,
|
|
859
|
+
isRegExp: Hn,
|
|
860
860
|
isFunction: j,
|
|
861
|
-
isStream:
|
|
862
|
-
isURLSearchParams:
|
|
863
|
-
isTypedArray:
|
|
864
|
-
isFileList:
|
|
861
|
+
isStream: On,
|
|
862
|
+
isURLSearchParams: _n,
|
|
863
|
+
isTypedArray: Bn,
|
|
864
|
+
isFileList: Sn,
|
|
865
865
|
forEach: ie,
|
|
866
866
|
merge: Ce,
|
|
867
|
-
extend:
|
|
868
|
-
trim:
|
|
869
|
-
stripBOM:
|
|
870
|
-
inherits:
|
|
871
|
-
toFlatObject:
|
|
872
|
-
kindOf:
|
|
867
|
+
extend: Fn,
|
|
868
|
+
trim: kn,
|
|
869
|
+
stripBOM: vn,
|
|
870
|
+
inherits: jn,
|
|
871
|
+
toFlatObject: Ln,
|
|
872
|
+
kindOf: Ee,
|
|
873
873
|
kindOfTest: D,
|
|
874
|
-
endsWith:
|
|
875
|
-
toArray:
|
|
876
|
-
forEachEntry:
|
|
877
|
-
matchAll:
|
|
878
|
-
isHTMLForm:
|
|
874
|
+
endsWith: Un,
|
|
875
|
+
toArray: Dn,
|
|
876
|
+
forEachEntry: qn,
|
|
877
|
+
matchAll: In,
|
|
878
|
+
isHTMLForm: $n,
|
|
879
879
|
hasOwnProperty: Ze,
|
|
880
880
|
hasOwnProp: Ze,
|
|
881
881
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
882
882
|
reduceDescriptors: St,
|
|
883
|
-
freezeMethods:
|
|
884
|
-
toObjectSet:
|
|
885
|
-
toCamelCase:
|
|
886
|
-
noop:
|
|
887
|
-
toFiniteNumber:
|
|
883
|
+
freezeMethods: zn,
|
|
884
|
+
toObjectSet: Jn,
|
|
885
|
+
toCamelCase: Mn,
|
|
886
|
+
noop: Wn,
|
|
887
|
+
toFiniteNumber: Vn,
|
|
888
888
|
findKey: Tt,
|
|
889
889
|
global: z,
|
|
890
890
|
isContextDefined: gt,
|
|
891
|
-
isSpecCompliantForm:
|
|
892
|
-
toJSONObject:
|
|
893
|
-
isAsyncFn:
|
|
894
|
-
isThenable:
|
|
891
|
+
isSpecCompliantForm: Yn,
|
|
892
|
+
toJSONObject: Kn,
|
|
893
|
+
isAsyncFn: Xn,
|
|
894
|
+
isThenable: Gn,
|
|
895
895
|
setImmediate: Ot,
|
|
896
|
-
asap:
|
|
897
|
-
isIterable:
|
|
896
|
+
asap: Zn,
|
|
897
|
+
isIterable: Qn
|
|
898
898
|
};
|
|
899
899
|
function y(e, t, n, r, s) {
|
|
900
900
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -946,7 +946,7 @@ y.from = (e, t, n, r, s, o) => {
|
|
|
946
946
|
return d !== Error.prototype;
|
|
947
947
|
}, (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
948
|
};
|
|
949
|
-
const
|
|
949
|
+
const er = null;
|
|
950
950
|
function ke(e) {
|
|
951
951
|
return a.isPlainObject(e) || a.isArray(e);
|
|
952
952
|
}
|
|
@@ -958,10 +958,10 @@ function Qe(e, t, n) {
|
|
|
958
958
|
return s = xt(s), !n && o ? "[" + s + "]" : s;
|
|
959
959
|
}).join(n ? "." : "") : t;
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function tr(e) {
|
|
962
962
|
return a.isArray(e) && !e.some(ke);
|
|
963
963
|
}
|
|
964
|
-
const
|
|
964
|
+
const nr = a.toFlatObject(a, {}, null, function(t) {
|
|
965
965
|
return /^is[A-Z]/.test(t);
|
|
966
966
|
});
|
|
967
967
|
function ye(e, t, n) {
|
|
@@ -971,8 +971,8 @@ function ye(e, t, n) {
|
|
|
971
971
|
metaTokens: !0,
|
|
972
972
|
dots: !1,
|
|
973
973
|
indexes: !1
|
|
974
|
-
}, !1, function(
|
|
975
|
-
return !a.isUndefined(m[
|
|
974
|
+
}, !1, function(E, m) {
|
|
975
|
+
return !a.isUndefined(m[E]);
|
|
976
976
|
});
|
|
977
977
|
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
978
|
if (!a.isFunction(s))
|
|
@@ -985,39 +985,39 @@ function ye(e, t, n) {
|
|
|
985
985
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
986
986
|
return a.isArrayBuffer(h) || a.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
987
987
|
}
|
|
988
|
-
function u(h,
|
|
988
|
+
function u(h, E, m) {
|
|
989
989
|
let S = h;
|
|
990
990
|
if (h && !m && typeof h == "object") {
|
|
991
|
-
if (a.endsWith(
|
|
992
|
-
|
|
993
|
-
else if (a.isArray(h) &&
|
|
994
|
-
return
|
|
995
|
-
!(a.isUndefined(
|
|
991
|
+
if (a.endsWith(E, "{}"))
|
|
992
|
+
E = r ? E : E.slice(0, -2), h = JSON.stringify(h);
|
|
993
|
+
else if (a.isArray(h) && tr(h) || (a.isFileList(h) || a.endsWith(E, "[]")) && (S = a.toArray(h)))
|
|
994
|
+
return E = xt(E), S.forEach(function(R, O) {
|
|
995
|
+
!(a.isUndefined(R) || R === null) && t.append(
|
|
996
996
|
// eslint-disable-next-line no-nested-ternary
|
|
997
|
-
i === !0 ? Qe([
|
|
998
|
-
l(
|
|
997
|
+
i === !0 ? Qe([E], O, o) : i === null ? E : E + "[]",
|
|
998
|
+
l(R)
|
|
999
999
|
);
|
|
1000
1000
|
}), !1;
|
|
1001
1001
|
}
|
|
1002
|
-
return ke(h) ? !0 : (t.append(Qe(m,
|
|
1002
|
+
return ke(h) ? !0 : (t.append(Qe(m, E, o), l(h)), !1);
|
|
1003
1003
|
}
|
|
1004
|
-
const p = [], b = Object.assign(
|
|
1004
|
+
const p = [], b = Object.assign(nr, {
|
|
1005
1005
|
defaultVisitor: u,
|
|
1006
1006
|
convertValue: l,
|
|
1007
1007
|
isVisitable: ke
|
|
1008
1008
|
});
|
|
1009
|
-
function T(h,
|
|
1009
|
+
function T(h, E) {
|
|
1010
1010
|
if (!a.isUndefined(h)) {
|
|
1011
1011
|
if (p.indexOf(h) !== -1)
|
|
1012
|
-
throw Error("Circular reference detected in " +
|
|
1012
|
+
throw Error("Circular reference detected in " + E.join("."));
|
|
1013
1013
|
p.push(h), a.forEach(h, function(S, A) {
|
|
1014
1014
|
(!(a.isUndefined(S) || S === null) && s.call(
|
|
1015
1015
|
t,
|
|
1016
1016
|
S,
|
|
1017
1017
|
a.isString(A) ? A.trim() : A,
|
|
1018
|
-
|
|
1018
|
+
E,
|
|
1019
1019
|
b
|
|
1020
|
-
)) === !0 && T(S,
|
|
1020
|
+
)) === !0 && T(S, E ? E.concat(A) : [A]);
|
|
1021
1021
|
}), p.pop();
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
@@ -1042,11 +1042,11 @@ function et(e) {
|
|
|
1042
1042
|
function Be(e, t) {
|
|
1043
1043
|
this._pairs = [], e && ye(e, this, t);
|
|
1044
1044
|
}
|
|
1045
|
-
const
|
|
1046
|
-
|
|
1045
|
+
const Pt = Be.prototype;
|
|
1046
|
+
Pt.append = function(t, n) {
|
|
1047
1047
|
this._pairs.push([t, n]);
|
|
1048
1048
|
};
|
|
1049
|
-
|
|
1049
|
+
Pt.toString = function(t) {
|
|
1050
1050
|
const n = t ? function(r) {
|
|
1051
1051
|
return t.call(this, r, et);
|
|
1052
1052
|
} : et;
|
|
@@ -1054,13 +1054,13 @@ Nt.toString = function(t) {
|
|
|
1054
1054
|
return n(s[0]) + "=" + n(s[1]);
|
|
1055
1055
|
}, "").join("&");
|
|
1056
1056
|
};
|
|
1057
|
-
function
|
|
1057
|
+
function rr(e) {
|
|
1058
1058
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function Nt(e, t, n) {
|
|
1061
1061
|
if (!t)
|
|
1062
1062
|
return e;
|
|
1063
|
-
const r = n && n.encode ||
|
|
1063
|
+
const r = n && n.encode || rr;
|
|
1064
1064
|
a.isFunction(n) && (n = {
|
|
1065
1065
|
serialize: n
|
|
1066
1066
|
});
|
|
@@ -1130,37 +1130,37 @@ const Ct = {
|
|
|
1130
1130
|
silentJSONParsing: !0,
|
|
1131
1131
|
forcedJSONParsing: !0,
|
|
1132
1132
|
clarifyTimeoutError: !1
|
|
1133
|
-
},
|
|
1133
|
+
}, sr = typeof URLSearchParams < "u" ? URLSearchParams : Be, or = typeof FormData < "u" ? FormData : null, ir = typeof Blob < "u" ? Blob : null, ar = {
|
|
1134
1134
|
isBrowser: !0,
|
|
1135
1135
|
classes: {
|
|
1136
|
-
URLSearchParams:
|
|
1137
|
-
FormData:
|
|
1138
|
-
Blob:
|
|
1136
|
+
URLSearchParams: sr,
|
|
1137
|
+
FormData: or,
|
|
1138
|
+
Blob: ir
|
|
1139
1139
|
},
|
|
1140
1140
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1141
|
-
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0,
|
|
1142
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1141
|
+
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, cr = qe && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), lr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1142
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ur = qe && window.location.href || "http://localhost", fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1143
1143
|
__proto__: null,
|
|
1144
1144
|
hasBrowserEnv: qe,
|
|
1145
|
-
hasStandardBrowserEnv:
|
|
1146
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1145
|
+
hasStandardBrowserEnv: cr,
|
|
1146
|
+
hasStandardBrowserWebWorkerEnv: lr,
|
|
1147
1147
|
navigator: Fe,
|
|
1148
|
-
origin:
|
|
1148
|
+
origin: ur
|
|
1149
1149
|
}, Symbol.toStringTag, { value: "Module" })), F = {
|
|
1150
|
-
...
|
|
1151
|
-
...
|
|
1150
|
+
...fr,
|
|
1151
|
+
...ar
|
|
1152
1152
|
};
|
|
1153
|
-
function
|
|
1153
|
+
function dr(e, t) {
|
|
1154
1154
|
return ye(e, new F.classes.URLSearchParams(), Object.assign({
|
|
1155
1155
|
visitor: function(n, r, s, o) {
|
|
1156
1156
|
return F.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1157
1157
|
}
|
|
1158
1158
|
}, t));
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function pr(e) {
|
|
1161
1161
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1163
|
+
function hr(e) {
|
|
1164
1164
|
const t = {}, n = Object.keys(e);
|
|
1165
1165
|
let r;
|
|
1166
1166
|
const s = n.length;
|
|
@@ -1174,17 +1174,17 @@ function kt(e) {
|
|
|
1174
1174
|
let i = n[o++];
|
|
1175
1175
|
if (i === "__proto__") return !0;
|
|
1176
1176
|
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] =
|
|
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] = hr(s[i])), !c);
|
|
1178
1178
|
}
|
|
1179
1179
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
1180
1180
|
const n = {};
|
|
1181
1181
|
return a.forEachEntry(e, (r, s) => {
|
|
1182
|
-
t(
|
|
1182
|
+
t(pr(r), s, n, 0);
|
|
1183
1183
|
}), n;
|
|
1184
1184
|
}
|
|
1185
1185
|
return null;
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function mr(e, t, n) {
|
|
1188
1188
|
if (a.isString(e))
|
|
1189
1189
|
try {
|
|
1190
1190
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -1210,7 +1210,7 @@ const ae = {
|
|
|
1210
1210
|
let c;
|
|
1211
1211
|
if (o) {
|
|
1212
1212
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1213
|
-
return
|
|
1213
|
+
return dr(t, this.formSerializer).toString();
|
|
1214
1214
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
1215
1215
|
const d = this.env && this.env.FormData;
|
|
1216
1216
|
return ye(
|
|
@@ -1220,7 +1220,7 @@ const ae = {
|
|
|
1220
1220
|
);
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
1223
|
+
return o || s ? (n.setContentType("application/json", !1), mr(t)) : t;
|
|
1224
1224
|
}],
|
|
1225
1225
|
transformResponse: [function(t) {
|
|
1226
1226
|
const n = this.transitional || ae.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -1263,7 +1263,7 @@ const ae = {
|
|
|
1263
1263
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1264
1264
|
ae.headers[e] = {};
|
|
1265
1265
|
});
|
|
1266
|
-
const
|
|
1266
|
+
const Er = a.toObjectSet([
|
|
1267
1267
|
"age",
|
|
1268
1268
|
"authorization",
|
|
1269
1269
|
"content-length",
|
|
@@ -1286,7 +1286,7 @@ const mr = a.toObjectSet([
|
|
|
1286
1286
|
let n, r, s;
|
|
1287
1287
|
return e && e.split(`
|
|
1288
1288
|
`).forEach(function(i) {
|
|
1289
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
1289
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Er[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1290
1290
|
}), t;
|
|
1291
1291
|
}, nt = Symbol("internals");
|
|
1292
1292
|
function ee(e) {
|
|
@@ -1295,14 +1295,14 @@ function ee(e) {
|
|
|
1295
1295
|
function ue(e) {
|
|
1296
1296
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ue) : String(e);
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function br(e) {
|
|
1299
1299
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1300
1300
|
let r;
|
|
1301
1301
|
for (; r = n.exec(e); )
|
|
1302
1302
|
t[r[1]] = r[2];
|
|
1303
1303
|
return t;
|
|
1304
1304
|
}
|
|
1305
|
-
const
|
|
1305
|
+
const yr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1306
1306
|
function xe(e, t, n, r, s) {
|
|
1307
1307
|
if (a.isFunction(r))
|
|
1308
1308
|
return r.call(this, t, n);
|
|
@@ -1313,10 +1313,10 @@ function xe(e, t, n, r, s) {
|
|
|
1313
1313
|
return r.test(t);
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function wr(e) {
|
|
1317
1317
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Tr(e, t) {
|
|
1320
1320
|
const n = a.toCamelCase(" " + t);
|
|
1321
1321
|
["get", "set", "has"].forEach((r) => {
|
|
1322
1322
|
Object.defineProperty(e, r + n, {
|
|
@@ -1343,7 +1343,7 @@ let L = class {
|
|
|
1343
1343
|
const i = (c, d) => a.forEach(c, (l, u) => o(l, u, d));
|
|
1344
1344
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
1345
1345
|
i(t, n);
|
|
1346
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
1346
|
+
else if (a.isString(t) && (t = t.trim()) && !yr(t))
|
|
1347
1347
|
i(Rr(t), n);
|
|
1348
1348
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
1349
1349
|
let c = {}, d, l;
|
|
@@ -1365,7 +1365,7 @@ let L = class {
|
|
|
1365
1365
|
if (!n)
|
|
1366
1366
|
return s;
|
|
1367
1367
|
if (n === !0)
|
|
1368
|
-
return
|
|
1368
|
+
return br(s);
|
|
1369
1369
|
if (a.isFunction(n))
|
|
1370
1370
|
return n.call(this, s, r);
|
|
1371
1371
|
if (a.isRegExp(n))
|
|
@@ -1409,7 +1409,7 @@ let L = class {
|
|
|
1409
1409
|
n[i] = ue(s), delete n[o];
|
|
1410
1410
|
return;
|
|
1411
1411
|
}
|
|
1412
|
-
const c = t ?
|
|
1412
|
+
const c = t ? wr(o) : String(o).trim();
|
|
1413
1413
|
c !== o && delete n[o], n[c] = ue(s), r[c] = !0;
|
|
1414
1414
|
}), this;
|
|
1415
1415
|
}
|
|
@@ -1448,7 +1448,7 @@ let L = class {
|
|
|
1448
1448
|
}).accessors, s = this.prototype;
|
|
1449
1449
|
function o(i) {
|
|
1450
1450
|
const c = ee(i);
|
|
1451
|
-
r[c] || (
|
|
1451
|
+
r[c] || (Tr(s, i), r[c] = !0);
|
|
1452
1452
|
}
|
|
1453
1453
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1454
1454
|
}
|
|
@@ -1464,7 +1464,7 @@ a.reduceDescriptors(L.prototype, ({ value: e }, t) => {
|
|
|
1464
1464
|
};
|
|
1465
1465
|
});
|
|
1466
1466
|
a.freezeMethods(L);
|
|
1467
|
-
function
|
|
1467
|
+
function Pe(e, t) {
|
|
1468
1468
|
const n = this || ae, r = t || n, s = L.from(r.headers);
|
|
1469
1469
|
let o = r.data;
|
|
1470
1470
|
return a.forEach(e, function(c) {
|
|
@@ -1490,11 +1490,11 @@ function vt(e, t, n) {
|
|
|
1490
1490
|
n
|
|
1491
1491
|
));
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function gr(e) {
|
|
1494
1494
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1495
1495
|
return t && t[1] || "";
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function Sr(e, t) {
|
|
1498
1498
|
e = e || 10;
|
|
1499
1499
|
const n = new Array(e), r = new Array(e);
|
|
1500
1500
|
let s = 0, o = 0, i;
|
|
@@ -1510,7 +1510,7 @@ function gr(e, t) {
|
|
|
1510
1510
|
return T ? Math.round(b * 1e3 / T) : void 0;
|
|
1511
1511
|
};
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function Or(e, t) {
|
|
1514
1514
|
let n = 0, r = 1e3 / t, s, o;
|
|
1515
1515
|
const i = (l, u = Date.now()) => {
|
|
1516
1516
|
n = u, s = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
|
@@ -1524,8 +1524,8 @@ function Sr(e, t) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
const pe = (e, t, n = 3) => {
|
|
1526
1526
|
let r = 0;
|
|
1527
|
-
const s =
|
|
1528
|
-
return
|
|
1527
|
+
const s = Sr(50, 250);
|
|
1528
|
+
return Or((o) => {
|
|
1529
1529
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i - r, l = s(d), u = i <= c;
|
|
1530
1530
|
r = i;
|
|
1531
1531
|
const p = {
|
|
@@ -1548,10 +1548,10 @@ const pe = (e, t, n = 3) => {
|
|
|
1548
1548
|
total: e,
|
|
1549
1549
|
loaded: r
|
|
1550
1550
|
}), t[1]];
|
|
1551
|
-
}, st = (e) => (...t) => a.asap(() => e(...t)),
|
|
1551
|
+
}, st = (e) => (...t) => a.asap(() => e(...t)), Ar = 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
1552
|
new URL(F.origin),
|
|
1553
1553
|
F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)
|
|
1554
|
-
) : () => !0,
|
|
1554
|
+
) : () => !0, _r = F.hasStandardBrowserEnv ? (
|
|
1555
1555
|
// Standard browser envs support document.cookie
|
|
1556
1556
|
{
|
|
1557
1557
|
write(e, t, n, r, s, o) {
|
|
@@ -1578,15 +1578,15 @@ const pe = (e, t, n = 3) => {
|
|
|
1578
1578
|
}
|
|
1579
1579
|
}
|
|
1580
1580
|
);
|
|
1581
|
-
function
|
|
1581
|
+
function xr(e) {
|
|
1582
1582
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function Pr(e, t) {
|
|
1585
1585
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1586
1586
|
}
|
|
1587
1587
|
function jt(e, t, n) {
|
|
1588
|
-
let r = !
|
|
1589
|
-
return e && (r || n == !1) ?
|
|
1588
|
+
let r = !xr(t);
|
|
1589
|
+
return e && (r || n == !1) ? Pr(e, t) : t;
|
|
1590
1590
|
}
|
|
1591
1591
|
const ot = (e) => e instanceof L ? { ...e } : e;
|
|
1592
1592
|
function W(e, t) {
|
|
@@ -1656,7 +1656,7 @@ function W(e, t) {
|
|
|
1656
1656
|
const Lt = (e) => {
|
|
1657
1657
|
const t = W({}, e);
|
|
1658
1658
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1659
|
-
t.headers = i = L.from(i), t.url =
|
|
1659
|
+
t.headers = i = L.from(i), t.url = Nt(jt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1660
1660
|
"Authorization",
|
|
1661
1661
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1662
1662
|
);
|
|
@@ -1669,18 +1669,18 @@ const Lt = (e) => {
|
|
|
1669
1669
|
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
|
-
if (F.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1673
|
-
const l = s && o &&
|
|
1672
|
+
if (F.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Ar(t.url))) {
|
|
1673
|
+
const l = s && o && _r.read(o);
|
|
1674
1674
|
l && i.set(s, l);
|
|
1675
1675
|
}
|
|
1676
1676
|
return t;
|
|
1677
|
-
}, Nr = typeof XMLHttpRequest < "u",
|
|
1677
|
+
}, Nr = typeof XMLHttpRequest < "u", Cr = Nr && function(e) {
|
|
1678
1678
|
return new Promise(function(n, r) {
|
|
1679
1679
|
const s = Lt(e);
|
|
1680
1680
|
let o = s.data;
|
|
1681
1681
|
const i = L.from(s.headers).normalize();
|
|
1682
1682
|
let { responseType: c, onUploadProgress: d, onDownloadProgress: l } = s, u, p, b, T, h;
|
|
1683
|
-
function
|
|
1683
|
+
function E() {
|
|
1684
1684
|
T && T(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1685
1685
|
}
|
|
1686
1686
|
let m = new XMLHttpRequest();
|
|
@@ -1688,20 +1688,20 @@ const Lt = (e) => {
|
|
|
1688
1688
|
function S() {
|
|
1689
1689
|
if (!m)
|
|
1690
1690
|
return;
|
|
1691
|
-
const
|
|
1691
|
+
const R = L.from(
|
|
1692
1692
|
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1693
1693
|
), g = {
|
|
1694
1694
|
data: !c || c === "text" || c === "json" ? m.responseText : m.response,
|
|
1695
1695
|
status: m.status,
|
|
1696
1696
|
statusText: m.statusText,
|
|
1697
|
-
headers:
|
|
1697
|
+
headers: R,
|
|
1698
1698
|
config: e,
|
|
1699
1699
|
request: m
|
|
1700
1700
|
};
|
|
1701
|
-
vt(function(
|
|
1702
|
-
n(
|
|
1703
|
-
}, function(
|
|
1704
|
-
r(
|
|
1701
|
+
vt(function(N) {
|
|
1702
|
+
n(N), E();
|
|
1703
|
+
}, function(N) {
|
|
1704
|
+
r(N), E();
|
|
1705
1705
|
}, g), m = null;
|
|
1706
1706
|
}
|
|
1707
1707
|
"onloadend" in m ? m.onloadend = S : m.onreadystatechange = function() {
|
|
@@ -1721,17 +1721,17 @@ const Lt = (e) => {
|
|
|
1721
1721
|
)), m = null;
|
|
1722
1722
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(O, g) {
|
|
1723
1723
|
m.setRequestHeader(g, O);
|
|
1724
|
-
}), 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(!
|
|
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 = (R) => {
|
|
1725
|
+
m && (r(!R || R.type ? new X(null, e, m) : R), m.abort(), m = null);
|
|
1726
1726
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1727
|
-
const A =
|
|
1727
|
+
const A = gr(s.url);
|
|
1728
1728
|
if (A && F.protocols.indexOf(A) === -1) {
|
|
1729
1729
|
r(new y("Unsupported protocol " + A + ":", y.ERR_BAD_REQUEST, e));
|
|
1730
1730
|
return;
|
|
1731
1731
|
}
|
|
1732
1732
|
m.send(o || null);
|
|
1733
1733
|
});
|
|
1734
|
-
},
|
|
1734
|
+
}, kr = (e, t) => {
|
|
1735
1735
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1736
1736
|
if (t || n) {
|
|
1737
1737
|
let r = new AbortController(), s;
|
|
@@ -1754,7 +1754,7 @@ const Lt = (e) => {
|
|
|
1754
1754
|
const { signal: d } = r;
|
|
1755
1755
|
return d.unsubscribe = () => a.asap(c), d;
|
|
1756
1756
|
}
|
|
1757
|
-
},
|
|
1757
|
+
}, Fr = function* (e, t) {
|
|
1758
1758
|
let n = e.byteLength;
|
|
1759
1759
|
if (n < t) {
|
|
1760
1760
|
yield e;
|
|
@@ -1763,10 +1763,10 @@ const Lt = (e) => {
|
|
|
1763
1763
|
let r = 0, s;
|
|
1764
1764
|
for (; r < n; )
|
|
1765
1765
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1766
|
-
},
|
|
1767
|
-
for await (const n of
|
|
1768
|
-
yield*
|
|
1769
|
-
},
|
|
1766
|
+
}, vr = async function* (e, t) {
|
|
1767
|
+
for await (const n of jr(e))
|
|
1768
|
+
yield* Fr(n, t);
|
|
1769
|
+
}, jr = async function* (e) {
|
|
1770
1770
|
if (e[Symbol.asyncIterator]) {
|
|
1771
1771
|
yield* e;
|
|
1772
1772
|
return;
|
|
@@ -1783,7 +1783,7 @@ const Lt = (e) => {
|
|
|
1783
1783
|
await t.cancel();
|
|
1784
1784
|
}
|
|
1785
1785
|
}, it = (e, t, n, r) => {
|
|
1786
|
-
const s =
|
|
1786
|
+
const s = vr(e, t);
|
|
1787
1787
|
let o = 0, i, c = (d) => {
|
|
1788
1788
|
i || (i = !0, r && r(d));
|
|
1789
1789
|
};
|
|
@@ -1811,13 +1811,13 @@ const Lt = (e) => {
|
|
|
1811
1811
|
}, {
|
|
1812
1812
|
highWaterMark: 2
|
|
1813
1813
|
});
|
|
1814
|
-
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = we && typeof ReadableStream == "function",
|
|
1814
|
+
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = we && typeof ReadableStream == "function", Lr = we && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Dt = (e, ...t) => {
|
|
1815
1815
|
try {
|
|
1816
1816
|
return !!e(...t);
|
|
1817
1817
|
} catch {
|
|
1818
1818
|
return !1;
|
|
1819
1819
|
}
|
|
1820
|
-
},
|
|
1820
|
+
}, Ur = Ut && Dt(() => {
|
|
1821
1821
|
let e = !1;
|
|
1822
1822
|
const t = new Request(F.origin, {
|
|
1823
1823
|
body: new ReadableStream(),
|
|
@@ -1837,7 +1837,7 @@ we && ((e) => {
|
|
|
1837
1837
|
});
|
|
1838
1838
|
});
|
|
1839
1839
|
})(new Response());
|
|
1840
|
-
const
|
|
1840
|
+
const Dr = async (e) => {
|
|
1841
1841
|
if (e == null)
|
|
1842
1842
|
return 0;
|
|
1843
1843
|
if (a.isBlob(e))
|
|
@@ -1850,11 +1850,11 @@ const Ur = async (e) => {
|
|
|
1850
1850
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1851
1851
|
return e.byteLength;
|
|
1852
1852
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1853
|
-
return (await
|
|
1854
|
-
},
|
|
1853
|
+
return (await Lr(e)).byteLength;
|
|
1854
|
+
}, Br = async (e, t) => {
|
|
1855
1855
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1856
|
-
return n ??
|
|
1857
|
-
},
|
|
1856
|
+
return n ?? Dr(t);
|
|
1857
|
+
}, qr = we && (async (e) => {
|
|
1858
1858
|
let {
|
|
1859
1859
|
url: t,
|
|
1860
1860
|
method: n,
|
|
@@ -1870,24 +1870,24 @@ const Ur = async (e) => {
|
|
|
1870
1870
|
fetchOptions: b
|
|
1871
1871
|
} = Lt(e);
|
|
1872
1872
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1873
|
-
let T =
|
|
1874
|
-
const
|
|
1873
|
+
let T = kr([s, o && o.toAbortSignal()], i), h;
|
|
1874
|
+
const E = T && T.unsubscribe && (() => {
|
|
1875
1875
|
T.unsubscribe();
|
|
1876
1876
|
});
|
|
1877
1877
|
let m;
|
|
1878
1878
|
try {
|
|
1879
|
-
if (d &&
|
|
1879
|
+
if (d && Ur && n !== "get" && n !== "head" && (m = await Br(u, r)) !== 0) {
|
|
1880
1880
|
let g = new Request(t, {
|
|
1881
1881
|
method: "POST",
|
|
1882
1882
|
body: r,
|
|
1883
1883
|
duplex: "half"
|
|
1884
|
-
}),
|
|
1885
|
-
if (a.isFormData(r) && (
|
|
1886
|
-
const [
|
|
1884
|
+
}), P;
|
|
1885
|
+
if (a.isFormData(r) && (P = g.headers.get("content-type")) && u.setContentType(P), g.body) {
|
|
1886
|
+
const [N, B] = rt(
|
|
1887
1887
|
m,
|
|
1888
1888
|
pe(st(d))
|
|
1889
1889
|
);
|
|
1890
|
-
r = it(g.body, at,
|
|
1890
|
+
r = it(g.body, at, N, B);
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
1893
|
a.isString(p) || (p = p ? "include" : "omit");
|
|
@@ -1902,27 +1902,27 @@ const Ur = async (e) => {
|
|
|
1902
1902
|
credentials: S ? p : void 0
|
|
1903
1903
|
});
|
|
1904
1904
|
let A = await fetch(h);
|
|
1905
|
-
const
|
|
1906
|
-
if (ve && (c ||
|
|
1905
|
+
const R = ve && (l === "stream" || l === "response");
|
|
1906
|
+
if (ve && (c || R && E)) {
|
|
1907
1907
|
const g = {};
|
|
1908
1908
|
["status", "statusText", "headers"].forEach((v) => {
|
|
1909
1909
|
g[v] = A[v];
|
|
1910
1910
|
});
|
|
1911
|
-
const
|
|
1912
|
-
|
|
1911
|
+
const P = a.toFiniteNumber(A.headers.get("content-length")), [N, B] = c && rt(
|
|
1912
|
+
P,
|
|
1913
1913
|
pe(st(c), !0)
|
|
1914
1914
|
) || [];
|
|
1915
1915
|
A = new Response(
|
|
1916
|
-
it(A.body, at,
|
|
1917
|
-
B && B(),
|
|
1916
|
+
it(A.body, at, N, () => {
|
|
1917
|
+
B && B(), E && E();
|
|
1918
1918
|
}),
|
|
1919
1919
|
g
|
|
1920
1920
|
);
|
|
1921
1921
|
}
|
|
1922
1922
|
l = l || "text";
|
|
1923
1923
|
let O = await he[a.findKey(he, l) || "text"](A, e);
|
|
1924
|
-
return !
|
|
1925
|
-
vt(g,
|
|
1924
|
+
return !R && E && E(), await new Promise((g, P) => {
|
|
1925
|
+
vt(g, P, {
|
|
1926
1926
|
data: O,
|
|
1927
1927
|
headers: L.from(A.headers),
|
|
1928
1928
|
status: A.status,
|
|
@@ -1932,7 +1932,7 @@ const Ur = async (e) => {
|
|
|
1932
1932
|
});
|
|
1933
1933
|
});
|
|
1934
1934
|
} catch (S) {
|
|
1935
|
-
throw
|
|
1935
|
+
throw E && E(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
|
|
1936
1936
|
new y("Network Error", y.ERR_NETWORK, e, h),
|
|
1937
1937
|
{
|
|
1938
1938
|
cause: S.cause || S
|
|
@@ -1940,9 +1940,9 @@ const Ur = async (e) => {
|
|
|
1940
1940
|
) : y.from(S, S && S.code, e, h);
|
|
1941
1941
|
}
|
|
1942
1942
|
}), je = {
|
|
1943
|
-
http:
|
|
1944
|
-
xhr:
|
|
1945
|
-
fetch:
|
|
1943
|
+
http: er,
|
|
1944
|
+
xhr: Cr,
|
|
1945
|
+
fetch: qr
|
|
1946
1946
|
};
|
|
1947
1947
|
a.forEach(je, (e, t) => {
|
|
1948
1948
|
if (e) {
|
|
@@ -1953,7 +1953,7 @@ a.forEach(je, (e, t) => {
|
|
|
1953
1953
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1954
1954
|
}
|
|
1955
1955
|
});
|
|
1956
|
-
const ct = (e) => `- ${e}`,
|
|
1956
|
+
const ct = (e) => `- ${e}`, Ir = (e) => a.isFunction(e) || e === null || e === !1, Bt = {
|
|
1957
1957
|
getAdapter: (e) => {
|
|
1958
1958
|
e = a.isArray(e) ? e : [e];
|
|
1959
1959
|
const { length: t } = e;
|
|
@@ -1962,7 +1962,7 @@ const ct = (e) => `- ${e}`, qr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1962
1962
|
for (let o = 0; o < t; o++) {
|
|
1963
1963
|
n = e[o];
|
|
1964
1964
|
let i;
|
|
1965
|
-
if (r = n, !
|
|
1965
|
+
if (r = n, !Ir(n) && (r = je[(i = String(n)).toLowerCase()], r === void 0))
|
|
1966
1966
|
throw new y(`Unknown adapter '${i}'`);
|
|
1967
1967
|
if (r)
|
|
1968
1968
|
break;
|
|
@@ -1984,22 +1984,22 @@ const ct = (e) => `- ${e}`, qr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1984
1984
|
},
|
|
1985
1985
|
adapters: je
|
|
1986
1986
|
};
|
|
1987
|
-
function
|
|
1987
|
+
function Ne(e) {
|
|
1988
1988
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1989
1989
|
throw new X(null, e);
|
|
1990
1990
|
}
|
|
1991
1991
|
function lt(e) {
|
|
1992
|
-
return
|
|
1992
|
+
return Ne(e), e.headers = L.from(e.headers), e.data = Pe.call(
|
|
1993
1993
|
e,
|
|
1994
1994
|
e.transformRequest
|
|
1995
1995
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Bt.getAdapter(e.adapter || ae.adapter)(e).then(function(r) {
|
|
1996
|
-
return
|
|
1996
|
+
return Ne(e), r.data = Pe.call(
|
|
1997
1997
|
e,
|
|
1998
1998
|
e.transformResponse,
|
|
1999
1999
|
r
|
|
2000
2000
|
), r.headers = L.from(r.headers), r;
|
|
2001
2001
|
}, function(r) {
|
|
2002
|
-
return Ft(r) || (
|
|
2002
|
+
return Ft(r) || (Ne(e), r && r.response && (r.response.data = Pe.call(
|
|
2003
2003
|
e,
|
|
2004
2004
|
e.transformResponse,
|
|
2005
2005
|
r.response
|
|
@@ -2034,7 +2034,7 @@ Te.transitional = function(t, n, r) {
|
|
|
2034
2034
|
Te.spelling = function(t) {
|
|
2035
2035
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
2036
2036
|
};
|
|
2037
|
-
function
|
|
2037
|
+
function $r(e, t, n) {
|
|
2038
2038
|
if (typeof e != "object")
|
|
2039
2039
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
2040
2040
|
const r = Object.keys(e);
|
|
@@ -2052,7 +2052,7 @@ function Ir(e, t, n) {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
}
|
|
2054
2054
|
const fe = {
|
|
2055
|
-
assertOptions:
|
|
2055
|
+
assertOptions: $r,
|
|
2056
2056
|
validators: Te
|
|
2057
2057
|
}, I = fe.validators;
|
|
2058
2058
|
let J = class {
|
|
@@ -2115,12 +2115,12 @@ let J = class {
|
|
|
2115
2115
|
), n.headers = L.concat(i, o);
|
|
2116
2116
|
const c = [];
|
|
2117
2117
|
let d = !0;
|
|
2118
|
-
this.interceptors.request.forEach(function(
|
|
2119
|
-
typeof
|
|
2118
|
+
this.interceptors.request.forEach(function(E) {
|
|
2119
|
+
typeof E.runWhen == "function" && E.runWhen(n) === !1 || (d = d && E.synchronous, c.unshift(E.fulfilled, E.rejected));
|
|
2120
2120
|
});
|
|
2121
2121
|
const l = [];
|
|
2122
|
-
this.interceptors.response.forEach(function(
|
|
2123
|
-
l.push(
|
|
2122
|
+
this.interceptors.response.forEach(function(E) {
|
|
2123
|
+
l.push(E.fulfilled, E.rejected);
|
|
2124
2124
|
});
|
|
2125
2125
|
let u, p = 0, b;
|
|
2126
2126
|
if (!d) {
|
|
@@ -2132,11 +2132,11 @@ let J = class {
|
|
|
2132
2132
|
b = c.length;
|
|
2133
2133
|
let T = n;
|
|
2134
2134
|
for (p = 0; p < b; ) {
|
|
2135
|
-
const h = c[p++],
|
|
2135
|
+
const h = c[p++], E = c[p++];
|
|
2136
2136
|
try {
|
|
2137
2137
|
T = h(T);
|
|
2138
2138
|
} catch (m) {
|
|
2139
|
-
|
|
2139
|
+
E.call(this, m);
|
|
2140
2140
|
break;
|
|
2141
2141
|
}
|
|
2142
2142
|
}
|
|
@@ -2152,7 +2152,7 @@ let J = class {
|
|
|
2152
2152
|
getUri(t) {
|
|
2153
2153
|
t = W(this.defaults, t);
|
|
2154
2154
|
const n = jt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2155
|
-
return
|
|
2155
|
+
return Nt(n, t.params, t.paramsSerializer);
|
|
2156
2156
|
}
|
|
2157
2157
|
};
|
|
2158
2158
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -2179,7 +2179,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
2179
2179
|
}
|
|
2180
2180
|
J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
|
|
2181
2181
|
});
|
|
2182
|
-
let
|
|
2182
|
+
let Mr = class It {
|
|
2183
2183
|
constructor(t) {
|
|
2184
2184
|
if (typeof t != "function")
|
|
2185
2185
|
throw new TypeError("executor must be a function.");
|
|
@@ -2252,12 +2252,12 @@ let $r = class It {
|
|
|
2252
2252
|
};
|
|
2253
2253
|
}
|
|
2254
2254
|
};
|
|
2255
|
-
function
|
|
2255
|
+
function Hr(e) {
|
|
2256
2256
|
return function(n) {
|
|
2257
2257
|
return e.apply(null, n);
|
|
2258
2258
|
};
|
|
2259
2259
|
}
|
|
2260
|
-
function
|
|
2260
|
+
function zr(e) {
|
|
2261
2261
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
2262
2262
|
}
|
|
2263
2263
|
const Le = {
|
|
@@ -2329,7 +2329,7 @@ Object.entries(Le).forEach(([e, t]) => {
|
|
|
2329
2329
|
Le[t] = e;
|
|
2330
2330
|
});
|
|
2331
2331
|
function $t(e) {
|
|
2332
|
-
const t = new J(e), n =
|
|
2332
|
+
const t = new J(e), n = Rt(J.prototype.request, t);
|
|
2333
2333
|
return a.extend(n, J.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2334
2334
|
return $t(W(e, s));
|
|
2335
2335
|
}, n;
|
|
@@ -2337,7 +2337,7 @@ function $t(e) {
|
|
|
2337
2337
|
const x = $t(ae);
|
|
2338
2338
|
x.Axios = J;
|
|
2339
2339
|
x.CanceledError = X;
|
|
2340
|
-
x.CancelToken =
|
|
2340
|
+
x.CancelToken = Mr;
|
|
2341
2341
|
x.isCancel = Ft;
|
|
2342
2342
|
x.VERSION = qt;
|
|
2343
2343
|
x.toFormData = ye;
|
|
@@ -2346,8 +2346,8 @@ x.Cancel = x.CanceledError;
|
|
|
2346
2346
|
x.all = function(t) {
|
|
2347
2347
|
return Promise.all(t);
|
|
2348
2348
|
};
|
|
2349
|
-
x.spread =
|
|
2350
|
-
x.isAxiosError =
|
|
2349
|
+
x.spread = Hr;
|
|
2350
|
+
x.isAxiosError = zr;
|
|
2351
2351
|
x.mergeConfig = W;
|
|
2352
2352
|
x.AxiosHeaders = L;
|
|
2353
2353
|
x.formToJSON = (e) => kt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -2355,34 +2355,35 @@ x.getAdapter = Bt.getAdapter;
|
|
|
2355
2355
|
x.HttpStatusCode = Le;
|
|
2356
2356
|
x.default = x;
|
|
2357
2357
|
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,
|
|
2358
|
+
Axios: es,
|
|
2359
|
+
AxiosError: ts,
|
|
2360
|
+
CanceledError: ns,
|
|
2361
|
+
isCancel: rs,
|
|
2362
|
+
CancelToken: ss,
|
|
2363
|
+
VERSION: os,
|
|
2364
|
+
all: is,
|
|
2365
|
+
Cancel: as,
|
|
2366
|
+
isAxiosError: cs,
|
|
2367
|
+
spread: ls,
|
|
2368
|
+
toFormData: us,
|
|
2369
|
+
AxiosHeaders: fs,
|
|
2370
|
+
HttpStatusCode: ds,
|
|
2371
|
+
formToJSON: ps,
|
|
2372
|
+
getAdapter: hs,
|
|
2373
|
+
mergeConfig: ms
|
|
2374
|
+
} = x, Es = (e) => x.create({
|
|
2375
2375
|
timeout: 2 * 60 * 1e3,
|
|
2376
2376
|
...e
|
|
2377
2377
|
});
|
|
2378
2378
|
export {
|
|
2379
|
-
|
|
2380
|
-
de as
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
Vr as
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2379
|
+
Kr as AuthStateProvider,
|
|
2380
|
+
de as ERequestContentType,
|
|
2381
|
+
Qt as ERequestMethod,
|
|
2382
|
+
Gr as FetcherProvider,
|
|
2383
|
+
Es as createAxiosInstance,
|
|
2384
|
+
Vr as createGraphQLFetcher,
|
|
2385
|
+
Yr as createRestFulFetcher,
|
|
2386
|
+
Xr as getGraphQLResponseFormatError,
|
|
2387
|
+
pn as getRestFulResponseFormatError,
|
|
2388
|
+
fn as useAuthState
|
|
2388
2389
|
};
|