@vtj/utils 0.7.10 → 0.7.12
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/index.cjs +7 -7
- package/dist/index.iife.js +18 -18
- package/dist/index.mjs +360 -286
- package/dist/index.umd.js +18 -18
- package/package.json +4 -4
- package/types/index.d.ts +1 -0
- package/types/logger.d.ts +25 -0
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { omit as V, merge as
|
|
1
|
+
import { omit as V, merge as N, debounce as Ye, throttle as Ze, template as Ce, uuid as et, rURL as tt } from "@vtj/base";
|
|
2
2
|
export * from "@vtj/base";
|
|
3
3
|
/**!
|
|
4
4
|
* Copyright (c) 2024, VTJ.PRO All rights reserved.
|
|
5
5
|
* @name @vtj/utils
|
|
6
6
|
* @author CHC chenhuachun1549@dingtalk.com
|
|
7
|
-
* @version 0.7.
|
|
7
|
+
* @version 0.7.12
|
|
8
8
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
11
|
-
function
|
|
10
|
+
const Gn = "0.7.12";
|
|
11
|
+
function _e(e, t) {
|
|
12
12
|
return function() {
|
|
13
13
|
return e.apply(t, arguments);
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
const { toString:
|
|
17
|
-
const n =
|
|
16
|
+
const { toString: nt } = Object.prototype, { getPrototypeOf: ie } = Object, q = /* @__PURE__ */ ((e) => (t) => {
|
|
17
|
+
const n = nt.call(t);
|
|
18
18
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
19
|
-
})(/* @__PURE__ */ Object.create(null)), T = (e) => (e = e.toLowerCase(), (t) => q(t) === e), M = (e) => (t) => typeof t === e, { isArray:
|
|
20
|
-
function
|
|
19
|
+
})(/* @__PURE__ */ Object.create(null)), T = (e) => (e = e.toLowerCase(), (t) => q(t) === e), M = (e) => (t) => typeof t === e, { isArray: P } = Array, k = M("undefined");
|
|
20
|
+
function rt(e) {
|
|
21
21
|
return e !== null && !k(e) && e.constructor !== null && !k(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
22
22
|
}
|
|
23
23
|
const Pe = T("ArrayBuffer");
|
|
24
|
-
function
|
|
24
|
+
function st(e) {
|
|
25
25
|
let t;
|
|
26
26
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Pe(e.buffer), t;
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const ot = M("string"), O = M("function"), je = M("number"), J = (e) => e !== null && typeof e == "object", it = (e) => e === !0 || e === !1, B = (e) => {
|
|
29
29
|
if (q(e) !== "object")
|
|
30
30
|
return !1;
|
|
31
31
|
const t = ie(e);
|
|
32
32
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
33
|
-
},
|
|
33
|
+
}, at = T("Date"), ct = T("File"), ut = T("Blob"), lt = T("FileList"), ft = (e) => J(e) && O(e.pipe), dt = (e) => {
|
|
34
34
|
let t;
|
|
35
35
|
return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = q(e)) === "formdata" || // detect form-data instance
|
|
36
36
|
t === "object" && O(e.toString) && e.toString() === "[object FormData]"));
|
|
37
|
-
},
|
|
37
|
+
}, pt = T("URLSearchParams"), ht = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
38
38
|
function L(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
39
39
|
if (e === null || typeof e > "u")
|
|
40
40
|
return;
|
|
41
41
|
let r, s;
|
|
42
|
-
if (typeof e != "object" && (e = [e]),
|
|
42
|
+
if (typeof e != "object" && (e = [e]), P(e))
|
|
43
43
|
for (r = 0, s = e.length; r < s; r++)
|
|
44
44
|
t.call(null, e[r], r, e);
|
|
45
45
|
else {
|
|
@@ -58,23 +58,23 @@ function Ne(e, t) {
|
|
|
58
58
|
return s;
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
61
|
+
const ke = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Fe = (e) => !k(e) && e !== ke;
|
|
62
62
|
function Y() {
|
|
63
|
-
const { caseless: e } =
|
|
63
|
+
const { caseless: e } = Fe(this) && this || {}, t = {}, n = (r, s) => {
|
|
64
64
|
const o = e && Ne(t, s) || s;
|
|
65
|
-
B(t[o]) && B(r) ? t[o] = Y(t[o], r) : B(r) ? t[o] = Y({}, r) :
|
|
65
|
+
B(t[o]) && B(r) ? t[o] = Y(t[o], r) : B(r) ? t[o] = Y({}, r) : P(r) ? t[o] = r.slice() : t[o] = r;
|
|
66
66
|
};
|
|
67
67
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
68
68
|
arguments[r] && L(arguments[r], n);
|
|
69
69
|
return t;
|
|
70
70
|
}
|
|
71
|
-
const
|
|
72
|
-
n && O(s) ? e[o] =
|
|
73
|
-
}, { allOwnKeys: r }), e),
|
|
71
|
+
const mt = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (s, o) => {
|
|
72
|
+
n && O(s) ? e[o] = _e(s, n) : e[o] = s;
|
|
73
|
+
}, { allOwnKeys: r }), e), yt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), wt = (e, t, n, r) => {
|
|
74
74
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
75
75
|
value: t.prototype
|
|
76
76
|
}), n && Object.assign(e.prototype, n);
|
|
77
|
-
},
|
|
77
|
+
}, gt = (e, t, n, r) => {
|
|
78
78
|
let s, o, i;
|
|
79
79
|
const c = {};
|
|
80
80
|
if (t = t || {}, e == null)
|
|
@@ -89,10 +89,10 @@ const ht = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (s, o) => {
|
|
|
89
89
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
90
90
|
const r = e.indexOf(t, n);
|
|
91
91
|
return r !== -1 && r === n;
|
|
92
|
-
},
|
|
92
|
+
}, Et = (e) => {
|
|
93
93
|
if (!e)
|
|
94
94
|
return null;
|
|
95
|
-
if (
|
|
95
|
+
if (P(e))
|
|
96
96
|
return e;
|
|
97
97
|
let t = e.length;
|
|
98
98
|
if (!je(t))
|
|
@@ -101,32 +101,32 @@ const ht = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (s, o) => {
|
|
|
101
101
|
for (; t-- > 0; )
|
|
102
102
|
n[t] = e[t];
|
|
103
103
|
return n;
|
|
104
|
-
},
|
|
104
|
+
}, St = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ie(Uint8Array)), Rt = (e, t) => {
|
|
105
105
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
106
106
|
let s;
|
|
107
107
|
for (; (s = r.next()) && !s.done; ) {
|
|
108
108
|
const o = s.value;
|
|
109
109
|
t.call(e, o[0], o[1]);
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, Ot = (e, t) => {
|
|
112
112
|
let n;
|
|
113
113
|
const r = [];
|
|
114
114
|
for (; (n = e.exec(t)) !== null; )
|
|
115
115
|
r.push(n);
|
|
116
116
|
return r;
|
|
117
|
-
},
|
|
117
|
+
}, At = T("HTMLFormElement"), Tt = (e) => e.toLowerCase().replace(
|
|
118
118
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
119
119
|
function(n, r, s) {
|
|
120
120
|
return r.toUpperCase() + s;
|
|
121
121
|
}
|
|
122
|
-
), pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
122
|
+
), pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), xt = T("RegExp"), Le = (e, t) => {
|
|
123
123
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
124
124
|
L(n, (s, o) => {
|
|
125
125
|
let i;
|
|
126
126
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
127
127
|
}), Object.defineProperties(e, r);
|
|
128
|
-
},
|
|
129
|
-
|
|
128
|
+
}, Ct = (e) => {
|
|
129
|
+
Le(e, (t, n) => {
|
|
130
130
|
if (O(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
131
131
|
return !1;
|
|
132
132
|
const r = e[n];
|
|
@@ -140,36 +140,36 @@ const ht = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (s, o) => {
|
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
|
-
},
|
|
143
|
+
}, _t = (e, t) => {
|
|
144
144
|
const n = {}, r = (s) => {
|
|
145
145
|
s.forEach((o) => {
|
|
146
146
|
n[o] = !0;
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
|
-
return
|
|
149
|
+
return P(e) ? r(e) : r(String(e).split(t)), n;
|
|
150
150
|
}, Pt = () => {
|
|
151
|
-
}, jt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), K = "abcdefghijklmnopqrstuvwxyz", he = "0123456789",
|
|
151
|
+
}, jt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), K = "abcdefghijklmnopqrstuvwxyz", he = "0123456789", De = {
|
|
152
152
|
DIGIT: he,
|
|
153
153
|
ALPHA: K,
|
|
154
154
|
ALPHA_DIGIT: K + K.toUpperCase() + he
|
|
155
|
-
}, Nt = (e = 16, t =
|
|
155
|
+
}, Nt = (e = 16, t = De.ALPHA_DIGIT) => {
|
|
156
156
|
let n = "";
|
|
157
157
|
const { length: r } = t;
|
|
158
158
|
for (; e--; )
|
|
159
159
|
n += t[Math.random() * r | 0];
|
|
160
160
|
return n;
|
|
161
161
|
};
|
|
162
|
-
function
|
|
162
|
+
function kt(e) {
|
|
163
163
|
return !!(e && O(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
164
164
|
}
|
|
165
|
-
const
|
|
165
|
+
const Ft = (e) => {
|
|
166
166
|
const t = new Array(10), n = (r, s) => {
|
|
167
167
|
if (J(r)) {
|
|
168
168
|
if (t.indexOf(r) >= 0)
|
|
169
169
|
return;
|
|
170
170
|
if (!("toJSON" in r)) {
|
|
171
171
|
t[s] = r;
|
|
172
|
-
const o =
|
|
172
|
+
const o = P(r) ? [] : {};
|
|
173
173
|
return L(r, (i, c) => {
|
|
174
174
|
const f = n(i, s + 1);
|
|
175
175
|
!k(f) && (o[c] = f);
|
|
@@ -179,59 +179,59 @@ const kt = (e) => {
|
|
|
179
179
|
return r;
|
|
180
180
|
};
|
|
181
181
|
return n(e, 0);
|
|
182
|
-
},
|
|
183
|
-
isArray:
|
|
182
|
+
}, Lt = T("AsyncFunction"), Dt = (e) => e && (J(e) || O(e)) && O(e.then) && O(e.catch), a = {
|
|
183
|
+
isArray: P,
|
|
184
184
|
isArrayBuffer: Pe,
|
|
185
|
-
isBuffer:
|
|
186
|
-
isFormData:
|
|
187
|
-
isArrayBufferView:
|
|
188
|
-
isString:
|
|
185
|
+
isBuffer: rt,
|
|
186
|
+
isFormData: dt,
|
|
187
|
+
isArrayBufferView: st,
|
|
188
|
+
isString: ot,
|
|
189
189
|
isNumber: je,
|
|
190
|
-
isBoolean:
|
|
190
|
+
isBoolean: it,
|
|
191
191
|
isObject: J,
|
|
192
192
|
isPlainObject: B,
|
|
193
193
|
isUndefined: k,
|
|
194
|
-
isDate:
|
|
195
|
-
isFile:
|
|
196
|
-
isBlob:
|
|
197
|
-
isRegExp:
|
|
194
|
+
isDate: at,
|
|
195
|
+
isFile: ct,
|
|
196
|
+
isBlob: ut,
|
|
197
|
+
isRegExp: xt,
|
|
198
198
|
isFunction: O,
|
|
199
|
-
isStream:
|
|
200
|
-
isURLSearchParams:
|
|
201
|
-
isTypedArray:
|
|
202
|
-
isFileList:
|
|
199
|
+
isStream: ft,
|
|
200
|
+
isURLSearchParams: pt,
|
|
201
|
+
isTypedArray: St,
|
|
202
|
+
isFileList: lt,
|
|
203
203
|
forEach: L,
|
|
204
204
|
merge: Y,
|
|
205
|
-
extend:
|
|
206
|
-
trim:
|
|
207
|
-
stripBOM:
|
|
208
|
-
inherits:
|
|
209
|
-
toFlatObject:
|
|
205
|
+
extend: mt,
|
|
206
|
+
trim: ht,
|
|
207
|
+
stripBOM: yt,
|
|
208
|
+
inherits: wt,
|
|
209
|
+
toFlatObject: gt,
|
|
210
210
|
kindOf: q,
|
|
211
211
|
kindOfTest: T,
|
|
212
212
|
endsWith: bt,
|
|
213
|
-
toArray:
|
|
214
|
-
forEachEntry:
|
|
215
|
-
matchAll:
|
|
216
|
-
isHTMLForm:
|
|
213
|
+
toArray: Et,
|
|
214
|
+
forEachEntry: Rt,
|
|
215
|
+
matchAll: Ot,
|
|
216
|
+
isHTMLForm: At,
|
|
217
217
|
hasOwnProperty: pe,
|
|
218
218
|
hasOwnProp: pe,
|
|
219
219
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
220
|
-
reduceDescriptors:
|
|
221
|
-
freezeMethods:
|
|
222
|
-
toObjectSet:
|
|
223
|
-
toCamelCase:
|
|
220
|
+
reduceDescriptors: Le,
|
|
221
|
+
freezeMethods: Ct,
|
|
222
|
+
toObjectSet: _t,
|
|
223
|
+
toCamelCase: Tt,
|
|
224
224
|
noop: Pt,
|
|
225
225
|
toFiniteNumber: jt,
|
|
226
226
|
findKey: Ne,
|
|
227
|
-
global:
|
|
228
|
-
isContextDefined:
|
|
229
|
-
ALPHABET:
|
|
227
|
+
global: ke,
|
|
228
|
+
isContextDefined: Fe,
|
|
229
|
+
ALPHABET: De,
|
|
230
230
|
generateString: Nt,
|
|
231
|
-
isSpecCompliantForm:
|
|
232
|
-
toJSONObject:
|
|
233
|
-
isAsyncFn:
|
|
234
|
-
isThenable:
|
|
231
|
+
isSpecCompliantForm: kt,
|
|
232
|
+
toJSONObject: Ft,
|
|
233
|
+
isAsyncFn: Lt,
|
|
234
|
+
isThenable: Dt
|
|
235
235
|
};
|
|
236
236
|
function m(e, t, n, r, s) {
|
|
237
237
|
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);
|
|
@@ -257,7 +257,7 @@ a.inherits(m, Error, {
|
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
|
-
const
|
|
260
|
+
const Ue = m.prototype, Be = {};
|
|
261
261
|
[
|
|
262
262
|
"ERR_BAD_OPTION_VALUE",
|
|
263
263
|
"ERR_BAD_OPTION",
|
|
@@ -273,32 +273,32 @@ const De = m.prototype, Ue = {};
|
|
|
273
273
|
"ERR_INVALID_URL"
|
|
274
274
|
// eslint-disable-next-line func-names
|
|
275
275
|
].forEach((e) => {
|
|
276
|
-
|
|
276
|
+
Be[e] = { value: e };
|
|
277
277
|
});
|
|
278
|
-
Object.defineProperties(m,
|
|
279
|
-
Object.defineProperty(
|
|
278
|
+
Object.defineProperties(m, Be);
|
|
279
|
+
Object.defineProperty(Ue, "isAxiosError", { value: !0 });
|
|
280
280
|
m.from = (e, t, n, r, s, o) => {
|
|
281
|
-
const i = Object.create(
|
|
281
|
+
const i = Object.create(Ue);
|
|
282
282
|
return a.toFlatObject(e, i, function(f) {
|
|
283
283
|
return f !== Error.prototype;
|
|
284
284
|
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
285
285
|
};
|
|
286
|
-
const
|
|
286
|
+
const Ut = null;
|
|
287
287
|
function Z(e) {
|
|
288
288
|
return a.isPlainObject(e) || a.isArray(e);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function ve(e) {
|
|
291
291
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
292
292
|
}
|
|
293
293
|
function me(e, t, n) {
|
|
294
294
|
return e ? e.concat(t).map(function(s, o) {
|
|
295
|
-
return s =
|
|
295
|
+
return s = ve(s), !n && o ? "[" + s + "]" : s;
|
|
296
296
|
}).join(n ? "." : "") : t;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Bt(e) {
|
|
299
299
|
return a.isArray(e) && !e.some(Z);
|
|
300
300
|
}
|
|
301
|
-
const
|
|
301
|
+
const vt = a.toFlatObject(a, {}, null, function(t) {
|
|
302
302
|
return /^is[A-Z]/.test(t);
|
|
303
303
|
});
|
|
304
304
|
function z(e, t, n) {
|
|
@@ -324,12 +324,12 @@ function z(e, t, n) {
|
|
|
324
324
|
return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
325
325
|
}
|
|
326
326
|
function l(p, h, E) {
|
|
327
|
-
let
|
|
327
|
+
let g = p;
|
|
328
328
|
if (p && !E && typeof p == "object") {
|
|
329
329
|
if (a.endsWith(h, "{}"))
|
|
330
330
|
h = r ? h : h.slice(0, -2), p = JSON.stringify(p);
|
|
331
|
-
else if (a.isArray(p) &&
|
|
332
|
-
return h =
|
|
331
|
+
else if (a.isArray(p) && Bt(p) || (a.isFileList(p) || a.endsWith(h, "[]")) && (g = a.toArray(p)))
|
|
332
|
+
return h = ve(h), g.forEach(function(S, $) {
|
|
333
333
|
!(a.isUndefined(S) || S === null) && t.append(
|
|
334
334
|
// eslint-disable-next-line no-nested-ternary
|
|
335
335
|
i === !0 ? me([h], $, o) : i === null ? h : h + "[]",
|
|
@@ -339,7 +339,7 @@ function z(e, t, n) {
|
|
|
339
339
|
}
|
|
340
340
|
return Z(p) ? !0 : (t.append(me(E, h, o), d(p)), !1);
|
|
341
341
|
}
|
|
342
|
-
const u = [], y = Object.assign(
|
|
342
|
+
const u = [], y = Object.assign(vt, {
|
|
343
343
|
defaultVisitor: l,
|
|
344
344
|
convertValue: d,
|
|
345
345
|
isVisitable: Z
|
|
@@ -348,14 +348,14 @@ function z(e, t, n) {
|
|
|
348
348
|
if (!a.isUndefined(p)) {
|
|
349
349
|
if (u.indexOf(p) !== -1)
|
|
350
350
|
throw Error("Circular reference detected in " + h.join("."));
|
|
351
|
-
u.push(p), a.forEach(p, function(
|
|
352
|
-
(!(a.isUndefined(
|
|
351
|
+
u.push(p), a.forEach(p, function(g, R) {
|
|
352
|
+
(!(a.isUndefined(g) || g === null) && s.call(
|
|
353
353
|
t,
|
|
354
|
-
|
|
354
|
+
g,
|
|
355
355
|
a.isString(R) ? R.trim() : R,
|
|
356
356
|
h,
|
|
357
357
|
y
|
|
358
|
-
)) === !0 && w(
|
|
358
|
+
)) === !0 && w(g, h ? h.concat(R) : [R]);
|
|
359
359
|
}), u.pop();
|
|
360
360
|
}
|
|
361
361
|
}
|
|
@@ -395,7 +395,7 @@ Ie.toString = function(t) {
|
|
|
395
395
|
function It(e) {
|
|
396
396
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function He(e, t, n) {
|
|
399
399
|
if (!t)
|
|
400
400
|
return e;
|
|
401
401
|
const r = n && n.encode || It, s = n && n.serialize;
|
|
@@ -460,39 +460,39 @@ class we {
|
|
|
460
460
|
});
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
const
|
|
463
|
+
const qe = {
|
|
464
464
|
silentJSONParsing: !0,
|
|
465
465
|
forcedJSONParsing: !0,
|
|
466
466
|
clarifyTimeoutError: !1
|
|
467
|
-
},
|
|
467
|
+
}, Ht = typeof URLSearchParams < "u" ? URLSearchParams : ae, qt = typeof FormData < "u" ? FormData : null, Mt = typeof Blob < "u" ? Blob : null, Jt = {
|
|
468
468
|
isBrowser: !0,
|
|
469
469
|
classes: {
|
|
470
|
-
URLSearchParams:
|
|
471
|
-
FormData:
|
|
472
|
-
Blob:
|
|
470
|
+
URLSearchParams: Ht,
|
|
471
|
+
FormData: qt,
|
|
472
|
+
Blob: Mt
|
|
473
473
|
},
|
|
474
474
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
475
|
-
},
|
|
476
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
475
|
+
}, Me = typeof window < "u" && typeof document < "u", zt = ((e) => Me && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Wt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
476
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", $t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
477
477
|
__proto__: null,
|
|
478
|
-
hasBrowserEnv:
|
|
479
|
-
hasStandardBrowserEnv:
|
|
480
|
-
hasStandardBrowserWebWorkerEnv:
|
|
478
|
+
hasBrowserEnv: Me,
|
|
479
|
+
hasStandardBrowserEnv: zt,
|
|
480
|
+
hasStandardBrowserWebWorkerEnv: Wt
|
|
481
481
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
482
|
-
|
|
483
|
-
...
|
|
482
|
+
...$t,
|
|
483
|
+
...Jt
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function Vt(e, t) {
|
|
486
486
|
return z(e, new A.classes.URLSearchParams(), Object.assign({
|
|
487
487
|
visitor: function(n, r, s, o) {
|
|
488
488
|
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
489
489
|
}
|
|
490
490
|
}, t));
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function Kt(e) {
|
|
493
493
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Gt(e) {
|
|
496
496
|
const t = {}, n = Object.keys(e);
|
|
497
497
|
let r;
|
|
498
498
|
const s = n.length;
|
|
@@ -501,23 +501,23 @@ function Kt(e) {
|
|
|
501
501
|
o = n[r], t[o] = e[o];
|
|
502
502
|
return t;
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function Je(e) {
|
|
505
505
|
function t(n, r, s, o) {
|
|
506
506
|
let i = n[o++];
|
|
507
507
|
if (i === "__proto__")
|
|
508
508
|
return !0;
|
|
509
509
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
510
|
-
return i = !i && a.isArray(s) ? s.length : i, f ? (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] =
|
|
510
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (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] = Gt(s[i])), !c);
|
|
511
511
|
}
|
|
512
512
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
513
513
|
const n = {};
|
|
514
514
|
return a.forEachEntry(e, (r, s) => {
|
|
515
|
-
t(
|
|
515
|
+
t(Kt(r), s, n, 0);
|
|
516
516
|
}), n;
|
|
517
517
|
}
|
|
518
518
|
return null;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Xt(e, t, n) {
|
|
521
521
|
if (a.isString(e))
|
|
522
522
|
try {
|
|
523
523
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -528,12 +528,12 @@ function Gt(e, t, n) {
|
|
|
528
528
|
return (n || JSON.stringify)(e);
|
|
529
529
|
}
|
|
530
530
|
const ce = {
|
|
531
|
-
transitional:
|
|
531
|
+
transitional: qe,
|
|
532
532
|
adapter: ["xhr", "http"],
|
|
533
533
|
transformRequest: [function(t, n) {
|
|
534
534
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
535
535
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
536
|
-
return s
|
|
536
|
+
return s ? JSON.stringify(Je(t)) : t;
|
|
537
537
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
538
538
|
return t;
|
|
539
539
|
if (a.isArrayBufferView(t))
|
|
@@ -543,7 +543,7 @@ const ce = {
|
|
|
543
543
|
let c;
|
|
544
544
|
if (o) {
|
|
545
545
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
546
|
-
return
|
|
546
|
+
return Vt(t, this.formSerializer).toString();
|
|
547
547
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
548
548
|
const f = this.env && this.env.FormData;
|
|
549
549
|
return z(
|
|
@@ -553,7 +553,7 @@ const ce = {
|
|
|
553
553
|
);
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
556
|
+
return o || s ? (n.setContentType("application/json", !1), Xt(t)) : t;
|
|
557
557
|
}],
|
|
558
558
|
transformResponse: [function(t) {
|
|
559
559
|
const n = this.transitional || ce.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -594,7 +594,7 @@ const ce = {
|
|
|
594
594
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
595
595
|
ce.headers[e] = {};
|
|
596
596
|
});
|
|
597
|
-
const ue = ce,
|
|
597
|
+
const ue = ce, Qt = a.toObjectSet([
|
|
598
598
|
"age",
|
|
599
599
|
"authorization",
|
|
600
600
|
"content-length",
|
|
@@ -612,28 +612,28 @@ const ue = ce, Xt = a.toObjectSet([
|
|
|
612
612
|
"referer",
|
|
613
613
|
"retry-after",
|
|
614
614
|
"user-agent"
|
|
615
|
-
]),
|
|
615
|
+
]), Yt = (e) => {
|
|
616
616
|
const t = {};
|
|
617
617
|
let n, r, s;
|
|
618
618
|
return e && e.split(`
|
|
619
619
|
`).forEach(function(i) {
|
|
620
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
620
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.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);
|
|
621
621
|
}), t;
|
|
622
|
-
},
|
|
623
|
-
function
|
|
622
|
+
}, ge = Symbol("internals");
|
|
623
|
+
function j(e) {
|
|
624
624
|
return e && String(e).trim().toLowerCase();
|
|
625
625
|
}
|
|
626
|
-
function
|
|
627
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
626
|
+
function v(e) {
|
|
627
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(v) : String(e);
|
|
628
628
|
}
|
|
629
|
-
function
|
|
629
|
+
function Zt(e) {
|
|
630
630
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
631
631
|
let r;
|
|
632
632
|
for (; r = n.exec(e); )
|
|
633
633
|
t[r[1]] = r[2];
|
|
634
634
|
return t;
|
|
635
635
|
}
|
|
636
|
-
const
|
|
636
|
+
const en = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
637
637
|
function G(e, t, n, r, s) {
|
|
638
638
|
if (a.isFunction(r))
|
|
639
639
|
return r.call(this, t, n);
|
|
@@ -644,10 +644,10 @@ function G(e, t, n, r, s) {
|
|
|
644
644
|
return r.test(t);
|
|
645
645
|
}
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function tn(e) {
|
|
648
648
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function nn(e, t) {
|
|
651
651
|
const n = a.toCamelCase(" " + t);
|
|
652
652
|
["get", "set", "has"].forEach((r) => {
|
|
653
653
|
Object.defineProperty(e, r + n, {
|
|
@@ -665,24 +665,24 @@ class W {
|
|
|
665
665
|
set(t, n, r) {
|
|
666
666
|
const s = this;
|
|
667
667
|
function o(c, f, d) {
|
|
668
|
-
const l =
|
|
668
|
+
const l = j(f);
|
|
669
669
|
if (!l)
|
|
670
670
|
throw new Error("header name must be a non-empty string");
|
|
671
671
|
const u = a.findKey(s, l);
|
|
672
|
-
(!u || s[u] === void 0 || d === !0 || d === void 0 && s[u] !== !1) && (s[u || f] =
|
|
672
|
+
(!u || s[u] === void 0 || d === !0 || d === void 0 && s[u] !== !1) && (s[u || f] = v(c));
|
|
673
673
|
}
|
|
674
674
|
const i = (c, f) => a.forEach(c, (d, l) => o(d, l, f));
|
|
675
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
675
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !en(t) ? i(Yt(t), n) : t != null && o(n, t, r), this;
|
|
676
676
|
}
|
|
677
677
|
get(t, n) {
|
|
678
|
-
if (t =
|
|
678
|
+
if (t = j(t), t) {
|
|
679
679
|
const r = a.findKey(this, t);
|
|
680
680
|
if (r) {
|
|
681
681
|
const s = this[r];
|
|
682
682
|
if (!n)
|
|
683
683
|
return s;
|
|
684
684
|
if (n === !0)
|
|
685
|
-
return
|
|
685
|
+
return Zt(s);
|
|
686
686
|
if (a.isFunction(n))
|
|
687
687
|
return n.call(this, s, r);
|
|
688
688
|
if (a.isRegExp(n))
|
|
@@ -692,7 +692,7 @@ class W {
|
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
has(t, n) {
|
|
695
|
-
if (t =
|
|
695
|
+
if (t = j(t), t) {
|
|
696
696
|
const r = a.findKey(this, t);
|
|
697
697
|
return !!(r && this[r] !== void 0 && (!n || G(this, this[r], r, n)));
|
|
698
698
|
}
|
|
@@ -702,7 +702,7 @@ class W {
|
|
|
702
702
|
const r = this;
|
|
703
703
|
let s = !1;
|
|
704
704
|
function o(i) {
|
|
705
|
-
if (i =
|
|
705
|
+
if (i = j(i), i) {
|
|
706
706
|
const c = a.findKey(r, i);
|
|
707
707
|
c && (!n || G(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
708
708
|
}
|
|
@@ -723,11 +723,11 @@ class W {
|
|
|
723
723
|
return a.forEach(this, (s, o) => {
|
|
724
724
|
const i = a.findKey(r, o);
|
|
725
725
|
if (i) {
|
|
726
|
-
n[i] =
|
|
726
|
+
n[i] = v(s), delete n[o];
|
|
727
727
|
return;
|
|
728
728
|
}
|
|
729
|
-
const c = t ?
|
|
730
|
-
c !== o && delete n[o], n[c] =
|
|
729
|
+
const c = t ? tn(o) : String(o).trim();
|
|
730
|
+
c !== o && delete n[o], n[c] = v(s), r[c] = !0;
|
|
731
731
|
}), this;
|
|
732
732
|
}
|
|
733
733
|
concat(...t) {
|
|
@@ -757,12 +757,12 @@ class W {
|
|
|
757
757
|
return n.forEach((s) => r.set(s)), r;
|
|
758
758
|
}
|
|
759
759
|
static accessor(t) {
|
|
760
|
-
const r = (this[
|
|
760
|
+
const r = (this[ge] = this[ge] = {
|
|
761
761
|
accessors: {}
|
|
762
762
|
}).accessors, s = this.prototype;
|
|
763
763
|
function o(i) {
|
|
764
|
-
const c =
|
|
765
|
-
r[c] || (
|
|
764
|
+
const c = j(i);
|
|
765
|
+
r[c] || (nn(s, i), r[c] = !0);
|
|
766
766
|
}
|
|
767
767
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
768
768
|
}
|
|
@@ -786,7 +786,7 @@ function X(e, t) {
|
|
|
786
786
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
787
787
|
}), s.normalize(), o;
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function ze(e) {
|
|
790
790
|
return !!(e && e.__CANCEL__);
|
|
791
791
|
}
|
|
792
792
|
function D(e, t, n) {
|
|
@@ -795,7 +795,7 @@ function D(e, t, n) {
|
|
|
795
795
|
a.inherits(D, m, {
|
|
796
796
|
__CANCEL__: !0
|
|
797
797
|
});
|
|
798
|
-
function
|
|
798
|
+
function rn(e, t, n) {
|
|
799
799
|
const r = n.config.validateStatus;
|
|
800
800
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
801
801
|
"Request failed with status code " + n.status,
|
|
@@ -805,7 +805,7 @@ function nn(e, t, n) {
|
|
|
805
805
|
n
|
|
806
806
|
));
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const sn = A.hasStandardBrowserEnv ? (
|
|
809
809
|
// Standard browser envs support document.cookie
|
|
810
810
|
{
|
|
811
811
|
write(e, t, n, r, s, o) {
|
|
@@ -832,16 +832,16 @@ const rn = A.hasStandardBrowserEnv ? (
|
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
);
|
|
835
|
-
function
|
|
835
|
+
function on(e) {
|
|
836
836
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function an(e, t) {
|
|
839
839
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
840
840
|
}
|
|
841
|
-
function
|
|
842
|
-
return e && !
|
|
841
|
+
function We(e, t) {
|
|
842
|
+
return e && !on(t) ? an(e, t) : t;
|
|
843
843
|
}
|
|
844
|
-
const
|
|
844
|
+
const cn = A.hasStandardBrowserEnv ? (
|
|
845
845
|
// Standard browser envs have full support of the APIs needed to test
|
|
846
846
|
// whether the request URL is of the same origin as current location.
|
|
847
847
|
function() {
|
|
@@ -873,11 +873,11 @@ const an = A.hasStandardBrowserEnv ? (
|
|
|
873
873
|
};
|
|
874
874
|
}()
|
|
875
875
|
);
|
|
876
|
-
function
|
|
876
|
+
function un(e) {
|
|
877
877
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
878
878
|
return t && t[1] || "";
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function ln(e, t) {
|
|
881
881
|
e = e || 10;
|
|
882
882
|
const n = new Array(e), r = new Array(e);
|
|
883
883
|
let s = 0, o = 0, i;
|
|
@@ -893,9 +893,9 @@ function un(e, t) {
|
|
|
893
893
|
return w ? Math.round(y * 1e3 / w) : void 0;
|
|
894
894
|
};
|
|
895
895
|
}
|
|
896
|
-
function
|
|
896
|
+
function be(e, t) {
|
|
897
897
|
let n = 0;
|
|
898
|
-
const r =
|
|
898
|
+
const r = ln(50, 250);
|
|
899
899
|
return (s) => {
|
|
900
900
|
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, f = r(c), d = o <= i;
|
|
901
901
|
n = o;
|
|
@@ -911,7 +911,7 @@ function ge(e, t) {
|
|
|
911
911
|
l[t ? "download" : "upload"] = !0, e(l);
|
|
912
912
|
};
|
|
913
913
|
}
|
|
914
|
-
const
|
|
914
|
+
const fn = typeof XMLHttpRequest < "u", dn = fn && function(e) {
|
|
915
915
|
return new Promise(function(n, r) {
|
|
916
916
|
let s = e.data;
|
|
917
917
|
const o = x.from(e.headers).normalize();
|
|
@@ -924,7 +924,7 @@ const ln = typeof XMLHttpRequest < "u", fn = ln && function(e) {
|
|
|
924
924
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
925
925
|
o.setContentType(!1);
|
|
926
926
|
else if ((l = o.getContentType()) !== !1) {
|
|
927
|
-
const [h, ...E] = l ? l.split(";").map((
|
|
927
|
+
const [h, ...E] = l ? l.split(";").map((g) => g.trim()).filter(Boolean) : [];
|
|
928
928
|
o.setContentType([h || "multipart/form-data", ...E].join("; "));
|
|
929
929
|
}
|
|
930
930
|
}
|
|
@@ -933,14 +933,14 @@ const ln = typeof XMLHttpRequest < "u", fn = ln && function(e) {
|
|
|
933
933
|
const h = e.auth.username || "", E = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
934
934
|
o.set("Authorization", "Basic " + btoa(h + ":" + E));
|
|
935
935
|
}
|
|
936
|
-
const y =
|
|
937
|
-
u.open(e.method.toUpperCase(),
|
|
936
|
+
const y = We(e.baseURL, e.url);
|
|
937
|
+
u.open(e.method.toUpperCase(), He(y, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
938
938
|
function w() {
|
|
939
939
|
if (!u)
|
|
940
940
|
return;
|
|
941
941
|
const h = x.from(
|
|
942
942
|
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
943
|
-
),
|
|
943
|
+
), g = {
|
|
944
944
|
data: !i || i === "text" || i === "json" ? u.responseText : u.response,
|
|
945
945
|
status: u.status,
|
|
946
946
|
statusText: u.statusText,
|
|
@@ -948,11 +948,11 @@ const ln = typeof XMLHttpRequest < "u", fn = ln && function(e) {
|
|
|
948
948
|
config: e,
|
|
949
949
|
request: u
|
|
950
950
|
};
|
|
951
|
-
|
|
951
|
+
rn(function(S) {
|
|
952
952
|
n(S), d();
|
|
953
953
|
}, function(S) {
|
|
954
954
|
r(S), d();
|
|
955
|
-
},
|
|
955
|
+
}, g), u = null;
|
|
956
956
|
}
|
|
957
957
|
if ("onloadend" in u ? u.onloadend = w : u.onreadystatechange = function() {
|
|
958
958
|
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
@@ -962,23 +962,23 @@ const ln = typeof XMLHttpRequest < "u", fn = ln && function(e) {
|
|
|
962
962
|
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
963
963
|
}, u.ontimeout = function() {
|
|
964
964
|
let E = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
965
|
-
const
|
|
965
|
+
const g = e.transitional || qe;
|
|
966
966
|
e.timeoutErrorMessage && (E = e.timeoutErrorMessage), r(new m(
|
|
967
967
|
E,
|
|
968
|
-
|
|
968
|
+
g.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
969
969
|
e,
|
|
970
970
|
u
|
|
971
971
|
)), u = null;
|
|
972
|
-
}, A.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 &&
|
|
973
|
-
const h = e.xsrfHeaderName && e.xsrfCookieName &&
|
|
972
|
+
}, A.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && cn(y))) {
|
|
973
|
+
const h = e.xsrfHeaderName && e.xsrfCookieName && sn.read(e.xsrfCookieName);
|
|
974
974
|
h && o.set(e.xsrfHeaderName, h);
|
|
975
975
|
}
|
|
976
|
-
s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(E,
|
|
977
|
-
u.setRequestHeader(
|
|
978
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress",
|
|
976
|
+
s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(E, g) {
|
|
977
|
+
u.setRequestHeader(g, E);
|
|
978
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", be(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", be(e.onUploadProgress)), (e.cancelToken || e.signal) && (f = (h) => {
|
|
979
979
|
u && (r(!h || h.type ? new D(null, e, u) : h), u.abort(), u = null);
|
|
980
980
|
}, e.cancelToken && e.cancelToken.subscribe(f), e.signal && (e.signal.aborted ? f() : e.signal.addEventListener("abort", f)));
|
|
981
|
-
const p =
|
|
981
|
+
const p = un(y);
|
|
982
982
|
if (p && A.protocols.indexOf(p) === -1) {
|
|
983
983
|
r(new m("Unsupported protocol " + p + ":", m.ERR_BAD_REQUEST, e));
|
|
984
984
|
return;
|
|
@@ -986,8 +986,8 @@ const ln = typeof XMLHttpRequest < "u", fn = ln && function(e) {
|
|
|
986
986
|
u.send(s || null);
|
|
987
987
|
});
|
|
988
988
|
}, ee = {
|
|
989
|
-
http:
|
|
990
|
-
xhr:
|
|
989
|
+
http: Ut,
|
|
990
|
+
xhr: dn
|
|
991
991
|
};
|
|
992
992
|
a.forEach(ee, (e, t) => {
|
|
993
993
|
if (e) {
|
|
@@ -998,7 +998,7 @@ a.forEach(ee, (e, t) => {
|
|
|
998
998
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
999
999
|
}
|
|
1000
1000
|
});
|
|
1001
|
-
const Ee = (e) => `- ${e}`,
|
|
1001
|
+
const Ee = (e) => `- ${e}`, pn = (e) => a.isFunction(e) || e === null || e === !1, $e = {
|
|
1002
1002
|
getAdapter: (e) => {
|
|
1003
1003
|
e = a.isArray(e) ? e : [e];
|
|
1004
1004
|
const { length: t } = e;
|
|
@@ -1007,7 +1007,7 @@ const Ee = (e) => `- ${e}`, dn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1007
1007
|
for (let o = 0; o < t; o++) {
|
|
1008
1008
|
n = e[o];
|
|
1009
1009
|
let i;
|
|
1010
|
-
if (r = n, !
|
|
1010
|
+
if (r = n, !pn(n) && (r = ee[(i = String(n)).toLowerCase()], r === void 0))
|
|
1011
1011
|
throw new m(`Unknown adapter '${i}'`);
|
|
1012
1012
|
if (r)
|
|
1013
1013
|
break;
|
|
@@ -1037,14 +1037,14 @@ function Se(e) {
|
|
|
1037
1037
|
return Q(e), e.headers = x.from(e.headers), e.data = X.call(
|
|
1038
1038
|
e,
|
|
1039
1039
|
e.transformRequest
|
|
1040
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1040
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), $e.getAdapter(e.adapter || ue.adapter)(e).then(function(r) {
|
|
1041
1041
|
return Q(e), r.data = X.call(
|
|
1042
1042
|
e,
|
|
1043
1043
|
e.transformResponse,
|
|
1044
1044
|
r
|
|
1045
1045
|
), r.headers = x.from(r.headers), r;
|
|
1046
1046
|
}, function(r) {
|
|
1047
|
-
return
|
|
1047
|
+
return ze(r) || (Q(e), r && r.response && (r.response.data = X.call(
|
|
1048
1048
|
e,
|
|
1049
1049
|
e.transformResponse,
|
|
1050
1050
|
r.response
|
|
@@ -1052,7 +1052,7 @@ function Se(e) {
|
|
|
1052
1052
|
});
|
|
1053
1053
|
}
|
|
1054
1054
|
const Re = (e) => e instanceof x ? e.toJSON() : e;
|
|
1055
|
-
function
|
|
1055
|
+
function _(e, t) {
|
|
1056
1056
|
t = t || {};
|
|
1057
1057
|
const n = {};
|
|
1058
1058
|
function r(d, l, u) {
|
|
@@ -1118,7 +1118,7 @@ function P(e, t) {
|
|
|
1118
1118
|
a.isUndefined(y) && u !== c || (n[l] = y);
|
|
1119
1119
|
}), n;
|
|
1120
1120
|
}
|
|
1121
|
-
const
|
|
1121
|
+
const Ve = "1.6.7", le = {};
|
|
1122
1122
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1123
1123
|
le[e] = function(r) {
|
|
1124
1124
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
@@ -1127,7 +1127,7 @@ const $e = "1.6.6", le = {};
|
|
|
1127
1127
|
const Oe = {};
|
|
1128
1128
|
le.transitional = function(t, n, r) {
|
|
1129
1129
|
function s(o, i) {
|
|
1130
|
-
return "[Axios v" +
|
|
1130
|
+
return "[Axios v" + Ve + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1131
1131
|
}
|
|
1132
1132
|
return (o, i, c) => {
|
|
1133
1133
|
if (t === !1)
|
|
@@ -1143,7 +1143,7 @@ le.transitional = function(t, n, r) {
|
|
|
1143
1143
|
)), t ? t(o, i, c) : !0;
|
|
1144
1144
|
};
|
|
1145
1145
|
};
|
|
1146
|
-
function
|
|
1146
|
+
function hn(e, t, n) {
|
|
1147
1147
|
if (typeof e != "object")
|
|
1148
1148
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1149
1149
|
const r = Object.keys(e);
|
|
@@ -1161,7 +1161,7 @@ function pn(e, t, n) {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
1163
|
const te = {
|
|
1164
|
-
assertOptions:
|
|
1164
|
+
assertOptions: hn,
|
|
1165
1165
|
validators: le
|
|
1166
1166
|
}, C = te.validators;
|
|
1167
1167
|
class H {
|
|
@@ -1183,13 +1183,18 @@ class H {
|
|
|
1183
1183
|
try {
|
|
1184
1184
|
return await this._request(t, n);
|
|
1185
1185
|
} catch (r) {
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1186
|
+
if (r instanceof Error) {
|
|
1187
|
+
let s;
|
|
1188
|
+
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1189
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1190
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1191
|
+
` + o) : r.stack = o;
|
|
1192
|
+
}
|
|
1193
|
+
throw r;
|
|
1189
1194
|
}
|
|
1190
1195
|
}
|
|
1191
1196
|
_request(t, n) {
|
|
1192
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1197
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = _(this.defaults, n);
|
|
1193
1198
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1194
1199
|
r !== void 0 && te.assertOptions(r, {
|
|
1195
1200
|
silentJSONParsing: C.transitional(C.boolean),
|
|
@@ -1248,14 +1253,14 @@ class H {
|
|
|
1248
1253
|
return l;
|
|
1249
1254
|
}
|
|
1250
1255
|
getUri(t) {
|
|
1251
|
-
t =
|
|
1252
|
-
const n =
|
|
1253
|
-
return
|
|
1256
|
+
t = _(this.defaults, t);
|
|
1257
|
+
const n = We(t.baseURL, t.url);
|
|
1258
|
+
return He(n, t.params, t.paramsSerializer);
|
|
1254
1259
|
}
|
|
1255
1260
|
}
|
|
1256
1261
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1257
1262
|
H.prototype[t] = function(n, r) {
|
|
1258
|
-
return this.request(
|
|
1263
|
+
return this.request(_(r || {}, {
|
|
1259
1264
|
method: t,
|
|
1260
1265
|
url: n,
|
|
1261
1266
|
data: (r || {}).data
|
|
@@ -1265,7 +1270,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1265
1270
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1266
1271
|
function n(r) {
|
|
1267
1272
|
return function(o, i, c) {
|
|
1268
|
-
return this.request(
|
|
1273
|
+
return this.request(_(c || {}, {
|
|
1269
1274
|
method: t,
|
|
1270
1275
|
headers: r ? {
|
|
1271
1276
|
"Content-Type": "multipart/form-data"
|
|
@@ -1277,7 +1282,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1277
1282
|
}
|
|
1278
1283
|
H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
|
|
1279
1284
|
});
|
|
1280
|
-
const
|
|
1285
|
+
const I = H;
|
|
1281
1286
|
class fe {
|
|
1282
1287
|
constructor(t) {
|
|
1283
1288
|
if (typeof t != "function")
|
|
@@ -1346,13 +1351,13 @@ class fe {
|
|
|
1346
1351
|
};
|
|
1347
1352
|
}
|
|
1348
1353
|
}
|
|
1349
|
-
const
|
|
1350
|
-
function
|
|
1354
|
+
const mn = fe;
|
|
1355
|
+
function yn(e) {
|
|
1351
1356
|
return function(n) {
|
|
1352
1357
|
return e.apply(null, n);
|
|
1353
1358
|
};
|
|
1354
1359
|
}
|
|
1355
|
-
function
|
|
1360
|
+
function wn(e) {
|
|
1356
1361
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1357
1362
|
}
|
|
1358
1363
|
const ne = {
|
|
@@ -1423,39 +1428,39 @@ const ne = {
|
|
|
1423
1428
|
Object.entries(ne).forEach(([e, t]) => {
|
|
1424
1429
|
ne[t] = e;
|
|
1425
1430
|
});
|
|
1426
|
-
const
|
|
1427
|
-
function
|
|
1428
|
-
const t = new
|
|
1429
|
-
return a.extend(n,
|
|
1430
|
-
return
|
|
1431
|
+
const gn = ne;
|
|
1432
|
+
function Ke(e) {
|
|
1433
|
+
const t = new I(e), n = _e(I.prototype.request, t);
|
|
1434
|
+
return a.extend(n, I.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1435
|
+
return Ke(_(e, s));
|
|
1431
1436
|
}, n;
|
|
1432
1437
|
}
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1438
|
+
const b = Ke(ue);
|
|
1439
|
+
b.Axios = I;
|
|
1440
|
+
b.CanceledError = D;
|
|
1441
|
+
b.CancelToken = mn;
|
|
1442
|
+
b.isCancel = ze;
|
|
1443
|
+
b.VERSION = Ve;
|
|
1444
|
+
b.toFormData = z;
|
|
1445
|
+
b.AxiosError = m;
|
|
1446
|
+
b.Cancel = b.CanceledError;
|
|
1447
|
+
b.all = function(t) {
|
|
1443
1448
|
return Promise.all(t);
|
|
1444
1449
|
};
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1450
|
+
b.spread = yn;
|
|
1451
|
+
b.isAxiosError = wn;
|
|
1452
|
+
b.mergeConfig = _;
|
|
1453
|
+
b.AxiosHeaders = x;
|
|
1454
|
+
b.formToJSON = (e) => Je(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1455
|
+
b.getAdapter = $e.getAdapter;
|
|
1456
|
+
b.HttpStatusCode = gn;
|
|
1457
|
+
b.default = b;
|
|
1453
1458
|
const bn = {
|
|
1454
1459
|
form: "application/x-www-form-urlencoded",
|
|
1455
1460
|
json: "application/json",
|
|
1456
1461
|
data: "multipart/form-data"
|
|
1457
|
-
},
|
|
1458
|
-
class
|
|
1462
|
+
}, En = ["put", "post", "patch"], Ae = "Local-Request-Id", Sn = 200, Rn = 500;
|
|
1463
|
+
class On {
|
|
1459
1464
|
axios;
|
|
1460
1465
|
settings;
|
|
1461
1466
|
records = {};
|
|
@@ -1468,8 +1473,8 @@ class Rn {
|
|
|
1468
1473
|
const n = V(t, [
|
|
1469
1474
|
"settings"
|
|
1470
1475
|
]);
|
|
1471
|
-
this.axios =
|
|
1472
|
-
|
|
1476
|
+
this.axios = b.create(
|
|
1477
|
+
N(
|
|
1473
1478
|
{
|
|
1474
1479
|
headers: {
|
|
1475
1480
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -1478,17 +1483,17 @@ class Rn {
|
|
|
1478
1483
|
},
|
|
1479
1484
|
n
|
|
1480
1485
|
)
|
|
1481
|
-
), this.setupSkipWarn(this.settings), this.showLoading =
|
|
1486
|
+
), this.setupSkipWarn(this.settings), this.showLoading = Ye(this.openLoading.bind(this), Sn), this.showError = Ze(this._showError.bind(this), Rn, {
|
|
1482
1487
|
leading: !0,
|
|
1483
1488
|
trailing: !1
|
|
1484
1489
|
});
|
|
1485
1490
|
}
|
|
1486
1491
|
setConfig(t = {}) {
|
|
1487
|
-
this.settings =
|
|
1492
|
+
this.settings = N(this.settings, t.settings || {});
|
|
1488
1493
|
const n = V(t, [
|
|
1489
1494
|
"settings"
|
|
1490
1495
|
]);
|
|
1491
|
-
this.axios.defaults =
|
|
1496
|
+
this.axios.defaults = N(this.axios.defaults, n), this.setupSkipWarn(this.settings);
|
|
1492
1497
|
}
|
|
1493
1498
|
cancel(t, n = "请求已取消") {
|
|
1494
1499
|
if (t) {
|
|
@@ -1523,7 +1528,7 @@ class Rn {
|
|
|
1523
1528
|
const { type: o, skipWarn: i } = t, { name: c = "skipWarn" } = i || {};
|
|
1524
1529
|
let { data: f, params: d, method: l = "get" } = n;
|
|
1525
1530
|
const u = s ? { [c]: !0 } : {};
|
|
1526
|
-
return
|
|
1531
|
+
return En.includes(l.toLowerCase()) ? (f = Object.assign(f || {}, u), f = o !== "json" || !this.isJsonType(r) ? this.toFormData(f, o) : f) : d = {
|
|
1527
1532
|
...f,
|
|
1528
1533
|
...d,
|
|
1529
1534
|
...u
|
|
@@ -1534,7 +1539,7 @@ class Rn {
|
|
|
1534
1539
|
}
|
|
1535
1540
|
createUrl(t) {
|
|
1536
1541
|
const { url: n, query: r } = t;
|
|
1537
|
-
return r ?
|
|
1542
|
+
return r ? Ce(n)(r) : n;
|
|
1538
1543
|
}
|
|
1539
1544
|
openLoading(t) {
|
|
1540
1545
|
const { loading: n, showLoading: r } = t;
|
|
@@ -1563,9 +1568,9 @@ class Rn {
|
|
|
1563
1568
|
return !!t.promise;
|
|
1564
1569
|
}
|
|
1565
1570
|
send(t = {}, n = !1) {
|
|
1566
|
-
const r =
|
|
1571
|
+
const r = N({}, this.settings, t.settings || {}), s = V(t, [
|
|
1567
1572
|
"settings"
|
|
1568
|
-
]), o =
|
|
1573
|
+
]), o = et(!1), i = b.CancelToken.source();
|
|
1569
1574
|
this.records[o] = { settings: r, config: s, source: i };
|
|
1570
1575
|
const c = this.createUrl(s), f = this.createHeaders(o, r, s), { data: d, params: l } = this.createSendData(
|
|
1571
1576
|
r,
|
|
@@ -1622,8 +1627,8 @@ class Rn {
|
|
|
1622
1627
|
});
|
|
1623
1628
|
}
|
|
1624
1629
|
}
|
|
1625
|
-
function
|
|
1626
|
-
const t = new
|
|
1630
|
+
function An(e = {}) {
|
|
1631
|
+
const t = new On(e), n = t.send.bind(t), r = t.cancel.bind(t), s = t.setConfig.bind(t), o = t.useRequest.bind(t), i = t.useResponse.bind(t);
|
|
1627
1632
|
return Object.assign(n, {
|
|
1628
1633
|
...t,
|
|
1629
1634
|
instance: t,
|
|
@@ -1634,25 +1639,25 @@ function On(e = {}) {
|
|
|
1634
1639
|
useResponse: i
|
|
1635
1640
|
});
|
|
1636
1641
|
}
|
|
1637
|
-
const
|
|
1642
|
+
const Tn = An({
|
|
1638
1643
|
settings: {
|
|
1639
1644
|
injectHeaders: !0,
|
|
1640
1645
|
loading: !0,
|
|
1641
1646
|
originResponse: !0
|
|
1642
1647
|
}
|
|
1643
1648
|
});
|
|
1644
|
-
function
|
|
1649
|
+
function xn(e) {
|
|
1645
1650
|
const t = typeof e == "string" ? { url: e } : e;
|
|
1646
|
-
return (n, r) =>
|
|
1651
|
+
return (n, r) => Tn.send(N(t, r || {}, { data: n }));
|
|
1647
1652
|
}
|
|
1648
|
-
function
|
|
1653
|
+
function Xn(e) {
|
|
1649
1654
|
const t = {};
|
|
1650
1655
|
for (const [n, r] of Object.entries(e))
|
|
1651
|
-
t[n] =
|
|
1656
|
+
t[n] = xn(r);
|
|
1652
1657
|
return t;
|
|
1653
1658
|
}
|
|
1654
|
-
const F = typeof window < "u",
|
|
1655
|
-
class
|
|
1659
|
+
const F = typeof window < "u", Qn = (e) => F ? window.requestAnimationFrame(e) : setTimeout(e, 16), Yn = (e) => F ? window.cancelAnimationFrame(e) : clearTimeout(e);
|
|
1660
|
+
class Cn {
|
|
1656
1661
|
options = {
|
|
1657
1662
|
type: "cache",
|
|
1658
1663
|
expired: 0,
|
|
@@ -1701,16 +1706,16 @@ class xn {
|
|
|
1701
1706
|
r === this.caches ? this.caches = {} : r.clear();
|
|
1702
1707
|
}
|
|
1703
1708
|
}
|
|
1704
|
-
const
|
|
1705
|
-
var
|
|
1706
|
-
function
|
|
1709
|
+
const Zn = new Cn();
|
|
1710
|
+
var _n = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1711
|
+
function Ge(e) {
|
|
1707
1712
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1708
1713
|
}
|
|
1709
1714
|
var re = { exports: {} };
|
|
1710
1715
|
(function(e, t) {
|
|
1711
1716
|
(function(n, r) {
|
|
1712
1717
|
r(t, e);
|
|
1713
|
-
})(
|
|
1718
|
+
})(_n, function(n, r) {
|
|
1714
1719
|
var s = {
|
|
1715
1720
|
timeout: 5e3,
|
|
1716
1721
|
jsonpCallback: "callback",
|
|
@@ -1733,23 +1738,23 @@ var re = { exports: {} };
|
|
|
1733
1738
|
function f(d) {
|
|
1734
1739
|
var l = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1], u = d, y = l.timeout || s.timeout, w = l.jsonpCallback || s.jsonpCallback, p = void 0;
|
|
1735
1740
|
return new Promise(function(h, E) {
|
|
1736
|
-
var
|
|
1737
|
-
window[
|
|
1741
|
+
var g = l.jsonpCallbackFunction || o(), R = w + "_" + g;
|
|
1742
|
+
window[g] = function($) {
|
|
1738
1743
|
h({
|
|
1739
1744
|
ok: !0,
|
|
1740
1745
|
// keep consistent with fetch API
|
|
1741
1746
|
json: function() {
|
|
1742
1747
|
return Promise.resolve($);
|
|
1743
1748
|
}
|
|
1744
|
-
}), p && clearTimeout(p), c(R), i(
|
|
1749
|
+
}), p && clearTimeout(p), c(R), i(g);
|
|
1745
1750
|
}, u += u.indexOf("?") === -1 ? "?" : "&";
|
|
1746
1751
|
var S = document.createElement("script");
|
|
1747
|
-
S.setAttribute("src", "" + u + w + "=" +
|
|
1748
|
-
E(new Error("JSONP request to " + d + " timed out")), i(
|
|
1749
|
-
i(
|
|
1752
|
+
S.setAttribute("src", "" + u + w + "=" + g), l.charset && S.setAttribute("charset", l.charset), l.nonce && S.setAttribute("nonce", l.nonce), l.referrerPolicy && S.setAttribute("referrerPolicy", l.referrerPolicy), l.crossorigin && S.setAttribute("crossorigin", "true"), S.id = R, document.getElementsByTagName("head")[0].appendChild(S), p = setTimeout(function() {
|
|
1753
|
+
E(new Error("JSONP request to " + d + " timed out")), i(g), c(R), window[g] = function() {
|
|
1754
|
+
i(g);
|
|
1750
1755
|
};
|
|
1751
1756
|
}, y), S.onerror = function() {
|
|
1752
|
-
E(new Error("JSONP request to " + d + " failed")), i(
|
|
1757
|
+
E(new Error("JSONP request to " + d + " failed")), i(g), c(R), p && clearTimeout(p);
|
|
1753
1758
|
};
|
|
1754
1759
|
});
|
|
1755
1760
|
}
|
|
@@ -1757,7 +1762,7 @@ var re = { exports: {} };
|
|
|
1757
1762
|
});
|
|
1758
1763
|
})(re, re.exports);
|
|
1759
1764
|
var Pn = re.exports;
|
|
1760
|
-
const jn = /* @__PURE__ */
|
|
1765
|
+
const jn = /* @__PURE__ */ Ge(Pn);
|
|
1761
1766
|
function Nn(e) {
|
|
1762
1767
|
if (F) {
|
|
1763
1768
|
const { protocol: t, host: n, pathname: r } = location;
|
|
@@ -1765,11 +1770,11 @@ function Nn(e) {
|
|
|
1765
1770
|
} else
|
|
1766
1771
|
return null;
|
|
1767
1772
|
}
|
|
1768
|
-
function
|
|
1769
|
-
const t = e.match(
|
|
1773
|
+
function kn(e = "") {
|
|
1774
|
+
const t = e.match(tt);
|
|
1770
1775
|
return t ? t[0] : "";
|
|
1771
1776
|
}
|
|
1772
|
-
function
|
|
1777
|
+
function Xe(e) {
|
|
1773
1778
|
const t = [];
|
|
1774
1779
|
for (const n in e)
|
|
1775
1780
|
Object.prototype.hasOwnProperty.call(e, n) && t.push([n, encodeURIComponent(e[n])].join("="));
|
|
@@ -1787,33 +1792,33 @@ function se(e, t, n) {
|
|
|
1787
1792
|
s[1] !== e && (r[decodeURIComponent(s[1])] = decodeURIComponent(s[2] || ""));
|
|
1788
1793
|
return r;
|
|
1789
1794
|
}
|
|
1790
|
-
function
|
|
1795
|
+
function Qe(e, t) {
|
|
1791
1796
|
t = typeof t == "string" ? se(t) : t;
|
|
1792
|
-
const n = e.split("?")[0], r = se(e), s = Object.assign({}, r, t), o =
|
|
1797
|
+
const n = e.split("?")[0], r = se(e), s = Object.assign({}, r, t), o = Xe(s);
|
|
1793
1798
|
return o ? [n, o].join("?") : e;
|
|
1794
1799
|
}
|
|
1795
|
-
const
|
|
1800
|
+
const er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1796
1801
|
__proto__: null,
|
|
1797
|
-
append:
|
|
1802
|
+
append: Qe,
|
|
1798
1803
|
getCurrentHost: Nn,
|
|
1799
|
-
getHost:
|
|
1804
|
+
getHost: kn,
|
|
1800
1805
|
parse: se,
|
|
1801
|
-
stringify:
|
|
1806
|
+
stringify: Xe
|
|
1802
1807
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1803
|
-
async function
|
|
1808
|
+
async function tr(e, t = {}) {
|
|
1804
1809
|
const { query: n = {} } = t;
|
|
1805
|
-
e.includes("${") && (e =
|
|
1806
|
-
const r =
|
|
1810
|
+
e.includes("${") && (e = Ce(e)(n || {}));
|
|
1811
|
+
const r = Qe(e, n);
|
|
1807
1812
|
return await (await jn(r, t)).json();
|
|
1808
1813
|
}
|
|
1809
|
-
var
|
|
1814
|
+
var Fn = function(t, n, r) {
|
|
1810
1815
|
var s = document.head || document.getElementsByTagName("head")[0], o = document.createElement("script");
|
|
1811
1816
|
typeof n == "function" && (r = n, n = {}), n = n || {}, r = r || function() {
|
|
1812
|
-
}, o.type = n.type || "text/javascript", o.charset = n.charset || "utf8", o.async = "async" in n ? !!n.async : !0, o.src = t, n.attrs &&
|
|
1813
|
-
var i = "onload" in o ? Te :
|
|
1817
|
+
}, o.type = n.type || "text/javascript", o.charset = n.charset || "utf8", o.async = "async" in n ? !!n.async : !0, o.src = t, n.attrs && Ln(o, n.attrs), n.text && (o.text = "" + n.text);
|
|
1818
|
+
var i = "onload" in o ? Te : Dn;
|
|
1814
1819
|
i(o, r), o.onload || Te(o, r), s.appendChild(o);
|
|
1815
1820
|
};
|
|
1816
|
-
function
|
|
1821
|
+
function Ln(e, t) {
|
|
1817
1822
|
for (var n in t)
|
|
1818
1823
|
e.setAttribute(n, t[n]);
|
|
1819
1824
|
}
|
|
@@ -1824,20 +1829,86 @@ function Te(e, t) {
|
|
|
1824
1829
|
this.onerror = this.onload = null, t(new Error("Failed to load " + this.src), e);
|
|
1825
1830
|
};
|
|
1826
1831
|
}
|
|
1827
|
-
function
|
|
1832
|
+
function Dn(e, t) {
|
|
1828
1833
|
e.onreadystatechange = function() {
|
|
1829
1834
|
this.readyState != "complete" && this.readyState != "loaded" || (this.onreadystatechange = null, t(null, e));
|
|
1830
1835
|
};
|
|
1831
1836
|
}
|
|
1832
|
-
const
|
|
1833
|
-
function
|
|
1837
|
+
const Un = /* @__PURE__ */ Ge(Fn);
|
|
1838
|
+
function nr(e, t = {}) {
|
|
1834
1839
|
return new Promise((n, r) => {
|
|
1835
1840
|
const { library: s } = t;
|
|
1836
|
-
|
|
1841
|
+
Un(e, t, (o, i) => {
|
|
1837
1842
|
o ? r(o) : n(s ? window[s] : void 0);
|
|
1838
1843
|
});
|
|
1839
1844
|
});
|
|
1840
1845
|
}
|
|
1846
|
+
const xe = { debug: -1, log: 0, info: 0, warn: 1, error: 2 }, Bn = function(e, t, n, r) {
|
|
1847
|
+
return function(...s) {
|
|
1848
|
+
if (t && xe[t] <= xe[e] && // @ts-ignore
|
|
1849
|
+
console[e].apply && (r === "*" || n.startsWith(r)))
|
|
1850
|
+
return console[e].apply(console, vn(s, n));
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
function vn(e, t) {
|
|
1854
|
+
return t !== "*" && (typeof e[0] == "string" ? e[0] = `[${t}] ${e[0]}` : e = ["[" + t + "]"].concat(e)), e;
|
|
1855
|
+
}
|
|
1856
|
+
function In(e, t) {
|
|
1857
|
+
if (!e)
|
|
1858
|
+
return {
|
|
1859
|
+
targetLevel: t.level,
|
|
1860
|
+
targetBizName: t.bizName
|
|
1861
|
+
};
|
|
1862
|
+
if (~e.indexOf(":")) {
|
|
1863
|
+
const n = e.split(":");
|
|
1864
|
+
return {
|
|
1865
|
+
targetLevel: n[0],
|
|
1866
|
+
targetBizName: n[1]
|
|
1867
|
+
};
|
|
1868
|
+
}
|
|
1869
|
+
return {
|
|
1870
|
+
targetLevel: e,
|
|
1871
|
+
targetBizName: "*"
|
|
1872
|
+
};
|
|
1873
|
+
}
|
|
1874
|
+
const Hn = {
|
|
1875
|
+
level: "warn",
|
|
1876
|
+
bizName: "*"
|
|
1877
|
+
};
|
|
1878
|
+
class qn {
|
|
1879
|
+
config;
|
|
1880
|
+
options;
|
|
1881
|
+
constructor(t) {
|
|
1882
|
+
this.options = { ...Hn, ...t };
|
|
1883
|
+
const n = typeof location < "u" ? location : {}, r = (/__(?:logConf|logLevel)__=([^#/&]*)/.exec(
|
|
1884
|
+
n.href
|
|
1885
|
+
) || [])[1];
|
|
1886
|
+
this.config = In(r, t);
|
|
1887
|
+
}
|
|
1888
|
+
_log(t) {
|
|
1889
|
+
const { targetLevel: n, targetBizName: r } = this.config, { bizName: s } = this.options;
|
|
1890
|
+
return Bn(t, n, s, r);
|
|
1891
|
+
}
|
|
1892
|
+
debug(...t) {
|
|
1893
|
+
return this._log("debug")(...t);
|
|
1894
|
+
}
|
|
1895
|
+
log(...t) {
|
|
1896
|
+
return this._log("log")(...t);
|
|
1897
|
+
}
|
|
1898
|
+
info(...t) {
|
|
1899
|
+
return this._log("info")(...t);
|
|
1900
|
+
}
|
|
1901
|
+
warn(...t) {
|
|
1902
|
+
return this._log("warn")(...t);
|
|
1903
|
+
}
|
|
1904
|
+
error(...t) {
|
|
1905
|
+
return this._log("warn")(...t);
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
function Mn(e) {
|
|
1909
|
+
return new qn(e);
|
|
1910
|
+
}
|
|
1911
|
+
const rr = Mn({ level: "log", bizName: "VTJ" });
|
|
1841
1912
|
/*! js-cookie v3.0.5 | MIT */
|
|
1842
1913
|
function U(e) {
|
|
1843
1914
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -1847,7 +1918,7 @@ function U(e) {
|
|
|
1847
1918
|
}
|
|
1848
1919
|
return e;
|
|
1849
1920
|
}
|
|
1850
|
-
var
|
|
1921
|
+
var Jn = {
|
|
1851
1922
|
read: function(e) {
|
|
1852
1923
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1853
1924
|
},
|
|
@@ -1908,38 +1979,41 @@ function oe(e, t) {
|
|
|
1908
1979
|
}
|
|
1909
1980
|
);
|
|
1910
1981
|
}
|
|
1911
|
-
var de = oe(
|
|
1912
|
-
function
|
|
1982
|
+
var de = oe(Jn, { path: "/" });
|
|
1983
|
+
function zn(e, t, n) {
|
|
1913
1984
|
de.set(e, t, n);
|
|
1914
1985
|
}
|
|
1915
|
-
function
|
|
1986
|
+
function Wn(e) {
|
|
1916
1987
|
return de.get(e);
|
|
1917
1988
|
}
|
|
1918
|
-
function
|
|
1989
|
+
function $n(e, t) {
|
|
1919
1990
|
de.remove(e, t);
|
|
1920
1991
|
}
|
|
1921
|
-
const
|
|
1992
|
+
const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1922
1993
|
__proto__: null,
|
|
1923
|
-
get:
|
|
1924
|
-
remove:
|
|
1925
|
-
set:
|
|
1994
|
+
get: Wn,
|
|
1995
|
+
remove: $n,
|
|
1996
|
+
set: zn
|
|
1926
1997
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1927
1998
|
export {
|
|
1928
1999
|
Ae as LOCAL_REQUEST_ID,
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
2000
|
+
qn as Logger,
|
|
2001
|
+
On as Request,
|
|
2002
|
+
Cn as Storage,
|
|
2003
|
+
Gn as VTJ_UTILS_VERSION,
|
|
2004
|
+
b as axios,
|
|
2005
|
+
Yn as cAF,
|
|
2006
|
+
sr as cookie,
|
|
2007
|
+
xn as createApi,
|
|
2008
|
+
Xn as createApis,
|
|
2009
|
+
An as createRequest,
|
|
2010
|
+
Mn as getLogger,
|
|
1938
2011
|
F as isClient,
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
2012
|
+
tr as jsonp,
|
|
2013
|
+
nr as loadScript,
|
|
2014
|
+
rr as logger,
|
|
2015
|
+
Qn as rAF,
|
|
2016
|
+
Tn as request,
|
|
2017
|
+
Zn as storage,
|
|
2018
|
+
er as url
|
|
1945
2019
|
};
|