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