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