yxuse 3.0.33 → 3.0.36
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/lib/index.cjs2.js +11 -11
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs5.js +1 -1
- package/lib/index.cjs7.js +3 -3
- package/lib/index.cjs7.js.gz +0 -0
- package/lib/index.es2.js +597 -589
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es5.js +16 -16
- package/lib/index.es7.js +251 -245
- package/lib/index.es7.js.gz +0 -0
- package/lib/index.es8.js +7 -1
- package/package.json +1 -1
- package/types/utils/http/index.d.ts +13 -5
package/lib/index.es7.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var rt = Object.defineProperty;
|
|
2
2
|
var Ee = Object.getOwnPropertySymbols;
|
|
3
3
|
var st = Object.prototype.hasOwnProperty, ot = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var Q = (e, t, n) => t in e ? rt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n,
|
|
4
|
+
var Q = (e, t, n) => t in e ? rt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, U = (e, t) => {
|
|
5
5
|
for (var n in t || (t = {}))
|
|
6
6
|
st.call(t, n) && Q(e, n, t[n]);
|
|
7
7
|
if (Ee)
|
|
@@ -9,8 +9,8 @@ var Q = (e, t, n) => t in e ? rt(e, t, { enumerable: !0, configurable: !0, writa
|
|
|
9
9
|
ot.call(t, n) && Q(e, n, t[n]);
|
|
10
10
|
return e;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var Y = (e, t, n) => (Q(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
13
|
+
var M = (e, t, n) => new Promise((r, s) => {
|
|
14
14
|
var i = (l) => {
|
|
15
15
|
try {
|
|
16
16
|
c(n.next(l));
|
|
@@ -26,38 +26,38 @@ var j = (e, t, n) => new Promise((r, s) => {
|
|
|
26
26
|
}, c = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(i, o);
|
|
27
27
|
c((n = n.apply(e, t)).next());
|
|
28
28
|
});
|
|
29
|
-
import { ElMessage as S, ElLoading as it, ElNotification as
|
|
30
|
-
function
|
|
29
|
+
import { ElMessage as S, ElLoading as it, ElNotification as Se } from "element-plus";
|
|
30
|
+
function Ue(e, t) {
|
|
31
31
|
return function() {
|
|
32
32
|
return e.apply(t, arguments);
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
const { toString:
|
|
36
|
-
const n =
|
|
35
|
+
const { toString: _e } = Object.prototype, { getPrototypeOf: ce } = Object, ue = /* @__PURE__ */ ((e) => (t) => {
|
|
36
|
+
const n = _e.call(t);
|
|
37
37
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
38
|
-
})(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) =>
|
|
38
|
+
})(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => ue(t) === e), G = (e) => (t) => typeof t === e, { isArray: L } = Array, B = G("undefined");
|
|
39
39
|
function at(e) {
|
|
40
|
-
return e !== null && !
|
|
40
|
+
return e !== null && !B(e) && e.constructor !== null && !B(e.constructor) && N(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const Fe = A("ArrayBuffer");
|
|
43
43
|
function ct(e) {
|
|
44
44
|
let t;
|
|
45
|
-
return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
45
|
+
return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Fe(e.buffer), t;
|
|
46
46
|
}
|
|
47
|
-
const ut = G("string"), N = G("function"),
|
|
48
|
-
if (
|
|
47
|
+
const ut = G("string"), N = G("function"), Be = G("number"), le = (e) => e !== null && typeof e == "object", lt = (e) => e === !0 || e === !1, H = (e) => {
|
|
48
|
+
if (ue(e) !== "object")
|
|
49
49
|
return !1;
|
|
50
|
-
const t =
|
|
50
|
+
const t = ce(e);
|
|
51
51
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
52
|
-
}, ft = A("Date"), dt = A("File"), pt = A("Blob"), ht = A("FileList"), mt = (e) =>
|
|
52
|
+
}, ft = A("Date"), dt = A("File"), pt = A("Blob"), ht = A("FileList"), mt = (e) => le(e) && N(e.pipe), yt = (e) => {
|
|
53
53
|
const t = "[object FormData]";
|
|
54
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
54
|
+
return e && (typeof FormData == "function" && e instanceof FormData || _e.call(e) === t || N(e.toString) && e.toString() === t);
|
|
55
55
|
}, wt = A("URLSearchParams"), Et = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
56
|
-
function
|
|
56
|
+
function D(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
57
57
|
if (e === null || typeof e == "undefined")
|
|
58
58
|
return;
|
|
59
59
|
let r, s;
|
|
60
|
-
if (typeof e != "object" && (e = [e]),
|
|
60
|
+
if (typeof e != "object" && (e = [e]), L(e))
|
|
61
61
|
for (r = 0, s = e.length; r < s; r++)
|
|
62
62
|
t.call(null, e[r], r, e);
|
|
63
63
|
else {
|
|
@@ -67,7 +67,7 @@ function B(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
67
67
|
c = i[r], t.call(null, e[c], c, e);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function De(e, t) {
|
|
71
71
|
t = t.toLowerCase();
|
|
72
72
|
const n = Object.keys(e);
|
|
73
73
|
let r = n.length, s;
|
|
@@ -76,19 +76,19 @@ function ke(e, t) {
|
|
|
76
76
|
return s;
|
|
77
77
|
return null;
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
function
|
|
81
|
-
const { caseless: e } =
|
|
82
|
-
const i = e &&
|
|
83
|
-
H(t[i]) && H(r) ? t[i] =
|
|
79
|
+
const ke = typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global, Ie = (e) => !B(e) && e !== ke;
|
|
80
|
+
function re() {
|
|
81
|
+
const { caseless: e } = Ie(this) && this || {}, t = {}, n = (r, s) => {
|
|
82
|
+
const i = e && De(t, s) || s;
|
|
83
|
+
H(t[i]) && H(r) ? t[i] = re(t[i], r) : H(r) ? t[i] = re({}, r) : L(r) ? t[i] = r.slice() : t[i] = r;
|
|
84
84
|
};
|
|
85
85
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
86
|
-
arguments[r] &&
|
|
86
|
+
arguments[r] && D(arguments[r], n);
|
|
87
87
|
return t;
|
|
88
88
|
}
|
|
89
|
-
const St = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
90
|
-
n && N(s) ? e[i] =
|
|
91
|
-
}, { allOwnKeys: r }), e), bt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e),
|
|
89
|
+
const St = (e, t, n, { allOwnKeys: r } = {}) => (D(t, (s, i) => {
|
|
90
|
+
n && N(s) ? e[i] = Ue(s, n) : e[i] = s;
|
|
91
|
+
}, { allOwnKeys: r }), e), bt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Rt = (e, t, n, r) => {
|
|
92
92
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
93
93
|
value: t.prototype
|
|
94
94
|
}), n && Object.assign(e.prototype, n);
|
|
@@ -100,26 +100,26 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, i) => {
|
|
|
100
100
|
do {
|
|
101
101
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
102
102
|
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
103
|
-
e = n !== !1 &&
|
|
103
|
+
e = n !== !1 && ce(e);
|
|
104
104
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
105
105
|
return t;
|
|
106
|
-
},
|
|
106
|
+
}, gt = (e, t, n) => {
|
|
107
107
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
108
108
|
const r = e.indexOf(t, n);
|
|
109
109
|
return r !== -1 && r === n;
|
|
110
110
|
}, At = (e) => {
|
|
111
111
|
if (!e)
|
|
112
112
|
return null;
|
|
113
|
-
if (
|
|
113
|
+
if (L(e))
|
|
114
114
|
return e;
|
|
115
115
|
let t = e.length;
|
|
116
|
-
if (!
|
|
116
|
+
if (!Be(t))
|
|
117
117
|
return null;
|
|
118
118
|
const n = new Array(t);
|
|
119
119
|
for (; t-- > 0; )
|
|
120
120
|
n[t] = e[t];
|
|
121
121
|
return n;
|
|
122
|
-
}, Tt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array != "undefined" &&
|
|
122
|
+
}, Tt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array != "undefined" && ce(Uint8Array)), Nt = (e, t) => {
|
|
123
123
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
124
124
|
let s;
|
|
125
125
|
for (; (s = r.next()) && !s.done; ) {
|
|
@@ -137,13 +137,13 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, i) => {
|
|
|
137
137
|
function(n, r, s) {
|
|
138
138
|
return r.toUpperCase() + s;
|
|
139
139
|
}
|
|
140
|
-
),
|
|
140
|
+
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Lt = A("RegExp"), je = (e, t) => {
|
|
141
141
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
142
|
-
|
|
142
|
+
D(n, (s, i) => {
|
|
143
143
|
t(s, i, e) !== !1 && (r[i] = s);
|
|
144
144
|
}), Object.defineProperties(e, r);
|
|
145
145
|
}, Ut = (e) => {
|
|
146
|
-
|
|
146
|
+
je(e, (t, n) => {
|
|
147
147
|
if (N(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
148
148
|
return !1;
|
|
149
149
|
const r = e[n];
|
|
@@ -163,12 +163,12 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (B(t, (s, i) => {
|
|
|
163
163
|
n[i] = !0;
|
|
164
164
|
});
|
|
165
165
|
};
|
|
166
|
-
return
|
|
166
|
+
return L(e) ? r(e) : r(String(e).split(t)), n;
|
|
167
167
|
}, Ft = () => {
|
|
168
|
-
}, Bt = (e, t) => (e = +e, Number.isFinite(e) ? e : t),
|
|
169
|
-
DIGIT:
|
|
170
|
-
ALPHA:
|
|
171
|
-
ALPHA_DIGIT:
|
|
168
|
+
}, Bt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Z = "abcdefghijklmnopqrstuvwxyz", Re = "0123456789", Me = {
|
|
169
|
+
DIGIT: Re,
|
|
170
|
+
ALPHA: Z,
|
|
171
|
+
ALPHA_DIGIT: Z + Z.toUpperCase() + Re
|
|
172
172
|
}, Dt = (e = 16, t = Me.ALPHA_DIGIT) => {
|
|
173
173
|
let n = "";
|
|
174
174
|
const { length: r } = t;
|
|
@@ -181,15 +181,15 @@ function kt(e) {
|
|
|
181
181
|
}
|
|
182
182
|
const It = (e) => {
|
|
183
183
|
const t = new Array(10), n = (r, s) => {
|
|
184
|
-
if (
|
|
184
|
+
if (le(r)) {
|
|
185
185
|
if (t.indexOf(r) >= 0)
|
|
186
186
|
return;
|
|
187
187
|
if (!("toJSON" in r)) {
|
|
188
188
|
t[s] = r;
|
|
189
|
-
const i =
|
|
190
|
-
return
|
|
189
|
+
const i = L(r) ? [] : {};
|
|
190
|
+
return D(r, (o, c) => {
|
|
191
191
|
const l = n(o, s + 1);
|
|
192
|
-
!
|
|
192
|
+
!B(l) && (i[c] = l);
|
|
193
193
|
}), t[s] = void 0, i;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
@@ -197,17 +197,17 @@ const It = (e) => {
|
|
|
197
197
|
};
|
|
198
198
|
return n(e, 0);
|
|
199
199
|
}, a = {
|
|
200
|
-
isArray:
|
|
201
|
-
isArrayBuffer:
|
|
200
|
+
isArray: L,
|
|
201
|
+
isArrayBuffer: Fe,
|
|
202
202
|
isBuffer: at,
|
|
203
203
|
isFormData: yt,
|
|
204
204
|
isArrayBufferView: ct,
|
|
205
205
|
isString: ut,
|
|
206
|
-
isNumber:
|
|
206
|
+
isNumber: Be,
|
|
207
207
|
isBoolean: lt,
|
|
208
|
-
isObject:
|
|
208
|
+
isObject: le,
|
|
209
209
|
isPlainObject: H,
|
|
210
|
-
isUndefined:
|
|
210
|
+
isUndefined: B,
|
|
211
211
|
isDate: ft,
|
|
212
212
|
isFile: dt,
|
|
213
213
|
isBlob: pt,
|
|
@@ -217,32 +217,32 @@ const It = (e) => {
|
|
|
217
217
|
isURLSearchParams: wt,
|
|
218
218
|
isTypedArray: Tt,
|
|
219
219
|
isFileList: ht,
|
|
220
|
-
forEach:
|
|
221
|
-
merge:
|
|
220
|
+
forEach: D,
|
|
221
|
+
merge: re,
|
|
222
222
|
extend: St,
|
|
223
223
|
trim: Et,
|
|
224
224
|
stripBOM: bt,
|
|
225
|
-
inherits:
|
|
225
|
+
inherits: Rt,
|
|
226
226
|
toFlatObject: Ot,
|
|
227
|
-
kindOf:
|
|
227
|
+
kindOf: ue,
|
|
228
228
|
kindOfTest: A,
|
|
229
|
-
endsWith:
|
|
229
|
+
endsWith: gt,
|
|
230
230
|
toArray: At,
|
|
231
231
|
forEachEntry: Nt,
|
|
232
232
|
matchAll: Pt,
|
|
233
233
|
isHTMLForm: xt,
|
|
234
|
-
hasOwnProperty:
|
|
235
|
-
hasOwnProp:
|
|
234
|
+
hasOwnProperty: be,
|
|
235
|
+
hasOwnProp: be,
|
|
236
236
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
237
|
-
reduceDescriptors:
|
|
237
|
+
reduceDescriptors: je,
|
|
238
238
|
freezeMethods: Ut,
|
|
239
239
|
toObjectSet: _t,
|
|
240
240
|
toCamelCase: Ct,
|
|
241
241
|
noop: Ft,
|
|
242
242
|
toFiniteNumber: Bt,
|
|
243
|
-
findKey:
|
|
244
|
-
global:
|
|
245
|
-
isContextDefined:
|
|
243
|
+
findKey: De,
|
|
244
|
+
global: ke,
|
|
245
|
+
isContextDefined: Ie,
|
|
246
246
|
ALPHABET: Me,
|
|
247
247
|
generateString: Dt,
|
|
248
248
|
isSpecCompliantForm: kt,
|
|
@@ -272,7 +272,7 @@ a.inherits(m, Error, {
|
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
});
|
|
275
|
-
const
|
|
275
|
+
const He = m.prototype, qe = {};
|
|
276
276
|
[
|
|
277
277
|
"ERR_BAD_OPTION_VALUE",
|
|
278
278
|
"ERR_BAD_OPTION",
|
|
@@ -288,32 +288,32 @@ const qe = m.prototype, Je = {};
|
|
|
288
288
|
"ERR_INVALID_URL"
|
|
289
289
|
// eslint-disable-next-line func-names
|
|
290
290
|
].forEach((e) => {
|
|
291
|
-
|
|
291
|
+
qe[e] = { value: e };
|
|
292
292
|
});
|
|
293
|
-
Object.defineProperties(m,
|
|
294
|
-
Object.defineProperty(
|
|
293
|
+
Object.defineProperties(m, qe);
|
|
294
|
+
Object.defineProperty(He, "isAxiosError", { value: !0 });
|
|
295
295
|
m.from = (e, t, n, r, s, i) => {
|
|
296
|
-
const o = Object.create(
|
|
296
|
+
const o = Object.create(He);
|
|
297
297
|
return a.toFlatObject(e, o, function(l) {
|
|
298
298
|
return l !== Error.prototype;
|
|
299
299
|
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
300
300
|
};
|
|
301
301
|
const jt = null;
|
|
302
|
-
function
|
|
302
|
+
function se(e) {
|
|
303
303
|
return a.isPlainObject(e) || a.isArray(e);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function Je(e) {
|
|
306
306
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Oe(e, t, n) {
|
|
309
309
|
return e ? e.concat(t).map(function(s, i) {
|
|
310
|
-
return s =
|
|
310
|
+
return s = Je(s), !n && i ? "[" + s + "]" : s;
|
|
311
311
|
}).join(n ? "." : "") : t;
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
return a.isArray(e) && !e.some(
|
|
313
|
+
function Mt(e) {
|
|
314
|
+
return a.isArray(e) && !e.some(se);
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const Ht = a.toFlatObject(a, {}, null, function(t) {
|
|
317
317
|
return /^is[A-Z]/.test(t);
|
|
318
318
|
});
|
|
319
319
|
function $(e, t, n) {
|
|
@@ -343,21 +343,21 @@ function $(e, t, n) {
|
|
|
343
343
|
if (d && !O && typeof d == "object") {
|
|
344
344
|
if (a.endsWith(h, "{}"))
|
|
345
345
|
h = r ? h : h.slice(0, -2), d = JSON.stringify(d);
|
|
346
|
-
else if (a.isArray(d) &&
|
|
347
|
-
return h =
|
|
348
|
-
!(a.isUndefined(
|
|
346
|
+
else if (a.isArray(d) && Mt(d) || (a.isFileList(d) || a.endsWith(h, "[]")) && (b = a.toArray(d)))
|
|
347
|
+
return h = Je(h), b.forEach(function(j, nt) {
|
|
348
|
+
!(a.isUndefined(j) || j === null) && t.append(
|
|
349
349
|
// eslint-disable-next-line no-nested-ternary
|
|
350
|
-
o === !0 ?
|
|
351
|
-
u(
|
|
350
|
+
o === !0 ? Oe([h], nt, i) : o === null ? h : h + "[]",
|
|
351
|
+
u(j)
|
|
352
352
|
);
|
|
353
353
|
}), !1;
|
|
354
354
|
}
|
|
355
|
-
return
|
|
355
|
+
return se(d) ? !0 : (t.append(Oe(O, h, i), u(d)), !1);
|
|
356
356
|
}
|
|
357
|
-
const p = [], E = Object.assign(
|
|
357
|
+
const p = [], E = Object.assign(Ht, {
|
|
358
358
|
defaultVisitor: f,
|
|
359
359
|
convertValue: u,
|
|
360
|
-
isVisitable:
|
|
360
|
+
isVisitable: se
|
|
361
361
|
});
|
|
362
362
|
function y(d, h) {
|
|
363
363
|
if (!a.isUndefined(d)) {
|
|
@@ -378,7 +378,7 @@ function $(e, t, n) {
|
|
|
378
378
|
throw new TypeError("data must be an object");
|
|
379
379
|
return y(e), t;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function ge(e) {
|
|
382
382
|
const t = {
|
|
383
383
|
"!": "%21",
|
|
384
384
|
"'": "%27",
|
|
@@ -392,17 +392,17 @@ function Ae(e) {
|
|
|
392
392
|
return t[r];
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function fe(e, t) {
|
|
396
396
|
this._pairs = [], e && $(e, this, t);
|
|
397
397
|
}
|
|
398
|
-
const
|
|
399
|
-
|
|
398
|
+
const ze = fe.prototype;
|
|
399
|
+
ze.append = function(t, n) {
|
|
400
400
|
this._pairs.push([t, n]);
|
|
401
401
|
};
|
|
402
|
-
|
|
402
|
+
ze.toString = function(t) {
|
|
403
403
|
const n = t ? function(r) {
|
|
404
|
-
return t.call(this, r,
|
|
405
|
-
} :
|
|
404
|
+
return t.call(this, r, ge);
|
|
405
|
+
} : ge;
|
|
406
406
|
return this._pairs.map(function(s) {
|
|
407
407
|
return n(s[0]) + "=" + n(s[1]);
|
|
408
408
|
}, "").join("&");
|
|
@@ -410,18 +410,18 @@ Ve.toString = function(t) {
|
|
|
410
410
|
function qt(e) {
|
|
411
411
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Ve(e, t, n) {
|
|
414
414
|
if (!t)
|
|
415
415
|
return e;
|
|
416
416
|
const r = n && n.encode || qt, s = n && n.serialize;
|
|
417
417
|
let i;
|
|
418
|
-
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new
|
|
418
|
+
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new fe(t, n).toString(r), i) {
|
|
419
419
|
const o = e.indexOf("#");
|
|
420
420
|
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
421
421
|
}
|
|
422
422
|
return e;
|
|
423
423
|
}
|
|
424
|
-
class
|
|
424
|
+
class Ae {
|
|
425
425
|
constructor() {
|
|
426
426
|
this.handlers = [];
|
|
427
427
|
}
|
|
@@ -475,15 +475,15 @@ class Te {
|
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
const
|
|
478
|
+
const Ge = {
|
|
479
479
|
silentJSONParsing: !0,
|
|
480
480
|
forcedJSONParsing: !0,
|
|
481
481
|
clarifyTimeoutError: !1
|
|
482
|
-
}, Jt = typeof URLSearchParams != "undefined" ? URLSearchParams :
|
|
482
|
+
}, Jt = typeof URLSearchParams != "undefined" ? URLSearchParams : fe, zt = typeof FormData != "undefined" ? FormData : null, Vt = (() => {
|
|
483
483
|
let e;
|
|
484
484
|
return typeof navigator != "undefined" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window != "undefined" && typeof document != "undefined";
|
|
485
485
|
})(), Gt = typeof WorkerGlobalScope != "undefined" && // eslint-disable-next-line no-undef
|
|
486
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", R = {
|
|
487
487
|
isBrowser: !0,
|
|
488
488
|
classes: {
|
|
489
489
|
URLSearchParams: Jt,
|
|
@@ -495,9 +495,9 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", g
|
|
|
495
495
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
496
496
|
};
|
|
497
497
|
function $t(e, t) {
|
|
498
|
-
return $(e, new
|
|
498
|
+
return $(e, new R.classes.URLSearchParams(), Object.assign({
|
|
499
499
|
visitor: function(n, r, s, i) {
|
|
500
|
-
return
|
|
500
|
+
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
501
501
|
}
|
|
502
502
|
}, t));
|
|
503
503
|
}
|
|
@@ -513,7 +513,7 @@ function Kt(e) {
|
|
|
513
513
|
i = n[r], t[i] = e[i];
|
|
514
514
|
return t;
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function $e(e) {
|
|
517
517
|
function t(n, r, s, i) {
|
|
518
518
|
let o = n[i++];
|
|
519
519
|
const c = Number.isFinite(+o), l = i >= n.length;
|
|
@@ -541,12 +541,12 @@ function Xt(e, t, n) {
|
|
|
541
541
|
return (n || JSON.stringify)(e);
|
|
542
542
|
}
|
|
543
543
|
const v = {
|
|
544
|
-
transitional:
|
|
544
|
+
transitional: Ge,
|
|
545
545
|
adapter: ["xhr", "http"],
|
|
546
546
|
transformRequest: [function(t, n) {
|
|
547
547
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
548
548
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
549
|
-
return s && s ? JSON.stringify(
|
|
549
|
+
return s && s ? JSON.stringify($e(t)) : t;
|
|
550
550
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
551
551
|
return t;
|
|
552
552
|
if (a.isArrayBufferView(t))
|
|
@@ -591,8 +591,8 @@ const v = {
|
|
|
591
591
|
maxContentLength: -1,
|
|
592
592
|
maxBodyLength: -1,
|
|
593
593
|
env: {
|
|
594
|
-
FormData:
|
|
595
|
-
Blob:
|
|
594
|
+
FormData: R.classes.FormData,
|
|
595
|
+
Blob: R.classes.Blob
|
|
596
596
|
},
|
|
597
597
|
validateStatus: function(t) {
|
|
598
598
|
return t >= 200 && t < 300;
|
|
@@ -609,7 +609,7 @@ a.forEach(["delete", "get", "head"], function(t) {
|
|
|
609
609
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
610
610
|
v.headers[t] = a.merge(Wt);
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const de = v, Qt = a.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -634,12 +634,12 @@ const fe = v, Qt = a.toObjectSet([
|
|
|
634
634
|
`).forEach(function(o) {
|
|
635
635
|
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Qt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
636
636
|
}), t;
|
|
637
|
-
},
|
|
638
|
-
function
|
|
637
|
+
}, Te = Symbol("internals");
|
|
638
|
+
function _(e) {
|
|
639
639
|
return e && String(e).trim().toLowerCase();
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
641
|
+
function q(e) {
|
|
642
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(q) : String(e);
|
|
643
643
|
}
|
|
644
644
|
function Zt(e) {
|
|
645
645
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -651,7 +651,7 @@ function Zt(e) {
|
|
|
651
651
|
function en(e) {
|
|
652
652
|
return /^[-_a-zA-Z]+$/.test(e.trim());
|
|
653
653
|
}
|
|
654
|
-
function
|
|
654
|
+
function ee(e, t, n, r, s) {
|
|
655
655
|
if (a.isFunction(r))
|
|
656
656
|
return r.call(this, t, n);
|
|
657
657
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -682,17 +682,17 @@ class K {
|
|
|
682
682
|
set(t, n, r) {
|
|
683
683
|
const s = this;
|
|
684
684
|
function i(c, l, u) {
|
|
685
|
-
const f =
|
|
685
|
+
const f = _(l);
|
|
686
686
|
if (!f)
|
|
687
687
|
throw new Error("header name must be a non-empty string");
|
|
688
688
|
const p = a.findKey(s, f);
|
|
689
|
-
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || l] =
|
|
689
|
+
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || l] = q(c));
|
|
690
690
|
}
|
|
691
691
|
const o = (c, l) => a.forEach(c, (u, f) => i(u, f, l));
|
|
692
692
|
return a.isPlainObject(t) || t instanceof this.constructor ? o(t, n) : a.isString(t) && (t = t.trim()) && !en(t) ? o(Yt(t), n) : t != null && i(n, t, r), this;
|
|
693
693
|
}
|
|
694
694
|
get(t, n) {
|
|
695
|
-
if (t =
|
|
695
|
+
if (t = _(t), t) {
|
|
696
696
|
const r = a.findKey(this, t);
|
|
697
697
|
if (r) {
|
|
698
698
|
const s = this[r];
|
|
@@ -709,9 +709,9 @@ class K {
|
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
has(t, n) {
|
|
712
|
-
if (t =
|
|
712
|
+
if (t = _(t), t) {
|
|
713
713
|
const r = a.findKey(this, t);
|
|
714
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
714
|
+
return !!(r && this[r] !== void 0 && (!n || ee(this, this[r], r, n)));
|
|
715
715
|
}
|
|
716
716
|
return !1;
|
|
717
717
|
}
|
|
@@ -719,9 +719,9 @@ class K {
|
|
|
719
719
|
const r = this;
|
|
720
720
|
let s = !1;
|
|
721
721
|
function i(o) {
|
|
722
|
-
if (o =
|
|
722
|
+
if (o = _(o), o) {
|
|
723
723
|
const c = a.findKey(r, o);
|
|
724
|
-
c && (!n ||
|
|
724
|
+
c && (!n || ee(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
727
|
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -731,7 +731,7 @@ class K {
|
|
|
731
731
|
let r = n.length, s = !1;
|
|
732
732
|
for (; r--; ) {
|
|
733
733
|
const i = n[r];
|
|
734
|
-
(!t ||
|
|
734
|
+
(!t || ee(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
735
735
|
}
|
|
736
736
|
return s;
|
|
737
737
|
}
|
|
@@ -740,11 +740,11 @@ class K {
|
|
|
740
740
|
return a.forEach(this, (s, i) => {
|
|
741
741
|
const o = a.findKey(r, i);
|
|
742
742
|
if (o) {
|
|
743
|
-
n[o] =
|
|
743
|
+
n[o] = q(s), delete n[i];
|
|
744
744
|
return;
|
|
745
745
|
}
|
|
746
746
|
const c = t ? tn(i) : String(i).trim();
|
|
747
|
-
c !== i && delete n[i], n[c] =
|
|
747
|
+
c !== i && delete n[i], n[c] = q(s), r[c] = !0;
|
|
748
748
|
}), this;
|
|
749
749
|
}
|
|
750
750
|
concat(...t) {
|
|
@@ -774,11 +774,11 @@ class K {
|
|
|
774
774
|
return n.forEach((s) => r.set(s)), r;
|
|
775
775
|
}
|
|
776
776
|
static accessor(t) {
|
|
777
|
-
const r = (this[
|
|
777
|
+
const r = (this[Te] = this[Te] = {
|
|
778
778
|
accessors: {}
|
|
779
779
|
}).accessors, s = this.prototype;
|
|
780
780
|
function i(o) {
|
|
781
|
-
const c =
|
|
781
|
+
const c = _(o);
|
|
782
782
|
r[c] || (nn(s, o), r[c] = !0);
|
|
783
783
|
}
|
|
784
784
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
@@ -787,21 +787,21 @@ class K {
|
|
|
787
787
|
K.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
788
788
|
a.freezeMethods(K.prototype);
|
|
789
789
|
a.freezeMethods(K);
|
|
790
|
-
const
|
|
791
|
-
function
|
|
792
|
-
const n = this ||
|
|
790
|
+
const g = K;
|
|
791
|
+
function te(e, t) {
|
|
792
|
+
const n = this || de, r = t || n, s = g.from(r.headers);
|
|
793
793
|
let i = r.data;
|
|
794
794
|
return a.forEach(e, function(c) {
|
|
795
795
|
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
796
796
|
}), s.normalize(), i;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function ve(e) {
|
|
799
799
|
return !!(e && e.__CANCEL__);
|
|
800
800
|
}
|
|
801
|
-
function
|
|
801
|
+
function k(e, t, n) {
|
|
802
802
|
m.call(this, e == null ? "canceled" : e, m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
803
803
|
}
|
|
804
|
-
a.inherits(
|
|
804
|
+
a.inherits(k, m, {
|
|
805
805
|
__CANCEL__: !0
|
|
806
806
|
});
|
|
807
807
|
function rn(e, t, n) {
|
|
@@ -814,7 +814,7 @@ function rn(e, t, n) {
|
|
|
814
814
|
n
|
|
815
815
|
));
|
|
816
816
|
}
|
|
817
|
-
const sn =
|
|
817
|
+
const sn = R.isStandardBrowserEnv ? (
|
|
818
818
|
// Standard browser envs support document.cookie
|
|
819
819
|
/* @__PURE__ */ function() {
|
|
820
820
|
return {
|
|
@@ -851,10 +851,10 @@ function on(e) {
|
|
|
851
851
|
function an(e, t) {
|
|
852
852
|
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function Ke(e, t) {
|
|
855
855
|
return e && !on(t) ? an(e, t) : t;
|
|
856
856
|
}
|
|
857
|
-
const cn =
|
|
857
|
+
const cn = R.isStandardBrowserEnv ? (
|
|
858
858
|
// Standard browser envs have full support of the APIs needed to test
|
|
859
859
|
// whether the request URL is of the same origin as current location.
|
|
860
860
|
function() {
|
|
@@ -906,7 +906,7 @@ function ln(e, t) {
|
|
|
906
906
|
return y ? Math.round(E * 1e3 / y) : void 0;
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function Ne(e, t) {
|
|
910
910
|
let n = 0;
|
|
911
911
|
const r = ln(50, 250);
|
|
912
912
|
return (s) => {
|
|
@@ -927,23 +927,23 @@ function Pe(e, t) {
|
|
|
927
927
|
const fn = typeof XMLHttpRequest != "undefined", dn = fn && function(e) {
|
|
928
928
|
return new Promise(function(n, r) {
|
|
929
929
|
let s = e.data;
|
|
930
|
-
const i =
|
|
930
|
+
const i = g.from(e.headers).normalize(), o = e.responseType;
|
|
931
931
|
let c;
|
|
932
932
|
function l() {
|
|
933
933
|
e.cancelToken && e.cancelToken.unsubscribe(c), e.signal && e.signal.removeEventListener("abort", c);
|
|
934
934
|
}
|
|
935
|
-
a.isFormData(s) && (
|
|
935
|
+
a.isFormData(s) && (R.isStandardBrowserEnv || R.isStandardBrowserWebWorkerEnv) && i.setContentType(!1);
|
|
936
936
|
let u = new XMLHttpRequest();
|
|
937
937
|
if (e.auth) {
|
|
938
938
|
const y = e.auth.username || "", d = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
939
939
|
i.set("Authorization", "Basic " + btoa(y + ":" + d));
|
|
940
940
|
}
|
|
941
|
-
const f =
|
|
942
|
-
u.open(e.method.toUpperCase(),
|
|
941
|
+
const f = Ke(e.baseURL, e.url);
|
|
942
|
+
u.open(e.method.toUpperCase(), Ve(f, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
943
943
|
function p() {
|
|
944
944
|
if (!u)
|
|
945
945
|
return;
|
|
946
|
-
const y =
|
|
946
|
+
const y = g.from(
|
|
947
947
|
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
948
948
|
), h = {
|
|
949
949
|
data: !o || o === "text" || o === "json" ? u.responseText : u.response,
|
|
@@ -967,34 +967,34 @@ const fn = typeof XMLHttpRequest != "undefined", dn = fn && function(e) {
|
|
|
967
967
|
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
968
968
|
}, u.ontimeout = function() {
|
|
969
969
|
let d = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
970
|
-
const h = e.transitional ||
|
|
970
|
+
const h = e.transitional || Ge;
|
|
971
971
|
e.timeoutErrorMessage && (d = e.timeoutErrorMessage), r(new m(
|
|
972
972
|
d,
|
|
973
973
|
h.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
974
974
|
e,
|
|
975
975
|
u
|
|
976
976
|
)), u = null;
|
|
977
|
-
},
|
|
977
|
+
}, R.isStandardBrowserEnv) {
|
|
978
978
|
const y = (e.withCredentials || cn(f)) && e.xsrfCookieName && sn.read(e.xsrfCookieName);
|
|
979
979
|
y && i.set(e.xsrfHeaderName, y);
|
|
980
980
|
}
|
|
981
981
|
s === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(i.toJSON(), function(d, h) {
|
|
982
982
|
u.setRequestHeader(h, d);
|
|
983
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress",
|
|
984
|
-
u && (r(!y || y.type ? new
|
|
983
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), o && o !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ne(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ne(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (y) => {
|
|
984
|
+
u && (r(!y || y.type ? new k(null, e, u) : y), u.abort(), u = null);
|
|
985
985
|
}, e.cancelToken && e.cancelToken.subscribe(c), e.signal && (e.signal.aborted ? c() : e.signal.addEventListener("abort", c)));
|
|
986
986
|
const E = un(f);
|
|
987
|
-
if (E &&
|
|
987
|
+
if (E && R.protocols.indexOf(E) === -1) {
|
|
988
988
|
r(new m("Unsupported protocol " + E + ":", m.ERR_BAD_REQUEST, e));
|
|
989
989
|
return;
|
|
990
990
|
}
|
|
991
991
|
u.send(s || null);
|
|
992
992
|
});
|
|
993
|
-
},
|
|
993
|
+
}, J = {
|
|
994
994
|
http: jt,
|
|
995
995
|
xhr: dn
|
|
996
996
|
};
|
|
997
|
-
a.forEach(
|
|
997
|
+
a.forEach(J, (e, t) => {
|
|
998
998
|
if (e) {
|
|
999
999
|
try {
|
|
1000
1000
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1008,45 +1008,45 @@ const pn = {
|
|
|
1008
1008
|
e = a.isArray(e) ? e : [e];
|
|
1009
1009
|
const { length: t } = e;
|
|
1010
1010
|
let n, r;
|
|
1011
|
-
for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ?
|
|
1011
|
+
for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? J[n.toLowerCase()] : n)); s++)
|
|
1012
1012
|
;
|
|
1013
1013
|
if (!r)
|
|
1014
1014
|
throw r === !1 ? new m(
|
|
1015
1015
|
`Adapter ${n} is not supported by the environment`,
|
|
1016
1016
|
"ERR_NOT_SUPPORT"
|
|
1017
1017
|
) : new Error(
|
|
1018
|
-
a.hasOwnProp(
|
|
1018
|
+
a.hasOwnProp(J, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
|
|
1019
1019
|
);
|
|
1020
1020
|
if (!a.isFunction(r))
|
|
1021
1021
|
throw new TypeError("adapter is not a function");
|
|
1022
1022
|
return r;
|
|
1023
1023
|
},
|
|
1024
|
-
adapters:
|
|
1024
|
+
adapters: J
|
|
1025
1025
|
};
|
|
1026
|
-
function
|
|
1026
|
+
function ne(e) {
|
|
1027
1027
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1028
|
-
throw new
|
|
1028
|
+
throw new k(null, e);
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1031
|
-
return
|
|
1030
|
+
function Pe(e) {
|
|
1031
|
+
return ne(e), e.headers = g.from(e.headers), e.data = te.call(
|
|
1032
1032
|
e,
|
|
1033
1033
|
e.transformRequest
|
|
1034
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pn.getAdapter(e.adapter ||
|
|
1035
|
-
return
|
|
1034
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), pn.getAdapter(e.adapter || de.adapter)(e).then(function(r) {
|
|
1035
|
+
return ne(e), r.data = te.call(
|
|
1036
1036
|
e,
|
|
1037
1037
|
e.transformResponse,
|
|
1038
1038
|
r
|
|
1039
|
-
), r.headers =
|
|
1039
|
+
), r.headers = g.from(r.headers), r;
|
|
1040
1040
|
}, function(r) {
|
|
1041
|
-
return
|
|
1041
|
+
return ve(r) || (ne(e), r && r.response && (r.response.data = te.call(
|
|
1042
1042
|
e,
|
|
1043
1043
|
e.transformResponse,
|
|
1044
1044
|
r.response
|
|
1045
|
-
), r.response.headers =
|
|
1045
|
+
), r.response.headers = g.from(r.response.headers))), Promise.reject(r);
|
|
1046
1046
|
});
|
|
1047
1047
|
}
|
|
1048
|
-
const
|
|
1049
|
-
function
|
|
1048
|
+
const xe = (e) => e instanceof g ? e.toJSON() : e;
|
|
1049
|
+
function C(e, t) {
|
|
1050
1050
|
t = t || {};
|
|
1051
1051
|
const n = {};
|
|
1052
1052
|
function r(u, f, p) {
|
|
@@ -1104,23 +1104,23 @@ function x(e, t) {
|
|
|
1104
1104
|
socketPath: o,
|
|
1105
1105
|
responseEncoding: o,
|
|
1106
1106
|
validateStatus: c,
|
|
1107
|
-
headers: (u, f) => s(
|
|
1107
|
+
headers: (u, f) => s(xe(u), xe(f), !0)
|
|
1108
1108
|
};
|
|
1109
1109
|
return a.forEach(Object.keys(e).concat(Object.keys(t)), function(f) {
|
|
1110
1110
|
const p = l[f] || s, E = p(e[f], t[f], f);
|
|
1111
1111
|
a.isUndefined(E) && p !== c || (n[f] = E);
|
|
1112
1112
|
}), n;
|
|
1113
1113
|
}
|
|
1114
|
-
const
|
|
1114
|
+
const We = "1.3.3", pe = {};
|
|
1115
1115
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1116
|
-
|
|
1116
|
+
pe[e] = function(r) {
|
|
1117
1117
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1118
1118
|
};
|
|
1119
1119
|
});
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1120
|
+
const Ce = {};
|
|
1121
|
+
pe.transitional = function(t, n, r) {
|
|
1122
1122
|
function s(i, o) {
|
|
1123
|
-
return "[Axios v" +
|
|
1123
|
+
return "[Axios v" + We + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1124
1124
|
}
|
|
1125
1125
|
return (i, o, c) => {
|
|
1126
1126
|
if (t === !1)
|
|
@@ -1128,7 +1128,7 @@ de.transitional = function(t, n, r) {
|
|
|
1128
1128
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1129
1129
|
m.ERR_DEPRECATED
|
|
1130
1130
|
);
|
|
1131
|
-
return n && !
|
|
1131
|
+
return n && !Ce[o] && (Ce[o] = !0, console.warn(
|
|
1132
1132
|
s(
|
|
1133
1133
|
o,
|
|
1134
1134
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1153,15 +1153,15 @@ function hn(e, t, n) {
|
|
|
1153
1153
|
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
|
-
const
|
|
1156
|
+
const oe = {
|
|
1157
1157
|
assertOptions: hn,
|
|
1158
|
-
validators:
|
|
1159
|
-
}, T =
|
|
1160
|
-
class
|
|
1158
|
+
validators: pe
|
|
1159
|
+
}, T = oe.validators;
|
|
1160
|
+
class V {
|
|
1161
1161
|
constructor(t) {
|
|
1162
1162
|
this.defaults = t, this.interceptors = {
|
|
1163
|
-
request: new
|
|
1164
|
-
response: new
|
|
1163
|
+
request: new Ae(),
|
|
1164
|
+
response: new Ae()
|
|
1165
1165
|
};
|
|
1166
1166
|
}
|
|
1167
1167
|
/**
|
|
@@ -1173,13 +1173,13 @@ class z {
|
|
|
1173
1173
|
* @returns {Promise} The Promise to be fulfilled
|
|
1174
1174
|
*/
|
|
1175
1175
|
request(t, n) {
|
|
1176
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1176
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = C(this.defaults, n);
|
|
1177
1177
|
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1178
|
-
r !== void 0 &&
|
|
1178
|
+
r !== void 0 && oe.assertOptions(r, {
|
|
1179
1179
|
silentJSONParsing: T.transitional(T.boolean),
|
|
1180
1180
|
forcedJSONParsing: T.transitional(T.boolean),
|
|
1181
1181
|
clarifyTimeoutError: T.transitional(T.boolean)
|
|
1182
|
-
}, !1), s !== void 0 &&
|
|
1182
|
+
}, !1), s !== void 0 && oe.assertOptions(s, {
|
|
1183
1183
|
encode: T.function,
|
|
1184
1184
|
serialize: T.function
|
|
1185
1185
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1192,7 +1192,7 @@ class z {
|
|
|
1192
1192
|
(d) => {
|
|
1193
1193
|
delete i[d];
|
|
1194
1194
|
}
|
|
1195
|
-
), n.headers =
|
|
1195
|
+
), n.headers = g.concat(o, i);
|
|
1196
1196
|
const c = [];
|
|
1197
1197
|
let l = !0;
|
|
1198
1198
|
this.interceptors.request.forEach(function(h) {
|
|
@@ -1204,7 +1204,7 @@ class z {
|
|
|
1204
1204
|
});
|
|
1205
1205
|
let f, p = 0, E;
|
|
1206
1206
|
if (!l) {
|
|
1207
|
-
const d = [
|
|
1207
|
+
const d = [Pe.bind(this), void 0];
|
|
1208
1208
|
for (d.unshift.apply(d, c), d.push.apply(d, u), E = d.length, f = Promise.resolve(n); p < E; )
|
|
1209
1209
|
f = f.then(d[p++], d[p++]);
|
|
1210
1210
|
return f;
|
|
@@ -1221,7 +1221,7 @@ class z {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
1223
|
try {
|
|
1224
|
-
f =
|
|
1224
|
+
f = Pe.call(this, y);
|
|
1225
1225
|
} catch (d) {
|
|
1226
1226
|
return Promise.reject(d);
|
|
1227
1227
|
}
|
|
@@ -1230,14 +1230,14 @@ class z {
|
|
|
1230
1230
|
return f;
|
|
1231
1231
|
}
|
|
1232
1232
|
getUri(t) {
|
|
1233
|
-
t =
|
|
1234
|
-
const n =
|
|
1235
|
-
return
|
|
1233
|
+
t = C(this.defaults, t);
|
|
1234
|
+
const n = Ke(t.baseURL, t.url);
|
|
1235
|
+
return Ve(n, t.params, t.paramsSerializer);
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1239
|
-
|
|
1240
|
-
return this.request(
|
|
1239
|
+
V.prototype[t] = function(n, r) {
|
|
1240
|
+
return this.request(C(r || {}, {
|
|
1241
1241
|
method: t,
|
|
1242
1242
|
url: n,
|
|
1243
1243
|
data: (r || {}).data
|
|
@@ -1247,7 +1247,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1247
1247
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1248
1248
|
function n(r) {
|
|
1249
1249
|
return function(i, o, c) {
|
|
1250
|
-
return this.request(
|
|
1250
|
+
return this.request(C(c || {}, {
|
|
1251
1251
|
method: t,
|
|
1252
1252
|
headers: r ? {
|
|
1253
1253
|
"Content-Type": "multipart/form-data"
|
|
@@ -1257,10 +1257,10 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1257
1257
|
}));
|
|
1258
1258
|
};
|
|
1259
1259
|
}
|
|
1260
|
-
|
|
1260
|
+
V.prototype[t] = n(), V.prototype[t + "Form"] = n(!0);
|
|
1261
1261
|
});
|
|
1262
|
-
const
|
|
1263
|
-
class
|
|
1262
|
+
const z = V;
|
|
1263
|
+
class he {
|
|
1264
1264
|
constructor(t) {
|
|
1265
1265
|
if (typeof t != "function")
|
|
1266
1266
|
throw new TypeError("executor must be a function.");
|
|
@@ -1285,7 +1285,7 @@ class pe {
|
|
|
1285
1285
|
r.unsubscribe(i);
|
|
1286
1286
|
}, o;
|
|
1287
1287
|
}, t(function(i, o, c) {
|
|
1288
|
-
r.reason || (r.reason = new
|
|
1288
|
+
r.reason || (r.reason = new k(i, o, c), n(r.reason));
|
|
1289
1289
|
});
|
|
1290
1290
|
}
|
|
1291
1291
|
/**
|
|
@@ -1321,14 +1321,14 @@ class pe {
|
|
|
1321
1321
|
static source() {
|
|
1322
1322
|
let t;
|
|
1323
1323
|
return {
|
|
1324
|
-
token: new
|
|
1324
|
+
token: new he(function(s) {
|
|
1325
1325
|
t = s;
|
|
1326
1326
|
}),
|
|
1327
1327
|
cancel: t
|
|
1328
1328
|
};
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
|
-
const mn =
|
|
1331
|
+
const mn = he;
|
|
1332
1332
|
function yn(e) {
|
|
1333
1333
|
return function(n) {
|
|
1334
1334
|
return e.apply(null, n);
|
|
@@ -1337,7 +1337,7 @@ function yn(e) {
|
|
|
1337
1337
|
function wn(e) {
|
|
1338
1338
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1339
1339
|
}
|
|
1340
|
-
const
|
|
1340
|
+
const ie = {
|
|
1341
1341
|
Continue: 100,
|
|
1342
1342
|
SwitchingProtocols: 101,
|
|
1343
1343
|
Processing: 102,
|
|
@@ -1402,22 +1402,22 @@ const oe = {
|
|
|
1402
1402
|
NotExtended: 510,
|
|
1403
1403
|
NetworkAuthenticationRequired: 511
|
|
1404
1404
|
};
|
|
1405
|
-
Object.entries(
|
|
1406
|
-
|
|
1405
|
+
Object.entries(ie).forEach(([e, t]) => {
|
|
1406
|
+
ie[t] = e;
|
|
1407
1407
|
});
|
|
1408
|
-
const En =
|
|
1409
|
-
function
|
|
1410
|
-
const t = new
|
|
1411
|
-
return a.extend(n,
|
|
1412
|
-
return
|
|
1408
|
+
const En = ie;
|
|
1409
|
+
function Xe(e) {
|
|
1410
|
+
const t = new z(e), n = Ue(z.prototype.request, t);
|
|
1411
|
+
return a.extend(n, z.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1412
|
+
return Xe(C(e, s));
|
|
1413
1413
|
}, n;
|
|
1414
1414
|
}
|
|
1415
|
-
const w =
|
|
1416
|
-
w.Axios =
|
|
1417
|
-
w.CanceledError =
|
|
1415
|
+
const w = Xe(de);
|
|
1416
|
+
w.Axios = z;
|
|
1417
|
+
w.CanceledError = k;
|
|
1418
1418
|
w.CancelToken = mn;
|
|
1419
|
-
w.isCancel =
|
|
1420
|
-
w.VERSION =
|
|
1419
|
+
w.isCancel = ve;
|
|
1420
|
+
w.VERSION = We;
|
|
1421
1421
|
w.toFormData = $;
|
|
1422
1422
|
w.AxiosError = m;
|
|
1423
1423
|
w.Cancel = w.CanceledError;
|
|
@@ -1426,57 +1426,57 @@ w.all = function(t) {
|
|
|
1426
1426
|
};
|
|
1427
1427
|
w.spread = yn;
|
|
1428
1428
|
w.isAxiosError = wn;
|
|
1429
|
-
w.mergeConfig =
|
|
1430
|
-
w.AxiosHeaders =
|
|
1431
|
-
w.formToJSON = (e) =>
|
|
1429
|
+
w.mergeConfig = C;
|
|
1430
|
+
w.AxiosHeaders = g;
|
|
1431
|
+
w.formToJSON = (e) => $e(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1432
1432
|
w.HttpStatusCode = En;
|
|
1433
1433
|
w.default = w;
|
|
1434
1434
|
const Sn = {
|
|
1435
1435
|
LOGIN_URL: `${window.location.origin}/ttc/cloud/#/login`,
|
|
1436
1436
|
HOME_URL: `${window.location.origin}/ttc/cloud/#/cloud`,
|
|
1437
1437
|
INTEGRATED_BASE_URL: "/gateway/integrated-management/api/v1"
|
|
1438
|
-
},
|
|
1438
|
+
}, Qe = {
|
|
1439
1439
|
ttc: Sn
|
|
1440
|
-
}, bn = (e = "ttc") => we.get(`${
|
|
1440
|
+
}, bn = (e = "ttc") => we.get(`${Qe[e].INTEGRATED_BASE_URL}/account/auth/route/list`), Rn = (e = "ttc") => we.get(`${Qe[e].INTEGRATED_BASE_URL}/account/home/menu`), me = (e = "ttc") => {
|
|
1441
1441
|
ye({ token: "" });
|
|
1442
1442
|
}, W = (e = "ttc") => {
|
|
1443
1443
|
var s;
|
|
1444
1444
|
const t = `${e}GlobalState`, n = (s = localStorage.getItem(t)) != null ? s : "{}";
|
|
1445
1445
|
return JSON.parse(n) ? JSON.parse(n).token : null;
|
|
1446
|
-
},
|
|
1447
|
-
const i =
|
|
1446
|
+
}, Ye = (r, ...s) => M(void 0, [r, ...s], function* ({ userName: e, password: t }, n = "ttc") {
|
|
1447
|
+
const i = I("loginApiUrl"), { data: o } = yield we.post(i, { userName: e, password: t });
|
|
1448
1448
|
o.tokenValue && S.success("登录成功"), ye({ token: o.tokenValue, userInfo: o });
|
|
1449
1449
|
}), On = (e = "ttc") => {
|
|
1450
1450
|
var s;
|
|
1451
1451
|
const t = `${e}GlobalState`, n = (s = localStorage.getItem(t)) != null ? s : "{}";
|
|
1452
1452
|
return JSON.parse(n) ? JSON.parse(n).userInfo : null;
|
|
1453
|
-
},
|
|
1454
|
-
return W() ? yield
|
|
1453
|
+
}, gn = () => M(void 0, null, function* () {
|
|
1454
|
+
return W() ? yield Rn() : [];
|
|
1455
1455
|
}), X = () => {
|
|
1456
1456
|
if (et()) {
|
|
1457
|
-
|
|
1457
|
+
me();
|
|
1458
1458
|
const e = location.pathname;
|
|
1459
|
-
if (e.includes(
|
|
1459
|
+
if (console.log("跳转至登录页", e, e.includes(x())), e.includes(x()))
|
|
1460
1460
|
return;
|
|
1461
|
-
|
|
1461
|
+
console.log("跳转至登录页", x()), location.replace(x());
|
|
1462
1462
|
} else {
|
|
1463
1463
|
console.log("开发环境!!!");
|
|
1464
1464
|
const e = window.prompt("当前系统处于开发环境,当前登录过期,请输入登录账号", "");
|
|
1465
1465
|
if (e !== null) {
|
|
1466
1466
|
const t = window.prompt("请输入登录密码", "");
|
|
1467
|
-
(t === null || t == "") && window.prompt("请输入登录密码", ""),
|
|
1467
|
+
(t === null || t == "") && window.prompt("请输入登录密码", ""), Ye({ userName: e, password: t });
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
1470
|
}, An = () => {
|
|
1471
|
-
window.location.replace(
|
|
1472
|
-
},
|
|
1471
|
+
window.location.replace(Ze());
|
|
1472
|
+
}, x = () => I("loginUrl"), Ze = () => I("homeUrl"), ye = (e) => {
|
|
1473
1473
|
var r;
|
|
1474
|
-
const t = (r = localStorage.getItem("ttcGlobalState")) != null ? r : "{}", n =
|
|
1474
|
+
const t = (r = localStorage.getItem("ttcGlobalState")) != null ? r : "{}", n = U(U({}, JSON.parse(t)), e);
|
|
1475
1475
|
localStorage.setItem("ttcGlobalState", JSON.stringify(n));
|
|
1476
|
-
},
|
|
1476
|
+
}, I = (e) => {
|
|
1477
1477
|
var n, r;
|
|
1478
1478
|
return (r = JSON.parse((n = localStorage.getItem("ttcGlobalState")) != null ? n : "{}")[e]) != null ? r : "";
|
|
1479
|
-
}, et = () =>
|
|
1479
|
+
}, et = () => I("environment") === "production", Tn = (e, t = !0, n) => M(void 0, null, function* () {
|
|
1480
1480
|
if (!W() && t)
|
|
1481
1481
|
return X();
|
|
1482
1482
|
try {
|
|
@@ -1512,20 +1512,20 @@ const Sn = {
|
|
|
1512
1512
|
return JSON.parse(t).includes(e);
|
|
1513
1513
|
}, In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1514
1514
|
__proto__: null,
|
|
1515
|
-
autoLogin:
|
|
1516
|
-
getHomeUrl:
|
|
1517
|
-
getLoginUrl:
|
|
1518
|
-
getSystemConfig:
|
|
1515
|
+
autoLogin: Ye,
|
|
1516
|
+
getHomeUrl: Ze,
|
|
1517
|
+
getLoginUrl: x,
|
|
1518
|
+
getSystemConfig: I,
|
|
1519
1519
|
getToken: W,
|
|
1520
1520
|
getUserInfo: On,
|
|
1521
1521
|
getUserIsHaveBtnPower: Pn,
|
|
1522
1522
|
getUserPermissions: Tn,
|
|
1523
|
-
getUserRouteList:
|
|
1523
|
+
getUserRouteList: gn,
|
|
1524
1524
|
getUserRouter: Nn,
|
|
1525
1525
|
isProduction: et,
|
|
1526
1526
|
jumpToHome: An,
|
|
1527
1527
|
jumpToLogin: X,
|
|
1528
|
-
removeToken:
|
|
1528
|
+
removeToken: me,
|
|
1529
1529
|
setSystemConfig: ye
|
|
1530
1530
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1531
1531
|
let tt;
|
|
@@ -1539,13 +1539,13 @@ const xn = {
|
|
|
1539
1539
|
}, Ln = () => {
|
|
1540
1540
|
tt.close();
|
|
1541
1541
|
};
|
|
1542
|
-
let
|
|
1542
|
+
let F = 0;
|
|
1543
1543
|
const Un = () => {
|
|
1544
|
-
|
|
1545
|
-
},
|
|
1546
|
-
|
|
1544
|
+
F === 0 && Cn(), F++;
|
|
1545
|
+
}, Le = () => {
|
|
1546
|
+
F <= 0 || (F--, F === 0 && Ln());
|
|
1547
1547
|
};
|
|
1548
|
-
var
|
|
1548
|
+
var ae = /* @__PURE__ */ ((e) => (e[e.SUCCESS = 200] = "SUCCESS", e[e.ERROR = 500] = "ERROR", e[e.OVERDUE = 401] = "OVERDUE", e[e.TIMEOUT = 3e4] = "TIMEOUT", e))(ae || {});
|
|
1549
1549
|
const _n = {
|
|
1550
1550
|
// 默认地址请求地址,可在 .env.*** 文件中修改
|
|
1551
1551
|
// 设置超时时间(30s)
|
|
@@ -1558,7 +1558,7 @@ const _n = {
|
|
|
1558
1558
|
S.error(t || "请求失败!请您稍后重试");
|
|
1559
1559
|
break;
|
|
1560
1560
|
case 401:
|
|
1561
|
-
location.href.includes(
|
|
1561
|
+
location.href.includes(x()) || (S.error(t || "登录失效!请您重新登录"), X());
|
|
1562
1562
|
break;
|
|
1563
1563
|
case 403:
|
|
1564
1564
|
S.error(t || "当前账号无权限访问!");
|
|
@@ -1590,31 +1590,37 @@ const _n = {
|
|
|
1590
1590
|
};
|
|
1591
1591
|
class Bn {
|
|
1592
1592
|
constructor(t) {
|
|
1593
|
-
|
|
1594
|
-
|
|
1593
|
+
Y(this, "service");
|
|
1594
|
+
/** 自定义响应处理map */
|
|
1595
|
+
Y(this, "customResMap");
|
|
1596
|
+
this.service = w.create(t), this.setupInterceptors(), this.customResMap = {};
|
|
1595
1597
|
}
|
|
1596
1598
|
setupInterceptors() {
|
|
1597
1599
|
this.service.interceptors.request.use(
|
|
1598
1600
|
(t) => {
|
|
1599
1601
|
var n;
|
|
1600
|
-
return (n = t.headers) != null && n.noLoading || Un(), t.headers.token = W(), t;
|
|
1602
|
+
return (n = t.headers) != null && n.noLoading || Un(), t.headers.token = W(), t != null && t.customResHandler && (t != null && t.url) && (this.customResMap[t == null ? void 0 : t.url] = t.customResHandler), t;
|
|
1601
1603
|
},
|
|
1602
1604
|
(t) => Promise.reject(t)
|
|
1603
1605
|
), this.service.interceptors.response.use(
|
|
1604
1606
|
(t) => {
|
|
1605
|
-
const { data: n } = t;
|
|
1606
|
-
return
|
|
1607
|
+
const { data: n, config: r } = t;
|
|
1608
|
+
return Le(), r.url && this.customResMap[r.url] ? this.customResMap[r.url](n) : (n.code == ae.OVERDUE ? this.handleOverdueResponse(n) : n.code !== ae.SUCCESS && this.handleErrorResponse(n), n);
|
|
1607
1609
|
},
|
|
1608
|
-
(t) =>
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1610
|
+
(t) => {
|
|
1611
|
+
Le();
|
|
1612
|
+
const { config: n } = t;
|
|
1613
|
+
return n != null && n.url && this.customResMap[n.url] && this.customResMap[n.url](t.response), t.message.includes("timeout") ? S.error("请求超时!请稍后重试") : t.message.includes("Network Error") && S.error("网络错误!请稍后重试"), t.response && Fn(t.response.status), window.navigator.onLine || Se({
|
|
1614
|
+
title: "提示",
|
|
1615
|
+
message: "当前网络似乎开小差了",
|
|
1616
|
+
type: "warning",
|
|
1617
|
+
duration: 5e3
|
|
1618
|
+
}), Promise.reject(t);
|
|
1619
|
+
}
|
|
1614
1620
|
);
|
|
1615
1621
|
}
|
|
1616
1622
|
handleOverdueResponse(t) {
|
|
1617
|
-
return
|
|
1623
|
+
return me(), X(), Se({
|
|
1618
1624
|
title: "登录过期提醒",
|
|
1619
1625
|
message: t.resultMsg || "当前登录失效",
|
|
1620
1626
|
type: "warning",
|
|
@@ -1632,7 +1638,7 @@ class Bn {
|
|
|
1632
1638
|
* @description get 请求
|
|
1633
1639
|
*/
|
|
1634
1640
|
get(t, n, r = {}) {
|
|
1635
|
-
return this.service.get(t,
|
|
1641
|
+
return this.service.get(t, U({ params: n }, r));
|
|
1636
1642
|
}
|
|
1637
1643
|
/**
|
|
1638
1644
|
*
|
|
@@ -1660,14 +1666,14 @@ class Bn {
|
|
|
1660
1666
|
* @param options : AxiosRequestConfig
|
|
1661
1667
|
*/
|
|
1662
1668
|
delete(t, n, r = {}) {
|
|
1663
|
-
return this.service.delete(t,
|
|
1669
|
+
return this.service.delete(t, U({ params: n }, r));
|
|
1664
1670
|
}
|
|
1665
1671
|
}
|
|
1666
1672
|
const we = new Bn(_n);
|
|
1667
1673
|
export {
|
|
1668
|
-
|
|
1674
|
+
Qe as U,
|
|
1669
1675
|
Pn as a,
|
|
1670
|
-
|
|
1676
|
+
I as g,
|
|
1671
1677
|
we as h,
|
|
1672
1678
|
In as i,
|
|
1673
1679
|
ye as s
|