@acrool/react-fetcher 0.0.2-alpha.9 → 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/acrool-react-fetcher.es.js +810 -855
- 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 +3 -0
- 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,73 +76,32 @@ 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) ?? {}, K.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": K.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
|
-
var
|
|
104
|
+
var ce = { exports: {} }, G = {};
|
|
148
105
|
/**
|
|
149
106
|
* @license React
|
|
150
107
|
* react-jsx-runtime.production.js
|
|
@@ -154,12 +111,12 @@ var le = { exports: {} }, Z = {};
|
|
|
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,15 +125,15 @@ 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
|
|
134
|
+
return G.Fragment = t, G.jsx = n, G.jsxs = n, G;
|
|
178
135
|
}
|
|
179
|
-
var
|
|
136
|
+
var Z = {};
|
|
180
137
|
/**
|
|
181
138
|
* @license React
|
|
182
139
|
* react-jsx-runtime.development.js
|
|
@@ -186,9 +143,9 @@ var Q = {};
|
|
|
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")
|
|
@@ -197,13 +154,13 @@ function tr() {
|
|
|
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
165
|
case v:
|
|
209
166
|
return "Activity";
|
|
@@ -221,7 +178,7 @@ function tr() {
|
|
|
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
183
|
case B:
|
|
227
184
|
w = f._payload, f = f._init;
|
|
@@ -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,7 +209,7 @@ function tr() {
|
|
|
252
209
|
), t(f);
|
|
253
210
|
}
|
|
254
211
|
}
|
|
255
|
-
function
|
|
212
|
+
function r(f) {
|
|
256
213
|
if (f === R) return "<>";
|
|
257
214
|
if (typeof f == "object" && f !== null && f.$$typeof === B)
|
|
258
215
|
return "<...>";
|
|
@@ -295,7 +252,7 @@ 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, q,
|
|
255
|
+
function l(f, w, _, C, M, q, Se, Oe) {
|
|
299
256
|
return _ = q.ref, f = {
|
|
300
257
|
$$typeof: T,
|
|
301
258
|
type: f,
|
|
@@ -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, q,
|
|
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,8 +299,8 @@ function tr() {
|
|
|
342
299
|
else p(k);
|
|
343
300
|
if (Ie.call(w, "key")) {
|
|
344
301
|
k = e(f);
|
|
345
|
-
var Y = Object.keys(w).filter(function(
|
|
346
|
-
return
|
|
302
|
+
var Y = Object.keys(w).filter(function(Ht) {
|
|
303
|
+
return Ht !== "key";
|
|
347
304
|
});
|
|
348
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:
|
|
@@ -358,7 +315,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
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]);
|
|
@@ -373,14 +330,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
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,8 +348,8 @@ 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 =
|
|
395
|
-
|
|
351
|
+
)(), ze = ge(r(o)), Je = {};
|
|
352
|
+
Z.Fragment = R, Z.jsx = function(f, w, _, C, M) {
|
|
396
353
|
var q = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
397
354
|
return u(
|
|
398
355
|
f,
|
|
@@ -402,9 +359,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
402
359
|
C,
|
|
403
360
|
M,
|
|
404
361
|
q ? Error("react-stack-top-frame") : He,
|
|
405
|
-
q ?
|
|
362
|
+
q ? ge(r(f)) : ze
|
|
406
363
|
);
|
|
407
|
-
},
|
|
364
|
+
}, Z.jsxs = function(f, w, _, C, M) {
|
|
408
365
|
var q = 1e4 > H.recentlyCreatedOwnerStacks++;
|
|
409
366
|
return u(
|
|
410
367
|
f,
|
|
@@ -414,91 +371,91 @@ React keys must be passed directly to JSX without using spread:
|
|
|
414
371
|
C,
|
|
415
372
|
M,
|
|
416
373
|
q ? Error("react-stack-top-frame") : He,
|
|
417
|
-
q ?
|
|
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",
|
|
431
388
|
"line-height: 20px",
|
|
432
389
|
"padding-right: 8px",
|
|
433
390
|
"border-radius: 4px"
|
|
434
|
-
],
|
|
391
|
+
], se = {
|
|
435
392
|
primary: "#0055a9",
|
|
436
393
|
success: "#009422",
|
|
437
394
|
info: "#17a2b8",
|
|
438
395
|
warning: "#d7a000",
|
|
439
396
|
danger: "#ec2127"
|
|
440
397
|
};
|
|
441
|
-
function
|
|
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
|
|
446
|
-
`background-color: ${
|
|
401
|
+
function sn(e, ...t) {
|
|
402
|
+
const n = re.concat([
|
|
403
|
+
`background-color: ${se.primary}`
|
|
447
404
|
]).join(";");
|
|
448
|
-
|
|
405
|
+
oe(e, n, ...t);
|
|
449
406
|
}
|
|
450
|
-
function
|
|
451
|
-
const
|
|
452
|
-
`background-color: ${
|
|
407
|
+
function on(e, ...t) {
|
|
408
|
+
const n = re.concat([
|
|
409
|
+
`background-color: ${se.success}`
|
|
453
410
|
]).join(";");
|
|
454
|
-
|
|
411
|
+
oe(e, n, ...t);
|
|
455
412
|
}
|
|
456
|
-
function
|
|
457
|
-
const
|
|
458
|
-
`background-color: ${
|
|
413
|
+
function an(e, ...t) {
|
|
414
|
+
const n = re.concat([
|
|
415
|
+
`background-color: ${se.info}`
|
|
459
416
|
]).join(";");
|
|
460
|
-
|
|
417
|
+
oe(e, n, ...t);
|
|
461
418
|
}
|
|
462
|
-
function
|
|
463
|
-
const
|
|
464
|
-
`background-color: ${
|
|
419
|
+
function cn(e, ...t) {
|
|
420
|
+
const n = re.concat([
|
|
421
|
+
`background-color: ${se.warning}`
|
|
465
422
|
]).join(";");
|
|
466
|
-
|
|
423
|
+
oe(e, n, ...t);
|
|
467
424
|
}
|
|
468
|
-
function
|
|
469
|
-
const
|
|
470
|
-
`background-color: ${
|
|
425
|
+
function ln(e, ...t) {
|
|
426
|
+
const n = re.concat([
|
|
427
|
+
`background-color: ${se.danger}`
|
|
471
428
|
]).join(";");
|
|
472
|
-
|
|
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
|
-
class
|
|
495
|
-
constructor(
|
|
496
|
-
super(
|
|
451
|
+
class te extends Error {
|
|
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,46 +469,42 @@ class re 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
|
-
throw new
|
|
500
|
+
throw new te({ message: "refresh token fail", code: "REFRESH_TOKEN_EMPTY" });
|
|
548
501
|
l(h);
|
|
549
502
|
return;
|
|
550
503
|
} catch {
|
|
551
|
-
throw u(), new
|
|
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,22 +583,22 @@ class lr extends Error {
|
|
|
630
583
|
};
|
|
631
584
|
}
|
|
632
585
|
}
|
|
633
|
-
const
|
|
634
|
-
var t,
|
|
635
|
-
return (
|
|
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
|
};
|
|
639
|
-
},
|
|
592
|
+
}, dn = (e) => e != null && e.data ? e == null ? void 0 : e.data : {
|
|
640
593
|
message: "Axios error",
|
|
641
594
|
code: "ERR_SYS_BAD_RESPONSE"
|
|
642
595
|
};
|
|
643
|
-
let
|
|
644
|
-
const
|
|
596
|
+
let Q = !1, _e = [];
|
|
597
|
+
const pn = ft(null), Xr = ({
|
|
645
598
|
children: e,
|
|
646
599
|
axiosInstance: t,
|
|
647
|
-
locale:
|
|
648
|
-
getResponseFormatError:
|
|
600
|
+
locale: n = "en-US",
|
|
601
|
+
getResponseFormatError: r = dn,
|
|
649
602
|
onError: s,
|
|
650
603
|
checkIsRefreshTokenRequest: o,
|
|
651
604
|
authorizationPrefix: i = "Bearer",
|
|
@@ -657,290 +610,290 @@ const fr = dt(null), Kn = ({
|
|
|
657
610
|
updateTokens: u,
|
|
658
611
|
refreshTokens: p,
|
|
659
612
|
forceLogout: b
|
|
660
|
-
} =
|
|
661
|
-
|
|
613
|
+
} = un();
|
|
614
|
+
Yt(() => {
|
|
662
615
|
const E = t.interceptors.request.use(R), O = t.interceptors.response.use(m, A);
|
|
663
616
|
return () => {
|
|
664
617
|
t.interceptors.request.eject(E), t.interceptors.response.eject(O);
|
|
665
618
|
};
|
|
666
619
|
}, [l, p, u, b]);
|
|
667
620
|
const T = (E) => {
|
|
668
|
-
d &&
|
|
621
|
+
d && U.warning("[FetcherProvider] runPendingRequest", { isSuccess: E }), Q = !1;
|
|
669
622
|
for (const O of _e)
|
|
670
623
|
O(E);
|
|
671
624
|
_e = [];
|
|
672
|
-
}, h = (E, O) => (
|
|
673
|
-
d &&
|
|
674
|
-
|
|
675
|
-
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),
|
|
676
629
|
code: "UNAUTHORIZED",
|
|
677
630
|
path: "AxiosClientProvider.pushPendingRequestQueues"
|
|
678
631
|
}));
|
|
679
632
|
});
|
|
680
|
-
}, R = (E) => new Promise((O,
|
|
633
|
+
}, R = (E) => new Promise((O, g) => {
|
|
681
634
|
var v, V;
|
|
682
|
-
E.headers["Accept-Language"] =
|
|
683
|
-
const
|
|
684
|
-
if (!((V = E.fetchOptions) == null ? void 0 : V.forceGuest) &&
|
|
685
|
-
h(O,
|
|
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({
|
|
686
639
|
message: "Token refreshing, so request save queues not send",
|
|
687
640
|
code: "REFRESH_TOKEN"
|
|
688
641
|
}));
|
|
689
642
|
return;
|
|
690
643
|
}
|
|
691
644
|
O(E);
|
|
692
|
-
}), m = (E) => (d &&
|
|
693
|
-
const O = (c == null ? void 0 : c[
|
|
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"];
|
|
694
647
|
return (O == null ? void 0 : O[E]) || `Error: ${E}`;
|
|
695
648
|
}, A = (E) => {
|
|
696
|
-
const O = E.response,
|
|
697
|
-
d &&
|
|
698
|
-
const B =
|
|
699
|
-
if (O &&
|
|
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")) {
|
|
700
653
|
const v = l();
|
|
701
|
-
return d &&
|
|
702
|
-
d &&
|
|
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);
|
|
703
656
|
}).catch(() => {
|
|
704
|
-
d &&
|
|
657
|
+
d && U.danger("[FetcherProvider] refreshTokens fail"), T(!1);
|
|
705
658
|
})), new Promise((V, H) => {
|
|
706
|
-
h(V, H)(
|
|
659
|
+
h(V, H)(g);
|
|
707
660
|
}));
|
|
708
661
|
}
|
|
709
|
-
return Promise.reject(new
|
|
662
|
+
return Promise.reject(new te(N));
|
|
710
663
|
};
|
|
711
|
-
return /* @__PURE__ */
|
|
712
|
-
|
|
664
|
+
return /* @__PURE__ */ mt.jsx(
|
|
665
|
+
pn.Provider,
|
|
713
666
|
{
|
|
714
667
|
value: t,
|
|
715
668
|
children: e
|
|
716
669
|
}
|
|
717
670
|
);
|
|
718
671
|
};
|
|
719
|
-
function
|
|
672
|
+
function Et(e, t) {
|
|
720
673
|
return function() {
|
|
721
674
|
return e.apply(t, arguments);
|
|
722
675
|
};
|
|
723
676
|
}
|
|
724
|
-
const { toString:
|
|
725
|
-
const
|
|
726
|
-
return e[
|
|
727
|
-
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => Re(t) === e), Ee = (e) => (t) => typeof t === e, { isArray:
|
|
728
|
-
function
|
|
729
|
-
return e !== null && !ne(e) && e.constructor !== null && !ne(e.constructor) &&
|
|
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);
|
|
730
683
|
}
|
|
731
|
-
const
|
|
732
|
-
function
|
|
684
|
+
const yt = D("ArrayBuffer");
|
|
685
|
+
function Rn(e) {
|
|
733
686
|
let t;
|
|
734
|
-
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;
|
|
735
688
|
}
|
|
736
|
-
const
|
|
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) => {
|
|
737
690
|
if (Re(e) !== "object")
|
|
738
691
|
return !1;
|
|
739
692
|
const t = De(e);
|
|
740
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
741
|
-
},
|
|
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) => {
|
|
742
695
|
let t;
|
|
743
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
744
|
-
t === "object" &&
|
|
745
|
-
},
|
|
746
|
-
function
|
|
696
|
+
return e && (typeof FormData == "function" && e instanceof FormData || j(e.append) && ((t = Re(e)) === "formdata" || // detect form-data instance
|
|
697
|
+
t === "object" && j(e.toString) && e.toString() === "[object FormData]"));
|
|
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 } = {}) {
|
|
747
700
|
if (e === null || typeof e > "u")
|
|
748
701
|
return;
|
|
749
|
-
let
|
|
750
|
-
if (typeof e != "object" && (e = [e]),
|
|
751
|
-
for (
|
|
752
|
-
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);
|
|
753
706
|
else {
|
|
754
|
-
const o =
|
|
707
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
755
708
|
let c;
|
|
756
|
-
for (
|
|
757
|
-
c = o[
|
|
709
|
+
for (r = 0; r < i; r++)
|
|
710
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
758
711
|
}
|
|
759
712
|
}
|
|
760
|
-
function
|
|
713
|
+
function Tt(e, t) {
|
|
761
714
|
t = t.toLowerCase();
|
|
762
|
-
const
|
|
763
|
-
let
|
|
764
|
-
for (;
|
|
765
|
-
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())
|
|
766
719
|
return s;
|
|
767
720
|
return null;
|
|
768
721
|
}
|
|
769
722
|
const z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, gt = (e) => !ne(e) && e !== z;
|
|
770
723
|
function Ce() {
|
|
771
|
-
const { caseless: e } = gt(this) && this || {}, t = {},
|
|
772
|
-
const o = e &&
|
|
773
|
-
|
|
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;
|
|
774
727
|
};
|
|
775
|
-
for (let
|
|
776
|
-
arguments[
|
|
728
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
729
|
+
arguments[r] && ie(arguments[r], n);
|
|
777
730
|
return t;
|
|
778
731
|
}
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
}, { allOwnKeys:
|
|
782
|
-
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", {
|
|
783
736
|
value: t.prototype
|
|
784
|
-
}),
|
|
785
|
-
},
|
|
737
|
+
}), n && Object.assign(e.prototype, n);
|
|
738
|
+
}, jn = (e, t, n, r) => {
|
|
786
739
|
let s, o, i;
|
|
787
740
|
const c = {};
|
|
788
741
|
if (t = t || {}, e == null) return t;
|
|
789
742
|
do {
|
|
790
743
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
791
|
-
i = s[o], (!
|
|
792
|
-
e =
|
|
793
|
-
} 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);
|
|
794
747
|
return t;
|
|
795
|
-
},
|
|
796
|
-
e = String(e), (
|
|
797
|
-
const
|
|
798
|
-
return
|
|
799
|
-
},
|
|
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) => {
|
|
800
753
|
if (!e) return null;
|
|
801
|
-
if (
|
|
754
|
+
if (K(e)) return e;
|
|
802
755
|
let t = e.length;
|
|
803
|
-
if (!
|
|
804
|
-
const
|
|
756
|
+
if (!wt(t)) return null;
|
|
757
|
+
const n = new Array(t);
|
|
805
758
|
for (; t-- > 0; )
|
|
806
|
-
|
|
807
|
-
return
|
|
808
|
-
},
|
|
809
|
-
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);
|
|
810
763
|
let s;
|
|
811
|
-
for (; (s =
|
|
764
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
812
765
|
const o = s.value;
|
|
813
766
|
t.call(e, o[0], o[1]);
|
|
814
767
|
}
|
|
815
|
-
},
|
|
816
|
-
let
|
|
817
|
-
const
|
|
818
|
-
for (; (
|
|
819
|
-
|
|
820
|
-
return
|
|
821
|
-
},
|
|
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(
|
|
822
775
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
823
|
-
function(
|
|
824
|
-
return
|
|
776
|
+
function(n, r, s) {
|
|
777
|
+
return r.toUpperCase() + s;
|
|
825
778
|
}
|
|
826
|
-
),
|
|
827
|
-
const
|
|
828
|
-
|
|
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) => {
|
|
829
782
|
let i;
|
|
830
|
-
(i = t(s, o, e)) !== !1 && (
|
|
831
|
-
}), Object.defineProperties(e,
|
|
832
|
-
},
|
|
833
|
-
|
|
834
|
-
if (
|
|
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)
|
|
835
788
|
return !1;
|
|
836
|
-
const
|
|
837
|
-
if (
|
|
789
|
+
const r = e[n];
|
|
790
|
+
if (j(r)) {
|
|
838
791
|
if (t.enumerable = !1, "writable" in t) {
|
|
839
792
|
t.writable = !1;
|
|
840
793
|
return;
|
|
841
794
|
}
|
|
842
795
|
t.set || (t.set = () => {
|
|
843
|
-
throw Error("Can not rewrite read-only method '" +
|
|
796
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
844
797
|
});
|
|
845
798
|
}
|
|
846
799
|
});
|
|
847
|
-
},
|
|
848
|
-
const
|
|
800
|
+
}, zn = (e, t) => {
|
|
801
|
+
const n = {}, r = (s) => {
|
|
849
802
|
s.forEach((o) => {
|
|
850
|
-
|
|
803
|
+
n[o] = !0;
|
|
851
804
|
});
|
|
852
805
|
};
|
|
853
|
-
return
|
|
854
|
-
},
|
|
855
|
-
},
|
|
856
|
-
function
|
|
857
|
-
return !!(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]);
|
|
858
811
|
}
|
|
859
|
-
const
|
|
860
|
-
const t = new Array(10),
|
|
861
|
-
if (be(
|
|
862
|
-
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)
|
|
863
816
|
return;
|
|
864
|
-
if (!("toJSON" in
|
|
865
|
-
t[s] =
|
|
866
|
-
const o =
|
|
867
|
-
return
|
|
868
|
-
const d =
|
|
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);
|
|
869
822
|
!ne(d) && (o[c] = d);
|
|
870
823
|
}), t[s] = void 0, o;
|
|
871
824
|
}
|
|
872
825
|
}
|
|
873
|
-
return
|
|
826
|
+
return r;
|
|
874
827
|
};
|
|
875
|
-
return
|
|
876
|
-
},
|
|
877
|
-
s === z && o ===
|
|
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()();
|
|
878
831
|
}, !1), (s) => {
|
|
879
|
-
|
|
880
|
-
}))(`axios@${Math.random()}`, []) : (
|
|
832
|
+
r.push(s), z.postMessage(n, "*");
|
|
833
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
881
834
|
typeof setImmediate == "function",
|
|
882
|
-
|
|
883
|
-
),
|
|
884
|
-
isArray:
|
|
885
|
-
isArrayBuffer:
|
|
886
|
-
isBuffer:
|
|
887
|
-
isFormData:
|
|
888
|
-
isArrayBufferView:
|
|
889
|
-
isString:
|
|
890
|
-
isNumber:
|
|
891
|
-
isBoolean:
|
|
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,
|
|
892
845
|
isObject: be,
|
|
893
|
-
isPlainObject:
|
|
894
|
-
isReadableStream:
|
|
895
|
-
isRequest:
|
|
896
|
-
isResponse:
|
|
897
|
-
isHeaders:
|
|
846
|
+
isPlainObject: le,
|
|
847
|
+
isReadableStream: _n,
|
|
848
|
+
isRequest: xn,
|
|
849
|
+
isResponse: Pn,
|
|
850
|
+
isHeaders: Nn,
|
|
898
851
|
isUndefined: ne,
|
|
899
|
-
isDate:
|
|
900
|
-
isFile:
|
|
901
|
-
isBlob:
|
|
902
|
-
isRegExp:
|
|
903
|
-
isFunction:
|
|
904
|
-
isStream:
|
|
905
|
-
isURLSearchParams:
|
|
906
|
-
isTypedArray:
|
|
907
|
-
isFileList:
|
|
908
|
-
forEach:
|
|
852
|
+
isDate: yn,
|
|
853
|
+
isFile: wn,
|
|
854
|
+
isBlob: Tn,
|
|
855
|
+
isRegExp: Mn,
|
|
856
|
+
isFunction: j,
|
|
857
|
+
isStream: Sn,
|
|
858
|
+
isURLSearchParams: An,
|
|
859
|
+
isTypedArray: Dn,
|
|
860
|
+
isFileList: gn,
|
|
861
|
+
forEach: ie,
|
|
909
862
|
merge: Ce,
|
|
910
|
-
extend:
|
|
911
|
-
trim:
|
|
912
|
-
stripBOM:
|
|
913
|
-
inherits:
|
|
914
|
-
toFlatObject:
|
|
863
|
+
extend: kn,
|
|
864
|
+
trim: Cn,
|
|
865
|
+
stripBOM: Fn,
|
|
866
|
+
inherits: vn,
|
|
867
|
+
toFlatObject: jn,
|
|
915
868
|
kindOf: Re,
|
|
916
869
|
kindOfTest: D,
|
|
917
|
-
endsWith:
|
|
918
|
-
toArray:
|
|
919
|
-
forEachEntry:
|
|
920
|
-
matchAll:
|
|
921
|
-
isHTMLForm:
|
|
922
|
-
hasOwnProperty:
|
|
923
|
-
hasOwnProp:
|
|
870
|
+
endsWith: Ln,
|
|
871
|
+
toArray: Un,
|
|
872
|
+
forEachEntry: Bn,
|
|
873
|
+
matchAll: qn,
|
|
874
|
+
isHTMLForm: In,
|
|
875
|
+
hasOwnProperty: Ze,
|
|
876
|
+
hasOwnProp: Ze,
|
|
924
877
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
925
|
-
reduceDescriptors:
|
|
926
|
-
freezeMethods:
|
|
927
|
-
toObjectSet:
|
|
928
|
-
toCamelCase:
|
|
929
|
-
noop:
|
|
930
|
-
toFiniteNumber:
|
|
931
|
-
findKey:
|
|
878
|
+
reduceDescriptors: St,
|
|
879
|
+
freezeMethods: Hn,
|
|
880
|
+
toObjectSet: zn,
|
|
881
|
+
toCamelCase: $n,
|
|
882
|
+
noop: Jn,
|
|
883
|
+
toFiniteNumber: Wn,
|
|
884
|
+
findKey: Tt,
|
|
932
885
|
global: z,
|
|
933
886
|
isContextDefined: gt,
|
|
934
|
-
isSpecCompliantForm:
|
|
935
|
-
toJSONObject:
|
|
936
|
-
isAsyncFn:
|
|
937
|
-
isThenable:
|
|
938
|
-
setImmediate:
|
|
939
|
-
asap:
|
|
940
|
-
isIterable:
|
|
887
|
+
isSpecCompliantForm: Vn,
|
|
888
|
+
toJSONObject: Yn,
|
|
889
|
+
isAsyncFn: Kn,
|
|
890
|
+
isThenable: Xn,
|
|
891
|
+
setImmediate: Ot,
|
|
892
|
+
asap: Gn,
|
|
893
|
+
isIterable: Zn
|
|
941
894
|
};
|
|
942
|
-
function y(e, t,
|
|
943
|
-
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);
|
|
944
897
|
}
|
|
945
898
|
a.inherits(y, Error, {
|
|
946
899
|
toJSON: function() {
|
|
@@ -963,7 +916,7 @@ a.inherits(y, Error, {
|
|
|
963
916
|
};
|
|
964
917
|
}
|
|
965
918
|
});
|
|
966
|
-
const
|
|
919
|
+
const At = y.prototype, _t = {};
|
|
967
920
|
[
|
|
968
921
|
"ERR_BAD_OPTION_VALUE",
|
|
969
922
|
"ERR_BAD_OPTION",
|
|
@@ -979,45 +932,45 @@ const _t = y.prototype, xt = {};
|
|
|
979
932
|
"ERR_INVALID_URL"
|
|
980
933
|
// eslint-disable-next-line func-names
|
|
981
934
|
].forEach((e) => {
|
|
982
|
-
|
|
935
|
+
_t[e] = { value: e };
|
|
983
936
|
});
|
|
984
|
-
Object.defineProperties(y,
|
|
985
|
-
Object.defineProperty(
|
|
986
|
-
y.from = (e, t,
|
|
987
|
-
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);
|
|
988
941
|
return a.toFlatObject(e, i, function(d) {
|
|
989
942
|
return d !== Error.prototype;
|
|
990
|
-
}, (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;
|
|
991
944
|
};
|
|
992
|
-
const
|
|
945
|
+
const Qn = null;
|
|
993
946
|
function ke(e) {
|
|
994
947
|
return a.isPlainObject(e) || a.isArray(e);
|
|
995
948
|
}
|
|
996
|
-
function
|
|
949
|
+
function xt(e) {
|
|
997
950
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
998
951
|
}
|
|
999
|
-
function
|
|
952
|
+
function Qe(e, t, n) {
|
|
1000
953
|
return e ? e.concat(t).map(function(s, o) {
|
|
1001
|
-
return s =
|
|
1002
|
-
}).join(
|
|
954
|
+
return s = xt(s), !n && o ? "[" + s + "]" : s;
|
|
955
|
+
}).join(n ? "." : "") : t;
|
|
1003
956
|
}
|
|
1004
|
-
function
|
|
957
|
+
function er(e) {
|
|
1005
958
|
return a.isArray(e) && !e.some(ke);
|
|
1006
959
|
}
|
|
1007
|
-
const
|
|
960
|
+
const tr = a.toFlatObject(a, {}, null, function(t) {
|
|
1008
961
|
return /^is[A-Z]/.test(t);
|
|
1009
962
|
});
|
|
1010
|
-
function ye(e, t,
|
|
963
|
+
function ye(e, t, n) {
|
|
1011
964
|
if (!a.isObject(e))
|
|
1012
965
|
throw new TypeError("target must be an object");
|
|
1013
|
-
t = t || new FormData(),
|
|
966
|
+
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
1014
967
|
metaTokens: !0,
|
|
1015
968
|
dots: !1,
|
|
1016
969
|
indexes: !1
|
|
1017
970
|
}, !1, function(R, m) {
|
|
1018
971
|
return !a.isUndefined(m[R]);
|
|
1019
972
|
});
|
|
1020
|
-
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);
|
|
1021
974
|
if (!a.isFunction(s))
|
|
1022
975
|
throw new TypeError("visitor must be a function");
|
|
1023
976
|
function l(h) {
|
|
@@ -1029,22 +982,22 @@ function ye(e, t, r) {
|
|
|
1029
982
|
return a.isArrayBuffer(h) || a.isTypedArray(h) ? d && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
1030
983
|
}
|
|
1031
984
|
function u(h, R, m) {
|
|
1032
|
-
let
|
|
985
|
+
let S = h;
|
|
1033
986
|
if (h && !m && typeof h == "object") {
|
|
1034
987
|
if (a.endsWith(R, "{}"))
|
|
1035
|
-
R =
|
|
1036
|
-
else if (a.isArray(h) &&
|
|
1037
|
-
return R =
|
|
988
|
+
R = r ? R : R.slice(0, -2), h = JSON.stringify(h);
|
|
989
|
+
else if (a.isArray(h) && er(h) || (a.isFileList(h) || a.endsWith(R, "[]")) && (S = a.toArray(h)))
|
|
990
|
+
return R = xt(R), S.forEach(function(E, O) {
|
|
1038
991
|
!(a.isUndefined(E) || E === null) && t.append(
|
|
1039
992
|
// eslint-disable-next-line no-nested-ternary
|
|
1040
|
-
i === !0 ?
|
|
993
|
+
i === !0 ? Qe([R], O, o) : i === null ? R : R + "[]",
|
|
1041
994
|
l(E)
|
|
1042
995
|
);
|
|
1043
996
|
}), !1;
|
|
1044
997
|
}
|
|
1045
|
-
return ke(h) ? !0 : (t.append(
|
|
998
|
+
return ke(h) ? !0 : (t.append(Qe(m, R, o), l(h)), !1);
|
|
1046
999
|
}
|
|
1047
|
-
const p = [], b = Object.assign(
|
|
1000
|
+
const p = [], b = Object.assign(tr, {
|
|
1048
1001
|
defaultVisitor: u,
|
|
1049
1002
|
convertValue: l,
|
|
1050
1003
|
isVisitable: ke
|
|
@@ -1053,14 +1006,14 @@ function ye(e, t, r) {
|
|
|
1053
1006
|
if (!a.isUndefined(h)) {
|
|
1054
1007
|
if (p.indexOf(h) !== -1)
|
|
1055
1008
|
throw Error("Circular reference detected in " + R.join("."));
|
|
1056
|
-
p.push(h), a.forEach(h, function(
|
|
1057
|
-
(!(a.isUndefined(
|
|
1009
|
+
p.push(h), a.forEach(h, function(S, A) {
|
|
1010
|
+
(!(a.isUndefined(S) || S === null) && s.call(
|
|
1058
1011
|
t,
|
|
1059
|
-
|
|
1012
|
+
S,
|
|
1060
1013
|
a.isString(A) ? A.trim() : A,
|
|
1061
1014
|
R,
|
|
1062
1015
|
b
|
|
1063
|
-
)) === !0 && T(
|
|
1016
|
+
)) === !0 && T(S, R ? R.concat(A) : [A]);
|
|
1064
1017
|
}), p.pop();
|
|
1065
1018
|
}
|
|
1066
1019
|
}
|
|
@@ -1068,7 +1021,7 @@ function ye(e, t, r) {
|
|
|
1068
1021
|
throw new TypeError("data must be an object");
|
|
1069
1022
|
return T(e), t;
|
|
1070
1023
|
}
|
|
1071
|
-
function
|
|
1024
|
+
function et(e) {
|
|
1072
1025
|
const t = {
|
|
1073
1026
|
"!": "%21",
|
|
1074
1027
|
"'": "%27",
|
|
@@ -1078,44 +1031,44 @@ function tt(e) {
|
|
|
1078
1031
|
"%20": "+",
|
|
1079
1032
|
"%00": "\0"
|
|
1080
1033
|
};
|
|
1081
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
1082
|
-
return t[
|
|
1034
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
1035
|
+
return t[r];
|
|
1083
1036
|
});
|
|
1084
1037
|
}
|
|
1085
1038
|
function Be(e, t) {
|
|
1086
1039
|
this._pairs = [], e && ye(e, this, t);
|
|
1087
1040
|
}
|
|
1088
1041
|
const Pt = Be.prototype;
|
|
1089
|
-
Pt.append = function(t,
|
|
1090
|
-
this._pairs.push([t,
|
|
1042
|
+
Pt.append = function(t, n) {
|
|
1043
|
+
this._pairs.push([t, n]);
|
|
1091
1044
|
};
|
|
1092
1045
|
Pt.toString = function(t) {
|
|
1093
|
-
const
|
|
1094
|
-
return t.call(this,
|
|
1095
|
-
} :
|
|
1046
|
+
const n = t ? function(r) {
|
|
1047
|
+
return t.call(this, r, et);
|
|
1048
|
+
} : et;
|
|
1096
1049
|
return this._pairs.map(function(s) {
|
|
1097
|
-
return
|
|
1050
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
1098
1051
|
}, "").join("&");
|
|
1099
1052
|
};
|
|
1100
|
-
function
|
|
1053
|
+
function nr(e) {
|
|
1101
1054
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1102
1055
|
}
|
|
1103
|
-
function
|
|
1056
|
+
function Nt(e, t, n) {
|
|
1104
1057
|
if (!t)
|
|
1105
1058
|
return e;
|
|
1106
|
-
const
|
|
1107
|
-
a.isFunction(
|
|
1108
|
-
serialize:
|
|
1059
|
+
const r = n && n.encode || nr;
|
|
1060
|
+
a.isFunction(n) && (n = {
|
|
1061
|
+
serialize: n
|
|
1109
1062
|
});
|
|
1110
|
-
const s =
|
|
1063
|
+
const s = n && n.serialize;
|
|
1111
1064
|
let o;
|
|
1112
|
-
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) {
|
|
1113
1066
|
const i = e.indexOf("#");
|
|
1114
1067
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
1115
1068
|
}
|
|
1116
1069
|
return e;
|
|
1117
1070
|
}
|
|
1118
|
-
class
|
|
1071
|
+
class tt {
|
|
1119
1072
|
constructor() {
|
|
1120
1073
|
this.handlers = [];
|
|
1121
1074
|
}
|
|
@@ -1127,12 +1080,12 @@ class rt {
|
|
|
1127
1080
|
*
|
|
1128
1081
|
* @return {Number} An ID used to remove interceptor later
|
|
1129
1082
|
*/
|
|
1130
|
-
use(t,
|
|
1083
|
+
use(t, n, r) {
|
|
1131
1084
|
return this.handlers.push({
|
|
1132
1085
|
fulfilled: t,
|
|
1133
|
-
rejected:
|
|
1134
|
-
synchronous:
|
|
1135
|
-
runWhen:
|
|
1086
|
+
rejected: n,
|
|
1087
|
+
synchronous: r ? r.synchronous : !1,
|
|
1088
|
+
runWhen: r ? r.runWhen : null
|
|
1136
1089
|
}), this.handlers.length - 1;
|
|
1137
1090
|
}
|
|
1138
1091
|
/**
|
|
@@ -1164,97 +1117,97 @@ class rt {
|
|
|
1164
1117
|
* @returns {void}
|
|
1165
1118
|
*/
|
|
1166
1119
|
forEach(t) {
|
|
1167
|
-
a.forEach(this.handlers, function(
|
|
1168
|
-
|
|
1120
|
+
a.forEach(this.handlers, function(r) {
|
|
1121
|
+
r !== null && t(r);
|
|
1169
1122
|
});
|
|
1170
1123
|
}
|
|
1171
1124
|
}
|
|
1172
|
-
const
|
|
1125
|
+
const Ct = {
|
|
1173
1126
|
silentJSONParsing: !0,
|
|
1174
1127
|
forcedJSONParsing: !0,
|
|
1175
1128
|
clarifyTimeoutError: !1
|
|
1176
|
-
},
|
|
1129
|
+
}, rr = typeof URLSearchParams < "u" ? URLSearchParams : Be, sr = typeof FormData < "u" ? FormData : null, or = typeof Blob < "u" ? Blob : null, ir = {
|
|
1177
1130
|
isBrowser: !0,
|
|
1178
1131
|
classes: {
|
|
1179
|
-
URLSearchParams:
|
|
1180
|
-
FormData:
|
|
1181
|
-
Blob:
|
|
1132
|
+
URLSearchParams: rr,
|
|
1133
|
+
FormData: sr,
|
|
1134
|
+
Blob: or
|
|
1182
1135
|
},
|
|
1183
1136
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1184
|
-
}, qe = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0,
|
|
1185
|
-
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({
|
|
1186
1139
|
__proto__: null,
|
|
1187
1140
|
hasBrowserEnv: qe,
|
|
1188
|
-
hasStandardBrowserEnv:
|
|
1189
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1141
|
+
hasStandardBrowserEnv: ar,
|
|
1142
|
+
hasStandardBrowserWebWorkerEnv: cr,
|
|
1190
1143
|
navigator: Fe,
|
|
1191
|
-
origin:
|
|
1144
|
+
origin: lr
|
|
1192
1145
|
}, Symbol.toStringTag, { value: "Module" })), F = {
|
|
1193
|
-
...
|
|
1194
|
-
...
|
|
1146
|
+
...ur,
|
|
1147
|
+
...ir
|
|
1195
1148
|
};
|
|
1196
|
-
function
|
|
1149
|
+
function fr(e, t) {
|
|
1197
1150
|
return ye(e, new F.classes.URLSearchParams(), Object.assign({
|
|
1198
|
-
visitor: function(
|
|
1199
|
-
return F.isNode && a.isBuffer(
|
|
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);
|
|
1200
1153
|
}
|
|
1201
1154
|
}, t));
|
|
1202
1155
|
}
|
|
1203
|
-
function
|
|
1156
|
+
function dr(e) {
|
|
1204
1157
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1205
1158
|
}
|
|
1206
|
-
function
|
|
1207
|
-
const t = {},
|
|
1208
|
-
let
|
|
1209
|
-
const s =
|
|
1159
|
+
function pr(e) {
|
|
1160
|
+
const t = {}, n = Object.keys(e);
|
|
1161
|
+
let r;
|
|
1162
|
+
const s = n.length;
|
|
1210
1163
|
let o;
|
|
1211
|
-
for (
|
|
1212
|
-
o = r
|
|
1164
|
+
for (r = 0; r < s; r++)
|
|
1165
|
+
o = n[r], t[o] = e[o];
|
|
1213
1166
|
return t;
|
|
1214
1167
|
}
|
|
1215
|
-
function
|
|
1216
|
-
function t(
|
|
1217
|
-
let i =
|
|
1168
|
+
function kt(e) {
|
|
1169
|
+
function t(n, r, s, o) {
|
|
1170
|
+
let i = n[o++];
|
|
1218
1171
|
if (i === "__proto__") return !0;
|
|
1219
|
-
const c = Number.isFinite(+i), d = o >=
|
|
1220
|
-
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);
|
|
1221
1174
|
}
|
|
1222
1175
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
1223
|
-
const
|
|
1224
|
-
return a.forEachEntry(e, (
|
|
1225
|
-
t(
|
|
1226
|
-
}),
|
|
1176
|
+
const n = {};
|
|
1177
|
+
return a.forEachEntry(e, (r, s) => {
|
|
1178
|
+
t(dr(r), s, n, 0);
|
|
1179
|
+
}), n;
|
|
1227
1180
|
}
|
|
1228
1181
|
return null;
|
|
1229
1182
|
}
|
|
1230
|
-
function
|
|
1183
|
+
function hr(e, t, n) {
|
|
1231
1184
|
if (a.isString(e))
|
|
1232
1185
|
try {
|
|
1233
1186
|
return (t || JSON.parse)(e), a.trim(e);
|
|
1234
|
-
} catch (
|
|
1235
|
-
if (
|
|
1236
|
-
throw
|
|
1187
|
+
} catch (r) {
|
|
1188
|
+
if (r.name !== "SyntaxError")
|
|
1189
|
+
throw r;
|
|
1237
1190
|
}
|
|
1238
|
-
return (
|
|
1191
|
+
return (n || JSON.stringify)(e);
|
|
1239
1192
|
}
|
|
1240
|
-
const
|
|
1241
|
-
transitional:
|
|
1193
|
+
const ae = {
|
|
1194
|
+
transitional: Ct,
|
|
1242
1195
|
adapter: ["xhr", "http", "fetch"],
|
|
1243
|
-
transformRequest: [function(t,
|
|
1244
|
-
const
|
|
1196
|
+
transformRequest: [function(t, n) {
|
|
1197
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
1245
1198
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
1246
|
-
return s ? JSON.stringify(
|
|
1199
|
+
return s ? JSON.stringify(kt(t)) : t;
|
|
1247
1200
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
1248
1201
|
return t;
|
|
1249
1202
|
if (a.isArrayBufferView(t))
|
|
1250
1203
|
return t.buffer;
|
|
1251
1204
|
if (a.isURLSearchParams(t))
|
|
1252
|
-
return
|
|
1205
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1253
1206
|
let c;
|
|
1254
1207
|
if (o) {
|
|
1255
|
-
if (
|
|
1256
|
-
return
|
|
1257
|
-
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) {
|
|
1258
1211
|
const d = this.env && this.env.FormData;
|
|
1259
1212
|
return ye(
|
|
1260
1213
|
c ? { "files[]": t } : t,
|
|
@@ -1263,14 +1216,14 @@ const ce = {
|
|
|
1263
1216
|
);
|
|
1264
1217
|
}
|
|
1265
1218
|
}
|
|
1266
|
-
return o || s ? (
|
|
1219
|
+
return o || s ? (n.setContentType("application/json", !1), hr(t)) : t;
|
|
1267
1220
|
}],
|
|
1268
1221
|
transformResponse: [function(t) {
|
|
1269
|
-
const
|
|
1222
|
+
const n = this.transitional || ae.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
1270
1223
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
1271
1224
|
return t;
|
|
1272
|
-
if (t && a.isString(t) && (
|
|
1273
|
-
const i = !(
|
|
1225
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
1226
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
1274
1227
|
try {
|
|
1275
1228
|
return JSON.parse(t);
|
|
1276
1229
|
} catch (c) {
|
|
@@ -1304,9 +1257,9 @@ const ce = {
|
|
|
1304
1257
|
}
|
|
1305
1258
|
};
|
|
1306
1259
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1307
|
-
|
|
1260
|
+
ae.headers[e] = {};
|
|
1308
1261
|
});
|
|
1309
|
-
const
|
|
1262
|
+
const mr = a.toObjectSet([
|
|
1310
1263
|
"age",
|
|
1311
1264
|
"authorization",
|
|
1312
1265
|
"content-length",
|
|
@@ -1324,70 +1277,70 @@ const hn = a.toObjectSet([
|
|
|
1324
1277
|
"referer",
|
|
1325
1278
|
"retry-after",
|
|
1326
1279
|
"user-agent"
|
|
1327
|
-
]),
|
|
1280
|
+
]), Rr = (e) => {
|
|
1328
1281
|
const t = {};
|
|
1329
|
-
let
|
|
1282
|
+
let n, r, s;
|
|
1330
1283
|
return e && e.split(`
|
|
1331
1284
|
`).forEach(function(i) {
|
|
1332
|
-
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);
|
|
1333
1286
|
}), t;
|
|
1334
1287
|
}, nt = Symbol("internals");
|
|
1335
|
-
function
|
|
1288
|
+
function ee(e) {
|
|
1336
1289
|
return e && String(e).trim().toLowerCase();
|
|
1337
1290
|
}
|
|
1338
|
-
function
|
|
1339
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
1291
|
+
function ue(e) {
|
|
1292
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ue) : String(e);
|
|
1340
1293
|
}
|
|
1341
|
-
function
|
|
1342
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
1343
|
-
let
|
|
1344
|
-
for (;
|
|
1345
|
-
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];
|
|
1346
1299
|
return t;
|
|
1347
1300
|
}
|
|
1348
|
-
const
|
|
1349
|
-
function xe(e, t,
|
|
1350
|
-
if (a.isFunction(
|
|
1351
|
-
return
|
|
1352
|
-
if (s && (t =
|
|
1353
|
-
if (a.isString(
|
|
1354
|
-
return t.indexOf(
|
|
1355
|
-
if (a.isRegExp(
|
|
1356
|
-
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);
|
|
1357
1310
|
}
|
|
1358
1311
|
}
|
|
1359
|
-
function
|
|
1360
|
-
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);
|
|
1361
1314
|
}
|
|
1362
|
-
function
|
|
1363
|
-
const
|
|
1364
|
-
["get", "set", "has"].forEach((
|
|
1365
|
-
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, {
|
|
1366
1319
|
value: function(s, o, i) {
|
|
1367
|
-
return this[
|
|
1320
|
+
return this[r].call(this, t, s, o, i);
|
|
1368
1321
|
},
|
|
1369
1322
|
configurable: !0
|
|
1370
1323
|
});
|
|
1371
1324
|
});
|
|
1372
1325
|
}
|
|
1373
|
-
let
|
|
1326
|
+
let L = class {
|
|
1374
1327
|
constructor(t) {
|
|
1375
1328
|
t && this.set(t);
|
|
1376
1329
|
}
|
|
1377
|
-
set(t,
|
|
1330
|
+
set(t, n, r) {
|
|
1378
1331
|
const s = this;
|
|
1379
1332
|
function o(c, d, l) {
|
|
1380
|
-
const u =
|
|
1333
|
+
const u = ee(d);
|
|
1381
1334
|
if (!u)
|
|
1382
1335
|
throw new Error("header name must be a non-empty string");
|
|
1383
1336
|
const p = a.findKey(s, u);
|
|
1384
|
-
(!p || s[p] === void 0 || l === !0 || l === void 0 && s[p] !== !1) && (s[p || d] =
|
|
1337
|
+
(!p || s[p] === void 0 || l === !0 || l === void 0 && s[p] !== !1) && (s[p || d] = ue(c));
|
|
1385
1338
|
}
|
|
1386
1339
|
const i = (c, d) => a.forEach(c, (l, u) => o(l, u, d));
|
|
1387
1340
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
1388
|
-
i(t,
|
|
1389
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
1390
|
-
i(
|
|
1341
|
+
i(t, n);
|
|
1342
|
+
else if (a.isString(t) && (t = t.trim()) && !br(t))
|
|
1343
|
+
i(Rr(t), n);
|
|
1391
1344
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
1392
1345
|
let c = {}, d, l;
|
|
1393
1346
|
for (const u of t) {
|
|
@@ -1395,81 +1348,81 @@ let U = class {
|
|
|
1395
1348
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1396
1349
|
c[l = u[0]] = (d = c[l]) ? a.isArray(d) ? [...d, u[1]] : [d, u[1]] : u[1];
|
|
1397
1350
|
}
|
|
1398
|
-
i(c,
|
|
1351
|
+
i(c, n);
|
|
1399
1352
|
} else
|
|
1400
|
-
t != null && o(
|
|
1353
|
+
t != null && o(n, t, r);
|
|
1401
1354
|
return this;
|
|
1402
1355
|
}
|
|
1403
|
-
get(t,
|
|
1404
|
-
if (t =
|
|
1405
|
-
const
|
|
1406
|
-
if (
|
|
1407
|
-
const s = this[
|
|
1408
|
-
if (!
|
|
1356
|
+
get(t, n) {
|
|
1357
|
+
if (t = ee(t), t) {
|
|
1358
|
+
const r = a.findKey(this, t);
|
|
1359
|
+
if (r) {
|
|
1360
|
+
const s = this[r];
|
|
1361
|
+
if (!n)
|
|
1409
1362
|
return s;
|
|
1410
|
-
if (
|
|
1411
|
-
return
|
|
1412
|
-
if (a.isFunction(
|
|
1413
|
-
return
|
|
1414
|
-
if (a.isRegExp(
|
|
1415
|
-
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);
|
|
1416
1369
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1417
1370
|
}
|
|
1418
1371
|
}
|
|
1419
1372
|
}
|
|
1420
|
-
has(t,
|
|
1421
|
-
if (t =
|
|
1422
|
-
const
|
|
1423
|
-
return !!(
|
|
1373
|
+
has(t, n) {
|
|
1374
|
+
if (t = ee(t), t) {
|
|
1375
|
+
const r = a.findKey(this, t);
|
|
1376
|
+
return !!(r && this[r] !== void 0 && (!n || xe(this, this[r], r, n)));
|
|
1424
1377
|
}
|
|
1425
1378
|
return !1;
|
|
1426
1379
|
}
|
|
1427
|
-
delete(t,
|
|
1428
|
-
const
|
|
1380
|
+
delete(t, n) {
|
|
1381
|
+
const r = this;
|
|
1429
1382
|
let s = !1;
|
|
1430
1383
|
function o(i) {
|
|
1431
|
-
if (i =
|
|
1432
|
-
const c = a.findKey(
|
|
1433
|
-
c && (!
|
|
1384
|
+
if (i = ee(i), i) {
|
|
1385
|
+
const c = a.findKey(r, i);
|
|
1386
|
+
c && (!n || xe(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
1434
1387
|
}
|
|
1435
1388
|
}
|
|
1436
1389
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
1437
1390
|
}
|
|
1438
1391
|
clear(t) {
|
|
1439
|
-
const
|
|
1440
|
-
let
|
|
1441
|
-
for (;
|
|
1442
|
-
const o = r
|
|
1392
|
+
const n = Object.keys(this);
|
|
1393
|
+
let r = n.length, s = !1;
|
|
1394
|
+
for (; r--; ) {
|
|
1395
|
+
const o = n[r];
|
|
1443
1396
|
(!t || xe(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
1444
1397
|
}
|
|
1445
1398
|
return s;
|
|
1446
1399
|
}
|
|
1447
1400
|
normalize(t) {
|
|
1448
|
-
const
|
|
1401
|
+
const n = this, r = {};
|
|
1449
1402
|
return a.forEach(this, (s, o) => {
|
|
1450
|
-
const i = a.findKey(
|
|
1403
|
+
const i = a.findKey(r, o);
|
|
1451
1404
|
if (i) {
|
|
1452
|
-
|
|
1405
|
+
n[i] = ue(s), delete n[o];
|
|
1453
1406
|
return;
|
|
1454
1407
|
}
|
|
1455
|
-
const c = t ?
|
|
1456
|
-
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;
|
|
1457
1410
|
}), this;
|
|
1458
1411
|
}
|
|
1459
1412
|
concat(...t) {
|
|
1460
1413
|
return this.constructor.concat(this, ...t);
|
|
1461
1414
|
}
|
|
1462
1415
|
toJSON(t) {
|
|
1463
|
-
const
|
|
1464
|
-
return a.forEach(this, (
|
|
1465
|
-
|
|
1466
|
-
}),
|
|
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;
|
|
1467
1420
|
}
|
|
1468
1421
|
[Symbol.iterator]() {
|
|
1469
1422
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1470
1423
|
}
|
|
1471
1424
|
toString() {
|
|
1472
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
1425
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
1473
1426
|
`);
|
|
1474
1427
|
}
|
|
1475
1428
|
getSetCookie() {
|
|
@@ -1481,96 +1434,96 @@ let U = class {
|
|
|
1481
1434
|
static from(t) {
|
|
1482
1435
|
return t instanceof this ? t : new this(t);
|
|
1483
1436
|
}
|
|
1484
|
-
static concat(t, ...
|
|
1485
|
-
const
|
|
1486
|
-
return
|
|
1437
|
+
static concat(t, ...n) {
|
|
1438
|
+
const r = new this(t);
|
|
1439
|
+
return n.forEach((s) => r.set(s)), r;
|
|
1487
1440
|
}
|
|
1488
1441
|
static accessor(t) {
|
|
1489
|
-
const
|
|
1442
|
+
const r = (this[nt] = this[nt] = {
|
|
1490
1443
|
accessors: {}
|
|
1491
1444
|
}).accessors, s = this.prototype;
|
|
1492
1445
|
function o(i) {
|
|
1493
|
-
const c =
|
|
1494
|
-
|
|
1446
|
+
const c = ee(i);
|
|
1447
|
+
r[c] || (wr(s, i), r[c] = !0);
|
|
1495
1448
|
}
|
|
1496
1449
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1497
1450
|
}
|
|
1498
1451
|
};
|
|
1499
|
-
|
|
1500
|
-
a.reduceDescriptors(
|
|
1501
|
-
let
|
|
1452
|
+
L.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1453
|
+
a.reduceDescriptors(L.prototype, ({ value: e }, t) => {
|
|
1454
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
1502
1455
|
return {
|
|
1503
1456
|
get: () => e,
|
|
1504
|
-
set(
|
|
1505
|
-
this[
|
|
1457
|
+
set(r) {
|
|
1458
|
+
this[n] = r;
|
|
1506
1459
|
}
|
|
1507
1460
|
};
|
|
1508
1461
|
});
|
|
1509
|
-
a.freezeMethods(
|
|
1510
|
-
function
|
|
1511
|
-
const
|
|
1512
|
-
let o =
|
|
1462
|
+
a.freezeMethods(L);
|
|
1463
|
+
function Pe(e, t) {
|
|
1464
|
+
const n = this || ae, r = t || n, s = L.from(r.headers);
|
|
1465
|
+
let o = r.data;
|
|
1513
1466
|
return a.forEach(e, function(c) {
|
|
1514
|
-
o = c.call(
|
|
1467
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
1515
1468
|
}), s.normalize(), o;
|
|
1516
1469
|
}
|
|
1517
|
-
function
|
|
1470
|
+
function Ft(e) {
|
|
1518
1471
|
return !!(e && e.__CANCEL__);
|
|
1519
1472
|
}
|
|
1520
|
-
function
|
|
1521
|
-
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";
|
|
1522
1475
|
}
|
|
1523
|
-
a.inherits(
|
|
1476
|
+
a.inherits(X, y, {
|
|
1524
1477
|
__CANCEL__: !0
|
|
1525
1478
|
});
|
|
1526
|
-
function
|
|
1527
|
-
const
|
|
1528
|
-
!
|
|
1529
|
-
"Request failed with status code " +
|
|
1530
|
-
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
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
|
|
1534
1487
|
));
|
|
1535
1488
|
}
|
|
1536
|
-
function
|
|
1489
|
+
function Tr(e) {
|
|
1537
1490
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1538
1491
|
return t && t[1] || "";
|
|
1539
1492
|
}
|
|
1540
|
-
function
|
|
1493
|
+
function gr(e, t) {
|
|
1541
1494
|
e = e || 10;
|
|
1542
|
-
const
|
|
1495
|
+
const n = new Array(e), r = new Array(e);
|
|
1543
1496
|
let s = 0, o = 0, i;
|
|
1544
1497
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1545
|
-
const l = Date.now(), u =
|
|
1546
|
-
i || (i = l),
|
|
1498
|
+
const l = Date.now(), u = r[o];
|
|
1499
|
+
i || (i = l), n[s] = d, r[s] = l;
|
|
1547
1500
|
let p = o, b = 0;
|
|
1548
1501
|
for (; p !== s; )
|
|
1549
|
-
b +=
|
|
1502
|
+
b += n[p++], p = p % e;
|
|
1550
1503
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
1551
1504
|
return;
|
|
1552
1505
|
const T = u && l - u;
|
|
1553
1506
|
return T ? Math.round(b * 1e3 / T) : void 0;
|
|
1554
1507
|
};
|
|
1555
1508
|
}
|
|
1556
|
-
function
|
|
1557
|
-
let
|
|
1509
|
+
function Sr(e, t) {
|
|
1510
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
1558
1511
|
const i = (l, u = Date.now()) => {
|
|
1559
|
-
|
|
1512
|
+
n = u, s = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
|
1560
1513
|
};
|
|
1561
1514
|
return [(...l) => {
|
|
1562
|
-
const u = Date.now(), p = u -
|
|
1563
|
-
p >=
|
|
1515
|
+
const u = Date.now(), p = u - n;
|
|
1516
|
+
p >= r ? i(l, u) : (s = l, o || (o = setTimeout(() => {
|
|
1564
1517
|
o = null, i(s);
|
|
1565
|
-
},
|
|
1518
|
+
}, r - p)));
|
|
1566
1519
|
}, () => s && i(s)];
|
|
1567
1520
|
}
|
|
1568
|
-
const pe = (e, t,
|
|
1569
|
-
let
|
|
1570
|
-
const s =
|
|
1571
|
-
return
|
|
1572
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, d = i -
|
|
1573
|
-
|
|
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;
|
|
1574
1527
|
const p = {
|
|
1575
1528
|
loaded: i,
|
|
1576
1529
|
total: c,
|
|
@@ -1583,23 +1536,23 @@ const pe = (e, t, r = 3) => {
|
|
|
1583
1536
|
[t ? "download" : "upload"]: !0
|
|
1584
1537
|
};
|
|
1585
1538
|
e(p);
|
|
1586
|
-
},
|
|
1587
|
-
},
|
|
1588
|
-
const
|
|
1589
|
-
return [(
|
|
1590
|
-
lengthComputable:
|
|
1539
|
+
}, n);
|
|
1540
|
+
}, rt = (e, t) => {
|
|
1541
|
+
const n = e != null;
|
|
1542
|
+
return [(r) => t[0]({
|
|
1543
|
+
lengthComputable: n,
|
|
1591
1544
|
total: e,
|
|
1592
|
-
loaded:
|
|
1545
|
+
loaded: r
|
|
1593
1546
|
}), t[1]];
|
|
1594
|
-
},
|
|
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)))(
|
|
1595
1548
|
new URL(F.origin),
|
|
1596
1549
|
F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)
|
|
1597
|
-
) : () => !0,
|
|
1550
|
+
) : () => !0, Ar = F.hasStandardBrowserEnv ? (
|
|
1598
1551
|
// Standard browser envs support document.cookie
|
|
1599
1552
|
{
|
|
1600
|
-
write(e, t,
|
|
1553
|
+
write(e, t, n, r, s, o) {
|
|
1601
1554
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
1602
|
-
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("; ");
|
|
1603
1556
|
},
|
|
1604
1557
|
read(e) {
|
|
1605
1558
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -1621,44 +1574,44 @@ const pe = (e, t, r = 3) => {
|
|
|
1621
1574
|
}
|
|
1622
1575
|
}
|
|
1623
1576
|
);
|
|
1624
|
-
function
|
|
1577
|
+
function _r(e) {
|
|
1625
1578
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1626
1579
|
}
|
|
1627
|
-
function
|
|
1580
|
+
function xr(e, t) {
|
|
1628
1581
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1629
1582
|
}
|
|
1630
|
-
function
|
|
1631
|
-
let
|
|
1632
|
-
return e && (
|
|
1583
|
+
function jt(e, t, n) {
|
|
1584
|
+
let r = !_r(t);
|
|
1585
|
+
return e && (r || n == !1) ? xr(e, t) : t;
|
|
1633
1586
|
}
|
|
1634
|
-
const
|
|
1587
|
+
const ot = (e) => e instanceof L ? { ...e } : e;
|
|
1635
1588
|
function W(e, t) {
|
|
1636
1589
|
t = t || {};
|
|
1637
|
-
const
|
|
1638
|
-
function
|
|
1590
|
+
const n = {};
|
|
1591
|
+
function r(l, u, p, b) {
|
|
1639
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;
|
|
1640
1593
|
}
|
|
1641
1594
|
function s(l, u, p, b) {
|
|
1642
1595
|
if (a.isUndefined(u)) {
|
|
1643
1596
|
if (!a.isUndefined(l))
|
|
1644
|
-
return
|
|
1645
|
-
} else return
|
|
1597
|
+
return r(void 0, l, p, b);
|
|
1598
|
+
} else return r(l, u, p, b);
|
|
1646
1599
|
}
|
|
1647
1600
|
function o(l, u) {
|
|
1648
1601
|
if (!a.isUndefined(u))
|
|
1649
|
-
return
|
|
1602
|
+
return r(void 0, u);
|
|
1650
1603
|
}
|
|
1651
1604
|
function i(l, u) {
|
|
1652
1605
|
if (a.isUndefined(u)) {
|
|
1653
1606
|
if (!a.isUndefined(l))
|
|
1654
|
-
return
|
|
1655
|
-
} else return
|
|
1607
|
+
return r(void 0, l);
|
|
1608
|
+
} else return r(void 0, u);
|
|
1656
1609
|
}
|
|
1657
1610
|
function c(l, u, p) {
|
|
1658
1611
|
if (p in t)
|
|
1659
|
-
return
|
|
1612
|
+
return r(l, u);
|
|
1660
1613
|
if (p in e)
|
|
1661
|
-
return
|
|
1614
|
+
return r(void 0, l);
|
|
1662
1615
|
}
|
|
1663
1616
|
const d = {
|
|
1664
1617
|
url: o,
|
|
@@ -1689,22 +1642,22 @@ function W(e, t) {
|
|
|
1689
1642
|
socketPath: i,
|
|
1690
1643
|
responseEncoding: i,
|
|
1691
1644
|
validateStatus: c,
|
|
1692
|
-
headers: (l, u, p) => s(
|
|
1645
|
+
headers: (l, u, p) => s(ot(l), ot(u), p, !0)
|
|
1693
1646
|
};
|
|
1694
1647
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
1695
1648
|
const p = d[u] || s, b = p(e[u], t[u], u);
|
|
1696
|
-
a.isUndefined(b) && p !== c || (
|
|
1697
|
-
}),
|
|
1649
|
+
a.isUndefined(b) && p !== c || (n[u] = b);
|
|
1650
|
+
}), n;
|
|
1698
1651
|
}
|
|
1699
|
-
const
|
|
1652
|
+
const Lt = (e) => {
|
|
1700
1653
|
const t = W({}, e);
|
|
1701
|
-
let { data:
|
|
1702
|
-
t.headers = i =
|
|
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(
|
|
1703
1656
|
"Authorization",
|
|
1704
1657
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1705
1658
|
);
|
|
1706
1659
|
let d;
|
|
1707
|
-
if (a.isFormData(
|
|
1660
|
+
if (a.isFormData(n)) {
|
|
1708
1661
|
if (F.hasStandardBrowserEnv || F.hasStandardBrowserWebWorkerEnv)
|
|
1709
1662
|
i.setContentType(void 0);
|
|
1710
1663
|
else if ((d = i.getContentType()) !== !1) {
|
|
@@ -1712,28 +1665,28 @@ const Ut = (e) => {
|
|
|
1712
1665
|
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1713
1666
|
}
|
|
1714
1667
|
}
|
|
1715
|
-
if (F.hasStandardBrowserEnv && (
|
|
1716
|
-
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);
|
|
1717
1670
|
l && i.set(s, l);
|
|
1718
1671
|
}
|
|
1719
1672
|
return t;
|
|
1720
|
-
},
|
|
1721
|
-
return new Promise(function(
|
|
1722
|
-
const s =
|
|
1673
|
+
}, Pr = typeof XMLHttpRequest < "u", Nr = Pr && function(e) {
|
|
1674
|
+
return new Promise(function(n, r) {
|
|
1675
|
+
const s = Lt(e);
|
|
1723
1676
|
let o = s.data;
|
|
1724
|
-
const i =
|
|
1677
|
+
const i = L.from(s.headers).normalize();
|
|
1725
1678
|
let { responseType: c, onUploadProgress: d, onDownloadProgress: l } = s, u, p, b, T, h;
|
|
1726
1679
|
function R() {
|
|
1727
1680
|
T && T(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1728
1681
|
}
|
|
1729
1682
|
let m = new XMLHttpRequest();
|
|
1730
1683
|
m.open(s.method.toUpperCase(), s.url, !0), m.timeout = s.timeout;
|
|
1731
|
-
function
|
|
1684
|
+
function S() {
|
|
1732
1685
|
if (!m)
|
|
1733
1686
|
return;
|
|
1734
|
-
const E =
|
|
1687
|
+
const E = L.from(
|
|
1735
1688
|
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1736
|
-
),
|
|
1689
|
+
), g = {
|
|
1737
1690
|
data: !c || c === "text" || c === "json" ? m.responseText : m.response,
|
|
1738
1691
|
status: m.status,
|
|
1739
1692
|
statusText: m.statusText,
|
|
@@ -1741,48 +1694,48 @@ const Ut = (e) => {
|
|
|
1741
1694
|
config: e,
|
|
1742
1695
|
request: m
|
|
1743
1696
|
};
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
}, function(
|
|
1747
|
-
|
|
1748
|
-
},
|
|
1697
|
+
vt(function(N) {
|
|
1698
|
+
n(N), R();
|
|
1699
|
+
}, function(N) {
|
|
1700
|
+
r(N), R();
|
|
1701
|
+
}, g), m = null;
|
|
1749
1702
|
}
|
|
1750
|
-
"onloadend" in m ? m.onloadend =
|
|
1751
|
-
!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);
|
|
1752
1705
|
}, m.onabort = function() {
|
|
1753
|
-
m && (
|
|
1706
|
+
m && (r(new y("Request aborted", y.ECONNABORTED, e, m)), m = null);
|
|
1754
1707
|
}, m.onerror = function() {
|
|
1755
|
-
|
|
1708
|
+
r(new y("Network Error", y.ERR_NETWORK, e, m)), m = null;
|
|
1756
1709
|
}, m.ontimeout = function() {
|
|
1757
1710
|
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1758
|
-
const
|
|
1759
|
-
s.timeoutErrorMessage && (O = s.timeoutErrorMessage),
|
|
1711
|
+
const g = s.transitional || Ct;
|
|
1712
|
+
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new y(
|
|
1760
1713
|
O,
|
|
1761
|
-
|
|
1714
|
+
g.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1762
1715
|
e,
|
|
1763
1716
|
m
|
|
1764
1717
|
)), m = null;
|
|
1765
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(O,
|
|
1766
|
-
m.setRequestHeader(
|
|
1718
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && a.forEach(i.toJSON(), function(O, g) {
|
|
1719
|
+
m.setRequestHeader(g, O);
|
|
1767
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) => {
|
|
1768
|
-
m && (
|
|
1721
|
+
m && (r(!E || E.type ? new X(null, e, m) : E), m.abort(), m = null);
|
|
1769
1722
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1770
|
-
const A =
|
|
1723
|
+
const A = Tr(s.url);
|
|
1771
1724
|
if (A && F.protocols.indexOf(A) === -1) {
|
|
1772
|
-
|
|
1725
|
+
r(new y("Unsupported protocol " + A + ":", y.ERR_BAD_REQUEST, e));
|
|
1773
1726
|
return;
|
|
1774
1727
|
}
|
|
1775
1728
|
m.send(o || null);
|
|
1776
1729
|
});
|
|
1777
|
-
},
|
|
1778
|
-
const { length:
|
|
1779
|
-
if (t ||
|
|
1780
|
-
let
|
|
1730
|
+
}, Cr = (e, t) => {
|
|
1731
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1732
|
+
if (t || n) {
|
|
1733
|
+
let r = new AbortController(), s;
|
|
1781
1734
|
const o = function(l) {
|
|
1782
1735
|
if (!s) {
|
|
1783
1736
|
s = !0, c();
|
|
1784
1737
|
const u = l instanceof Error ? l : this.reason;
|
|
1785
|
-
|
|
1738
|
+
r.abort(u instanceof y ? u : new X(u instanceof Error ? u.message : u));
|
|
1786
1739
|
}
|
|
1787
1740
|
};
|
|
1788
1741
|
let i = t && setTimeout(() => {
|
|
@@ -1794,22 +1747,22 @@ const Ut = (e) => {
|
|
|
1794
1747
|
}), e = null);
|
|
1795
1748
|
};
|
|
1796
1749
|
e.forEach((l) => l.addEventListener("abort", o));
|
|
1797
|
-
const { signal: d } =
|
|
1750
|
+
const { signal: d } = r;
|
|
1798
1751
|
return d.unsubscribe = () => a.asap(c), d;
|
|
1799
1752
|
}
|
|
1800
|
-
},
|
|
1801
|
-
let
|
|
1802
|
-
if (
|
|
1753
|
+
}, kr = function* (e, t) {
|
|
1754
|
+
let n = e.byteLength;
|
|
1755
|
+
if (n < t) {
|
|
1803
1756
|
yield e;
|
|
1804
1757
|
return;
|
|
1805
1758
|
}
|
|
1806
|
-
let
|
|
1807
|
-
for (;
|
|
1808
|
-
s =
|
|
1809
|
-
},
|
|
1810
|
-
for await (const
|
|
1811
|
-
yield*
|
|
1812
|
-
},
|
|
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) {
|
|
1813
1766
|
if (e[Symbol.asyncIterator]) {
|
|
1814
1767
|
yield* e;
|
|
1815
1768
|
return;
|
|
@@ -1817,18 +1770,18 @@ const Ut = (e) => {
|
|
|
1817
1770
|
const t = e.getReader();
|
|
1818
1771
|
try {
|
|
1819
1772
|
for (; ; ) {
|
|
1820
|
-
const { done:
|
|
1821
|
-
if (
|
|
1773
|
+
const { done: n, value: r } = await t.read();
|
|
1774
|
+
if (n)
|
|
1822
1775
|
break;
|
|
1823
|
-
yield
|
|
1776
|
+
yield r;
|
|
1824
1777
|
}
|
|
1825
1778
|
} finally {
|
|
1826
1779
|
await t.cancel();
|
|
1827
1780
|
}
|
|
1828
|
-
},
|
|
1829
|
-
const s =
|
|
1781
|
+
}, it = (e, t, n, r) => {
|
|
1782
|
+
const s = Fr(e, t);
|
|
1830
1783
|
let o = 0, i, c = (d) => {
|
|
1831
|
-
i || (i = !0,
|
|
1784
|
+
i || (i = !0, r && r(d));
|
|
1832
1785
|
};
|
|
1833
1786
|
return new ReadableStream({
|
|
1834
1787
|
async pull(d) {
|
|
@@ -1839,9 +1792,9 @@ const Ut = (e) => {
|
|
|
1839
1792
|
return;
|
|
1840
1793
|
}
|
|
1841
1794
|
let p = u.byteLength;
|
|
1842
|
-
if (
|
|
1795
|
+
if (n) {
|
|
1843
1796
|
let b = o += p;
|
|
1844
|
-
|
|
1797
|
+
n(b);
|
|
1845
1798
|
}
|
|
1846
1799
|
d.enqueue(new Uint8Array(u));
|
|
1847
1800
|
} catch (l) {
|
|
@@ -1854,13 +1807,13 @@ const Ut = (e) => {
|
|
|
1854
1807
|
}, {
|
|
1855
1808
|
highWaterMark: 2
|
|
1856
1809
|
});
|
|
1857
|
-
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1810
|
+
}, we = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ut = we && typeof ReadableStream == "function", jr = we && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Dt = (e, ...t) => {
|
|
1858
1811
|
try {
|
|
1859
1812
|
return !!e(...t);
|
|
1860
1813
|
} catch {
|
|
1861
1814
|
return !1;
|
|
1862
1815
|
}
|
|
1863
|
-
},
|
|
1816
|
+
}, Lr = Ut && Dt(() => {
|
|
1864
1817
|
let e = !1;
|
|
1865
1818
|
const t = new Request(F.origin, {
|
|
1866
1819
|
body: new ReadableStream(),
|
|
@@ -1870,17 +1823,17 @@ const Ut = (e) => {
|
|
|
1870
1823
|
}
|
|
1871
1824
|
}).headers.has("Content-Type");
|
|
1872
1825
|
return e && !t;
|
|
1873
|
-
}),
|
|
1826
|
+
}), at = 64 * 1024, ve = Ut && Dt(() => a.isReadableStream(new Response("").body)), he = {
|
|
1874
1827
|
stream: ve && ((e) => e.body)
|
|
1875
1828
|
};
|
|
1876
1829
|
we && ((e) => {
|
|
1877
1830
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1878
|
-
!he[t] && (he[t] = a.isFunction(e[t]) ? (
|
|
1879
|
-
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);
|
|
1880
1833
|
});
|
|
1881
1834
|
});
|
|
1882
1835
|
})(new Response());
|
|
1883
|
-
const
|
|
1836
|
+
const Ur = async (e) => {
|
|
1884
1837
|
if (e == null)
|
|
1885
1838
|
return 0;
|
|
1886
1839
|
if (a.isBlob(e))
|
|
@@ -1893,15 +1846,15 @@ const Ln = async (e) => {
|
|
|
1893
1846
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1894
1847
|
return e.byteLength;
|
|
1895
1848
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1896
|
-
return (await
|
|
1897
|
-
},
|
|
1898
|
-
const
|
|
1899
|
-
return
|
|
1900
|
-
},
|
|
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) => {
|
|
1901
1854
|
let {
|
|
1902
1855
|
url: t,
|
|
1903
|
-
method:
|
|
1904
|
-
data:
|
|
1856
|
+
method: n,
|
|
1857
|
+
data: r,
|
|
1905
1858
|
signal: s,
|
|
1906
1859
|
cancelToken: o,
|
|
1907
1860
|
timeout: i,
|
|
@@ -1911,81 +1864,81 @@ const Ln = async (e) => {
|
|
|
1911
1864
|
headers: u,
|
|
1912
1865
|
withCredentials: p = "same-origin",
|
|
1913
1866
|
fetchOptions: b
|
|
1914
|
-
} =
|
|
1867
|
+
} = Lt(e);
|
|
1915
1868
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1916
|
-
let T =
|
|
1869
|
+
let T = Cr([s, o && o.toAbortSignal()], i), h;
|
|
1917
1870
|
const R = T && T.unsubscribe && (() => {
|
|
1918
1871
|
T.unsubscribe();
|
|
1919
1872
|
});
|
|
1920
1873
|
let m;
|
|
1921
1874
|
try {
|
|
1922
|
-
if (d &&
|
|
1923
|
-
let
|
|
1875
|
+
if (d && Lr && n !== "get" && n !== "head" && (m = await Dr(u, r)) !== 0) {
|
|
1876
|
+
let g = new Request(t, {
|
|
1924
1877
|
method: "POST",
|
|
1925
|
-
body:
|
|
1878
|
+
body: r,
|
|
1926
1879
|
duplex: "half"
|
|
1927
|
-
}),
|
|
1928
|
-
if (a.isFormData(
|
|
1929
|
-
const [
|
|
1880
|
+
}), P;
|
|
1881
|
+
if (a.isFormData(r) && (P = g.headers.get("content-type")) && u.setContentType(P), g.body) {
|
|
1882
|
+
const [N, B] = rt(
|
|
1930
1883
|
m,
|
|
1931
|
-
pe(
|
|
1884
|
+
pe(st(d))
|
|
1932
1885
|
);
|
|
1933
|
-
|
|
1886
|
+
r = it(g.body, at, N, B);
|
|
1934
1887
|
}
|
|
1935
1888
|
}
|
|
1936
1889
|
a.isString(p) || (p = p ? "include" : "omit");
|
|
1937
|
-
const
|
|
1890
|
+
const S = "credentials" in Request.prototype;
|
|
1938
1891
|
h = new Request(t, {
|
|
1939
1892
|
...b,
|
|
1940
1893
|
signal: T,
|
|
1941
|
-
method:
|
|
1894
|
+
method: n.toUpperCase(),
|
|
1942
1895
|
headers: u.normalize().toJSON(),
|
|
1943
|
-
body:
|
|
1896
|
+
body: r,
|
|
1944
1897
|
duplex: "half",
|
|
1945
|
-
credentials:
|
|
1898
|
+
credentials: S ? p : void 0
|
|
1946
1899
|
});
|
|
1947
1900
|
let A = await fetch(h);
|
|
1948
1901
|
const E = ve && (l === "stream" || l === "response");
|
|
1949
1902
|
if (ve && (c || E && R)) {
|
|
1950
|
-
const
|
|
1903
|
+
const g = {};
|
|
1951
1904
|
["status", "statusText", "headers"].forEach((v) => {
|
|
1952
|
-
|
|
1905
|
+
g[v] = A[v];
|
|
1953
1906
|
});
|
|
1954
|
-
const
|
|
1955
|
-
|
|
1956
|
-
pe(
|
|
1907
|
+
const P = a.toFiniteNumber(A.headers.get("content-length")), [N, B] = c && rt(
|
|
1908
|
+
P,
|
|
1909
|
+
pe(st(c), !0)
|
|
1957
1910
|
) || [];
|
|
1958
1911
|
A = new Response(
|
|
1959
|
-
|
|
1912
|
+
it(A.body, at, N, () => {
|
|
1960
1913
|
B && B(), R && R();
|
|
1961
1914
|
}),
|
|
1962
|
-
|
|
1915
|
+
g
|
|
1963
1916
|
);
|
|
1964
1917
|
}
|
|
1965
1918
|
l = l || "text";
|
|
1966
1919
|
let O = await he[a.findKey(he, l) || "text"](A, e);
|
|
1967
|
-
return !E && R && R(), await new Promise((
|
|
1968
|
-
|
|
1920
|
+
return !E && R && R(), await new Promise((g, P) => {
|
|
1921
|
+
vt(g, P, {
|
|
1969
1922
|
data: O,
|
|
1970
|
-
headers:
|
|
1923
|
+
headers: L.from(A.headers),
|
|
1971
1924
|
status: A.status,
|
|
1972
1925
|
statusText: A.statusText,
|
|
1973
1926
|
config: e,
|
|
1974
1927
|
request: h
|
|
1975
1928
|
});
|
|
1976
1929
|
});
|
|
1977
|
-
} catch (
|
|
1978
|
-
throw R && R(),
|
|
1930
|
+
} catch (S) {
|
|
1931
|
+
throw R && R(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
|
|
1979
1932
|
new y("Network Error", y.ERR_NETWORK, e, h),
|
|
1980
1933
|
{
|
|
1981
|
-
cause:
|
|
1934
|
+
cause: S.cause || S
|
|
1982
1935
|
}
|
|
1983
|
-
) : y.from(
|
|
1936
|
+
) : y.from(S, S && S.code, e, h);
|
|
1984
1937
|
}
|
|
1985
1938
|
}), je = {
|
|
1986
|
-
http:
|
|
1987
|
-
xhr:
|
|
1988
|
-
fetch:
|
|
1939
|
+
http: Qn,
|
|
1940
|
+
xhr: Nr,
|
|
1941
|
+
fetch: Br
|
|
1989
1942
|
};
|
|
1990
1943
|
a.forEach(je, (e, t) => {
|
|
1991
1944
|
if (e) {
|
|
@@ -1996,113 +1949,113 @@ a.forEach(je, (e, t) => {
|
|
|
1996
1949
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1997
1950
|
}
|
|
1998
1951
|
});
|
|
1999
|
-
const
|
|
1952
|
+
const ct = (e) => `- ${e}`, qr = (e) => a.isFunction(e) || e === null || e === !1, Bt = {
|
|
2000
1953
|
getAdapter: (e) => {
|
|
2001
1954
|
e = a.isArray(e) ? e : [e];
|
|
2002
1955
|
const { length: t } = e;
|
|
2003
|
-
let
|
|
1956
|
+
let n, r;
|
|
2004
1957
|
const s = {};
|
|
2005
1958
|
for (let o = 0; o < t; o++) {
|
|
2006
|
-
|
|
1959
|
+
n = e[o];
|
|
2007
1960
|
let i;
|
|
2008
|
-
if (
|
|
1961
|
+
if (r = n, !qr(n) && (r = je[(i = String(n)).toLowerCase()], r === void 0))
|
|
2009
1962
|
throw new y(`Unknown adapter '${i}'`);
|
|
2010
|
-
if (
|
|
1963
|
+
if (r)
|
|
2011
1964
|
break;
|
|
2012
|
-
s[i || "#" + o] =
|
|
1965
|
+
s[i || "#" + o] = r;
|
|
2013
1966
|
}
|
|
2014
|
-
if (!
|
|
1967
|
+
if (!r) {
|
|
2015
1968
|
const o = Object.entries(s).map(
|
|
2016
1969
|
([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2017
1970
|
);
|
|
2018
1971
|
let i = t ? o.length > 1 ? `since :
|
|
2019
|
-
` + o.map(
|
|
2020
|
-
`) : " " +
|
|
1972
|
+
` + o.map(ct).join(`
|
|
1973
|
+
`) : " " + ct(o[0]) : "as no adapter specified";
|
|
2021
1974
|
throw new y(
|
|
2022
1975
|
"There is no suitable adapter to dispatch the request " + i,
|
|
2023
1976
|
"ERR_NOT_SUPPORT"
|
|
2024
1977
|
);
|
|
2025
1978
|
}
|
|
2026
|
-
return
|
|
1979
|
+
return r;
|
|
2027
1980
|
},
|
|
2028
1981
|
adapters: je
|
|
2029
1982
|
};
|
|
2030
|
-
function
|
|
1983
|
+
function Ne(e) {
|
|
2031
1984
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2032
|
-
throw new
|
|
1985
|
+
throw new X(null, e);
|
|
2033
1986
|
}
|
|
2034
|
-
function
|
|
2035
|
-
return
|
|
1987
|
+
function lt(e) {
|
|
1988
|
+
return Ne(e), e.headers = L.from(e.headers), e.data = Pe.call(
|
|
2036
1989
|
e,
|
|
2037
1990
|
e.transformRequest
|
|
2038
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
2039
|
-
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(
|
|
2040
1993
|
e,
|
|
2041
1994
|
e.transformResponse,
|
|
2042
|
-
|
|
2043
|
-
),
|
|
2044
|
-
}, function(
|
|
2045
|
-
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(
|
|
2046
1999
|
e,
|
|
2047
2000
|
e.transformResponse,
|
|
2048
|
-
|
|
2049
|
-
),
|
|
2001
|
+
r.response
|
|
2002
|
+
), r.response.headers = L.from(r.response.headers))), Promise.reject(r);
|
|
2050
2003
|
});
|
|
2051
2004
|
}
|
|
2052
|
-
const
|
|
2005
|
+
const qt = "1.9.0", Te = {};
|
|
2053
2006
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2054
|
-
Te[e] = function(
|
|
2055
|
-
return typeof
|
|
2007
|
+
Te[e] = function(r) {
|
|
2008
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2056
2009
|
};
|
|
2057
2010
|
});
|
|
2058
|
-
const
|
|
2059
|
-
Te.transitional = function(t,
|
|
2011
|
+
const ut = {};
|
|
2012
|
+
Te.transitional = function(t, n, r) {
|
|
2060
2013
|
function s(o, i) {
|
|
2061
|
-
return "[Axios v" +
|
|
2014
|
+
return "[Axios v" + qt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
2062
2015
|
}
|
|
2063
2016
|
return (o, i, c) => {
|
|
2064
2017
|
if (t === !1)
|
|
2065
2018
|
throw new y(
|
|
2066
|
-
s(i, " has been removed" + (
|
|
2019
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
2067
2020
|
y.ERR_DEPRECATED
|
|
2068
2021
|
);
|
|
2069
|
-
return
|
|
2022
|
+
return n && !ut[i] && (ut[i] = !0, console.warn(
|
|
2070
2023
|
s(
|
|
2071
2024
|
i,
|
|
2072
|
-
" has been deprecated since v" +
|
|
2025
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
2073
2026
|
)
|
|
2074
2027
|
)), t ? t(o, i, c) : !0;
|
|
2075
2028
|
};
|
|
2076
2029
|
};
|
|
2077
2030
|
Te.spelling = function(t) {
|
|
2078
|
-
return (
|
|
2031
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
2079
2032
|
};
|
|
2080
|
-
function
|
|
2033
|
+
function Ir(e, t, n) {
|
|
2081
2034
|
if (typeof e != "object")
|
|
2082
2035
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
2083
|
-
const
|
|
2084
|
-
let s =
|
|
2036
|
+
const r = Object.keys(e);
|
|
2037
|
+
let s = r.length;
|
|
2085
2038
|
for (; s-- > 0; ) {
|
|
2086
|
-
const o =
|
|
2039
|
+
const o = r[s], i = t[o];
|
|
2087
2040
|
if (i) {
|
|
2088
2041
|
const c = e[o], d = c === void 0 || i(c, o, e);
|
|
2089
2042
|
if (d !== !0)
|
|
2090
2043
|
throw new y("option " + o + " must be " + d, y.ERR_BAD_OPTION_VALUE);
|
|
2091
2044
|
continue;
|
|
2092
2045
|
}
|
|
2093
|
-
if (
|
|
2046
|
+
if (n !== !0)
|
|
2094
2047
|
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
2095
2048
|
}
|
|
2096
2049
|
}
|
|
2097
|
-
const
|
|
2098
|
-
assertOptions:
|
|
2050
|
+
const fe = {
|
|
2051
|
+
assertOptions: Ir,
|
|
2099
2052
|
validators: Te
|
|
2100
|
-
}, I =
|
|
2053
|
+
}, I = fe.validators;
|
|
2101
2054
|
let J = class {
|
|
2102
2055
|
constructor(t) {
|
|
2103
2056
|
this.defaults = t || {}, this.interceptors = {
|
|
2104
|
-
request: new
|
|
2105
|
-
response: new
|
|
2057
|
+
request: new tt(),
|
|
2058
|
+
response: new tt()
|
|
2106
2059
|
};
|
|
2107
2060
|
}
|
|
2108
2061
|
/**
|
|
@@ -2113,53 +2066,53 @@ let J = class {
|
|
|
2113
2066
|
*
|
|
2114
2067
|
* @returns {Promise} The Promise to be fulfilled
|
|
2115
2068
|
*/
|
|
2116
|
-
async request(t,
|
|
2069
|
+
async request(t, n) {
|
|
2117
2070
|
try {
|
|
2118
|
-
return await this._request(t,
|
|
2119
|
-
} catch (
|
|
2120
|
-
if (
|
|
2071
|
+
return await this._request(t, n);
|
|
2072
|
+
} catch (r) {
|
|
2073
|
+
if (r instanceof Error) {
|
|
2121
2074
|
let s = {};
|
|
2122
2075
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2123
2076
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
2124
2077
|
try {
|
|
2125
|
-
|
|
2126
|
-
` + o) :
|
|
2078
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
2079
|
+
` + o) : r.stack = o;
|
|
2127
2080
|
} catch {
|
|
2128
2081
|
}
|
|
2129
2082
|
}
|
|
2130
|
-
throw
|
|
2083
|
+
throw r;
|
|
2131
2084
|
}
|
|
2132
2085
|
}
|
|
2133
|
-
_request(t,
|
|
2134
|
-
typeof t == "string" ? (
|
|
2135
|
-
const { transitional:
|
|
2136
|
-
|
|
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, {
|
|
2137
2090
|
silentJSONParsing: I.transitional(I.boolean),
|
|
2138
2091
|
forcedJSONParsing: I.transitional(I.boolean),
|
|
2139
2092
|
clarifyTimeoutError: I.transitional(I.boolean)
|
|
2140
|
-
}, !1), s != null && (a.isFunction(s) ?
|
|
2093
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
2141
2094
|
serialize: s
|
|
2142
|
-
} :
|
|
2095
|
+
} : fe.assertOptions(s, {
|
|
2143
2096
|
encode: I.function,
|
|
2144
2097
|
serialize: I.function
|
|
2145
|
-
}, !0)),
|
|
2098
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), fe.assertOptions(n, {
|
|
2146
2099
|
baseUrl: I.spelling("baseURL"),
|
|
2147
2100
|
withXsrfToken: I.spelling("withXSRFToken")
|
|
2148
|
-
}, !0),
|
|
2101
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2149
2102
|
let i = o && a.merge(
|
|
2150
2103
|
o.common,
|
|
2151
|
-
o[
|
|
2104
|
+
o[n.method]
|
|
2152
2105
|
);
|
|
2153
2106
|
o && a.forEach(
|
|
2154
2107
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2155
2108
|
(h) => {
|
|
2156
2109
|
delete o[h];
|
|
2157
2110
|
}
|
|
2158
|
-
),
|
|
2111
|
+
), n.headers = L.concat(i, o);
|
|
2159
2112
|
const c = [];
|
|
2160
2113
|
let d = !0;
|
|
2161
2114
|
this.interceptors.request.forEach(function(R) {
|
|
2162
|
-
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));
|
|
2163
2116
|
});
|
|
2164
2117
|
const l = [];
|
|
2165
2118
|
this.interceptors.response.forEach(function(R) {
|
|
@@ -2167,13 +2120,13 @@ let J = class {
|
|
|
2167
2120
|
});
|
|
2168
2121
|
let u, p = 0, b;
|
|
2169
2122
|
if (!d) {
|
|
2170
|
-
const h = [
|
|
2171
|
-
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; )
|
|
2172
2125
|
u = u.then(h[p++], h[p++]);
|
|
2173
2126
|
return u;
|
|
2174
2127
|
}
|
|
2175
2128
|
b = c.length;
|
|
2176
|
-
let T =
|
|
2129
|
+
let T = n;
|
|
2177
2130
|
for (p = 0; p < b; ) {
|
|
2178
2131
|
const h = c[p++], R = c[p++];
|
|
2179
2132
|
try {
|
|
@@ -2184,7 +2137,7 @@ let J = class {
|
|
|
2184
2137
|
}
|
|
2185
2138
|
}
|
|
2186
2139
|
try {
|
|
2187
|
-
u =
|
|
2140
|
+
u = lt.call(this, T);
|
|
2188
2141
|
} catch (h) {
|
|
2189
2142
|
return Promise.reject(h);
|
|
2190
2143
|
}
|
|
@@ -2194,25 +2147,25 @@ let J = class {
|
|
|
2194
2147
|
}
|
|
2195
2148
|
getUri(t) {
|
|
2196
2149
|
t = W(this.defaults, t);
|
|
2197
|
-
const
|
|
2198
|
-
return
|
|
2150
|
+
const n = jt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2151
|
+
return Nt(n, t.params, t.paramsSerializer);
|
|
2199
2152
|
}
|
|
2200
2153
|
};
|
|
2201
2154
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2202
|
-
J.prototype[t] = function(
|
|
2203
|
-
return this.request(W(
|
|
2155
|
+
J.prototype[t] = function(n, r) {
|
|
2156
|
+
return this.request(W(r || {}, {
|
|
2204
2157
|
method: t,
|
|
2205
|
-
url:
|
|
2206
|
-
data: (
|
|
2158
|
+
url: n,
|
|
2159
|
+
data: (r || {}).data
|
|
2207
2160
|
}));
|
|
2208
2161
|
};
|
|
2209
2162
|
});
|
|
2210
2163
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
2211
|
-
function r
|
|
2164
|
+
function n(r) {
|
|
2212
2165
|
return function(o, i, c) {
|
|
2213
2166
|
return this.request(W(c || {}, {
|
|
2214
2167
|
method: t,
|
|
2215
|
-
headers:
|
|
2168
|
+
headers: r ? {
|
|
2216
2169
|
"Content-Type": "multipart/form-data"
|
|
2217
2170
|
} : {},
|
|
2218
2171
|
url: o,
|
|
@@ -2220,33 +2173,33 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
2220
2173
|
}));
|
|
2221
2174
|
};
|
|
2222
2175
|
}
|
|
2223
|
-
J.prototype[t] =
|
|
2176
|
+
J.prototype[t] = n(), J.prototype[t + "Form"] = n(!0);
|
|
2224
2177
|
});
|
|
2225
|
-
let
|
|
2178
|
+
let $r = class It {
|
|
2226
2179
|
constructor(t) {
|
|
2227
2180
|
if (typeof t != "function")
|
|
2228
2181
|
throw new TypeError("executor must be a function.");
|
|
2229
|
-
let
|
|
2182
|
+
let n;
|
|
2230
2183
|
this.promise = new Promise(function(o) {
|
|
2231
|
-
|
|
2184
|
+
n = o;
|
|
2232
2185
|
});
|
|
2233
|
-
const
|
|
2186
|
+
const r = this;
|
|
2234
2187
|
this.promise.then((s) => {
|
|
2235
|
-
if (!
|
|
2236
|
-
let o =
|
|
2188
|
+
if (!r._listeners) return;
|
|
2189
|
+
let o = r._listeners.length;
|
|
2237
2190
|
for (; o-- > 0; )
|
|
2238
|
-
|
|
2239
|
-
|
|
2191
|
+
r._listeners[o](s);
|
|
2192
|
+
r._listeners = null;
|
|
2240
2193
|
}), this.promise.then = (s) => {
|
|
2241
2194
|
let o;
|
|
2242
2195
|
const i = new Promise((c) => {
|
|
2243
|
-
|
|
2196
|
+
r.subscribe(c), o = c;
|
|
2244
2197
|
}).then(s);
|
|
2245
2198
|
return i.cancel = function() {
|
|
2246
|
-
|
|
2199
|
+
r.unsubscribe(o);
|
|
2247
2200
|
}, i;
|
|
2248
2201
|
}, t(function(o, i, c) {
|
|
2249
|
-
|
|
2202
|
+
r.reason || (r.reason = new X(o, i, c), n(r.reason));
|
|
2250
2203
|
});
|
|
2251
2204
|
}
|
|
2252
2205
|
/**
|
|
@@ -2272,14 +2225,14 @@ let In = class $t {
|
|
|
2272
2225
|
unsubscribe(t) {
|
|
2273
2226
|
if (!this._listeners)
|
|
2274
2227
|
return;
|
|
2275
|
-
const
|
|
2276
|
-
|
|
2228
|
+
const n = this._listeners.indexOf(t);
|
|
2229
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2277
2230
|
}
|
|
2278
2231
|
toAbortSignal() {
|
|
2279
|
-
const t = new AbortController(),
|
|
2280
|
-
t.abort(
|
|
2232
|
+
const t = new AbortController(), n = (r) => {
|
|
2233
|
+
t.abort(r);
|
|
2281
2234
|
};
|
|
2282
|
-
return this.subscribe(
|
|
2235
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
2283
2236
|
}
|
|
2284
2237
|
/**
|
|
2285
2238
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -2288,19 +2241,19 @@ let In = class $t {
|
|
|
2288
2241
|
static source() {
|
|
2289
2242
|
let t;
|
|
2290
2243
|
return {
|
|
2291
|
-
token: new
|
|
2244
|
+
token: new It(function(s) {
|
|
2292
2245
|
t = s;
|
|
2293
2246
|
}),
|
|
2294
2247
|
cancel: t
|
|
2295
2248
|
};
|
|
2296
2249
|
}
|
|
2297
2250
|
};
|
|
2298
|
-
function
|
|
2299
|
-
return function(
|
|
2300
|
-
return e.apply(null,
|
|
2251
|
+
function Mr(e) {
|
|
2252
|
+
return function(n) {
|
|
2253
|
+
return e.apply(null, n);
|
|
2301
2254
|
};
|
|
2302
2255
|
}
|
|
2303
|
-
function
|
|
2256
|
+
function Hr(e) {
|
|
2304
2257
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
2305
2258
|
}
|
|
2306
2259
|
const Le = {
|
|
@@ -2371,60 +2324,62 @@ const Le = {
|
|
|
2371
2324
|
Object.entries(Le).forEach(([e, t]) => {
|
|
2372
2325
|
Le[t] = e;
|
|
2373
2326
|
});
|
|
2374
|
-
function
|
|
2375
|
-
const t = new J(e),
|
|
2376
|
-
return a.extend(
|
|
2377
|
-
return
|
|
2378
|
-
},
|
|
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;
|
|
2379
2332
|
}
|
|
2380
|
-
const x =
|
|
2333
|
+
const x = $t(ae);
|
|
2381
2334
|
x.Axios = J;
|
|
2382
|
-
x.CanceledError =
|
|
2383
|
-
x.CancelToken =
|
|
2384
|
-
x.isCancel =
|
|
2385
|
-
x.VERSION =
|
|
2335
|
+
x.CanceledError = X;
|
|
2336
|
+
x.CancelToken = $r;
|
|
2337
|
+
x.isCancel = Ft;
|
|
2338
|
+
x.VERSION = qt;
|
|
2386
2339
|
x.toFormData = ye;
|
|
2387
2340
|
x.AxiosError = y;
|
|
2388
2341
|
x.Cancel = x.CanceledError;
|
|
2389
2342
|
x.all = function(t) {
|
|
2390
2343
|
return Promise.all(t);
|
|
2391
2344
|
};
|
|
2392
|
-
x.spread =
|
|
2393
|
-
x.isAxiosError =
|
|
2345
|
+
x.spread = Mr;
|
|
2346
|
+
x.isAxiosError = Hr;
|
|
2394
2347
|
x.mergeConfig = W;
|
|
2395
|
-
x.AxiosHeaders =
|
|
2396
|
-
x.formToJSON = (e) =>
|
|
2397
|
-
x.getAdapter =
|
|
2348
|
+
x.AxiosHeaders = L;
|
|
2349
|
+
x.formToJSON = (e) => kt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
2350
|
+
x.getAdapter = Bt.getAdapter;
|
|
2398
2351
|
x.HttpStatusCode = Le;
|
|
2399
2352
|
x.default = x;
|
|
2400
2353
|
const {
|
|
2401
|
-
Axios:
|
|
2402
|
-
AxiosError:
|
|
2403
|
-
CanceledError:
|
|
2404
|
-
isCancel:
|
|
2354
|
+
Axios: Qr,
|
|
2355
|
+
AxiosError: es,
|
|
2356
|
+
CanceledError: ts,
|
|
2357
|
+
isCancel: ns,
|
|
2405
2358
|
CancelToken: rs,
|
|
2406
|
-
VERSION:
|
|
2407
|
-
all:
|
|
2408
|
-
Cancel:
|
|
2409
|
-
isAxiosError:
|
|
2410
|
-
spread:
|
|
2411
|
-
toFormData:
|
|
2412
|
-
AxiosHeaders:
|
|
2413
|
-
HttpStatusCode:
|
|
2414
|
-
formToJSON:
|
|
2415
|
-
getAdapter:
|
|
2416
|
-
mergeConfig:
|
|
2417
|
-
} = x,
|
|
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({
|
|
2418
2371
|
timeout: 2 * 60 * 1e3,
|
|
2419
2372
|
...e
|
|
2420
2373
|
});
|
|
2421
2374
|
export {
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
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
|
|
2430
2385
|
};
|