vbss-translator 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -21
- package/dist/cli/index.js +1 -1
- package/dist/vbss-translator.js +1704 -2151
- package/dist/vbss-translator.umd.cjs +9 -35
- package/package.json +111 -90
package/dist/vbss-translator.js
CHANGED
|
@@ -1,668 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @license React
|
|
8
|
-
* react-jsx-runtime.production.min.js
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the MIT license found in the
|
|
13
|
-
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
var Nt;
|
|
16
|
-
function on() {
|
|
17
|
-
if (Nt) return Ae;
|
|
18
|
-
Nt = 1;
|
|
19
|
-
var t = sr, e = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
20
|
-
function a(l, g, f) {
|
|
21
|
-
var u, h = {}, x = null, F = null;
|
|
22
|
-
f !== void 0 && (x = "" + f), g.key !== void 0 && (x = "" + g.key), g.ref !== void 0 && (F = g.ref);
|
|
23
|
-
for (u in g) n.call(g, u) && !i.hasOwnProperty(u) && (h[u] = g[u]);
|
|
24
|
-
if (l && l.defaultProps) for (u in g = l.defaultProps, g) h[u] === void 0 && (h[u] = g[u]);
|
|
25
|
-
return { $$typeof: e, type: l, key: x, ref: F, props: h, _owner: s.current };
|
|
26
|
-
}
|
|
27
|
-
return Ae.Fragment = r, Ae.jsx = a, Ae.jsxs = a, Ae;
|
|
28
|
-
}
|
|
29
|
-
var Ce = {};
|
|
30
|
-
/**
|
|
31
|
-
* @license React
|
|
32
|
-
* react-jsx-runtime.development.js
|
|
33
|
-
*
|
|
34
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the MIT license found in the
|
|
37
|
-
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/
|
|
39
|
-
var Ut;
|
|
40
|
-
function an() {
|
|
41
|
-
return Ut || (Ut = 1, process.env.NODE_ENV !== "production" && function() {
|
|
42
|
-
var t = sr, e = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), l = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), F = Symbol.for("react.offscreen"), d = Symbol.iterator, E = "@@iterator";
|
|
43
|
-
function b(o) {
|
|
44
|
-
if (o === null || typeof o != "object")
|
|
45
|
-
return null;
|
|
46
|
-
var p = d && o[d] || o[E];
|
|
47
|
-
return typeof p == "function" ? p : null;
|
|
48
|
-
}
|
|
49
|
-
var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
50
|
-
function A(o) {
|
|
51
|
-
{
|
|
52
|
-
for (var p = arguments.length, m = new Array(p > 1 ? p - 1 : 0), v = 1; v < p; v++)
|
|
53
|
-
m[v - 1] = arguments[v];
|
|
54
|
-
L("error", o, m);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function L(o, p, m) {
|
|
58
|
-
{
|
|
59
|
-
var v = P.ReactDebugCurrentFrame, C = v.getStackAddendum();
|
|
60
|
-
C !== "" && (p += "%s", m = m.concat([C]));
|
|
61
|
-
var k = m.map(function(O) {
|
|
62
|
-
return String(O);
|
|
63
|
-
});
|
|
64
|
-
k.unshift("Warning: " + p), Function.prototype.apply.call(console[o], console, k);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
var j = !1, V = !1, ne = !1, $ = !1, Q = !1, Z;
|
|
68
|
-
Z = Symbol.for("react.module.reference");
|
|
69
|
-
function fe(o) {
|
|
70
|
-
return !!(typeof o == "string" || typeof o == "function" || o === n || o === i || Q || o === s || o === f || o === u || $ || o === F || j || V || ne || typeof o == "object" && o !== null && (o.$$typeof === x || o.$$typeof === h || o.$$typeof === a || o.$$typeof === l || o.$$typeof === g || // This needs to include all possible module reference object
|
|
71
|
-
// types supported by any Flight configuration anywhere since
|
|
72
|
-
// we don't know which Flight build this will end up being used
|
|
73
|
-
// with.
|
|
74
|
-
o.$$typeof === Z || o.getModuleId !== void 0));
|
|
75
|
-
}
|
|
76
|
-
function le(o, p, m) {
|
|
77
|
-
var v = o.displayName;
|
|
78
|
-
if (v)
|
|
79
|
-
return v;
|
|
80
|
-
var C = p.displayName || p.name || "";
|
|
81
|
-
return C !== "" ? m + "(" + C + ")" : m;
|
|
82
|
-
}
|
|
83
|
-
function ae(o) {
|
|
84
|
-
return o.displayName || "Context";
|
|
85
|
-
}
|
|
86
|
-
function B(o) {
|
|
87
|
-
if (o == null)
|
|
88
|
-
return null;
|
|
89
|
-
if (typeof o.tag == "number" && A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
|
|
90
|
-
return o.displayName || o.name || null;
|
|
91
|
-
if (typeof o == "string")
|
|
92
|
-
return o;
|
|
93
|
-
switch (o) {
|
|
94
|
-
case n:
|
|
95
|
-
return "Fragment";
|
|
96
|
-
case r:
|
|
97
|
-
return "Portal";
|
|
98
|
-
case i:
|
|
99
|
-
return "Profiler";
|
|
100
|
-
case s:
|
|
101
|
-
return "StrictMode";
|
|
102
|
-
case f:
|
|
103
|
-
return "Suspense";
|
|
104
|
-
case u:
|
|
105
|
-
return "SuspenseList";
|
|
106
|
-
}
|
|
107
|
-
if (typeof o == "object")
|
|
108
|
-
switch (o.$$typeof) {
|
|
109
|
-
case l:
|
|
110
|
-
var p = o;
|
|
111
|
-
return ae(p) + ".Consumer";
|
|
112
|
-
case a:
|
|
113
|
-
var m = o;
|
|
114
|
-
return ae(m._context) + ".Provider";
|
|
115
|
-
case g:
|
|
116
|
-
return le(o, o.render, "ForwardRef");
|
|
117
|
-
case h:
|
|
118
|
-
var v = o.displayName || null;
|
|
119
|
-
return v !== null ? v : B(o.type) || "Memo";
|
|
120
|
-
case x: {
|
|
121
|
-
var C = o, k = C._payload, O = C._init;
|
|
122
|
-
try {
|
|
123
|
-
return B(O(k));
|
|
124
|
-
} catch {
|
|
125
|
-
return null;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
var q = Object.assign, y = 0, T, R, w, D, se, K, M;
|
|
132
|
-
function z() {
|
|
133
|
-
}
|
|
134
|
-
z.__reactDisabledLog = !0;
|
|
135
|
-
function ue() {
|
|
136
|
-
{
|
|
137
|
-
if (y === 0) {
|
|
138
|
-
T = console.log, R = console.info, w = console.warn, D = console.error, se = console.group, K = console.groupCollapsed, M = console.groupEnd;
|
|
139
|
-
var o = {
|
|
140
|
-
configurable: !0,
|
|
141
|
-
enumerable: !0,
|
|
142
|
-
value: z,
|
|
143
|
-
writable: !0
|
|
144
|
-
};
|
|
145
|
-
Object.defineProperties(console, {
|
|
146
|
-
info: o,
|
|
147
|
-
log: o,
|
|
148
|
-
warn: o,
|
|
149
|
-
error: o,
|
|
150
|
-
group: o,
|
|
151
|
-
groupCollapsed: o,
|
|
152
|
-
groupEnd: o
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
y++;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function de() {
|
|
159
|
-
{
|
|
160
|
-
if (y--, y === 0) {
|
|
161
|
-
var o = {
|
|
162
|
-
configurable: !0,
|
|
163
|
-
enumerable: !0,
|
|
164
|
-
writable: !0
|
|
165
|
-
};
|
|
166
|
-
Object.defineProperties(console, {
|
|
167
|
-
log: q({}, o, {
|
|
168
|
-
value: T
|
|
169
|
-
}),
|
|
170
|
-
info: q({}, o, {
|
|
171
|
-
value: R
|
|
172
|
-
}),
|
|
173
|
-
warn: q({}, o, {
|
|
174
|
-
value: w
|
|
175
|
-
}),
|
|
176
|
-
error: q({}, o, {
|
|
177
|
-
value: D
|
|
178
|
-
}),
|
|
179
|
-
group: q({}, o, {
|
|
180
|
-
value: se
|
|
181
|
-
}),
|
|
182
|
-
groupCollapsed: q({}, o, {
|
|
183
|
-
value: K
|
|
184
|
-
}),
|
|
185
|
-
groupEnd: q({}, o, {
|
|
186
|
-
value: M
|
|
187
|
-
})
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
y < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
var Ne = P.ReactCurrentDispatcher, xe;
|
|
194
|
-
function be(o, p, m) {
|
|
195
|
-
{
|
|
196
|
-
if (xe === void 0)
|
|
197
|
-
try {
|
|
198
|
-
throw Error();
|
|
199
|
-
} catch (C) {
|
|
200
|
-
var v = C.stack.trim().match(/\n( *(at )?)/);
|
|
201
|
-
xe = v && v[1] || "";
|
|
202
|
-
}
|
|
203
|
-
return `
|
|
204
|
-
` + xe + o;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
var ee = !1, he;
|
|
208
|
-
{
|
|
209
|
-
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
210
|
-
he = new Ue();
|
|
211
|
-
}
|
|
212
|
-
function Ee(o, p) {
|
|
213
|
-
if (!o || ee)
|
|
214
|
-
return "";
|
|
215
|
-
{
|
|
216
|
-
var m = he.get(o);
|
|
217
|
-
if (m !== void 0)
|
|
218
|
-
return m;
|
|
219
|
-
}
|
|
220
|
-
var v;
|
|
221
|
-
ee = !0;
|
|
222
|
-
var C = Error.prepareStackTrace;
|
|
223
|
-
Error.prepareStackTrace = void 0;
|
|
224
|
-
var k;
|
|
225
|
-
k = Ne.current, Ne.current = null, ue();
|
|
226
|
-
try {
|
|
227
|
-
if (p) {
|
|
228
|
-
var O = function() {
|
|
229
|
-
throw Error();
|
|
230
|
-
};
|
|
231
|
-
if (Object.defineProperty(O.prototype, "props", {
|
|
232
|
-
set: function() {
|
|
233
|
-
throw Error();
|
|
234
|
-
}
|
|
235
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
236
|
-
try {
|
|
237
|
-
Reflect.construct(O, []);
|
|
238
|
-
} catch (J) {
|
|
239
|
-
v = J;
|
|
240
|
-
}
|
|
241
|
-
Reflect.construct(o, [], O);
|
|
242
|
-
} else {
|
|
243
|
-
try {
|
|
244
|
-
O.call();
|
|
245
|
-
} catch (J) {
|
|
246
|
-
v = J;
|
|
247
|
-
}
|
|
248
|
-
o.call(O.prototype);
|
|
249
|
-
}
|
|
250
|
-
} else {
|
|
251
|
-
try {
|
|
252
|
-
throw Error();
|
|
253
|
-
} catch (J) {
|
|
254
|
-
v = J;
|
|
255
|
-
}
|
|
256
|
-
o();
|
|
257
|
-
}
|
|
258
|
-
} catch (J) {
|
|
259
|
-
if (J && v && typeof J.stack == "string") {
|
|
260
|
-
for (var S = J.stack.split(`
|
|
261
|
-
`), W = v.stack.split(`
|
|
262
|
-
`), N = S.length - 1, I = W.length - 1; N >= 1 && I >= 0 && S[N] !== W[I]; )
|
|
263
|
-
I--;
|
|
264
|
-
for (; N >= 1 && I >= 0; N--, I--)
|
|
265
|
-
if (S[N] !== W[I]) {
|
|
266
|
-
if (N !== 1 || I !== 1)
|
|
267
|
-
do
|
|
268
|
-
if (N--, I--, I < 0 || S[N] !== W[I]) {
|
|
269
|
-
var re = `
|
|
270
|
-
` + S[N].replace(" at new ", " at ");
|
|
271
|
-
return o.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", o.displayName)), typeof o == "function" && he.set(o, re), re;
|
|
272
|
-
}
|
|
273
|
-
while (N >= 1 && I >= 0);
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
} finally {
|
|
278
|
-
ee = !1, Ne.current = k, de(), Error.prepareStackTrace = C;
|
|
279
|
-
}
|
|
280
|
-
var ve = o ? o.displayName || o.name : "", pe = ve ? be(ve) : "";
|
|
281
|
-
return typeof o == "function" && he.set(o, pe), pe;
|
|
282
|
-
}
|
|
283
|
-
function tt(o, p, m) {
|
|
284
|
-
return Ee(o, !1);
|
|
285
|
-
}
|
|
286
|
-
function Pr(o) {
|
|
287
|
-
var p = o.prototype;
|
|
288
|
-
return !!(p && p.isReactComponent);
|
|
289
|
-
}
|
|
290
|
-
function Me(o, p, m) {
|
|
291
|
-
if (o == null)
|
|
292
|
-
return "";
|
|
293
|
-
if (typeof o == "function")
|
|
294
|
-
return Ee(o, Pr(o));
|
|
295
|
-
if (typeof o == "string")
|
|
296
|
-
return be(o);
|
|
297
|
-
switch (o) {
|
|
298
|
-
case f:
|
|
299
|
-
return be("Suspense");
|
|
300
|
-
case u:
|
|
301
|
-
return be("SuspenseList");
|
|
302
|
-
}
|
|
303
|
-
if (typeof o == "object")
|
|
304
|
-
switch (o.$$typeof) {
|
|
305
|
-
case g:
|
|
306
|
-
return tt(o.render);
|
|
307
|
-
case h:
|
|
308
|
-
return Me(o.type, p, m);
|
|
309
|
-
case x: {
|
|
310
|
-
var v = o, C = v._payload, k = v._init;
|
|
311
|
-
try {
|
|
312
|
-
return Me(k(C), p, m);
|
|
313
|
-
} catch {
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
return "";
|
|
318
|
-
}
|
|
319
|
-
var Se = Object.prototype.hasOwnProperty, Tt = {}, _t = P.ReactDebugCurrentFrame;
|
|
320
|
-
function Ie(o) {
|
|
321
|
-
if (o) {
|
|
322
|
-
var p = o._owner, m = Me(o.type, o._source, p ? p.type : null);
|
|
323
|
-
_t.setExtraStackFrame(m);
|
|
324
|
-
} else
|
|
325
|
-
_t.setExtraStackFrame(null);
|
|
326
|
-
}
|
|
327
|
-
function kr(o, p, m, v, C) {
|
|
328
|
-
{
|
|
329
|
-
var k = Function.call.bind(Se);
|
|
330
|
-
for (var O in o)
|
|
331
|
-
if (k(o, O)) {
|
|
332
|
-
var S = void 0;
|
|
333
|
-
try {
|
|
334
|
-
if (typeof o[O] != "function") {
|
|
335
|
-
var W = Error((v || "React class") + ": " + m + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
336
|
-
throw W.name = "Invariant Violation", W;
|
|
337
|
-
}
|
|
338
|
-
S = o[O](p, O, v, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
339
|
-
} catch (N) {
|
|
340
|
-
S = N;
|
|
341
|
-
}
|
|
342
|
-
S && !(S instanceof Error) && (Ie(C), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", m, O, typeof S), Ie(null)), S instanceof Error && !(S.message in Tt) && (Tt[S.message] = !0, Ie(C), A("Failed %s type: %s", m, S.message), Ie(null));
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
var Lr = Array.isArray;
|
|
347
|
-
function rt(o) {
|
|
348
|
-
return Lr(o);
|
|
349
|
-
}
|
|
350
|
-
function Fr(o) {
|
|
351
|
-
{
|
|
352
|
-
var p = typeof Symbol == "function" && Symbol.toStringTag, m = p && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
353
|
-
return m;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
function jr(o) {
|
|
357
|
-
try {
|
|
358
|
-
return xt(o), !1;
|
|
359
|
-
} catch {
|
|
360
|
-
return !0;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
function xt(o) {
|
|
364
|
-
return "" + o;
|
|
365
|
-
}
|
|
366
|
-
function St(o) {
|
|
367
|
-
if (jr(o))
|
|
368
|
-
return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Fr(o)), xt(o);
|
|
369
|
-
}
|
|
370
|
-
var Oe = P.ReactCurrentOwner, Dr = {
|
|
371
|
-
key: !0,
|
|
372
|
-
ref: !0,
|
|
373
|
-
__self: !0,
|
|
374
|
-
__source: !0
|
|
375
|
-
}, Ot, At, nt;
|
|
376
|
-
nt = {};
|
|
377
|
-
function Nr(o) {
|
|
378
|
-
if (Se.call(o, "ref")) {
|
|
379
|
-
var p = Object.getOwnPropertyDescriptor(o, "ref").get;
|
|
380
|
-
if (p && p.isReactWarning)
|
|
381
|
-
return !1;
|
|
382
|
-
}
|
|
383
|
-
return o.ref !== void 0;
|
|
384
|
-
}
|
|
385
|
-
function Ur(o) {
|
|
386
|
-
if (Se.call(o, "key")) {
|
|
387
|
-
var p = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
388
|
-
if (p && p.isReactWarning)
|
|
389
|
-
return !1;
|
|
390
|
-
}
|
|
391
|
-
return o.key !== void 0;
|
|
392
|
-
}
|
|
393
|
-
function Mr(o, p) {
|
|
394
|
-
if (typeof o.ref == "string" && Oe.current && p && Oe.current.stateNode !== p) {
|
|
395
|
-
var m = B(Oe.current.type);
|
|
396
|
-
nt[m] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', B(Oe.current.type), o.ref), nt[m] = !0);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
function Ir(o, p) {
|
|
400
|
-
{
|
|
401
|
-
var m = function() {
|
|
402
|
-
Ot || (Ot = !0, A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
|
|
403
|
-
};
|
|
404
|
-
m.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
405
|
-
get: m,
|
|
406
|
-
configurable: !0
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
function Br(o, p) {
|
|
411
|
-
{
|
|
412
|
-
var m = function() {
|
|
413
|
-
At || (At = !0, A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
|
|
414
|
-
};
|
|
415
|
-
m.isReactWarning = !0, Object.defineProperty(o, "ref", {
|
|
416
|
-
get: m,
|
|
417
|
-
configurable: !0
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
var $r = function(o, p, m, v, C, k, O) {
|
|
422
|
-
var S = {
|
|
423
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
424
|
-
$$typeof: e,
|
|
425
|
-
// Built-in properties that belong on the element
|
|
426
|
-
type: o,
|
|
427
|
-
key: p,
|
|
428
|
-
ref: m,
|
|
429
|
-
props: O,
|
|
430
|
-
// Record the component responsible for creating this element.
|
|
431
|
-
_owner: k
|
|
432
|
-
};
|
|
433
|
-
return S._store = {}, Object.defineProperty(S._store, "validated", {
|
|
434
|
-
configurable: !1,
|
|
435
|
-
enumerable: !1,
|
|
436
|
-
writable: !0,
|
|
437
|
-
value: !1
|
|
438
|
-
}), Object.defineProperty(S, "_self", {
|
|
439
|
-
configurable: !1,
|
|
440
|
-
enumerable: !1,
|
|
441
|
-
writable: !1,
|
|
442
|
-
value: v
|
|
443
|
-
}), Object.defineProperty(S, "_source", {
|
|
444
|
-
configurable: !1,
|
|
445
|
-
enumerable: !1,
|
|
446
|
-
writable: !1,
|
|
447
|
-
value: C
|
|
448
|
-
}), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
|
|
449
|
-
};
|
|
450
|
-
function qr(o, p, m, v, C) {
|
|
451
|
-
{
|
|
452
|
-
var k, O = {}, S = null, W = null;
|
|
453
|
-
m !== void 0 && (St(m), S = "" + m), Ur(p) && (St(p.key), S = "" + p.key), Nr(p) && (W = p.ref, Mr(p, C));
|
|
454
|
-
for (k in p)
|
|
455
|
-
Se.call(p, k) && !Dr.hasOwnProperty(k) && (O[k] = p[k]);
|
|
456
|
-
if (o && o.defaultProps) {
|
|
457
|
-
var N = o.defaultProps;
|
|
458
|
-
for (k in N)
|
|
459
|
-
O[k] === void 0 && (O[k] = N[k]);
|
|
460
|
-
}
|
|
461
|
-
if (S || W) {
|
|
462
|
-
var I = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
|
|
463
|
-
S && Ir(O, I), W && Br(O, I);
|
|
464
|
-
}
|
|
465
|
-
return $r(o, S, W, C, v, Oe.current, O);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
var st = P.ReactCurrentOwner, Ct = P.ReactDebugCurrentFrame;
|
|
469
|
-
function we(o) {
|
|
470
|
-
if (o) {
|
|
471
|
-
var p = o._owner, m = Me(o.type, o._source, p ? p.type : null);
|
|
472
|
-
Ct.setExtraStackFrame(m);
|
|
473
|
-
} else
|
|
474
|
-
Ct.setExtraStackFrame(null);
|
|
475
|
-
}
|
|
476
|
-
var ot;
|
|
477
|
-
ot = !1;
|
|
478
|
-
function at(o) {
|
|
479
|
-
return typeof o == "object" && o !== null && o.$$typeof === e;
|
|
480
|
-
}
|
|
481
|
-
function Pt() {
|
|
482
|
-
{
|
|
483
|
-
if (st.current) {
|
|
484
|
-
var o = B(st.current.type);
|
|
485
|
-
if (o)
|
|
486
|
-
return `
|
|
487
|
-
|
|
488
|
-
Check the render method of \`` + o + "`.";
|
|
489
|
-
}
|
|
490
|
-
return "";
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
function Kr(o) {
|
|
494
|
-
return "";
|
|
495
|
-
}
|
|
496
|
-
var kt = {};
|
|
497
|
-
function Hr(o) {
|
|
498
|
-
{
|
|
499
|
-
var p = Pt();
|
|
500
|
-
if (!p) {
|
|
501
|
-
var m = typeof o == "string" ? o : o.displayName || o.name;
|
|
502
|
-
m && (p = `
|
|
503
|
-
|
|
504
|
-
Check the top-level render call using <` + m + ">.");
|
|
505
|
-
}
|
|
506
|
-
return p;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
function Lt(o, p) {
|
|
510
|
-
{
|
|
511
|
-
if (!o._store || o._store.validated || o.key != null)
|
|
512
|
-
return;
|
|
513
|
-
o._store.validated = !0;
|
|
514
|
-
var m = Hr(p);
|
|
515
|
-
if (kt[m])
|
|
516
|
-
return;
|
|
517
|
-
kt[m] = !0;
|
|
518
|
-
var v = "";
|
|
519
|
-
o && o._owner && o._owner !== st.current && (v = " It was passed a child from " + B(o._owner.type) + "."), we(o), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, v), we(null);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
function Ft(o, p) {
|
|
523
|
-
{
|
|
524
|
-
if (typeof o != "object")
|
|
525
|
-
return;
|
|
526
|
-
if (rt(o))
|
|
527
|
-
for (var m = 0; m < o.length; m++) {
|
|
528
|
-
var v = o[m];
|
|
529
|
-
at(v) && Lt(v, p);
|
|
530
|
-
}
|
|
531
|
-
else if (at(o))
|
|
532
|
-
o._store && (o._store.validated = !0);
|
|
533
|
-
else if (o) {
|
|
534
|
-
var C = b(o);
|
|
535
|
-
if (typeof C == "function" && C !== o.entries)
|
|
536
|
-
for (var k = C.call(o), O; !(O = k.next()).done; )
|
|
537
|
-
at(O.value) && Lt(O.value, p);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
function Vr(o) {
|
|
542
|
-
{
|
|
543
|
-
var p = o.type;
|
|
544
|
-
if (p == null || typeof p == "string")
|
|
545
|
-
return;
|
|
546
|
-
var m;
|
|
547
|
-
if (typeof p == "function")
|
|
548
|
-
m = p.propTypes;
|
|
549
|
-
else if (typeof p == "object" && (p.$$typeof === g || // Note: Memo only checks outer props here.
|
|
550
|
-
// Inner props are checked in the reconciler.
|
|
551
|
-
p.$$typeof === h))
|
|
552
|
-
m = p.propTypes;
|
|
553
|
-
else
|
|
554
|
-
return;
|
|
555
|
-
if (m) {
|
|
556
|
-
var v = B(p);
|
|
557
|
-
kr(m, o.props, "prop", v, o);
|
|
558
|
-
} else if (p.PropTypes !== void 0 && !ot) {
|
|
559
|
-
ot = !0;
|
|
560
|
-
var C = B(p);
|
|
561
|
-
A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
|
|
562
|
-
}
|
|
563
|
-
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
function Wr(o) {
|
|
567
|
-
{
|
|
568
|
-
for (var p = Object.keys(o.props), m = 0; m < p.length; m++) {
|
|
569
|
-
var v = p[m];
|
|
570
|
-
if (v !== "children" && v !== "key") {
|
|
571
|
-
we(o), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), we(null);
|
|
572
|
-
break;
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
o.ref !== null && (we(o), A("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
var jt = {};
|
|
579
|
-
function Dt(o, p, m, v, C, k) {
|
|
580
|
-
{
|
|
581
|
-
var O = fe(o);
|
|
582
|
-
if (!O) {
|
|
583
|
-
var S = "";
|
|
584
|
-
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (S += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
585
|
-
var W = Kr();
|
|
586
|
-
W ? S += W : S += Pt();
|
|
587
|
-
var N;
|
|
588
|
-
o === null ? N = "null" : rt(o) ? N = "array" : o !== void 0 && o.$$typeof === e ? (N = "<" + (B(o.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : N = typeof o, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, S);
|
|
589
|
-
}
|
|
590
|
-
var I = qr(o, p, m, C, k);
|
|
591
|
-
if (I == null)
|
|
592
|
-
return I;
|
|
593
|
-
if (O) {
|
|
594
|
-
var re = p.children;
|
|
595
|
-
if (re !== void 0)
|
|
596
|
-
if (v)
|
|
597
|
-
if (rt(re)) {
|
|
598
|
-
for (var ve = 0; ve < re.length; ve++)
|
|
599
|
-
Ft(re[ve], o);
|
|
600
|
-
Object.freeze && Object.freeze(re);
|
|
601
|
-
} else
|
|
602
|
-
A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
603
|
-
else
|
|
604
|
-
Ft(re, o);
|
|
605
|
-
}
|
|
606
|
-
if (Se.call(p, "key")) {
|
|
607
|
-
var pe = B(o), J = Object.keys(p).filter(function(Qr) {
|
|
608
|
-
return Qr !== "key";
|
|
609
|
-
}), it = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
610
|
-
if (!jt[pe + it]) {
|
|
611
|
-
var Xr = J.length > 0 ? "{" + J.join(": ..., ") + ": ...}" : "{}";
|
|
612
|
-
A(`A props object containing a "key" prop is being spread into JSX:
|
|
613
|
-
let props = %s;
|
|
614
|
-
<%s {...props} />
|
|
615
|
-
React keys must be passed directly to JSX without using spread:
|
|
616
|
-
let props = %s;
|
|
617
|
-
<%s key={someKey} {...props} />`, it, pe, Xr, pe), jt[pe + it] = !0;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
return o === n ? Wr(I) : Vr(I), I;
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
function zr(o, p, m) {
|
|
624
|
-
return Dt(o, p, m, !0);
|
|
625
|
-
}
|
|
626
|
-
function Jr(o, p, m) {
|
|
627
|
-
return Dt(o, p, m, !1);
|
|
628
|
-
}
|
|
629
|
-
var Yr = Jr, Gr = zr;
|
|
630
|
-
Ce.Fragment = n, Ce.jsx = Yr, Ce.jsxs = Gr;
|
|
631
|
-
}()), Ce;
|
|
632
|
-
}
|
|
633
|
-
var Mt;
|
|
634
|
-
function ln() {
|
|
635
|
-
return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? qe.exports = on() : qe.exports = an()), qe.exports;
|
|
636
|
-
}
|
|
637
|
-
var cn = ln();
|
|
638
|
-
const or = tn(
|
|
1
|
+
var Mt = Object.defineProperty;
|
|
2
|
+
var It = (t, e, n) => e in t ? Mt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var B = (t, e, n) => It(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { jsx as Ht } from "react/jsx-runtime";
|
|
5
|
+
import { createContext as qt, useContext as Kt, useMemo as z, useState as he, useEffect as Pe, useCallback as pe, useRef as $t, startTransition as Vt } from "react";
|
|
6
|
+
const ft = qt(
|
|
639
7
|
null
|
|
640
|
-
),
|
|
641
|
-
const t =
|
|
8
|
+
), zt = () => {
|
|
9
|
+
const t = Kt(ft);
|
|
642
10
|
if (!t)
|
|
643
11
|
throw new Error(
|
|
644
12
|
"useTranslatorContext must be used within a TranslatorProvider"
|
|
645
13
|
);
|
|
646
14
|
return t;
|
|
647
15
|
};
|
|
648
|
-
class
|
|
649
|
-
constructor(
|
|
650
|
-
super(
|
|
651
|
-
|
|
16
|
+
class ze extends Error {
|
|
17
|
+
constructor(n) {
|
|
18
|
+
super(n);
|
|
19
|
+
B(this, "code", "timeout");
|
|
652
20
|
this.name = "ExternalTranslationTimeoutError";
|
|
653
21
|
}
|
|
654
22
|
}
|
|
655
|
-
const
|
|
656
|
-
const e = Object.entries(t).sort(([
|
|
23
|
+
const Jt = "auto", ge = (t) => typeof t == "number" && Number.isFinite(t) && t > 0, Wt = (t) => {
|
|
24
|
+
const e = Object.entries(t).sort(([n], [r]) => n === r ? 0 : n < r ? -1 : 1);
|
|
657
25
|
return Object.fromEntries(e);
|
|
658
26
|
};
|
|
659
|
-
class
|
|
27
|
+
class Gt {
|
|
660
28
|
constructor(e) {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
29
|
+
B(this, "provider");
|
|
30
|
+
B(this, "config");
|
|
31
|
+
B(this, "cache");
|
|
32
|
+
B(this, "logger");
|
|
33
|
+
B(this, "inFlight", /* @__PURE__ */ new Map());
|
|
666
34
|
this.provider = e.provider, this.config = e.config, this.cache = e.cache, this.logger = e.logger;
|
|
667
35
|
}
|
|
668
36
|
isEnabled() {
|
|
@@ -676,46 +44,46 @@ class hn {
|
|
|
676
44
|
});
|
|
677
45
|
return;
|
|
678
46
|
}
|
|
679
|
-
const
|
|
680
|
-
if (!await this.shouldTranslate(
|
|
47
|
+
const n = this.normalizeRequest(e);
|
|
48
|
+
if (!await this.shouldTranslate(n.externalRequest)) {
|
|
681
49
|
this.debug("external_translation_skipped", {
|
|
682
|
-
key:
|
|
683
|
-
targetLanguage:
|
|
50
|
+
key: n.externalRequest.key,
|
|
51
|
+
targetLanguage: n.externalRequest.targetLanguage
|
|
684
52
|
});
|
|
685
53
|
return;
|
|
686
54
|
}
|
|
687
|
-
const
|
|
688
|
-
if (
|
|
55
|
+
const r = this.readFromCache(n.cacheKey);
|
|
56
|
+
if (r)
|
|
689
57
|
return this.debug("external_translation_cache_hit", {
|
|
690
|
-
key:
|
|
691
|
-
cacheKey:
|
|
692
|
-
}),
|
|
693
|
-
const s = this.inFlight.get(
|
|
58
|
+
key: n.externalRequest.key,
|
|
59
|
+
cacheKey: n.cacheKey
|
|
60
|
+
}), r;
|
|
61
|
+
const s = this.inFlight.get(n.cacheKey);
|
|
694
62
|
if (s)
|
|
695
63
|
return this.debug("external_translation_deduped", {
|
|
696
|
-
key:
|
|
697
|
-
cacheKey:
|
|
64
|
+
key: n.externalRequest.key,
|
|
65
|
+
cacheKey: n.cacheKey
|
|
698
66
|
}), s;
|
|
699
|
-
const
|
|
700
|
-
return this.inFlight.set(
|
|
67
|
+
const o = this.executeTranslation(n);
|
|
68
|
+
return this.inFlight.set(n.cacheKey, o), o;
|
|
701
69
|
}
|
|
702
70
|
normalizeRequest(e) {
|
|
703
|
-
const
|
|
71
|
+
const n = e.sourceLanguage ?? Jt, r = {
|
|
704
72
|
text: e.text,
|
|
705
|
-
sourceLanguage:
|
|
73
|
+
sourceLanguage: n,
|
|
706
74
|
targetLanguage: e.targetLanguage,
|
|
707
75
|
glossary: e.glossary
|
|
708
|
-
}, s = this.createCacheKey(
|
|
76
|
+
}, s = this.createCacheKey(r), o = ge(e.timeoutMs) ? e.timeoutMs : this.config.timeoutMs;
|
|
709
77
|
return {
|
|
710
78
|
externalRequest: {
|
|
711
79
|
key: e.key,
|
|
712
80
|
text: e.text,
|
|
713
81
|
targetLanguage: e.targetLanguage,
|
|
714
|
-
sourceLanguage:
|
|
82
|
+
sourceLanguage: n
|
|
715
83
|
},
|
|
716
|
-
translateRequest:
|
|
84
|
+
translateRequest: r,
|
|
717
85
|
cacheKey: s,
|
|
718
|
-
timeoutMs:
|
|
86
|
+
timeoutMs: o,
|
|
719
87
|
signal: e.signal
|
|
720
88
|
};
|
|
721
89
|
}
|
|
@@ -724,11 +92,11 @@ class hn {
|
|
|
724
92
|
return !0;
|
|
725
93
|
try {
|
|
726
94
|
return this.config.shouldTranslate(e);
|
|
727
|
-
} catch (
|
|
95
|
+
} catch (n) {
|
|
728
96
|
return this.warn("external_translation_should_translate_error", {
|
|
729
97
|
key: e.key,
|
|
730
98
|
language: e.targetLanguage,
|
|
731
|
-
error:
|
|
99
|
+
error: n
|
|
732
100
|
}), !0;
|
|
733
101
|
}
|
|
734
102
|
}
|
|
@@ -745,92 +113,92 @@ class hn {
|
|
|
745
113
|
key: e.externalRequest.key,
|
|
746
114
|
cacheKey: e.cacheKey
|
|
747
115
|
});
|
|
748
|
-
const
|
|
116
|
+
const n = await this.translateWithTimeout(
|
|
749
117
|
e.translateRequest,
|
|
750
118
|
e.timeoutMs,
|
|
751
119
|
e.signal
|
|
752
120
|
);
|
|
753
|
-
return this.writeToCache(e.cacheKey,
|
|
121
|
+
return this.writeToCache(e.cacheKey, n), this.notifyTranslationComplete(n), this.debug("external_translation_succeeded", {
|
|
754
122
|
key: e.externalRequest.key,
|
|
755
123
|
cacheKey: e.cacheKey
|
|
756
|
-
}),
|
|
757
|
-
} catch (
|
|
758
|
-
const
|
|
759
|
-
this.handleTranslationError(e,
|
|
124
|
+
}), n;
|
|
125
|
+
} catch (n) {
|
|
126
|
+
const r = this.normalizeError(n);
|
|
127
|
+
this.handleTranslationError(e, r);
|
|
760
128
|
return;
|
|
761
129
|
} finally {
|
|
762
130
|
this.inFlight.delete(e.cacheKey);
|
|
763
131
|
}
|
|
764
132
|
}
|
|
765
133
|
async invokeExternalTranslationHook(e) {
|
|
766
|
-
const
|
|
767
|
-
if (!
|
|
134
|
+
const n = this.config.onExternalTranslation;
|
|
135
|
+
if (!n)
|
|
768
136
|
return !0;
|
|
769
137
|
try {
|
|
770
|
-
const
|
|
771
|
-
return typeof
|
|
772
|
-
} catch (
|
|
138
|
+
const r = await n(e);
|
|
139
|
+
return typeof r == "boolean" ? r : !0;
|
|
140
|
+
} catch (r) {
|
|
773
141
|
return this.warn("external_translation_hook_error", {
|
|
774
142
|
key: e.key,
|
|
775
143
|
language: e.targetLanguage,
|
|
776
|
-
error:
|
|
144
|
+
error: r
|
|
777
145
|
}), !0;
|
|
778
146
|
}
|
|
779
147
|
}
|
|
780
|
-
async translateWithTimeout(e,
|
|
148
|
+
async translateWithTimeout(e, n, r) {
|
|
781
149
|
if (!(typeof AbortController == "function"))
|
|
782
150
|
return this.provider.translate(e, {
|
|
783
|
-
timeoutMs:
|
|
784
|
-
signal:
|
|
151
|
+
timeoutMs: ge(n) ? n : void 0,
|
|
152
|
+
signal: r
|
|
785
153
|
});
|
|
786
|
-
const
|
|
787
|
-
let
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
},
|
|
791
|
-
const
|
|
792
|
-
|
|
793
|
-
},
|
|
154
|
+
const o = new AbortController();
|
|
155
|
+
let i = !1, l;
|
|
156
|
+
r && (r.aborted ? o.abort() : (l = () => {
|
|
157
|
+
o.abort();
|
|
158
|
+
}, r.addEventListener("abort", l, { once: !0 })));
|
|
159
|
+
const f = ge(n) && n ? setTimeout(() => {
|
|
160
|
+
i = !0, o.abort();
|
|
161
|
+
}, n) : void 0;
|
|
794
162
|
try {
|
|
795
163
|
return await this.provider.translate(e, {
|
|
796
|
-
timeoutMs:
|
|
797
|
-
signal:
|
|
164
|
+
timeoutMs: ge(n) ? n : void 0,
|
|
165
|
+
signal: o.signal
|
|
798
166
|
});
|
|
799
|
-
} catch (
|
|
800
|
-
throw
|
|
801
|
-
`External translation timed out after ${
|
|
802
|
-
) : (
|
|
167
|
+
} catch (u) {
|
|
168
|
+
throw i ? new ze(
|
|
169
|
+
`External translation timed out after ${n}ms`
|
|
170
|
+
) : (o.signal.aborted && !i, u);
|
|
803
171
|
} finally {
|
|
804
|
-
|
|
172
|
+
f && clearTimeout(f), l && r && r.removeEventListener("abort", l);
|
|
805
173
|
}
|
|
806
174
|
}
|
|
807
175
|
readFromCache(e) {
|
|
808
|
-
var r;
|
|
809
|
-
return (r = this.cache) == null ? void 0 : r.get(e);
|
|
810
|
-
}
|
|
811
|
-
writeToCache(e, r) {
|
|
812
176
|
var n;
|
|
813
|
-
(n = this.cache) == null
|
|
177
|
+
return (n = this.cache) == null ? void 0 : n.get(e);
|
|
814
178
|
}
|
|
815
|
-
|
|
816
|
-
|
|
179
|
+
writeToCache(e, n) {
|
|
180
|
+
var r;
|
|
181
|
+
(r = this.cache) == null || r.set(e, n);
|
|
182
|
+
}
|
|
183
|
+
handleTranslationError(e, n) {
|
|
184
|
+
const r = {
|
|
817
185
|
key: e.externalRequest.key,
|
|
818
186
|
language: e.externalRequest.targetLanguage,
|
|
819
187
|
originalText: e.externalRequest.text,
|
|
820
|
-
error:
|
|
188
|
+
error: n
|
|
821
189
|
};
|
|
822
|
-
this.notifyTranslationError(
|
|
190
|
+
this.notifyTranslationError(r), this.warn("external_fallback_failed", {
|
|
823
191
|
provider: this.provider.type,
|
|
824
|
-
key:
|
|
825
|
-
language:
|
|
826
|
-
errorCode:
|
|
827
|
-
retryable:
|
|
828
|
-
message:
|
|
829
|
-
details:
|
|
192
|
+
key: r.key,
|
|
193
|
+
language: r.language,
|
|
194
|
+
errorCode: n.code,
|
|
195
|
+
retryable: n.retryable,
|
|
196
|
+
message: n.message,
|
|
197
|
+
details: n.details
|
|
830
198
|
});
|
|
831
199
|
}
|
|
832
200
|
normalizeError(e) {
|
|
833
|
-
return this.provider.normalizeError ? this.provider.normalizeError(e) : e instanceof
|
|
201
|
+
return this.provider.normalizeError ? this.provider.normalizeError(e) : e instanceof ze ? {
|
|
834
202
|
code: "timeout",
|
|
835
203
|
message: e.message,
|
|
836
204
|
retryable: !0,
|
|
@@ -854,74 +222,74 @@ class hn {
|
|
|
854
222
|
this.hashText(e.text, e.glossary)
|
|
855
223
|
].join("|");
|
|
856
224
|
}
|
|
857
|
-
hashText(e,
|
|
858
|
-
let
|
|
859
|
-
const s =
|
|
860
|
-
for (let
|
|
861
|
-
|
|
862
|
-
return (
|
|
225
|
+
hashText(e, n) {
|
|
226
|
+
let r = 2166136261;
|
|
227
|
+
const s = n && Object.keys(n).length > 0 ? `${e}|${JSON.stringify(Wt(n))}` : e;
|
|
228
|
+
for (let o = 0; o < s.length; o += 1)
|
|
229
|
+
r ^= s.charCodeAt(o), r += (r << 1) + (r << 4) + (r << 7) + (r << 8) + (r << 24);
|
|
230
|
+
return (r >>> 0).toString(16);
|
|
863
231
|
}
|
|
864
|
-
warn(e,
|
|
865
|
-
const
|
|
232
|
+
warn(e, n) {
|
|
233
|
+
const r = {
|
|
866
234
|
scope: "translator",
|
|
867
235
|
event: e,
|
|
868
|
-
...
|
|
236
|
+
...n
|
|
869
237
|
};
|
|
870
238
|
if (this.logger) {
|
|
871
|
-
this.logger.warn(e,
|
|
239
|
+
this.logger.warn(e, r);
|
|
872
240
|
return;
|
|
873
241
|
}
|
|
874
|
-
console.warn("[vbss-translator]",
|
|
242
|
+
console.warn("[vbss-translator]", r);
|
|
875
243
|
}
|
|
876
|
-
debug(e,
|
|
244
|
+
debug(e, n) {
|
|
877
245
|
var s;
|
|
878
246
|
if (!this.config.debug)
|
|
879
247
|
return;
|
|
880
|
-
const
|
|
248
|
+
const r = {
|
|
881
249
|
scope: "translator",
|
|
882
250
|
event: e,
|
|
883
|
-
...
|
|
251
|
+
...n
|
|
884
252
|
};
|
|
885
253
|
if ((s = this.logger) != null && s.debug) {
|
|
886
|
-
this.logger.debug(e,
|
|
254
|
+
this.logger.debug(e, r);
|
|
887
255
|
return;
|
|
888
256
|
}
|
|
889
|
-
console.debug("[vbss-translator]",
|
|
257
|
+
console.debug("[vbss-translator]", r);
|
|
890
258
|
}
|
|
891
259
|
notifyTranslationComplete(e) {
|
|
892
|
-
const
|
|
893
|
-
if (
|
|
260
|
+
const n = this.config.onTranslationComplete;
|
|
261
|
+
if (n)
|
|
894
262
|
try {
|
|
895
|
-
|
|
896
|
-
} catch (
|
|
263
|
+
n(e);
|
|
264
|
+
} catch (r) {
|
|
897
265
|
this.warn("external_translation_complete_callback_error", {
|
|
898
266
|
provider: this.provider.type,
|
|
899
|
-
error:
|
|
267
|
+
error: r
|
|
900
268
|
});
|
|
901
269
|
}
|
|
902
270
|
}
|
|
903
271
|
notifyTranslationError(e) {
|
|
904
|
-
const
|
|
905
|
-
if (
|
|
272
|
+
const n = this.config.onTranslationError;
|
|
273
|
+
if (n)
|
|
906
274
|
try {
|
|
907
|
-
|
|
908
|
-
} catch (
|
|
275
|
+
n(e);
|
|
276
|
+
} catch (r) {
|
|
909
277
|
this.warn("external_translation_error_callback_error", {
|
|
910
278
|
provider: this.provider.type,
|
|
911
279
|
key: e.key,
|
|
912
280
|
language: e.language,
|
|
913
|
-
error:
|
|
281
|
+
error: r
|
|
914
282
|
});
|
|
915
283
|
}
|
|
916
284
|
}
|
|
917
285
|
}
|
|
918
|
-
const
|
|
919
|
-
class
|
|
286
|
+
const Le = () => Date.now(), me = (t) => typeof t == "number" && Number.isFinite(t) && t > 0;
|
|
287
|
+
class Xt {
|
|
920
288
|
constructor(e) {
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
289
|
+
B(this, "store", /* @__PURE__ */ new Map());
|
|
290
|
+
B(this, "enabled");
|
|
291
|
+
B(this, "ttlMs");
|
|
292
|
+
B(this, "maxEntries");
|
|
925
293
|
this.enabled = e.enabled, this.ttlMs = Math.max(0, e.ttlMs), this.maxEntries = e.maxEntries;
|
|
926
294
|
}
|
|
927
295
|
isEnabled() {
|
|
@@ -942,23 +310,23 @@ class pn {
|
|
|
942
310
|
get(e) {
|
|
943
311
|
if (!this.enabled)
|
|
944
312
|
return;
|
|
945
|
-
const
|
|
946
|
-
if (
|
|
947
|
-
if (this.isExpired(
|
|
313
|
+
const n = this.store.get(e);
|
|
314
|
+
if (n) {
|
|
315
|
+
if (this.isExpired(n)) {
|
|
948
316
|
this.store.delete(e);
|
|
949
317
|
return;
|
|
950
318
|
}
|
|
951
|
-
return
|
|
319
|
+
return n.value;
|
|
952
320
|
}
|
|
953
321
|
}
|
|
954
|
-
set(e,
|
|
322
|
+
set(e, n, r) {
|
|
955
323
|
if (!this.enabled)
|
|
956
324
|
return;
|
|
957
|
-
const s =
|
|
325
|
+
const s = me(r) ? r : this.ttlMs, o = me(s) ? Le() + s : void 0;
|
|
958
326
|
this.store.set(e, {
|
|
959
|
-
value:
|
|
960
|
-
expiresAt:
|
|
961
|
-
insertedAt:
|
|
327
|
+
value: n,
|
|
328
|
+
expiresAt: o,
|
|
329
|
+
insertedAt: Le()
|
|
962
330
|
}), this.enforceMaxEntries();
|
|
963
331
|
}
|
|
964
332
|
delete(e) {
|
|
@@ -967,292 +335,346 @@ class pn {
|
|
|
967
335
|
has(e) {
|
|
968
336
|
if (!this.enabled)
|
|
969
337
|
return !1;
|
|
970
|
-
const
|
|
971
|
-
return
|
|
338
|
+
const n = this.store.get(e);
|
|
339
|
+
return n ? this.isExpired(n) ? (this.store.delete(e), !1) : !0 : !1;
|
|
972
340
|
}
|
|
973
341
|
entries() {
|
|
974
342
|
const e = [];
|
|
975
|
-
for (const [
|
|
976
|
-
if (this.isExpired(
|
|
977
|
-
this.store.delete(
|
|
343
|
+
for (const [n, r] of this.store.entries()) {
|
|
344
|
+
if (this.isExpired(r)) {
|
|
345
|
+
this.store.delete(n);
|
|
978
346
|
continue;
|
|
979
347
|
}
|
|
980
348
|
e.push({
|
|
981
|
-
key:
|
|
982
|
-
result:
|
|
983
|
-
expiresAt:
|
|
349
|
+
key: n,
|
|
350
|
+
result: r.value,
|
|
351
|
+
expiresAt: r.expiresAt
|
|
984
352
|
});
|
|
985
353
|
}
|
|
986
354
|
return e;
|
|
987
355
|
}
|
|
988
356
|
prune() {
|
|
989
|
-
for (const [e,
|
|
990
|
-
this.isExpired(
|
|
357
|
+
for (const [e, n] of this.store.entries())
|
|
358
|
+
this.isExpired(n) && this.store.delete(e);
|
|
991
359
|
}
|
|
992
360
|
enforceMaxEntries() {
|
|
993
|
-
if (!
|
|
361
|
+
if (!me(this.maxEntries))
|
|
994
362
|
return;
|
|
995
363
|
const e = this.maxEntries;
|
|
996
364
|
for (; this.store.size > e; ) {
|
|
997
|
-
const
|
|
998
|
-
if (!
|
|
365
|
+
const n = this.findOldestKey();
|
|
366
|
+
if (!n)
|
|
999
367
|
break;
|
|
1000
|
-
this.store.delete(
|
|
368
|
+
this.store.delete(n);
|
|
1001
369
|
}
|
|
1002
370
|
}
|
|
1003
371
|
findOldestKey() {
|
|
1004
|
-
let e,
|
|
1005
|
-
for (const [
|
|
1006
|
-
s.insertedAt <
|
|
372
|
+
let e, n = Number.POSITIVE_INFINITY;
|
|
373
|
+
for (const [r, s] of this.store.entries())
|
|
374
|
+
s.insertedAt < n && (e = r, n = s.insertedAt);
|
|
1007
375
|
return e;
|
|
1008
376
|
}
|
|
1009
377
|
isExpired(e) {
|
|
1010
|
-
return
|
|
378
|
+
return me(e.expiresAt) ? e.expiresAt <= Le() : !1;
|
|
1011
379
|
}
|
|
1012
380
|
}
|
|
1013
|
-
function
|
|
381
|
+
function ht(t, e) {
|
|
1014
382
|
return function() {
|
|
1015
383
|
return t.apply(e, arguments);
|
|
1016
384
|
};
|
|
1017
385
|
}
|
|
1018
|
-
const { toString:
|
|
1019
|
-
const
|
|
1020
|
-
return t[
|
|
1021
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
1022
|
-
function
|
|
1023
|
-
return t !== null && !
|
|
386
|
+
const { toString: Qt } = Object.prototype, { getPrototypeOf: Te } = Object, { iterator: xe, toStringTag: pt } = Symbol, Oe = /* @__PURE__ */ ((t) => (e) => {
|
|
387
|
+
const n = Qt.call(e);
|
|
388
|
+
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
389
|
+
})(/* @__PURE__ */ Object.create(null)), H = (t) => (t = t.toLowerCase(), (e) => Oe(e) === t), Se = (t) => (e) => typeof e === t, { isArray: re } = Array, ne = Se("undefined");
|
|
390
|
+
function le(t) {
|
|
391
|
+
return t !== null && !ne(t) && t.constructor !== null && !ne(t.constructor) && D(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
1024
392
|
}
|
|
1025
|
-
const
|
|
1026
|
-
function
|
|
393
|
+
const gt = H("ArrayBuffer");
|
|
394
|
+
function Yt(t) {
|
|
1027
395
|
let e;
|
|
1028
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
396
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && gt(t.buffer), e;
|
|
1029
397
|
}
|
|
1030
|
-
const
|
|
1031
|
-
if (
|
|
398
|
+
const Zt = Se("string"), D = Se("function"), mt = Se("number"), ce = (t) => t !== null && typeof t == "object", en = (t) => t === !0 || t === !1, be = (t) => {
|
|
399
|
+
if (Oe(t) !== "object")
|
|
1032
400
|
return !1;
|
|
1033
|
-
const e =
|
|
1034
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
1035
|
-
},
|
|
1036
|
-
if (!
|
|
401
|
+
const e = Te(t);
|
|
402
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(pt in t) && !(xe in t);
|
|
403
|
+
}, tn = (t) => {
|
|
404
|
+
if (!ce(t) || le(t))
|
|
1037
405
|
return !1;
|
|
1038
406
|
try {
|
|
1039
407
|
return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
|
|
1040
408
|
} catch {
|
|
1041
409
|
return !1;
|
|
1042
410
|
}
|
|
1043
|
-
},
|
|
1044
|
-
|
|
1045
|
-
return
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
411
|
+
}, nn = H("Date"), rn = H("File"), sn = (t) => !!(t && typeof t.uri < "u"), on = (t) => t && typeof t.getParts < "u", an = H("Blob"), ln = H("FileList"), cn = (t) => ce(t) && D(t.pipe);
|
|
412
|
+
function un() {
|
|
413
|
+
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
414
|
+
}
|
|
415
|
+
const Je = un(), We = typeof Je.FormData < "u" ? Je.FormData : void 0, dn = (t) => {
|
|
416
|
+
if (!t) return !1;
|
|
417
|
+
if (We && t instanceof We) return !0;
|
|
418
|
+
const e = Te(t);
|
|
419
|
+
if (!e || e === Object.prototype || !D(t.append)) return !1;
|
|
420
|
+
const n = Oe(t);
|
|
421
|
+
return n === "formdata" || // detect form-data instance
|
|
422
|
+
n === "object" && D(t.toString) && t.toString() === "[object FormData]";
|
|
423
|
+
}, fn = H("URLSearchParams"), [hn, pn, gn, mn] = [
|
|
424
|
+
"ReadableStream",
|
|
425
|
+
"Request",
|
|
426
|
+
"Response",
|
|
427
|
+
"Headers"
|
|
428
|
+
].map(H), yn = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
429
|
+
function ue(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
1049
430
|
if (t === null || typeof t > "u")
|
|
1050
431
|
return;
|
|
1051
|
-
let
|
|
1052
|
-
if (typeof t != "object" && (t = [t]),
|
|
1053
|
-
for (
|
|
1054
|
-
e.call(null, t[
|
|
432
|
+
let r, s;
|
|
433
|
+
if (typeof t != "object" && (t = [t]), re(t))
|
|
434
|
+
for (r = 0, s = t.length; r < s; r++)
|
|
435
|
+
e.call(null, t[r], r, t);
|
|
1055
436
|
else {
|
|
1056
|
-
if (
|
|
437
|
+
if (le(t))
|
|
1057
438
|
return;
|
|
1058
|
-
const
|
|
439
|
+
const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
|
|
1059
440
|
let l;
|
|
1060
|
-
for (
|
|
1061
|
-
l =
|
|
441
|
+
for (r = 0; r < i; r++)
|
|
442
|
+
l = o[r], e.call(null, t[l], l, t);
|
|
1062
443
|
}
|
|
1063
444
|
}
|
|
1064
|
-
function
|
|
1065
|
-
if (
|
|
445
|
+
function yt(t, e) {
|
|
446
|
+
if (le(t))
|
|
1066
447
|
return null;
|
|
1067
448
|
e = e.toLowerCase();
|
|
1068
|
-
const
|
|
1069
|
-
let
|
|
1070
|
-
for (;
|
|
1071
|
-
if (s = r
|
|
449
|
+
const n = Object.keys(t);
|
|
450
|
+
let r = n.length, s;
|
|
451
|
+
for (; r-- > 0; )
|
|
452
|
+
if (s = n[r], e === s.toLowerCase())
|
|
1072
453
|
return s;
|
|
1073
454
|
return null;
|
|
1074
455
|
}
|
|
1075
|
-
const
|
|
1076
|
-
function
|
|
1077
|
-
const { caseless: t, skipUndefined: e } =
|
|
1078
|
-
|
|
1079
|
-
|
|
456
|
+
const Q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, bt = (t) => !ne(t) && t !== Q;
|
|
457
|
+
function Ue() {
|
|
458
|
+
const { caseless: t, skipUndefined: e } = bt(this) && this || {}, n = {}, r = (s, o) => {
|
|
459
|
+
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
460
|
+
return;
|
|
461
|
+
const i = t && yt(n, o) || o;
|
|
462
|
+
be(n[i]) && be(s) ? n[i] = Ue(n[i], s) : be(s) ? n[i] = Ue({}, s) : re(s) ? n[i] = s.slice() : (!e || !ne(s)) && (n[i] = s);
|
|
1080
463
|
};
|
|
1081
|
-
for (let s = 0,
|
|
1082
|
-
arguments[s] &&
|
|
1083
|
-
return
|
|
464
|
+
for (let s = 0, o = arguments.length; s < o; s++)
|
|
465
|
+
arguments[s] && ue(arguments[s], r);
|
|
466
|
+
return n;
|
|
1084
467
|
}
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
468
|
+
const bn = (t, e, n, { allOwnKeys: r } = {}) => (ue(
|
|
469
|
+
e,
|
|
470
|
+
(s, o) => {
|
|
471
|
+
n && D(s) ? Object.defineProperty(t, o, {
|
|
472
|
+
value: ht(s, n),
|
|
473
|
+
writable: !0,
|
|
474
|
+
enumerable: !0,
|
|
475
|
+
configurable: !0
|
|
476
|
+
}) : Object.defineProperty(t, o, {
|
|
477
|
+
value: s,
|
|
478
|
+
writable: !0,
|
|
479
|
+
enumerable: !0,
|
|
480
|
+
configurable: !0
|
|
481
|
+
});
|
|
482
|
+
},
|
|
483
|
+
{ allOwnKeys: r }
|
|
484
|
+
), t), En = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), wn = (t, e, n, r) => {
|
|
485
|
+
t.prototype = Object.create(e.prototype, r), Object.defineProperty(t.prototype, "constructor", {
|
|
486
|
+
value: t,
|
|
487
|
+
writable: !0,
|
|
488
|
+
enumerable: !1,
|
|
489
|
+
configurable: !0
|
|
490
|
+
}), Object.defineProperty(t, "super", {
|
|
1089
491
|
value: e.prototype
|
|
1090
|
-
}),
|
|
1091
|
-
},
|
|
1092
|
-
let s,
|
|
492
|
+
}), n && Object.assign(t.prototype, n);
|
|
493
|
+
}, Rn = (t, e, n, r) => {
|
|
494
|
+
let s, o, i;
|
|
1093
495
|
const l = {};
|
|
1094
496
|
if (e = e || {}, t == null) return e;
|
|
1095
497
|
do {
|
|
1096
|
-
for (s = Object.getOwnPropertyNames(t),
|
|
1097
|
-
|
|
1098
|
-
t =
|
|
1099
|
-
} while (t && (!
|
|
498
|
+
for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
|
|
499
|
+
i = s[o], (!r || r(i, t, e)) && !l[i] && (e[i] = t[i], l[i] = !0);
|
|
500
|
+
t = n !== !1 && Te(t);
|
|
501
|
+
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
1100
502
|
return e;
|
|
1101
|
-
},
|
|
1102
|
-
t = String(t), (
|
|
1103
|
-
const
|
|
1104
|
-
return
|
|
1105
|
-
},
|
|
503
|
+
}, Tn = (t, e, n) => {
|
|
504
|
+
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
505
|
+
const r = t.indexOf(e, n);
|
|
506
|
+
return r !== -1 && r === n;
|
|
507
|
+
}, xn = (t) => {
|
|
1106
508
|
if (!t) return null;
|
|
1107
|
-
if (
|
|
509
|
+
if (re(t)) return t;
|
|
1108
510
|
let e = t.length;
|
|
1109
|
-
if (!
|
|
1110
|
-
const
|
|
511
|
+
if (!mt(e)) return null;
|
|
512
|
+
const n = new Array(e);
|
|
1111
513
|
for (; e-- > 0; )
|
|
1112
|
-
|
|
1113
|
-
return
|
|
1114
|
-
},
|
|
1115
|
-
const
|
|
514
|
+
n[e] = t[e];
|
|
515
|
+
return n;
|
|
516
|
+
}, On = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Te(Uint8Array)), Sn = (t, e) => {
|
|
517
|
+
const r = (t && t[xe]).call(t);
|
|
1116
518
|
let s;
|
|
1117
|
-
for (; (s =
|
|
1118
|
-
const
|
|
1119
|
-
e.call(t,
|
|
519
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
520
|
+
const o = s.value;
|
|
521
|
+
e.call(t, o[0], o[1]);
|
|
1120
522
|
}
|
|
1121
|
-
},
|
|
1122
|
-
let
|
|
1123
|
-
const
|
|
1124
|
-
for (; (
|
|
1125
|
-
|
|
1126
|
-
return
|
|
1127
|
-
},
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
}, Hn = (t) => {
|
|
1139
|
-
dr(t, (e, r) => {
|
|
1140
|
-
if (G(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
523
|
+
}, _n = (t, e) => {
|
|
524
|
+
let n;
|
|
525
|
+
const r = [];
|
|
526
|
+
for (; (n = t.exec(e)) !== null; )
|
|
527
|
+
r.push(n);
|
|
528
|
+
return r;
|
|
529
|
+
}, An = H("HTMLFormElement"), Cn = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
|
|
530
|
+
return r.toUpperCase() + s;
|
|
531
|
+
}), Ge = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Pn = H("RegExp"), Et = (t, e) => {
|
|
532
|
+
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
533
|
+
ue(n, (s, o) => {
|
|
534
|
+
let i;
|
|
535
|
+
(i = e(s, o, t)) !== !1 && (r[o] = i || s);
|
|
536
|
+
}), Object.defineProperties(t, r);
|
|
537
|
+
}, Ln = (t) => {
|
|
538
|
+
Et(t, (e, n) => {
|
|
539
|
+
if (D(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
1141
540
|
return !1;
|
|
1142
|
-
const
|
|
1143
|
-
if (
|
|
541
|
+
const r = t[n];
|
|
542
|
+
if (D(r)) {
|
|
1144
543
|
if (e.enumerable = !1, "writable" in e) {
|
|
1145
544
|
e.writable = !1;
|
|
1146
545
|
return;
|
|
1147
546
|
}
|
|
1148
547
|
e.set || (e.set = () => {
|
|
1149
|
-
throw Error("Can not rewrite read-only method '" +
|
|
548
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
1150
549
|
});
|
|
1151
550
|
}
|
|
1152
551
|
});
|
|
1153
|
-
},
|
|
1154
|
-
const
|
|
1155
|
-
s.forEach((
|
|
1156
|
-
|
|
552
|
+
}, kn = (t, e) => {
|
|
553
|
+
const n = {}, r = (s) => {
|
|
554
|
+
s.forEach((o) => {
|
|
555
|
+
n[o] = !0;
|
|
1157
556
|
});
|
|
1158
557
|
};
|
|
1159
|
-
return
|
|
1160
|
-
},
|
|
1161
|
-
},
|
|
1162
|
-
function
|
|
1163
|
-
return !!(t &&
|
|
558
|
+
return re(t) ? r(t) : r(String(t).split(e)), n;
|
|
559
|
+
}, Nn = () => {
|
|
560
|
+
}, vn = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
561
|
+
function Dn(t) {
|
|
562
|
+
return !!(t && D(t.append) && t[pt] === "FormData" && t[xe]);
|
|
1164
563
|
}
|
|
1165
|
-
const
|
|
1166
|
-
const e = new Array(10),
|
|
1167
|
-
if (
|
|
1168
|
-
if (e.indexOf(
|
|
564
|
+
const Fn = (t) => {
|
|
565
|
+
const e = new Array(10), n = (r, s) => {
|
|
566
|
+
if (ce(r)) {
|
|
567
|
+
if (e.indexOf(r) >= 0)
|
|
1169
568
|
return;
|
|
1170
|
-
if (
|
|
1171
|
-
return
|
|
1172
|
-
if (!("toJSON" in
|
|
1173
|
-
e[s] =
|
|
1174
|
-
const
|
|
1175
|
-
return
|
|
1176
|
-
const
|
|
1177
|
-
!
|
|
1178
|
-
}), e[s] = void 0,
|
|
569
|
+
if (le(r))
|
|
570
|
+
return r;
|
|
571
|
+
if (!("toJSON" in r)) {
|
|
572
|
+
e[s] = r;
|
|
573
|
+
const o = re(r) ? [] : {};
|
|
574
|
+
return ue(r, (i, l) => {
|
|
575
|
+
const f = n(i, s + 1);
|
|
576
|
+
!ne(f) && (o[l] = f);
|
|
577
|
+
}), e[s] = void 0, o;
|
|
1179
578
|
}
|
|
1180
579
|
}
|
|
1181
|
-
return
|
|
580
|
+
return r;
|
|
1182
581
|
};
|
|
1183
|
-
return
|
|
1184
|
-
},
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
),
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
582
|
+
return n(t, 0);
|
|
583
|
+
}, Un = H("AsyncFunction"), Bn = (t) => t && (ce(t) || D(t)) && D(t.then) && D(t.catch), wt = ((t, e) => t ? setImmediate : e ? ((n, r) => (Q.addEventListener(
|
|
584
|
+
"message",
|
|
585
|
+
({ source: s, data: o }) => {
|
|
586
|
+
s === Q && o === n && r.length && r.shift()();
|
|
587
|
+
},
|
|
588
|
+
!1
|
|
589
|
+
), (s) => {
|
|
590
|
+
r.push(s), Q.postMessage(n, "*");
|
|
591
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", D(Q.postMessage)), jn = typeof queueMicrotask < "u" ? queueMicrotask.bind(Q) : typeof process < "u" && process.nextTick || wt, Mn = (t) => t != null && D(t[xe]), a = {
|
|
592
|
+
isArray: re,
|
|
593
|
+
isArrayBuffer: gt,
|
|
594
|
+
isBuffer: le,
|
|
595
|
+
isFormData: dn,
|
|
596
|
+
isArrayBufferView: Yt,
|
|
597
|
+
isString: Zt,
|
|
598
|
+
isNumber: mt,
|
|
599
|
+
isBoolean: en,
|
|
600
|
+
isObject: ce,
|
|
601
|
+
isPlainObject: be,
|
|
602
|
+
isEmptyObject: tn,
|
|
603
|
+
isReadableStream: hn,
|
|
604
|
+
isRequest: pn,
|
|
605
|
+
isResponse: gn,
|
|
606
|
+
isHeaders: mn,
|
|
607
|
+
isUndefined: ne,
|
|
608
|
+
isDate: nn,
|
|
609
|
+
isFile: rn,
|
|
610
|
+
isReactNativeBlob: sn,
|
|
611
|
+
isReactNative: on,
|
|
612
|
+
isBlob: an,
|
|
613
|
+
isRegExp: Pn,
|
|
614
|
+
isFunction: D,
|
|
615
|
+
isStream: cn,
|
|
616
|
+
isURLSearchParams: fn,
|
|
617
|
+
isTypedArray: On,
|
|
618
|
+
isFileList: ln,
|
|
619
|
+
forEach: ue,
|
|
620
|
+
merge: Ue,
|
|
621
|
+
extend: bn,
|
|
622
|
+
trim: yn,
|
|
623
|
+
stripBOM: En,
|
|
624
|
+
inherits: wn,
|
|
625
|
+
toFlatObject: Rn,
|
|
626
|
+
kindOf: Oe,
|
|
627
|
+
kindOfTest: H,
|
|
628
|
+
endsWith: Tn,
|
|
629
|
+
toArray: xn,
|
|
630
|
+
forEachEntry: Sn,
|
|
631
|
+
matchAll: _n,
|
|
632
|
+
isHTMLForm: An,
|
|
633
|
+
hasOwnProperty: Ge,
|
|
634
|
+
hasOwnProp: Ge,
|
|
1233
635
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1234
|
-
reduceDescriptors:
|
|
1235
|
-
freezeMethods:
|
|
1236
|
-
toObjectSet:
|
|
1237
|
-
toCamelCase:
|
|
1238
|
-
noop:
|
|
1239
|
-
toFiniteNumber:
|
|
1240
|
-
findKey:
|
|
1241
|
-
global:
|
|
1242
|
-
isContextDefined:
|
|
1243
|
-
isSpecCompliantForm:
|
|
1244
|
-
toJSONObject:
|
|
1245
|
-
isAsyncFn:
|
|
1246
|
-
isThenable:
|
|
1247
|
-
setImmediate:
|
|
1248
|
-
asap:
|
|
1249
|
-
isIterable:
|
|
636
|
+
reduceDescriptors: Et,
|
|
637
|
+
freezeMethods: Ln,
|
|
638
|
+
toObjectSet: kn,
|
|
639
|
+
toCamelCase: Cn,
|
|
640
|
+
noop: Nn,
|
|
641
|
+
toFiniteNumber: vn,
|
|
642
|
+
findKey: yt,
|
|
643
|
+
global: Q,
|
|
644
|
+
isContextDefined: bt,
|
|
645
|
+
isSpecCompliantForm: Dn,
|
|
646
|
+
toJSONObject: Fn,
|
|
647
|
+
isAsyncFn: Un,
|
|
648
|
+
isThenable: Bn,
|
|
649
|
+
setImmediate: wt,
|
|
650
|
+
asap: jn,
|
|
651
|
+
isIterable: Mn
|
|
1250
652
|
};
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
653
|
+
let y = class Rt extends Error {
|
|
654
|
+
static from(e, n, r, s, o, i) {
|
|
655
|
+
const l = new Rt(e.message, n || e.code, r, s, o);
|
|
656
|
+
return l.cause = e, l.name = e.name, e.status != null && l.status == null && (l.status = e.status), i && Object.assign(l, i), l;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
660
|
+
*
|
|
661
|
+
* @param {string} message The error message.
|
|
662
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
663
|
+
* @param {Object} [config] The config.
|
|
664
|
+
* @param {Object} [request] The request.
|
|
665
|
+
* @param {Object} [response] The response.
|
|
666
|
+
*
|
|
667
|
+
* @returns {Error} The created error.
|
|
668
|
+
*/
|
|
669
|
+
constructor(e, n, r, s, o) {
|
|
670
|
+
super(e), Object.defineProperty(this, "message", {
|
|
671
|
+
value: e,
|
|
672
|
+
enumerable: !0,
|
|
673
|
+
writable: !0,
|
|
674
|
+
configurable: !0
|
|
675
|
+
}), 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
|
+
}
|
|
677
|
+
toJSON() {
|
|
1256
678
|
return {
|
|
1257
679
|
// Standard
|
|
1258
680
|
message: this.message,
|
|
@@ -1266,169 +688,157 @@ c.inherits(_, Error, {
|
|
|
1266
688
|
columnNumber: this.columnNumber,
|
|
1267
689
|
stack: this.stack,
|
|
1268
690
|
// Axios
|
|
1269
|
-
config:
|
|
691
|
+
config: a.toJSONObject(this.config),
|
|
1270
692
|
code: this.code,
|
|
1271
693
|
status: this.status
|
|
1272
694
|
};
|
|
1273
695
|
}
|
|
1274
|
-
});
|
|
1275
|
-
const pr = _.prototype, gr = {};
|
|
1276
|
-
[
|
|
1277
|
-
"ERR_BAD_OPTION_VALUE",
|
|
1278
|
-
"ERR_BAD_OPTION",
|
|
1279
|
-
"ECONNABORTED",
|
|
1280
|
-
"ETIMEDOUT",
|
|
1281
|
-
"ERR_NETWORK",
|
|
1282
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
1283
|
-
"ERR_DEPRECATED",
|
|
1284
|
-
"ERR_BAD_RESPONSE",
|
|
1285
|
-
"ERR_BAD_REQUEST",
|
|
1286
|
-
"ERR_CANCELED",
|
|
1287
|
-
"ERR_NOT_SUPPORT",
|
|
1288
|
-
"ERR_INVALID_URL"
|
|
1289
|
-
// eslint-disable-next-line func-names
|
|
1290
|
-
].forEach((t) => {
|
|
1291
|
-
gr[t] = { value: t };
|
|
1292
|
-
});
|
|
1293
|
-
Object.defineProperties(_, gr);
|
|
1294
|
-
Object.defineProperty(pr, "isAxiosError", { value: !0 });
|
|
1295
|
-
_.from = (t, e, r, n, s, i) => {
|
|
1296
|
-
const a = Object.create(pr);
|
|
1297
|
-
c.toFlatObject(t, a, function(u) {
|
|
1298
|
-
return u !== Error.prototype;
|
|
1299
|
-
}, (f) => f !== "isAxiosError");
|
|
1300
|
-
const l = t && t.message ? t.message : "Error", g = e == null && t ? t.code : e;
|
|
1301
|
-
return _.call(a, l, g, r, n, s), t && a.cause == null && Object.defineProperty(a, "cause", { value: t, configurable: !0 }), a.name = t && t.name || "Error", i && Object.assign(a, i), a;
|
|
1302
696
|
};
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
697
|
+
y.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
698
|
+
y.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
699
|
+
y.ECONNABORTED = "ECONNABORTED";
|
|
700
|
+
y.ETIMEDOUT = "ETIMEDOUT";
|
|
701
|
+
y.ERR_NETWORK = "ERR_NETWORK";
|
|
702
|
+
y.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
703
|
+
y.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
704
|
+
y.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
705
|
+
y.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
706
|
+
y.ERR_CANCELED = "ERR_CANCELED";
|
|
707
|
+
y.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
708
|
+
y.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
709
|
+
y.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
710
|
+
const In = null;
|
|
711
|
+
function Be(t) {
|
|
712
|
+
return a.isPlainObject(t) || a.isArray(t);
|
|
1306
713
|
}
|
|
1307
|
-
function
|
|
1308
|
-
return
|
|
714
|
+
function Tt(t) {
|
|
715
|
+
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
1309
716
|
}
|
|
1310
|
-
function
|
|
1311
|
-
return t ? t.concat(e).map(function(s,
|
|
1312
|
-
return s =
|
|
1313
|
-
}).join(
|
|
717
|
+
function ke(t, e, n) {
|
|
718
|
+
return t ? t.concat(e).map(function(s, o) {
|
|
719
|
+
return s = Tt(s), !n && o ? "[" + s + "]" : s;
|
|
720
|
+
}).join(n ? "." : "") : e;
|
|
1314
721
|
}
|
|
1315
|
-
function
|
|
1316
|
-
return
|
|
722
|
+
function Hn(t) {
|
|
723
|
+
return a.isArray(t) && !t.some(Be);
|
|
1317
724
|
}
|
|
1318
|
-
const
|
|
725
|
+
const qn = a.toFlatObject(a, {}, null, function(e) {
|
|
1319
726
|
return /^is[A-Z]/.test(e);
|
|
1320
727
|
});
|
|
1321
|
-
function
|
|
1322
|
-
if (!
|
|
728
|
+
function _e(t, e, n) {
|
|
729
|
+
if (!a.isObject(t))
|
|
1323
730
|
throw new TypeError("target must be an object");
|
|
1324
|
-
e = e || new FormData(),
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
731
|
+
e = e || new FormData(), n = a.toFlatObject(
|
|
732
|
+
n,
|
|
733
|
+
{
|
|
734
|
+
metaTokens: !0,
|
|
735
|
+
dots: !1,
|
|
736
|
+
indexes: !1
|
|
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))
|
|
1333
745
|
throw new TypeError("visitor must be a function");
|
|
1334
|
-
function
|
|
1335
|
-
if (
|
|
1336
|
-
if (
|
|
1337
|
-
return
|
|
1338
|
-
if (
|
|
1339
|
-
return
|
|
1340
|
-
if (!
|
|
1341
|
-
throw new
|
|
1342
|
-
return
|
|
1343
|
-
}
|
|
1344
|
-
function
|
|
1345
|
-
let
|
|
1346
|
-
if (
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
746
|
+
function c(g) {
|
|
747
|
+
if (g === null) return "";
|
|
748
|
+
if (a.isDate(g))
|
|
749
|
+
return g.toISOString();
|
|
750
|
+
if (a.isBoolean(g))
|
|
751
|
+
return g.toString();
|
|
752
|
+
if (!u && a.isBlob(g))
|
|
753
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
754
|
+
return a.isArrayBuffer(g) || a.isTypedArray(g) ? u && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
|
|
755
|
+
}
|
|
756
|
+
function d(g, h, x) {
|
|
757
|
+
let j = g;
|
|
758
|
+
if (a.isReactNative(e) && a.isReactNativeBlob(g))
|
|
759
|
+
return e.append(ke(x, h, o), c(g)), !1;
|
|
760
|
+
if (g && !x && typeof g == "object") {
|
|
761
|
+
if (a.endsWith(h, "{}"))
|
|
762
|
+
h = r ? h : h.slice(0, -2), g = JSON.stringify(g);
|
|
763
|
+
else if (a.isArray(g) && Hn(g) || (a.isFileList(g) || a.endsWith(h, "[]")) && (j = a.toArray(g)))
|
|
764
|
+
return h = Tt(h), j.forEach(function(T, L) {
|
|
765
|
+
!(a.isUndefined(T) || T === null) && e.append(
|
|
1352
766
|
// eslint-disable-next-line no-nested-ternary
|
|
1353
|
-
|
|
1354
|
-
|
|
767
|
+
i === !0 ? ke([h], L, o) : i === null ? h : h + "[]",
|
|
768
|
+
c(T)
|
|
1355
769
|
);
|
|
1356
770
|
}), !1;
|
|
1357
771
|
}
|
|
1358
|
-
return
|
|
772
|
+
return Be(g) ? !0 : (e.append(ke(x, h, o), c(g)), !1);
|
|
1359
773
|
}
|
|
1360
|
-
const
|
|
1361
|
-
defaultVisitor:
|
|
1362
|
-
convertValue:
|
|
1363
|
-
isVisitable:
|
|
774
|
+
const R = [], S = Object.assign(qn, {
|
|
775
|
+
defaultVisitor: d,
|
|
776
|
+
convertValue: c,
|
|
777
|
+
isVisitable: Be
|
|
1364
778
|
});
|
|
1365
|
-
function
|
|
1366
|
-
if (!
|
|
1367
|
-
if (
|
|
1368
|
-
throw
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
}), h.pop();
|
|
779
|
+
function p(g, h, x = 0) {
|
|
780
|
+
if (!a.isUndefined(g)) {
|
|
781
|
+
if (x > f)
|
|
782
|
+
throw new y(
|
|
783
|
+
"Object is too deeply nested (" + x + " levels). Max depth: " + f,
|
|
784
|
+
y.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
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();
|
|
1378
791
|
}
|
|
1379
792
|
}
|
|
1380
|
-
if (!
|
|
793
|
+
if (!a.isObject(t))
|
|
1381
794
|
throw new TypeError("data must be an object");
|
|
1382
|
-
return
|
|
795
|
+
return p(t), e;
|
|
1383
796
|
}
|
|
1384
|
-
function
|
|
797
|
+
function Xe(t) {
|
|
1385
798
|
const e = {
|
|
1386
799
|
"!": "%21",
|
|
1387
800
|
"'": "%27",
|
|
1388
801
|
"(": "%28",
|
|
1389
802
|
")": "%29",
|
|
1390
803
|
"~": "%7E",
|
|
1391
|
-
"%20": "+"
|
|
1392
|
-
"%00": "\0"
|
|
804
|
+
"%20": "+"
|
|
1393
805
|
};
|
|
1394
|
-
return encodeURIComponent(t).replace(/[!'()~]|%20
|
|
1395
|
-
return e[
|
|
806
|
+
return encodeURIComponent(t).replace(/[!'()~]|%20/g, function(r) {
|
|
807
|
+
return e[r];
|
|
1396
808
|
});
|
|
1397
809
|
}
|
|
1398
|
-
function
|
|
1399
|
-
this._pairs = [], t &&
|
|
810
|
+
function Ie(t, e) {
|
|
811
|
+
this._pairs = [], t && _e(t, this, e);
|
|
1400
812
|
}
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1403
|
-
this._pairs.push([e,
|
|
813
|
+
const xt = Ie.prototype;
|
|
814
|
+
xt.append = function(e, n) {
|
|
815
|
+
this._pairs.push([e, n]);
|
|
1404
816
|
};
|
|
1405
|
-
|
|
1406
|
-
const
|
|
1407
|
-
return e.call(this,
|
|
1408
|
-
} :
|
|
817
|
+
xt.toString = function(e) {
|
|
818
|
+
const n = e ? function(r) {
|
|
819
|
+
return e.call(this, r, Xe);
|
|
820
|
+
} : Xe;
|
|
1409
821
|
return this._pairs.map(function(s) {
|
|
1410
|
-
return
|
|
822
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
1411
823
|
}, "").join("&");
|
|
1412
824
|
};
|
|
1413
|
-
function
|
|
825
|
+
function Kn(t) {
|
|
1414
826
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
1415
827
|
}
|
|
1416
|
-
function
|
|
828
|
+
function Ot(t, e, n) {
|
|
1417
829
|
if (!e)
|
|
1418
830
|
return t;
|
|
1419
|
-
const
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
});
|
|
1423
|
-
const s = r && r.serialize;
|
|
831
|
+
const r = n && n.encode || Kn, s = a.isFunction(n) ? {
|
|
832
|
+
serialize: n
|
|
833
|
+
} : n, o = s && s.serialize;
|
|
1424
834
|
let i;
|
|
1425
|
-
if (
|
|
1426
|
-
const
|
|
1427
|
-
|
|
835
|
+
if (o ? i = o(e, s) : i = a.isURLSearchParams(e) ? e.toString() : new Ie(e, s).toString(r), i) {
|
|
836
|
+
const l = t.indexOf("#");
|
|
837
|
+
l !== -1 && (t = t.slice(0, l)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
1428
838
|
}
|
|
1429
839
|
return t;
|
|
1430
840
|
}
|
|
1431
|
-
class
|
|
841
|
+
class Qe {
|
|
1432
842
|
constructor() {
|
|
1433
843
|
this.handlers = [];
|
|
1434
844
|
}
|
|
@@ -1437,15 +847,16 @@ class Kt {
|
|
|
1437
847
|
*
|
|
1438
848
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
1439
849
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
850
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
1440
851
|
*
|
|
1441
852
|
* @return {Number} An ID used to remove interceptor later
|
|
1442
853
|
*/
|
|
1443
|
-
use(e,
|
|
854
|
+
use(e, n, r) {
|
|
1444
855
|
return this.handlers.push({
|
|
1445
856
|
fulfilled: e,
|
|
1446
|
-
rejected:
|
|
1447
|
-
synchronous:
|
|
1448
|
-
runWhen:
|
|
857
|
+
rejected: n,
|
|
858
|
+
synchronous: r ? r.synchronous : !1,
|
|
859
|
+
runWhen: r ? r.runWhen : null
|
|
1449
860
|
}), this.handlers.length - 1;
|
|
1450
861
|
}
|
|
1451
862
|
/**
|
|
@@ -1477,123 +888,130 @@ class Kt {
|
|
|
1477
888
|
* @returns {void}
|
|
1478
889
|
*/
|
|
1479
890
|
forEach(e) {
|
|
1480
|
-
|
|
1481
|
-
|
|
891
|
+
a.forEach(this.handlers, function(r) {
|
|
892
|
+
r !== null && e(r);
|
|
1482
893
|
});
|
|
1483
894
|
}
|
|
1484
895
|
}
|
|
1485
|
-
const
|
|
896
|
+
const He = {
|
|
1486
897
|
silentJSONParsing: !0,
|
|
1487
898
|
forcedJSONParsing: !0,
|
|
1488
|
-
clarifyTimeoutError: !1
|
|
1489
|
-
|
|
899
|
+
clarifyTimeoutError: !1,
|
|
900
|
+
legacyInterceptorReqResOrdering: !0
|
|
901
|
+
}, $n = typeof URLSearchParams < "u" ? URLSearchParams : Ie, Vn = typeof FormData < "u" ? FormData : null, zn = typeof Blob < "u" ? Blob : null, Jn = {
|
|
1490
902
|
isBrowser: !0,
|
|
1491
903
|
classes: {
|
|
1492
|
-
URLSearchParams:
|
|
1493
|
-
FormData:
|
|
1494
|
-
Blob:
|
|
904
|
+
URLSearchParams: $n,
|
|
905
|
+
FormData: Vn,
|
|
906
|
+
Blob: zn
|
|
1495
907
|
},
|
|
1496
908
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1497
|
-
},
|
|
1498
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
909
|
+
}, qe = typeof window < "u" && typeof document < "u", je = typeof navigator == "object" && navigator || void 0, Wn = qe && (!je || ["ReactNative", "NativeScript", "NS"].indexOf(je.product) < 0), Gn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
910
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xn = qe && window.location.href || "http://localhost", Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1499
911
|
__proto__: null,
|
|
1500
|
-
hasBrowserEnv:
|
|
1501
|
-
hasStandardBrowserEnv:
|
|
1502
|
-
hasStandardBrowserWebWorkerEnv:
|
|
1503
|
-
navigator:
|
|
1504
|
-
origin:
|
|
1505
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1506
|
-
...
|
|
1507
|
-
...
|
|
912
|
+
hasBrowserEnv: qe,
|
|
913
|
+
hasStandardBrowserEnv: Wn,
|
|
914
|
+
hasStandardBrowserWebWorkerEnv: Gn,
|
|
915
|
+
navigator: je,
|
|
916
|
+
origin: Xn
|
|
917
|
+
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
918
|
+
...Qn,
|
|
919
|
+
...Jn
|
|
1508
920
|
};
|
|
1509
|
-
function
|
|
1510
|
-
return
|
|
1511
|
-
visitor: function(
|
|
1512
|
-
return
|
|
921
|
+
function Yn(t, e) {
|
|
922
|
+
return _e(t, new k.classes.URLSearchParams(), {
|
|
923
|
+
visitor: function(n, r, s, o) {
|
|
924
|
+
return k.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1513
925
|
},
|
|
1514
926
|
...e
|
|
1515
927
|
});
|
|
1516
928
|
}
|
|
1517
|
-
function
|
|
1518
|
-
return
|
|
929
|
+
function Zn(t) {
|
|
930
|
+
return a.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
1519
931
|
}
|
|
1520
|
-
function
|
|
1521
|
-
const e = {},
|
|
1522
|
-
let
|
|
1523
|
-
const s =
|
|
1524
|
-
let
|
|
1525
|
-
for (
|
|
1526
|
-
|
|
932
|
+
function er(t) {
|
|
933
|
+
const e = {}, n = Object.keys(t);
|
|
934
|
+
let r;
|
|
935
|
+
const s = n.length;
|
|
936
|
+
let o;
|
|
937
|
+
for (r = 0; r < s; r++)
|
|
938
|
+
o = n[r], e[o] = t[o];
|
|
1527
939
|
return e;
|
|
1528
940
|
}
|
|
1529
|
-
function
|
|
1530
|
-
function e(
|
|
1531
|
-
let
|
|
1532
|
-
if (
|
|
1533
|
-
const l = Number.isFinite(+
|
|
1534
|
-
return
|
|
1535
|
-
}
|
|
1536
|
-
if (
|
|
1537
|
-
const
|
|
1538
|
-
return
|
|
1539
|
-
e(
|
|
1540
|
-
}),
|
|
941
|
+
function St(t) {
|
|
942
|
+
function e(n, r, s, o) {
|
|
943
|
+
let i = n[o++];
|
|
944
|
+
if (i === "__proto__") return !0;
|
|
945
|
+
const l = Number.isFinite(+i), f = o >= n.length;
|
|
946
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = a.isArray(s[i]) ? s[i].concat(r) : [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = er(s[i])), !l);
|
|
947
|
+
}
|
|
948
|
+
if (a.isFormData(t) && a.isFunction(t.entries)) {
|
|
949
|
+
const n = {};
|
|
950
|
+
return a.forEachEntry(t, (r, s) => {
|
|
951
|
+
e(Zn(r), s, n, 0);
|
|
952
|
+
}), n;
|
|
1541
953
|
}
|
|
1542
954
|
return null;
|
|
1543
955
|
}
|
|
1544
|
-
|
|
1545
|
-
|
|
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))
|
|
1546
959
|
try {
|
|
1547
|
-
return (e || JSON.parse)(t),
|
|
1548
|
-
} catch (
|
|
1549
|
-
if (
|
|
1550
|
-
throw
|
|
960
|
+
return (e || JSON.parse)(t), a.trim(t);
|
|
961
|
+
} catch (r) {
|
|
962
|
+
if (r.name !== "SyntaxError")
|
|
963
|
+
throw r;
|
|
1551
964
|
}
|
|
1552
|
-
return (
|
|
965
|
+
return (n || JSON.stringify)(t);
|
|
1553
966
|
}
|
|
1554
|
-
const
|
|
1555
|
-
transitional:
|
|
967
|
+
const de = {
|
|
968
|
+
transitional: He,
|
|
1556
969
|
adapter: ["xhr", "http", "fetch"],
|
|
1557
|
-
transformRequest: [
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
if (
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
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
|
+
}
|
|
1578
994
|
}
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
transformResponse: [
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
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
|
+
}
|
|
1593
1011
|
}
|
|
1012
|
+
return e;
|
|
1594
1013
|
}
|
|
1595
|
-
|
|
1596
|
-
}],
|
|
1014
|
+
],
|
|
1597
1015
|
/**
|
|
1598
1016
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1599
1017
|
* timeout is not created.
|
|
@@ -1604,8 +1022,8 @@ const De = {
|
|
|
1604
1022
|
maxContentLength: -1,
|
|
1605
1023
|
maxBodyLength: -1,
|
|
1606
1024
|
env: {
|
|
1607
|
-
FormData:
|
|
1608
|
-
Blob:
|
|
1025
|
+
FormData: k.classes.FormData,
|
|
1026
|
+
Blob: k.classes.Blob
|
|
1609
1027
|
},
|
|
1610
1028
|
validateStatus: function(e) {
|
|
1611
1029
|
return e >= 200 && e < 300;
|
|
@@ -1617,10 +1035,10 @@ const De = {
|
|
|
1617
1035
|
}
|
|
1618
1036
|
}
|
|
1619
1037
|
};
|
|
1620
|
-
|
|
1621
|
-
|
|
1038
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
1039
|
+
de.headers[t] = {};
|
|
1622
1040
|
});
|
|
1623
|
-
const
|
|
1041
|
+
const nr = a.toObjectSet([
|
|
1624
1042
|
"age",
|
|
1625
1043
|
"authorization",
|
|
1626
1044
|
"content-length",
|
|
@@ -1638,152 +1056,171 @@ const ms = c.toObjectSet([
|
|
|
1638
1056
|
"referer",
|
|
1639
1057
|
"retry-after",
|
|
1640
1058
|
"user-agent"
|
|
1641
|
-
]),
|
|
1059
|
+
]), rr = (t) => {
|
|
1642
1060
|
const e = {};
|
|
1643
|
-
let
|
|
1061
|
+
let n, r, s;
|
|
1644
1062
|
return t && t.split(`
|
|
1645
|
-
`).forEach(function(
|
|
1646
|
-
s =
|
|
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);
|
|
1647
1065
|
}), e;
|
|
1648
|
-
},
|
|
1649
|
-
function
|
|
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) {
|
|
1650
1084
|
return t && String(t).trim().toLowerCase();
|
|
1651
1085
|
}
|
|
1652
|
-
function
|
|
1653
|
-
return
|
|
1086
|
+
function ir(t) {
|
|
1087
|
+
return or(t.replace(sr, ""));
|
|
1654
1088
|
}
|
|
1655
|
-
function
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
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];
|
|
1660
1097
|
return e;
|
|
1661
1098
|
}
|
|
1662
|
-
const
|
|
1663
|
-
function
|
|
1664
|
-
if (
|
|
1665
|
-
return
|
|
1666
|
-
if (s && (e =
|
|
1667
|
-
if (
|
|
1668
|
-
return e.indexOf(
|
|
1669
|
-
if (
|
|
1670
|
-
return
|
|
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);
|
|
1671
1108
|
}
|
|
1672
1109
|
}
|
|
1673
|
-
function
|
|
1674
|
-
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e,
|
|
1110
|
+
function cr(t) {
|
|
1111
|
+
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
1675
1112
|
}
|
|
1676
|
-
function
|
|
1677
|
-
const
|
|
1678
|
-
["get", "set", "has"].forEach((
|
|
1679
|
-
Object.defineProperty(t,
|
|
1680
|
-
value: function(s,
|
|
1681
|
-
return this[
|
|
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);
|
|
1682
1119
|
},
|
|
1683
1120
|
configurable: !0
|
|
1684
1121
|
});
|
|
1685
1122
|
});
|
|
1686
1123
|
}
|
|
1687
|
-
class
|
|
1124
|
+
let F = class {
|
|
1688
1125
|
constructor(e) {
|
|
1689
1126
|
e && this.set(e);
|
|
1690
1127
|
}
|
|
1691
|
-
set(e,
|
|
1128
|
+
set(e, n, r) {
|
|
1692
1129
|
const s = this;
|
|
1693
|
-
function
|
|
1694
|
-
const
|
|
1695
|
-
if (!
|
|
1130
|
+
function o(l, f, u) {
|
|
1131
|
+
const c = ie(f);
|
|
1132
|
+
if (!c)
|
|
1696
1133
|
throw new Error("header name must be a non-empty string");
|
|
1697
|
-
const
|
|
1698
|
-
(!
|
|
1699
|
-
}
|
|
1700
|
-
const
|
|
1701
|
-
if (
|
|
1702
|
-
|
|
1703
|
-
else if (
|
|
1704
|
-
|
|
1705
|
-
else if (
|
|
1706
|
-
let l = {},
|
|
1707
|
-
for (const
|
|
1708
|
-
if (!
|
|
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))
|
|
1709
1146
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1710
|
-
l[
|
|
1147
|
+
l[u = c[0]] = (f = l[u]) ? a.isArray(f) ? [...f, c[1]] : [f, c[1]] : c[1];
|
|
1711
1148
|
}
|
|
1712
|
-
|
|
1149
|
+
i(l, n);
|
|
1713
1150
|
} else
|
|
1714
|
-
e != null &&
|
|
1151
|
+
e != null && o(n, e, r);
|
|
1715
1152
|
return this;
|
|
1716
1153
|
}
|
|
1717
|
-
get(e,
|
|
1718
|
-
if (e =
|
|
1719
|
-
const
|
|
1720
|
-
if (
|
|
1721
|
-
const s = this[
|
|
1722
|
-
if (!
|
|
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)
|
|
1723
1160
|
return s;
|
|
1724
|
-
if (
|
|
1725
|
-
return
|
|
1726
|
-
if (
|
|
1727
|
-
return
|
|
1728
|
-
if (
|
|
1729
|
-
return
|
|
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);
|
|
1730
1167
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1731
1168
|
}
|
|
1732
1169
|
}
|
|
1733
1170
|
}
|
|
1734
|
-
has(e,
|
|
1735
|
-
if (e =
|
|
1736
|
-
const
|
|
1737
|
-
return !!(
|
|
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)));
|
|
1738
1175
|
}
|
|
1739
1176
|
return !1;
|
|
1740
1177
|
}
|
|
1741
|
-
delete(e,
|
|
1742
|
-
const
|
|
1178
|
+
delete(e, n) {
|
|
1179
|
+
const r = this;
|
|
1743
1180
|
let s = !1;
|
|
1744
|
-
function i
|
|
1745
|
-
if (
|
|
1746
|
-
const l =
|
|
1747
|
-
l && (!
|
|
1181
|
+
function o(i) {
|
|
1182
|
+
if (i = ie(i), i) {
|
|
1183
|
+
const l = a.findKey(r, i);
|
|
1184
|
+
l && (!n || Ne(r, r[l], l, n)) && (delete r[l], s = !0);
|
|
1748
1185
|
}
|
|
1749
1186
|
}
|
|
1750
|
-
return
|
|
1187
|
+
return a.isArray(e) ? e.forEach(o) : o(e), s;
|
|
1751
1188
|
}
|
|
1752
1189
|
clear(e) {
|
|
1753
|
-
const
|
|
1754
|
-
let
|
|
1755
|
-
for (;
|
|
1756
|
-
const
|
|
1757
|
-
(!e ||
|
|
1190
|
+
const n = Object.keys(this);
|
|
1191
|
+
let r = n.length, s = !1;
|
|
1192
|
+
for (; r--; ) {
|
|
1193
|
+
const o = n[r];
|
|
1194
|
+
(!e || Ne(this, this[o], o, e, !0)) && (delete this[o], s = !0);
|
|
1758
1195
|
}
|
|
1759
1196
|
return s;
|
|
1760
1197
|
}
|
|
1761
1198
|
normalize(e) {
|
|
1762
|
-
const
|
|
1763
|
-
return
|
|
1764
|
-
const
|
|
1765
|
-
if (
|
|
1766
|
-
|
|
1199
|
+
const n = this, r = {};
|
|
1200
|
+
return a.forEach(this, (s, o) => {
|
|
1201
|
+
const i = a.findKey(r, o);
|
|
1202
|
+
if (i) {
|
|
1203
|
+
n[i] = Ee(s), delete n[o];
|
|
1767
1204
|
return;
|
|
1768
1205
|
}
|
|
1769
|
-
const l = e ?
|
|
1770
|
-
l !==
|
|
1206
|
+
const l = e ? cr(o) : String(o).trim();
|
|
1207
|
+
l !== o && delete n[o], n[l] = Ee(s), r[l] = !0;
|
|
1771
1208
|
}), this;
|
|
1772
1209
|
}
|
|
1773
1210
|
concat(...e) {
|
|
1774
1211
|
return this.constructor.concat(this, ...e);
|
|
1775
1212
|
}
|
|
1776
1213
|
toJSON(e) {
|
|
1777
|
-
const
|
|
1778
|
-
return
|
|
1779
|
-
|
|
1780
|
-
}),
|
|
1214
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
1215
|
+
return a.forEach(this, (r, s) => {
|
|
1216
|
+
r != null && r !== !1 && (n[s] = e && a.isArray(r) ? r.join(", ") : r);
|
|
1217
|
+
}), n;
|
|
1781
1218
|
}
|
|
1782
1219
|
[Symbol.iterator]() {
|
|
1783
1220
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1784
1221
|
}
|
|
1785
1222
|
toString() {
|
|
1786
|
-
return Object.entries(this.toJSON()).map(([e,
|
|
1223
|
+
return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
|
|
1787
1224
|
`);
|
|
1788
1225
|
}
|
|
1789
1226
|
getSetCookie() {
|
|
@@ -1795,126 +1232,146 @@ class X {
|
|
|
1795
1232
|
static from(e) {
|
|
1796
1233
|
return e instanceof this ? e : new this(e);
|
|
1797
1234
|
}
|
|
1798
|
-
static concat(e, ...
|
|
1799
|
-
const
|
|
1800
|
-
return
|
|
1235
|
+
static concat(e, ...n) {
|
|
1236
|
+
const r = new this(e);
|
|
1237
|
+
return n.forEach((s) => r.set(s)), r;
|
|
1801
1238
|
}
|
|
1802
1239
|
static accessor(e) {
|
|
1803
|
-
const
|
|
1240
|
+
const r = (this[Ye] = this[Ye] = {
|
|
1804
1241
|
accessors: {}
|
|
1805
1242
|
}).accessors, s = this.prototype;
|
|
1806
|
-
function i
|
|
1807
|
-
const l =
|
|
1808
|
-
|
|
1243
|
+
function o(i) {
|
|
1244
|
+
const l = ie(i);
|
|
1245
|
+
r[l] || (ur(s, i), r[l] = !0);
|
|
1809
1246
|
}
|
|
1810
|
-
return
|
|
1247
|
+
return a.isArray(e) ? e.forEach(o) : o(e), this;
|
|
1811
1248
|
}
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1249
|
+
};
|
|
1250
|
+
F.accessor([
|
|
1251
|
+
"Content-Type",
|
|
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);
|
|
1816
1260
|
return {
|
|
1817
1261
|
get: () => t,
|
|
1818
|
-
set(
|
|
1819
|
-
this[
|
|
1262
|
+
set(r) {
|
|
1263
|
+
this[n] = r;
|
|
1820
1264
|
}
|
|
1821
1265
|
};
|
|
1822
1266
|
});
|
|
1823
|
-
|
|
1824
|
-
function
|
|
1825
|
-
const
|
|
1826
|
-
let
|
|
1827
|
-
return
|
|
1828
|
-
|
|
1829
|
-
}), s.normalize(),
|
|
1267
|
+
a.freezeMethods(F);
|
|
1268
|
+
function ve(t, e) {
|
|
1269
|
+
const n = this || de, r = e || n, s = F.from(r.headers);
|
|
1270
|
+
let o = r.data;
|
|
1271
|
+
return a.forEach(t, function(l) {
|
|
1272
|
+
o = l.call(n, o, s.normalize(), e ? e.status : void 0);
|
|
1273
|
+
}), s.normalize(), o;
|
|
1830
1274
|
}
|
|
1831
|
-
function
|
|
1275
|
+
function _t(t) {
|
|
1832
1276
|
return !!(t && t.__CANCEL__);
|
|
1833
1277
|
}
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
r.
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1278
|
+
let fe = class extends y {
|
|
1279
|
+
/**
|
|
1280
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1281
|
+
*
|
|
1282
|
+
* @param {string=} message The message.
|
|
1283
|
+
* @param {Object=} config The config.
|
|
1284
|
+
* @param {Object=} request The request.
|
|
1285
|
+
*
|
|
1286
|
+
* @returns {CanceledError} The created error.
|
|
1287
|
+
*/
|
|
1288
|
+
constructor(e, n, r) {
|
|
1289
|
+
super(e ?? "canceled", y.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1290
|
+
}
|
|
1291
|
+
};
|
|
1292
|
+
function At(t, e, n) {
|
|
1293
|
+
const r = n.config.validateStatus;
|
|
1294
|
+
!n.status || !r || r(n.status) ? t(n) : e(
|
|
1295
|
+
new y(
|
|
1296
|
+
"Request failed with status code " + n.status,
|
|
1297
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1298
|
+
n.config,
|
|
1299
|
+
n.request,
|
|
1300
|
+
n
|
|
1301
|
+
)
|
|
1302
|
+
);
|
|
1849
1303
|
}
|
|
1850
|
-
function
|
|
1304
|
+
function dr(t) {
|
|
1851
1305
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
1852
1306
|
return e && e[1] || "";
|
|
1853
1307
|
}
|
|
1854
|
-
function
|
|
1308
|
+
function fr(t, e) {
|
|
1855
1309
|
t = t || 10;
|
|
1856
|
-
const
|
|
1857
|
-
let s = 0,
|
|
1858
|
-
return e = e !== void 0 ? e : 1e3, function(
|
|
1859
|
-
const
|
|
1860
|
-
|
|
1861
|
-
let
|
|
1862
|
-
for (;
|
|
1863
|
-
|
|
1864
|
-
if (s = (s + 1) % t, s ===
|
|
1310
|
+
const n = new Array(t), r = new Array(t);
|
|
1311
|
+
let s = 0, o = 0, i;
|
|
1312
|
+
return e = e !== void 0 ? e : 1e3, function(f) {
|
|
1313
|
+
const u = Date.now(), c = r[o];
|
|
1314
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
1315
|
+
let d = o, R = 0;
|
|
1316
|
+
for (; d !== s; )
|
|
1317
|
+
R += n[d++], d = d % t;
|
|
1318
|
+
if (s = (s + 1) % t, s === o && (o = (o + 1) % t), u - i < e)
|
|
1865
1319
|
return;
|
|
1866
|
-
const
|
|
1867
|
-
return
|
|
1320
|
+
const S = c && u - c;
|
|
1321
|
+
return S ? Math.round(R * 1e3 / S) : void 0;
|
|
1868
1322
|
};
|
|
1869
1323
|
}
|
|
1870
|
-
function
|
|
1871
|
-
let
|
|
1872
|
-
const
|
|
1873
|
-
|
|
1324
|
+
function hr(t, e) {
|
|
1325
|
+
let n = 0, r = 1e3 / e, s, o;
|
|
1326
|
+
const i = (u, c = Date.now()) => {
|
|
1327
|
+
n = c, s = null, o && (clearTimeout(o), o = null), t(...u);
|
|
1874
1328
|
};
|
|
1875
|
-
return [(...
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
},
|
|
1880
|
-
}, () => s &&
|
|
1329
|
+
return [(...u) => {
|
|
1330
|
+
const c = Date.now(), d = c - n;
|
|
1331
|
+
d >= r ? i(u, c) : (s = u, o || (o = setTimeout(() => {
|
|
1332
|
+
o = null, i(s);
|
|
1333
|
+
}, r - d)));
|
|
1334
|
+
}, () => s && i(s)];
|
|
1881
1335
|
}
|
|
1882
|
-
const
|
|
1883
|
-
let
|
|
1884
|
-
const s =
|
|
1885
|
-
return
|
|
1886
|
-
const
|
|
1887
|
-
|
|
1888
|
-
const
|
|
1889
|
-
loaded:
|
|
1336
|
+
const Re = (t, e, n = 3) => {
|
|
1337
|
+
let r = 0;
|
|
1338
|
+
const s = fr(50, 250);
|
|
1339
|
+
return hr((o) => {
|
|
1340
|
+
const i = o.loaded, l = o.lengthComputable ? o.total : void 0, f = l != null ? Math.min(i, l) : i, u = Math.max(0, f - r), c = s(u);
|
|
1341
|
+
r = Math.max(r, f);
|
|
1342
|
+
const d = {
|
|
1343
|
+
loaded: f,
|
|
1890
1344
|
total: l,
|
|
1891
|
-
progress: l ?
|
|
1892
|
-
bytes:
|
|
1893
|
-
rate:
|
|
1894
|
-
estimated:
|
|
1895
|
-
event:
|
|
1345
|
+
progress: l ? f / l : void 0,
|
|
1346
|
+
bytes: u,
|
|
1347
|
+
rate: c || void 0,
|
|
1348
|
+
estimated: c && l ? (l - f) / c : void 0,
|
|
1349
|
+
event: o,
|
|
1896
1350
|
lengthComputable: l != null,
|
|
1897
1351
|
[e ? "download" : "upload"]: !0
|
|
1898
1352
|
};
|
|
1899
|
-
t(
|
|
1900
|
-
},
|
|
1901
|
-
},
|
|
1902
|
-
const
|
|
1903
|
-
return [
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
)
|
|
1353
|
+
t(d);
|
|
1354
|
+
}, n);
|
|
1355
|
+
}, Ze = (t, e) => {
|
|
1356
|
+
const n = t != null;
|
|
1357
|
+
return [
|
|
1358
|
+
(r) => e[0]({
|
|
1359
|
+
lengthComputable: n,
|
|
1360
|
+
total: t,
|
|
1361
|
+
loaded: r
|
|
1362
|
+
}),
|
|
1363
|
+
e[1]
|
|
1364
|
+
];
|
|
1365
|
+
}, et = (t) => (...e) => a.asap(() => t(...e)), pr = k.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, k.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
|
|
1366
|
+
new URL(k.origin),
|
|
1367
|
+
k.navigator && /(msie|trident)/i.test(k.navigator.userAgent)
|
|
1368
|
+
) : () => !0, gr = k.hasStandardBrowserEnv ? (
|
|
1912
1369
|
// Standard browser envs support document.cookie
|
|
1913
1370
|
{
|
|
1914
|
-
write(t, e,
|
|
1371
|
+
write(t, e, n, r, s, o, i) {
|
|
1915
1372
|
if (typeof document > "u") return;
|
|
1916
1373
|
const l = [`${t}=${encodeURIComponent(e)}`];
|
|
1917
|
-
|
|
1374
|
+
a.isNumber(n) && l.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && l.push(`path=${r}`), a.isString(s) && l.push(`domain=${s}`), o === !0 && l.push("secure"), a.isString(i) && l.push(`SameSite=${i}`), document.cookie = l.join("; ");
|
|
1918
1375
|
},
|
|
1919
1376
|
read(t) {
|
|
1920
1377
|
if (typeof document > "u") return null;
|
|
@@ -1937,196 +1394,227 @@ const Ye = (t, e, r = 3) => {
|
|
|
1937
1394
|
}
|
|
1938
1395
|
}
|
|
1939
1396
|
);
|
|
1940
|
-
function
|
|
1941
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1397
|
+
function mr(t) {
|
|
1398
|
+
return typeof t != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1942
1399
|
}
|
|
1943
|
-
function
|
|
1400
|
+
function yr(t, e) {
|
|
1944
1401
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
1945
1402
|
}
|
|
1946
|
-
function
|
|
1947
|
-
let
|
|
1948
|
-
return t && (
|
|
1403
|
+
function Ct(t, e, n) {
|
|
1404
|
+
let r = !mr(e);
|
|
1405
|
+
return t && (r || n === !1) ? yr(t, e) : e;
|
|
1949
1406
|
}
|
|
1950
|
-
const
|
|
1951
|
-
function
|
|
1407
|
+
const tt = (t) => t instanceof F ? { ...t } : t;
|
|
1408
|
+
function Z(t, e) {
|
|
1952
1409
|
e = e || {};
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
}
|
|
1963
|
-
function
|
|
1964
|
-
if (
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
}
|
|
1973
|
-
function
|
|
1974
|
-
if (
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
1410
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
1411
|
+
Object.defineProperty(n, "hasOwnProperty", {
|
|
1412
|
+
value: Object.prototype.hasOwnProperty,
|
|
1413
|
+
enumerable: !1,
|
|
1414
|
+
writable: !0,
|
|
1415
|
+
configurable: !0
|
|
1416
|
+
});
|
|
1417
|
+
function r(u, c, d, R) {
|
|
1418
|
+
return a.isPlainObject(u) && a.isPlainObject(c) ? a.merge.call({ caseless: R }, u, c) : a.isPlainObject(c) ? a.merge({}, c) : a.isArray(c) ? c.slice() : c;
|
|
1419
|
+
}
|
|
1420
|
+
function s(u, c, d, R) {
|
|
1421
|
+
if (a.isUndefined(c)) {
|
|
1422
|
+
if (!a.isUndefined(u))
|
|
1423
|
+
return r(void 0, u, d, R);
|
|
1424
|
+
} else return r(u, c, d, R);
|
|
1425
|
+
}
|
|
1426
|
+
function o(u, c) {
|
|
1427
|
+
if (!a.isUndefined(c))
|
|
1428
|
+
return r(void 0, c);
|
|
1429
|
+
}
|
|
1430
|
+
function i(u, c) {
|
|
1431
|
+
if (a.isUndefined(c)) {
|
|
1432
|
+
if (!a.isUndefined(u))
|
|
1433
|
+
return r(void 0, u);
|
|
1434
|
+
} else return r(void 0, c);
|
|
1435
|
+
}
|
|
1436
|
+
function l(u, c, d) {
|
|
1437
|
+
if (a.hasOwnProp(e, d))
|
|
1438
|
+
return r(u, c);
|
|
1439
|
+
if (a.hasOwnProp(t, d))
|
|
1440
|
+
return r(void 0, u);
|
|
1441
|
+
}
|
|
1442
|
+
const f = {
|
|
1443
|
+
url: o,
|
|
1444
|
+
method: o,
|
|
1445
|
+
data: o,
|
|
1446
|
+
baseURL: i,
|
|
1447
|
+
transformRequest: i,
|
|
1448
|
+
transformResponse: i,
|
|
1449
|
+
paramsSerializer: i,
|
|
1450
|
+
timeout: i,
|
|
1451
|
+
timeoutMessage: i,
|
|
1452
|
+
withCredentials: i,
|
|
1453
|
+
withXSRFToken: i,
|
|
1454
|
+
adapter: i,
|
|
1455
|
+
responseType: i,
|
|
1456
|
+
xsrfCookieName: i,
|
|
1457
|
+
xsrfHeaderName: i,
|
|
1458
|
+
onUploadProgress: i,
|
|
1459
|
+
onDownloadProgress: i,
|
|
1460
|
+
decompress: i,
|
|
1461
|
+
maxContentLength: i,
|
|
1462
|
+
maxBodyLength: i,
|
|
1463
|
+
beforeRedirect: i,
|
|
1464
|
+
transport: i,
|
|
1465
|
+
httpAgent: i,
|
|
1466
|
+
httpsAgent: i,
|
|
1467
|
+
cancelToken: i,
|
|
1468
|
+
socketPath: i,
|
|
1469
|
+
allowedSocketPaths: i,
|
|
1470
|
+
responseEncoding: i,
|
|
2007
1471
|
validateStatus: l,
|
|
2008
|
-
headers: (
|
|
1472
|
+
headers: (u, c, d) => s(tt(u), tt(c), d, !0)
|
|
2009
1473
|
};
|
|
2010
|
-
return
|
|
2011
|
-
|
|
2012
|
-
c.
|
|
2013
|
-
|
|
1474
|
+
return a.forEach(Object.keys({ ...t, ...e }), function(c) {
|
|
1475
|
+
if (c === "__proto__" || c === "constructor" || c === "prototype") return;
|
|
1476
|
+
const d = a.hasOwnProp(f, c) ? f[c] : s, R = a.hasOwnProp(t, c) ? t[c] : void 0, S = a.hasOwnProp(e, c) ? e[c] : void 0, p = d(R, S, c);
|
|
1477
|
+
a.isUndefined(p) && d !== l || (n[c] = p);
|
|
1478
|
+
}), n;
|
|
2014
1479
|
}
|
|
2015
|
-
const
|
|
2016
|
-
const e =
|
|
2017
|
-
let
|
|
2018
|
-
|
|
1480
|
+
const Pt = (t) => {
|
|
1481
|
+
const e = Z({}, t), n = (R) => a.hasOwnProp(e, R) ? e[R] : void 0, r = n("data");
|
|
1482
|
+
let s = n("withXSRFToken");
|
|
1483
|
+
const o = n("xsrfHeaderName"), i = n("xsrfCookieName");
|
|
1484
|
+
let l = n("headers");
|
|
1485
|
+
const f = n("auth"), u = n("baseURL"), c = n("allowAbsoluteUrls"), d = n("url");
|
|
1486
|
+
if (e.headers = l = F.from(l), e.url = Ot(
|
|
1487
|
+
Ct(u, d, c),
|
|
1488
|
+
t.params,
|
|
1489
|
+
t.paramsSerializer
|
|
1490
|
+
), f && l.set(
|
|
2019
1491
|
"Authorization",
|
|
2020
|
-
"Basic " + btoa(
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
1492
|
+
"Basic " + btoa(
|
|
1493
|
+
(f.username || "") + ":" + (f.password ? unescape(encodeURIComponent(f.password)) : "")
|
|
1494
|
+
)
|
|
1495
|
+
), a.isFormData(r)) {
|
|
1496
|
+
if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv)
|
|
1497
|
+
l.setContentType(void 0);
|
|
1498
|
+
else if (a.isFunction(r.getHeaders)) {
|
|
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);
|
|
2028
1502
|
});
|
|
2029
1503
|
}
|
|
2030
1504
|
}
|
|
2031
|
-
if (
|
|
2032
|
-
const
|
|
2033
|
-
|
|
1505
|
+
if (k.hasStandardBrowserEnv && (a.isFunction(s) && (s = s(e)), s === !0 || s == null && pr(e.url))) {
|
|
1506
|
+
const S = o && i && gr.read(i);
|
|
1507
|
+
S && l.set(o, S);
|
|
2034
1508
|
}
|
|
2035
1509
|
return e;
|
|
2036
|
-
},
|
|
2037
|
-
return new Promise(function(
|
|
2038
|
-
const s =
|
|
2039
|
-
let
|
|
2040
|
-
const
|
|
2041
|
-
let { responseType: l, onUploadProgress:
|
|
2042
|
-
function
|
|
2043
|
-
|
|
2044
|
-
}
|
|
2045
|
-
let
|
|
2046
|
-
|
|
2047
|
-
function
|
|
2048
|
-
if (!
|
|
1510
|
+
}, br = typeof XMLHttpRequest < "u", Er = br && function(t) {
|
|
1511
|
+
return new Promise(function(n, r) {
|
|
1512
|
+
const s = Pt(t);
|
|
1513
|
+
let o = s.data;
|
|
1514
|
+
const i = F.from(s.headers).normalize();
|
|
1515
|
+
let { responseType: l, onUploadProgress: f, onDownloadProgress: u } = s, c, d, R, S, p;
|
|
1516
|
+
function g() {
|
|
1517
|
+
S && S(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(c), s.signal && s.signal.removeEventListener("abort", c);
|
|
1518
|
+
}
|
|
1519
|
+
let h = new XMLHttpRequest();
|
|
1520
|
+
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1521
|
+
function x() {
|
|
1522
|
+
if (!h)
|
|
2049
1523
|
return;
|
|
2050
|
-
const
|
|
2051
|
-
"getAllResponseHeaders" in
|
|
2052
|
-
),
|
|
2053
|
-
data: !l || l === "text" || l === "json" ?
|
|
2054
|
-
status:
|
|
2055
|
-
statusText:
|
|
2056
|
-
headers:
|
|
1524
|
+
const O = F.from(
|
|
1525
|
+
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1526
|
+
), L = {
|
|
1527
|
+
data: !l || l === "text" || l === "json" ? h.responseText : h.response,
|
|
1528
|
+
status: h.status,
|
|
1529
|
+
statusText: h.statusText,
|
|
1530
|
+
headers: O,
|
|
2057
1531
|
config: t,
|
|
2058
|
-
request:
|
|
1532
|
+
request: h
|
|
2059
1533
|
};
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
1534
|
+
At(
|
|
1535
|
+
function(N) {
|
|
1536
|
+
n(N), g();
|
|
1537
|
+
},
|
|
1538
|
+
function(N) {
|
|
1539
|
+
r(N), g();
|
|
1540
|
+
},
|
|
1541
|
+
L
|
|
1542
|
+
), h = null;
|
|
1543
|
+
}
|
|
1544
|
+
"onloadend" in h ? h.onloadend = x : h.onreadystatechange = function() {
|
|
1545
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(x);
|
|
1546
|
+
}, h.onabort = function() {
|
|
1547
|
+
h && (r(new y("Request aborted", y.ECONNABORTED, t, h)), h = null);
|
|
1548
|
+
}, h.onerror = function(T) {
|
|
1549
|
+
const L = T && T.message ? T.message : "Network Error", K = new y(L, y.ERR_NETWORK, t, h);
|
|
1550
|
+
K.event = T || null, r(K), h = null;
|
|
1551
|
+
}, h.ontimeout = function() {
|
|
1552
|
+
let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1553
|
+
const L = s.transitional || He;
|
|
1554
|
+
s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(
|
|
1555
|
+
new y(
|
|
1556
|
+
T,
|
|
1557
|
+
L.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1558
|
+
t,
|
|
1559
|
+
h
|
|
1560
|
+
)
|
|
1561
|
+
), h = null;
|
|
1562
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(T, L) {
|
|
1563
|
+
h.setRequestHeader(L, T);
|
|
1564
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), l && l !== "json" && (h.responseType = s.responseType), u && ([R, p] = Re(u, !0), h.addEventListener("progress", R)), f && h.upload && ([d, S] = Re(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (c = (O) => {
|
|
1565
|
+
h && (r(!O || O.type ? new fe(null, t, h) : O), h.abort(), h = null);
|
|
1566
|
+
}, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
|
|
1567
|
+
const j = dr(s.url);
|
|
1568
|
+
if (j && k.protocols.indexOf(j) === -1) {
|
|
1569
|
+
r(
|
|
1570
|
+
new y(
|
|
1571
|
+
"Unsupported protocol " + j + ":",
|
|
1572
|
+
y.ERR_BAD_REQUEST,
|
|
1573
|
+
t
|
|
1574
|
+
)
|
|
1575
|
+
);
|
|
2090
1576
|
return;
|
|
2091
1577
|
}
|
|
2092
|
-
|
|
1578
|
+
h.send(o || null);
|
|
2093
1579
|
});
|
|
2094
|
-
},
|
|
2095
|
-
const { length:
|
|
2096
|
-
if (e ||
|
|
2097
|
-
let
|
|
2098
|
-
const
|
|
1580
|
+
}, wr = (t, e) => {
|
|
1581
|
+
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
1582
|
+
if (e || n) {
|
|
1583
|
+
let r = new AbortController(), s;
|
|
1584
|
+
const o = function(u) {
|
|
2099
1585
|
if (!s) {
|
|
2100
1586
|
s = !0, l();
|
|
2101
|
-
const
|
|
2102
|
-
|
|
1587
|
+
const c = u instanceof Error ? u : this.reason;
|
|
1588
|
+
r.abort(
|
|
1589
|
+
c instanceof y ? c : new fe(c instanceof Error ? c.message : c)
|
|
1590
|
+
);
|
|
2103
1591
|
}
|
|
2104
1592
|
};
|
|
2105
|
-
let
|
|
2106
|
-
|
|
1593
|
+
let i = e && setTimeout(() => {
|
|
1594
|
+
i = null, o(new y(`timeout of ${e}ms exceeded`, y.ETIMEDOUT));
|
|
2107
1595
|
}, e);
|
|
2108
1596
|
const l = () => {
|
|
2109
|
-
t && (
|
|
2110
|
-
|
|
1597
|
+
t && (i && clearTimeout(i), i = null, t.forEach((u) => {
|
|
1598
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
2111
1599
|
}), t = null);
|
|
2112
1600
|
};
|
|
2113
|
-
t.forEach((
|
|
2114
|
-
const { signal:
|
|
2115
|
-
return
|
|
1601
|
+
t.forEach((u) => u.addEventListener("abort", o));
|
|
1602
|
+
const { signal: f } = r;
|
|
1603
|
+
return f.unsubscribe = () => a.asap(l), f;
|
|
2116
1604
|
}
|
|
2117
|
-
},
|
|
2118
|
-
let
|
|
2119
|
-
if (
|
|
1605
|
+
}, Rr = function* (t, e) {
|
|
1606
|
+
let n = t.byteLength;
|
|
1607
|
+
if (n < e) {
|
|
2120
1608
|
yield t;
|
|
2121
1609
|
return;
|
|
2122
1610
|
}
|
|
2123
|
-
let
|
|
2124
|
-
for (;
|
|
2125
|
-
s =
|
|
2126
|
-
},
|
|
2127
|
-
for await (const
|
|
2128
|
-
yield*
|
|
2129
|
-
},
|
|
1611
|
+
let r = 0, s;
|
|
1612
|
+
for (; r < n; )
|
|
1613
|
+
s = r + e, yield t.slice(r, s), r = s;
|
|
1614
|
+
}, Tr = async function* (t, e) {
|
|
1615
|
+
for await (const n of xr(t))
|
|
1616
|
+
yield* Rr(n, e);
|
|
1617
|
+
}, xr = async function* (t) {
|
|
2130
1618
|
if (t[Symbol.asyncIterator]) {
|
|
2131
1619
|
yield* t;
|
|
2132
1620
|
return;
|
|
@@ -2134,208 +1622,229 @@ const _r = (t) => {
|
|
|
2134
1622
|
const e = t.getReader();
|
|
2135
1623
|
try {
|
|
2136
1624
|
for (; ; ) {
|
|
2137
|
-
const { done:
|
|
2138
|
-
if (
|
|
1625
|
+
const { done: n, value: r } = await e.read();
|
|
1626
|
+
if (n)
|
|
2139
1627
|
break;
|
|
2140
|
-
yield
|
|
1628
|
+
yield r;
|
|
2141
1629
|
}
|
|
2142
1630
|
} finally {
|
|
2143
1631
|
await e.cancel();
|
|
2144
1632
|
}
|
|
2145
|
-
},
|
|
2146
|
-
const s =
|
|
2147
|
-
let
|
|
2148
|
-
|
|
1633
|
+
}, nt = (t, e, n, r) => {
|
|
1634
|
+
const s = Tr(t, e);
|
|
1635
|
+
let o = 0, i, l = (f) => {
|
|
1636
|
+
i || (i = !0, r && r(f));
|
|
2149
1637
|
};
|
|
2150
|
-
return new ReadableStream(
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
1638
|
+
return new ReadableStream(
|
|
1639
|
+
{
|
|
1640
|
+
async pull(f) {
|
|
1641
|
+
try {
|
|
1642
|
+
const { done: u, value: c } = await s.next();
|
|
1643
|
+
if (u) {
|
|
1644
|
+
l(), f.close();
|
|
1645
|
+
return;
|
|
1646
|
+
}
|
|
1647
|
+
let d = c.byteLength;
|
|
1648
|
+
if (n) {
|
|
1649
|
+
let R = o += d;
|
|
1650
|
+
n(R);
|
|
1651
|
+
}
|
|
1652
|
+
f.enqueue(new Uint8Array(c));
|
|
1653
|
+
} catch (u) {
|
|
1654
|
+
throw l(u), u;
|
|
2162
1655
|
}
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
1656
|
+
},
|
|
1657
|
+
cancel(f) {
|
|
1658
|
+
return l(f), s.return();
|
|
2166
1659
|
}
|
|
2167
1660
|
},
|
|
2168
|
-
|
|
2169
|
-
|
|
1661
|
+
{
|
|
1662
|
+
highWaterMark: 2
|
|
2170
1663
|
}
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
});
|
|
2174
|
-
}, Yt = 64 * 1024, { isFunction: Ve } = c, Ds = (({ Request: t, Response: e }) => ({
|
|
1664
|
+
);
|
|
1665
|
+
}, rt = 64 * 1024, { isFunction: ye } = a, Or = (({ Request: t, Response: e }) => ({
|
|
2175
1666
|
Request: t,
|
|
2176
1667
|
Response: e
|
|
2177
|
-
}))(
|
|
2178
|
-
ReadableStream: Gt,
|
|
2179
|
-
TextEncoder: Xt
|
|
2180
|
-
} = c.global, Qt = (t, ...e) => {
|
|
1668
|
+
}))(a.global), { ReadableStream: st, TextEncoder: ot } = a.global, it = (t, ...e) => {
|
|
2181
1669
|
try {
|
|
2182
1670
|
return !!t(...e);
|
|
2183
1671
|
} catch {
|
|
2184
1672
|
return !1;
|
|
2185
1673
|
}
|
|
2186
|
-
},
|
|
2187
|
-
t =
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
1674
|
+
}, Sr = (t) => {
|
|
1675
|
+
t = a.merge.call(
|
|
1676
|
+
{
|
|
1677
|
+
skipUndefined: !0
|
|
1678
|
+
},
|
|
1679
|
+
Or,
|
|
1680
|
+
t
|
|
1681
|
+
);
|
|
1682
|
+
const { fetch: e, Request: n, Response: r } = t, s = e ? ye(e) : typeof fetch == "function", o = ye(n), i = ye(r);
|
|
2191
1683
|
if (!s)
|
|
2192
1684
|
return !1;
|
|
2193
|
-
const l = s &&
|
|
2194
|
-
let
|
|
2195
|
-
const
|
|
2196
|
-
body: new
|
|
1685
|
+
const l = s && ye(st), f = s && (typeof ot == "function" ? /* @__PURE__ */ ((p) => (g) => p.encode(g))(new ot()) : async (p) => new Uint8Array(await new n(p).arrayBuffer())), u = o && l && it(() => {
|
|
1686
|
+
let p = !1;
|
|
1687
|
+
const g = new n(k.origin, {
|
|
1688
|
+
body: new st(),
|
|
2197
1689
|
method: "POST",
|
|
2198
1690
|
get duplex() {
|
|
2199
|
-
return
|
|
1691
|
+
return p = !0, "half";
|
|
2200
1692
|
}
|
|
2201
|
-
}).headers.has("Content-Type");
|
|
2202
|
-
return
|
|
2203
|
-
}),
|
|
2204
|
-
stream:
|
|
1693
|
+
}), h = g.headers.has("Content-Type");
|
|
1694
|
+
return g.body != null && g.body.cancel(), p && !h;
|
|
1695
|
+
}), c = i && l && it(() => a.isReadableStream(new r("").body)), d = {
|
|
1696
|
+
stream: c && ((p) => p.body)
|
|
2205
1697
|
};
|
|
2206
|
-
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
2207
|
-
!
|
|
2208
|
-
let
|
|
2209
|
-
if (
|
|
2210
|
-
return
|
|
2211
|
-
throw new
|
|
1698
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
|
|
1699
|
+
!d[p] && (d[p] = (g, h) => {
|
|
1700
|
+
let x = g && g[p];
|
|
1701
|
+
if (x)
|
|
1702
|
+
return x.call(g);
|
|
1703
|
+
throw new y(
|
|
1704
|
+
`Response type '${p}' is not supported`,
|
|
1705
|
+
y.ERR_NOT_SUPPORT,
|
|
1706
|
+
h
|
|
1707
|
+
);
|
|
2212
1708
|
});
|
|
2213
1709
|
});
|
|
2214
|
-
const
|
|
2215
|
-
if (
|
|
1710
|
+
const R = async (p) => {
|
|
1711
|
+
if (p == null)
|
|
2216
1712
|
return 0;
|
|
2217
|
-
if (
|
|
2218
|
-
return
|
|
2219
|
-
if (
|
|
2220
|
-
return (await new
|
|
1713
|
+
if (a.isBlob(p))
|
|
1714
|
+
return p.size;
|
|
1715
|
+
if (a.isSpecCompliantForm(p))
|
|
1716
|
+
return (await new n(k.origin, {
|
|
2221
1717
|
method: "POST",
|
|
2222
|
-
body:
|
|
1718
|
+
body: p
|
|
2223
1719
|
}).arrayBuffer()).byteLength;
|
|
2224
|
-
if (
|
|
2225
|
-
return
|
|
2226
|
-
if (
|
|
2227
|
-
return (await
|
|
2228
|
-
},
|
|
2229
|
-
const
|
|
2230
|
-
return
|
|
1720
|
+
if (a.isArrayBufferView(p) || a.isArrayBuffer(p))
|
|
1721
|
+
return p.byteLength;
|
|
1722
|
+
if (a.isURLSearchParams(p) && (p = p + ""), a.isString(p))
|
|
1723
|
+
return (await f(p)).byteLength;
|
|
1724
|
+
}, S = async (p, g) => {
|
|
1725
|
+
const h = a.toFiniteNumber(p.getContentLength());
|
|
1726
|
+
return h ?? R(g);
|
|
2231
1727
|
};
|
|
2232
|
-
return async (
|
|
1728
|
+
return async (p) => {
|
|
2233
1729
|
let {
|
|
2234
|
-
url:
|
|
2235
|
-
method:
|
|
2236
|
-
data:
|
|
2237
|
-
signal:
|
|
2238
|
-
cancelToken:
|
|
2239
|
-
timeout:
|
|
2240
|
-
onDownloadProgress:
|
|
2241
|
-
onUploadProgress:
|
|
2242
|
-
responseType:
|
|
2243
|
-
headers:
|
|
2244
|
-
withCredentials:
|
|
2245
|
-
fetchOptions:
|
|
2246
|
-
} =
|
|
2247
|
-
|
|
2248
|
-
let
|
|
2249
|
-
|
|
2250
|
-
|
|
1730
|
+
url: g,
|
|
1731
|
+
method: h,
|
|
1732
|
+
data: x,
|
|
1733
|
+
signal: j,
|
|
1734
|
+
cancelToken: O,
|
|
1735
|
+
timeout: T,
|
|
1736
|
+
onDownloadProgress: L,
|
|
1737
|
+
onUploadProgress: K,
|
|
1738
|
+
responseType: N,
|
|
1739
|
+
headers: U,
|
|
1740
|
+
withCredentials: q = "same-origin",
|
|
1741
|
+
fetchOptions: se
|
|
1742
|
+
} = Pt(p), G = e || fetch;
|
|
1743
|
+
N = N ? (N + "").toLowerCase() : "text";
|
|
1744
|
+
let X = wr(
|
|
1745
|
+
[j, O && O.toAbortSignal()],
|
|
1746
|
+
T
|
|
1747
|
+
), J = null;
|
|
1748
|
+
const $ = X && X.unsubscribe && (() => {
|
|
1749
|
+
X.unsubscribe();
|
|
2251
1750
|
});
|
|
2252
|
-
let
|
|
1751
|
+
let m;
|
|
2253
1752
|
try {
|
|
2254
|
-
if (
|
|
2255
|
-
let
|
|
1753
|
+
if (K && u && h !== "get" && h !== "head" && (m = await S(U, x)) !== 0) {
|
|
1754
|
+
let C = new n(g, {
|
|
2256
1755
|
method: "POST",
|
|
2257
|
-
body:
|
|
1756
|
+
body: x,
|
|
2258
1757
|
duplex: "half"
|
|
2259
|
-
}),
|
|
2260
|
-
if (
|
|
2261
|
-
const [
|
|
2262
|
-
|
|
2263
|
-
|
|
1758
|
+
}), P;
|
|
1759
|
+
if (a.isFormData(x) && (P = C.headers.get("content-type")) && U.setContentType(P), C.body) {
|
|
1760
|
+
const [I, ee] = Ze(
|
|
1761
|
+
m,
|
|
1762
|
+
Re(et(K))
|
|
2264
1763
|
);
|
|
2265
|
-
|
|
1764
|
+
x = nt(C.body, rt, I, ee);
|
|
2266
1765
|
}
|
|
2267
1766
|
}
|
|
2268
|
-
|
|
2269
|
-
const
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
1767
|
+
a.isString(q) || (q = q ? "include" : "omit");
|
|
1768
|
+
const b = o && "credentials" in n.prototype;
|
|
1769
|
+
if (a.isFormData(x)) {
|
|
1770
|
+
const C = U.getContentType();
|
|
1771
|
+
C && /^multipart\/form-data/i.test(C) && !/boundary=/i.test(C) && U.delete("content-type");
|
|
1772
|
+
}
|
|
1773
|
+
const w = {
|
|
1774
|
+
...se,
|
|
1775
|
+
signal: X,
|
|
1776
|
+
method: h.toUpperCase(),
|
|
1777
|
+
headers: U.normalize().toJSON(),
|
|
1778
|
+
body: x,
|
|
2275
1779
|
duplex: "half",
|
|
2276
|
-
credentials:
|
|
1780
|
+
credentials: b ? q : void 0
|
|
2277
1781
|
};
|
|
2278
|
-
|
|
2279
|
-
let
|
|
2280
|
-
const
|
|
2281
|
-
if (
|
|
2282
|
-
const
|
|
2283
|
-
["status", "statusText", "headers"].forEach((
|
|
2284
|
-
|
|
1782
|
+
J = o && new n(g, w);
|
|
1783
|
+
let E = await (o ? G(J, se) : G(g, w));
|
|
1784
|
+
const A = c && (N === "stream" || N === "response");
|
|
1785
|
+
if (c && (L || A && $)) {
|
|
1786
|
+
const C = {};
|
|
1787
|
+
["status", "statusText", "headers"].forEach((oe) => {
|
|
1788
|
+
C[oe] = E[oe];
|
|
2285
1789
|
});
|
|
2286
|
-
const
|
|
2287
|
-
|
|
2288
|
-
|
|
1790
|
+
const P = a.toFiniteNumber(E.headers.get("content-length")), [I, ee] = L && Ze(
|
|
1791
|
+
P,
|
|
1792
|
+
Re(et(L), !0)
|
|
2289
1793
|
) || [];
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
1794
|
+
E = new r(
|
|
1795
|
+
nt(E.body, rt, I, () => {
|
|
1796
|
+
ee && ee(), $ && $();
|
|
2293
1797
|
}),
|
|
2294
|
-
|
|
1798
|
+
C
|
|
2295
1799
|
);
|
|
2296
1800
|
}
|
|
2297
|
-
|
|
2298
|
-
let
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
1801
|
+
N = N || "text";
|
|
1802
|
+
let W = await d[a.findKey(d, N) || "text"](
|
|
1803
|
+
E,
|
|
1804
|
+
p
|
|
1805
|
+
);
|
|
1806
|
+
return !A && $ && $(), await new Promise((C, P) => {
|
|
1807
|
+
At(C, P, {
|
|
1808
|
+
data: W,
|
|
1809
|
+
headers: F.from(E.headers),
|
|
1810
|
+
status: E.status,
|
|
1811
|
+
statusText: E.statusText,
|
|
1812
|
+
config: p,
|
|
1813
|
+
request: J
|
|
2307
1814
|
});
|
|
2308
1815
|
});
|
|
2309
|
-
} catch (
|
|
2310
|
-
throw
|
|
2311
|
-
new
|
|
1816
|
+
} catch (b) {
|
|
1817
|
+
throw $ && $(), b && b.name === "TypeError" && /Load failed|fetch/i.test(b.message) ? Object.assign(
|
|
1818
|
+
new y(
|
|
1819
|
+
"Network Error",
|
|
1820
|
+
y.ERR_NETWORK,
|
|
1821
|
+
p,
|
|
1822
|
+
J,
|
|
1823
|
+
b && b.response
|
|
1824
|
+
),
|
|
2312
1825
|
{
|
|
2313
|
-
cause:
|
|
1826
|
+
cause: b.cause || b
|
|
2314
1827
|
}
|
|
2315
|
-
) :
|
|
1828
|
+
) : y.from(b, b && b.code, p, J, b && b.response);
|
|
2316
1829
|
}
|
|
2317
1830
|
};
|
|
2318
|
-
},
|
|
1831
|
+
}, _r = /* @__PURE__ */ new Map(), Lt = (t) => {
|
|
2319
1832
|
let e = t && t.env || {};
|
|
2320
|
-
const { fetch:
|
|
2321
|
-
|
|
2322
|
-
s,
|
|
2323
|
-
r
|
|
2324
|
-
];
|
|
2325
|
-
let a = i.length, l = a, g, f, u = Us;
|
|
1833
|
+
const { fetch: n, Request: r, Response: s } = e, o = [r, s, n];
|
|
1834
|
+
let i = o.length, l = i, f, u, c = _r;
|
|
2326
1835
|
for (; l--; )
|
|
2327
|
-
|
|
2328
|
-
return
|
|
1836
|
+
f = o[l], u = c.get(f), u === void 0 && c.set(f, u = l ? /* @__PURE__ */ new Map() : Sr(e)), c = u;
|
|
1837
|
+
return u;
|
|
2329
1838
|
};
|
|
2330
|
-
|
|
2331
|
-
const
|
|
2332
|
-
http:
|
|
2333
|
-
xhr:
|
|
1839
|
+
Lt();
|
|
1840
|
+
const Ke = {
|
|
1841
|
+
http: In,
|
|
1842
|
+
xhr: Er,
|
|
2334
1843
|
fetch: {
|
|
2335
|
-
get:
|
|
1844
|
+
get: Lt
|
|
2336
1845
|
}
|
|
2337
1846
|
};
|
|
2338
|
-
|
|
1847
|
+
a.forEach(Ke, (t, e) => {
|
|
2339
1848
|
if (t) {
|
|
2340
1849
|
try {
|
|
2341
1850
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -2344,123 +1853,122 @@ c.forEach(vt, (t, e) => {
|
|
|
2344
1853
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
2345
1854
|
}
|
|
2346
1855
|
});
|
|
2347
|
-
const
|
|
2348
|
-
function
|
|
2349
|
-
t =
|
|
2350
|
-
const { length:
|
|
2351
|
-
let
|
|
2352
|
-
const
|
|
2353
|
-
for (let
|
|
2354
|
-
|
|
1856
|
+
const at = (t) => `- ${t}`, Ar = (t) => a.isFunction(t) || t === null || t === !1;
|
|
1857
|
+
function Cr(t, e) {
|
|
1858
|
+
t = a.isArray(t) ? t : [t];
|
|
1859
|
+
const { length: n } = t;
|
|
1860
|
+
let r, s;
|
|
1861
|
+
const o = {};
|
|
1862
|
+
for (let i = 0; i < n; i++) {
|
|
1863
|
+
r = t[i];
|
|
2355
1864
|
let l;
|
|
2356
|
-
if (s =
|
|
2357
|
-
throw new
|
|
2358
|
-
if (s && (
|
|
1865
|
+
if (s = r, !Ar(r) && (s = Ke[(l = String(r)).toLowerCase()], s === void 0))
|
|
1866
|
+
throw new y(`Unknown adapter '${l}'`);
|
|
1867
|
+
if (s && (a.isFunction(s) || (s = s.get(e))))
|
|
2359
1868
|
break;
|
|
2360
|
-
|
|
1869
|
+
o[l || "#" + i] = s;
|
|
2361
1870
|
}
|
|
2362
1871
|
if (!s) {
|
|
2363
|
-
const
|
|
2364
|
-
([
|
|
1872
|
+
const i = Object.entries(o).map(
|
|
1873
|
+
([f, u]) => `adapter ${f} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2365
1874
|
);
|
|
2366
|
-
let l =
|
|
2367
|
-
` +
|
|
2368
|
-
`) : " " +
|
|
2369
|
-
throw new
|
|
1875
|
+
let l = n ? i.length > 1 ? `since :
|
|
1876
|
+
` + i.map(at).join(`
|
|
1877
|
+
`) : " " + at(i[0]) : "as no adapter specified";
|
|
1878
|
+
throw new y(
|
|
2370
1879
|
"There is no suitable adapter to dispatch the request " + l,
|
|
2371
1880
|
"ERR_NOT_SUPPORT"
|
|
2372
1881
|
);
|
|
2373
1882
|
}
|
|
2374
1883
|
return s;
|
|
2375
1884
|
}
|
|
2376
|
-
const
|
|
1885
|
+
const kt = {
|
|
2377
1886
|
/**
|
|
2378
1887
|
* Resolve an adapter from a list of adapter names or functions.
|
|
2379
1888
|
* @type {Function}
|
|
2380
1889
|
*/
|
|
2381
|
-
getAdapter:
|
|
1890
|
+
getAdapter: Cr,
|
|
2382
1891
|
/**
|
|
2383
1892
|
* Exposes all known adapters
|
|
2384
1893
|
* @type {Object<string, Function|Object>}
|
|
2385
1894
|
*/
|
|
2386
|
-
adapters:
|
|
1895
|
+
adapters: Ke
|
|
2387
1896
|
};
|
|
2388
|
-
function
|
|
1897
|
+
function De(t) {
|
|
2389
1898
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
2390
|
-
throw new
|
|
1899
|
+
throw new fe(null, t);
|
|
2391
1900
|
}
|
|
2392
|
-
function
|
|
2393
|
-
return
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
t,
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
t.transformResponse,
|
|
2406
|
-
n.response
|
|
2407
|
-
), n.response.headers = X.from(n.response.headers))), Promise.reject(n);
|
|
2408
|
-
});
|
|
1901
|
+
function lt(t) {
|
|
1902
|
+
return De(t), t.headers = F.from(t.headers), t.data = ve.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), kt.getAdapter(t.adapter || de.adapter, t)(t).then(
|
|
1903
|
+
function(r) {
|
|
1904
|
+
return De(t), r.data = ve.call(t, t.transformResponse, r), r.headers = F.from(r.headers), r;
|
|
1905
|
+
},
|
|
1906
|
+
function(r) {
|
|
1907
|
+
return _t(r) || (De(t), r && r.response && (r.response.data = ve.call(
|
|
1908
|
+
t,
|
|
1909
|
+
t.transformResponse,
|
|
1910
|
+
r.response
|
|
1911
|
+
), r.response.headers = F.from(r.response.headers))), Promise.reject(r);
|
|
1912
|
+
}
|
|
1913
|
+
);
|
|
2409
1914
|
}
|
|
2410
|
-
const
|
|
1915
|
+
const Nt = "1.15.2", Ae = {};
|
|
2411
1916
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
2412
|
-
|
|
2413
|
-
return typeof
|
|
1917
|
+
Ae[t] = function(r) {
|
|
1918
|
+
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
2414
1919
|
};
|
|
2415
1920
|
});
|
|
2416
|
-
const
|
|
2417
|
-
|
|
2418
|
-
function s(
|
|
2419
|
-
return "[Axios v" +
|
|
1921
|
+
const ct = {};
|
|
1922
|
+
Ae.transitional = function(e, n, r) {
|
|
1923
|
+
function s(o, i) {
|
|
1924
|
+
return "[Axios v" + Nt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
2420
1925
|
}
|
|
2421
|
-
return (
|
|
1926
|
+
return (o, i, l) => {
|
|
2422
1927
|
if (e === !1)
|
|
2423
|
-
throw new
|
|
2424
|
-
s(
|
|
2425
|
-
|
|
1928
|
+
throw new y(
|
|
1929
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1930
|
+
y.ERR_DEPRECATED
|
|
2426
1931
|
);
|
|
2427
|
-
return
|
|
1932
|
+
return n && !ct[i] && (ct[i] = !0, console.warn(
|
|
2428
1933
|
s(
|
|
2429
|
-
|
|
2430
|
-
" has been deprecated since v" +
|
|
1934
|
+
i,
|
|
1935
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
2431
1936
|
)
|
|
2432
|
-
)), e ? e(
|
|
1937
|
+
)), e ? e(o, i, l) : !0;
|
|
2433
1938
|
};
|
|
2434
1939
|
};
|
|
2435
|
-
|
|
2436
|
-
return (
|
|
1940
|
+
Ae.spelling = function(e) {
|
|
1941
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
|
|
2437
1942
|
};
|
|
2438
|
-
function
|
|
1943
|
+
function Pr(t, e, n) {
|
|
2439
1944
|
if (typeof t != "object")
|
|
2440
|
-
throw new
|
|
2441
|
-
const
|
|
2442
|
-
let s =
|
|
1945
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1946
|
+
const r = Object.keys(t);
|
|
1947
|
+
let s = r.length;
|
|
2443
1948
|
for (; s-- > 0; ) {
|
|
2444
|
-
const
|
|
2445
|
-
if (
|
|
2446
|
-
const l = t[
|
|
2447
|
-
if (
|
|
2448
|
-
throw new
|
|
1949
|
+
const o = r[s], i = Object.prototype.hasOwnProperty.call(e, o) ? e[o] : void 0;
|
|
1950
|
+
if (i) {
|
|
1951
|
+
const l = t[o], f = l === void 0 || i(l, o, t);
|
|
1952
|
+
if (f !== !0)
|
|
1953
|
+
throw new y(
|
|
1954
|
+
"option " + o + " must be " + f,
|
|
1955
|
+
y.ERR_BAD_OPTION_VALUE
|
|
1956
|
+
);
|
|
2449
1957
|
continue;
|
|
2450
1958
|
}
|
|
2451
|
-
if (
|
|
2452
|
-
throw new
|
|
1959
|
+
if (n !== !0)
|
|
1960
|
+
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
2453
1961
|
}
|
|
2454
1962
|
}
|
|
2455
|
-
const
|
|
2456
|
-
assertOptions:
|
|
2457
|
-
validators:
|
|
2458
|
-
},
|
|
2459
|
-
class
|
|
1963
|
+
const we = {
|
|
1964
|
+
assertOptions: Pr,
|
|
1965
|
+
validators: Ae
|
|
1966
|
+
}, M = we.validators;
|
|
1967
|
+
let Y = class {
|
|
2460
1968
|
constructor(e) {
|
|
2461
1969
|
this.defaults = e || {}, this.interceptors = {
|
|
2462
|
-
request: new
|
|
2463
|
-
response: new
|
|
1970
|
+
request: new Qe(),
|
|
1971
|
+
response: new Qe()
|
|
2464
1972
|
};
|
|
2465
1973
|
}
|
|
2466
1974
|
/**
|
|
@@ -2471,140 +1979,168 @@ class me {
|
|
|
2471
1979
|
*
|
|
2472
1980
|
* @returns {Promise} The Promise to be fulfilled
|
|
2473
1981
|
*/
|
|
2474
|
-
async request(e,
|
|
1982
|
+
async request(e, n) {
|
|
2475
1983
|
try {
|
|
2476
|
-
return await this._request(e,
|
|
2477
|
-
} catch (
|
|
2478
|
-
if (
|
|
1984
|
+
return await this._request(e, n);
|
|
1985
|
+
} catch (r) {
|
|
1986
|
+
if (r instanceof Error) {
|
|
2479
1987
|
let s = {};
|
|
2480
1988
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2481
|
-
const
|
|
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
|
+
})();
|
|
2482
1996
|
try {
|
|
2483
|
-
|
|
2484
|
-
|
|
1997
|
+
if (!r.stack)
|
|
1998
|
+
r.stack = o;
|
|
1999
|
+
else if (o) {
|
|
2000
|
+
const i = o.indexOf(`
|
|
2001
|
+
`), l = i === -1 ? -1 : o.indexOf(`
|
|
2002
|
+
`, i + 1), f = l === -1 ? "" : o.slice(l + 1);
|
|
2003
|
+
String(r.stack).endsWith(f) || (r.stack += `
|
|
2004
|
+
` + o);
|
|
2005
|
+
}
|
|
2485
2006
|
} catch {
|
|
2486
2007
|
}
|
|
2487
2008
|
}
|
|
2488
|
-
throw
|
|
2009
|
+
throw r;
|
|
2489
2010
|
}
|
|
2490
2011
|
}
|
|
2491
|
-
_request(e,
|
|
2492
|
-
typeof e == "string" ? (
|
|
2493
|
-
const { transitional:
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2012
|
+
_request(e, n) {
|
|
2013
|
+
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = Z(this.defaults, n);
|
|
2014
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
2015
|
+
r !== void 0 && we.assertOptions(
|
|
2016
|
+
r,
|
|
2017
|
+
{
|
|
2018
|
+
silentJSONParsing: M.transitional(M.boolean),
|
|
2019
|
+
forcedJSONParsing: M.transitional(M.boolean),
|
|
2020
|
+
clarifyTimeoutError: M.transitional(M.boolean),
|
|
2021
|
+
legacyInterceptorReqResOrdering: M.transitional(M.boolean)
|
|
2022
|
+
},
|
|
2023
|
+
!1
|
|
2024
|
+
), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
2499
2025
|
serialize: s
|
|
2500
|
-
} :
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2026
|
+
} : we.assertOptions(
|
|
2027
|
+
s,
|
|
2028
|
+
{
|
|
2029
|
+
encode: M.function,
|
|
2030
|
+
serialize: M.function
|
|
2031
|
+
},
|
|
2032
|
+
!0
|
|
2033
|
+
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), we.assertOptions(
|
|
2034
|
+
n,
|
|
2035
|
+
{
|
|
2036
|
+
baseUrl: M.spelling("baseURL"),
|
|
2037
|
+
withXsrfToken: M.spelling("withXSRFToken")
|
|
2038
|
+
},
|
|
2039
|
+
!0
|
|
2040
|
+
), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2041
|
+
let i = o && a.merge(o.common, o[n.method]);
|
|
2042
|
+
o && a.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (p) => {
|
|
2043
|
+
delete o[p];
|
|
2044
|
+
}), n.headers = F.concat(i, o);
|
|
2517
2045
|
const l = [];
|
|
2518
|
-
let
|
|
2519
|
-
this.interceptors.request.forEach(function(
|
|
2520
|
-
typeof
|
|
2046
|
+
let f = !0;
|
|
2047
|
+
this.interceptors.request.forEach(function(g) {
|
|
2048
|
+
if (typeof g.runWhen == "function" && g.runWhen(n) === !1)
|
|
2049
|
+
return;
|
|
2050
|
+
f = f && g.synchronous;
|
|
2051
|
+
const h = n.transitional || He;
|
|
2052
|
+
h && h.legacyInterceptorReqResOrdering ? l.unshift(g.fulfilled, g.rejected) : l.push(g.fulfilled, g.rejected);
|
|
2521
2053
|
});
|
|
2522
|
-
const
|
|
2523
|
-
this.interceptors.response.forEach(function(
|
|
2524
|
-
|
|
2054
|
+
const u = [];
|
|
2055
|
+
this.interceptors.response.forEach(function(g) {
|
|
2056
|
+
u.push(g.fulfilled, g.rejected);
|
|
2525
2057
|
});
|
|
2526
|
-
let
|
|
2527
|
-
if (!
|
|
2528
|
-
const
|
|
2529
|
-
for (
|
|
2530
|
-
|
|
2531
|
-
return
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
|
-
let
|
|
2535
|
-
for (;
|
|
2536
|
-
const
|
|
2058
|
+
let c, d = 0, R;
|
|
2059
|
+
if (!f) {
|
|
2060
|
+
const p = [lt.bind(this), void 0];
|
|
2061
|
+
for (p.unshift(...l), p.push(...u), R = p.length, c = Promise.resolve(n); d < R; )
|
|
2062
|
+
c = c.then(p[d++], p[d++]);
|
|
2063
|
+
return c;
|
|
2064
|
+
}
|
|
2065
|
+
R = l.length;
|
|
2066
|
+
let S = n;
|
|
2067
|
+
for (; d < R; ) {
|
|
2068
|
+
const p = l[d++], g = l[d++];
|
|
2537
2069
|
try {
|
|
2538
|
-
|
|
2539
|
-
} catch (
|
|
2540
|
-
|
|
2070
|
+
S = p(S);
|
|
2071
|
+
} catch (h) {
|
|
2072
|
+
g.call(this, h);
|
|
2541
2073
|
break;
|
|
2542
2074
|
}
|
|
2543
2075
|
}
|
|
2544
2076
|
try {
|
|
2545
|
-
|
|
2546
|
-
} catch (
|
|
2547
|
-
return Promise.reject(
|
|
2077
|
+
c = lt.call(this, S);
|
|
2078
|
+
} catch (p) {
|
|
2079
|
+
return Promise.reject(p);
|
|
2548
2080
|
}
|
|
2549
|
-
for (
|
|
2550
|
-
|
|
2551
|
-
return
|
|
2081
|
+
for (d = 0, R = u.length; d < R; )
|
|
2082
|
+
c = c.then(u[d++], u[d++]);
|
|
2083
|
+
return c;
|
|
2552
2084
|
}
|
|
2553
2085
|
getUri(e) {
|
|
2554
|
-
e =
|
|
2555
|
-
const
|
|
2556
|
-
return
|
|
2086
|
+
e = Z(this.defaults, e);
|
|
2087
|
+
const n = Ct(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
2088
|
+
return Ot(n, e.params, e.paramsSerializer);
|
|
2557
2089
|
}
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
return this.request(
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2090
|
+
};
|
|
2091
|
+
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2092
|
+
Y.prototype[e] = function(n, r) {
|
|
2093
|
+
return this.request(
|
|
2094
|
+
Z(r || {}, {
|
|
2095
|
+
method: e,
|
|
2096
|
+
url: n,
|
|
2097
|
+
data: (r || {}).data
|
|
2098
|
+
})
|
|
2099
|
+
);
|
|
2566
2100
|
};
|
|
2567
2101
|
});
|
|
2568
|
-
|
|
2569
|
-
function r
|
|
2570
|
-
return function(
|
|
2571
|
-
return this.request(
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2102
|
+
a.forEach(["post", "put", "patch"], function(e) {
|
|
2103
|
+
function n(r) {
|
|
2104
|
+
return function(o, i, l) {
|
|
2105
|
+
return this.request(
|
|
2106
|
+
Z(l || {}, {
|
|
2107
|
+
method: e,
|
|
2108
|
+
headers: r ? {
|
|
2109
|
+
"Content-Type": "multipart/form-data"
|
|
2110
|
+
} : {},
|
|
2111
|
+
url: o,
|
|
2112
|
+
data: i
|
|
2113
|
+
})
|
|
2114
|
+
);
|
|
2579
2115
|
};
|
|
2580
2116
|
}
|
|
2581
|
-
|
|
2117
|
+
Y.prototype[e] = n(), Y.prototype[e + "Form"] = n(!0);
|
|
2582
2118
|
});
|
|
2583
|
-
class
|
|
2119
|
+
let Lr = class vt {
|
|
2584
2120
|
constructor(e) {
|
|
2585
2121
|
if (typeof e != "function")
|
|
2586
2122
|
throw new TypeError("executor must be a function.");
|
|
2587
|
-
let
|
|
2588
|
-
this.promise = new Promise(function(
|
|
2589
|
-
|
|
2123
|
+
let n;
|
|
2124
|
+
this.promise = new Promise(function(o) {
|
|
2125
|
+
n = o;
|
|
2590
2126
|
});
|
|
2591
|
-
const
|
|
2127
|
+
const r = this;
|
|
2592
2128
|
this.promise.then((s) => {
|
|
2593
|
-
if (!
|
|
2594
|
-
let
|
|
2595
|
-
for (;
|
|
2596
|
-
|
|
2597
|
-
|
|
2129
|
+
if (!r._listeners) return;
|
|
2130
|
+
let o = r._listeners.length;
|
|
2131
|
+
for (; o-- > 0; )
|
|
2132
|
+
r._listeners[o](s);
|
|
2133
|
+
r._listeners = null;
|
|
2598
2134
|
}), this.promise.then = (s) => {
|
|
2599
|
-
let
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2135
|
+
let o;
|
|
2136
|
+
const i = new Promise((l) => {
|
|
2137
|
+
r.subscribe(l), o = l;
|
|
2602
2138
|
}).then(s);
|
|
2603
|
-
return
|
|
2604
|
-
|
|
2605
|
-
},
|
|
2606
|
-
}, e(function(
|
|
2607
|
-
|
|
2139
|
+
return i.cancel = function() {
|
|
2140
|
+
r.unsubscribe(o);
|
|
2141
|
+
}, i;
|
|
2142
|
+
}, e(function(o, i, l) {
|
|
2143
|
+
r.reason || (r.reason = new fe(o, i, l), n(r.reason));
|
|
2608
2144
|
});
|
|
2609
2145
|
}
|
|
2610
2146
|
/**
|
|
@@ -2630,14 +2166,14 @@ class Rt {
|
|
|
2630
2166
|
unsubscribe(e) {
|
|
2631
2167
|
if (!this._listeners)
|
|
2632
2168
|
return;
|
|
2633
|
-
const
|
|
2634
|
-
|
|
2169
|
+
const n = this._listeners.indexOf(e);
|
|
2170
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2635
2171
|
}
|
|
2636
2172
|
toAbortSignal() {
|
|
2637
|
-
const e = new AbortController(),
|
|
2638
|
-
e.abort(
|
|
2173
|
+
const e = new AbortController(), n = (r) => {
|
|
2174
|
+
e.abort(r);
|
|
2639
2175
|
};
|
|
2640
|
-
return this.subscribe(
|
|
2176
|
+
return this.subscribe(n), e.signal.unsubscribe = () => this.unsubscribe(n), e.signal;
|
|
2641
2177
|
}
|
|
2642
2178
|
/**
|
|
2643
2179
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -2646,22 +2182,22 @@ class Rt {
|
|
|
2646
2182
|
static source() {
|
|
2647
2183
|
let e;
|
|
2648
2184
|
return {
|
|
2649
|
-
token: new
|
|
2185
|
+
token: new vt(function(s) {
|
|
2650
2186
|
e = s;
|
|
2651
2187
|
}),
|
|
2652
2188
|
cancel: e
|
|
2653
2189
|
};
|
|
2654
2190
|
}
|
|
2655
|
-
}
|
|
2656
|
-
function
|
|
2657
|
-
return function(
|
|
2658
|
-
return t.apply(null,
|
|
2191
|
+
};
|
|
2192
|
+
function kr(t) {
|
|
2193
|
+
return function(n) {
|
|
2194
|
+
return t.apply(null, n);
|
|
2659
2195
|
};
|
|
2660
2196
|
}
|
|
2661
|
-
function
|
|
2662
|
-
return
|
|
2197
|
+
function Nr(t) {
|
|
2198
|
+
return a.isObject(t) && t.isAxiosError === !0;
|
|
2663
2199
|
}
|
|
2664
|
-
const
|
|
2200
|
+
const Me = {
|
|
2665
2201
|
Continue: 100,
|
|
2666
2202
|
SwitchingProtocols: 101,
|
|
2667
2203
|
Processing: 102,
|
|
@@ -2732,42 +2268,59 @@ const yt = {
|
|
|
2732
2268
|
SslHandshakeFailed: 525,
|
|
2733
2269
|
InvalidSslCertificate: 526
|
|
2734
2270
|
};
|
|
2735
|
-
Object.entries(
|
|
2736
|
-
|
|
2271
|
+
Object.entries(Me).forEach(([t, e]) => {
|
|
2272
|
+
Me[e] = t;
|
|
2737
2273
|
});
|
|
2738
|
-
function
|
|
2739
|
-
const e = new
|
|
2740
|
-
return
|
|
2741
|
-
return
|
|
2742
|
-
},
|
|
2274
|
+
function Dt(t) {
|
|
2275
|
+
const e = new Y(t), n = ht(Y.prototype.request, e);
|
|
2276
|
+
return a.extend(n, Y.prototype, e, { allOwnKeys: !0 }), a.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2277
|
+
return Dt(Z(t, s));
|
|
2278
|
+
}, n;
|
|
2743
2279
|
}
|
|
2744
|
-
const
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2280
|
+
const _ = Dt(de);
|
|
2281
|
+
_.Axios = Y;
|
|
2282
|
+
_.CanceledError = fe;
|
|
2283
|
+
_.CancelToken = Lr;
|
|
2284
|
+
_.isCancel = _t;
|
|
2285
|
+
_.VERSION = Nt;
|
|
2286
|
+
_.toFormData = _e;
|
|
2287
|
+
_.AxiosError = y;
|
|
2288
|
+
_.Cancel = _.CanceledError;
|
|
2289
|
+
_.all = function(e) {
|
|
2754
2290
|
return Promise.all(e);
|
|
2755
2291
|
};
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
const
|
|
2765
|
-
|
|
2292
|
+
_.spread = kr;
|
|
2293
|
+
_.isAxiosError = Nr;
|
|
2294
|
+
_.mergeConfig = Z;
|
|
2295
|
+
_.AxiosHeaders = F;
|
|
2296
|
+
_.formToJSON = (t) => St(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
2297
|
+
_.getAdapter = kt.getAdapter;
|
|
2298
|
+
_.HttpStatusCode = Me;
|
|
2299
|
+
_.default = _;
|
|
2300
|
+
const {
|
|
2301
|
+
Axios: os,
|
|
2302
|
+
AxiosError: is,
|
|
2303
|
+
CanceledError: as,
|
|
2304
|
+
isCancel: ls,
|
|
2305
|
+
CancelToken: cs,
|
|
2306
|
+
VERSION: us,
|
|
2307
|
+
all: ds,
|
|
2308
|
+
Cancel: fs,
|
|
2309
|
+
isAxiosError: hs,
|
|
2310
|
+
spread: ps,
|
|
2311
|
+
toFormData: gs,
|
|
2312
|
+
AxiosHeaders: ms,
|
|
2313
|
+
HttpStatusCode: ys,
|
|
2314
|
+
formToJSON: bs,
|
|
2315
|
+
getAdapter: Es,
|
|
2316
|
+
mergeConfig: ws
|
|
2317
|
+
} = _, ut = "https://translation.googleapis.com/language/translate/v2", vr = /* @__PURE__ */ new Set([408, 425, 429, 500, 502, 503, 504]), Dr = (t) => !!t, Fr = (t) => _.isAxiosError(t);
|
|
2318
|
+
class Ur {
|
|
2766
2319
|
constructor(e) {
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
this.config = e, this.axios =
|
|
2770
|
-
baseURL: e.endpoint ??
|
|
2320
|
+
B(this, "type", "google");
|
|
2321
|
+
B(this, "axios");
|
|
2322
|
+
this.config = e, this.axios = _.create({
|
|
2323
|
+
baseURL: e.endpoint ?? ut,
|
|
2771
2324
|
headers: {
|
|
2772
2325
|
"Content-Type": "application/json",
|
|
2773
2326
|
...e.headers
|
|
@@ -2775,67 +2328,67 @@ class Ws {
|
|
|
2775
2328
|
});
|
|
2776
2329
|
}
|
|
2777
2330
|
isAvailable() {
|
|
2778
|
-
return this.config.apiKey ||
|
|
2331
|
+
return this.config.apiKey || Dr(this.config.headers) ? { available: !0 } : {
|
|
2779
2332
|
available: !0
|
|
2780
2333
|
};
|
|
2781
2334
|
}
|
|
2782
|
-
async translate(e,
|
|
2783
|
-
var
|
|
2784
|
-
const
|
|
2335
|
+
async translate(e, n) {
|
|
2336
|
+
var f, u, c;
|
|
2337
|
+
const r = {
|
|
2785
2338
|
q: e.text,
|
|
2786
2339
|
target: e.targetLanguage,
|
|
2787
2340
|
format: "text"
|
|
2788
2341
|
};
|
|
2789
|
-
e.sourceLanguage && e.sourceLanguage !== "auto" && (
|
|
2342
|
+
e.sourceLanguage && e.sourceLanguage !== "auto" && (r.source = e.sourceLanguage), e.glossary && Object.keys(e.glossary).length > 0 && (r.glossaryConfig = {
|
|
2790
2343
|
glossaryData: {
|
|
2791
2344
|
languagePair: {
|
|
2792
2345
|
sourceLanguageCode: e.sourceLanguage ?? "auto",
|
|
2793
2346
|
targetLanguageCode: e.targetLanguage
|
|
2794
2347
|
},
|
|
2795
|
-
terms: Object.entries(e.glossary).map(([
|
|
2796
|
-
sourceText:
|
|
2797
|
-
targetText:
|
|
2348
|
+
terms: Object.entries(e.glossary).map(([d, R]) => ({
|
|
2349
|
+
sourceText: d,
|
|
2350
|
+
targetText: R
|
|
2798
2351
|
}))
|
|
2799
2352
|
}
|
|
2800
2353
|
});
|
|
2801
2354
|
const s = {
|
|
2802
2355
|
...this.config.headers,
|
|
2803
|
-
...
|
|
2804
|
-
},
|
|
2356
|
+
...n == null ? void 0 : n.headers
|
|
2357
|
+
}, i = (c = (u = (f = (await this.axios.post(
|
|
2805
2358
|
"",
|
|
2806
|
-
|
|
2359
|
+
r,
|
|
2807
2360
|
{
|
|
2808
2361
|
headers: s,
|
|
2809
2362
|
params: this.createQueryParams(),
|
|
2810
|
-
timeout:
|
|
2811
|
-
signal:
|
|
2363
|
+
timeout: n == null ? void 0 : n.timeoutMs,
|
|
2364
|
+
signal: n == null ? void 0 : n.signal
|
|
2812
2365
|
}
|
|
2813
|
-
)).data) == null ? void 0 :
|
|
2814
|
-
if (!(
|
|
2366
|
+
)).data) == null ? void 0 : f.data) == null ? void 0 : u.translations) == null ? void 0 : c[0];
|
|
2367
|
+
if (!(i != null && i.translatedText))
|
|
2815
2368
|
throw new Error(
|
|
2816
2369
|
"Google Translate response did not include translatedText"
|
|
2817
2370
|
);
|
|
2818
2371
|
const l = {
|
|
2819
|
-
endpoint: this.config.endpoint ??
|
|
2372
|
+
endpoint: this.config.endpoint ?? ut
|
|
2820
2373
|
};
|
|
2821
|
-
return
|
|
2822
|
-
translatedText:
|
|
2823
|
-
detectedSourceLanguage:
|
|
2374
|
+
return i.model && (l.model = i.model), this.config.projectId && (l.projectId = this.config.projectId), this.config.region && (l.region = this.config.region), {
|
|
2375
|
+
translatedText: i.translatedText,
|
|
2376
|
+
detectedSourceLanguage: i.detectedSourceLanguage,
|
|
2824
2377
|
providerMetadata: l
|
|
2825
2378
|
};
|
|
2826
2379
|
}
|
|
2827
2380
|
normalizeError(e) {
|
|
2828
|
-
var
|
|
2829
|
-
if (
|
|
2830
|
-
const l = (
|
|
2381
|
+
var n, r, s, o, i;
|
|
2382
|
+
if (Fr(e)) {
|
|
2383
|
+
const l = (n = e.response) == null ? void 0 : n.status, f = ((r = e.response) == null ? void 0 : r.data) ?? {}, u = ((s = f.error) == null ? void 0 : s.message) ?? e.message ?? "Google Translate request failed";
|
|
2831
2384
|
return {
|
|
2832
|
-
code: String(((
|
|
2833
|
-
message:
|
|
2834
|
-
retryable: l ?
|
|
2385
|
+
code: String(((o = f.error) == null ? void 0 : o.code) ?? l ?? "E_GOOGLE"),
|
|
2386
|
+
message: u,
|
|
2387
|
+
retryable: l ? vr.has(l) : !1,
|
|
2835
2388
|
details: {
|
|
2836
2389
|
status: l,
|
|
2837
|
-
data:
|
|
2838
|
-
headers: (
|
|
2390
|
+
data: f,
|
|
2391
|
+
headers: (i = e.response) == null ? void 0 : i.headers
|
|
2839
2392
|
}
|
|
2840
2393
|
};
|
|
2841
2394
|
}
|
|
@@ -2858,7 +2411,7 @@ class Ws {
|
|
|
2858
2411
|
};
|
|
2859
2412
|
}
|
|
2860
2413
|
}
|
|
2861
|
-
const
|
|
2414
|
+
const Fe = (t) => {
|
|
2862
2415
|
if (!t)
|
|
2863
2416
|
throw new Error("Provider instance is null or undefined");
|
|
2864
2417
|
if (!t.type)
|
|
@@ -2869,338 +2422,338 @@ const ht = (t) => {
|
|
|
2869
2422
|
throw new Error("Provider 'isAvailable' must be a function");
|
|
2870
2423
|
if (t.normalizeError && typeof t.normalizeError != "function")
|
|
2871
2424
|
throw new Error("Provider 'normalizeError' must be a function");
|
|
2872
|
-
},
|
|
2425
|
+
}, Br = (t) => {
|
|
2873
2426
|
if (t.id === "google") {
|
|
2874
|
-
const e = new
|
|
2875
|
-
return
|
|
2427
|
+
const e = new Ur(t);
|
|
2428
|
+
return Fe(e), e;
|
|
2876
2429
|
}
|
|
2877
2430
|
if (t.implementation)
|
|
2878
|
-
return
|
|
2431
|
+
return Fe(t.implementation), t.implementation;
|
|
2879
2432
|
if (t.factory) {
|
|
2880
2433
|
const e = t.factory();
|
|
2881
|
-
return
|
|
2434
|
+
return Fe(e), e;
|
|
2882
2435
|
}
|
|
2883
2436
|
throw new Error(
|
|
2884
2437
|
"Custom provider configuration must include either 'implementation' or 'factory'"
|
|
2885
2438
|
);
|
|
2886
|
-
},
|
|
2887
|
-
var
|
|
2888
|
-
return ((
|
|
2889
|
-
},
|
|
2439
|
+
}, jr = "translator", Mr = 5e3, dt = 3e4, Ir = "::", Hr = (t) => {
|
|
2440
|
+
var n, r;
|
|
2441
|
+
return ((r = (n = navigator == null ? void 0 : navigator.language) == null ? void 0 : n.split("-")) == null ? void 0 : r[0]) || t;
|
|
2442
|
+
}, qr = (t) => localStorage.getItem(t), Kr = (t, e) => {
|
|
2890
2443
|
localStorage.setItem(t, e);
|
|
2891
|
-
},
|
|
2892
|
-
scope:
|
|
2444
|
+
}, $r = (t) => t ? t instanceof Set ? new Set(t) : new Set(t) : /* @__PURE__ */ new Set(), Ft = (t, e) => ({
|
|
2445
|
+
scope: jr,
|
|
2893
2446
|
event: t,
|
|
2894
2447
|
...e
|
|
2895
|
-
}),
|
|
2896
|
-
console.warn("[vbss-translator]",
|
|
2897
|
-
},
|
|
2898
|
-
console.debug("[vbss-translator]",
|
|
2899
|
-
},
|
|
2448
|
+
}), ae = (t, e) => {
|
|
2449
|
+
console.warn("[vbss-translator]", Ft(t, e));
|
|
2450
|
+
}, v = (t, e) => {
|
|
2451
|
+
console.debug("[vbss-translator]", Ft(t, e));
|
|
2452
|
+
}, Vr = () => ({
|
|
2900
2453
|
warn: (t, e) => {
|
|
2901
|
-
|
|
2454
|
+
ae(t, e ?? {});
|
|
2902
2455
|
},
|
|
2903
2456
|
debug: (t, e) => {
|
|
2904
|
-
|
|
2457
|
+
v(t, e ?? {});
|
|
2905
2458
|
}
|
|
2906
|
-
}),
|
|
2459
|
+
}), zr = (t) => {
|
|
2907
2460
|
const {
|
|
2908
2461
|
provider: e,
|
|
2909
|
-
cache:
|
|
2910
|
-
alwaysExternalKeys:
|
|
2462
|
+
cache: n,
|
|
2463
|
+
alwaysExternalKeys: r,
|
|
2911
2464
|
enabled: s,
|
|
2912
|
-
timeoutMs:
|
|
2913
|
-
debug:
|
|
2465
|
+
timeoutMs: o,
|
|
2466
|
+
debug: i,
|
|
2914
2467
|
...l
|
|
2915
2468
|
} = t ?? {};
|
|
2916
2469
|
return {
|
|
2917
2470
|
enabled: s ?? !1,
|
|
2918
|
-
timeoutMs:
|
|
2919
|
-
debug:
|
|
2471
|
+
timeoutMs: o ?? Mr,
|
|
2472
|
+
debug: i ?? !1,
|
|
2920
2473
|
provider: {
|
|
2921
|
-
...
|
|
2474
|
+
...Jr,
|
|
2922
2475
|
...e
|
|
2923
2476
|
},
|
|
2924
2477
|
cache: {
|
|
2925
|
-
...
|
|
2926
|
-
...
|
|
2478
|
+
...Wr,
|
|
2479
|
+
...n
|
|
2927
2480
|
},
|
|
2928
|
-
alwaysExternalKeys:
|
|
2481
|
+
alwaysExternalKeys: $r(r),
|
|
2929
2482
|
...l
|
|
2930
2483
|
};
|
|
2931
|
-
},
|
|
2484
|
+
}, Jr = {
|
|
2932
2485
|
id: "google"
|
|
2933
|
-
},
|
|
2486
|
+
}, Wr = {
|
|
2934
2487
|
enabled: !1,
|
|
2935
2488
|
ttlMs: 36e5
|
|
2936
|
-
},
|
|
2937
|
-
const
|
|
2489
|
+
}, Gr = (t, e) => `${t}${Ir}${e}`, Xr = (t) => t ? new Map(t) : /* @__PURE__ */ new Map(), Qr = (t, e) => {
|
|
2490
|
+
const n = t.toLocaleLowerCase();
|
|
2938
2491
|
return e.find(
|
|
2939
|
-
(
|
|
2940
|
-
(s) => s.toLocaleLowerCase() ===
|
|
2492
|
+
(r) => Object.values(r).some(
|
|
2493
|
+
(s) => s.toLocaleLowerCase() === n
|
|
2941
2494
|
)
|
|
2942
2495
|
);
|
|
2943
|
-
},
|
|
2496
|
+
}, Rs = ({
|
|
2944
2497
|
children: t,
|
|
2945
2498
|
translations: e,
|
|
2946
|
-
defaultLanguage:
|
|
2947
|
-
persist:
|
|
2499
|
+
defaultLanguage: n = "en",
|
|
2500
|
+
persist: r = !1,
|
|
2948
2501
|
persistKey: s = "language",
|
|
2949
|
-
autoDetectLanguage:
|
|
2950
|
-
externalTranslation:
|
|
2502
|
+
autoDetectLanguage: o = !1,
|
|
2503
|
+
externalTranslation: i
|
|
2951
2504
|
}) => {
|
|
2952
|
-
const l =
|
|
2953
|
-
() =>
|
|
2954
|
-
[
|
|
2955
|
-
), [
|
|
2505
|
+
const l = z(
|
|
2506
|
+
() => zr(i),
|
|
2507
|
+
[i]
|
|
2508
|
+
), [f, u] = he(
|
|
2956
2509
|
() => new Set(l.alwaysExternalKeys)
|
|
2957
2510
|
);
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
const
|
|
2961
|
-
return
|
|
2511
|
+
Pe(() => {
|
|
2512
|
+
u((m) => {
|
|
2513
|
+
const b = new Set(l.alwaysExternalKeys);
|
|
2514
|
+
return m.forEach((w) => b.add(w)), b;
|
|
2962
2515
|
});
|
|
2963
2516
|
}, [l]);
|
|
2964
|
-
const
|
|
2965
|
-
|
|
2966
|
-
if (
|
|
2967
|
-
return
|
|
2968
|
-
const
|
|
2969
|
-
return
|
|
2517
|
+
const c = pe((m) => {
|
|
2518
|
+
u((b) => {
|
|
2519
|
+
if (b.has(m))
|
|
2520
|
+
return b;
|
|
2521
|
+
const w = new Set(b);
|
|
2522
|
+
return w.add(m), w;
|
|
2970
2523
|
});
|
|
2971
|
-
}, []),
|
|
2524
|
+
}, []), d = z(
|
|
2972
2525
|
() => ({
|
|
2973
2526
|
...l,
|
|
2974
|
-
alwaysExternalKeys:
|
|
2527
|
+
alwaysExternalKeys: f
|
|
2975
2528
|
}),
|
|
2976
|
-
[l,
|
|
2977
|
-
),
|
|
2978
|
-
|
|
2529
|
+
[l, f]
|
|
2530
|
+
), R = r ? qr(s) : null, S = o ? Hr(n) : null, [p, g] = he(
|
|
2531
|
+
R ?? S ?? n
|
|
2979
2532
|
);
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
}, [
|
|
2983
|
-
const
|
|
2533
|
+
Pe(() => {
|
|
2534
|
+
r && Kr(s, p);
|
|
2535
|
+
}, [p, r, s]);
|
|
2536
|
+
const h = z(
|
|
2984
2537
|
() => Object.keys(e[0] || {}),
|
|
2985
2538
|
[e]
|
|
2986
|
-
),
|
|
2987
|
-
() => new
|
|
2988
|
-
[
|
|
2989
|
-
),
|
|
2990
|
-
let
|
|
2539
|
+
), x = z(() => Vr(), []), j = z(
|
|
2540
|
+
() => new Xt(d.cache),
|
|
2541
|
+
[d.cache]
|
|
2542
|
+
), O = z(() => {
|
|
2543
|
+
let m;
|
|
2991
2544
|
try {
|
|
2992
|
-
if (
|
|
2993
|
-
providerType:
|
|
2994
|
-
providerId:
|
|
2545
|
+
if (m = Br(d.provider), d.debug && v("TranslatorProvider_provider_created", {
|
|
2546
|
+
providerType: m.type,
|
|
2547
|
+
providerId: d.provider.id,
|
|
2995
2548
|
timestamp: Date.now()
|
|
2996
|
-
}),
|
|
2997
|
-
const
|
|
2998
|
-
|
|
2999
|
-
providerType:
|
|
3000
|
-
providerId:
|
|
2549
|
+
}), m.isAvailable) {
|
|
2550
|
+
const b = m.isAvailable();
|
|
2551
|
+
b.available ? d.debug && v("TranslatorProvider_provider_available", {
|
|
2552
|
+
providerType: m.type,
|
|
2553
|
+
providerId: d.provider.id,
|
|
3001
2554
|
timestamp: Date.now()
|
|
3002
|
-
}) :
|
|
3003
|
-
providerType:
|
|
3004
|
-
providerId:
|
|
3005
|
-
reason:
|
|
2555
|
+
}) : ae("TranslatorProvider_provider_unavailable", {
|
|
2556
|
+
providerType: m.type,
|
|
2557
|
+
providerId: d.provider.id,
|
|
2558
|
+
reason: b.reason,
|
|
3006
2559
|
timestamp: Date.now()
|
|
3007
2560
|
});
|
|
3008
2561
|
}
|
|
3009
|
-
} catch (
|
|
3010
|
-
throw
|
|
3011
|
-
providerId:
|
|
3012
|
-
error:
|
|
2562
|
+
} catch (b) {
|
|
2563
|
+
throw ae("TranslatorProvider_provider_creation_failed", {
|
|
2564
|
+
providerId: d.provider.id,
|
|
2565
|
+
error: b instanceof Error ? b.message : "Unknown error",
|
|
3013
2566
|
timestamp: Date.now()
|
|
3014
|
-
}),
|
|
2567
|
+
}), b;
|
|
3015
2568
|
}
|
|
3016
|
-
return new
|
|
3017
|
-
provider:
|
|
3018
|
-
config:
|
|
3019
|
-
cache:
|
|
3020
|
-
logger:
|
|
2569
|
+
return new Gt({
|
|
2570
|
+
provider: m,
|
|
2571
|
+
config: d,
|
|
2572
|
+
cache: d.cache.enabled ? j : void 0,
|
|
2573
|
+
logger: x
|
|
3021
2574
|
});
|
|
3022
|
-
}, [
|
|
2575
|
+
}, [d, x, j]), [T, L] = he(
|
|
3023
2576
|
() => /* @__PURE__ */ new Map()
|
|
3024
|
-
), [
|
|
3025
|
-
|
|
2577
|
+
), [K, N] = he(0), U = $t(!0);
|
|
2578
|
+
Pe(() => (d.debug && v("TranslatorProvider_mounted", {
|
|
3026
2579
|
timestamp: Date.now()
|
|
3027
|
-
}),
|
|
3028
|
-
|
|
2580
|
+
}), U.current = !0, () => {
|
|
2581
|
+
d.debug && v("TranslatorProvider_unmounting", {
|
|
3029
2582
|
timestamp: Date.now()
|
|
3030
|
-
}),
|
|
3031
|
-
}), [
|
|
3032
|
-
const
|
|
3033
|
-
(
|
|
3034
|
-
var
|
|
3035
|
-
|
|
3036
|
-
targetLanguage:
|
|
3037
|
-
key:
|
|
3038
|
-
status:
|
|
3039
|
-
value:
|
|
3040
|
-
isMounted:
|
|
2583
|
+
}), U.current = !1;
|
|
2584
|
+
}), [d]);
|
|
2585
|
+
const q = pe(
|
|
2586
|
+
(m, b, w) => {
|
|
2587
|
+
var W;
|
|
2588
|
+
d.debug && w && v("setExternalStateEntry_called", {
|
|
2589
|
+
targetLanguage: m,
|
|
2590
|
+
key: b,
|
|
2591
|
+
status: w.status,
|
|
2592
|
+
value: w.value,
|
|
2593
|
+
isMounted: U.current
|
|
3041
2594
|
});
|
|
3042
|
-
const
|
|
3043
|
-
|
|
3044
|
-
const
|
|
3045
|
-
return
|
|
3046
|
-
}), (
|
|
3047
|
-
targetLanguage:
|
|
3048
|
-
key:
|
|
3049
|
-
}),
|
|
2595
|
+
const E = () => {
|
|
2596
|
+
L((C) => {
|
|
2597
|
+
const P = new Map(C), I = Xr(P.get(m));
|
|
2598
|
+
return w ? (I.set(b, w), P.set(m, I)) : (I.delete(b), I.size > 0 ? P.set(m, I) : P.delete(m)), P;
|
|
2599
|
+
}), (w == null ? void 0 : w.status) === "resolved" && (d.debug && v("forceUpdate_triggered", {
|
|
2600
|
+
targetLanguage: m,
|
|
2601
|
+
key: b
|
|
2602
|
+
}), N((C) => C + 1));
|
|
3050
2603
|
};
|
|
3051
|
-
typeof process < "u" && ((
|
|
3052
|
-
|
|
2604
|
+
typeof process < "u" && ((W = process.env) == null ? void 0 : W.NODE_ENV) === "test" ? E() : Vt(() => {
|
|
2605
|
+
E();
|
|
3053
2606
|
});
|
|
3054
2607
|
},
|
|
3055
|
-
[
|
|
3056
|
-
),
|
|
3057
|
-
(
|
|
3058
|
-
var
|
|
3059
|
-
|
|
2608
|
+
[d, N]
|
|
2609
|
+
), se = pe(
|
|
2610
|
+
(m) => {
|
|
2611
|
+
var b;
|
|
2612
|
+
O.isEnabled() && (q(m.targetLanguage, m.key, {
|
|
3060
2613
|
status: "pending",
|
|
3061
|
-
value:
|
|
3062
|
-
}),
|
|
3063
|
-
key:
|
|
3064
|
-
text:
|
|
3065
|
-
targetLanguage:
|
|
3066
|
-
sourceLanguage:
|
|
3067
|
-
signal: (
|
|
3068
|
-
}).then((
|
|
3069
|
-
if (
|
|
3070
|
-
key:
|
|
3071
|
-
targetLanguage:
|
|
3072
|
-
isMounted:
|
|
3073
|
-
hasResult: !!
|
|
3074
|
-
hasTranslatedText: !!(
|
|
3075
|
-
translatedText:
|
|
3076
|
-
}),
|
|
3077
|
-
|
|
3078
|
-
key:
|
|
3079
|
-
targetLanguage:
|
|
3080
|
-
isMounted:
|
|
3081
|
-
translatedText:
|
|
3082
|
-
}),
|
|
2614
|
+
value: m.displayValue
|
|
2615
|
+
}), O.translate({
|
|
2616
|
+
key: m.key,
|
|
2617
|
+
text: m.originalText,
|
|
2618
|
+
targetLanguage: m.targetLanguage,
|
|
2619
|
+
sourceLanguage: m.sourceLanguage,
|
|
2620
|
+
signal: (b = m.options) == null ? void 0 : b.signal
|
|
2621
|
+
}).then((w) => {
|
|
2622
|
+
if (d.debug && v("translation_promise_resolved", {
|
|
2623
|
+
key: m.key,
|
|
2624
|
+
targetLanguage: m.targetLanguage,
|
|
2625
|
+
isMounted: U.current,
|
|
2626
|
+
hasResult: !!w,
|
|
2627
|
+
hasTranslatedText: !!(w && w.translatedText),
|
|
2628
|
+
translatedText: w == null ? void 0 : w.translatedText
|
|
2629
|
+
}), w && w.translatedText) {
|
|
2630
|
+
d.debug && v("translation_applying_resolved", {
|
|
2631
|
+
key: m.key,
|
|
2632
|
+
targetLanguage: m.targetLanguage,
|
|
2633
|
+
isMounted: U.current,
|
|
2634
|
+
translatedText: w.translatedText
|
|
2635
|
+
}), q(m.targetLanguage, m.key, {
|
|
3083
2636
|
status: "resolved",
|
|
3084
|
-
value:
|
|
2637
|
+
value: w.translatedText
|
|
3085
2638
|
});
|
|
3086
2639
|
return;
|
|
3087
2640
|
}
|
|
3088
|
-
|
|
3089
|
-
key:
|
|
3090
|
-
result:
|
|
3091
|
-
}),
|
|
2641
|
+
d.debug && v("translation_invalid_result", {
|
|
2642
|
+
key: m.key,
|
|
2643
|
+
result: w
|
|
2644
|
+
}), q(m.targetLanguage, m.key, {
|
|
3092
2645
|
status: "error",
|
|
3093
|
-
value:
|
|
3094
|
-
retryAt: Date.now() +
|
|
2646
|
+
value: m.displayValue,
|
|
2647
|
+
retryAt: Date.now() + dt
|
|
3095
2648
|
});
|
|
3096
|
-
}).catch((
|
|
3097
|
-
|
|
3098
|
-
key:
|
|
3099
|
-
targetLanguage:
|
|
3100
|
-
isMounted:
|
|
3101
|
-
error: (
|
|
3102
|
-
}),
|
|
3103
|
-
key:
|
|
3104
|
-
language:
|
|
3105
|
-
error:
|
|
3106
|
-
isMounted:
|
|
3107
|
-
}),
|
|
2649
|
+
}).catch((w) => {
|
|
2650
|
+
d.debug && v("translation_promise_rejected", {
|
|
2651
|
+
key: m.key,
|
|
2652
|
+
targetLanguage: m.targetLanguage,
|
|
2653
|
+
isMounted: U.current,
|
|
2654
|
+
error: (w == null ? void 0 : w.message) || String(w)
|
|
2655
|
+
}), ae("external_translation_unexpected_rejection", {
|
|
2656
|
+
key: m.key,
|
|
2657
|
+
language: m.targetLanguage,
|
|
2658
|
+
error: w,
|
|
2659
|
+
isMounted: U.current
|
|
2660
|
+
}), q(m.targetLanguage, m.key, {
|
|
3108
2661
|
status: "error",
|
|
3109
|
-
value:
|
|
3110
|
-
error:
|
|
3111
|
-
retryAt: Date.now() +
|
|
2662
|
+
value: m.displayValue,
|
|
2663
|
+
error: w,
|
|
2664
|
+
retryAt: Date.now() + dt
|
|
3112
2665
|
});
|
|
3113
2666
|
}));
|
|
3114
2667
|
},
|
|
3115
|
-
[
|
|
3116
|
-
),
|
|
3117
|
-
const
|
|
3118
|
-
return
|
|
3119
|
-
|
|
3120
|
-
|
|
2668
|
+
[d, q, O]
|
|
2669
|
+
), G = z(() => {
|
|
2670
|
+
const m = {};
|
|
2671
|
+
return T.forEach((b, w) => {
|
|
2672
|
+
b.forEach((E, A) => {
|
|
2673
|
+
m[Gr(A, w)] = E.status === "pending";
|
|
3121
2674
|
});
|
|
3122
|
-
}),
|
|
3123
|
-
recordSize: Object.keys(
|
|
3124
|
-
record: { ...
|
|
3125
|
-
}),
|
|
3126
|
-
}, [
|
|
3127
|
-
() => Object.values(
|
|
3128
|
-
[
|
|
3129
|
-
),
|
|
3130
|
-
(
|
|
3131
|
-
var
|
|
3132
|
-
const
|
|
3133
|
-
if (
|
|
3134
|
-
text:
|
|
3135
|
-
language:
|
|
3136
|
-
hasStateForLanguage: !!
|
|
3137
|
-
existingStateStatus:
|
|
3138
|
-
existingStateValue:
|
|
3139
|
-
preferExternal:
|
|
3140
|
-
}), (
|
|
3141
|
-
return
|
|
3142
|
-
text:
|
|
3143
|
-
value:
|
|
3144
|
-
}),
|
|
3145
|
-
const
|
|
3146
|
-
if (
|
|
3147
|
-
key:
|
|
3148
|
-
language:
|
|
3149
|
-
}), !(
|
|
3150
|
-
return (
|
|
3151
|
-
const
|
|
3152
|
-
if (!
|
|
3153
|
-
const
|
|
3154
|
-
|
|
3155
|
-
key:
|
|
3156
|
-
targetLanguage:
|
|
3157
|
-
originalText:
|
|
3158
|
-
displayValue: (
|
|
3159
|
-
sourceLanguage:
|
|
3160
|
-
options:
|
|
2675
|
+
}), d.debug && v("isTranslatingRecord_recalculated", {
|
|
2676
|
+
recordSize: Object.keys(m).length,
|
|
2677
|
+
record: { ...m }
|
|
2678
|
+
}), m;
|
|
2679
|
+
}, [T, d]), X = z(
|
|
2680
|
+
() => Object.values(G).some(Boolean),
|
|
2681
|
+
[G]
|
|
2682
|
+
), J = pe(
|
|
2683
|
+
(m, b = {}) => {
|
|
2684
|
+
var $e;
|
|
2685
|
+
const w = T.get(p), E = w == null ? void 0 : w.get(m);
|
|
2686
|
+
if (d.debug && b.preferExternal && v("t_called", {
|
|
2687
|
+
text: m,
|
|
2688
|
+
language: p,
|
|
2689
|
+
hasStateForLanguage: !!w,
|
|
2690
|
+
existingStateStatus: E == null ? void 0 : E.status,
|
|
2691
|
+
existingStateValue: E == null ? void 0 : E.value,
|
|
2692
|
+
preferExternal: b.preferExternal
|
|
2693
|
+
}), (E == null ? void 0 : E.status) === "resolved" && E.value)
|
|
2694
|
+
return d.debug && v("t_returning_resolved", {
|
|
2695
|
+
text: m,
|
|
2696
|
+
value: E.value
|
|
2697
|
+
}), E.value;
|
|
2698
|
+
const A = Qr(m, e), W = A == null ? void 0 : A[p], C = A ? Object.values(A).find((Ve) => !!Ve) : void 0, P = b.fallbackValue ?? (E == null ? void 0 : E.value) ?? W ?? C ?? m, I = b.preferExternal === !0 || d.alwaysExternalKeys.has(m), ee = O.isEnabled(), oe = typeof W == "string";
|
|
2699
|
+
if (oe || ae("missing_translation", {
|
|
2700
|
+
key: m,
|
|
2701
|
+
language: p
|
|
2702
|
+
}), !(ee && (I || !oe)))
|
|
2703
|
+
return (E == null ? void 0 : E.status) === "pending" && E.value ? E.value : W ?? P;
|
|
2704
|
+
const Ut = Date.now(), Bt = (E == null ? void 0 : E.status) === "error" && (!E.retryAt || E.retryAt <= Ut);
|
|
2705
|
+
if (!E || Bt) {
|
|
2706
|
+
const Ce = b.sourceLanguage ?? (A && A[n] ? n : void 0), jt = (Ce && (A == null ? void 0 : A[Ce])) ?? (A == null ? void 0 : A[n]) ?? m;
|
|
2707
|
+
se({
|
|
2708
|
+
key: m,
|
|
2709
|
+
targetLanguage: p,
|
|
2710
|
+
originalText: jt,
|
|
2711
|
+
displayValue: (E == null ? void 0 : E.value) ?? P,
|
|
2712
|
+
sourceLanguage: Ce,
|
|
2713
|
+
options: b
|
|
3161
2714
|
});
|
|
3162
2715
|
}
|
|
3163
|
-
const
|
|
3164
|
-
return (
|
|
2716
|
+
const V = (($e = T.get(p)) == null ? void 0 : $e.get(m)) ?? E;
|
|
2717
|
+
return (V == null ? void 0 : V.status) === "resolved" && V.value ? V.value : (V == null ? void 0 : V.status) === "pending" ? V.value ?? P : P;
|
|
3165
2718
|
},
|
|
3166
2719
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3167
2720
|
[
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
2721
|
+
n,
|
|
2722
|
+
d.alwaysExternalKeys,
|
|
2723
|
+
T,
|
|
2724
|
+
p,
|
|
2725
|
+
se,
|
|
2726
|
+
O,
|
|
3174
2727
|
e
|
|
3175
2728
|
]
|
|
3176
|
-
),
|
|
2729
|
+
), $ = z(
|
|
3177
2730
|
() => ({
|
|
3178
|
-
t:
|
|
3179
|
-
language:
|
|
3180
|
-
languages:
|
|
3181
|
-
setLanguage:
|
|
3182
|
-
isTranslating:
|
|
3183
|
-
isTranslatingAny:
|
|
3184
|
-
registerExternalKey:
|
|
3185
|
-
externalConfig:
|
|
2731
|
+
t: J,
|
|
2732
|
+
language: p,
|
|
2733
|
+
languages: h,
|
|
2734
|
+
setLanguage: g,
|
|
2735
|
+
isTranslating: G,
|
|
2736
|
+
isTranslatingAny: X,
|
|
2737
|
+
registerExternalKey: c,
|
|
2738
|
+
externalConfig: d
|
|
3186
2739
|
}),
|
|
3187
2740
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3188
2741
|
[
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
b,
|
|
3192
|
-
E,
|
|
3193
|
-
le,
|
|
3194
|
-
ae,
|
|
3195
|
-
u,
|
|
2742
|
+
J,
|
|
2743
|
+
p,
|
|
3196
2744
|
h,
|
|
3197
|
-
|
|
2745
|
+
g,
|
|
2746
|
+
G,
|
|
2747
|
+
X,
|
|
2748
|
+
c,
|
|
2749
|
+
d,
|
|
2750
|
+
K
|
|
3198
2751
|
]
|
|
3199
2752
|
);
|
|
3200
|
-
return /* @__PURE__ */
|
|
3201
|
-
},
|
|
2753
|
+
return /* @__PURE__ */ Ht(ft.Provider, { value: $, children: t });
|
|
2754
|
+
}, Ts = () => zt();
|
|
3202
2755
|
export {
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
2756
|
+
Rs as TranslatorProvider,
|
|
2757
|
+
Br as createTranslationProvider,
|
|
2758
|
+
Ts as useTranslator
|
|
3206
2759
|
};
|