vbss-translator 1.1.2 → 2.0.0
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/LICENSE +21 -0
- package/README.md +47 -4
- package/dist/cli/index.js +24 -24
- package/dist/generator.cjs +17 -17
- package/dist/generator.js +304 -187
- package/dist/vbss-translator.js +2035 -1383
- package/dist/vbss-translator.umd.cjs +9 -9
- package/package.json +121 -111
package/dist/vbss-translator.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { createContext as
|
|
6
|
-
const
|
|
1
|
+
var On = Object.defineProperty;
|
|
2
|
+
var _n = (t, e, n) => e in t ? On(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var X = (t, e, n) => _n(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { jsx as Sn } from "react/jsx-runtime";
|
|
5
|
+
import { createContext as xn, useContext as Tn, useMemo as ee, useState as Ne, useCallback as ke, useEffect as yt, useRef as bt, startTransition as An } from "react";
|
|
6
|
+
const Ht = xn(
|
|
7
7
|
null
|
|
8
|
-
),
|
|
9
|
-
const t =
|
|
8
|
+
), Pn = () => {
|
|
9
|
+
const t = Tn(Ht);
|
|
10
10
|
if (!t)
|
|
11
11
|
throw new Error(
|
|
12
12
|
"useTranslatorContext must be used within a TranslatorProvider"
|
|
13
13
|
);
|
|
14
14
|
return t;
|
|
15
15
|
};
|
|
16
|
-
class
|
|
16
|
+
class Et extends Error {
|
|
17
17
|
constructor(n) {
|
|
18
18
|
super(n);
|
|
19
|
-
|
|
19
|
+
X(this, "code", "timeout");
|
|
20
20
|
this.name = "ExternalTranslationTimeoutError";
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
const e = Object.entries(t).sort(([n], [r]) => n
|
|
23
|
+
const Cn = "auto", ve = (t) => typeof t == "number" && Number.isFinite(t) && t > 0, Ln = (t) => {
|
|
24
|
+
const e = Object.entries(t).sort(([n], [r]) => n < r ? -1 : 1);
|
|
25
25
|
return Object.fromEntries(e);
|
|
26
26
|
};
|
|
27
|
-
class
|
|
27
|
+
class Dn {
|
|
28
28
|
constructor(e) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
X(this, "provider");
|
|
30
|
+
X(this, "config");
|
|
31
|
+
X(this, "cache");
|
|
32
|
+
X(this, "logger");
|
|
33
|
+
X(this, "inFlight", /* @__PURE__ */ new Map());
|
|
34
34
|
this.provider = e.provider, this.config = e.config, this.cache = e.cache, this.logger = e.logger;
|
|
35
35
|
}
|
|
36
36
|
isEnabled() {
|
|
@@ -68,12 +68,12 @@ class Gt {
|
|
|
68
68
|
return this.inFlight.set(n.cacheKey, o), o;
|
|
69
69
|
}
|
|
70
70
|
normalizeRequest(e) {
|
|
71
|
-
const n = e.sourceLanguage ??
|
|
71
|
+
const n = e.sourceLanguage ?? Cn, r = {
|
|
72
72
|
text: e.text,
|
|
73
73
|
sourceLanguage: n,
|
|
74
74
|
targetLanguage: e.targetLanguage,
|
|
75
75
|
glossary: e.glossary
|
|
76
|
-
}, s = this.createCacheKey(r), o =
|
|
76
|
+
}, s = this.createCacheKey(r), o = ve(e.timeoutMs) ? e.timeoutMs : this.config.timeoutMs;
|
|
77
77
|
return {
|
|
78
78
|
externalRequest: {
|
|
79
79
|
key: e.key,
|
|
@@ -148,28 +148,35 @@ class Gt {
|
|
|
148
148
|
async translateWithTimeout(e, n, r) {
|
|
149
149
|
if (!(typeof AbortController == "function"))
|
|
150
150
|
return this.provider.translate(e, {
|
|
151
|
-
timeoutMs:
|
|
151
|
+
timeoutMs: ve(n) ? n : void 0,
|
|
152
152
|
signal: r
|
|
153
153
|
});
|
|
154
154
|
const o = new AbortController();
|
|
155
|
-
let i
|
|
155
|
+
let i, l;
|
|
156
156
|
r && (r.aborted ? o.abort() : (l = () => {
|
|
157
157
|
o.abort();
|
|
158
158
|
}, r.addEventListener("abort", l, { once: !0 })));
|
|
159
|
-
const
|
|
160
|
-
i =
|
|
161
|
-
|
|
159
|
+
const c = ve(n) ? new Promise((u, h) => {
|
|
160
|
+
i = setTimeout(() => {
|
|
161
|
+
o.abort(), h(
|
|
162
|
+
new Et(
|
|
163
|
+
`External translation timed out after ${n}ms`
|
|
164
|
+
)
|
|
165
|
+
);
|
|
166
|
+
}, n);
|
|
167
|
+
}) : void 0, d = new Promise((u) => {
|
|
168
|
+
u(
|
|
169
|
+
this.provider.translate(e, {
|
|
170
|
+
timeoutMs: ve(n) ? n : void 0,
|
|
171
|
+
signal: o.signal
|
|
172
|
+
})
|
|
173
|
+
);
|
|
174
|
+
});
|
|
162
175
|
try {
|
|
163
|
-
return await
|
|
164
|
-
timeoutMs: ge(n) ? n : void 0,
|
|
165
|
-
signal: o.signal
|
|
166
|
-
});
|
|
167
|
-
} catch (u) {
|
|
168
|
-
throw i ? new ze(
|
|
169
|
-
`External translation timed out after ${n}ms`
|
|
170
|
-
) : (o.signal.aborted && !i, u);
|
|
176
|
+
return await (c ? Promise.race([d, c]) : d);
|
|
171
177
|
} finally {
|
|
172
|
-
|
|
178
|
+
i && clearTimeout(i), l && r && r.removeEventListener("abort", l), d.catch(() => {
|
|
179
|
+
});
|
|
173
180
|
}
|
|
174
181
|
}
|
|
175
182
|
readFromCache(e) {
|
|
@@ -198,7 +205,7 @@ class Gt {
|
|
|
198
205
|
});
|
|
199
206
|
}
|
|
200
207
|
normalizeError(e) {
|
|
201
|
-
return this.provider.normalizeError ? this.provider.normalizeError(e) : e instanceof
|
|
208
|
+
return this.provider.normalizeError ? this.provider.normalizeError(e) : e instanceof Et ? {
|
|
202
209
|
code: "timeout",
|
|
203
210
|
message: e.message,
|
|
204
211
|
retryable: !0,
|
|
@@ -224,7 +231,7 @@ class Gt {
|
|
|
224
231
|
}
|
|
225
232
|
hashText(e, n) {
|
|
226
233
|
let r = 2166136261;
|
|
227
|
-
const s = n && Object.keys(n).length > 0 ? `${e}|${JSON.stringify(
|
|
234
|
+
const s = n && Object.keys(n).length > 0 ? `${e}|${JSON.stringify(Ln(n))}` : e;
|
|
228
235
|
for (let o = 0; o < s.length; o += 1)
|
|
229
236
|
r ^= s.charCodeAt(o), r += (r << 1) + (r << 4) + (r << 7) + (r << 8) + (r << 24);
|
|
230
237
|
return (r >>> 0).toString(16);
|
|
@@ -283,13 +290,13 @@ class Gt {
|
|
|
283
290
|
}
|
|
284
291
|
}
|
|
285
292
|
}
|
|
286
|
-
const
|
|
287
|
-
class
|
|
293
|
+
const Je = () => Date.now(), Ue = (t) => typeof t == "number" && Number.isFinite(t) && t > 0;
|
|
294
|
+
class Nn {
|
|
288
295
|
constructor(e) {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
296
|
+
X(this, "store", /* @__PURE__ */ new Map());
|
|
297
|
+
X(this, "enabled");
|
|
298
|
+
X(this, "ttlMs");
|
|
299
|
+
X(this, "maxEntries");
|
|
293
300
|
this.enabled = e.enabled, this.ttlMs = Math.max(0, e.ttlMs), this.maxEntries = e.maxEntries;
|
|
294
301
|
}
|
|
295
302
|
isEnabled() {
|
|
@@ -322,11 +329,11 @@ class Xt {
|
|
|
322
329
|
set(e, n, r) {
|
|
323
330
|
if (!this.enabled)
|
|
324
331
|
return;
|
|
325
|
-
const s =
|
|
332
|
+
const s = Ue(r) ? r : this.ttlMs, o = Ue(s) ? Je() + s : void 0;
|
|
326
333
|
this.store.set(e, {
|
|
327
334
|
value: n,
|
|
328
335
|
expiresAt: o,
|
|
329
|
-
insertedAt:
|
|
336
|
+
insertedAt: Je()
|
|
330
337
|
}), this.enforceMaxEntries();
|
|
331
338
|
}
|
|
332
339
|
delete(e) {
|
|
@@ -358,7 +365,7 @@ class Xt {
|
|
|
358
365
|
this.isExpired(n) && this.store.delete(e);
|
|
359
366
|
}
|
|
360
367
|
enforceMaxEntries() {
|
|
361
|
-
if (!
|
|
368
|
+
if (!Ue(this.maxEntries))
|
|
362
369
|
return;
|
|
363
370
|
const e = this.maxEntries;
|
|
364
371
|
for (; this.store.size > e; ) {
|
|
@@ -375,66 +382,114 @@ class Xt {
|
|
|
375
382
|
return e;
|
|
376
383
|
}
|
|
377
384
|
isExpired(e) {
|
|
378
|
-
return
|
|
385
|
+
return Ue(e.expiresAt) ? e.expiresAt <= Je() : !1;
|
|
379
386
|
}
|
|
380
387
|
}
|
|
381
|
-
function
|
|
388
|
+
function qt(t, e) {
|
|
382
389
|
return function() {
|
|
383
390
|
return t.apply(e, arguments);
|
|
384
391
|
};
|
|
385
392
|
}
|
|
386
|
-
const { toString:
|
|
387
|
-
|
|
393
|
+
const { toString: kn } = Object.prototype, { getPrototypeOf: oe } = Object, { iterator: xe, toStringTag: $t } = Symbol, _e = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Kt = (t) => typeof t == "string" && (t === "__proto__" || t === "constructor" || t === "prototype"), zt = (t, e, n) => t === Object.prototype || !n && e === null, vn = (t) => {
|
|
394
|
+
if (!Object.isExtensible(t))
|
|
395
|
+
return !1;
|
|
396
|
+
const e = Object.getOwnPropertyNames(t);
|
|
397
|
+
return Object.getOwnPropertySymbols && e.push(...Object.getOwnPropertySymbols(t)), e.every((n) => {
|
|
398
|
+
if (Kt(n))
|
|
399
|
+
return !1;
|
|
400
|
+
const r = Object.getOwnPropertyDescriptor(t, n);
|
|
401
|
+
return !!r && r.configurable && r.writable === !0;
|
|
402
|
+
});
|
|
403
|
+
}, Se = (t, e) => {
|
|
404
|
+
let n = t;
|
|
405
|
+
const r = [];
|
|
406
|
+
for (; n != null; ) {
|
|
407
|
+
if (r.indexOf(n) !== -1)
|
|
408
|
+
return !1;
|
|
409
|
+
r.push(n);
|
|
410
|
+
const s = oe(n);
|
|
411
|
+
if (zt(n, s, n === t))
|
|
412
|
+
return !1;
|
|
413
|
+
if (_e(n, e))
|
|
414
|
+
return !0;
|
|
415
|
+
n = s;
|
|
416
|
+
}
|
|
417
|
+
return !1;
|
|
418
|
+
}, Un = (t, e) => t != null && Se(t, e) ? t[e] : void 0, Fn = (t) => {
|
|
419
|
+
if (t == null || typeof t != "object" && typeof t != "function")
|
|
420
|
+
return t;
|
|
421
|
+
const e = oe(t);
|
|
422
|
+
if (e === null && vn(t))
|
|
423
|
+
return t;
|
|
424
|
+
const n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), s = [];
|
|
425
|
+
let o = t;
|
|
426
|
+
for (; o != null && s.indexOf(o) === -1; ) {
|
|
427
|
+
s.push(o);
|
|
428
|
+
const i = o === t ? e : oe(o);
|
|
429
|
+
if (zt(o, i, o === t))
|
|
430
|
+
break;
|
|
431
|
+
const l = Object.getOwnPropertyNames(o);
|
|
432
|
+
Object.getOwnPropertySymbols && l.push(...Object.getOwnPropertySymbols(o));
|
|
433
|
+
for (const c of l)
|
|
434
|
+
Kt(c) || _e(r, c) || (n[c] = t[c], r[c] = !0);
|
|
435
|
+
o = i;
|
|
436
|
+
}
|
|
437
|
+
return n;
|
|
438
|
+
}, lt = /* @__PURE__ */ ((t) => (e) => {
|
|
439
|
+
const n = kn.call(e);
|
|
388
440
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
389
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
390
|
-
function
|
|
391
|
-
return t !== null && !
|
|
441
|
+
})(/* @__PURE__ */ Object.create(null)), Q = (t) => (t = t.toLowerCase(), (e) => lt(e) === t), $e = (t) => (e) => typeof e === t, { isArray: fe } = Array, de = $e("undefined");
|
|
442
|
+
function me(t) {
|
|
443
|
+
return t !== null && !de(t) && t.constructor !== null && !de(t.constructor) && K(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
392
444
|
}
|
|
393
|
-
const
|
|
394
|
-
function
|
|
445
|
+
const Vt = Q("ArrayBuffer");
|
|
446
|
+
function jn(t) {
|
|
395
447
|
let e;
|
|
396
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
448
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Vt(t.buffer), e;
|
|
397
449
|
}
|
|
398
|
-
const
|
|
399
|
-
if (
|
|
450
|
+
const Bn = $e("string"), K = $e("function"), Wt = $e("number"), ye = (t) => t !== null && typeof t == "object", In = (t) => t === !0 || t === !1, je = (t) => {
|
|
451
|
+
if (!ye(t))
|
|
400
452
|
return !1;
|
|
401
|
-
const e =
|
|
402
|
-
return (e === null || e === Object.prototype ||
|
|
403
|
-
|
|
404
|
-
|
|
453
|
+
const e = oe(t);
|
|
454
|
+
return (e === null || e === Object.prototype || oe(e) === null) && // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
|
|
455
|
+
// evidence the value is tagged/iterable, while ignoring members reachable
|
|
456
|
+
// only through shared or terminal prototype boundaries.
|
|
457
|
+
!Se(t, $t) && !Se(t, xe);
|
|
458
|
+
}, Mn = (t) => {
|
|
459
|
+
if (!ye(t) || me(t))
|
|
405
460
|
return !1;
|
|
406
461
|
try {
|
|
407
462
|
return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
|
|
408
463
|
} catch {
|
|
409
464
|
return !1;
|
|
410
465
|
}
|
|
411
|
-
},
|
|
412
|
-
function
|
|
466
|
+
}, Hn = Q("Date"), qn = Q("File"), $n = (t) => !!(t && typeof t.uri < "u"), Kn = (t) => t && typeof t.getParts < "u", zn = Q("Blob"), Vn = Q("FileList"), Wn = Q("Set"), Jn = (t) => ye(t) && K(t.pipe);
|
|
467
|
+
function Xn() {
|
|
413
468
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
414
469
|
}
|
|
415
|
-
const
|
|
470
|
+
const wt = Xn(), Rt = typeof wt.FormData < "u" ? wt.FormData : void 0, Gn = (t) => {
|
|
416
471
|
if (!t) return !1;
|
|
417
|
-
if (
|
|
418
|
-
const e =
|
|
419
|
-
if (!e || e === Object.prototype || !
|
|
420
|
-
const n =
|
|
472
|
+
if (Rt && t instanceof Rt) return !0;
|
|
473
|
+
const e = oe(t);
|
|
474
|
+
if (!e || e === Object.prototype || !K(t.append)) return !1;
|
|
475
|
+
const n = lt(t);
|
|
421
476
|
return n === "formdata" || // detect form-data instance
|
|
422
|
-
n === "object" &&
|
|
423
|
-
},
|
|
477
|
+
n === "object" && K(t.toString) && t.toString() === "[object FormData]";
|
|
478
|
+
}, Qn = Q("URLSearchParams"), [Yn, Zn, er, tr] = [
|
|
424
479
|
"ReadableStream",
|
|
425
480
|
"Request",
|
|
426
481
|
"Response",
|
|
427
482
|
"Headers"
|
|
428
|
-
].map(
|
|
429
|
-
function
|
|
483
|
+
].map(Q), nr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
484
|
+
function Te(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
430
485
|
if (t === null || typeof t > "u")
|
|
431
486
|
return;
|
|
432
487
|
let r, s;
|
|
433
|
-
if (typeof t != "object" && (t = [t]),
|
|
488
|
+
if (typeof t != "object" && (t = [t]), fe(t))
|
|
434
489
|
for (r = 0, s = t.length; r < s; r++)
|
|
435
490
|
e.call(null, t[r], r, t);
|
|
436
491
|
else {
|
|
437
|
-
if (
|
|
492
|
+
if (me(t))
|
|
438
493
|
return;
|
|
439
494
|
const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
|
|
440
495
|
let l;
|
|
@@ -442,8 +497,8 @@ function ue(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
|
442
497
|
l = o[r], e.call(null, t[l], l, t);
|
|
443
498
|
}
|
|
444
499
|
}
|
|
445
|
-
function
|
|
446
|
-
if (
|
|
500
|
+
function Jt(t, e) {
|
|
501
|
+
if (me(t))
|
|
447
502
|
return null;
|
|
448
503
|
e = e.toLowerCase();
|
|
449
504
|
const n = Object.keys(t);
|
|
@@ -453,27 +508,39 @@ function yt(t, e) {
|
|
|
453
508
|
return s;
|
|
454
509
|
return null;
|
|
455
510
|
}
|
|
456
|
-
const
|
|
457
|
-
function
|
|
458
|
-
const { caseless:
|
|
459
|
-
if (
|
|
511
|
+
const ce = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Xt = (t) => !de(t) && t !== ce;
|
|
512
|
+
function ot(...t) {
|
|
513
|
+
const { caseless: e, skipUndefined: n } = Xt(this) && this || {}, r = {}, s = (o, i) => {
|
|
514
|
+
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
460
515
|
return;
|
|
461
|
-
const
|
|
462
|
-
|
|
516
|
+
const l = e && typeof i == "string" && Jt(r, i) || i, c = _e(r, l) ? r[l] : void 0;
|
|
517
|
+
je(c) && je(o) ? r[l] = ot(c, o) : je(o) ? r[l] = ot({}, o) : fe(o) ? r[l] = o.slice() : (!n || !de(o)) && (r[l] = o);
|
|
463
518
|
};
|
|
464
|
-
for (let
|
|
465
|
-
|
|
466
|
-
|
|
519
|
+
for (let o = 0, i = t.length; o < i; o++) {
|
|
520
|
+
const l = t[o];
|
|
521
|
+
if (!l || me(l) || (Te(l, s), typeof l != "object" || fe(l)))
|
|
522
|
+
continue;
|
|
523
|
+
const c = Object.getOwnPropertySymbols(l);
|
|
524
|
+
for (let d = 0; d < c.length; d++) {
|
|
525
|
+
const u = c[d];
|
|
526
|
+
pr.call(l, u) && s(l[u], u);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return r;
|
|
467
530
|
}
|
|
468
|
-
const
|
|
531
|
+
const rr = (t, e, n, { allOwnKeys: r } = {}) => (Te(
|
|
469
532
|
e,
|
|
470
533
|
(s, o) => {
|
|
471
|
-
n &&
|
|
472
|
-
|
|
534
|
+
n && K(s) ? Object.defineProperty(t, o, {
|
|
535
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
536
|
+
// hijack defineProperty's accessor-vs-data resolution.
|
|
537
|
+
__proto__: null,
|
|
538
|
+
value: qt(s, n),
|
|
473
539
|
writable: !0,
|
|
474
540
|
enumerable: !0,
|
|
475
541
|
configurable: !0
|
|
476
542
|
}) : Object.defineProperty(t, o, {
|
|
543
|
+
__proto__: null,
|
|
477
544
|
value: s,
|
|
478
545
|
writable: !0,
|
|
479
546
|
enumerable: !0,
|
|
@@ -481,65 +548,67 @@ const bn = (t, e, n, { allOwnKeys: r } = {}) => (ue(
|
|
|
481
548
|
});
|
|
482
549
|
},
|
|
483
550
|
{ allOwnKeys: r }
|
|
484
|
-
), t),
|
|
551
|
+
), t), sr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), or = (t, e, n, r) => {
|
|
485
552
|
t.prototype = Object.create(e.prototype, r), Object.defineProperty(t.prototype, "constructor", {
|
|
553
|
+
__proto__: null,
|
|
486
554
|
value: t,
|
|
487
555
|
writable: !0,
|
|
488
556
|
enumerable: !1,
|
|
489
557
|
configurable: !0
|
|
490
558
|
}), Object.defineProperty(t, "super", {
|
|
559
|
+
__proto__: null,
|
|
491
560
|
value: e.prototype
|
|
492
561
|
}), n && Object.assign(t.prototype, n);
|
|
493
|
-
},
|
|
562
|
+
}, ir = (t, e, n, r) => {
|
|
494
563
|
let s, o, i;
|
|
495
564
|
const l = {};
|
|
496
565
|
if (e = e || {}, t == null) return e;
|
|
497
566
|
do {
|
|
498
567
|
for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
|
|
499
568
|
i = s[o], (!r || r(i, t, e)) && !l[i] && (e[i] = t[i], l[i] = !0);
|
|
500
|
-
t = n !== !1 &&
|
|
569
|
+
t = n !== !1 && oe(t);
|
|
501
570
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
502
571
|
return e;
|
|
503
|
-
},
|
|
572
|
+
}, ar = (t, e, n) => {
|
|
504
573
|
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
505
574
|
const r = t.indexOf(e, n);
|
|
506
575
|
return r !== -1 && r === n;
|
|
507
|
-
},
|
|
576
|
+
}, lr = (t) => {
|
|
508
577
|
if (!t) return null;
|
|
509
|
-
if (
|
|
578
|
+
if (fe(t)) return t;
|
|
510
579
|
let e = t.length;
|
|
511
|
-
if (!
|
|
580
|
+
if (!Wt(e)) return null;
|
|
512
581
|
const n = new Array(e);
|
|
513
582
|
for (; e-- > 0; )
|
|
514
583
|
n[e] = t[e];
|
|
515
584
|
return n;
|
|
516
|
-
},
|
|
585
|
+
}, cr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && oe(Uint8Array)), ur = (t, e) => {
|
|
517
586
|
const r = (t && t[xe]).call(t);
|
|
518
587
|
let s;
|
|
519
588
|
for (; (s = r.next()) && !s.done; ) {
|
|
520
589
|
const o = s.value;
|
|
521
590
|
e.call(t, o[0], o[1]);
|
|
522
591
|
}
|
|
523
|
-
},
|
|
592
|
+
}, fr = (t, e) => {
|
|
524
593
|
let n;
|
|
525
594
|
const r = [];
|
|
526
595
|
for (; (n = t.exec(e)) !== null; )
|
|
527
596
|
r.push(n);
|
|
528
597
|
return r;
|
|
529
|
-
},
|
|
598
|
+
}, dr = Q("HTMLFormElement"), hr = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
|
|
530
599
|
return r.toUpperCase() + s;
|
|
531
|
-
}),
|
|
600
|
+
}), { propertyIsEnumerable: pr } = Object.prototype, gr = Q("RegExp"), Gt = (t, e) => {
|
|
532
601
|
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
533
|
-
|
|
602
|
+
Te(n, (s, o) => {
|
|
534
603
|
let i;
|
|
535
604
|
(i = e(s, o, t)) !== !1 && (r[o] = i || s);
|
|
536
605
|
}), Object.defineProperties(t, r);
|
|
537
|
-
},
|
|
538
|
-
|
|
539
|
-
if (
|
|
606
|
+
}, mr = (t) => {
|
|
607
|
+
Gt(t, (e, n) => {
|
|
608
|
+
if (K(t) && ["arguments", "caller", "callee"].includes(n))
|
|
540
609
|
return !1;
|
|
541
610
|
const r = t[n];
|
|
542
|
-
if (
|
|
611
|
+
if (K(r)) {
|
|
543
612
|
if (e.enumerable = !1, "writable" in e) {
|
|
544
613
|
e.writable = !1;
|
|
545
614
|
return;
|
|
@@ -549,111 +618,479 @@ const bn = (t, e, n, { allOwnKeys: r } = {}) => (ue(
|
|
|
549
618
|
});
|
|
550
619
|
}
|
|
551
620
|
});
|
|
552
|
-
},
|
|
621
|
+
}, yr = (t, e) => {
|
|
553
622
|
const n = {}, r = (s) => {
|
|
554
623
|
s.forEach((o) => {
|
|
555
624
|
n[o] = !0;
|
|
556
625
|
});
|
|
557
626
|
};
|
|
558
|
-
return
|
|
559
|
-
},
|
|
560
|
-
},
|
|
561
|
-
function
|
|
562
|
-
return !!(t &&
|
|
563
|
-
}
|
|
564
|
-
const
|
|
565
|
-
const e = new
|
|
566
|
-
if (
|
|
567
|
-
if (e.
|
|
627
|
+
return fe(t) ? r(t) : r(String(t).split(e)), n;
|
|
628
|
+
}, br = () => {
|
|
629
|
+
}, Er = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
630
|
+
function wr(t) {
|
|
631
|
+
return !!(t && K(t.append) && t[$t] === "FormData" && t[xe]);
|
|
632
|
+
}
|
|
633
|
+
const Rr = (t) => {
|
|
634
|
+
const e = /* @__PURE__ */ new WeakSet(), n = (r) => {
|
|
635
|
+
if (ye(r)) {
|
|
636
|
+
if (e.has(r))
|
|
568
637
|
return;
|
|
569
|
-
if (
|
|
638
|
+
if (me(r))
|
|
570
639
|
return r;
|
|
571
640
|
if (!("toJSON" in r)) {
|
|
572
|
-
e
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
641
|
+
e.add(r);
|
|
642
|
+
let s;
|
|
643
|
+
if (Wn(r)) {
|
|
644
|
+
s = [];
|
|
645
|
+
for (const o of r) {
|
|
646
|
+
const i = n(o);
|
|
647
|
+
!de(i) && s.push(i);
|
|
648
|
+
}
|
|
649
|
+
} else
|
|
650
|
+
s = fe(r) ? [] : {}, Te(r, (o, i) => {
|
|
651
|
+
const l = n(o);
|
|
652
|
+
!de(l) && (s[i] = l);
|
|
653
|
+
});
|
|
654
|
+
return e.delete(r), s;
|
|
578
655
|
}
|
|
579
656
|
}
|
|
580
657
|
return r;
|
|
581
658
|
};
|
|
582
|
-
return n(t
|
|
583
|
-
},
|
|
659
|
+
return n(t);
|
|
660
|
+
}, Or = Q("AsyncFunction"), _r = (t) => t && (ye(t) || K(t)) && K(t.then) && K(t.catch), Qt = ((t, e) => t ? setImmediate : e ? ((n, r) => (ce.addEventListener(
|
|
584
661
|
"message",
|
|
585
662
|
({ source: s, data: o }) => {
|
|
586
|
-
s ===
|
|
663
|
+
s === ce && o === n && r.length && r.shift()();
|
|
587
664
|
},
|
|
588
665
|
!1
|
|
589
666
|
), (s) => {
|
|
590
|
-
r.push(s),
|
|
591
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function",
|
|
592
|
-
isArray:
|
|
593
|
-
isArrayBuffer:
|
|
594
|
-
isBuffer:
|
|
595
|
-
isFormData:
|
|
596
|
-
isArrayBufferView:
|
|
597
|
-
isString:
|
|
598
|
-
isNumber:
|
|
599
|
-
isBoolean:
|
|
600
|
-
isObject:
|
|
601
|
-
isPlainObject:
|
|
602
|
-
isEmptyObject:
|
|
603
|
-
isReadableStream:
|
|
604
|
-
isRequest:
|
|
605
|
-
isResponse:
|
|
606
|
-
isHeaders:
|
|
607
|
-
isUndefined:
|
|
608
|
-
isDate:
|
|
609
|
-
isFile:
|
|
610
|
-
isReactNativeBlob:
|
|
611
|
-
isReactNative:
|
|
612
|
-
isBlob:
|
|
613
|
-
isRegExp:
|
|
614
|
-
isFunction:
|
|
615
|
-
isStream:
|
|
616
|
-
isURLSearchParams:
|
|
617
|
-
isTypedArray:
|
|
618
|
-
isFileList:
|
|
619
|
-
forEach:
|
|
620
|
-
merge:
|
|
621
|
-
extend:
|
|
622
|
-
trim:
|
|
623
|
-
stripBOM:
|
|
624
|
-
inherits:
|
|
625
|
-
toFlatObject:
|
|
626
|
-
kindOf:
|
|
627
|
-
kindOfTest:
|
|
628
|
-
endsWith:
|
|
629
|
-
toArray:
|
|
630
|
-
forEachEntry:
|
|
631
|
-
matchAll:
|
|
632
|
-
isHTMLForm:
|
|
633
|
-
hasOwnProperty:
|
|
634
|
-
hasOwnProp:
|
|
667
|
+
r.push(s), ce.postMessage(n, "*");
|
|
668
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", K(ce.postMessage)), Sr = typeof queueMicrotask < "u" ? queueMicrotask.bind(ce) : typeof process < "u" && process.nextTick || Qt, Yt = (t) => t != null && K(t[xe]), xr = (t) => t != null && Se(t, xe) && Yt(t), a = {
|
|
669
|
+
isArray: fe,
|
|
670
|
+
isArrayBuffer: Vt,
|
|
671
|
+
isBuffer: me,
|
|
672
|
+
isFormData: Gn,
|
|
673
|
+
isArrayBufferView: jn,
|
|
674
|
+
isString: Bn,
|
|
675
|
+
isNumber: Wt,
|
|
676
|
+
isBoolean: In,
|
|
677
|
+
isObject: ye,
|
|
678
|
+
isPlainObject: je,
|
|
679
|
+
isEmptyObject: Mn,
|
|
680
|
+
isReadableStream: Yn,
|
|
681
|
+
isRequest: Zn,
|
|
682
|
+
isResponse: er,
|
|
683
|
+
isHeaders: tr,
|
|
684
|
+
isUndefined: de,
|
|
685
|
+
isDate: Hn,
|
|
686
|
+
isFile: qn,
|
|
687
|
+
isReactNativeBlob: $n,
|
|
688
|
+
isReactNative: Kn,
|
|
689
|
+
isBlob: zn,
|
|
690
|
+
isRegExp: gr,
|
|
691
|
+
isFunction: K,
|
|
692
|
+
isStream: Jn,
|
|
693
|
+
isURLSearchParams: Qn,
|
|
694
|
+
isTypedArray: cr,
|
|
695
|
+
isFileList: Vn,
|
|
696
|
+
forEach: Te,
|
|
697
|
+
merge: ot,
|
|
698
|
+
extend: rr,
|
|
699
|
+
trim: nr,
|
|
700
|
+
stripBOM: sr,
|
|
701
|
+
inherits: or,
|
|
702
|
+
toFlatObject: ir,
|
|
703
|
+
kindOf: lt,
|
|
704
|
+
kindOfTest: Q,
|
|
705
|
+
endsWith: ar,
|
|
706
|
+
toArray: lr,
|
|
707
|
+
forEachEntry: ur,
|
|
708
|
+
matchAll: fr,
|
|
709
|
+
isHTMLForm: dr,
|
|
710
|
+
hasOwnProperty: _e,
|
|
711
|
+
hasOwnProp: _e,
|
|
635
712
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
713
|
+
hasOwnInPrototypeChain: Se,
|
|
714
|
+
getSafeProp: Un,
|
|
715
|
+
toSafeFlatObject: Fn,
|
|
716
|
+
reduceDescriptors: Gt,
|
|
717
|
+
freezeMethods: mr,
|
|
718
|
+
toObjectSet: yr,
|
|
719
|
+
toCamelCase: hr,
|
|
720
|
+
noop: br,
|
|
721
|
+
toFiniteNumber: Er,
|
|
722
|
+
findKey: Jt,
|
|
723
|
+
global: ce,
|
|
724
|
+
isContextDefined: Xt,
|
|
725
|
+
isSpecCompliantForm: wr,
|
|
726
|
+
toJSONObject: Rr,
|
|
727
|
+
isAsyncFn: Or,
|
|
728
|
+
isThenable: _r,
|
|
729
|
+
setImmediate: Qt,
|
|
730
|
+
asap: Sr,
|
|
731
|
+
isIterable: Yt,
|
|
732
|
+
isSafeIterable: xr
|
|
733
|
+
}, Tr = a.toObjectSet([
|
|
734
|
+
"age",
|
|
735
|
+
"authorization",
|
|
736
|
+
"content-length",
|
|
737
|
+
"content-type",
|
|
738
|
+
"etag",
|
|
739
|
+
"expires",
|
|
740
|
+
"from",
|
|
741
|
+
"host",
|
|
742
|
+
"if-modified-since",
|
|
743
|
+
"if-unmodified-since",
|
|
744
|
+
"last-modified",
|
|
745
|
+
"location",
|
|
746
|
+
"max-forwards",
|
|
747
|
+
"proxy-authorization",
|
|
748
|
+
"referer",
|
|
749
|
+
"retry-after",
|
|
750
|
+
"user-agent"
|
|
751
|
+
]), Ar = (t) => {
|
|
752
|
+
const e = {};
|
|
753
|
+
let n, r, s;
|
|
754
|
+
return t && t.split(`
|
|
755
|
+
`).forEach(function(i) {
|
|
756
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim();
|
|
757
|
+
const l = a.hasOwnProp(e, n);
|
|
758
|
+
!n || l && a.hasOwnProp(Tr, n) || (n === "set-cookie" ? l ? e[n].push(r) : e[n] = [r] : e[n] = l ? e[n] + ", " + r : r);
|
|
759
|
+
}), e;
|
|
652
760
|
};
|
|
653
|
-
|
|
761
|
+
function Pr(t) {
|
|
762
|
+
let e = 0, n = t.length;
|
|
763
|
+
for (; e < n; ) {
|
|
764
|
+
const r = t.charCodeAt(e);
|
|
765
|
+
if (r !== 9 && r !== 32)
|
|
766
|
+
break;
|
|
767
|
+
e += 1;
|
|
768
|
+
}
|
|
769
|
+
for (; n > e; ) {
|
|
770
|
+
const r = t.charCodeAt(n - 1);
|
|
771
|
+
if (r !== 9 && r !== 32)
|
|
772
|
+
break;
|
|
773
|
+
n -= 1;
|
|
774
|
+
}
|
|
775
|
+
return e === 0 && n === t.length ? t : t.slice(e, n);
|
|
776
|
+
}
|
|
777
|
+
const Cr = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), Lr = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
778
|
+
function ct(t, e) {
|
|
779
|
+
return a.isArray(t) ? t.map((n) => ct(n, e)) : Pr(String(t).replace(e, ""));
|
|
780
|
+
}
|
|
781
|
+
const Dr = (t) => ct(t, Cr), Nr = (t) => ct(t, Lr);
|
|
782
|
+
function Zt(t) {
|
|
783
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
784
|
+
return a.forEach(t.toJSON(), (n, r) => {
|
|
785
|
+
e[r] = Nr(n);
|
|
786
|
+
}), e;
|
|
787
|
+
}
|
|
788
|
+
const Ot = Symbol("internals");
|
|
789
|
+
function Ee(t) {
|
|
790
|
+
return t && String(t).trim().toLowerCase();
|
|
791
|
+
}
|
|
792
|
+
function Be(t) {
|
|
793
|
+
return t === !1 || t == null ? t : a.isArray(t) ? t.map(Be) : Dr(String(t));
|
|
794
|
+
}
|
|
795
|
+
function kr(t) {
|
|
796
|
+
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
797
|
+
let r;
|
|
798
|
+
for (; r = n.exec(t); )
|
|
799
|
+
e[r[1]] = r[2];
|
|
800
|
+
return e;
|
|
801
|
+
}
|
|
802
|
+
const vr = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
803
|
+
function Xe(t) {
|
|
804
|
+
let e = 0, n = t.length;
|
|
805
|
+
for (; e < n; ) {
|
|
806
|
+
const r = t.charCodeAt(e);
|
|
807
|
+
if (r !== 9 && r !== 32)
|
|
808
|
+
break;
|
|
809
|
+
e += 1;
|
|
810
|
+
}
|
|
811
|
+
for (; n > e; ) {
|
|
812
|
+
const r = t.charCodeAt(n - 1);
|
|
813
|
+
if (r !== 9 && r !== 32)
|
|
814
|
+
break;
|
|
815
|
+
n -= 1;
|
|
816
|
+
}
|
|
817
|
+
return e === 0 && n === t.length ? t : t.slice(e, n);
|
|
818
|
+
}
|
|
819
|
+
function Ur(t) {
|
|
820
|
+
const e = t.length - 1;
|
|
821
|
+
if (e < 1 || t.charCodeAt(0) !== 34 || t.charCodeAt(e) !== 34)
|
|
822
|
+
return t;
|
|
823
|
+
let n = "";
|
|
824
|
+
for (let r = 1; r < e; r++) {
|
|
825
|
+
const s = t.charCodeAt(r);
|
|
826
|
+
if (s === 34 || s === 92 && (r += 1, r >= e))
|
|
827
|
+
return t;
|
|
828
|
+
n += t[r];
|
|
829
|
+
}
|
|
830
|
+
return n;
|
|
831
|
+
}
|
|
832
|
+
function Fr(t) {
|
|
833
|
+
const e = /* @__PURE__ */ Object.create(null), n = String(t);
|
|
834
|
+
let r = 0, s = !1, o = !1;
|
|
835
|
+
function i(l) {
|
|
836
|
+
const c = Xe(n.slice(r, l)), d = c.indexOf("=");
|
|
837
|
+
if (d < 1)
|
|
838
|
+
return;
|
|
839
|
+
const u = Xe(c.slice(0, d));
|
|
840
|
+
if (!vr.test(u))
|
|
841
|
+
return;
|
|
842
|
+
const h = u.toLowerCase();
|
|
843
|
+
if (h === "__proto__" || h === "constructor" || h === "prototype")
|
|
844
|
+
return;
|
|
845
|
+
const p = Xe(c.slice(d + 1));
|
|
846
|
+
e[h] = Ur(p);
|
|
847
|
+
}
|
|
848
|
+
for (let l = 0; l < n.length; l++) {
|
|
849
|
+
const c = n.charCodeAt(l);
|
|
850
|
+
s ? o ? o = !1 : c === 92 ? o = !0 : c === 34 && (s = !1) : c === 34 ? s = !0 : (c === 44 || c === 59) && (i(l), r = l + 1);
|
|
851
|
+
}
|
|
852
|
+
return i(n.length), e;
|
|
853
|
+
}
|
|
854
|
+
const jr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
855
|
+
function Ge(t, e, n, r, s) {
|
|
856
|
+
if (a.isFunction(r))
|
|
857
|
+
return r.call(this, e, n);
|
|
858
|
+
if (s && (e = n), !!a.isString(e)) {
|
|
859
|
+
if (a.isString(r))
|
|
860
|
+
return e.indexOf(r) !== -1;
|
|
861
|
+
if (a.isRegExp(r))
|
|
862
|
+
return r.test(e);
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
function Br(t) {
|
|
866
|
+
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
867
|
+
}
|
|
868
|
+
function Ir(t, e) {
|
|
869
|
+
const n = a.toCamelCase(" " + e);
|
|
870
|
+
["get", "set", "has"].forEach((r) => {
|
|
871
|
+
Object.defineProperty(t, r + n, {
|
|
872
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
873
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
874
|
+
__proto__: null,
|
|
875
|
+
value: function(s, o, i) {
|
|
876
|
+
return this[r].call(this, e, s, o, i);
|
|
877
|
+
},
|
|
878
|
+
configurable: !0
|
|
879
|
+
});
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
let B = class {
|
|
883
|
+
constructor(e) {
|
|
884
|
+
e && this.set(e);
|
|
885
|
+
}
|
|
886
|
+
set(e, n, r) {
|
|
887
|
+
const s = this;
|
|
888
|
+
function o(l, c, d) {
|
|
889
|
+
const u = Ee(c);
|
|
890
|
+
if (!u)
|
|
891
|
+
return;
|
|
892
|
+
const h = a.findKey(s, u);
|
|
893
|
+
(!h || s[h] === void 0 || d === !0 || d === void 0 && s[h] !== !1) && (s[h || c] = Be(l));
|
|
894
|
+
}
|
|
895
|
+
const i = (l, c) => a.forEach(l, (d, u) => o(d, u, c));
|
|
896
|
+
if (a.isPlainObject(e) || e instanceof this.constructor)
|
|
897
|
+
i(e, n);
|
|
898
|
+
else if (a.isString(e) && (e = e.trim()) && !jr(e))
|
|
899
|
+
i(Ar(e), n);
|
|
900
|
+
else if (a.isObject(e) && a.isSafeIterable(e)) {
|
|
901
|
+
let l = /* @__PURE__ */ Object.create(null), c, d;
|
|
902
|
+
for (const u of e) {
|
|
903
|
+
if (!a.isArray(u))
|
|
904
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
905
|
+
d = u[0], a.hasOwnProp(l, d) ? (c = l[d], l[d] = a.isArray(c) ? [...c, u[1]] : [c, u[1]]) : l[d] = u[1];
|
|
906
|
+
}
|
|
907
|
+
i(l, n);
|
|
908
|
+
} else
|
|
909
|
+
e != null && o(n, e, r);
|
|
910
|
+
return this;
|
|
911
|
+
}
|
|
912
|
+
get(e, n) {
|
|
913
|
+
if (e = Ee(e), e) {
|
|
914
|
+
const r = a.findKey(this, e);
|
|
915
|
+
if (r) {
|
|
916
|
+
const s = this[r];
|
|
917
|
+
if (!n)
|
|
918
|
+
return s;
|
|
919
|
+
if (n === !0)
|
|
920
|
+
return kr(s);
|
|
921
|
+
if (a.isFunction(n))
|
|
922
|
+
return n.call(this, s, r);
|
|
923
|
+
if (a.isRegExp(n))
|
|
924
|
+
return n.exec(s);
|
|
925
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
has(e, n) {
|
|
930
|
+
if (e = Ee(e), e) {
|
|
931
|
+
const r = a.findKey(this, e);
|
|
932
|
+
return !!(r && this[r] !== void 0 && (!n || Ge(this, this[r], r, n)));
|
|
933
|
+
}
|
|
934
|
+
return !1;
|
|
935
|
+
}
|
|
936
|
+
delete(e, n) {
|
|
937
|
+
const r = this;
|
|
938
|
+
let s = !1;
|
|
939
|
+
function o(i) {
|
|
940
|
+
if (i = Ee(i), i) {
|
|
941
|
+
const l = a.findKey(r, i);
|
|
942
|
+
l && (!n || Ge(r, r[l], l, n)) && (delete r[l], s = !0);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
return a.isArray(e) ? e.forEach(o) : o(e), s;
|
|
946
|
+
}
|
|
947
|
+
clear(e) {
|
|
948
|
+
const n = Object.keys(this);
|
|
949
|
+
let r = n.length, s = !1;
|
|
950
|
+
for (; r--; ) {
|
|
951
|
+
const o = n[r];
|
|
952
|
+
(!e || Ge(this, this[o], o, e, !0)) && (delete this[o], s = !0);
|
|
953
|
+
}
|
|
954
|
+
return s;
|
|
955
|
+
}
|
|
956
|
+
normalize(e) {
|
|
957
|
+
const n = this, r = {};
|
|
958
|
+
return a.forEach(this, (s, o) => {
|
|
959
|
+
const i = a.findKey(r, o);
|
|
960
|
+
if (i) {
|
|
961
|
+
n[i] = Be(s), delete n[o];
|
|
962
|
+
return;
|
|
963
|
+
}
|
|
964
|
+
const l = e ? Br(o) : String(o).trim();
|
|
965
|
+
l !== o && delete n[o], n[l] = Be(s), r[l] = !0;
|
|
966
|
+
}), this;
|
|
967
|
+
}
|
|
968
|
+
concat(...e) {
|
|
969
|
+
return this.constructor.concat(this, ...e);
|
|
970
|
+
}
|
|
971
|
+
toJSON(e) {
|
|
972
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
973
|
+
return a.forEach(this, (r, s) => {
|
|
974
|
+
r != null && r !== !1 && (n[s] = e && a.isArray(r) ? r.join(", ") : r);
|
|
975
|
+
}), n;
|
|
976
|
+
}
|
|
977
|
+
[Symbol.iterator]() {
|
|
978
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
979
|
+
}
|
|
980
|
+
toString() {
|
|
981
|
+
return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
|
|
982
|
+
`);
|
|
983
|
+
}
|
|
984
|
+
getSetCookie() {
|
|
985
|
+
const e = this.get("set-cookie");
|
|
986
|
+
return a.isArray(e) ? e : e == null || e === !1 ? [] : [e];
|
|
987
|
+
}
|
|
988
|
+
get [Symbol.toStringTag]() {
|
|
989
|
+
return "AxiosHeaders";
|
|
990
|
+
}
|
|
991
|
+
static from(e) {
|
|
992
|
+
return e instanceof this ? e : new this(e);
|
|
993
|
+
}
|
|
994
|
+
static parseParameters(e) {
|
|
995
|
+
return Fr(e);
|
|
996
|
+
}
|
|
997
|
+
static concat(e, ...n) {
|
|
998
|
+
const r = new this(e);
|
|
999
|
+
return n.forEach((s) => r.set(s)), r;
|
|
1000
|
+
}
|
|
1001
|
+
static accessor(e) {
|
|
1002
|
+
const r = (this[Ot] = this[Ot] = {
|
|
1003
|
+
accessors: {}
|
|
1004
|
+
}).accessors, s = this.prototype;
|
|
1005
|
+
function o(i) {
|
|
1006
|
+
const l = Ee(i);
|
|
1007
|
+
r[l] || (Ir(s, i), r[l] = !0);
|
|
1008
|
+
}
|
|
1009
|
+
return a.isArray(e) ? e.forEach(o) : o(e), this;
|
|
1010
|
+
}
|
|
1011
|
+
};
|
|
1012
|
+
B.accessor([
|
|
1013
|
+
"Content-Type",
|
|
1014
|
+
"Content-Length",
|
|
1015
|
+
"Accept",
|
|
1016
|
+
"Accept-Encoding",
|
|
1017
|
+
"User-Agent",
|
|
1018
|
+
"Authorization"
|
|
1019
|
+
]);
|
|
1020
|
+
a.reduceDescriptors(B.prototype, ({ value: t }, e) => {
|
|
1021
|
+
let n = e[0].toUpperCase() + e.slice(1);
|
|
1022
|
+
return {
|
|
1023
|
+
get: () => t,
|
|
1024
|
+
set(r) {
|
|
1025
|
+
this[n] = r;
|
|
1026
|
+
}
|
|
1027
|
+
};
|
|
1028
|
+
});
|
|
1029
|
+
a.freezeMethods(B);
|
|
1030
|
+
const He = "[REDACTED ****]";
|
|
1031
|
+
function Mr(t) {
|
|
1032
|
+
if (a.hasOwnProp(t, "toJSON"))
|
|
1033
|
+
return !0;
|
|
1034
|
+
let e = Object.getPrototypeOf(t);
|
|
1035
|
+
for (; e && e !== Object.prototype; ) {
|
|
1036
|
+
if (a.hasOwnProp(e, "toJSON"))
|
|
1037
|
+
return !0;
|
|
1038
|
+
e = Object.getPrototypeOf(e);
|
|
1039
|
+
}
|
|
1040
|
+
return !1;
|
|
1041
|
+
}
|
|
1042
|
+
function Hr(t, e) {
|
|
1043
|
+
const n = new Set(e.map((o) => String(o).toLowerCase())), r = [], s = (o) => {
|
|
1044
|
+
if (o === null || typeof o != "object" || a.isBuffer(o)) return o;
|
|
1045
|
+
if (r.indexOf(o) !== -1) return;
|
|
1046
|
+
o instanceof B && (o = o.toJSON()), r.push(o);
|
|
1047
|
+
let i;
|
|
1048
|
+
if (a.isArray(o))
|
|
1049
|
+
i = [], o.forEach((l, c) => {
|
|
1050
|
+
const d = s(l);
|
|
1051
|
+
a.isUndefined(d) || (i[c] = d);
|
|
1052
|
+
});
|
|
1053
|
+
else {
|
|
1054
|
+
if (!a.isPlainObject(o) && Mr(o))
|
|
1055
|
+
return r.pop(), o;
|
|
1056
|
+
i = /* @__PURE__ */ Object.create(null);
|
|
1057
|
+
for (const [l, c] of Object.entries(o)) {
|
|
1058
|
+
const d = n.has(l.toLowerCase()) ? He : s(c);
|
|
1059
|
+
a.isUndefined(d) || (i[l] = d);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
return r.pop(), i;
|
|
1063
|
+
};
|
|
1064
|
+
return s(t);
|
|
1065
|
+
}
|
|
1066
|
+
function _t(t) {
|
|
1067
|
+
try {
|
|
1068
|
+
return String(t);
|
|
1069
|
+
} catch {
|
|
1070
|
+
return "";
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
function qr(t) {
|
|
1074
|
+
return t.errors.map((n) => {
|
|
1075
|
+
try {
|
|
1076
|
+
return n && n.message ? _t(n.message) : _t(n);
|
|
1077
|
+
} catch {
|
|
1078
|
+
return "";
|
|
1079
|
+
}
|
|
1080
|
+
}).filter(Boolean).join("; ") || t.name || "AggregateError";
|
|
1081
|
+
}
|
|
1082
|
+
let g = class en extends Error {
|
|
654
1083
|
static from(e, n, r, s, o, i) {
|
|
655
|
-
|
|
656
|
-
|
|
1084
|
+
let l = e.message;
|
|
1085
|
+
!l && a.isArray(e.errors) && e.errors.length && (l = qr(e));
|
|
1086
|
+
const c = new en(l, n || e.code, r, s, o);
|
|
1087
|
+
return Object.defineProperty(c, "cause", {
|
|
1088
|
+
__proto__: null,
|
|
1089
|
+
value: e,
|
|
1090
|
+
writable: !0,
|
|
1091
|
+
enumerable: !1,
|
|
1092
|
+
configurable: !0
|
|
1093
|
+
}), c.name = e.name, e.status != null && c.status == null && (c.status = e.status), i && Object.assign(c, i), c;
|
|
657
1094
|
}
|
|
658
1095
|
/**
|
|
659
1096
|
* Create an Error with the specified message, config, error code, request and response.
|
|
@@ -668,6 +1105,9 @@ let y = class Rt extends Error {
|
|
|
668
1105
|
*/
|
|
669
1106
|
constructor(e, n, r, s, o) {
|
|
670
1107
|
super(e), Object.defineProperty(this, "message", {
|
|
1108
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
1109
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
1110
|
+
__proto__: null,
|
|
671
1111
|
value: e,
|
|
672
1112
|
enumerable: !0,
|
|
673
1113
|
writable: !0,
|
|
@@ -675,6 +1115,7 @@ let y = class Rt extends Error {
|
|
|
675
1115
|
}), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), r && (this.config = r), s && (this.request = s), o && (this.response = o, this.status = o.status);
|
|
676
1116
|
}
|
|
677
1117
|
toJSON() {
|
|
1118
|
+
const e = this.config, n = e && a.hasOwnProp(e, "redact") ? e.redact : void 0, r = a.isArray(n) && n.length > 0 ? Hr(e, n) : a.toJSONObject(e);
|
|
678
1119
|
return {
|
|
679
1120
|
// Standard
|
|
680
1121
|
message: this.message,
|
|
@@ -688,113 +1129,128 @@ let y = class Rt extends Error {
|
|
|
688
1129
|
columnNumber: this.columnNumber,
|
|
689
1130
|
stack: this.stack,
|
|
690
1131
|
// Axios
|
|
691
|
-
config:
|
|
1132
|
+
config: r,
|
|
692
1133
|
code: this.code,
|
|
693
1134
|
status: this.status
|
|
694
1135
|
};
|
|
695
1136
|
}
|
|
696
1137
|
};
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
1138
|
+
g.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
1139
|
+
g.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
1140
|
+
g.ECONNABORTED = "ECONNABORTED";
|
|
1141
|
+
g.ETIMEDOUT = "ETIMEDOUT";
|
|
1142
|
+
g.ECONNREFUSED = "ECONNREFUSED";
|
|
1143
|
+
g.ERR_NETWORK = "ERR_NETWORK";
|
|
1144
|
+
g.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
1145
|
+
g.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
1146
|
+
g.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
1147
|
+
g.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
1148
|
+
g.ERR_CANCELED = "ERR_CANCELED";
|
|
1149
|
+
g.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
1150
|
+
g.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
1151
|
+
g.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
1152
|
+
const $r = null, tn = 100;
|
|
1153
|
+
function it(t) {
|
|
712
1154
|
return a.isPlainObject(t) || a.isArray(t);
|
|
713
1155
|
}
|
|
714
|
-
function
|
|
1156
|
+
function nn(t) {
|
|
715
1157
|
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
716
1158
|
}
|
|
717
|
-
function
|
|
1159
|
+
function Qe(t, e, n) {
|
|
718
1160
|
return t ? t.concat(e).map(function(s, o) {
|
|
719
|
-
return s =
|
|
1161
|
+
return s = nn(s), !n && o ? "[" + s + "]" : s;
|
|
720
1162
|
}).join(n ? "." : "") : e;
|
|
721
1163
|
}
|
|
722
|
-
function
|
|
723
|
-
return a.isArray(t) && !t.some(
|
|
1164
|
+
function Kr(t) {
|
|
1165
|
+
return a.isArray(t) && !t.some(it);
|
|
724
1166
|
}
|
|
725
|
-
const
|
|
1167
|
+
const zr = a.toFlatObject(a, {}, null, function(e) {
|
|
726
1168
|
return /^is[A-Z]/.test(e);
|
|
727
1169
|
});
|
|
728
|
-
function
|
|
1170
|
+
function Ke(t, e, n) {
|
|
729
1171
|
if (!a.isObject(t))
|
|
730
1172
|
throw new TypeError("target must be an object");
|
|
731
|
-
e = e || new FormData()
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
},
|
|
738
|
-
!1,
|
|
739
|
-
function(h, x) {
|
|
740
|
-
return !a.isUndefined(x[h]);
|
|
741
|
-
}
|
|
742
|
-
);
|
|
743
|
-
const r = n.metaTokens, s = n.visitor || d, o = n.dots, i = n.indexes, l = n.Blob || typeof Blob < "u" && Blob, f = n.maxDepth === void 0 ? 100 : n.maxDepth, u = l && a.isSpecCompliantForm(e);
|
|
744
|
-
if (!a.isFunction(s))
|
|
1173
|
+
e = e || new FormData();
|
|
1174
|
+
const r = (m, w) => {
|
|
1175
|
+
const E = a.getSafeProp(n, m);
|
|
1176
|
+
return a.isUndefined(E) ? w : E;
|
|
1177
|
+
}, s = r("metaTokens", !0), o = r("visitor") || O, i = r("dots", !1), l = r("indexes", !1), c = r("Blob") || typeof Blob < "u" && Blob, d = r("maxDepth", tn), u = c && a.isSpecCompliantForm(e), h = [];
|
|
1178
|
+
if (!a.isFunction(o))
|
|
745
1179
|
throw new TypeError("visitor must be a function");
|
|
746
|
-
function
|
|
747
|
-
if (
|
|
748
|
-
if (a.isDate(
|
|
749
|
-
return
|
|
750
|
-
if (a.isBoolean(
|
|
751
|
-
return
|
|
752
|
-
if (!u && a.isBlob(
|
|
753
|
-
throw new
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
1180
|
+
function p(m) {
|
|
1181
|
+
if (m === null) return "";
|
|
1182
|
+
if (a.isDate(m))
|
|
1183
|
+
return m.toISOString();
|
|
1184
|
+
if (a.isBoolean(m))
|
|
1185
|
+
return m.toString();
|
|
1186
|
+
if (!u && a.isBlob(m))
|
|
1187
|
+
throw new g("Blob is not supported. Use a Buffer instead.");
|
|
1188
|
+
if (a.isArrayBuffer(m) || a.isTypedArray(m)) {
|
|
1189
|
+
if (u && typeof c == "function")
|
|
1190
|
+
return new c([m]);
|
|
1191
|
+
throw new g(
|
|
1192
|
+
"Blob is not supported. Use a Buffer instead.",
|
|
1193
|
+
g.ERR_NOT_SUPPORT
|
|
1194
|
+
);
|
|
1195
|
+
}
|
|
1196
|
+
return m;
|
|
1197
|
+
}
|
|
1198
|
+
function _(m) {
|
|
1199
|
+
if (m > d)
|
|
1200
|
+
throw new g(
|
|
1201
|
+
"Object is too deeply nested (" + m + " levels). Max depth: " + d,
|
|
1202
|
+
g.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
function S(m, w) {
|
|
1206
|
+
if (d === 1 / 0)
|
|
1207
|
+
return JSON.stringify(m);
|
|
1208
|
+
const E = [];
|
|
1209
|
+
return JSON.stringify(m, function(v, L) {
|
|
1210
|
+
if (!a.isObject(L))
|
|
1211
|
+
return L;
|
|
1212
|
+
for (; E.length && E[E.length - 1] !== this; )
|
|
1213
|
+
E.pop();
|
|
1214
|
+
return E.push(L), _(w + E.length - 1), L;
|
|
1215
|
+
});
|
|
1216
|
+
}
|
|
1217
|
+
function O(m, w, E) {
|
|
1218
|
+
let C = m;
|
|
1219
|
+
if (a.isReactNative(e) && a.isReactNativeBlob(m))
|
|
1220
|
+
return e.append(Qe(E, w, i), p(m)), !1;
|
|
1221
|
+
if (m && !E && typeof m == "object") {
|
|
1222
|
+
if (a.endsWith(w, "{}"))
|
|
1223
|
+
w = s ? w : w.slice(0, -2), m = S(m, 1);
|
|
1224
|
+
else if (a.isArray(m) && Kr(m) || (a.isFileList(m) || a.endsWith(w, "[]")) && (C = a.toArray(m)))
|
|
1225
|
+
return w = nn(w), C.forEach(function(L, z) {
|
|
1226
|
+
!(a.isUndefined(L) || L === null) && e.append(
|
|
766
1227
|
// eslint-disable-next-line no-nested-ternary
|
|
767
|
-
|
|
768
|
-
|
|
1228
|
+
l === !0 ? Qe([w], z, i) : l === null ? w : w + "[]",
|
|
1229
|
+
p(L)
|
|
769
1230
|
);
|
|
770
1231
|
}), !1;
|
|
771
1232
|
}
|
|
772
|
-
return
|
|
1233
|
+
return it(m) ? !0 : (e.append(Qe(E, w, i), p(m)), !1);
|
|
773
1234
|
}
|
|
774
|
-
const
|
|
775
|
-
defaultVisitor:
|
|
776
|
-
convertValue:
|
|
777
|
-
isVisitable:
|
|
1235
|
+
const N = Object.assign(zr, {
|
|
1236
|
+
defaultVisitor: O,
|
|
1237
|
+
convertValue: p,
|
|
1238
|
+
isVisitable: it
|
|
778
1239
|
});
|
|
779
|
-
function
|
|
780
|
-
if (!a.isUndefined(
|
|
781
|
-
if (
|
|
782
|
-
throw new
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
if (R.indexOf(g) !== -1)
|
|
787
|
-
throw Error("Circular reference detected in " + h.join("."));
|
|
788
|
-
R.push(g), a.forEach(g, function(O, T) {
|
|
789
|
-
(!(a.isUndefined(O) || O === null) && s.call(e, O, a.isString(T) ? T.trim() : T, h, S)) === !0 && p(O, h ? h.concat(T) : [T], x + 1);
|
|
790
|
-
}), R.pop();
|
|
1240
|
+
function f(m, w, E = 0) {
|
|
1241
|
+
if (!a.isUndefined(m)) {
|
|
1242
|
+
if (_(E), h.indexOf(m) !== -1)
|
|
1243
|
+
throw new Error("Circular reference detected in " + w.join("."));
|
|
1244
|
+
h.push(m), a.forEach(m, function(v, L) {
|
|
1245
|
+
(!(a.isUndefined(v) || v === null) && o.call(e, v, a.isString(L) ? L.trim() : L, w, N)) === !0 && f(v, w ? w.concat(L) : [L], E + 1);
|
|
1246
|
+
}), h.pop();
|
|
791
1247
|
}
|
|
792
1248
|
}
|
|
793
1249
|
if (!a.isObject(t))
|
|
794
1250
|
throw new TypeError("data must be an object");
|
|
795
|
-
return
|
|
1251
|
+
return f(t), e;
|
|
796
1252
|
}
|
|
797
|
-
function
|
|
1253
|
+
function St(t) {
|
|
798
1254
|
const e = {
|
|
799
1255
|
"!": "%21",
|
|
800
1256
|
"'": "%27",
|
|
@@ -807,40 +1263,60 @@ function Xe(t) {
|
|
|
807
1263
|
return e[r];
|
|
808
1264
|
});
|
|
809
1265
|
}
|
|
810
|
-
function
|
|
811
|
-
this._pairs = [], t &&
|
|
1266
|
+
function ut(t, e) {
|
|
1267
|
+
this._pairs = [], t && Ke(t, this, e);
|
|
812
1268
|
}
|
|
813
|
-
const
|
|
814
|
-
|
|
1269
|
+
const rn = ut.prototype;
|
|
1270
|
+
rn.append = function(e, n) {
|
|
815
1271
|
this._pairs.push([e, n]);
|
|
816
1272
|
};
|
|
817
|
-
|
|
818
|
-
const n = e ?
|
|
819
|
-
return e.call(this, r, Xe);
|
|
820
|
-
} : Xe;
|
|
1273
|
+
rn.toString = function(e) {
|
|
1274
|
+
const n = e ? (r) => e.call(this, r, St) : St;
|
|
821
1275
|
return this._pairs.map(function(s) {
|
|
822
1276
|
return n(s[0]) + "=" + n(s[1]);
|
|
823
1277
|
}, "").join("&");
|
|
824
1278
|
};
|
|
825
|
-
function
|
|
1279
|
+
function Vr(t) {
|
|
826
1280
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
827
1281
|
}
|
|
828
|
-
function
|
|
1282
|
+
function sn(t, e, n) {
|
|
829
1283
|
if (!e)
|
|
830
1284
|
return t;
|
|
831
|
-
|
|
1285
|
+
t = t || "";
|
|
1286
|
+
const r = a.isFunction(n) ? {
|
|
832
1287
|
serialize: n
|
|
833
|
-
} : n,
|
|
1288
|
+
} : n, s = a.getSafeProp(r, "encode") || Vr, o = a.getSafeProp(r, "serialize");
|
|
834
1289
|
let i;
|
|
835
|
-
if (o ? i = o(e,
|
|
1290
|
+
if (o ? i = o(e, r) : i = a.isURLSearchParams(e) ? e.toString() : new ut(e, r).toString(s), i) {
|
|
836
1291
|
const l = t.indexOf("#");
|
|
837
1292
|
l !== -1 && (t = t.slice(0, l)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
838
1293
|
}
|
|
839
1294
|
return t;
|
|
840
1295
|
}
|
|
841
|
-
|
|
1296
|
+
const we = Symbol("internals");
|
|
1297
|
+
function on(t) {
|
|
1298
|
+
return t ? t.length : 0;
|
|
1299
|
+
}
|
|
1300
|
+
function xt(t) {
|
|
1301
|
+
if (t)
|
|
1302
|
+
for (; t.length && t[t.length - 1] === null; )
|
|
1303
|
+
t.pop();
|
|
1304
|
+
}
|
|
1305
|
+
function Re(t, e) {
|
|
1306
|
+
const n = t.handlers, r = on(n);
|
|
1307
|
+
n !== e.handlersRef ? (e.handlersRef = n, e.handlerEntries.clear()) : r !== e.handlersLength && (r ? e.handlerEntries.forEach(function(o, i) {
|
|
1308
|
+
n[o.index] !== o.handler && e.handlerEntries.delete(i);
|
|
1309
|
+
}) : e.handlerEntries.clear()), e.handlersLength = r;
|
|
1310
|
+
}
|
|
1311
|
+
class Tt {
|
|
842
1312
|
constructor() {
|
|
843
|
-
this.handlers = []
|
|
1313
|
+
this.handlers = [], this[we] = {
|
|
1314
|
+
handlersRef: this.handlers,
|
|
1315
|
+
handlersLength: this.handlers.length,
|
|
1316
|
+
handlerEntries: /* @__PURE__ */ new Map(),
|
|
1317
|
+
iterationDepth: 0,
|
|
1318
|
+
nextId: 0
|
|
1319
|
+
};
|
|
844
1320
|
}
|
|
845
1321
|
/**
|
|
846
1322
|
* Add a new interceptor to the stack
|
|
@@ -852,12 +1328,18 @@ class Qe {
|
|
|
852
1328
|
* @return {Number} An ID used to remove interceptor later
|
|
853
1329
|
*/
|
|
854
1330
|
use(e, n, r) {
|
|
855
|
-
|
|
1331
|
+
const s = {
|
|
856
1332
|
fulfilled: e,
|
|
857
1333
|
rejected: n,
|
|
858
1334
|
synchronous: r ? r.synchronous : !1,
|
|
859
1335
|
runWhen: r ? r.runWhen : null
|
|
860
|
-
}
|
|
1336
|
+
}, o = this[we];
|
|
1337
|
+
this.handlers == null && (this.handlers = []), Re(this, o);
|
|
1338
|
+
const i = o.nextId++;
|
|
1339
|
+
return this.handlers.push(s), o.handlerEntries.set(i, {
|
|
1340
|
+
handler: s,
|
|
1341
|
+
index: this.handlers.length - 1
|
|
1342
|
+
}), o.handlersLength = this.handlers.length, i;
|
|
861
1343
|
}
|
|
862
1344
|
/**
|
|
863
1345
|
* Remove an interceptor from the stack
|
|
@@ -867,7 +1349,14 @@ class Qe {
|
|
|
867
1349
|
* @returns {void}
|
|
868
1350
|
*/
|
|
869
1351
|
eject(e) {
|
|
870
|
-
|
|
1352
|
+
const n = this[we];
|
|
1353
|
+
Re(this, n);
|
|
1354
|
+
const r = n.handlerEntries.get(e);
|
|
1355
|
+
if (r) {
|
|
1356
|
+
if (n.handlerEntries.delete(e), this.handlers[r.index] !== r.handler)
|
|
1357
|
+
return;
|
|
1358
|
+
this.handlers[r.index] = null, n.iterationDepth || (xt(this.handlers), n.handlersLength = this.handlers.length);
|
|
1359
|
+
}
|
|
871
1360
|
}
|
|
872
1361
|
/**
|
|
873
1362
|
* Clear all interceptors from the stack
|
|
@@ -875,7 +1364,7 @@ class Qe {
|
|
|
875
1364
|
* @returns {void}
|
|
876
1365
|
*/
|
|
877
1366
|
clear() {
|
|
878
|
-
this.handlers && (this.handlers = []);
|
|
1367
|
+
this.handlers && (this.handlers = [], Re(this, this[we]));
|
|
879
1368
|
}
|
|
880
1369
|
/**
|
|
881
1370
|
* Iterate over all the registered interceptors
|
|
@@ -888,48 +1377,68 @@ class Qe {
|
|
|
888
1377
|
* @returns {void}
|
|
889
1378
|
*/
|
|
890
1379
|
forEach(e) {
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
1380
|
+
const n = this[we];
|
|
1381
|
+
Re(this, n), n.iterationDepth++;
|
|
1382
|
+
try {
|
|
1383
|
+
a.forEach(this.handlers, function(s) {
|
|
1384
|
+
s !== null && e(s);
|
|
1385
|
+
});
|
|
1386
|
+
} finally {
|
|
1387
|
+
--n.iterationDepth || (Re(this, n), xt(this.handlers), n.handlersLength = on(this.handlers));
|
|
1388
|
+
}
|
|
894
1389
|
}
|
|
895
1390
|
}
|
|
896
|
-
const
|
|
1391
|
+
const ft = {
|
|
897
1392
|
silentJSONParsing: !0,
|
|
898
1393
|
forcedJSONParsing: !0,
|
|
899
1394
|
clarifyTimeoutError: !1,
|
|
900
|
-
legacyInterceptorReqResOrdering: !0
|
|
901
|
-
|
|
1395
|
+
legacyInterceptorReqResOrdering: !0,
|
|
1396
|
+
advertiseZstdAcceptEncoding: !1,
|
|
1397
|
+
validateStatusUndefinedResolves: !0
|
|
1398
|
+
}, Wr = typeof URLSearchParams < "u" ? URLSearchParams : ut, Jr = typeof FormData < "u" ? FormData : null, Xr = typeof Blob < "u" ? Blob : null, Gr = {
|
|
902
1399
|
isBrowser: !0,
|
|
903
1400
|
classes: {
|
|
904
|
-
URLSearchParams:
|
|
905
|
-
FormData:
|
|
906
|
-
Blob:
|
|
1401
|
+
URLSearchParams: Wr,
|
|
1402
|
+
FormData: Jr,
|
|
1403
|
+
Blob: Xr
|
|
907
1404
|
},
|
|
908
1405
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
909
|
-
},
|
|
910
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
1406
|
+
}, dt = typeof window < "u" && typeof document < "u", at = typeof navigator == "object" && navigator || void 0, Qr = dt && (!at || ["ReactNative", "NativeScript", "NS"].indexOf(at.product) < 0), Yr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1407
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Zr = dt && window.location.href || "http://localhost", es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
911
1408
|
__proto__: null,
|
|
912
|
-
hasBrowserEnv:
|
|
913
|
-
hasStandardBrowserEnv:
|
|
914
|
-
hasStandardBrowserWebWorkerEnv:
|
|
915
|
-
navigator:
|
|
916
|
-
origin:
|
|
917
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
918
|
-
...
|
|
919
|
-
...
|
|
1409
|
+
hasBrowserEnv: dt,
|
|
1410
|
+
hasStandardBrowserEnv: Qr,
|
|
1411
|
+
hasStandardBrowserWebWorkerEnv: Yr,
|
|
1412
|
+
navigator: at,
|
|
1413
|
+
origin: Zr
|
|
1414
|
+
}, Symbol.toStringTag, { value: "Module" })), U = {
|
|
1415
|
+
...es,
|
|
1416
|
+
...Gr
|
|
920
1417
|
};
|
|
921
|
-
function
|
|
922
|
-
return
|
|
1418
|
+
function ts(t, e) {
|
|
1419
|
+
return Ke(t, new U.classes.URLSearchParams(), {
|
|
923
1420
|
visitor: function(n, r, s, o) {
|
|
924
|
-
return
|
|
1421
|
+
return U.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
925
1422
|
},
|
|
926
1423
|
...e
|
|
927
1424
|
});
|
|
928
1425
|
}
|
|
929
|
-
|
|
930
|
-
|
|
1426
|
+
const At = tn;
|
|
1427
|
+
function an(t) {
|
|
1428
|
+
if (t > At)
|
|
1429
|
+
throw new g(
|
|
1430
|
+
"FormData field is too deeply nested (" + t + " levels). Max depth: " + At,
|
|
1431
|
+
g.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
1432
|
+
);
|
|
1433
|
+
}
|
|
1434
|
+
function ns(t) {
|
|
1435
|
+
const e = [], n = /[^.[\]]+|\[([^.[\]]*)]/g;
|
|
1436
|
+
let r;
|
|
1437
|
+
for (; (r = n.exec(t)) !== null; )
|
|
1438
|
+
an(e.length), e.push(r[0] === "[]" ? "" : r[1] || r[0]);
|
|
1439
|
+
return e;
|
|
931
1440
|
}
|
|
932
|
-
function
|
|
1441
|
+
function rs(t) {
|
|
933
1442
|
const e = {}, n = Object.keys(t);
|
|
934
1443
|
let r;
|
|
935
1444
|
const s = n.length;
|
|
@@ -938,344 +1447,130 @@ function er(t) {
|
|
|
938
1447
|
o = n[r], e[o] = t[o];
|
|
939
1448
|
return e;
|
|
940
1449
|
}
|
|
941
|
-
function
|
|
1450
|
+
function ln(t) {
|
|
942
1451
|
function e(n, r, s, o) {
|
|
1452
|
+
an(o);
|
|
943
1453
|
let i = n[o++];
|
|
944
1454
|
if (i === "__proto__") return !0;
|
|
945
|
-
const l = Number.isFinite(+i),
|
|
946
|
-
return i = !i && a.isArray(s) ? s.length : i,
|
|
1455
|
+
const l = Number.isFinite(+i), c = o >= n.length;
|
|
1456
|
+
return i = !i && a.isArray(s) ? s.length : i, c ? (a.hasOwnProp(s, i) ? s[i] = a.isArray(s[i]) ? s[i].concat(r) : [s[i], r] : s[i] = r, !l) : ((!a.hasOwnProp(s, i) || !a.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = rs(s[i])), !l);
|
|
947
1457
|
}
|
|
948
1458
|
if (a.isFormData(t) && a.isFunction(t.entries)) {
|
|
949
1459
|
const n = {};
|
|
950
1460
|
return a.forEachEntry(t, (r, s) => {
|
|
951
|
-
e(
|
|
952
|
-
}), n;
|
|
953
|
-
}
|
|
954
|
-
return null;
|
|
955
|
-
}
|
|
956
|
-
const te = (t, e) => t != null && a.hasOwnProp(t, e) ? t[e] : void 0;
|
|
957
|
-
function tr(t, e, n) {
|
|
958
|
-
if (a.isString(t))
|
|
959
|
-
try {
|
|
960
|
-
return (e || JSON.parse)(t), a.trim(t);
|
|
961
|
-
} catch (r) {
|
|
962
|
-
if (r.name !== "SyntaxError")
|
|
963
|
-
throw r;
|
|
964
|
-
}
|
|
965
|
-
return (n || JSON.stringify)(t);
|
|
966
|
-
}
|
|
967
|
-
const de = {
|
|
968
|
-
transitional: He,
|
|
969
|
-
adapter: ["xhr", "http", "fetch"],
|
|
970
|
-
transformRequest: [
|
|
971
|
-
function(e, n) {
|
|
972
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(e);
|
|
973
|
-
if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
974
|
-
return s ? JSON.stringify(St(e)) : e;
|
|
975
|
-
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
|
|
976
|
-
return e;
|
|
977
|
-
if (a.isArrayBufferView(e))
|
|
978
|
-
return e.buffer;
|
|
979
|
-
if (a.isURLSearchParams(e))
|
|
980
|
-
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
981
|
-
let l;
|
|
982
|
-
if (o) {
|
|
983
|
-
const f = te(this, "formSerializer");
|
|
984
|
-
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
985
|
-
return Yn(e, f).toString();
|
|
986
|
-
if ((l = a.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
987
|
-
const u = te(this, "env"), c = u && u.FormData;
|
|
988
|
-
return _e(
|
|
989
|
-
l ? { "files[]": e } : e,
|
|
990
|
-
c && new c(),
|
|
991
|
-
f
|
|
992
|
-
);
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
return o || s ? (n.setContentType("application/json", !1), tr(e)) : e;
|
|
996
|
-
}
|
|
997
|
-
],
|
|
998
|
-
transformResponse: [
|
|
999
|
-
function(e) {
|
|
1000
|
-
const n = te(this, "transitional") || de.transitional, r = n && n.forcedJSONParsing, s = te(this, "responseType"), o = s === "json";
|
|
1001
|
-
if (a.isResponse(e) || a.isReadableStream(e))
|
|
1002
|
-
return e;
|
|
1003
|
-
if (e && a.isString(e) && (r && !s || o)) {
|
|
1004
|
-
const l = !(n && n.silentJSONParsing) && o;
|
|
1005
|
-
try {
|
|
1006
|
-
return JSON.parse(e, te(this, "parseReviver"));
|
|
1007
|
-
} catch (f) {
|
|
1008
|
-
if (l)
|
|
1009
|
-
throw f.name === "SyntaxError" ? y.from(f, y.ERR_BAD_RESPONSE, this, null, te(this, "response")) : f;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
return e;
|
|
1013
|
-
}
|
|
1014
|
-
],
|
|
1015
|
-
/**
|
|
1016
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1017
|
-
* timeout is not created.
|
|
1018
|
-
*/
|
|
1019
|
-
timeout: 0,
|
|
1020
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
1021
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
1022
|
-
maxContentLength: -1,
|
|
1023
|
-
maxBodyLength: -1,
|
|
1024
|
-
env: {
|
|
1025
|
-
FormData: k.classes.FormData,
|
|
1026
|
-
Blob: k.classes.Blob
|
|
1027
|
-
},
|
|
1028
|
-
validateStatus: function(e) {
|
|
1029
|
-
return e >= 200 && e < 300;
|
|
1030
|
-
},
|
|
1031
|
-
headers: {
|
|
1032
|
-
common: {
|
|
1033
|
-
Accept: "application/json, text/plain, */*",
|
|
1034
|
-
"Content-Type": void 0
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
};
|
|
1038
|
-
a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
1039
|
-
de.headers[t] = {};
|
|
1040
|
-
});
|
|
1041
|
-
const nr = a.toObjectSet([
|
|
1042
|
-
"age",
|
|
1043
|
-
"authorization",
|
|
1044
|
-
"content-length",
|
|
1045
|
-
"content-type",
|
|
1046
|
-
"etag",
|
|
1047
|
-
"expires",
|
|
1048
|
-
"from",
|
|
1049
|
-
"host",
|
|
1050
|
-
"if-modified-since",
|
|
1051
|
-
"if-unmodified-since",
|
|
1052
|
-
"last-modified",
|
|
1053
|
-
"location",
|
|
1054
|
-
"max-forwards",
|
|
1055
|
-
"proxy-authorization",
|
|
1056
|
-
"referer",
|
|
1057
|
-
"retry-after",
|
|
1058
|
-
"user-agent"
|
|
1059
|
-
]), rr = (t) => {
|
|
1060
|
-
const e = {};
|
|
1061
|
-
let n, r, s;
|
|
1062
|
-
return t && t.split(`
|
|
1063
|
-
`).forEach(function(i) {
|
|
1064
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || e[n] && nr[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
1065
|
-
}), e;
|
|
1066
|
-
}, Ye = Symbol("internals"), sr = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
1067
|
-
function or(t) {
|
|
1068
|
-
let e = 0, n = t.length;
|
|
1069
|
-
for (; e < n; ) {
|
|
1070
|
-
const r = t.charCodeAt(e);
|
|
1071
|
-
if (r !== 9 && r !== 32)
|
|
1072
|
-
break;
|
|
1073
|
-
e += 1;
|
|
1074
|
-
}
|
|
1075
|
-
for (; n > e; ) {
|
|
1076
|
-
const r = t.charCodeAt(n - 1);
|
|
1077
|
-
if (r !== 9 && r !== 32)
|
|
1078
|
-
break;
|
|
1079
|
-
n -= 1;
|
|
1080
|
-
}
|
|
1081
|
-
return e === 0 && n === t.length ? t : t.slice(e, n);
|
|
1082
|
-
}
|
|
1083
|
-
function ie(t) {
|
|
1084
|
-
return t && String(t).trim().toLowerCase();
|
|
1085
|
-
}
|
|
1086
|
-
function ir(t) {
|
|
1087
|
-
return or(t.replace(sr, ""));
|
|
1088
|
-
}
|
|
1089
|
-
function Ee(t) {
|
|
1090
|
-
return t === !1 || t == null ? t : a.isArray(t) ? t.map(Ee) : ir(String(t));
|
|
1091
|
-
}
|
|
1092
|
-
function ar(t) {
|
|
1093
|
-
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1094
|
-
let r;
|
|
1095
|
-
for (; r = n.exec(t); )
|
|
1096
|
-
e[r[1]] = r[2];
|
|
1097
|
-
return e;
|
|
1098
|
-
}
|
|
1099
|
-
const lr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
1100
|
-
function Ne(t, e, n, r, s) {
|
|
1101
|
-
if (a.isFunction(r))
|
|
1102
|
-
return r.call(this, e, n);
|
|
1103
|
-
if (s && (e = n), !!a.isString(e)) {
|
|
1104
|
-
if (a.isString(r))
|
|
1105
|
-
return e.indexOf(r) !== -1;
|
|
1106
|
-
if (a.isRegExp(r))
|
|
1107
|
-
return r.test(e);
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
function cr(t) {
|
|
1111
|
-
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
1112
|
-
}
|
|
1113
|
-
function ur(t, e) {
|
|
1114
|
-
const n = a.toCamelCase(" " + e);
|
|
1115
|
-
["get", "set", "has"].forEach((r) => {
|
|
1116
|
-
Object.defineProperty(t, r + n, {
|
|
1117
|
-
value: function(s, o, i) {
|
|
1118
|
-
return this[r].call(this, e, s, o, i);
|
|
1119
|
-
},
|
|
1120
|
-
configurable: !0
|
|
1121
|
-
});
|
|
1122
|
-
});
|
|
1123
|
-
}
|
|
1124
|
-
let F = class {
|
|
1125
|
-
constructor(e) {
|
|
1126
|
-
e && this.set(e);
|
|
1127
|
-
}
|
|
1128
|
-
set(e, n, r) {
|
|
1129
|
-
const s = this;
|
|
1130
|
-
function o(l, f, u) {
|
|
1131
|
-
const c = ie(f);
|
|
1132
|
-
if (!c)
|
|
1133
|
-
throw new Error("header name must be a non-empty string");
|
|
1134
|
-
const d = a.findKey(s, c);
|
|
1135
|
-
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = Ee(l));
|
|
1136
|
-
}
|
|
1137
|
-
const i = (l, f) => a.forEach(l, (u, c) => o(u, c, f));
|
|
1138
|
-
if (a.isPlainObject(e) || e instanceof this.constructor)
|
|
1139
|
-
i(e, n);
|
|
1140
|
-
else if (a.isString(e) && (e = e.trim()) && !lr(e))
|
|
1141
|
-
i(rr(e), n);
|
|
1142
|
-
else if (a.isObject(e) && a.isIterable(e)) {
|
|
1143
|
-
let l = {}, f, u;
|
|
1144
|
-
for (const c of e) {
|
|
1145
|
-
if (!a.isArray(c))
|
|
1146
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
1147
|
-
l[u = c[0]] = (f = l[u]) ? a.isArray(f) ? [...f, c[1]] : [f, c[1]] : c[1];
|
|
1148
|
-
}
|
|
1149
|
-
i(l, n);
|
|
1150
|
-
} else
|
|
1151
|
-
e != null && o(n, e, r);
|
|
1152
|
-
return this;
|
|
1153
|
-
}
|
|
1154
|
-
get(e, n) {
|
|
1155
|
-
if (e = ie(e), e) {
|
|
1156
|
-
const r = a.findKey(this, e);
|
|
1157
|
-
if (r) {
|
|
1158
|
-
const s = this[r];
|
|
1159
|
-
if (!n)
|
|
1160
|
-
return s;
|
|
1161
|
-
if (n === !0)
|
|
1162
|
-
return ar(s);
|
|
1163
|
-
if (a.isFunction(n))
|
|
1164
|
-
return n.call(this, s, r);
|
|
1165
|
-
if (a.isRegExp(n))
|
|
1166
|
-
return n.exec(s);
|
|
1167
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
has(e, n) {
|
|
1172
|
-
if (e = ie(e), e) {
|
|
1173
|
-
const r = a.findKey(this, e);
|
|
1174
|
-
return !!(r && this[r] !== void 0 && (!n || Ne(this, this[r], r, n)));
|
|
1175
|
-
}
|
|
1176
|
-
return !1;
|
|
1461
|
+
e(ns(r), s, n, 0);
|
|
1462
|
+
}), n;
|
|
1177
1463
|
}
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1464
|
+
return null;
|
|
1465
|
+
}
|
|
1466
|
+
const cn = Object.freeze([
|
|
1467
|
+
"get",
|
|
1468
|
+
"delete",
|
|
1469
|
+
"head",
|
|
1470
|
+
"options",
|
|
1471
|
+
"post",
|
|
1472
|
+
"put",
|
|
1473
|
+
"patch",
|
|
1474
|
+
"purge",
|
|
1475
|
+
"link",
|
|
1476
|
+
"unlink",
|
|
1477
|
+
"query"
|
|
1478
|
+
]), ge = (t, e) => t != null && a.hasOwnProp(t, e) ? t[e] : void 0;
|
|
1479
|
+
function ss(t, e, n) {
|
|
1480
|
+
if (a.isString(t))
|
|
1481
|
+
try {
|
|
1482
|
+
return (e || JSON.parse)(t), a.trim(t);
|
|
1483
|
+
} catch (r) {
|
|
1484
|
+
if (r.name !== "SyntaxError")
|
|
1485
|
+
throw r;
|
|
1186
1486
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
(
|
|
1487
|
+
return (n || JSON.stringify)(t);
|
|
1488
|
+
}
|
|
1489
|
+
const Ae = {
|
|
1490
|
+
transitional: ft,
|
|
1491
|
+
adapter: ["xhr", "http", "fetch"],
|
|
1492
|
+
transformRequest: [
|
|
1493
|
+
function(e, n) {
|
|
1494
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(e);
|
|
1495
|
+
if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
1496
|
+
return s ? JSON.stringify(ln(e)) : e;
|
|
1497
|
+
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
|
|
1498
|
+
return e;
|
|
1499
|
+
if (a.isArrayBufferView(e))
|
|
1500
|
+
return e.buffer;
|
|
1501
|
+
if (a.isURLSearchParams(e))
|
|
1502
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
1503
|
+
let l;
|
|
1504
|
+
if (o) {
|
|
1505
|
+
const c = ge(this, "formSerializer");
|
|
1506
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1507
|
+
return ts(e, c).toString();
|
|
1508
|
+
if ((l = a.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
1509
|
+
const d = ge(this, "env"), u = d && d.FormData;
|
|
1510
|
+
return Ke(
|
|
1511
|
+
l ? { "files[]": e } : e,
|
|
1512
|
+
u && new u(),
|
|
1513
|
+
c
|
|
1514
|
+
);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
return o || s ? (n.setContentType("application/json", !1), ss(e)) : e;
|
|
1195
1518
|
}
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
if (
|
|
1203
|
-
|
|
1204
|
-
|
|
1519
|
+
],
|
|
1520
|
+
transformResponse: [
|
|
1521
|
+
function(e) {
|
|
1522
|
+
const n = ge(this, "transitional") || Ae.transitional, r = n && n.forcedJSONParsing, s = ge(this, "responseType"), o = s === "json";
|
|
1523
|
+
if (a.isResponse(e) || a.isReadableStream(e))
|
|
1524
|
+
return e;
|
|
1525
|
+
if (e && a.isString(e) && (r && !s || o)) {
|
|
1526
|
+
const l = !(n && n.silentJSONParsing) && o;
|
|
1527
|
+
try {
|
|
1528
|
+
return JSON.parse(e, ge(this, "parseReviver"));
|
|
1529
|
+
} catch (c) {
|
|
1530
|
+
if (l)
|
|
1531
|
+
throw c.name === "SyntaxError" ? g.from(c, g.ERR_BAD_RESPONSE, this, null, ge(this, "response")) : c;
|
|
1532
|
+
}
|
|
1205
1533
|
}
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
return
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
get [Symbol.toStringTag]() {
|
|
1230
|
-
return "AxiosHeaders";
|
|
1231
|
-
}
|
|
1232
|
-
static from(e) {
|
|
1233
|
-
return e instanceof this ? e : new this(e);
|
|
1234
|
-
}
|
|
1235
|
-
static concat(e, ...n) {
|
|
1236
|
-
const r = new this(e);
|
|
1237
|
-
return n.forEach((s) => r.set(s)), r;
|
|
1238
|
-
}
|
|
1239
|
-
static accessor(e) {
|
|
1240
|
-
const r = (this[Ye] = this[Ye] = {
|
|
1241
|
-
accessors: {}
|
|
1242
|
-
}).accessors, s = this.prototype;
|
|
1243
|
-
function o(i) {
|
|
1244
|
-
const l = ie(i);
|
|
1245
|
-
r[l] || (ur(s, i), r[l] = !0);
|
|
1534
|
+
return e;
|
|
1535
|
+
}
|
|
1536
|
+
],
|
|
1537
|
+
/**
|
|
1538
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1539
|
+
* timeout is not created.
|
|
1540
|
+
*/
|
|
1541
|
+
timeout: 0,
|
|
1542
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
1543
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
1544
|
+
maxContentLength: -1,
|
|
1545
|
+
maxBodyLength: -1,
|
|
1546
|
+
env: {
|
|
1547
|
+
FormData: U.classes.FormData,
|
|
1548
|
+
Blob: U.classes.Blob
|
|
1549
|
+
},
|
|
1550
|
+
validateStatus: function(e) {
|
|
1551
|
+
return e >= 200 && e < 300;
|
|
1552
|
+
},
|
|
1553
|
+
headers: {
|
|
1554
|
+
common: {
|
|
1555
|
+
Accept: "application/json, text/plain, */*",
|
|
1556
|
+
"Content-Type": void 0
|
|
1246
1557
|
}
|
|
1247
|
-
return a.isArray(e) ? e.forEach(o) : o(e), this;
|
|
1248
1558
|
}
|
|
1249
1559
|
};
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
"Content-Length",
|
|
1253
|
-
"Accept",
|
|
1254
|
-
"Accept-Encoding",
|
|
1255
|
-
"User-Agent",
|
|
1256
|
-
"Authorization"
|
|
1257
|
-
]);
|
|
1258
|
-
a.reduceDescriptors(F.prototype, ({ value: t }, e) => {
|
|
1259
|
-
let n = e[0].toUpperCase() + e.slice(1);
|
|
1260
|
-
return {
|
|
1261
|
-
get: () => t,
|
|
1262
|
-
set(r) {
|
|
1263
|
-
this[n] = r;
|
|
1264
|
-
}
|
|
1265
|
-
};
|
|
1560
|
+
a.forEach(cn, (t) => {
|
|
1561
|
+
Ae.headers[t] = {};
|
|
1266
1562
|
});
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
const n = this || de, r = e || n, s = F.from(r.headers);
|
|
1563
|
+
function Ye(t, e) {
|
|
1564
|
+
const n = this || Ae, r = e || n, s = B.from(r.headers);
|
|
1270
1565
|
let o = r.data;
|
|
1271
1566
|
return a.forEach(t, function(l) {
|
|
1272
1567
|
o = l.call(n, o, s.normalize(), e ? e.status : void 0);
|
|
1273
1568
|
}), s.normalize(), o;
|
|
1274
1569
|
}
|
|
1275
|
-
function
|
|
1570
|
+
function un(t) {
|
|
1276
1571
|
return !!(t && t.__CANCEL__);
|
|
1277
1572
|
}
|
|
1278
|
-
let
|
|
1573
|
+
let Pe = class extends g {
|
|
1279
1574
|
/**
|
|
1280
1575
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1281
1576
|
*
|
|
@@ -1286,73 +1581,82 @@ let fe = class extends y {
|
|
|
1286
1581
|
* @returns {CanceledError} The created error.
|
|
1287
1582
|
*/
|
|
1288
1583
|
constructor(e, n, r) {
|
|
1289
|
-
super(e ?? "canceled",
|
|
1584
|
+
super(e ?? "canceled", g.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1290
1585
|
}
|
|
1291
1586
|
};
|
|
1292
|
-
function
|
|
1587
|
+
function fn(t, e, n) {
|
|
1293
1588
|
const r = n.config.validateStatus;
|
|
1294
|
-
!n.status || !r || r(n.status) ? t(n) : e(
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1589
|
+
!n.status || !r || r(n.status) ? t(n) : e(new g(
|
|
1590
|
+
"Request failed with status code " + n.status,
|
|
1591
|
+
n.status >= 400 && n.status < 500 ? g.ERR_BAD_REQUEST : g.ERR_BAD_RESPONSE,
|
|
1592
|
+
n.config,
|
|
1593
|
+
n.request,
|
|
1594
|
+
n
|
|
1595
|
+
));
|
|
1596
|
+
}
|
|
1597
|
+
const os = /[\t\n\r]/g;
|
|
1598
|
+
function dn(t) {
|
|
1599
|
+
if (typeof t != "string")
|
|
1600
|
+
return t;
|
|
1601
|
+
let e = 0;
|
|
1602
|
+
for (; e < t.length && t.charCodeAt(e) <= 32; )
|
|
1603
|
+
e++;
|
|
1604
|
+
return t.slice(e).replace(os, "");
|
|
1303
1605
|
}
|
|
1304
|
-
function
|
|
1305
|
-
const e = /^([-+\w]{1,25})(
|
|
1606
|
+
function Ze(t) {
|
|
1607
|
+
const e = /^([-+\w]{1,25}):(?:\/\/)?/.exec(t);
|
|
1306
1608
|
return e && e[1] || "";
|
|
1307
1609
|
}
|
|
1308
|
-
function
|
|
1610
|
+
function is(t, e) {
|
|
1309
1611
|
t = t || 10;
|
|
1310
1612
|
const n = new Array(t), r = new Array(t);
|
|
1311
1613
|
let s = 0, o = 0, i;
|
|
1312
|
-
return e = e !== void 0 ? e : 1e3, function(
|
|
1313
|
-
const
|
|
1314
|
-
i || (i =
|
|
1315
|
-
let
|
|
1316
|
-
for (;
|
|
1317
|
-
|
|
1318
|
-
if (s = (s + 1) % t, s === o && (o = (o + 1) % t),
|
|
1614
|
+
return e = e !== void 0 ? e : 1e3, function(c) {
|
|
1615
|
+
const d = Date.now(), u = r[o];
|
|
1616
|
+
i || (i = d), n[s] = c, r[s] = d;
|
|
1617
|
+
let h = o, p = 0;
|
|
1618
|
+
for (; h !== s; )
|
|
1619
|
+
p += n[h++], h = h % t;
|
|
1620
|
+
if (s = (s + 1) % t, s === o && (o = (o + 1) % t), d - i < e)
|
|
1319
1621
|
return;
|
|
1320
|
-
const
|
|
1321
|
-
return
|
|
1622
|
+
const _ = u && d - u;
|
|
1623
|
+
return _ ? Math.round(p * 1e3 / _) : void 0;
|
|
1322
1624
|
};
|
|
1323
1625
|
}
|
|
1324
|
-
function
|
|
1626
|
+
function as(t, e) {
|
|
1325
1627
|
let n = 0, r = 1e3 / e, s, o;
|
|
1326
|
-
const i = (u,
|
|
1327
|
-
n =
|
|
1628
|
+
const i = (u, h = Date.now()) => {
|
|
1629
|
+
n = h, s = null, o && (clearTimeout(o), o = null), t(...u);
|
|
1328
1630
|
};
|
|
1329
1631
|
return [(...u) => {
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1632
|
+
const h = Date.now(), p = h - n;
|
|
1633
|
+
p >= r ? i(u, h) : (s = u, o || (o = setTimeout(() => {
|
|
1332
1634
|
o = null, i(s);
|
|
1333
|
-
}, r -
|
|
1334
|
-
}, () => s && i(s)];
|
|
1635
|
+
}, r - p)));
|
|
1636
|
+
}, () => s && i(s), (...u) => i(u)];
|
|
1335
1637
|
}
|
|
1336
|
-
const
|
|
1638
|
+
const qe = (t, e, n = 3) => {
|
|
1337
1639
|
let r = 0;
|
|
1338
|
-
const s =
|
|
1339
|
-
return
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
const d =
|
|
1343
|
-
|
|
1640
|
+
const s = is(50, 250);
|
|
1641
|
+
return as((o) => {
|
|
1642
|
+
if (!o || !a.isNumber(o.loaded))
|
|
1643
|
+
return;
|
|
1644
|
+
const i = o.loaded, l = o.lengthComputable ? o.total : void 0, c = Math.max(0, l != null ? Math.min(i, l) : i), d = Math.max(0, c - r), u = s(d);
|
|
1645
|
+
r = Math.max(r, c);
|
|
1646
|
+
const h = {
|
|
1647
|
+
loaded: c,
|
|
1344
1648
|
total: l,
|
|
1345
|
-
progress: l ?
|
|
1346
|
-
bytes:
|
|
1347
|
-
rate:
|
|
1348
|
-
estimated:
|
|
1649
|
+
progress: l ? c / l : void 0,
|
|
1650
|
+
bytes: d,
|
|
1651
|
+
rate: u || void 0,
|
|
1652
|
+
estimated: u && l ? (l - c) / u : void 0,
|
|
1349
1653
|
event: o,
|
|
1350
1654
|
lengthComputable: l != null,
|
|
1351
1655
|
[e ? "download" : "upload"]: !0
|
|
1352
1656
|
};
|
|
1353
|
-
t(
|
|
1657
|
+
t(h);
|
|
1354
1658
|
}, n);
|
|
1355
|
-
},
|
|
1659
|
+
}, Pt = (t, e) => {
|
|
1356
1660
|
const n = t != null;
|
|
1357
1661
|
return [
|
|
1358
1662
|
(r) => e[0]({
|
|
@@ -1362,10 +1666,10 @@ const Re = (t, e, n = 3) => {
|
|
|
1362
1666
|
}),
|
|
1363
1667
|
e[1]
|
|
1364
1668
|
];
|
|
1365
|
-
},
|
|
1366
|
-
new URL(
|
|
1367
|
-
|
|
1368
|
-
) : () => !0,
|
|
1669
|
+
}, Ct = (t, e = a.asap) => (...n) => e(() => t(...n)), ls = U.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, U.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
|
|
1670
|
+
new URL(U.origin),
|
|
1671
|
+
U.navigator && /(msie|trident)/i.test(U.navigator.userAgent)
|
|
1672
|
+
) : () => !0, cs = U.hasStandardBrowserEnv ? (
|
|
1369
1673
|
// Standard browser envs support document.cookie
|
|
1370
1674
|
{
|
|
1371
1675
|
write(t, e, n, r, s, o, i) {
|
|
@@ -1375,8 +1679,17 @@ const Re = (t, e, n = 3) => {
|
|
|
1375
1679
|
},
|
|
1376
1680
|
read(t) {
|
|
1377
1681
|
if (typeof document > "u") return null;
|
|
1378
|
-
const e = document.cookie.
|
|
1379
|
-
|
|
1682
|
+
const e = document.cookie.split(";");
|
|
1683
|
+
for (let n = 0; n < e.length; n++) {
|
|
1684
|
+
const r = e[n].replace(/^\s+/, ""), s = r.indexOf("=");
|
|
1685
|
+
if (s !== -1 && r.slice(0, s) === t)
|
|
1686
|
+
try {
|
|
1687
|
+
return decodeURIComponent(r.slice(s + 1));
|
|
1688
|
+
} catch {
|
|
1689
|
+
return r.slice(s + 1);
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
return null;
|
|
1380
1693
|
},
|
|
1381
1694
|
remove(t) {
|
|
1382
1695
|
this.write(t, "", Date.now() - 864e5, "/");
|
|
@@ -1394,52 +1707,99 @@ const Re = (t, e, n = 3) => {
|
|
|
1394
1707
|
}
|
|
1395
1708
|
}
|
|
1396
1709
|
);
|
|
1397
|
-
function
|
|
1710
|
+
function us(t) {
|
|
1398
1711
|
return typeof t != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1399
1712
|
}
|
|
1400
|
-
function
|
|
1401
|
-
|
|
1713
|
+
function fs(t, e) {
|
|
1714
|
+
if (!e)
|
|
1715
|
+
return t;
|
|
1716
|
+
let n = t.length;
|
|
1717
|
+
for (; n > 0 && t.charCodeAt(n - 1) === 47; )
|
|
1718
|
+
n--;
|
|
1719
|
+
return t.slice(0, n) + "/" + e.replace(/^\/+/, "");
|
|
1720
|
+
}
|
|
1721
|
+
const ds = /^https?:(?!\/\/)/i;
|
|
1722
|
+
function hs(t) {
|
|
1723
|
+
return t && t.replace(/(^|&)([^=&]*=)?[^&]+/g, (e, n, r = "") => `${n}${r}${He}`);
|
|
1724
|
+
}
|
|
1725
|
+
function ps(t) {
|
|
1726
|
+
const e = t.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${He}@`), n = e.indexOf("#"), s = (n === -1 ? e : e.slice(0, n)).replace(
|
|
1727
|
+
/([?&][^=&#]*=)[^&#]*/g,
|
|
1728
|
+
`$1${He}`
|
|
1729
|
+
);
|
|
1730
|
+
return n === -1 ? s : `${s}#${hs(e.slice(n + 1))}`;
|
|
1731
|
+
}
|
|
1732
|
+
function Lt(t, e) {
|
|
1733
|
+
if (typeof t == "string") {
|
|
1734
|
+
const n = dn(t);
|
|
1735
|
+
if (ds.test(n))
|
|
1736
|
+
throw new g(
|
|
1737
|
+
`Invalid URL ${JSON.stringify(ps(n))}: missing "//" after protocol`,
|
|
1738
|
+
g.ERR_INVALID_URL,
|
|
1739
|
+
e
|
|
1740
|
+
);
|
|
1741
|
+
}
|
|
1402
1742
|
}
|
|
1403
|
-
function
|
|
1404
|
-
|
|
1405
|
-
|
|
1743
|
+
function hn(t, e, n, r) {
|
|
1744
|
+
Lt(e, r);
|
|
1745
|
+
let s = !us(e);
|
|
1746
|
+
return t && (s || n === !1) ? (Lt(t, r), fs(t, e)) : e;
|
|
1406
1747
|
}
|
|
1407
|
-
const
|
|
1408
|
-
|
|
1409
|
-
|
|
1748
|
+
const Dt = (t) => t instanceof B ? { ...t } : t, gs = (t) => Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor ? Object.keys(t).concat(
|
|
1749
|
+
Object.getOwnPropertySymbols(t).filter(
|
|
1750
|
+
(e) => Object.getOwnPropertyDescriptor(t, e).enumerable
|
|
1751
|
+
)
|
|
1752
|
+
) : Object.keys(t);
|
|
1753
|
+
function he(t, e) {
|
|
1754
|
+
t = t || {}, e = e || {};
|
|
1410
1755
|
const n = /* @__PURE__ */ Object.create(null);
|
|
1411
1756
|
Object.defineProperty(n, "hasOwnProperty", {
|
|
1757
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
1758
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
1759
|
+
__proto__: null,
|
|
1412
1760
|
value: Object.prototype.hasOwnProperty,
|
|
1413
1761
|
enumerable: !1,
|
|
1414
1762
|
writable: !0,
|
|
1415
1763
|
configurable: !0
|
|
1416
1764
|
});
|
|
1417
|
-
function r(u,
|
|
1418
|
-
return a.isPlainObject(u) && a.isPlainObject(
|
|
1765
|
+
function r(u, h, p, _) {
|
|
1766
|
+
return a.isPlainObject(u) && a.isPlainObject(h) ? a.merge.call({ caseless: _ }, u, h) : a.isPlainObject(h) ? a.merge({}, h) : a.isArray(h) ? h.slice() : h;
|
|
1419
1767
|
}
|
|
1420
|
-
function s(u,
|
|
1421
|
-
if (a.isUndefined(
|
|
1768
|
+
function s(u, h, p, _) {
|
|
1769
|
+
if (a.isUndefined(h)) {
|
|
1422
1770
|
if (!a.isUndefined(u))
|
|
1423
|
-
return r(void 0, u,
|
|
1424
|
-
} else return r(u,
|
|
1771
|
+
return r(void 0, u, p, _);
|
|
1772
|
+
} else return r(u, h, p, _);
|
|
1425
1773
|
}
|
|
1426
|
-
function o(u,
|
|
1427
|
-
if (!a.isUndefined(
|
|
1428
|
-
return r(void 0,
|
|
1774
|
+
function o(u, h) {
|
|
1775
|
+
if (!a.isUndefined(h))
|
|
1776
|
+
return r(void 0, h);
|
|
1429
1777
|
}
|
|
1430
|
-
function i(u,
|
|
1431
|
-
if (a.isUndefined(
|
|
1778
|
+
function i(u, h) {
|
|
1779
|
+
if (a.isUndefined(h)) {
|
|
1432
1780
|
if (!a.isUndefined(u))
|
|
1433
1781
|
return r(void 0, u);
|
|
1434
|
-
} else return r(void 0,
|
|
1435
|
-
}
|
|
1436
|
-
function l(u
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1782
|
+
} else return r(void 0, h);
|
|
1783
|
+
}
|
|
1784
|
+
function l(u) {
|
|
1785
|
+
const h = a.hasOwnProp(e, "transitional") ? e.transitional : void 0;
|
|
1786
|
+
if (!a.isUndefined(h))
|
|
1787
|
+
if (a.isPlainObject(h)) {
|
|
1788
|
+
if (a.hasOwnProp(h, u))
|
|
1789
|
+
return h[u];
|
|
1790
|
+
} else
|
|
1791
|
+
return;
|
|
1792
|
+
const p = a.hasOwnProp(t, "transitional") ? t.transitional : void 0;
|
|
1793
|
+
if (a.isPlainObject(p) && a.hasOwnProp(p, u))
|
|
1794
|
+
return p[u];
|
|
1795
|
+
}
|
|
1796
|
+
function c(u, h, p) {
|
|
1797
|
+
if (a.hasOwnProp(e, p))
|
|
1798
|
+
return r(u, h);
|
|
1799
|
+
if (a.hasOwnProp(t, p))
|
|
1440
1800
|
return r(void 0, u);
|
|
1441
1801
|
}
|
|
1442
|
-
const
|
|
1802
|
+
const d = {
|
|
1443
1803
|
url: o,
|
|
1444
1804
|
method: o,
|
|
1445
1805
|
data: o,
|
|
@@ -1448,7 +1808,7 @@ function Z(t, e) {
|
|
|
1448
1808
|
transformResponse: i,
|
|
1449
1809
|
paramsSerializer: i,
|
|
1450
1810
|
timeout: i,
|
|
1451
|
-
|
|
1811
|
+
timeoutErrorMessage: i,
|
|
1452
1812
|
withCredentials: i,
|
|
1453
1813
|
withXSRFToken: i,
|
|
1454
1814
|
adapter: i,
|
|
@@ -1468,141 +1828,180 @@ function Z(t, e) {
|
|
|
1468
1828
|
socketPath: i,
|
|
1469
1829
|
allowedSocketPaths: i,
|
|
1470
1830
|
responseEncoding: i,
|
|
1471
|
-
validateStatus:
|
|
1472
|
-
headers: (u,
|
|
1831
|
+
validateStatus: c,
|
|
1832
|
+
headers: (u, h, p) => s(Dt(u), Dt(h), p, !0)
|
|
1473
1833
|
};
|
|
1474
|
-
return a.forEach(
|
|
1475
|
-
if (
|
|
1476
|
-
const
|
|
1477
|
-
a.isUndefined(
|
|
1478
|
-
}), n;
|
|
1479
|
-
}
|
|
1480
|
-
const
|
|
1481
|
-
|
|
1834
|
+
return a.forEach(gs({ ...t, ...e }), function(h) {
|
|
1835
|
+
if (h === "__proto__" || h === "constructor" || h === "prototype") return;
|
|
1836
|
+
const p = a.hasOwnProp(d, h) ? d[h] : s, _ = a.hasOwnProp(t, h) ? t[h] : void 0, S = a.hasOwnProp(e, h) ? e[h] : void 0, O = p(_, S, h);
|
|
1837
|
+
a.isUndefined(O) && p !== c || (n[h] = O);
|
|
1838
|
+
}), a.hasOwnProp(e, "validateStatus") && a.isUndefined(e.validateStatus) && l("validateStatusUndefinedResolves") === !1 && (a.hasOwnProp(t, "validateStatus") ? n.validateStatus = r(void 0, t.validateStatus) : delete n.validateStatus), n;
|
|
1839
|
+
}
|
|
1840
|
+
const ms = ["content-type", "content-length"];
|
|
1841
|
+
function ys(t, e, n) {
|
|
1842
|
+
if (n !== "content-only") {
|
|
1843
|
+
t.set(e);
|
|
1844
|
+
return;
|
|
1845
|
+
}
|
|
1846
|
+
Object.entries(e || {}).forEach(([r, s]) => {
|
|
1847
|
+
ms.includes(r.toLowerCase()) && t.set(r, s);
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
const bs = (t) => encodeURIComponent(t).replace(
|
|
1851
|
+
/%([0-9A-F]{2})/gi,
|
|
1852
|
+
(e, n) => String.fromCharCode(parseInt(n, 16))
|
|
1853
|
+
);
|
|
1854
|
+
function pn(t) {
|
|
1855
|
+
const e = he({}, t), n = (p) => a.hasOwnProp(e, p) ? e[p] : void 0, r = n("data");
|
|
1482
1856
|
let s = n("withXSRFToken");
|
|
1483
1857
|
const o = n("xsrfHeaderName"), i = n("xsrfCookieName");
|
|
1484
1858
|
let l = n("headers");
|
|
1485
|
-
const
|
|
1486
|
-
if (e.headers = l =
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
),
|
|
1491
|
-
"
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
const R = r.getHeaders(), S = ["content-type", "content-length"];
|
|
1500
|
-
Object.entries(R).forEach(([p, g]) => {
|
|
1501
|
-
S.includes(p.toLowerCase()) && l.set(p, g);
|
|
1502
|
-
});
|
|
1859
|
+
const c = n("auth"), d = n("baseURL"), u = n("allowAbsoluteUrls"), h = n("url");
|
|
1860
|
+
if (e.headers = l = B.from(l), e.url = sn(
|
|
1861
|
+
hn(d, h, u, e),
|
|
1862
|
+
n("params"),
|
|
1863
|
+
n("paramsSerializer")
|
|
1864
|
+
), c) {
|
|
1865
|
+
const p = a.getSafeProp(c, "username") || "", _ = a.getSafeProp(c, "password") || "";
|
|
1866
|
+
try {
|
|
1867
|
+
l.set(
|
|
1868
|
+
"Authorization",
|
|
1869
|
+
"Basic " + btoa(p + ":" + (_ ? bs(_) : ""))
|
|
1870
|
+
);
|
|
1871
|
+
} catch (S) {
|
|
1872
|
+
throw g.from(S, g.ERR_BAD_OPTION_VALUE, t);
|
|
1503
1873
|
}
|
|
1504
1874
|
}
|
|
1505
|
-
if (
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1875
|
+
if (a.isFormData(r)) {
|
|
1876
|
+
const p = a.getSafeProp(r, "getHeaders");
|
|
1877
|
+
U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv || a.isReactNative(r) ? l.setContentType(void 0) : a.isFunction(p) && ys(l, p.call(r), n("formDataHeaderPolicy"));
|
|
1878
|
+
}
|
|
1879
|
+
if (U.hasStandardBrowserEnv && (a.isFunction(s) && (s = s(e)), s === !0 || s == null && ls(e.url))) {
|
|
1880
|
+
const _ = o && i && cs.read(i);
|
|
1881
|
+
_ && l.set(o, _);
|
|
1508
1882
|
}
|
|
1509
1883
|
return e;
|
|
1510
|
-
}
|
|
1884
|
+
}
|
|
1885
|
+
const Es = typeof XMLHttpRequest < "u", ws = Es && function(t) {
|
|
1511
1886
|
return new Promise(function(n, r) {
|
|
1512
|
-
const s =
|
|
1887
|
+
const s = pn(t);
|
|
1513
1888
|
let o = s.data;
|
|
1514
|
-
const i =
|
|
1515
|
-
let { responseType: l, onUploadProgress:
|
|
1516
|
-
function
|
|
1517
|
-
|
|
1889
|
+
const i = B.from(s.headers).normalize();
|
|
1890
|
+
let { responseType: l, onUploadProgress: c, onDownloadProgress: d } = s, u, h, p, _, S, O;
|
|
1891
|
+
function N() {
|
|
1892
|
+
_ && _(), S && S(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1518
1893
|
}
|
|
1519
|
-
let
|
|
1520
|
-
|
|
1521
|
-
function
|
|
1522
|
-
if (!
|
|
1894
|
+
let f = new XMLHttpRequest();
|
|
1895
|
+
f.open(s.method.toUpperCase(), s.url, !0), f.timeout = s.timeout;
|
|
1896
|
+
function m(E) {
|
|
1897
|
+
if (!f)
|
|
1898
|
+
return;
|
|
1899
|
+
if (f.status === 0 && (Ze(dn(s.url)) || Ze(U.origin)) !== "file" && !(f.responseURL && f.responseURL.startsWith("file:"))) {
|
|
1900
|
+
r(new g("Request aborted", g.ECONNABORTED, t, f)), N(), f = null;
|
|
1901
|
+
return;
|
|
1902
|
+
}
|
|
1903
|
+
try {
|
|
1904
|
+
E ? O && O(E) : S && S();
|
|
1905
|
+
} catch (z) {
|
|
1906
|
+
setTimeout(() => {
|
|
1907
|
+
throw z;
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1910
|
+
if (!f)
|
|
1523
1911
|
return;
|
|
1524
|
-
const
|
|
1525
|
-
"getAllResponseHeaders" in
|
|
1912
|
+
const C = B.from(
|
|
1913
|
+
"getAllResponseHeaders" in f && f.getAllResponseHeaders()
|
|
1526
1914
|
), L = {
|
|
1527
|
-
data: !l || l === "text" || l === "json" ?
|
|
1528
|
-
status:
|
|
1529
|
-
statusText:
|
|
1530
|
-
headers:
|
|
1915
|
+
data: !l || l === "text" || l === "json" ? f.responseText : f.response,
|
|
1916
|
+
status: f.status,
|
|
1917
|
+
statusText: f.statusText,
|
|
1918
|
+
headers: C,
|
|
1531
1919
|
config: t,
|
|
1532
|
-
request:
|
|
1920
|
+
request: f
|
|
1533
1921
|
};
|
|
1534
|
-
|
|
1535
|
-
function(
|
|
1536
|
-
n(
|
|
1922
|
+
fn(
|
|
1923
|
+
function(I) {
|
|
1924
|
+
n(I), N();
|
|
1537
1925
|
},
|
|
1538
|
-
function(
|
|
1539
|
-
r(
|
|
1926
|
+
function(I) {
|
|
1927
|
+
r(I), N();
|
|
1540
1928
|
},
|
|
1541
1929
|
L
|
|
1542
|
-
),
|
|
1930
|
+
), f = null;
|
|
1543
1931
|
}
|
|
1544
|
-
"onloadend" in
|
|
1545
|
-
!
|
|
1546
|
-
},
|
|
1547
|
-
|
|
1548
|
-
},
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1551
|
-
},
|
|
1552
|
-
let
|
|
1553
|
-
const
|
|
1554
|
-
s.timeoutErrorMessage && (
|
|
1555
|
-
new
|
|
1556
|
-
|
|
1557
|
-
|
|
1932
|
+
"onloadend" in f ? f.onloadend = m : f.onreadystatechange = function() {
|
|
1933
|
+
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.startsWith("file:")) || setTimeout(m);
|
|
1934
|
+
}, f.onabort = function() {
|
|
1935
|
+
f && (r(new g("Request aborted", g.ECONNABORTED, t, f)), N(), f = null);
|
|
1936
|
+
}, f.onerror = function(C) {
|
|
1937
|
+
const v = C && C.message ? C.message : "Network Error", L = new g(v, g.ERR_NETWORK, t, f);
|
|
1938
|
+
L.event = C || null, r(L), N(), f = null;
|
|
1939
|
+
}, f.ontimeout = function() {
|
|
1940
|
+
let C = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1941
|
+
const v = s.transitional || ft;
|
|
1942
|
+
s.timeoutErrorMessage && (C = s.timeoutErrorMessage), r(
|
|
1943
|
+
new g(
|
|
1944
|
+
C,
|
|
1945
|
+
v.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
|
|
1558
1946
|
t,
|
|
1559
|
-
|
|
1947
|
+
f
|
|
1560
1948
|
)
|
|
1561
|
-
),
|
|
1562
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1563
|
-
|
|
1564
|
-
}), a.isUndefined(s.withCredentials) || (
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1949
|
+
), N(), f = null;
|
|
1950
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in f && a.forEach(Zt(i), function(C, v) {
|
|
1951
|
+
f.setRequestHeader(v, C);
|
|
1952
|
+
}), a.isUndefined(s.withCredentials) || (f.withCredentials = !!s.withCredentials), l && l !== "json" && (f.responseType = s.responseType), d && ([p, S, O] = qe(
|
|
1953
|
+
d,
|
|
1954
|
+
!0
|
|
1955
|
+
), f.addEventListener("progress", p)), c && f.upload && ([h, _] = qe(c), f.upload.addEventListener("progress", h), f.upload.addEventListener("loadend", _)), (s.cancelToken || s.signal) && (u = (E) => {
|
|
1956
|
+
f && (r(!E || E.type ? new Pe(null, t, f) : E), f.abort(), N(), f = null);
|
|
1957
|
+
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1958
|
+
const w = Ze(s.url);
|
|
1959
|
+
if (w && !U.protocols.includes(w)) {
|
|
1569
1960
|
r(
|
|
1570
|
-
new
|
|
1571
|
-
"Unsupported protocol " +
|
|
1572
|
-
|
|
1961
|
+
new g(
|
|
1962
|
+
"Unsupported protocol " + w + ":",
|
|
1963
|
+
g.ERR_BAD_REQUEST,
|
|
1573
1964
|
t
|
|
1574
1965
|
)
|
|
1575
|
-
);
|
|
1966
|
+
), N();
|
|
1576
1967
|
return;
|
|
1577
1968
|
}
|
|
1578
|
-
|
|
1969
|
+
f.send(o || null);
|
|
1579
1970
|
});
|
|
1580
|
-
},
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
)
|
|
1971
|
+
}, Rs = (t, e) => {
|
|
1972
|
+
if (t = t ? t.filter(Boolean) : [], !e && !t.length)
|
|
1973
|
+
return;
|
|
1974
|
+
const n = new AbortController();
|
|
1975
|
+
let r = !1;
|
|
1976
|
+
const s = function(c) {
|
|
1977
|
+
if (!r) {
|
|
1978
|
+
r = !0, i();
|
|
1979
|
+
const d = c instanceof Error ? c : this.reason;
|
|
1980
|
+
n.abort(
|
|
1981
|
+
d instanceof g ? d : new Pe(d instanceof Error ? d.message : d)
|
|
1982
|
+
);
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1985
|
+
let o = e && setTimeout(() => {
|
|
1986
|
+
o = null, s(new g(`timeout of ${e}ms exceeded`, g.ETIMEDOUT));
|
|
1987
|
+
}, e);
|
|
1988
|
+
const i = () => {
|
|
1989
|
+
t && (o && clearTimeout(o), o = null, t.forEach((c) => {
|
|
1990
|
+
c.unsubscribe ? c.unsubscribe(s) : c.removeEventListener("abort", s);
|
|
1991
|
+
}), t = null);
|
|
1992
|
+
};
|
|
1993
|
+
t.forEach((c) => {
|
|
1994
|
+
if (!r) {
|
|
1995
|
+
if (c.aborted) {
|
|
1996
|
+
s.call(c);
|
|
1997
|
+
return;
|
|
1591
1998
|
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1599
|
-
}), t = null);
|
|
1600
|
-
};
|
|
1601
|
-
t.forEach((u) => u.addEventListener("abort", o));
|
|
1602
|
-
const { signal: f } = r;
|
|
1603
|
-
return f.unsubscribe = () => a.asap(l), f;
|
|
1604
|
-
}
|
|
1605
|
-
}, Rr = function* (t, e) {
|
|
1999
|
+
c.addEventListener("abort", s, { once: !0 });
|
|
2000
|
+
}
|
|
2001
|
+
});
|
|
2002
|
+
const { signal: l } = n;
|
|
2003
|
+
return l.unsubscribe = () => a.asap(i), l;
|
|
2004
|
+
}, Os = function* (t, e) {
|
|
1606
2005
|
let n = t.byteLength;
|
|
1607
2006
|
if (n < e) {
|
|
1608
2007
|
yield t;
|
|
@@ -1611,10 +2010,10 @@ const Pt = (t) => {
|
|
|
1611
2010
|
let r = 0, s;
|
|
1612
2011
|
for (; r < n; )
|
|
1613
2012
|
s = r + e, yield t.slice(r, s), r = s;
|
|
1614
|
-
},
|
|
1615
|
-
for await (const n of
|
|
1616
|
-
yield*
|
|
1617
|
-
},
|
|
2013
|
+
}, _s = async function* (t, e) {
|
|
2014
|
+
for await (const n of Ss(t))
|
|
2015
|
+
yield* Os(n, e);
|
|
2016
|
+
}, Ss = async function* (t) {
|
|
1618
2017
|
if (t[Symbol.asyncIterator]) {
|
|
1619
2018
|
yield* t;
|
|
1620
2019
|
return;
|
|
@@ -1630,231 +2029,440 @@ const Pt = (t) => {
|
|
|
1630
2029
|
} finally {
|
|
1631
2030
|
await e.cancel();
|
|
1632
2031
|
}
|
|
1633
|
-
},
|
|
1634
|
-
const s =
|
|
1635
|
-
let o = 0, i, l = (
|
|
1636
|
-
i || (i = !0, r && r(
|
|
2032
|
+
}, Nt = (t, e, n, r) => {
|
|
2033
|
+
const s = _s(t, e);
|
|
2034
|
+
let o = 0, i, l = (c) => {
|
|
2035
|
+
i || (i = !0, r && r(c));
|
|
1637
2036
|
};
|
|
1638
2037
|
return new ReadableStream(
|
|
1639
2038
|
{
|
|
1640
|
-
async pull(
|
|
2039
|
+
async pull(c) {
|
|
1641
2040
|
try {
|
|
1642
|
-
const { done:
|
|
1643
|
-
if (
|
|
1644
|
-
l(),
|
|
2041
|
+
const { done: d, value: u } = await s.next();
|
|
2042
|
+
if (d) {
|
|
2043
|
+
l(), c.close();
|
|
1645
2044
|
return;
|
|
1646
2045
|
}
|
|
1647
|
-
let
|
|
2046
|
+
let h = u.byteLength;
|
|
1648
2047
|
if (n) {
|
|
1649
|
-
let
|
|
1650
|
-
n(
|
|
2048
|
+
let p = o += h;
|
|
2049
|
+
n(p);
|
|
1651
2050
|
}
|
|
1652
|
-
|
|
1653
|
-
} catch (
|
|
1654
|
-
throw l(
|
|
2051
|
+
c.enqueue(new Uint8Array(u));
|
|
2052
|
+
} catch (d) {
|
|
2053
|
+
throw l(d), d;
|
|
1655
2054
|
}
|
|
1656
2055
|
},
|
|
1657
|
-
cancel(
|
|
1658
|
-
return l(
|
|
2056
|
+
cancel(c) {
|
|
2057
|
+
return l(c), s.return();
|
|
1659
2058
|
}
|
|
1660
2059
|
},
|
|
1661
2060
|
{
|
|
1662
2061
|
highWaterMark: 2
|
|
1663
2062
|
}
|
|
1664
2063
|
);
|
|
1665
|
-
},
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
2064
|
+
}, kt = (t) => t >= 48 && t <= 57 || t >= 65 && t <= 70 || t >= 97 && t <= 102, gn = (t, e, n) => e + 2 < n && kt(t.charCodeAt(e + 1)) && kt(t.charCodeAt(e + 2)), vt = (t) => t <= 57 ? t - 48 : (t & 223) - 55, xs = (t) => t >= 65 && t <= 90 || // A-Z
|
|
2065
|
+
t >= 97 && t <= 122 || // a-z
|
|
2066
|
+
t >= 48 && t <= 57 || // 0-9
|
|
2067
|
+
t === 43 || // +
|
|
2068
|
+
t === 47 || // /
|
|
2069
|
+
t === 45 || // - (base64url)
|
|
2070
|
+
t === 95, Ts = (t) => t === 9 || t === 10 || t === 12 || t === 13 || t === 32, As = (t) => {
|
|
2071
|
+
const e = Math.floor(t / 4), n = t % 4;
|
|
2072
|
+
return e * 3 + (n === 2 ? 1 : n === 3 ? 2 : 0);
|
|
2073
|
+
}, Ps = (t) => {
|
|
2074
|
+
const e = t.length;
|
|
2075
|
+
let n = 0;
|
|
2076
|
+
return e > 0 && t.charCodeAt(e - 1) === 61 && (n++, e > 1 && t.charCodeAt(e - 2) === 61 && n++), Math.floor((e - n) * 3 / 4);
|
|
2077
|
+
}, Cs = (t) => {
|
|
2078
|
+
const e = t.length;
|
|
2079
|
+
let n = 0, r = 0, s = !1;
|
|
2080
|
+
for (let o = 0; o < e; o++) {
|
|
2081
|
+
let i = t.charCodeAt(o);
|
|
2082
|
+
if (i === 37 && gn(t, o, e) && (i = vt(t.charCodeAt(o + 1)) * 16 + vt(t.charCodeAt(o + 2)), o += 2), !Ts(i)) {
|
|
2083
|
+
if (i === 61) {
|
|
2084
|
+
r++;
|
|
2085
|
+
continue;
|
|
2086
|
+
}
|
|
2087
|
+
if (!xs(i) || r > 0) {
|
|
2088
|
+
s = !0;
|
|
2089
|
+
continue;
|
|
2090
|
+
}
|
|
2091
|
+
n++;
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
return s || r > 2 || r > 0 && (n + r) % 4 !== 0 || n % 4 === 1 ? Ps(t) : As(n);
|
|
2095
|
+
}, Ls = (t, e) => {
|
|
2096
|
+
if (!t || typeof t != "string" || !t.startsWith("data:")) return 0;
|
|
2097
|
+
const n = t.indexOf(",");
|
|
2098
|
+
if (n < 0) return 0;
|
|
2099
|
+
const r = t.slice(5, n), s = t.slice(n + 1);
|
|
2100
|
+
if (/;base64/i.test(r))
|
|
2101
|
+
return e(s);
|
|
2102
|
+
let i = 0;
|
|
2103
|
+
for (let l = 0, c = s.length; l < c; l++) {
|
|
2104
|
+
const d = s.charCodeAt(l);
|
|
2105
|
+
if (d === 37 && gn(s, l, c))
|
|
2106
|
+
i += 1, l += 2;
|
|
2107
|
+
else if (d < 128)
|
|
2108
|
+
i += 1;
|
|
2109
|
+
else if (d < 2048)
|
|
2110
|
+
i += 2;
|
|
2111
|
+
else if (d >= 55296 && d <= 56319 && l + 1 < c) {
|
|
2112
|
+
const u = s.charCodeAt(l + 1);
|
|
2113
|
+
u >= 56320 && u <= 57343 ? (i += 4, l++) : i += 3;
|
|
2114
|
+
} else
|
|
2115
|
+
i += 3;
|
|
2116
|
+
}
|
|
2117
|
+
return i;
|
|
2118
|
+
};
|
|
2119
|
+
function Ds(t) {
|
|
2120
|
+
const e = typeof t == "string" ? t.indexOf("#") : -1;
|
|
2121
|
+
return Ls(
|
|
2122
|
+
e === -1 ? t : t.slice(0, e),
|
|
2123
|
+
Cs
|
|
2124
|
+
);
|
|
2125
|
+
}
|
|
2126
|
+
const ht = "1.20.0", Ut = 64 * 1024, Ns = {
|
|
2127
|
+
cache: "default",
|
|
2128
|
+
redirect: "follow",
|
|
2129
|
+
referrer: "about:client",
|
|
2130
|
+
referrerPolicy: "",
|
|
2131
|
+
mode: "cors",
|
|
2132
|
+
integrity: "",
|
|
2133
|
+
keepalive: !1,
|
|
2134
|
+
priority: "auto",
|
|
2135
|
+
window: null
|
|
2136
|
+
}, { isFunction: Fe } = a, ks = (t) => encodeURIComponent(t).replace(
|
|
2137
|
+
/%([0-9A-F]{2})/gi,
|
|
2138
|
+
(e, n) => String.fromCharCode(parseInt(n, 16))
|
|
2139
|
+
), Ft = (t) => {
|
|
2140
|
+
if (!a.isString(t))
|
|
2141
|
+
return t;
|
|
2142
|
+
try {
|
|
2143
|
+
return decodeURIComponent(t);
|
|
2144
|
+
} catch {
|
|
2145
|
+
return t;
|
|
2146
|
+
}
|
|
2147
|
+
}, jt = (t, ...e) => {
|
|
1669
2148
|
try {
|
|
1670
2149
|
return !!t(...e);
|
|
1671
2150
|
} catch {
|
|
1672
2151
|
return !1;
|
|
1673
2152
|
}
|
|
1674
|
-
},
|
|
2153
|
+
}, vs = (t) => {
|
|
2154
|
+
const e = t.indexOf("://");
|
|
2155
|
+
let n = t;
|
|
2156
|
+
return e !== -1 && (n = n.slice(e + 3)), n.includes("@") || n.includes(":");
|
|
2157
|
+
}, Us = (t) => {
|
|
2158
|
+
const e = a.global !== void 0 && a.global !== null ? a.global : globalThis, { ReadableStream: n, TextEncoder: r } = e;
|
|
1675
2159
|
t = a.merge.call(
|
|
1676
2160
|
{
|
|
1677
2161
|
skipUndefined: !0
|
|
1678
2162
|
},
|
|
1679
|
-
|
|
2163
|
+
{
|
|
2164
|
+
Request: e.Request,
|
|
2165
|
+
Response: e.Response
|
|
2166
|
+
},
|
|
1680
2167
|
t
|
|
1681
2168
|
);
|
|
1682
|
-
const { fetch:
|
|
1683
|
-
if (!
|
|
2169
|
+
const { fetch: s, Request: o, Response: i } = t, l = s ? Fe(s) : typeof fetch == "function", c = Fe(o), d = Fe(i);
|
|
2170
|
+
if (!l)
|
|
1684
2171
|
return !1;
|
|
1685
|
-
const
|
|
1686
|
-
let
|
|
1687
|
-
const
|
|
1688
|
-
body: new
|
|
2172
|
+
const u = l && Fe(n), h = l && (typeof r == "function" ? /* @__PURE__ */ ((f) => (m) => f.encode(m))(new r()) : async (f) => new Uint8Array(await new o(f).arrayBuffer())), p = c && u && jt(() => {
|
|
2173
|
+
let f = !1;
|
|
2174
|
+
const m = new o(U.origin, {
|
|
2175
|
+
body: new n(),
|
|
1689
2176
|
method: "POST",
|
|
1690
2177
|
get duplex() {
|
|
1691
|
-
return
|
|
2178
|
+
return f = !0, "half";
|
|
1692
2179
|
}
|
|
1693
|
-
}),
|
|
1694
|
-
return
|
|
1695
|
-
}),
|
|
1696
|
-
stream:
|
|
2180
|
+
}), w = m.headers.has("Content-Type");
|
|
2181
|
+
return m.body != null && m.body.cancel(), f && !w;
|
|
2182
|
+
}), _ = d && u && jt(() => a.isReadableStream(new i("").body)), S = {
|
|
2183
|
+
stream: _ && ((f) => f.body)
|
|
1697
2184
|
};
|
|
1698
|
-
|
|
1699
|
-
!
|
|
1700
|
-
let
|
|
1701
|
-
if (
|
|
1702
|
-
return
|
|
1703
|
-
throw new
|
|
1704
|
-
`Response type '${
|
|
1705
|
-
|
|
1706
|
-
|
|
2185
|
+
l && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
2186
|
+
!S[f] && (S[f] = (m, w) => {
|
|
2187
|
+
let E = m && m[f];
|
|
2188
|
+
if (E)
|
|
2189
|
+
return E.call(m);
|
|
2190
|
+
throw new g(
|
|
2191
|
+
`Response type '${f}' is not supported`,
|
|
2192
|
+
g.ERR_NOT_SUPPORT,
|
|
2193
|
+
w
|
|
1707
2194
|
);
|
|
1708
2195
|
});
|
|
1709
2196
|
});
|
|
1710
|
-
const
|
|
1711
|
-
if (
|
|
2197
|
+
const O = async (f) => {
|
|
2198
|
+
if (f == null)
|
|
1712
2199
|
return 0;
|
|
1713
|
-
if (a.isBlob(
|
|
1714
|
-
return
|
|
1715
|
-
if (a.isSpecCompliantForm(
|
|
1716
|
-
return (await new
|
|
2200
|
+
if (a.isBlob(f))
|
|
2201
|
+
return f.size;
|
|
2202
|
+
if (a.isSpecCompliantForm(f))
|
|
2203
|
+
return (await new o(U.origin, {
|
|
1717
2204
|
method: "POST",
|
|
1718
|
-
body:
|
|
2205
|
+
body: f
|
|
1719
2206
|
}).arrayBuffer()).byteLength;
|
|
1720
|
-
if (a.isArrayBufferView(
|
|
1721
|
-
return
|
|
1722
|
-
if (a.isURLSearchParams(
|
|
1723
|
-
return (await f
|
|
1724
|
-
},
|
|
1725
|
-
const
|
|
1726
|
-
return
|
|
2207
|
+
if (a.isArrayBufferView(f) || a.isArrayBuffer(f))
|
|
2208
|
+
return f.byteLength;
|
|
2209
|
+
if (a.isURLSearchParams(f) && (f = f + ""), a.isString(f))
|
|
2210
|
+
return (await h(f)).byteLength;
|
|
2211
|
+
}, N = async (f, m) => {
|
|
2212
|
+
const w = a.toFiniteNumber(f.getContentLength());
|
|
2213
|
+
return w ?? O(m);
|
|
1727
2214
|
};
|
|
1728
|
-
return async (
|
|
2215
|
+
return async (f) => {
|
|
1729
2216
|
let {
|
|
1730
|
-
url:
|
|
1731
|
-
method:
|
|
1732
|
-
data:
|
|
1733
|
-
signal:
|
|
1734
|
-
cancelToken:
|
|
1735
|
-
timeout:
|
|
1736
|
-
onDownloadProgress:
|
|
1737
|
-
onUploadProgress:
|
|
1738
|
-
responseType:
|
|
1739
|
-
headers:
|
|
1740
|
-
withCredentials:
|
|
1741
|
-
fetchOptions:
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
2217
|
+
url: m,
|
|
2218
|
+
method: w,
|
|
2219
|
+
data: E,
|
|
2220
|
+
signal: C,
|
|
2221
|
+
cancelToken: v,
|
|
2222
|
+
timeout: L,
|
|
2223
|
+
onDownloadProgress: z,
|
|
2224
|
+
onUploadProgress: I,
|
|
2225
|
+
responseType: q,
|
|
2226
|
+
headers: G,
|
|
2227
|
+
withCredentials: ie = "same-origin",
|
|
2228
|
+
fetchOptions: re,
|
|
2229
|
+
maxContentLength: V,
|
|
2230
|
+
maxBodyLength: ae,
|
|
2231
|
+
maxRedirects: Ve
|
|
2232
|
+
} = pn(f);
|
|
2233
|
+
const y = a.isNumber(V) && V > -1, T = a.isNumber(ae) && ae > -1, k = (x) => a.hasOwnProp(f, x) ? f[x] : void 0;
|
|
2234
|
+
let b = s || fetch;
|
|
2235
|
+
q = q ? (q + "").toLowerCase() : "text";
|
|
2236
|
+
let A = Rs(
|
|
2237
|
+
[C, v && v.toAbortSignal()],
|
|
2238
|
+
L
|
|
2239
|
+
), P = null;
|
|
2240
|
+
const W = A && A.unsubscribe && (() => {
|
|
2241
|
+
A.unsubscribe();
|
|
1750
2242
|
});
|
|
1751
|
-
let
|
|
2243
|
+
let M, Z = null;
|
|
2244
|
+
const Ce = () => new g(
|
|
2245
|
+
"Request body larger than maxBodyLength limit",
|
|
2246
|
+
g.ERR_BAD_REQUEST,
|
|
2247
|
+
f,
|
|
2248
|
+
P
|
|
2249
|
+
);
|
|
1752
2250
|
try {
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
2251
|
+
let x;
|
|
2252
|
+
const J = k("auth");
|
|
2253
|
+
if (J) {
|
|
2254
|
+
const R = a.getSafeProp(J, "username") || "", F = a.getSafeProp(J, "password") || "";
|
|
2255
|
+
x = {
|
|
2256
|
+
username: R,
|
|
2257
|
+
password: F
|
|
2258
|
+
};
|
|
2259
|
+
}
|
|
2260
|
+
if (vs(m)) {
|
|
2261
|
+
const R = new URL(m, U.origin);
|
|
2262
|
+
if (!x && (R.username || R.password)) {
|
|
2263
|
+
const F = Ft(R.username), se = Ft(R.password);
|
|
2264
|
+
x = {
|
|
2265
|
+
username: F,
|
|
2266
|
+
password: se
|
|
2267
|
+
};
|
|
1765
2268
|
}
|
|
2269
|
+
(R.username || R.password) && (R.username = "", R.password = "", m = R.href);
|
|
1766
2270
|
}
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
2271
|
+
if (x && (G.delete("authorization"), G.set(
|
|
2272
|
+
"Authorization",
|
|
2273
|
+
"Basic " + btoa(ks((x.username || "") + ":" + (x.password || "")))
|
|
2274
|
+
)), y && typeof m == "string" && m.startsWith("data:") && Ds(m) > V)
|
|
2275
|
+
throw new g(
|
|
2276
|
+
"maxContentLength size of " + V + " exceeded",
|
|
2277
|
+
g.ERR_BAD_RESPONSE,
|
|
2278
|
+
f,
|
|
2279
|
+
P
|
|
2280
|
+
);
|
|
2281
|
+
if (T && w !== "get" && w !== "head") {
|
|
2282
|
+
const R = await O(E);
|
|
2283
|
+
if (typeof R == "number" && isFinite(R) && (M = R, R > ae))
|
|
2284
|
+
throw Ce();
|
|
2285
|
+
}
|
|
2286
|
+
const pe = T && (a.isReadableStream(E) || a.isStream(E)), Le = (R, F, se) => Nt(
|
|
2287
|
+
R,
|
|
2288
|
+
Ut,
|
|
2289
|
+
(le) => {
|
|
2290
|
+
if (T && le > ae)
|
|
2291
|
+
throw Z = Ce();
|
|
2292
|
+
F && F(le);
|
|
2293
|
+
},
|
|
2294
|
+
se
|
|
2295
|
+
);
|
|
2296
|
+
if (p && w !== "get" && w !== "head" && (I || pe)) {
|
|
2297
|
+
if (M = M ?? await N(G, E), M !== 0 || pe) {
|
|
2298
|
+
let R = new o(m, {
|
|
2299
|
+
method: "POST",
|
|
2300
|
+
body: E,
|
|
2301
|
+
duplex: "half"
|
|
2302
|
+
}), F;
|
|
2303
|
+
if (a.isFormData(E) && (F = R.headers.get("content-type")) && G.setContentType(F), R.body) {
|
|
2304
|
+
const [se, le] = I && Pt(
|
|
2305
|
+
M,
|
|
2306
|
+
qe(Ct(I))
|
|
2307
|
+
) || [];
|
|
2308
|
+
E = Le(R.body, se, le);
|
|
2309
|
+
}
|
|
2310
|
+
}
|
|
2311
|
+
} else if (pe && !c && u && w !== "get" && w !== "head")
|
|
2312
|
+
E = Le(E);
|
|
2313
|
+
else if (pe && c && !p && w !== "get" && w !== "head")
|
|
2314
|
+
throw new g(
|
|
2315
|
+
"Stream request bodies are not supported by the current fetch implementation",
|
|
2316
|
+
g.ERR_NOT_SUPPORT,
|
|
2317
|
+
f,
|
|
2318
|
+
P
|
|
2319
|
+
);
|
|
2320
|
+
a.isString(ie) || (ie = ie ? "include" : "omit");
|
|
2321
|
+
const De = c && "credentials" in o.prototype;
|
|
2322
|
+
if (a.isFormData(E)) {
|
|
2323
|
+
const R = G.getContentType();
|
|
2324
|
+
R && /^multipart\/form-data/i.test(R) && !/boundary=/i.test(R) && G.delete("content-type");
|
|
1772
2325
|
}
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
2326
|
+
G.set("User-Agent", "axios/" + ht, !1);
|
|
2327
|
+
const H = re == null ? re : Object.assign(/* @__PURE__ */ Object.create(null), re);
|
|
2328
|
+
H && (delete H.body, delete H.headers, delete H.method, delete H.signal, delete H.duplex, delete H.credentials);
|
|
2329
|
+
const Y = Object.assign(/* @__PURE__ */ Object.create(null), H, {
|
|
2330
|
+
signal: A,
|
|
2331
|
+
method: w.toUpperCase(),
|
|
2332
|
+
headers: Zt(G.normalize()),
|
|
2333
|
+
body: E,
|
|
1779
2334
|
duplex: "half",
|
|
1780
|
-
credentials:
|
|
1781
|
-
};
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
2335
|
+
credentials: De ? ie : void 0
|
|
2336
|
+
});
|
|
2337
|
+
c && (a.forEach(Ns, (R, F) => {
|
|
2338
|
+
Y[F] === void 0 && (Y[F] = R);
|
|
2339
|
+
}), Y.signal === void 0 && (Y.signal = null), Y.body === void 0 && (Y.body = null)), Ve === 0 && (Y.redirect = "manual", H && (H.redirect = "manual")), P = c && new o(m, Y);
|
|
2340
|
+
let te = await (c ? b(P, H) : b(m, Y));
|
|
2341
|
+
const gt = B.from(te.headers);
|
|
2342
|
+
if (y) {
|
|
2343
|
+
const R = a.toFiniteNumber(gt.getContentLength());
|
|
2344
|
+
if (R != null && R > V)
|
|
2345
|
+
throw new g(
|
|
2346
|
+
"maxContentLength size of " + V + " exceeded",
|
|
2347
|
+
g.ERR_BAD_RESPONSE,
|
|
2348
|
+
f,
|
|
2349
|
+
P
|
|
2350
|
+
);
|
|
2351
|
+
}
|
|
2352
|
+
const We = _ && (q === "stream" || q === "response");
|
|
2353
|
+
if (_ && te.body && (z || y || We && W)) {
|
|
2354
|
+
const R = {};
|
|
2355
|
+
["status", "statusText", "headers"].forEach((be) => {
|
|
2356
|
+
R[be] = te[be];
|
|
1789
2357
|
});
|
|
1790
|
-
const
|
|
1791
|
-
|
|
1792
|
-
|
|
2358
|
+
const F = a.toFiniteNumber(gt.getContentLength()), [se, le] = z && Pt(
|
|
2359
|
+
F,
|
|
2360
|
+
qe(Ct(z), !0)
|
|
1793
2361
|
) || [];
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
2362
|
+
let mt = 0;
|
|
2363
|
+
const Rn = (be) => {
|
|
2364
|
+
if (y && (mt = be, mt > V))
|
|
2365
|
+
throw new g(
|
|
2366
|
+
"maxContentLength size of " + V + " exceeded",
|
|
2367
|
+
g.ERR_BAD_RESPONSE,
|
|
2368
|
+
f,
|
|
2369
|
+
P
|
|
2370
|
+
);
|
|
2371
|
+
se && se(be);
|
|
2372
|
+
};
|
|
2373
|
+
te = new i(
|
|
2374
|
+
Nt(te.body, Ut, Rn, () => {
|
|
2375
|
+
le && le(), W && W();
|
|
1797
2376
|
}),
|
|
1798
|
-
|
|
2377
|
+
R
|
|
1799
2378
|
);
|
|
1800
2379
|
}
|
|
1801
|
-
|
|
1802
|
-
let
|
|
1803
|
-
|
|
1804
|
-
|
|
2380
|
+
q = q || "text";
|
|
2381
|
+
let ne = await S[a.findKey(S, q) || "text"](
|
|
2382
|
+
te,
|
|
2383
|
+
f
|
|
1805
2384
|
);
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
2385
|
+
if (y && !_ && !We) {
|
|
2386
|
+
let R;
|
|
2387
|
+
if (ne != null && (typeof ne.byteLength == "number" ? R = ne.byteLength : typeof ne.size == "number" ? R = ne.size : typeof ne == "string" && (R = typeof r == "function" ? new r().encode(ne).byteLength : ne.length)), typeof R == "number" && R > V)
|
|
2388
|
+
throw new g(
|
|
2389
|
+
"maxContentLength size of " + V + " exceeded",
|
|
2390
|
+
g.ERR_BAD_RESPONSE,
|
|
2391
|
+
f,
|
|
2392
|
+
P
|
|
2393
|
+
);
|
|
2394
|
+
}
|
|
2395
|
+
return !We && W && W(), await new Promise((R, F) => {
|
|
2396
|
+
fn(R, F, {
|
|
2397
|
+
data: ne,
|
|
2398
|
+
headers: B.from(te.headers),
|
|
2399
|
+
status: te.status,
|
|
2400
|
+
statusText: te.statusText,
|
|
2401
|
+
config: f,
|
|
2402
|
+
request: P
|
|
1814
2403
|
});
|
|
1815
2404
|
});
|
|
1816
|
-
} catch (
|
|
1817
|
-
|
|
1818
|
-
|
|
2405
|
+
} catch (x) {
|
|
2406
|
+
if (W && W(), A && A.aborted && A.reason instanceof g) {
|
|
2407
|
+
const J = A.reason;
|
|
2408
|
+
throw J.config = f, P && (J.request = P), x !== J && Object.defineProperty(J, "cause", {
|
|
2409
|
+
__proto__: null,
|
|
2410
|
+
value: x,
|
|
2411
|
+
writable: !0,
|
|
2412
|
+
enumerable: !1,
|
|
2413
|
+
configurable: !0
|
|
2414
|
+
}), J;
|
|
2415
|
+
}
|
|
2416
|
+
if (Z)
|
|
2417
|
+
throw P && !Z.request && (Z.request = P), Z;
|
|
2418
|
+
if (x instanceof g)
|
|
2419
|
+
throw P && !x.request && (x.request = P), x;
|
|
2420
|
+
if (x && x.name === "TypeError" && /Load failed|fetch/i.test(x.message)) {
|
|
2421
|
+
const J = new g(
|
|
1819
2422
|
"Network Error",
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
)
|
|
1825
|
-
{
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
2423
|
+
g.ERR_NETWORK,
|
|
2424
|
+
f,
|
|
2425
|
+
P,
|
|
2426
|
+
x && x.response
|
|
2427
|
+
);
|
|
2428
|
+
throw Object.defineProperty(J, "cause", {
|
|
2429
|
+
__proto__: null,
|
|
2430
|
+
value: x.cause || x,
|
|
2431
|
+
writable: !0,
|
|
2432
|
+
enumerable: !1,
|
|
2433
|
+
configurable: !0
|
|
2434
|
+
}), J;
|
|
2435
|
+
}
|
|
2436
|
+
throw g.from(x, x && x.code, f, P, x && x.response);
|
|
1829
2437
|
}
|
|
1830
2438
|
};
|
|
1831
|
-
},
|
|
2439
|
+
}, Fs = /* @__PURE__ */ new Map(), mn = (t) => {
|
|
1832
2440
|
let e = t && t.env || {};
|
|
1833
2441
|
const { fetch: n, Request: r, Response: s } = e, o = [r, s, n];
|
|
1834
|
-
let i = o.length, l = i,
|
|
2442
|
+
let i = o.length, l = i, c, d, u = Fs;
|
|
1835
2443
|
for (; l--; )
|
|
1836
|
-
|
|
1837
|
-
return
|
|
2444
|
+
c = o[l], d = u.get(c), d === void 0 && u.set(c, d = l ? /* @__PURE__ */ new Map() : Us(e)), u = d;
|
|
2445
|
+
return d;
|
|
1838
2446
|
};
|
|
1839
|
-
|
|
1840
|
-
const
|
|
1841
|
-
http:
|
|
1842
|
-
xhr:
|
|
2447
|
+
mn();
|
|
2448
|
+
const pt = {
|
|
2449
|
+
http: $r,
|
|
2450
|
+
xhr: ws,
|
|
1843
2451
|
fetch: {
|
|
1844
|
-
get:
|
|
2452
|
+
get: mn
|
|
1845
2453
|
}
|
|
1846
2454
|
};
|
|
1847
|
-
a.forEach(
|
|
2455
|
+
a.forEach(pt, (t, e) => {
|
|
1848
2456
|
if (t) {
|
|
1849
2457
|
try {
|
|
1850
|
-
Object.defineProperty(t, "name", { value: e });
|
|
2458
|
+
Object.defineProperty(t, "name", { __proto__: null, value: e });
|
|
1851
2459
|
} catch {
|
|
1852
2460
|
}
|
|
1853
|
-
Object.defineProperty(t, "adapterName", { value: e });
|
|
2461
|
+
Object.defineProperty(t, "adapterName", { __proto__: null, value: e });
|
|
1854
2462
|
}
|
|
1855
2463
|
});
|
|
1856
|
-
const
|
|
1857
|
-
function
|
|
2464
|
+
const Bt = (t) => `- ${t}`, js = (t) => a.isFunction(t) || t === null || t === !1;
|
|
2465
|
+
function Bs(t, e) {
|
|
1858
2466
|
t = a.isArray(t) ? t : [t];
|
|
1859
2467
|
const { length: n } = t;
|
|
1860
2468
|
let r, s;
|
|
@@ -1862,74 +2470,90 @@ function Cr(t, e) {
|
|
|
1862
2470
|
for (let i = 0; i < n; i++) {
|
|
1863
2471
|
r = t[i];
|
|
1864
2472
|
let l;
|
|
1865
|
-
if (s = r, !
|
|
1866
|
-
throw new
|
|
2473
|
+
if (s = r, !js(r) && (s = pt[(l = String(r)).toLowerCase()], s === void 0))
|
|
2474
|
+
throw new g(`Unknown adapter '${l}'`);
|
|
1867
2475
|
if (s && (a.isFunction(s) || (s = s.get(e))))
|
|
1868
2476
|
break;
|
|
1869
2477
|
o[l || "#" + i] = s;
|
|
1870
2478
|
}
|
|
1871
2479
|
if (!s) {
|
|
1872
2480
|
const i = Object.entries(o).map(
|
|
1873
|
-
([
|
|
2481
|
+
([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1874
2482
|
);
|
|
1875
2483
|
let l = n ? i.length > 1 ? `since :
|
|
1876
|
-
` + i.map(
|
|
1877
|
-
`) : " " +
|
|
1878
|
-
throw new
|
|
2484
|
+
` + i.map(Bt).join(`
|
|
2485
|
+
`) : " " + Bt(i[0]) : "as no adapter specified";
|
|
2486
|
+
throw new g(
|
|
1879
2487
|
"There is no suitable adapter to dispatch the request " + l,
|
|
1880
|
-
|
|
2488
|
+
g.ERR_NOT_SUPPORT
|
|
1881
2489
|
);
|
|
1882
2490
|
}
|
|
1883
2491
|
return s;
|
|
1884
2492
|
}
|
|
1885
|
-
const
|
|
2493
|
+
const yn = {
|
|
1886
2494
|
/**
|
|
1887
2495
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1888
2496
|
* @type {Function}
|
|
1889
2497
|
*/
|
|
1890
|
-
getAdapter:
|
|
2498
|
+
getAdapter: Bs,
|
|
1891
2499
|
/**
|
|
1892
2500
|
* Exposes all known adapters
|
|
1893
2501
|
* @type {Object<string, Function|Object>}
|
|
1894
2502
|
*/
|
|
1895
|
-
adapters:
|
|
2503
|
+
adapters: pt
|
|
1896
2504
|
};
|
|
1897
|
-
function
|
|
2505
|
+
function et(t) {
|
|
1898
2506
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1899
|
-
throw new
|
|
2507
|
+
throw new Pe(null, t);
|
|
1900
2508
|
}
|
|
1901
|
-
function
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
2509
|
+
function tt(t) {
|
|
2510
|
+
const e = a.toSafeFlatObject(t);
|
|
2511
|
+
return et(e), e.headers = B.from(a.getSafeProp(e, "headers")), e.data = Ye.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), yn.getAdapter(e.adapter || Ae.adapter, e)(e).then(
|
|
2512
|
+
function(s) {
|
|
2513
|
+
et(e), e.response = s;
|
|
2514
|
+
try {
|
|
2515
|
+
s.data = Ye.call(e, e.transformResponse, s);
|
|
2516
|
+
} finally {
|
|
2517
|
+
delete e.response;
|
|
2518
|
+
}
|
|
2519
|
+
return s.headers = B.from(s.headers), s;
|
|
1905
2520
|
},
|
|
1906
|
-
function(
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
2521
|
+
function(s) {
|
|
2522
|
+
if (!un(s) && (et(e), s && s.response)) {
|
|
2523
|
+
e.response = s.response;
|
|
2524
|
+
try {
|
|
2525
|
+
s.response.data = Ye.call(
|
|
2526
|
+
e,
|
|
2527
|
+
e.transformResponse,
|
|
2528
|
+
s.response
|
|
2529
|
+
);
|
|
2530
|
+
} finally {
|
|
2531
|
+
delete e.response;
|
|
2532
|
+
}
|
|
2533
|
+
s.response.headers = B.from(s.response.headers);
|
|
2534
|
+
}
|
|
2535
|
+
return Promise.reject(s);
|
|
1912
2536
|
}
|
|
1913
2537
|
);
|
|
1914
2538
|
}
|
|
1915
|
-
const
|
|
2539
|
+
const ze = {};
|
|
1916
2540
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
1917
|
-
|
|
2541
|
+
ze[t] = function(r) {
|
|
1918
2542
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
1919
2543
|
};
|
|
1920
2544
|
});
|
|
1921
|
-
const
|
|
1922
|
-
|
|
2545
|
+
const It = {};
|
|
2546
|
+
ze.transitional = function(e, n, r) {
|
|
1923
2547
|
function s(o, i) {
|
|
1924
|
-
return "[Axios v" +
|
|
2548
|
+
return "[Axios v" + ht + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1925
2549
|
}
|
|
1926
2550
|
return (o, i, l) => {
|
|
1927
2551
|
if (e === !1)
|
|
1928
|
-
throw new
|
|
2552
|
+
throw new g(
|
|
1929
2553
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1930
|
-
|
|
2554
|
+
g.ERR_DEPRECATED
|
|
1931
2555
|
);
|
|
1932
|
-
return n && !
|
|
2556
|
+
return n && !It[i] && (It[i] = !0, console.warn(
|
|
1933
2557
|
s(
|
|
1934
2558
|
i,
|
|
1935
2559
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1937,38 +2561,38 @@ Ae.transitional = function(e, n, r) {
|
|
|
1937
2561
|
)), e ? e(o, i, l) : !0;
|
|
1938
2562
|
};
|
|
1939
2563
|
};
|
|
1940
|
-
|
|
2564
|
+
ze.spelling = function(e) {
|
|
1941
2565
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
|
|
1942
2566
|
};
|
|
1943
|
-
function
|
|
1944
|
-
if (typeof t != "object")
|
|
1945
|
-
throw new
|
|
2567
|
+
function Is(t, e, n) {
|
|
2568
|
+
if (typeof t != "object" || t === null)
|
|
2569
|
+
throw new g("options must be an object", g.ERR_BAD_OPTION_VALUE);
|
|
1946
2570
|
const r = Object.keys(t);
|
|
1947
2571
|
let s = r.length;
|
|
1948
2572
|
for (; s-- > 0; ) {
|
|
1949
2573
|
const o = r[s], i = Object.prototype.hasOwnProperty.call(e, o) ? e[o] : void 0;
|
|
1950
2574
|
if (i) {
|
|
1951
|
-
const l = t[o],
|
|
1952
|
-
if (
|
|
1953
|
-
throw new
|
|
1954
|
-
"option " + o + " must be " +
|
|
1955
|
-
|
|
2575
|
+
const l = t[o], c = l === void 0 || i(l, o, t);
|
|
2576
|
+
if (c !== !0)
|
|
2577
|
+
throw new g(
|
|
2578
|
+
"option " + o + " must be " + c,
|
|
2579
|
+
g.ERR_BAD_OPTION_VALUE
|
|
1956
2580
|
);
|
|
1957
2581
|
continue;
|
|
1958
2582
|
}
|
|
1959
2583
|
if (n !== !0)
|
|
1960
|
-
throw new
|
|
2584
|
+
throw new g("Unknown option " + o, g.ERR_BAD_OPTION);
|
|
1961
2585
|
}
|
|
1962
2586
|
}
|
|
1963
|
-
const
|
|
1964
|
-
assertOptions:
|
|
1965
|
-
validators:
|
|
1966
|
-
},
|
|
1967
|
-
let
|
|
2587
|
+
const Ie = {
|
|
2588
|
+
assertOptions: Is,
|
|
2589
|
+
validators: ze
|
|
2590
|
+
}, j = Ie.validators;
|
|
2591
|
+
let ue = class {
|
|
1968
2592
|
constructor(e) {
|
|
1969
2593
|
this.defaults = e || {}, this.interceptors = {
|
|
1970
|
-
request: new
|
|
1971
|
-
response: new
|
|
2594
|
+
request: new Tt(),
|
|
2595
|
+
response: new Tt()
|
|
1972
2596
|
};
|
|
1973
2597
|
}
|
|
1974
2598
|
/**
|
|
@@ -1983,127 +2607,140 @@ let Y = class {
|
|
|
1983
2607
|
try {
|
|
1984
2608
|
return await this._request(e, n);
|
|
1985
2609
|
} catch (r) {
|
|
1986
|
-
if (r instanceof Error)
|
|
1987
|
-
let s = {};
|
|
1988
|
-
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1989
|
-
const o = (() => {
|
|
1990
|
-
if (!s.stack)
|
|
1991
|
-
return "";
|
|
1992
|
-
const i = s.stack.indexOf(`
|
|
1993
|
-
`);
|
|
1994
|
-
return i === -1 ? "" : s.stack.slice(i + 1);
|
|
1995
|
-
})();
|
|
2610
|
+
if (r instanceof Error)
|
|
1996
2611
|
try {
|
|
2612
|
+
let s = {};
|
|
2613
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2614
|
+
const o = s.stack;
|
|
2615
|
+
let i = "";
|
|
2616
|
+
if (typeof o == "string") {
|
|
2617
|
+
const l = o.indexOf(`
|
|
2618
|
+
`);
|
|
2619
|
+
i = l === -1 ? "" : o.slice(l + 1);
|
|
2620
|
+
}
|
|
1997
2621
|
if (!r.stack)
|
|
1998
|
-
r.stack =
|
|
1999
|
-
else if (
|
|
2000
|
-
const
|
|
2001
|
-
`),
|
|
2002
|
-
`,
|
|
2003
|
-
String(r.stack).endsWith(
|
|
2004
|
-
` +
|
|
2622
|
+
r.stack = i;
|
|
2623
|
+
else if (i) {
|
|
2624
|
+
const l = i.indexOf(`
|
|
2625
|
+
`), c = l === -1 ? -1 : i.indexOf(`
|
|
2626
|
+
`, l + 1), d = c === -1 ? "" : i.slice(c + 1);
|
|
2627
|
+
String(r.stack).endsWith(d) || (r.stack += `
|
|
2628
|
+
` + i);
|
|
2005
2629
|
}
|
|
2006
2630
|
} catch {
|
|
2007
2631
|
}
|
|
2008
|
-
}
|
|
2009
2632
|
throw r;
|
|
2010
2633
|
}
|
|
2011
2634
|
}
|
|
2012
2635
|
_request(e, n) {
|
|
2013
|
-
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n =
|
|
2636
|
+
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = he(this.defaults, n);
|
|
2014
2637
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
2015
|
-
r !== void 0 &&
|
|
2638
|
+
r !== void 0 && Ie.assertOptions(
|
|
2016
2639
|
r,
|
|
2017
2640
|
{
|
|
2018
|
-
silentJSONParsing:
|
|
2019
|
-
forcedJSONParsing:
|
|
2020
|
-
clarifyTimeoutError:
|
|
2021
|
-
legacyInterceptorReqResOrdering:
|
|
2641
|
+
silentJSONParsing: j.transitional(j.boolean),
|
|
2642
|
+
forcedJSONParsing: j.transitional(j.boolean),
|
|
2643
|
+
clarifyTimeoutError: j.transitional(j.boolean),
|
|
2644
|
+
legacyInterceptorReqResOrdering: j.transitional(j.boolean),
|
|
2645
|
+
advertiseZstdAcceptEncoding: j.transitional(j.boolean),
|
|
2646
|
+
validateStatusUndefinedResolves: j.transitional(j.boolean)
|
|
2022
2647
|
},
|
|
2023
2648
|
!1
|
|
2024
2649
|
), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
2025
2650
|
serialize: s
|
|
2026
|
-
} :
|
|
2651
|
+
} : Ie.assertOptions(
|
|
2027
2652
|
s,
|
|
2028
2653
|
{
|
|
2029
|
-
encode:
|
|
2030
|
-
serialize:
|
|
2654
|
+
encode: j.function,
|
|
2655
|
+
serialize: j.function
|
|
2031
2656
|
},
|
|
2032
2657
|
!0
|
|
2033
|
-
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
2658
|
+
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ie.assertOptions(
|
|
2034
2659
|
n,
|
|
2035
2660
|
{
|
|
2036
|
-
baseUrl:
|
|
2037
|
-
withXsrfToken:
|
|
2661
|
+
baseUrl: j.spelling("baseURL"),
|
|
2662
|
+
withXsrfToken: j.spelling("withXSRFToken")
|
|
2038
2663
|
},
|
|
2039
2664
|
!0
|
|
2040
|
-
), n.method = (n
|
|
2665
|
+
), n.method = (a.getSafeProp(n, "method") || a.getSafeProp(this.defaults, "method") || "get").toLowerCase();
|
|
2041
2666
|
let i = o && a.merge(o.common, o[n.method]);
|
|
2042
|
-
o && a.forEach(
|
|
2043
|
-
delete o[
|
|
2044
|
-
}), n.headers =
|
|
2667
|
+
o && a.forEach(cn.concat("common"), (S) => {
|
|
2668
|
+
delete o[S];
|
|
2669
|
+
}), n.headers = B.concat(i, o);
|
|
2045
2670
|
const l = [];
|
|
2046
|
-
let
|
|
2047
|
-
this.interceptors.request.forEach(function(
|
|
2048
|
-
if (typeof
|
|
2671
|
+
let c = !0;
|
|
2672
|
+
this.interceptors.request.forEach(function(O) {
|
|
2673
|
+
if (typeof O.runWhen == "function" && O.runWhen(n) === !1)
|
|
2049
2674
|
return;
|
|
2050
|
-
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2675
|
+
c = c && O.synchronous;
|
|
2676
|
+
const N = n.transitional || ft;
|
|
2677
|
+
N && N.legacyInterceptorReqResOrdering ? l.unshift(O.fulfilled, O.rejected) : l.push(O.fulfilled, O.rejected);
|
|
2053
2678
|
});
|
|
2054
|
-
const
|
|
2055
|
-
this.interceptors.response.forEach(function(
|
|
2056
|
-
|
|
2679
|
+
const d = [];
|
|
2680
|
+
this.interceptors.response.forEach(function(O) {
|
|
2681
|
+
d.push(O.fulfilled, O.rejected);
|
|
2057
2682
|
});
|
|
2058
|
-
let
|
|
2059
|
-
if (!
|
|
2060
|
-
const
|
|
2061
|
-
for (
|
|
2062
|
-
|
|
2063
|
-
return
|
|
2683
|
+
let u, h = 0, p;
|
|
2684
|
+
if (!c) {
|
|
2685
|
+
const S = [tt.bind(this), void 0];
|
|
2686
|
+
for (S.unshift(...l), S.push(...d), p = S.length, u = Promise.resolve(n); h < p; )
|
|
2687
|
+
u = u.then(S[h++], S[h++]);
|
|
2688
|
+
return u;
|
|
2064
2689
|
}
|
|
2065
|
-
|
|
2066
|
-
let
|
|
2067
|
-
for (;
|
|
2068
|
-
const
|
|
2690
|
+
p = l.length;
|
|
2691
|
+
let _ = n;
|
|
2692
|
+
for (; h < p; ) {
|
|
2693
|
+
const S = l[h++], O = l[h++];
|
|
2069
2694
|
try {
|
|
2070
|
-
|
|
2071
|
-
} catch (
|
|
2072
|
-
|
|
2695
|
+
_ = S ? S(_) : _;
|
|
2696
|
+
} catch (N) {
|
|
2697
|
+
if (!O) {
|
|
2698
|
+
u = Promise.reject(N);
|
|
2699
|
+
break;
|
|
2700
|
+
}
|
|
2701
|
+
try {
|
|
2702
|
+
const f = O.call(this, N);
|
|
2703
|
+
a.isThenable(f) && (u = Promise.resolve(f).then(
|
|
2704
|
+
() => tt.call(this, _)
|
|
2705
|
+
));
|
|
2706
|
+
} catch (f) {
|
|
2707
|
+
u = Promise.reject(f);
|
|
2708
|
+
}
|
|
2073
2709
|
break;
|
|
2074
2710
|
}
|
|
2075
2711
|
}
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2712
|
+
if (!u)
|
|
2713
|
+
try {
|
|
2714
|
+
u = tt.call(this, _);
|
|
2715
|
+
} catch (S) {
|
|
2716
|
+
u = Promise.reject(S);
|
|
2717
|
+
}
|
|
2718
|
+
for (h = 0, p = d.length; h < p; )
|
|
2719
|
+
u = u.then(d[h++], d[h++]);
|
|
2720
|
+
return u;
|
|
2084
2721
|
}
|
|
2085
2722
|
getUri(e) {
|
|
2086
|
-
e =
|
|
2087
|
-
const n =
|
|
2088
|
-
return
|
|
2723
|
+
e = he(this.defaults, e);
|
|
2724
|
+
const n = hn(e.baseURL, e.url, e.allowAbsoluteUrls, e);
|
|
2725
|
+
return sn(n, e.params, e.paramsSerializer);
|
|
2089
2726
|
}
|
|
2090
2727
|
};
|
|
2091
2728
|
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2092
|
-
|
|
2729
|
+
ue.prototype[e] = function(n, r) {
|
|
2093
2730
|
return this.request(
|
|
2094
|
-
|
|
2731
|
+
he(r || {}, {
|
|
2095
2732
|
method: e,
|
|
2096
2733
|
url: n,
|
|
2097
|
-
data: (r
|
|
2734
|
+
data: r && a.hasOwnProp(r, "data") ? r.data : void 0
|
|
2098
2735
|
})
|
|
2099
2736
|
);
|
|
2100
2737
|
};
|
|
2101
2738
|
});
|
|
2102
|
-
a.forEach(["post", "put", "patch"], function(e) {
|
|
2739
|
+
a.forEach(["post", "put", "patch", "query"], function(e) {
|
|
2103
2740
|
function n(r) {
|
|
2104
2741
|
return function(o, i, l) {
|
|
2105
2742
|
return this.request(
|
|
2106
|
-
|
|
2743
|
+
he(l || {}, {
|
|
2107
2744
|
method: e,
|
|
2108
2745
|
headers: r ? {
|
|
2109
2746
|
"Content-Type": "multipart/form-data"
|
|
@@ -2114,9 +2751,9 @@ a.forEach(["post", "put", "patch"], function(e) {
|
|
|
2114
2751
|
);
|
|
2115
2752
|
};
|
|
2116
2753
|
}
|
|
2117
|
-
|
|
2754
|
+
ue.prototype[e] = n(), e !== "query" && (ue.prototype[e + "Form"] = n(!0));
|
|
2118
2755
|
});
|
|
2119
|
-
let
|
|
2756
|
+
let Ms = class bn {
|
|
2120
2757
|
constructor(e) {
|
|
2121
2758
|
if (typeof e != "function")
|
|
2122
2759
|
throw new TypeError("executor must be a function.");
|
|
@@ -2140,7 +2777,7 @@ let Lr = class vt {
|
|
|
2140
2777
|
r.unsubscribe(o);
|
|
2141
2778
|
}, i;
|
|
2142
2779
|
}, e(function(o, i, l) {
|
|
2143
|
-
r.reason || (r.reason = new
|
|
2780
|
+
r.reason || (r.reason = new Pe(o, i, l), n(r.reason));
|
|
2144
2781
|
});
|
|
2145
2782
|
}
|
|
2146
2783
|
/**
|
|
@@ -2182,19 +2819,19 @@ let Lr = class vt {
|
|
|
2182
2819
|
static source() {
|
|
2183
2820
|
let e;
|
|
2184
2821
|
return {
|
|
2185
|
-
token: new
|
|
2822
|
+
token: new bn(function(s) {
|
|
2186
2823
|
e = s;
|
|
2187
2824
|
}),
|
|
2188
2825
|
cancel: e
|
|
2189
2826
|
};
|
|
2190
2827
|
}
|
|
2191
2828
|
};
|
|
2192
|
-
function
|
|
2829
|
+
function Hs(t) {
|
|
2193
2830
|
return function(n) {
|
|
2194
2831
|
return t.apply(null, n);
|
|
2195
2832
|
};
|
|
2196
2833
|
}
|
|
2197
|
-
function
|
|
2834
|
+
function qs(t) {
|
|
2198
2835
|
return a.isObject(t) && t.isAxiosError === !0;
|
|
2199
2836
|
}
|
|
2200
2837
|
const Me = {
|
|
@@ -2234,14 +2871,22 @@ const Me = {
|
|
|
2234
2871
|
Gone: 410,
|
|
2235
2872
|
LengthRequired: 411,
|
|
2236
2873
|
PreconditionFailed: 412,
|
|
2874
|
+
/**
|
|
2875
|
+
* @deprecated Use `ContentTooLarge` instead.
|
|
2876
|
+
*/
|
|
2237
2877
|
PayloadTooLarge: 413,
|
|
2878
|
+
ContentTooLarge: 413,
|
|
2238
2879
|
UriTooLong: 414,
|
|
2239
2880
|
UnsupportedMediaType: 415,
|
|
2240
2881
|
RangeNotSatisfiable: 416,
|
|
2241
2882
|
ExpectationFailed: 417,
|
|
2242
2883
|
ImATeapot: 418,
|
|
2243
2884
|
MisdirectedRequest: 421,
|
|
2885
|
+
/**
|
|
2886
|
+
* @deprecated Use `UnprocessableContent` instead.
|
|
2887
|
+
*/
|
|
2244
2888
|
UnprocessableEntity: 422,
|
|
2889
|
+
UnprocessableContent: 422,
|
|
2245
2890
|
Locked: 423,
|
|
2246
2891
|
FailedDependency: 424,
|
|
2247
2892
|
TooEarly: 425,
|
|
@@ -2261,6 +2906,7 @@ const Me = {
|
|
|
2261
2906
|
LoopDetected: 508,
|
|
2262
2907
|
NotExtended: 510,
|
|
2263
2908
|
NetworkAuthenticationRequired: 511,
|
|
2909
|
+
WebServerReturnsAnUnknownError: 520,
|
|
2264
2910
|
WebServerIsDown: 521,
|
|
2265
2911
|
ConnectionTimedOut: 522,
|
|
2266
2912
|
OriginIsUnreachable: 523,
|
|
@@ -2269,58 +2915,59 @@ const Me = {
|
|
|
2269
2915
|
InvalidSslCertificate: 526
|
|
2270
2916
|
};
|
|
2271
2917
|
Object.entries(Me).forEach(([t, e]) => {
|
|
2272
|
-
Me[e] = t;
|
|
2918
|
+
Me[e] === void 0 && (Me[e] = t);
|
|
2273
2919
|
});
|
|
2274
|
-
function
|
|
2275
|
-
const e = new
|
|
2276
|
-
return a.extend(n,
|
|
2277
|
-
return
|
|
2920
|
+
function En(t) {
|
|
2921
|
+
const e = new ue(t), n = qt(ue.prototype.request, e);
|
|
2922
|
+
return a.extend(n, ue.prototype, e, { allOwnKeys: !0 }), a.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2923
|
+
return En(he(t, s));
|
|
2278
2924
|
}, n;
|
|
2279
2925
|
}
|
|
2280
|
-
const
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2926
|
+
const D = En(Ae);
|
|
2927
|
+
D.Axios = ue;
|
|
2928
|
+
D.CanceledError = Pe;
|
|
2929
|
+
D.CancelToken = Ms;
|
|
2930
|
+
D.isCancel = un;
|
|
2931
|
+
D.VERSION = ht;
|
|
2932
|
+
D.toFormData = Ke;
|
|
2933
|
+
D.AxiosError = g;
|
|
2934
|
+
D.Cancel = D.CanceledError;
|
|
2935
|
+
D.all = function(e) {
|
|
2290
2936
|
return Promise.all(e);
|
|
2291
2937
|
};
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2938
|
+
D.spread = Hs;
|
|
2939
|
+
D.isAxiosError = qs;
|
|
2940
|
+
D.mergeConfig = he;
|
|
2941
|
+
D.AxiosHeaders = B;
|
|
2942
|
+
D.formToJSON = (t) => ln(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
2943
|
+
D.getAdapter = yn.getAdapter;
|
|
2944
|
+
D.HttpStatusCode = Me;
|
|
2945
|
+
D.default = D;
|
|
2300
2946
|
const {
|
|
2301
|
-
Axios:
|
|
2302
|
-
AxiosError:
|
|
2303
|
-
CanceledError:
|
|
2304
|
-
isCancel:
|
|
2305
|
-
CancelToken:
|
|
2306
|
-
VERSION:
|
|
2307
|
-
all:
|
|
2308
|
-
Cancel:
|
|
2309
|
-
isAxiosError:
|
|
2310
|
-
spread:
|
|
2311
|
-
toFormData:
|
|
2312
|
-
AxiosHeaders:
|
|
2313
|
-
HttpStatusCode:
|
|
2314
|
-
formToJSON:
|
|
2315
|
-
getAdapter:
|
|
2316
|
-
mergeConfig:
|
|
2317
|
-
|
|
2318
|
-
|
|
2947
|
+
Axios: ho,
|
|
2948
|
+
AxiosError: po,
|
|
2949
|
+
CanceledError: go,
|
|
2950
|
+
isCancel: mo,
|
|
2951
|
+
CancelToken: yo,
|
|
2952
|
+
VERSION: bo,
|
|
2953
|
+
all: Eo,
|
|
2954
|
+
Cancel: wo,
|
|
2955
|
+
isAxiosError: Ro,
|
|
2956
|
+
spread: Oo,
|
|
2957
|
+
toFormData: _o,
|
|
2958
|
+
AxiosHeaders: So,
|
|
2959
|
+
HttpStatusCode: xo,
|
|
2960
|
+
formToJSON: To,
|
|
2961
|
+
getAdapter: Ao,
|
|
2962
|
+
mergeConfig: Po,
|
|
2963
|
+
create: Co
|
|
2964
|
+
} = D, nt = "https://translation.googleapis.com/language/translate/v2", $s = /* @__PURE__ */ new Set([408, 425, 429, 500, 502, 503, 504]), Ks = (t) => D.isAxiosError(t);
|
|
2965
|
+
class zs {
|
|
2319
2966
|
constructor(e) {
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
this.config = e, this.axios =
|
|
2323
|
-
baseURL: e.endpoint ??
|
|
2967
|
+
X(this, "type", "google");
|
|
2968
|
+
X(this, "axios");
|
|
2969
|
+
this.config = e, this.axios = D.create({
|
|
2970
|
+
baseURL: e.endpoint ?? nt,
|
|
2324
2971
|
headers: {
|
|
2325
2972
|
"Content-Type": "application/json",
|
|
2326
2973
|
...e.headers
|
|
@@ -2328,12 +2975,14 @@ class Ur {
|
|
|
2328
2975
|
});
|
|
2329
2976
|
}
|
|
2330
2977
|
isAvailable() {
|
|
2331
|
-
|
|
2332
|
-
|
|
2978
|
+
const { apiKey: e, headers: n, endpoint: r } = this.config;
|
|
2979
|
+
return !!e || n !== void 0 && Object.keys(n).length > 0 || r !== void 0 && r !== nt ? { available: !0 } : {
|
|
2980
|
+
available: !1,
|
|
2981
|
+
reason: "Google Translate requires an apiKey, authentication headers or a custom endpoint"
|
|
2333
2982
|
};
|
|
2334
2983
|
}
|
|
2335
2984
|
async translate(e, n) {
|
|
2336
|
-
var
|
|
2985
|
+
var c, d, u;
|
|
2337
2986
|
const r = {
|
|
2338
2987
|
q: e.text,
|
|
2339
2988
|
target: e.targetLanguage,
|
|
@@ -2345,16 +2994,16 @@ class Ur {
|
|
|
2345
2994
|
sourceLanguageCode: e.sourceLanguage ?? "auto",
|
|
2346
2995
|
targetLanguageCode: e.targetLanguage
|
|
2347
2996
|
},
|
|
2348
|
-
terms: Object.entries(e.glossary).map(([
|
|
2349
|
-
sourceText:
|
|
2350
|
-
targetText:
|
|
2997
|
+
terms: Object.entries(e.glossary).map(([h, p]) => ({
|
|
2998
|
+
sourceText: h,
|
|
2999
|
+
targetText: p
|
|
2351
3000
|
}))
|
|
2352
3001
|
}
|
|
2353
3002
|
});
|
|
2354
3003
|
const s = {
|
|
2355
3004
|
...this.config.headers,
|
|
2356
3005
|
...n == null ? void 0 : n.headers
|
|
2357
|
-
}, i = (
|
|
3006
|
+
}, i = (u = (d = (c = (await this.axios.post(
|
|
2358
3007
|
"",
|
|
2359
3008
|
r,
|
|
2360
3009
|
{
|
|
@@ -2363,13 +3012,13 @@ class Ur {
|
|
|
2363
3012
|
timeout: n == null ? void 0 : n.timeoutMs,
|
|
2364
3013
|
signal: n == null ? void 0 : n.signal
|
|
2365
3014
|
}
|
|
2366
|
-
)).data) == null ? void 0 :
|
|
3015
|
+
)).data) == null ? void 0 : c.data) == null ? void 0 : d.translations) == null ? void 0 : u[0];
|
|
2367
3016
|
if (!(i != null && i.translatedText))
|
|
2368
3017
|
throw new Error(
|
|
2369
3018
|
"Google Translate response did not include translatedText"
|
|
2370
3019
|
);
|
|
2371
3020
|
const l = {
|
|
2372
|
-
endpoint: this.config.endpoint ??
|
|
3021
|
+
endpoint: this.config.endpoint ?? nt
|
|
2373
3022
|
};
|
|
2374
3023
|
return i.model && (l.model = i.model), this.config.projectId && (l.projectId = this.config.projectId), this.config.region && (l.region = this.config.region), {
|
|
2375
3024
|
translatedText: i.translatedText,
|
|
@@ -2379,15 +3028,15 @@ class Ur {
|
|
|
2379
3028
|
}
|
|
2380
3029
|
normalizeError(e) {
|
|
2381
3030
|
var n, r, s, o, i;
|
|
2382
|
-
if (
|
|
2383
|
-
const l = (n = e.response) == null ? void 0 : n.status,
|
|
3031
|
+
if (Ks(e)) {
|
|
3032
|
+
const l = (n = e.response) == null ? void 0 : n.status, c = ((r = e.response) == null ? void 0 : r.data) ?? {}, d = ((s = c.error) == null ? void 0 : s.message) ?? e.message ?? "Google Translate request failed";
|
|
2384
3033
|
return {
|
|
2385
|
-
code: String(((o =
|
|
2386
|
-
message:
|
|
2387
|
-
retryable: l ?
|
|
3034
|
+
code: String(((o = c.error) == null ? void 0 : o.code) ?? l ?? "E_GOOGLE"),
|
|
3035
|
+
message: d,
|
|
3036
|
+
retryable: l ? $s.has(l) : !1,
|
|
2388
3037
|
details: {
|
|
2389
3038
|
status: l,
|
|
2390
|
-
data:
|
|
3039
|
+
data: c,
|
|
2391
3040
|
headers: (i = e.response) == null ? void 0 : i.headers
|
|
2392
3041
|
}
|
|
2393
3042
|
};
|
|
@@ -2411,7 +3060,7 @@ class Ur {
|
|
|
2411
3060
|
};
|
|
2412
3061
|
}
|
|
2413
3062
|
}
|
|
2414
|
-
const
|
|
3063
|
+
const rt = (t) => {
|
|
2415
3064
|
if (!t)
|
|
2416
3065
|
throw new Error("Provider instance is null or undefined");
|
|
2417
3066
|
if (!t.type)
|
|
@@ -2422,41 +3071,41 @@ const Fe = (t) => {
|
|
|
2422
3071
|
throw new Error("Provider 'isAvailable' must be a function");
|
|
2423
3072
|
if (t.normalizeError && typeof t.normalizeError != "function")
|
|
2424
3073
|
throw new Error("Provider 'normalizeError' must be a function");
|
|
2425
|
-
},
|
|
3074
|
+
}, Vs = (t) => {
|
|
2426
3075
|
if (t.id === "google") {
|
|
2427
|
-
const e = new
|
|
2428
|
-
return
|
|
3076
|
+
const e = new zs(t);
|
|
3077
|
+
return rt(e), e;
|
|
2429
3078
|
}
|
|
2430
3079
|
if (t.implementation)
|
|
2431
|
-
return
|
|
3080
|
+
return rt(t.implementation), t.implementation;
|
|
2432
3081
|
if (t.factory) {
|
|
2433
3082
|
const e = t.factory();
|
|
2434
|
-
return
|
|
3083
|
+
return rt(e), e;
|
|
2435
3084
|
}
|
|
2436
3085
|
throw new Error(
|
|
2437
3086
|
"Custom provider configuration must include either 'implementation' or 'factory'"
|
|
2438
3087
|
);
|
|
2439
|
-
},
|
|
3088
|
+
}, Ws = "translator", Js = 5e3, Mt = 3e4, Xs = "::", Gs = (t) => {
|
|
2440
3089
|
var n, r;
|
|
2441
3090
|
return ((r = (n = navigator == null ? void 0 : navigator.language) == null ? void 0 : n.split("-")) == null ? void 0 : r[0]) || t;
|
|
2442
|
-
},
|
|
3091
|
+
}, Qs = (t) => localStorage.getItem(t), Ys = (t, e) => {
|
|
2443
3092
|
localStorage.setItem(t, e);
|
|
2444
|
-
},
|
|
2445
|
-
scope:
|
|
3093
|
+
}, Zs = (t) => t ? t instanceof Set ? new Set(t) : new Set(t) : /* @__PURE__ */ new Set(), wn = (t, e) => ({
|
|
3094
|
+
scope: Ws,
|
|
2446
3095
|
event: t,
|
|
2447
3096
|
...e
|
|
2448
|
-
}),
|
|
2449
|
-
console.warn("[vbss-translator]",
|
|
2450
|
-
},
|
|
2451
|
-
console.debug("[vbss-translator]",
|
|
2452
|
-
},
|
|
3097
|
+
}), Oe = (t, e) => {
|
|
3098
|
+
console.warn("[vbss-translator]", wn(t, e));
|
|
3099
|
+
}, $ = (t, e) => {
|
|
3100
|
+
console.debug("[vbss-translator]", wn(t, e));
|
|
3101
|
+
}, eo = () => ({
|
|
2453
3102
|
warn: (t, e) => {
|
|
2454
|
-
|
|
3103
|
+
Oe(t, e ?? {});
|
|
2455
3104
|
},
|
|
2456
3105
|
debug: (t, e) => {
|
|
2457
|
-
|
|
3106
|
+
$(t, e ?? {});
|
|
2458
3107
|
}
|
|
2459
|
-
}),
|
|
3108
|
+
}), to = (t) => {
|
|
2460
3109
|
const {
|
|
2461
3110
|
provider: e,
|
|
2462
3111
|
cache: n,
|
|
@@ -2468,32 +3117,32 @@ const Fe = (t) => {
|
|
|
2468
3117
|
} = t ?? {};
|
|
2469
3118
|
return {
|
|
2470
3119
|
enabled: s ?? !1,
|
|
2471
|
-
timeoutMs: o ??
|
|
3120
|
+
timeoutMs: o ?? Js,
|
|
2472
3121
|
debug: i ?? !1,
|
|
2473
3122
|
provider: {
|
|
2474
|
-
...
|
|
3123
|
+
...no,
|
|
2475
3124
|
...e
|
|
2476
3125
|
},
|
|
2477
3126
|
cache: {
|
|
2478
|
-
...
|
|
3127
|
+
...ro,
|
|
2479
3128
|
...n
|
|
2480
3129
|
},
|
|
2481
|
-
alwaysExternalKeys:
|
|
3130
|
+
alwaysExternalKeys: Zs(r),
|
|
2482
3131
|
...l
|
|
2483
3132
|
};
|
|
2484
|
-
},
|
|
3133
|
+
}, no = {
|
|
2485
3134
|
id: "google"
|
|
2486
|
-
},
|
|
3135
|
+
}, ro = {
|
|
2487
3136
|
enabled: !1,
|
|
2488
3137
|
ttlMs: 36e5
|
|
2489
|
-
},
|
|
3138
|
+
}, st = (t, e) => `${t}${Xs}${e}`, so = (t) => t ? new Map(t) : /* @__PURE__ */ new Map(), oo = (t, e) => {
|
|
2490
3139
|
const n = t.toLocaleLowerCase();
|
|
2491
3140
|
return e.find(
|
|
2492
3141
|
(r) => Object.values(r).some(
|
|
2493
3142
|
(s) => s.toLocaleLowerCase() === n
|
|
2494
3143
|
)
|
|
2495
3144
|
);
|
|
2496
|
-
},
|
|
3145
|
+
}, Lo = ({
|
|
2497
3146
|
children: t,
|
|
2498
3147
|
translations: e,
|
|
2499
3148
|
defaultLanguage: n = "en",
|
|
@@ -2502,258 +3151,261 @@ const Fe = (t) => {
|
|
|
2502
3151
|
autoDetectLanguage: o = !1,
|
|
2503
3152
|
externalTranslation: i
|
|
2504
3153
|
}) => {
|
|
2505
|
-
const l =
|
|
2506
|
-
() =>
|
|
3154
|
+
const l = ee(
|
|
3155
|
+
() => to(i),
|
|
2507
3156
|
[i]
|
|
2508
|
-
), [
|
|
2509
|
-
() => new Set(
|
|
2510
|
-
)
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
if (b.has(m))
|
|
2520
|
-
return b;
|
|
2521
|
-
const w = new Set(b);
|
|
2522
|
-
return w.add(m), w;
|
|
3157
|
+
), [c, d] = Ne(
|
|
3158
|
+
() => /* @__PURE__ */ new Set()
|
|
3159
|
+
), u = ee(
|
|
3160
|
+
() => /* @__PURE__ */ new Set([...l.alwaysExternalKeys, ...c]),
|
|
3161
|
+
[l, c]
|
|
3162
|
+
), h = ke((y) => {
|
|
3163
|
+
d((T) => {
|
|
3164
|
+
if (T.has(y))
|
|
3165
|
+
return T;
|
|
3166
|
+
const k = new Set(T);
|
|
3167
|
+
return k.add(y), k;
|
|
2523
3168
|
});
|
|
2524
|
-
}, []),
|
|
3169
|
+
}, []), p = ee(
|
|
2525
3170
|
() => ({
|
|
2526
3171
|
...l,
|
|
2527
|
-
alwaysExternalKeys:
|
|
3172
|
+
alwaysExternalKeys: u
|
|
2528
3173
|
}),
|
|
2529
|
-
[l,
|
|
2530
|
-
),
|
|
2531
|
-
|
|
3174
|
+
[l, u]
|
|
3175
|
+
), _ = r ? Qs(s) : null, S = o ? Gs(n) : null, [O, N] = Ne(
|
|
3176
|
+
_ ?? S ?? n
|
|
2532
3177
|
);
|
|
2533
|
-
|
|
2534
|
-
r &&
|
|
2535
|
-
}, [
|
|
2536
|
-
const
|
|
3178
|
+
yt(() => {
|
|
3179
|
+
r && Ys(s, O);
|
|
3180
|
+
}, [O, r, s]);
|
|
3181
|
+
const f = ee(
|
|
2537
3182
|
() => Object.keys(e[0] || {}),
|
|
2538
3183
|
[e]
|
|
2539
|
-
),
|
|
2540
|
-
() => new
|
|
2541
|
-
[
|
|
2542
|
-
),
|
|
2543
|
-
let
|
|
3184
|
+
), m = ee(() => eo(), []), w = ee(
|
|
3185
|
+
() => new Nn(p.cache),
|
|
3186
|
+
[p.cache]
|
|
3187
|
+
), E = ee(() => {
|
|
3188
|
+
let y;
|
|
2544
3189
|
try {
|
|
2545
|
-
if (
|
|
2546
|
-
providerType:
|
|
2547
|
-
providerId:
|
|
3190
|
+
if (y = Vs(p.provider), p.debug && $("TranslatorProvider_provider_created", {
|
|
3191
|
+
providerType: y.type,
|
|
3192
|
+
providerId: p.provider.id,
|
|
2548
3193
|
timestamp: Date.now()
|
|
2549
|
-
}),
|
|
2550
|
-
const
|
|
2551
|
-
|
|
2552
|
-
providerType:
|
|
2553
|
-
providerId:
|
|
3194
|
+
}), p.enabled && y.isAvailable) {
|
|
3195
|
+
const T = y.isAvailable();
|
|
3196
|
+
T.available ? p.debug && $("TranslatorProvider_provider_available", {
|
|
3197
|
+
providerType: y.type,
|
|
3198
|
+
providerId: p.provider.id,
|
|
2554
3199
|
timestamp: Date.now()
|
|
2555
|
-
}) :
|
|
2556
|
-
providerType:
|
|
2557
|
-
providerId:
|
|
2558
|
-
reason:
|
|
3200
|
+
}) : Oe("TranslatorProvider_provider_unavailable", {
|
|
3201
|
+
providerType: y.type,
|
|
3202
|
+
providerId: p.provider.id,
|
|
3203
|
+
reason: T.reason,
|
|
2559
3204
|
timestamp: Date.now()
|
|
2560
3205
|
});
|
|
2561
3206
|
}
|
|
2562
|
-
} catch (
|
|
2563
|
-
throw
|
|
2564
|
-
providerId:
|
|
2565
|
-
error:
|
|
3207
|
+
} catch (T) {
|
|
3208
|
+
throw Oe("TranslatorProvider_provider_creation_failed", {
|
|
3209
|
+
providerId: p.provider.id,
|
|
3210
|
+
error: T instanceof Error ? T.message : "Unknown error",
|
|
2566
3211
|
timestamp: Date.now()
|
|
2567
|
-
}),
|
|
3212
|
+
}), T;
|
|
2568
3213
|
}
|
|
2569
|
-
return new
|
|
2570
|
-
provider:
|
|
2571
|
-
config:
|
|
2572
|
-
cache:
|
|
2573
|
-
logger:
|
|
3214
|
+
return new Dn({
|
|
3215
|
+
provider: y,
|
|
3216
|
+
config: p,
|
|
3217
|
+
cache: p.cache.enabled ? w : void 0,
|
|
3218
|
+
logger: m
|
|
2574
3219
|
});
|
|
2575
|
-
}, [
|
|
3220
|
+
}, [p, m, w]), [C, v] = Ne(
|
|
2576
3221
|
() => /* @__PURE__ */ new Map()
|
|
2577
|
-
), [
|
|
2578
|
-
|
|
3222
|
+
), [L, z] = Ne(0), I = bt(!0);
|
|
3223
|
+
yt(() => (p.debug && $("TranslatorProvider_mounted", {
|
|
2579
3224
|
timestamp: Date.now()
|
|
2580
|
-
}),
|
|
2581
|
-
|
|
3225
|
+
}), I.current = !0, () => {
|
|
3226
|
+
p.debug && $("TranslatorProvider_unmounting", {
|
|
2582
3227
|
timestamp: Date.now()
|
|
2583
|
-
}),
|
|
2584
|
-
}), [
|
|
2585
|
-
const q =
|
|
2586
|
-
(
|
|
2587
|
-
var
|
|
2588
|
-
|
|
2589
|
-
targetLanguage:
|
|
2590
|
-
key:
|
|
2591
|
-
status:
|
|
2592
|
-
value:
|
|
2593
|
-
isMounted:
|
|
3228
|
+
}), I.current = !1;
|
|
3229
|
+
}), [p]);
|
|
3230
|
+
const q = ke(
|
|
3231
|
+
(y, T, k) => {
|
|
3232
|
+
var P;
|
|
3233
|
+
p.debug && $("setExternalStateEntry_called", {
|
|
3234
|
+
targetLanguage: y,
|
|
3235
|
+
key: T,
|
|
3236
|
+
status: k.status,
|
|
3237
|
+
value: k.value,
|
|
3238
|
+
isMounted: I.current
|
|
2594
3239
|
});
|
|
2595
|
-
const
|
|
2596
|
-
|
|
2597
|
-
const
|
|
2598
|
-
return
|
|
2599
|
-
}),
|
|
2600
|
-
targetLanguage:
|
|
2601
|
-
key:
|
|
2602
|
-
}),
|
|
3240
|
+
const b = () => {
|
|
3241
|
+
v((W) => {
|
|
3242
|
+
const M = new Map(W), Z = so(M.get(y));
|
|
3243
|
+
return Z.set(T, k), M.set(y, Z), M;
|
|
3244
|
+
}), k.status === "resolved" && (p.debug && $("forceUpdate_triggered", {
|
|
3245
|
+
targetLanguage: y,
|
|
3246
|
+
key: T
|
|
3247
|
+
}), z((W) => W + 1));
|
|
2603
3248
|
};
|
|
2604
|
-
typeof process < "u" && ((
|
|
2605
|
-
|
|
3249
|
+
typeof process < "u" && ((P = process.env) == null ? void 0 : P.NODE_ENV) === "test" ? b() : An(() => {
|
|
3250
|
+
b();
|
|
2606
3251
|
});
|
|
2607
3252
|
},
|
|
2608
|
-
[
|
|
2609
|
-
),
|
|
2610
|
-
(
|
|
2611
|
-
var
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
3253
|
+
[p, z]
|
|
3254
|
+
), G = bt(/* @__PURE__ */ new Set()), ie = ke(
|
|
3255
|
+
(y) => {
|
|
3256
|
+
var k;
|
|
3257
|
+
if (!E.isEnabled())
|
|
3258
|
+
return;
|
|
3259
|
+
const T = st(y.key, y.targetLanguage);
|
|
3260
|
+
G.current.has(T) || (G.current.add(T), Promise.resolve().then(() => {
|
|
3261
|
+
q(y.targetLanguage, y.key, {
|
|
3262
|
+
status: "pending",
|
|
3263
|
+
value: y.displayValue
|
|
3264
|
+
});
|
|
3265
|
+
}), E.translate({
|
|
3266
|
+
key: y.key,
|
|
3267
|
+
text: y.originalText,
|
|
3268
|
+
targetLanguage: y.targetLanguage,
|
|
3269
|
+
sourceLanguage: y.sourceLanguage,
|
|
3270
|
+
signal: (k = y.options) == null ? void 0 : k.signal
|
|
3271
|
+
}).then((b) => {
|
|
3272
|
+
if (p.debug && $("translation_promise_resolved", {
|
|
3273
|
+
key: y.key,
|
|
3274
|
+
targetLanguage: y.targetLanguage,
|
|
3275
|
+
isMounted: I.current,
|
|
3276
|
+
hasResult: !!b,
|
|
3277
|
+
hasTranslatedText: !!(b && b.translatedText),
|
|
3278
|
+
translatedText: b == null ? void 0 : b.translatedText
|
|
3279
|
+
}), b && b.translatedText) {
|
|
3280
|
+
p.debug && $("translation_applying_resolved", {
|
|
3281
|
+
key: y.key,
|
|
3282
|
+
targetLanguage: y.targetLanguage,
|
|
3283
|
+
isMounted: I.current,
|
|
3284
|
+
translatedText: b.translatedText
|
|
3285
|
+
}), q(y.targetLanguage, y.key, {
|
|
2636
3286
|
status: "resolved",
|
|
2637
|
-
value:
|
|
3287
|
+
value: b.translatedText
|
|
2638
3288
|
});
|
|
2639
3289
|
return;
|
|
2640
3290
|
}
|
|
2641
|
-
|
|
2642
|
-
key:
|
|
2643
|
-
result:
|
|
2644
|
-
}), q(
|
|
3291
|
+
p.debug && $("translation_invalid_result", {
|
|
3292
|
+
key: y.key,
|
|
3293
|
+
result: b
|
|
3294
|
+
}), q(y.targetLanguage, y.key, {
|
|
2645
3295
|
status: "error",
|
|
2646
|
-
value:
|
|
2647
|
-
retryAt: Date.now() +
|
|
3296
|
+
value: y.displayValue,
|
|
3297
|
+
retryAt: Date.now() + Mt
|
|
2648
3298
|
});
|
|
2649
|
-
}).catch((
|
|
2650
|
-
|
|
2651
|
-
key:
|
|
2652
|
-
targetLanguage:
|
|
2653
|
-
isMounted:
|
|
2654
|
-
error: (
|
|
2655
|
-
}),
|
|
2656
|
-
key:
|
|
2657
|
-
language:
|
|
2658
|
-
error:
|
|
2659
|
-
isMounted:
|
|
2660
|
-
}), q(
|
|
3299
|
+
}).catch((b) => {
|
|
3300
|
+
p.debug && $("translation_promise_rejected", {
|
|
3301
|
+
key: y.key,
|
|
3302
|
+
targetLanguage: y.targetLanguage,
|
|
3303
|
+
isMounted: I.current,
|
|
3304
|
+
error: (b == null ? void 0 : b.message) || String(b)
|
|
3305
|
+
}), Oe("external_translation_unexpected_rejection", {
|
|
3306
|
+
key: y.key,
|
|
3307
|
+
language: y.targetLanguage,
|
|
3308
|
+
error: b,
|
|
3309
|
+
isMounted: I.current
|
|
3310
|
+
}), q(y.targetLanguage, y.key, {
|
|
2661
3311
|
status: "error",
|
|
2662
|
-
value:
|
|
2663
|
-
error:
|
|
2664
|
-
retryAt: Date.now() +
|
|
3312
|
+
value: y.displayValue,
|
|
3313
|
+
error: b,
|
|
3314
|
+
retryAt: Date.now() + Mt
|
|
2665
3315
|
});
|
|
3316
|
+
}).finally(() => {
|
|
3317
|
+
G.current.delete(
|
|
3318
|
+
st(y.key, y.targetLanguage)
|
|
3319
|
+
);
|
|
2666
3320
|
}));
|
|
2667
3321
|
},
|
|
2668
|
-
[
|
|
2669
|
-
),
|
|
2670
|
-
const
|
|
2671
|
-
return
|
|
2672
|
-
|
|
2673
|
-
|
|
3322
|
+
[p, q, E]
|
|
3323
|
+
), re = ee(() => {
|
|
3324
|
+
const y = {};
|
|
3325
|
+
return C.forEach((T, k) => {
|
|
3326
|
+
T.forEach((b, A) => {
|
|
3327
|
+
y[st(A, k)] = b.status === "pending";
|
|
2674
3328
|
});
|
|
2675
|
-
}),
|
|
2676
|
-
recordSize: Object.keys(
|
|
2677
|
-
record: { ...
|
|
2678
|
-
}),
|
|
2679
|
-
}, [
|
|
2680
|
-
() => Object.values(
|
|
2681
|
-
[
|
|
2682
|
-
),
|
|
2683
|
-
(
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
options: b
|
|
3329
|
+
}), p.debug && $("isTranslatingRecord_recalculated", {
|
|
3330
|
+
recordSize: Object.keys(y).length,
|
|
3331
|
+
record: { ...y }
|
|
3332
|
+
}), y;
|
|
3333
|
+
}, [C, p]), V = ee(
|
|
3334
|
+
() => Object.values(re).some(Boolean),
|
|
3335
|
+
[re]
|
|
3336
|
+
), ae = ke(
|
|
3337
|
+
(y, T = {}) => {
|
|
3338
|
+
const k = C.get(O), b = k == null ? void 0 : k.get(y);
|
|
3339
|
+
if (p.debug && T.preferExternal && $("t_called", {
|
|
3340
|
+
text: y,
|
|
3341
|
+
language: O,
|
|
3342
|
+
hasStateForLanguage: !!k,
|
|
3343
|
+
existingStateStatus: b == null ? void 0 : b.status,
|
|
3344
|
+
existingStateValue: b == null ? void 0 : b.value,
|
|
3345
|
+
preferExternal: T.preferExternal
|
|
3346
|
+
}), (b == null ? void 0 : b.status) === "resolved" && b.value)
|
|
3347
|
+
return p.debug && $("t_returning_resolved", {
|
|
3348
|
+
text: y,
|
|
3349
|
+
value: b.value
|
|
3350
|
+
}), b.value;
|
|
3351
|
+
const A = oo(y, e), P = A == null ? void 0 : A[O], W = A ? Object.values(A).find((De) => !!De) : void 0, M = T.fallbackValue ?? (b == null ? void 0 : b.value) ?? P ?? W ?? y, Z = T.preferExternal === !0 || p.alwaysExternalKeys.has(y), Ce = E.isEnabled(), x = typeof P == "string";
|
|
3352
|
+
if (x || Oe("missing_translation", {
|
|
3353
|
+
key: y,
|
|
3354
|
+
language: O
|
|
3355
|
+
}), !(Ce && (Z || !x)))
|
|
3356
|
+
return (b == null ? void 0 : b.status) === "pending" && b.value ? b.value : P ?? M;
|
|
3357
|
+
const pe = Date.now(), Le = (b == null ? void 0 : b.status) === "error" && (!b.retryAt || b.retryAt <= pe);
|
|
3358
|
+
if (!b || Le) {
|
|
3359
|
+
const H = T.sourceLanguage ?? (A && A[n] ? n : void 0), Y = (H && (A == null ? void 0 : A[H])) ?? (A == null ? void 0 : A[n]) ?? y;
|
|
3360
|
+
ie({
|
|
3361
|
+
key: y,
|
|
3362
|
+
targetLanguage: O,
|
|
3363
|
+
originalText: Y,
|
|
3364
|
+
displayValue: (b == null ? void 0 : b.value) ?? M,
|
|
3365
|
+
sourceLanguage: H,
|
|
3366
|
+
options: T
|
|
2714
3367
|
});
|
|
2715
3368
|
}
|
|
2716
|
-
|
|
2717
|
-
return (V == null ? void 0 : V.status) === "resolved" && V.value ? V.value : (V == null ? void 0 : V.status) === "pending" ? V.value ?? P : P;
|
|
3369
|
+
return (b == null ? void 0 : b.status) === "pending" ? b.value ?? M : M;
|
|
2718
3370
|
},
|
|
2719
3371
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2720
3372
|
[
|
|
2721
3373
|
n,
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
p,
|
|
2725
|
-
se,
|
|
3374
|
+
p.alwaysExternalKeys,
|
|
3375
|
+
C,
|
|
2726
3376
|
O,
|
|
3377
|
+
ie,
|
|
3378
|
+
E,
|
|
2727
3379
|
e
|
|
2728
3380
|
]
|
|
2729
|
-
),
|
|
3381
|
+
), Ve = ee(
|
|
2730
3382
|
() => ({
|
|
2731
|
-
t:
|
|
2732
|
-
language:
|
|
2733
|
-
languages:
|
|
2734
|
-
setLanguage:
|
|
2735
|
-
isTranslating:
|
|
2736
|
-
isTranslatingAny:
|
|
2737
|
-
registerExternalKey:
|
|
2738
|
-
externalConfig:
|
|
3383
|
+
t: ae,
|
|
3384
|
+
language: O,
|
|
3385
|
+
languages: f,
|
|
3386
|
+
setLanguage: N,
|
|
3387
|
+
isTranslating: re,
|
|
3388
|
+
isTranslatingAny: V,
|
|
3389
|
+
registerExternalKey: h,
|
|
3390
|
+
externalConfig: p
|
|
2739
3391
|
}),
|
|
2740
3392
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2741
3393
|
[
|
|
2742
|
-
|
|
2743
|
-
|
|
3394
|
+
ae,
|
|
3395
|
+
O,
|
|
3396
|
+
f,
|
|
3397
|
+
N,
|
|
3398
|
+
re,
|
|
3399
|
+
V,
|
|
2744
3400
|
h,
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
X,
|
|
2748
|
-
c,
|
|
2749
|
-
d,
|
|
2750
|
-
K
|
|
3401
|
+
p,
|
|
3402
|
+
L
|
|
2751
3403
|
]
|
|
2752
3404
|
);
|
|
2753
|
-
return /* @__PURE__ */ Ht
|
|
2754
|
-
},
|
|
3405
|
+
return /* @__PURE__ */ Sn(Ht.Provider, { value: Ve, children: t });
|
|
3406
|
+
}, Do = () => Pn();
|
|
2755
3407
|
export {
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
3408
|
+
Lo as TranslatorProvider,
|
|
3409
|
+
Vs as createTranslationProvider,
|
|
3410
|
+
Do as useTranslator
|
|
2759
3411
|
};
|