@jctrans-materials/shared 1.0.0 → 1.0.1
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.js +6 -6
- package/dist/index.esm.js +337 -335
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
1
|
+
import Ut from "mitt";
|
|
2
|
+
function et(e, t) {
|
|
3
3
|
return function() {
|
|
4
4
|
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString:
|
|
8
|
-
const n =
|
|
7
|
+
const { toString: Dt } = Object.prototype, { getPrototypeOf: Ne } = Object, { iterator: ue, toStringTag: tt } = Symbol, le = /* @__PURE__ */ ((e) => (t) => {
|
|
8
|
+
const n = Dt.call(t);
|
|
9
9
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
10
|
})(/* @__PURE__ */ Object.create(null)), B = (e) => (e = e.toLowerCase(), (t) => le(t) === e), de = (e) => (t) => typeof t === e, { isArray: V } = Array, J = de("undefined");
|
|
11
11
|
function Q(e) {
|
|
12
12
|
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && O(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
15
|
-
function
|
|
14
|
+
const nt = B("ArrayBuffer");
|
|
15
|
+
function vt(e) {
|
|
16
16
|
let t;
|
|
17
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
17
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && nt(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const zt = de("string"), O = de("function"), rt = de("number"), Y = (e) => e !== null && typeof e == "object", qt = (e) => e === !0 || e === !1, oe = (e) => {
|
|
20
20
|
if (le(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
|
-
const t =
|
|
23
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
24
|
-
},
|
|
22
|
+
const t = Ne(e);
|
|
23
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(tt in e) && !(ue in e);
|
|
24
|
+
}, jt = (e) => {
|
|
25
25
|
if (!Y(e) || Q(e))
|
|
26
26
|
return !1;
|
|
27
27
|
try {
|
|
@@ -29,11 +29,11 @@ const vt = de("string"), O = de("function"), nt = de("number"), Y = (e) => e !==
|
|
|
29
29
|
} catch {
|
|
30
30
|
return !1;
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
}, $t = B("Date"), Mt = B("File"), Ht = B("Blob"), Jt = B("FileList"), Vt = (e) => Y(e) && O(e.pipe), Wt = (e) => {
|
|
33
33
|
let t;
|
|
34
34
|
return e && (typeof FormData == "function" && e instanceof FormData || O(e.append) && ((t = le(e)) === "formdata" || // detect form-data instance
|
|
35
35
|
t === "object" && O(e.toString) && e.toString() === "[object FormData]"));
|
|
36
|
-
},
|
|
36
|
+
}, Kt = B("URLSearchParams"), [Xt, Gt, Qt, Yt] = ["ReadableStream", "Request", "Response", "Headers"].map(B), Zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
37
37
|
function Z(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
38
38
|
if (e === null || typeof e > "u")
|
|
39
39
|
return;
|
|
@@ -50,7 +50,7 @@ function Z(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
50
50
|
c = o[r], t.call(null, e[c], c, e);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function st(e, t) {
|
|
54
54
|
if (Q(e))
|
|
55
55
|
return null;
|
|
56
56
|
t = t.toLowerCase();
|
|
@@ -61,71 +61,71 @@ function rt(e, t) {
|
|
|
61
61
|
return s;
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
|
-
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
65
|
-
function
|
|
66
|
-
const { caseless: e, skipUndefined: t } =
|
|
67
|
-
const i = e &&
|
|
68
|
-
oe(n[i]) && oe(s) ? n[i] =
|
|
64
|
+
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (e) => !J(e) && e !== q;
|
|
65
|
+
function Se() {
|
|
66
|
+
const { caseless: e, skipUndefined: t } = ot(this) && this || {}, n = {}, r = (s, o) => {
|
|
67
|
+
const i = e && st(n, o) || o;
|
|
68
|
+
oe(n[i]) && oe(s) ? n[i] = Se(n[i], s) : oe(s) ? n[i] = Se({}, s) : V(s) ? n[i] = s.slice() : (!t || !J(s)) && (n[i] = s);
|
|
69
69
|
};
|
|
70
70
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
71
71
|
arguments[s] && Z(arguments[s], r);
|
|
72
72
|
return n;
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
n && O(s) ? e[o] =
|
|
76
|
-
}, { allOwnKeys: r }), e),
|
|
74
|
+
const en = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (s, o) => {
|
|
75
|
+
n && O(s) ? e[o] = et(s, n) : e[o] = s;
|
|
76
|
+
}, { allOwnKeys: r }), e), tn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), nn = (e, t, n, r) => {
|
|
77
77
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
78
78
|
value: t.prototype
|
|
79
79
|
}), n && Object.assign(e.prototype, n);
|
|
80
|
-
},
|
|
80
|
+
}, rn = (e, t, n, r) => {
|
|
81
81
|
let s, o, i;
|
|
82
82
|
const c = {};
|
|
83
83
|
if (t = t || {}, e == null) return t;
|
|
84
84
|
do {
|
|
85
85
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
86
86
|
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
87
|
-
e = n !== !1 &&
|
|
87
|
+
e = n !== !1 && Ne(e);
|
|
88
88
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
89
89
|
return t;
|
|
90
|
-
},
|
|
90
|
+
}, sn = (e, t, n) => {
|
|
91
91
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
92
92
|
const r = e.indexOf(t, n);
|
|
93
93
|
return r !== -1 && r === n;
|
|
94
|
-
},
|
|
94
|
+
}, on = (e) => {
|
|
95
95
|
if (!e) return null;
|
|
96
96
|
if (V(e)) return e;
|
|
97
97
|
let t = e.length;
|
|
98
|
-
if (!
|
|
98
|
+
if (!rt(t)) return null;
|
|
99
99
|
const n = new Array(t);
|
|
100
100
|
for (; t-- > 0; )
|
|
101
101
|
n[t] = e[t];
|
|
102
102
|
return n;
|
|
103
|
-
},
|
|
103
|
+
}, an = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ne(Uint8Array)), cn = (e, t) => {
|
|
104
104
|
const r = (e && e[ue]).call(e);
|
|
105
105
|
let s;
|
|
106
106
|
for (; (s = r.next()) && !s.done; ) {
|
|
107
107
|
const o = s.value;
|
|
108
108
|
t.call(e, o[0], o[1]);
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, un = (e, t) => {
|
|
111
111
|
let n;
|
|
112
112
|
const r = [];
|
|
113
113
|
for (; (n = e.exec(t)) !== null; )
|
|
114
114
|
r.push(n);
|
|
115
115
|
return r;
|
|
116
|
-
},
|
|
116
|
+
}, ln = B("HTMLFormElement"), dn = (e) => e.toLowerCase().replace(
|
|
117
117
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
118
118
|
function(n, r, s) {
|
|
119
119
|
return r.toUpperCase() + s;
|
|
120
120
|
}
|
|
121
|
-
),
|
|
121
|
+
), ve = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), fn = B("RegExp"), it = (e, t) => {
|
|
122
122
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
123
123
|
Z(n, (s, o) => {
|
|
124
124
|
let i;
|
|
125
125
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
126
126
|
}), Object.defineProperties(e, r);
|
|
127
|
-
},
|
|
128
|
-
|
|
127
|
+
}, pn = (e) => {
|
|
128
|
+
it(e, (t, n) => {
|
|
129
129
|
if (O(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
130
130
|
return !1;
|
|
131
131
|
const r = e[n];
|
|
@@ -139,19 +139,19 @@ const Zt = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (s, o) => {
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, yn = (e, t) => {
|
|
143
143
|
const n = {}, r = (s) => {
|
|
144
144
|
s.forEach((o) => {
|
|
145
145
|
n[o] = !0;
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
148
|
return V(e) ? r(e) : r(String(e).split(t)), n;
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
function
|
|
152
|
-
return !!(e && O(e.append) && e[
|
|
149
|
+
}, hn = () => {
|
|
150
|
+
}, mn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
151
|
+
function wn(e) {
|
|
152
|
+
return !!(e && O(e.append) && e[tt] === "FormData" && e[ue]);
|
|
153
153
|
}
|
|
154
|
-
const
|
|
154
|
+
const gn = (e) => {
|
|
155
155
|
const t = new Array(10), n = (r, s) => {
|
|
156
156
|
if (Y(r)) {
|
|
157
157
|
if (t.indexOf(r) >= 0)
|
|
@@ -170,72 +170,72 @@ const wn = (e) => {
|
|
|
170
170
|
return r;
|
|
171
171
|
};
|
|
172
172
|
return n(e, 0);
|
|
173
|
-
},
|
|
173
|
+
}, bn = B("AsyncFunction"), En = (e) => e && (Y(e) || O(e)) && O(e.then) && O(e.catch), at = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: s, data: o }) => {
|
|
174
174
|
s === q && o === n && r.length && r.shift()();
|
|
175
175
|
}, !1), (s) => {
|
|
176
176
|
r.push(s), q.postMessage(n, "*");
|
|
177
177
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
178
178
|
typeof setImmediate == "function",
|
|
179
179
|
O(q.postMessage)
|
|
180
|
-
),
|
|
180
|
+
), Sn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || at, Cn = (e) => e != null && O(e[ue]), a = {
|
|
181
181
|
isArray: V,
|
|
182
|
-
isArrayBuffer:
|
|
182
|
+
isArrayBuffer: nt,
|
|
183
183
|
isBuffer: Q,
|
|
184
|
-
isFormData:
|
|
185
|
-
isArrayBufferView:
|
|
186
|
-
isString:
|
|
187
|
-
isNumber:
|
|
188
|
-
isBoolean:
|
|
184
|
+
isFormData: Wt,
|
|
185
|
+
isArrayBufferView: vt,
|
|
186
|
+
isString: zt,
|
|
187
|
+
isNumber: rt,
|
|
188
|
+
isBoolean: qt,
|
|
189
189
|
isObject: Y,
|
|
190
190
|
isPlainObject: oe,
|
|
191
|
-
isEmptyObject:
|
|
192
|
-
isReadableStream:
|
|
193
|
-
isRequest:
|
|
194
|
-
isResponse:
|
|
195
|
-
isHeaders:
|
|
191
|
+
isEmptyObject: jt,
|
|
192
|
+
isReadableStream: Xt,
|
|
193
|
+
isRequest: Gt,
|
|
194
|
+
isResponse: Qt,
|
|
195
|
+
isHeaders: Yt,
|
|
196
196
|
isUndefined: J,
|
|
197
|
-
isDate:
|
|
198
|
-
isFile:
|
|
199
|
-
isBlob:
|
|
200
|
-
isRegExp:
|
|
197
|
+
isDate: $t,
|
|
198
|
+
isFile: Mt,
|
|
199
|
+
isBlob: Ht,
|
|
200
|
+
isRegExp: fn,
|
|
201
201
|
isFunction: O,
|
|
202
|
-
isStream:
|
|
203
|
-
isURLSearchParams:
|
|
204
|
-
isTypedArray:
|
|
205
|
-
isFileList:
|
|
202
|
+
isStream: Vt,
|
|
203
|
+
isURLSearchParams: Kt,
|
|
204
|
+
isTypedArray: an,
|
|
205
|
+
isFileList: Jt,
|
|
206
206
|
forEach: Z,
|
|
207
|
-
merge:
|
|
208
|
-
extend:
|
|
209
|
-
trim:
|
|
210
|
-
stripBOM:
|
|
211
|
-
inherits:
|
|
212
|
-
toFlatObject:
|
|
207
|
+
merge: Se,
|
|
208
|
+
extend: en,
|
|
209
|
+
trim: Zt,
|
|
210
|
+
stripBOM: tn,
|
|
211
|
+
inherits: nn,
|
|
212
|
+
toFlatObject: rn,
|
|
213
213
|
kindOf: le,
|
|
214
214
|
kindOfTest: B,
|
|
215
|
-
endsWith:
|
|
216
|
-
toArray:
|
|
217
|
-
forEachEntry:
|
|
218
|
-
matchAll:
|
|
219
|
-
isHTMLForm:
|
|
220
|
-
hasOwnProperty:
|
|
221
|
-
hasOwnProp:
|
|
215
|
+
endsWith: sn,
|
|
216
|
+
toArray: on,
|
|
217
|
+
forEachEntry: cn,
|
|
218
|
+
matchAll: un,
|
|
219
|
+
isHTMLForm: ln,
|
|
220
|
+
hasOwnProperty: ve,
|
|
221
|
+
hasOwnProp: ve,
|
|
222
222
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
|
-
reduceDescriptors:
|
|
224
|
-
freezeMethods:
|
|
225
|
-
toObjectSet:
|
|
226
|
-
toCamelCase:
|
|
227
|
-
noop:
|
|
228
|
-
toFiniteNumber:
|
|
229
|
-
findKey:
|
|
223
|
+
reduceDescriptors: it,
|
|
224
|
+
freezeMethods: pn,
|
|
225
|
+
toObjectSet: yn,
|
|
226
|
+
toCamelCase: dn,
|
|
227
|
+
noop: hn,
|
|
228
|
+
toFiniteNumber: mn,
|
|
229
|
+
findKey: st,
|
|
230
230
|
global: q,
|
|
231
|
-
isContextDefined:
|
|
232
|
-
isSpecCompliantForm:
|
|
233
|
-
toJSONObject:
|
|
234
|
-
isAsyncFn:
|
|
235
|
-
isThenable:
|
|
236
|
-
setImmediate:
|
|
237
|
-
asap:
|
|
238
|
-
isIterable:
|
|
231
|
+
isContextDefined: ot,
|
|
232
|
+
isSpecCompliantForm: wn,
|
|
233
|
+
toJSONObject: gn,
|
|
234
|
+
isAsyncFn: bn,
|
|
235
|
+
isThenable: En,
|
|
236
|
+
setImmediate: at,
|
|
237
|
+
asap: Sn,
|
|
238
|
+
isIterable: Cn
|
|
239
239
|
};
|
|
240
240
|
function m(e, t, n, r, s) {
|
|
241
241
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -261,7 +261,7 @@ a.inherits(m, Error, {
|
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
-
const
|
|
264
|
+
const ct = m.prototype, ut = {};
|
|
265
265
|
[
|
|
266
266
|
"ERR_BAD_OPTION_VALUE",
|
|
267
267
|
"ERR_BAD_OPTION",
|
|
@@ -277,34 +277,34 @@ const at = m.prototype, ct = {};
|
|
|
277
277
|
"ERR_INVALID_URL"
|
|
278
278
|
// eslint-disable-next-line func-names
|
|
279
279
|
].forEach((e) => {
|
|
280
|
-
|
|
280
|
+
ut[e] = { value: e };
|
|
281
281
|
});
|
|
282
|
-
Object.defineProperties(m,
|
|
283
|
-
Object.defineProperty(
|
|
282
|
+
Object.defineProperties(m, ut);
|
|
283
|
+
Object.defineProperty(ct, "isAxiosError", { value: !0 });
|
|
284
284
|
m.from = (e, t, n, r, s, o) => {
|
|
285
|
-
const i = Object.create(
|
|
285
|
+
const i = Object.create(ct);
|
|
286
286
|
a.toFlatObject(e, i, function(l) {
|
|
287
287
|
return l !== Error.prototype;
|
|
288
288
|
}, (u) => u !== "isAxiosError");
|
|
289
289
|
const c = e && e.message ? e.message : "Error", f = t == null && e ? e.code : t;
|
|
290
290
|
return m.call(i, c, f, n, r, s), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", o && Object.assign(i, o), i;
|
|
291
291
|
};
|
|
292
|
-
const
|
|
293
|
-
function
|
|
292
|
+
const An = null;
|
|
293
|
+
function Ce(e) {
|
|
294
294
|
return a.isPlainObject(e) || a.isArray(e);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function lt(e) {
|
|
297
297
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function ze(e, t, n) {
|
|
300
300
|
return e ? e.concat(t).map(function(s, o) {
|
|
301
|
-
return s =
|
|
301
|
+
return s = lt(s), !n && o ? "[" + s + "]" : s;
|
|
302
302
|
}).join(n ? "." : "") : t;
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
return a.isArray(e) && !e.some(
|
|
304
|
+
function Rn(e) {
|
|
305
|
+
return a.isArray(e) && !e.some(Ce);
|
|
306
306
|
}
|
|
307
|
-
const
|
|
307
|
+
const On = a.toFlatObject(a, {}, null, function(t) {
|
|
308
308
|
return /^is[A-Z]/.test(t);
|
|
309
309
|
});
|
|
310
310
|
function fe(e, t, n) {
|
|
@@ -335,21 +335,21 @@ function fe(e, t, n) {
|
|
|
335
335
|
if (d && !y && typeof d == "object") {
|
|
336
336
|
if (a.endsWith(h, "{}"))
|
|
337
337
|
h = r ? h : h.slice(0, -2), d = JSON.stringify(d);
|
|
338
|
-
else if (a.isArray(d) &&
|
|
339
|
-
return h =
|
|
338
|
+
else if (a.isArray(d) && Rn(d) || (a.isFileList(d) || a.endsWith(h, "[]")) && (b = a.toArray(d)))
|
|
339
|
+
return h = lt(h), b.forEach(function(E, R) {
|
|
340
340
|
!(a.isUndefined(E) || E === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
|
-
i === !0 ?
|
|
342
|
+
i === !0 ? ze([h], R, o) : i === null ? h : h + "[]",
|
|
343
343
|
u(E)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
347
|
-
return
|
|
347
|
+
return Ce(d) ? !0 : (t.append(ze(y, h, o), u(d)), !1);
|
|
348
348
|
}
|
|
349
|
-
const p = [], w = Object.assign(
|
|
349
|
+
const p = [], w = Object.assign(On, {
|
|
350
350
|
defaultVisitor: l,
|
|
351
351
|
convertValue: u,
|
|
352
|
-
isVisitable:
|
|
352
|
+
isVisitable: Ce
|
|
353
353
|
});
|
|
354
354
|
function S(d, h) {
|
|
355
355
|
if (!a.isUndefined(d)) {
|
|
@@ -370,7 +370,7 @@ function fe(e, t, n) {
|
|
|
370
370
|
throw new TypeError("data must be an object");
|
|
371
371
|
return S(e), t;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function qe(e) {
|
|
374
374
|
const t = {
|
|
375
375
|
"!": "%21",
|
|
376
376
|
"'": "%27",
|
|
@@ -384,40 +384,40 @@ function ze(e) {
|
|
|
384
384
|
return t[r];
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
387
|
+
function xe(e, t) {
|
|
388
388
|
this._pairs = [], e && fe(e, this, t);
|
|
389
389
|
}
|
|
390
|
-
const
|
|
391
|
-
|
|
390
|
+
const dt = xe.prototype;
|
|
391
|
+
dt.append = function(t, n) {
|
|
392
392
|
this._pairs.push([t, n]);
|
|
393
393
|
};
|
|
394
|
-
|
|
394
|
+
dt.toString = function(t) {
|
|
395
395
|
const n = t ? function(r) {
|
|
396
|
-
return t.call(this, r,
|
|
397
|
-
} :
|
|
396
|
+
return t.call(this, r, qe);
|
|
397
|
+
} : qe;
|
|
398
398
|
return this._pairs.map(function(s) {
|
|
399
399
|
return n(s[0]) + "=" + n(s[1]);
|
|
400
400
|
}, "").join("&");
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function In(e) {
|
|
403
403
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function ft(e, t, n) {
|
|
406
406
|
if (!t)
|
|
407
407
|
return e;
|
|
408
|
-
const r = n && n.encode ||
|
|
408
|
+
const r = n && n.encode || In;
|
|
409
409
|
a.isFunction(n) && (n = {
|
|
410
410
|
serialize: n
|
|
411
411
|
});
|
|
412
412
|
const s = n && n.serialize;
|
|
413
413
|
let o;
|
|
414
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
414
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new xe(t, n).toString(r), o) {
|
|
415
415
|
const i = e.indexOf("#");
|
|
416
416
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
417
417
|
}
|
|
418
418
|
return e;
|
|
419
419
|
}
|
|
420
|
-
class
|
|
420
|
+
class je {
|
|
421
421
|
constructor() {
|
|
422
422
|
this.handlers = [];
|
|
423
423
|
}
|
|
@@ -471,31 +471,31 @@ class qe {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const pt = {
|
|
475
475
|
silentJSONParsing: !0,
|
|
476
476
|
forcedJSONParsing: !0,
|
|
477
477
|
clarifyTimeoutError: !1
|
|
478
|
-
},
|
|
478
|
+
}, Tn = typeof URLSearchParams < "u" ? URLSearchParams : xe, Nn = typeof FormData < "u" ? FormData : null, xn = typeof Blob < "u" ? Blob : null, Bn = {
|
|
479
479
|
isBrowser: !0,
|
|
480
480
|
classes: {
|
|
481
|
-
URLSearchParams:
|
|
482
|
-
FormData:
|
|
483
|
-
Blob:
|
|
481
|
+
URLSearchParams: Tn,
|
|
482
|
+
FormData: Nn,
|
|
483
|
+
Blob: xn
|
|
484
484
|
},
|
|
485
485
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
486
|
-
},
|
|
487
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
486
|
+
}, Be = typeof window < "u" && typeof document < "u", Ae = typeof navigator == "object" && navigator || void 0, Pn = Be && (!Ae || ["ReactNative", "NativeScript", "NS"].indexOf(Ae.product) < 0), Ln = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
487
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Fn = Be && window.location.href || "http://localhost", _n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
488
|
__proto__: null,
|
|
489
|
-
hasBrowserEnv:
|
|
490
|
-
hasStandardBrowserEnv:
|
|
491
|
-
hasStandardBrowserWebWorkerEnv:
|
|
492
|
-
navigator:
|
|
493
|
-
origin:
|
|
489
|
+
hasBrowserEnv: Be,
|
|
490
|
+
hasStandardBrowserEnv: Pn,
|
|
491
|
+
hasStandardBrowserWebWorkerEnv: Ln,
|
|
492
|
+
navigator: Ae,
|
|
493
|
+
origin: Fn
|
|
494
494
|
}, Symbol.toStringTag, { value: "Module" })), C = {
|
|
495
|
-
...
|
|
496
|
-
...
|
|
495
|
+
..._n,
|
|
496
|
+
...Bn
|
|
497
497
|
};
|
|
498
|
-
function
|
|
498
|
+
function kn(e, t) {
|
|
499
499
|
return fe(e, new C.classes.URLSearchParams(), {
|
|
500
500
|
visitor: function(n, r, s, o) {
|
|
501
501
|
return C.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
@@ -503,10 +503,10 @@ function _n(e, t) {
|
|
|
503
503
|
...t
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Un(e) {
|
|
507
507
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Dn(e) {
|
|
510
510
|
const t = {}, n = Object.keys(e);
|
|
511
511
|
let r;
|
|
512
512
|
const s = n.length;
|
|
@@ -515,22 +515,22 @@ function Un(e) {
|
|
|
515
515
|
o = n[r], t[o] = e[o];
|
|
516
516
|
return t;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function yt(e) {
|
|
519
519
|
function t(n, r, s, o) {
|
|
520
520
|
let i = n[o++];
|
|
521
521
|
if (i === "__proto__") return !0;
|
|
522
522
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
523
|
-
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] =
|
|
523
|
+
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] = Dn(s[i])), !c);
|
|
524
524
|
}
|
|
525
525
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
526
526
|
const n = {};
|
|
527
527
|
return a.forEachEntry(e, (r, s) => {
|
|
528
|
-
t(
|
|
528
|
+
t(Un(r), s, n, 0);
|
|
529
529
|
}), n;
|
|
530
530
|
}
|
|
531
531
|
return null;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function vn(e, t, n) {
|
|
534
534
|
if (a.isString(e))
|
|
535
535
|
try {
|
|
536
536
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -541,12 +541,12 @@ function Dn(e, t, n) {
|
|
|
541
541
|
return (n || JSON.stringify)(e);
|
|
542
542
|
}
|
|
543
543
|
const ee = {
|
|
544
|
-
transitional:
|
|
544
|
+
transitional: pt,
|
|
545
545
|
adapter: ["xhr", "http", "fetch"],
|
|
546
546
|
transformRequest: [function(t, n) {
|
|
547
547
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
548
548
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
549
|
-
return s ? JSON.stringify(
|
|
549
|
+
return s ? JSON.stringify(yt(t)) : t;
|
|
550
550
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
551
551
|
return t;
|
|
552
552
|
if (a.isArrayBufferView(t))
|
|
@@ -556,7 +556,7 @@ const ee = {
|
|
|
556
556
|
let c;
|
|
557
557
|
if (o) {
|
|
558
558
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
559
|
-
return
|
|
559
|
+
return kn(t, this.formSerializer).toString();
|
|
560
560
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
561
561
|
const f = this.env && this.env.FormData;
|
|
562
562
|
return fe(
|
|
@@ -566,7 +566,7 @@ const ee = {
|
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
569
|
+
return o || s ? (n.setContentType("application/json", !1), vn(t)) : t;
|
|
570
570
|
}],
|
|
571
571
|
transformResponse: [function(t) {
|
|
572
572
|
const n = this.transitional || ee.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -609,7 +609,7 @@ const ee = {
|
|
|
609
609
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
610
610
|
ee.headers[e] = {};
|
|
611
611
|
});
|
|
612
|
-
const
|
|
612
|
+
const zn = a.toObjectSet([
|
|
613
613
|
"age",
|
|
614
614
|
"authorization",
|
|
615
615
|
"content-length",
|
|
@@ -627,28 +627,28 @@ const vn = a.toObjectSet([
|
|
|
627
627
|
"referer",
|
|
628
628
|
"retry-after",
|
|
629
629
|
"user-agent"
|
|
630
|
-
]),
|
|
630
|
+
]), qn = (e) => {
|
|
631
631
|
const t = {};
|
|
632
632
|
let n, r, s;
|
|
633
633
|
return e && e.split(`
|
|
634
634
|
`).forEach(function(i) {
|
|
635
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
635
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && zn[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
|
-
},
|
|
637
|
+
}, $e = /* @__PURE__ */ Symbol("internals");
|
|
638
638
|
function X(e) {
|
|
639
639
|
return e && String(e).trim().toLowerCase();
|
|
640
640
|
}
|
|
641
641
|
function ie(e) {
|
|
642
642
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ie) : String(e);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function jn(e) {
|
|
645
645
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
646
646
|
let r;
|
|
647
647
|
for (; r = n.exec(e); )
|
|
648
648
|
t[r[1]] = r[2];
|
|
649
649
|
return t;
|
|
650
650
|
}
|
|
651
|
-
const
|
|
651
|
+
const $n = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
652
652
|
function we(e, t, n, r, s) {
|
|
653
653
|
if (a.isFunction(r))
|
|
654
654
|
return r.call(this, t, n);
|
|
@@ -659,10 +659,10 @@ function we(e, t, n, r, s) {
|
|
|
659
659
|
return r.test(t);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Mn(e) {
|
|
663
663
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function Hn(e, t) {
|
|
666
666
|
const n = a.toCamelCase(" " + t);
|
|
667
667
|
["get", "set", "has"].forEach((r) => {
|
|
668
668
|
Object.defineProperty(e, r + n, {
|
|
@@ -689,8 +689,8 @@ let I = class {
|
|
|
689
689
|
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
690
690
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
691
691
|
i(t, n);
|
|
692
|
-
else if (a.isString(t) && (t = t.trim()) &&
|
|
693
|
-
i(
|
|
692
|
+
else if (a.isString(t) && (t = t.trim()) && !$n(t))
|
|
693
|
+
i(qn(t), n);
|
|
694
694
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
695
695
|
let c = {}, f, u;
|
|
696
696
|
for (const l of t) {
|
|
@@ -711,7 +711,7 @@ let I = class {
|
|
|
711
711
|
if (!n)
|
|
712
712
|
return s;
|
|
713
713
|
if (n === !0)
|
|
714
|
-
return
|
|
714
|
+
return jn(s);
|
|
715
715
|
if (a.isFunction(n))
|
|
716
716
|
return n.call(this, s, r);
|
|
717
717
|
if (a.isRegExp(n))
|
|
@@ -755,7 +755,7 @@ let I = class {
|
|
|
755
755
|
n[i] = ie(s), delete n[o];
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
|
-
const c = t ?
|
|
758
|
+
const c = t ? Mn(o) : String(o).trim();
|
|
759
759
|
c !== o && delete n[o], n[c] = ie(s), r[c] = !0;
|
|
760
760
|
}), this;
|
|
761
761
|
}
|
|
@@ -789,12 +789,12 @@ let I = class {
|
|
|
789
789
|
return n.forEach((s) => r.set(s)), r;
|
|
790
790
|
}
|
|
791
791
|
static accessor(t) {
|
|
792
|
-
const r = (this[
|
|
792
|
+
const r = (this[$e] = this[$e] = {
|
|
793
793
|
accessors: {}
|
|
794
794
|
}).accessors, s = this.prototype;
|
|
795
795
|
function o(i) {
|
|
796
796
|
const c = X(i);
|
|
797
|
-
r[c] || (
|
|
797
|
+
r[c] || (Hn(s, i), r[c] = !0);
|
|
798
798
|
}
|
|
799
799
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
800
800
|
}
|
|
@@ -817,7 +817,7 @@ function ge(e, t) {
|
|
|
817
817
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
818
818
|
}), s.normalize(), o;
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function ht(e) {
|
|
821
821
|
return !!(e && e.__CANCEL__);
|
|
822
822
|
}
|
|
823
823
|
function W(e, t, n) {
|
|
@@ -826,7 +826,7 @@ function W(e, t, n) {
|
|
|
826
826
|
a.inherits(W, m, {
|
|
827
827
|
__CANCEL__: !0
|
|
828
828
|
});
|
|
829
|
-
function
|
|
829
|
+
function mt(e, t, n) {
|
|
830
830
|
const r = n.config.validateStatus;
|
|
831
831
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
832
832
|
"Request failed with status code " + n.status,
|
|
@@ -836,11 +836,11 @@ function ht(e, t, n) {
|
|
|
836
836
|
n
|
|
837
837
|
));
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Jn(e) {
|
|
840
840
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
841
841
|
return t && t[1] || "";
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Vn(e, t) {
|
|
844
844
|
e = e || 10;
|
|
845
845
|
const n = new Array(e), r = new Array(e);
|
|
846
846
|
let s = 0, o = 0, i;
|
|
@@ -856,7 +856,7 @@ function Jn(e, t) {
|
|
|
856
856
|
return S ? Math.round(w * 1e3 / S) : void 0;
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function Wn(e, t) {
|
|
860
860
|
let n = 0, r = 1e3 / t, s, o;
|
|
861
861
|
const i = (u, l = Date.now()) => {
|
|
862
862
|
n = l, s = null, o && (clearTimeout(o), o = null), e(...u);
|
|
@@ -870,8 +870,8 @@ function Vn(e, t) {
|
|
|
870
870
|
}
|
|
871
871
|
const ce = (e, t, n = 3) => {
|
|
872
872
|
let r = 0;
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
873
|
+
const s = Vn(50, 250);
|
|
874
|
+
return Wn((o) => {
|
|
875
875
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
876
876
|
r = i;
|
|
877
877
|
const p = {
|
|
@@ -887,17 +887,17 @@ const ce = (e, t, n = 3) => {
|
|
|
887
887
|
};
|
|
888
888
|
e(p);
|
|
889
889
|
}, n);
|
|
890
|
-
},
|
|
890
|
+
}, Me = (e, t) => {
|
|
891
891
|
const n = e != null;
|
|
892
892
|
return [(r) => t[0]({
|
|
893
893
|
lengthComputable: n,
|
|
894
894
|
total: e,
|
|
895
895
|
loaded: r
|
|
896
896
|
}), t[1]];
|
|
897
|
-
},
|
|
897
|
+
}, He = (e) => (...t) => a.asap(() => e(...t)), Kn = C.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, C.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
898
898
|
new URL(C.origin),
|
|
899
899
|
C.navigator && /(msie|trident)/i.test(C.navigator.userAgent)
|
|
900
|
-
) : () => !0,
|
|
900
|
+
) : () => !0, Xn = C.hasStandardBrowserEnv ? (
|
|
901
901
|
// Standard browser envs support document.cookie
|
|
902
902
|
{
|
|
903
903
|
write(e, t, n, r, s, o, i) {
|
|
@@ -926,17 +926,17 @@ const ce = (e, t, n = 3) => {
|
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
);
|
|
929
|
-
function
|
|
929
|
+
function Gn(e) {
|
|
930
930
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
931
931
|
}
|
|
932
|
-
function
|
|
932
|
+
function Qn(e, t) {
|
|
933
933
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
934
934
|
}
|
|
935
|
-
function
|
|
936
|
-
let r = !
|
|
937
|
-
return e && (r || n == !1) ?
|
|
935
|
+
function wt(e, t, n) {
|
|
936
|
+
let r = !Gn(t);
|
|
937
|
+
return e && (r || n == !1) ? Qn(e, t) : t;
|
|
938
938
|
}
|
|
939
|
-
const
|
|
939
|
+
const Je = (e) => e instanceof I ? { ...e } : e;
|
|
940
940
|
function $(e, t) {
|
|
941
941
|
t = t || {};
|
|
942
942
|
const n = {};
|
|
@@ -994,17 +994,17 @@ function $(e, t) {
|
|
|
994
994
|
socketPath: i,
|
|
995
995
|
responseEncoding: i,
|
|
996
996
|
validateStatus: c,
|
|
997
|
-
headers: (u, l, p) => s(
|
|
997
|
+
headers: (u, l, p) => s(Je(u), Je(l), p, !0)
|
|
998
998
|
};
|
|
999
999
|
return a.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
1000
1000
|
const p = f[l] || s, w = p(e[l], t[l], l);
|
|
1001
1001
|
a.isUndefined(w) && p !== c || (n[l] = w);
|
|
1002
1002
|
}), n;
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1004
|
+
const gt = (e) => {
|
|
1005
1005
|
const t = $({}, e);
|
|
1006
1006
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1007
|
-
if (t.headers = i = I.from(i), t.url =
|
|
1007
|
+
if (t.headers = i = I.from(i), t.url = ft(wt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1008
1008
|
"Authorization",
|
|
1009
1009
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1010
1010
|
), a.isFormData(n)) {
|
|
@@ -1017,14 +1017,14 @@ const wt = (e) => {
|
|
|
1017
1017
|
});
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
|
-
if (C.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1021
|
-
const f = s && o &&
|
|
1020
|
+
if (C.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Kn(t.url))) {
|
|
1021
|
+
const f = s && o && Xn.read(o);
|
|
1022
1022
|
f && i.set(s, f);
|
|
1023
1023
|
}
|
|
1024
1024
|
return t;
|
|
1025
|
-
},
|
|
1025
|
+
}, Yn = typeof XMLHttpRequest < "u", Zn = Yn && function(e) {
|
|
1026
1026
|
return new Promise(function(n, r) {
|
|
1027
|
-
const s =
|
|
1027
|
+
const s = gt(e);
|
|
1028
1028
|
let o = s.data;
|
|
1029
1029
|
const i = I.from(s.headers).normalize();
|
|
1030
1030
|
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, p, w, S, d;
|
|
@@ -1046,7 +1046,7 @@ const wt = (e) => {
|
|
|
1046
1046
|
config: e,
|
|
1047
1047
|
request: y
|
|
1048
1048
|
};
|
|
1049
|
-
|
|
1049
|
+
mt(function(N) {
|
|
1050
1050
|
n(N), h();
|
|
1051
1051
|
}, function(N) {
|
|
1052
1052
|
r(N), h();
|
|
@@ -1061,7 +1061,7 @@ const wt = (e) => {
|
|
|
1061
1061
|
v.event = R || null, r(v), y = null;
|
|
1062
1062
|
}, y.ontimeout = function() {
|
|
1063
1063
|
let R = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1064
|
-
const x = s.transitional ||
|
|
1064
|
+
const x = s.transitional || pt;
|
|
1065
1065
|
s.timeoutErrorMessage && (R = s.timeoutErrorMessage), r(new m(
|
|
1066
1066
|
R,
|
|
1067
1067
|
x.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
@@ -1073,14 +1073,14 @@ const wt = (e) => {
|
|
|
1073
1073
|
}), a.isUndefined(s.withCredentials) || (y.withCredentials = !!s.withCredentials), c && c !== "json" && (y.responseType = s.responseType), u && ([w, d] = ce(u, !0), y.addEventListener("progress", w)), f && y.upload && ([p, S] = ce(f), y.upload.addEventListener("progress", p), y.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (l = (E) => {
|
|
1074
1074
|
y && (r(!E || E.type ? new W(null, e, y) : E), y.abort(), y = null);
|
|
1075
1075
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1076
|
-
const T =
|
|
1076
|
+
const T = Jn(s.url);
|
|
1077
1077
|
if (T && C.protocols.indexOf(T) === -1) {
|
|
1078
1078
|
r(new m("Unsupported protocol " + T + ":", m.ERR_BAD_REQUEST, e));
|
|
1079
1079
|
return;
|
|
1080
1080
|
}
|
|
1081
1081
|
y.send(o || null);
|
|
1082
1082
|
});
|
|
1083
|
-
},
|
|
1083
|
+
}, er = (e, t) => {
|
|
1084
1084
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1085
1085
|
if (t || n) {
|
|
1086
1086
|
let r = new AbortController(), s;
|
|
@@ -1103,7 +1103,7 @@ const wt = (e) => {
|
|
|
1103
1103
|
const { signal: f } = r;
|
|
1104
1104
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1105
1105
|
}
|
|
1106
|
-
},
|
|
1106
|
+
}, tr = function* (e, t) {
|
|
1107
1107
|
let n = e.byteLength;
|
|
1108
1108
|
if (n < t) {
|
|
1109
1109
|
yield e;
|
|
@@ -1112,10 +1112,10 @@ const wt = (e) => {
|
|
|
1112
1112
|
let r = 0, s;
|
|
1113
1113
|
for (; r < n; )
|
|
1114
1114
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1115
|
-
},
|
|
1116
|
-
for await (const n of
|
|
1117
|
-
yield*
|
|
1118
|
-
},
|
|
1115
|
+
}, nr = async function* (e, t) {
|
|
1116
|
+
for await (const n of rr(e))
|
|
1117
|
+
yield* tr(n, t);
|
|
1118
|
+
}, rr = async function* (e) {
|
|
1119
1119
|
if (e[Symbol.asyncIterator]) {
|
|
1120
1120
|
yield* e;
|
|
1121
1121
|
return;
|
|
@@ -1131,8 +1131,8 @@ const wt = (e) => {
|
|
|
1131
1131
|
} finally {
|
|
1132
1132
|
await t.cancel();
|
|
1133
1133
|
}
|
|
1134
|
-
},
|
|
1135
|
-
const s =
|
|
1134
|
+
}, Ve = (e, t, n, r) => {
|
|
1135
|
+
const s = nr(e, t);
|
|
1136
1136
|
let o = 0, i, c = (f) => {
|
|
1137
1137
|
i || (i = !0, r && r(f));
|
|
1138
1138
|
};
|
|
@@ -1160,36 +1160,36 @@ const wt = (e) => {
|
|
|
1160
1160
|
}, {
|
|
1161
1161
|
highWaterMark: 2
|
|
1162
1162
|
});
|
|
1163
|
-
},
|
|
1163
|
+
}, We = 64 * 1024, { isFunction: se } = a, sr = (({ Request: e, Response: t }) => ({
|
|
1164
1164
|
Request: e,
|
|
1165
1165
|
Response: t
|
|
1166
1166
|
}))(a.global), {
|
|
1167
|
-
ReadableStream:
|
|
1168
|
-
TextEncoder:
|
|
1169
|
-
} = a.global,
|
|
1167
|
+
ReadableStream: Ke,
|
|
1168
|
+
TextEncoder: Xe
|
|
1169
|
+
} = a.global, Ge = (e, ...t) => {
|
|
1170
1170
|
try {
|
|
1171
1171
|
return !!e(...t);
|
|
1172
1172
|
} catch {
|
|
1173
1173
|
return !1;
|
|
1174
1174
|
}
|
|
1175
|
-
},
|
|
1175
|
+
}, or = (e) => {
|
|
1176
1176
|
e = a.merge.call({
|
|
1177
1177
|
skipUndefined: !0
|
|
1178
|
-
},
|
|
1178
|
+
}, sr, e);
|
|
1179
1179
|
const { fetch: t, Request: n, Response: r } = e, s = t ? se(t) : typeof fetch == "function", o = se(n), i = se(r);
|
|
1180
1180
|
if (!s)
|
|
1181
1181
|
return !1;
|
|
1182
|
-
const c = s && se(
|
|
1182
|
+
const c = s && se(Ke), f = s && (typeof Xe == "function" ? /* @__PURE__ */ ((d) => (h) => d.encode(h))(new Xe()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), u = o && c && Ge(() => {
|
|
1183
1183
|
let d = !1;
|
|
1184
1184
|
const h = new n(C.origin, {
|
|
1185
|
-
body: new
|
|
1185
|
+
body: new Ke(),
|
|
1186
1186
|
method: "POST",
|
|
1187
1187
|
get duplex() {
|
|
1188
1188
|
return d = !0, "half";
|
|
1189
1189
|
}
|
|
1190
1190
|
}).headers.has("Content-Type");
|
|
1191
1191
|
return d && !h;
|
|
1192
|
-
}), l = i && c &&
|
|
1192
|
+
}), l = i && c && Ge(() => a.isReadableStream(new r("").body)), p = {
|
|
1193
1193
|
stream: l && ((d) => d.body)
|
|
1194
1194
|
};
|
|
1195
1195
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
@@ -1231,32 +1231,32 @@ const wt = (e) => {
|
|
|
1231
1231
|
responseType: N,
|
|
1232
1232
|
headers: he,
|
|
1233
1233
|
withCredentials: te = "same-origin",
|
|
1234
|
-
fetchOptions:
|
|
1235
|
-
} =
|
|
1234
|
+
fetchOptions: Le
|
|
1235
|
+
} = gt(d), Fe = t || fetch;
|
|
1236
1236
|
N = N ? (N + "").toLowerCase() : "text";
|
|
1237
|
-
let ne =
|
|
1237
|
+
let ne = er([T, E && E.toAbortSignal()], R), K = null;
|
|
1238
1238
|
const z = ne && ne.unsubscribe && (() => {
|
|
1239
1239
|
ne.unsubscribe();
|
|
1240
1240
|
});
|
|
1241
|
-
let
|
|
1241
|
+
let _e;
|
|
1242
1242
|
try {
|
|
1243
|
-
if (v && u && y !== "get" && y !== "head" && (
|
|
1243
|
+
if (v && u && y !== "get" && y !== "head" && (_e = await S(he, b)) !== 0) {
|
|
1244
1244
|
let D = new n(h, {
|
|
1245
1245
|
method: "POST",
|
|
1246
1246
|
body: b,
|
|
1247
1247
|
duplex: "half"
|
|
1248
1248
|
}), M;
|
|
1249
1249
|
if (a.isFormData(b) && (M = D.headers.get("content-type")) && he.setContentType(M), D.body) {
|
|
1250
|
-
const [me, re] =
|
|
1251
|
-
|
|
1252
|
-
ce(
|
|
1250
|
+
const [me, re] = Me(
|
|
1251
|
+
_e,
|
|
1252
|
+
ce(He(v))
|
|
1253
1253
|
);
|
|
1254
|
-
b =
|
|
1254
|
+
b = Ve(D.body, We, me, re);
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
1257
|
a.isString(te) || (te = te ? "include" : "omit");
|
|
1258
|
-
const P = o && "credentials" in n.prototype,
|
|
1259
|
-
...
|
|
1258
|
+
const P = o && "credentials" in n.prototype, ke = {
|
|
1259
|
+
...Le,
|
|
1260
1260
|
signal: ne,
|
|
1261
1261
|
method: y.toUpperCase(),
|
|
1262
1262
|
headers: he.normalize().toJSON(),
|
|
@@ -1264,30 +1264,30 @@ const wt = (e) => {
|
|
|
1264
1264
|
duplex: "half",
|
|
1265
1265
|
credentials: P ? te : void 0
|
|
1266
1266
|
};
|
|
1267
|
-
K = o && new n(h,
|
|
1268
|
-
let U = await (o ?
|
|
1269
|
-
const
|
|
1270
|
-
if (l && (x ||
|
|
1267
|
+
K = o && new n(h, ke);
|
|
1268
|
+
let U = await (o ? Fe(K, Le) : Fe(h, ke));
|
|
1269
|
+
const Ue = l && (N === "stream" || N === "response");
|
|
1270
|
+
if (l && (x || Ue && z)) {
|
|
1271
1271
|
const D = {};
|
|
1272
|
-
["status", "statusText", "headers"].forEach((
|
|
1273
|
-
D[
|
|
1272
|
+
["status", "statusText", "headers"].forEach((De) => {
|
|
1273
|
+
D[De] = U[De];
|
|
1274
1274
|
});
|
|
1275
|
-
const M = a.toFiniteNumber(U.headers.get("content-length")), [me, re] = x &&
|
|
1275
|
+
const M = a.toFiniteNumber(U.headers.get("content-length")), [me, re] = x && Me(
|
|
1276
1276
|
M,
|
|
1277
|
-
ce(
|
|
1277
|
+
ce(He(x), !0)
|
|
1278
1278
|
) || [];
|
|
1279
1279
|
U = new r(
|
|
1280
|
-
|
|
1280
|
+
Ve(U.body, We, me, () => {
|
|
1281
1281
|
re && re(), z && z();
|
|
1282
1282
|
}),
|
|
1283
1283
|
D
|
|
1284
1284
|
);
|
|
1285
1285
|
}
|
|
1286
1286
|
N = N || "text";
|
|
1287
|
-
let
|
|
1288
|
-
return !
|
|
1289
|
-
|
|
1290
|
-
data:
|
|
1287
|
+
let kt = await p[a.findKey(p, N) || "text"](U, d);
|
|
1288
|
+
return !Ue && z && z(), await new Promise((D, M) => {
|
|
1289
|
+
mt(D, M, {
|
|
1290
|
+
data: kt,
|
|
1291
1291
|
headers: I.from(U.headers),
|
|
1292
1292
|
status: U.status,
|
|
1293
1293
|
statusText: U.statusText,
|
|
@@ -1304,27 +1304,27 @@ const wt = (e) => {
|
|
|
1304
1304
|
) : m.from(P, P && P.code, d, K);
|
|
1305
1305
|
}
|
|
1306
1306
|
};
|
|
1307
|
-
},
|
|
1307
|
+
}, ir = /* @__PURE__ */ new Map(), bt = (e) => {
|
|
1308
1308
|
let t = e && e.env || {};
|
|
1309
1309
|
const { fetch: n, Request: r, Response: s } = t, o = [
|
|
1310
1310
|
r,
|
|
1311
1311
|
s,
|
|
1312
1312
|
n
|
|
1313
1313
|
];
|
|
1314
|
-
let i = o.length, c = i, f, u, l =
|
|
1314
|
+
let i = o.length, c = i, f, u, l = ir;
|
|
1315
1315
|
for (; c--; )
|
|
1316
|
-
f = o[c], u = l.get(f), u === void 0 && l.set(f, u = c ? /* @__PURE__ */ new Map() :
|
|
1316
|
+
f = o[c], u = l.get(f), u === void 0 && l.set(f, u = c ? /* @__PURE__ */ new Map() : or(t)), l = u;
|
|
1317
1317
|
return u;
|
|
1318
1318
|
};
|
|
1319
|
-
|
|
1320
|
-
const
|
|
1321
|
-
http:
|
|
1322
|
-
xhr:
|
|
1319
|
+
bt();
|
|
1320
|
+
const Pe = {
|
|
1321
|
+
http: An,
|
|
1322
|
+
xhr: Zn,
|
|
1323
1323
|
fetch: {
|
|
1324
|
-
get:
|
|
1324
|
+
get: bt
|
|
1325
1325
|
}
|
|
1326
1326
|
};
|
|
1327
|
-
a.forEach(
|
|
1327
|
+
a.forEach(Pe, (e, t) => {
|
|
1328
1328
|
if (e) {
|
|
1329
1329
|
try {
|
|
1330
1330
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1333,8 +1333,8 @@ a.forEach(Be, (e, t) => {
|
|
|
1333
1333
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1334
1334
|
}
|
|
1335
1335
|
});
|
|
1336
|
-
const
|
|
1337
|
-
function
|
|
1336
|
+
const Qe = (e) => `- ${e}`, ar = (e) => a.isFunction(e) || e === null || e === !1;
|
|
1337
|
+
function cr(e, t) {
|
|
1338
1338
|
e = a.isArray(e) ? e : [e];
|
|
1339
1339
|
const { length: n } = e;
|
|
1340
1340
|
let r, s;
|
|
@@ -1342,7 +1342,7 @@ function ar(e, t) {
|
|
|
1342
1342
|
for (let i = 0; i < n; i++) {
|
|
1343
1343
|
r = e[i];
|
|
1344
1344
|
let c;
|
|
1345
|
-
if (s = r, !
|
|
1345
|
+
if (s = r, !ar(r) && (s = Pe[(c = String(r)).toLowerCase()], s === void 0))
|
|
1346
1346
|
throw new m(`Unknown adapter '${c}'`);
|
|
1347
1347
|
if (s && (a.isFunction(s) || (s = s.get(t))))
|
|
1348
1348
|
break;
|
|
@@ -1353,8 +1353,8 @@ function ar(e, t) {
|
|
|
1353
1353
|
([f, u]) => `adapter ${f} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1354
1354
|
);
|
|
1355
1355
|
let c = n ? i.length > 1 ? `since :
|
|
1356
|
-
` + i.map(
|
|
1357
|
-
`) : " " +
|
|
1356
|
+
` + i.map(Qe).join(`
|
|
1357
|
+
`) : " " + Qe(i[0]) : "as no adapter specified";
|
|
1358
1358
|
throw new m(
|
|
1359
1359
|
"There is no suitable adapter to dispatch the request " + c,
|
|
1360
1360
|
"ERR_NOT_SUPPORT"
|
|
@@ -1362,50 +1362,50 @@ function ar(e, t) {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
return s;
|
|
1364
1364
|
}
|
|
1365
|
-
const
|
|
1365
|
+
const Et = {
|
|
1366
1366
|
/**
|
|
1367
1367
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1368
1368
|
* @type {Function}
|
|
1369
1369
|
*/
|
|
1370
|
-
getAdapter:
|
|
1370
|
+
getAdapter: cr,
|
|
1371
1371
|
/**
|
|
1372
1372
|
* Exposes all known adapters
|
|
1373
1373
|
* @type {Object<string, Function|Object>}
|
|
1374
1374
|
*/
|
|
1375
|
-
adapters:
|
|
1375
|
+
adapters: Pe
|
|
1376
1376
|
};
|
|
1377
1377
|
function be(e) {
|
|
1378
1378
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1379
1379
|
throw new W(null, e);
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function Ye(e) {
|
|
1382
1382
|
return be(e), e.headers = I.from(e.headers), e.data = ge.call(
|
|
1383
1383
|
e,
|
|
1384
1384
|
e.transformRequest
|
|
1385
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1385
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Et.getAdapter(e.adapter || ee.adapter, e)(e).then(function(r) {
|
|
1386
1386
|
return be(e), r.data = ge.call(
|
|
1387
1387
|
e,
|
|
1388
1388
|
e.transformResponse,
|
|
1389
1389
|
r
|
|
1390
1390
|
), r.headers = I.from(r.headers), r;
|
|
1391
1391
|
}, function(r) {
|
|
1392
|
-
return
|
|
1392
|
+
return ht(r) || (be(e), r && r.response && (r.response.data = ge.call(
|
|
1393
1393
|
e,
|
|
1394
1394
|
e.transformResponse,
|
|
1395
1395
|
r.response
|
|
1396
1396
|
), r.response.headers = I.from(r.response.headers))), Promise.reject(r);
|
|
1397
1397
|
});
|
|
1398
1398
|
}
|
|
1399
|
-
const
|
|
1399
|
+
const St = "1.13.2", pe = {};
|
|
1400
1400
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1401
1401
|
pe[e] = function(r) {
|
|
1402
1402
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1403
1403
|
};
|
|
1404
1404
|
});
|
|
1405
|
-
const
|
|
1405
|
+
const Ze = {};
|
|
1406
1406
|
pe.transitional = function(t, n, r) {
|
|
1407
1407
|
function s(o, i) {
|
|
1408
|
-
return "[Axios v" +
|
|
1408
|
+
return "[Axios v" + St + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1409
1409
|
}
|
|
1410
1410
|
return (o, i, c) => {
|
|
1411
1411
|
if (t === !1)
|
|
@@ -1413,7 +1413,7 @@ pe.transitional = function(t, n, r) {
|
|
|
1413
1413
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1414
1414
|
m.ERR_DEPRECATED
|
|
1415
1415
|
);
|
|
1416
|
-
return n && !
|
|
1416
|
+
return n && !Ze[i] && (Ze[i] = !0, console.warn(
|
|
1417
1417
|
s(
|
|
1418
1418
|
i,
|
|
1419
1419
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1424,7 +1424,7 @@ pe.transitional = function(t, n, r) {
|
|
|
1424
1424
|
pe.spelling = function(t) {
|
|
1425
1425
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1426
1426
|
};
|
|
1427
|
-
function
|
|
1427
|
+
function ur(e, t, n) {
|
|
1428
1428
|
if (typeof e != "object")
|
|
1429
1429
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1430
1430
|
const r = Object.keys(e);
|
|
@@ -1442,14 +1442,14 @@ function cr(e, t, n) {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
1444
|
const ae = {
|
|
1445
|
-
assertOptions:
|
|
1445
|
+
assertOptions: ur,
|
|
1446
1446
|
validators: pe
|
|
1447
1447
|
}, L = ae.validators;
|
|
1448
1448
|
let j = class {
|
|
1449
1449
|
constructor(t) {
|
|
1450
1450
|
this.defaults = t || {}, this.interceptors = {
|
|
1451
|
-
request: new
|
|
1452
|
-
response: new
|
|
1451
|
+
request: new je(),
|
|
1452
|
+
response: new je()
|
|
1453
1453
|
};
|
|
1454
1454
|
}
|
|
1455
1455
|
/**
|
|
@@ -1514,7 +1514,7 @@ let j = class {
|
|
|
1514
1514
|
});
|
|
1515
1515
|
let l, p = 0, w;
|
|
1516
1516
|
if (!f) {
|
|
1517
|
-
const d = [
|
|
1517
|
+
const d = [Ye.bind(this), void 0];
|
|
1518
1518
|
for (d.unshift(...c), d.push(...u), w = d.length, l = Promise.resolve(n); p < w; )
|
|
1519
1519
|
l = l.then(d[p++], d[p++]);
|
|
1520
1520
|
return l;
|
|
@@ -1531,7 +1531,7 @@ let j = class {
|
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
1533
1533
|
try {
|
|
1534
|
-
l =
|
|
1534
|
+
l = Ye.call(this, S);
|
|
1535
1535
|
} catch (d) {
|
|
1536
1536
|
return Promise.reject(d);
|
|
1537
1537
|
}
|
|
@@ -1541,8 +1541,8 @@ let j = class {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
getUri(t) {
|
|
1543
1543
|
t = $(this.defaults, t);
|
|
1544
|
-
const n =
|
|
1545
|
-
return
|
|
1544
|
+
const n = wt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1545
|
+
return ft(n, t.params, t.paramsSerializer);
|
|
1546
1546
|
}
|
|
1547
1547
|
};
|
|
1548
1548
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1569,7 +1569,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1569
1569
|
}
|
|
1570
1570
|
j.prototype[t] = n(), j.prototype[t + "Form"] = n(!0);
|
|
1571
1571
|
});
|
|
1572
|
-
let
|
|
1572
|
+
let lr = class Ct {
|
|
1573
1573
|
constructor(t) {
|
|
1574
1574
|
if (typeof t != "function")
|
|
1575
1575
|
throw new TypeError("executor must be a function.");
|
|
@@ -1635,22 +1635,22 @@ let ur = class St {
|
|
|
1635
1635
|
static source() {
|
|
1636
1636
|
let t;
|
|
1637
1637
|
return {
|
|
1638
|
-
token: new
|
|
1638
|
+
token: new Ct(function(s) {
|
|
1639
1639
|
t = s;
|
|
1640
1640
|
}),
|
|
1641
1641
|
cancel: t
|
|
1642
1642
|
};
|
|
1643
1643
|
}
|
|
1644
1644
|
};
|
|
1645
|
-
function
|
|
1645
|
+
function dr(e) {
|
|
1646
1646
|
return function(n) {
|
|
1647
1647
|
return e.apply(null, n);
|
|
1648
1648
|
};
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function fr(e) {
|
|
1651
1651
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1652
1652
|
}
|
|
1653
|
-
const
|
|
1653
|
+
const Re = {
|
|
1654
1654
|
Continue: 100,
|
|
1655
1655
|
SwitchingProtocols: 101,
|
|
1656
1656
|
Processing: 102,
|
|
@@ -1721,34 +1721,34 @@ const Ae = {
|
|
|
1721
1721
|
SslHandshakeFailed: 525,
|
|
1722
1722
|
InvalidSslCertificate: 526
|
|
1723
1723
|
};
|
|
1724
|
-
Object.entries(
|
|
1725
|
-
|
|
1724
|
+
Object.entries(Re).forEach(([e, t]) => {
|
|
1725
|
+
Re[t] = e;
|
|
1726
1726
|
});
|
|
1727
|
-
function
|
|
1728
|
-
const t = new j(e), n =
|
|
1727
|
+
function At(e) {
|
|
1728
|
+
const t = new j(e), n = et(j.prototype.request, t);
|
|
1729
1729
|
return a.extend(n, j.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1730
|
-
return
|
|
1730
|
+
return At($(e, s));
|
|
1731
1731
|
}, n;
|
|
1732
1732
|
}
|
|
1733
|
-
const g =
|
|
1733
|
+
const g = At(ee);
|
|
1734
1734
|
g.Axios = j;
|
|
1735
1735
|
g.CanceledError = W;
|
|
1736
|
-
g.CancelToken =
|
|
1737
|
-
g.isCancel =
|
|
1738
|
-
g.VERSION =
|
|
1736
|
+
g.CancelToken = lr;
|
|
1737
|
+
g.isCancel = ht;
|
|
1738
|
+
g.VERSION = St;
|
|
1739
1739
|
g.toFormData = fe;
|
|
1740
1740
|
g.AxiosError = m;
|
|
1741
1741
|
g.Cancel = g.CanceledError;
|
|
1742
1742
|
g.all = function(t) {
|
|
1743
1743
|
return Promise.all(t);
|
|
1744
1744
|
};
|
|
1745
|
-
g.spread =
|
|
1746
|
-
g.isAxiosError =
|
|
1745
|
+
g.spread = dr;
|
|
1746
|
+
g.isAxiosError = fr;
|
|
1747
1747
|
g.mergeConfig = $;
|
|
1748
1748
|
g.AxiosHeaders = I;
|
|
1749
|
-
g.formToJSON = (e) =>
|
|
1750
|
-
g.getAdapter =
|
|
1751
|
-
g.HttpStatusCode =
|
|
1749
|
+
g.formToJSON = (e) => yt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1750
|
+
g.getAdapter = Et.getAdapter;
|
|
1751
|
+
g.HttpStatusCode = Re;
|
|
1752
1752
|
g.default = g;
|
|
1753
1753
|
const {
|
|
1754
1754
|
Axios: Nr,
|
|
@@ -1767,17 +1767,17 @@ const {
|
|
|
1767
1767
|
formToJSON: jr,
|
|
1768
1768
|
getAdapter: $r,
|
|
1769
1769
|
mergeConfig: Mr
|
|
1770
|
-
} = g,
|
|
1770
|
+
} = g, Oe = g.create({
|
|
1771
1771
|
timeout: 15e3
|
|
1772
1772
|
// withCredentials: true,
|
|
1773
1773
|
});
|
|
1774
|
-
|
|
1774
|
+
Oe.interceptors.response.use(
|
|
1775
1775
|
(e) => e,
|
|
1776
1776
|
(e) => Promise.reject(e)
|
|
1777
1777
|
);
|
|
1778
|
-
const
|
|
1778
|
+
const Rt = {
|
|
1779
1779
|
async get(e, t) {
|
|
1780
|
-
const n = await
|
|
1780
|
+
const n = await Oe.get(e, {
|
|
1781
1781
|
params: t?.params,
|
|
1782
1782
|
headers: t?.headers
|
|
1783
1783
|
});
|
|
@@ -1788,7 +1788,7 @@ const At = {
|
|
|
1788
1788
|
};
|
|
1789
1789
|
},
|
|
1790
1790
|
async post(e, t, n) {
|
|
1791
|
-
const r = await
|
|
1791
|
+
const r = await Oe.post(e, t, {
|
|
1792
1792
|
params: n?.params,
|
|
1793
1793
|
headers: n?.headers
|
|
1794
1794
|
});
|
|
@@ -1799,7 +1799,7 @@ const At = {
|
|
|
1799
1799
|
};
|
|
1800
1800
|
}
|
|
1801
1801
|
};
|
|
1802
|
-
function
|
|
1802
|
+
function pr(e) {
|
|
1803
1803
|
return {
|
|
1804
1804
|
async get(t, n) {
|
|
1805
1805
|
const r = n?.params ? "?" + new URLSearchParams(n.params).toString() : "", s = await e(t + r, {
|
|
@@ -1827,20 +1827,20 @@ function fr(e) {
|
|
|
1827
1827
|
}
|
|
1828
1828
|
};
|
|
1829
1829
|
}
|
|
1830
|
-
let G =
|
|
1830
|
+
let G = Rt;
|
|
1831
1831
|
function Hr(e, t) {
|
|
1832
|
-
return e === "fetch" ? G =
|
|
1832
|
+
return e === "fetch" ? G = pr(t?.fetch ?? fetch) : G = Rt, G;
|
|
1833
1833
|
}
|
|
1834
|
-
const
|
|
1834
|
+
const Ot = {
|
|
1835
1835
|
get: (...e) => G.get(...e),
|
|
1836
1836
|
post: (...e) => G.post(...e)
|
|
1837
1837
|
};
|
|
1838
|
-
let
|
|
1838
|
+
let Ie = {
|
|
1839
1839
|
basePath: "https://cloudapi-sit2.jctrans.net.cn/system/dms/fr/aggr/getLocationOptions"
|
|
1840
1840
|
};
|
|
1841
1841
|
const Jr = (e) => {
|
|
1842
|
-
|
|
1843
|
-
},
|
|
1842
|
+
Ie = { ...Ie, ...e };
|
|
1843
|
+
}, It = () => Ie, Tt = () => {
|
|
1844
1844
|
try {
|
|
1845
1845
|
const n = globalThis.useCookie;
|
|
1846
1846
|
if (typeof n == "function") {
|
|
@@ -1860,14 +1860,14 @@ const Jr = (e) => {
|
|
|
1860
1860
|
t = "";
|
|
1861
1861
|
}
|
|
1862
1862
|
return /jc-language=en-US/i.test(t) || /jc-language=en/i.test(t);
|
|
1863
|
-
},
|
|
1863
|
+
}, yr = () => It().basePath, hr = {
|
|
1864
1864
|
Continent: "continentId",
|
|
1865
1865
|
Country: "countryId",
|
|
1866
1866
|
City: "cityId",
|
|
1867
1867
|
Province: "provinceId",
|
|
1868
1868
|
Seaport: "seaportId",
|
|
1869
1869
|
Airport: "airportId"
|
|
1870
|
-
},
|
|
1870
|
+
}, mr = [
|
|
1871
1871
|
"City",
|
|
1872
1872
|
"Seaport",
|
|
1873
1873
|
"Airport",
|
|
@@ -1877,11 +1877,11 @@ const Jr = (e) => {
|
|
|
1877
1877
|
function H(e, t) {
|
|
1878
1878
|
return e === "allCityByCountryId" ? Array.isArray(t) ? String(t[0]) : String(t) : Array.isArray(t) ? JSON.stringify(t) : JSON.stringify([Number(t)]);
|
|
1879
1879
|
}
|
|
1880
|
-
function
|
|
1880
|
+
function wr(e) {
|
|
1881
1881
|
const t = [];
|
|
1882
1882
|
if (e.ids)
|
|
1883
1883
|
for (const n of e.ids) {
|
|
1884
|
-
const r =
|
|
1884
|
+
const r = hr[n.type];
|
|
1885
1885
|
t.push({
|
|
1886
1886
|
name: r,
|
|
1887
1887
|
val: H(r, n.ids)
|
|
@@ -1904,9 +1904,9 @@ function k(e) {
|
|
|
1904
1904
|
size: e.size ?? 10,
|
|
1905
1905
|
level: e.level,
|
|
1906
1906
|
searchContent: e.keyword ?? void 0,
|
|
1907
|
-
displayInfo: e.displayInfo ??
|
|
1907
|
+
displayInfo: e.displayInfo ?? mr,
|
|
1908
1908
|
sort: e.sort
|
|
1909
|
-
}, n =
|
|
1909
|
+
}, n = wr({
|
|
1910
1910
|
ids: e.ids,
|
|
1911
1911
|
scope: e.scope
|
|
1912
1912
|
});
|
|
@@ -1914,8 +1914,8 @@ function k(e) {
|
|
|
1914
1914
|
t[r] === void 0 && delete t[r];
|
|
1915
1915
|
}), t;
|
|
1916
1916
|
}
|
|
1917
|
-
function
|
|
1918
|
-
const r =
|
|
1917
|
+
function gr(e, t, n) {
|
|
1918
|
+
const r = Tt(), s = (u, l) => {
|
|
1919
1919
|
if (!u) return "";
|
|
1920
1920
|
const p = u.nameCn ?? u[`${l.toLowerCase()}NameCn`] ?? u.name, w = u.nameEn ?? u[`${l.toLowerCase()}NameEn`];
|
|
1921
1921
|
return r ? w || p || "" : p || w || "";
|
|
@@ -1940,7 +1940,7 @@ function F(e = [], t = []) {
|
|
|
1940
1940
|
if (!o || !t.includes(i)) return;
|
|
1941
1941
|
const f = o.id ?? o[i.toLowerCase() + "Id"] ?? null;
|
|
1942
1942
|
if (f == null) return;
|
|
1943
|
-
const u = o.nameCn ?? o[`${i.toLowerCase()}NameCn`] ?? o.name ?? void 0, l = o.nameEn ?? o[`${i.toLowerCase()}NameEn`] ?? void 0, p =
|
|
1943
|
+
const u = o.nameCn ?? o[`${i.toLowerCase()}NameCn`] ?? o.name ?? void 0, l = o.nameEn ?? o[`${i.toLowerCase()}NameEn`] ?? void 0, p = gr(o, i, c) || u || l || "";
|
|
1944
1944
|
n.push({
|
|
1945
1945
|
id: f,
|
|
1946
1946
|
type: i,
|
|
@@ -1984,7 +1984,7 @@ function F(e = [], t = []) {
|
|
|
1984
1984
|
});
|
|
1985
1985
|
}
|
|
1986
1986
|
async function _(e) {
|
|
1987
|
-
return (await
|
|
1987
|
+
return (await Ot.post(yr(), e)).data;
|
|
1988
1988
|
}
|
|
1989
1989
|
async function ye(e) {
|
|
1990
1990
|
const t = k({
|
|
@@ -2006,7 +2006,7 @@ async function ye(e) {
|
|
|
2006
2006
|
records: r
|
|
2007
2007
|
};
|
|
2008
2008
|
}
|
|
2009
|
-
async function
|
|
2009
|
+
async function Nt(e) {
|
|
2010
2010
|
if (!e.keyword?.trim())
|
|
2011
2011
|
throw new Error("searchByName: keyword 不能为空");
|
|
2012
2012
|
const t = e.types && e.types.length > 0 ? e.types : ["Continent", "Country", "City", "Province", "Seaport", "Airport"];
|
|
@@ -2019,7 +2019,7 @@ async function Tt(e) {
|
|
|
2019
2019
|
sort: e.sort
|
|
2020
2020
|
});
|
|
2021
2021
|
}
|
|
2022
|
-
async function
|
|
2022
|
+
async function br(e, t) {
|
|
2023
2023
|
const n = Array.isArray(t) ? t : [t], r = [e], s = k({
|
|
2024
2024
|
displayInfo: r,
|
|
2025
2025
|
ids: [{ type: e, ids: n }]
|
|
@@ -2030,7 +2030,7 @@ async function gr(e, t) {
|
|
|
2030
2030
|
).filter((c) => c.type === e);
|
|
2031
2031
|
}
|
|
2032
2032
|
async function Vr(e, t) {
|
|
2033
|
-
return (await
|
|
2033
|
+
return (await br(e, [t]))[0] ?? null;
|
|
2034
2034
|
}
|
|
2035
2035
|
async function Wr(e, t) {
|
|
2036
2036
|
const n = ["City"], r = k({
|
|
@@ -2069,7 +2069,7 @@ async function Kr(e, t, n) {
|
|
|
2069
2069
|
};
|
|
2070
2070
|
}
|
|
2071
2071
|
function Xr(e, t) {
|
|
2072
|
-
return
|
|
2072
|
+
return Nt({
|
|
2073
2073
|
keyword: e,
|
|
2074
2074
|
types: ["Country"],
|
|
2075
2075
|
page: t?.page,
|
|
@@ -2083,7 +2083,7 @@ function Gr(e, t) {
|
|
|
2083
2083
|
scope: { countryId: t.countryId },
|
|
2084
2084
|
page: t.page,
|
|
2085
2085
|
size: t.size
|
|
2086
|
-
}) :
|
|
2086
|
+
}) : Nt({
|
|
2087
2087
|
keyword: e,
|
|
2088
2088
|
types: ["City"],
|
|
2089
2089
|
page: t?.page,
|
|
@@ -2184,8 +2184,8 @@ async function ss(e = {}) {
|
|
|
2184
2184
|
records: F(r.records || [], t)
|
|
2185
2185
|
};
|
|
2186
2186
|
}
|
|
2187
|
-
const
|
|
2188
|
-
function
|
|
2187
|
+
const Er = "2.0", Sr = () => It().basePath;
|
|
2188
|
+
function xt(e) {
|
|
2189
2189
|
let t = e.type;
|
|
2190
2190
|
return t === "Country" && e.region && !e.country ? {
|
|
2191
2191
|
target: e.region,
|
|
@@ -2195,8 +2195,8 @@ function Nt(e) {
|
|
|
2195
2195
|
finalType: t
|
|
2196
2196
|
};
|
|
2197
2197
|
}
|
|
2198
|
-
function
|
|
2199
|
-
const
|
|
2198
|
+
function Ee(e, t) {
|
|
2199
|
+
const { target: n, finalType: r } = xt(e), s = (u) => {
|
|
2200
2200
|
if (!u) return "";
|
|
2201
2201
|
const l = u.nameCn || u.displayNameCn || u.name || "", p = u.nameEn || u.displayNameEn || u.nameEnShow || "";
|
|
2202
2202
|
return t ? p || l : l || p;
|
|
@@ -2209,14 +2209,16 @@ function Sr(e) {
|
|
|
2209
2209
|
}
|
|
2210
2210
|
function Cr(e = []) {
|
|
2211
2211
|
return e.map((t) => {
|
|
2212
|
-
const { target: n, finalType: r } =
|
|
2212
|
+
const { target: n, finalType: r } = xt(t);
|
|
2213
2213
|
return {
|
|
2214
2214
|
// 优先取嵌套对象里的 ID
|
|
2215
2215
|
id: n.id ?? t.id,
|
|
2216
2216
|
type: r,
|
|
2217
2217
|
nameCn: n.nameCn || n.name,
|
|
2218
2218
|
nameEn: n.nameEn || n.nameEnShow,
|
|
2219
|
-
display:
|
|
2219
|
+
display: Ee(t, Tt()),
|
|
2220
|
+
displayEn: Ee(t, !0),
|
|
2221
|
+
displayCn: Ee(t, !1),
|
|
2220
2222
|
// continent: rec.continent,
|
|
2221
2223
|
// 统一输出时,将 region 映射到 country 字段或保留原样,取决于业务需求
|
|
2222
2224
|
// country: rec.country || rec.region,
|
|
@@ -2233,13 +2235,13 @@ async function A(e) {
|
|
|
2233
2235
|
size: 10,
|
|
2234
2236
|
// 默认每页 10 条
|
|
2235
2237
|
...e
|
|
2236
|
-
}, r = (await
|
|
2238
|
+
}, r = (await Ot.post(Sr(), t)).data.data || {};
|
|
2237
2239
|
return {
|
|
2238
2240
|
...r,
|
|
2239
2241
|
records: Cr(r.records || [])
|
|
2240
2242
|
};
|
|
2241
2243
|
}
|
|
2242
|
-
const
|
|
2244
|
+
const Bt = {
|
|
2243
2245
|
searchByName: (e) => A({
|
|
2244
2246
|
searchContent: e.keyword,
|
|
2245
2247
|
searchMode: e.searchMode,
|
|
@@ -2247,7 +2249,7 @@ const xt = {
|
|
|
2247
2249
|
displayInfo: ["Country"]
|
|
2248
2250
|
}),
|
|
2249
2251
|
getByIds: (e) => A({ countryIds: e, displayInfo: ["Country"] })
|
|
2250
|
-
},
|
|
2252
|
+
}, Pt = {
|
|
2251
2253
|
searchByName: (e) => A({
|
|
2252
2254
|
searchContent: e.keyword,
|
|
2253
2255
|
searchMode: e.searchMode,
|
|
@@ -2255,7 +2257,7 @@ const xt = {
|
|
|
2255
2257
|
displayInfo: ["Country"]
|
|
2256
2258
|
}),
|
|
2257
2259
|
getByIds: (e) => A({ countryIds: e, displayInfo: ["Country"] })
|
|
2258
|
-
},
|
|
2260
|
+
}, Te = {
|
|
2259
2261
|
searchByName: (e) => A({
|
|
2260
2262
|
searchContent: e.keyword,
|
|
2261
2263
|
countryIds: e.countryId ? [e.countryId] : void 0,
|
|
@@ -2264,7 +2266,7 @@ const xt = {
|
|
|
2264
2266
|
}),
|
|
2265
2267
|
getByIds: (e) => A({ cityIds: e, displayInfo: ["City"] }),
|
|
2266
2268
|
getCitiesByCountry: (e, t) => A({ countryIds: [e], displayInfo: ["City"], ...t })
|
|
2267
|
-
},
|
|
2269
|
+
}, Lt = {
|
|
2268
2270
|
searchByName: (e) => A({
|
|
2269
2271
|
searchContent: e.keyword,
|
|
2270
2272
|
cityIds: e.cityId ? [e.cityId] : void 0,
|
|
@@ -2273,7 +2275,7 @@ const xt = {
|
|
|
2273
2275
|
displayInfo: ["Seaport"]
|
|
2274
2276
|
}),
|
|
2275
2277
|
getByIds: (e) => A({ seaportIds: e, displayInfo: ["Seaport"] })
|
|
2276
|
-
},
|
|
2278
|
+
}, Ft = {
|
|
2277
2279
|
searchByName: (e) => A({
|
|
2278
2280
|
searchContent: e.keyword,
|
|
2279
2281
|
countryIds: e.countryId ? [e.countryId] : void 0,
|
|
@@ -2281,7 +2283,7 @@ const xt = {
|
|
|
2281
2283
|
displayInfo: ["Airport"]
|
|
2282
2284
|
}),
|
|
2283
2285
|
getByIds: (e) => A({ airportIds: e, displayInfo: ["Airport"] })
|
|
2284
|
-
},
|
|
2286
|
+
}, _t = {
|
|
2285
2287
|
getByIds: (e) => A({ wharfIds: e, displayInfo: ["Wharf"] })
|
|
2286
2288
|
}, Ar = (e) => A({
|
|
2287
2289
|
searchContent: e.keyword,
|
|
@@ -2293,17 +2295,17 @@ const xt = {
|
|
|
2293
2295
|
const n = Array.isArray(e) ? e : [e];
|
|
2294
2296
|
switch (t) {
|
|
2295
2297
|
case "Country":
|
|
2296
|
-
return xt.getByIds(n);
|
|
2297
|
-
case "Region":
|
|
2298
2298
|
return Bt.getByIds(n);
|
|
2299
|
+
case "Region":
|
|
2300
|
+
return Pt.getByIds(n);
|
|
2299
2301
|
case "City":
|
|
2300
|
-
return
|
|
2302
|
+
return Te.getByIds(n);
|
|
2301
2303
|
case "Seaport":
|
|
2302
|
-
return Pt.getByIds(n);
|
|
2303
|
-
case "Airport":
|
|
2304
2304
|
return Lt.getByIds(n);
|
|
2305
|
-
case "
|
|
2305
|
+
case "Airport":
|
|
2306
2306
|
return Ft.getByIds(n);
|
|
2307
|
+
case "Wharf":
|
|
2308
|
+
return _t.getByIds(n);
|
|
2307
2309
|
default:
|
|
2308
2310
|
return A({
|
|
2309
2311
|
[`${t.toLowerCase()}Ids`]: n,
|
|
@@ -2311,45 +2313,45 @@ const xt = {
|
|
|
2311
2313
|
});
|
|
2312
2314
|
}
|
|
2313
2315
|
}, os = {
|
|
2314
|
-
SEARCH_VERSION:
|
|
2316
|
+
SEARCH_VERSION: Er,
|
|
2315
2317
|
searchByName: Ar,
|
|
2316
2318
|
searchByIdWithType: Rr,
|
|
2317
|
-
country:
|
|
2318
|
-
region:
|
|
2319
|
-
city:
|
|
2320
|
-
seaport:
|
|
2321
|
-
airport:
|
|
2322
|
-
wharf:
|
|
2319
|
+
country: Bt,
|
|
2320
|
+
region: Pt,
|
|
2321
|
+
city: Te,
|
|
2322
|
+
seaport: Lt,
|
|
2323
|
+
airport: Ft,
|
|
2324
|
+
wharf: _t,
|
|
2323
2325
|
/** 获取某个国家下的所有城市 */
|
|
2324
|
-
getCitiesByCountry:
|
|
2326
|
+
getCitiesByCountry: Te.getCitiesByCountry,
|
|
2325
2327
|
/** 获取某个城市下的子实体(港口、机场、码头等) */
|
|
2326
2328
|
getChildrenByCity: (e, t, n) => A({ cityIds: [e], displayInfo: t, ...n })
|
|
2327
2329
|
}, is = {
|
|
2328
2330
|
Open: "GLOBAL_MODAL_OPEN",
|
|
2329
2331
|
Close: "GLOBAL_MODAL_CLOSE",
|
|
2330
2332
|
Submit: "GLOBAL_MODAL_SUBMIT"
|
|
2331
|
-
}, as =
|
|
2333
|
+
}, as = Ut();
|
|
2332
2334
|
export {
|
|
2333
2335
|
is as MODAL_ACTION,
|
|
2334
2336
|
Hr as createRequest,
|
|
2335
2337
|
as as emitter,
|
|
2336
2338
|
ss as getAirport,
|
|
2337
2339
|
Vr as getById,
|
|
2338
|
-
|
|
2340
|
+
br as getByIds,
|
|
2339
2341
|
Kr as getChildrenByCity,
|
|
2340
2342
|
Wr as getCitiesByCountry,
|
|
2341
2343
|
ts as getCity,
|
|
2342
2344
|
Zr as getContinent,
|
|
2343
2345
|
es as getCountry,
|
|
2344
|
-
|
|
2346
|
+
Tt as getIsEn,
|
|
2345
2347
|
ns as getProvince,
|
|
2346
2348
|
rs as getSeaport,
|
|
2347
|
-
|
|
2349
|
+
It as getSharedConfig,
|
|
2348
2350
|
Jr as initSharedConfig,
|
|
2349
2351
|
os as locationSearchV2,
|
|
2350
2352
|
ye as search,
|
|
2351
2353
|
Yr as searchAirportByName,
|
|
2352
|
-
|
|
2354
|
+
Nt as searchByName,
|
|
2353
2355
|
Gr as searchCityByName,
|
|
2354
2356
|
Xr as searchCountryByName,
|
|
2355
2357
|
Qr as searchSeaportByName
|