@tarxemo/customer_support 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1139 -1458
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +15 -36
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,299 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
var me = { exports: {} }, te = {};
|
|
6
|
-
/**
|
|
7
|
-
* @license React
|
|
8
|
-
* react-jsx-runtime.production.js
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the MIT license found in the
|
|
13
|
-
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
var qe;
|
|
16
|
-
function Bt() {
|
|
17
|
-
if (qe) return te;
|
|
18
|
-
qe = 1;
|
|
19
|
-
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
20
|
-
function r(n, s, o) {
|
|
21
|
-
var i = null;
|
|
22
|
-
if (o !== void 0 && (i = "" + o), s.key !== void 0 && (i = "" + s.key), "key" in s) {
|
|
23
|
-
o = {};
|
|
24
|
-
for (var a in s)
|
|
25
|
-
a !== "key" && (o[a] = s[a]);
|
|
26
|
-
} else o = s;
|
|
27
|
-
return s = o.ref, {
|
|
28
|
-
$$typeof: e,
|
|
29
|
-
type: n,
|
|
30
|
-
key: i,
|
|
31
|
-
ref: s !== void 0 ? s : null,
|
|
32
|
-
props: o
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
return te.Fragment = t, te.jsx = r, te.jsxs = r, te;
|
|
36
|
-
}
|
|
37
|
-
var re = {};
|
|
38
|
-
/**
|
|
39
|
-
* @license React
|
|
40
|
-
* react-jsx-runtime.development.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/
|
|
47
|
-
var He;
|
|
48
|
-
function Mt() {
|
|
49
|
-
return He || (He = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
50
|
-
function e(l) {
|
|
51
|
-
if (l == null) return null;
|
|
52
|
-
if (typeof l == "function")
|
|
53
|
-
return l.$$typeof === de ? null : l.displayName || l.name || null;
|
|
54
|
-
if (typeof l == "string") return l;
|
|
55
|
-
switch (l) {
|
|
56
|
-
case h:
|
|
57
|
-
return "Fragment";
|
|
58
|
-
case x:
|
|
59
|
-
return "Profiler";
|
|
60
|
-
case S:
|
|
61
|
-
return "StrictMode";
|
|
62
|
-
case U:
|
|
63
|
-
return "Suspense";
|
|
64
|
-
case j:
|
|
65
|
-
return "SuspenseList";
|
|
66
|
-
case fe:
|
|
67
|
-
return "Activity";
|
|
68
|
-
}
|
|
69
|
-
if (typeof l == "object")
|
|
70
|
-
switch (typeof l.tag == "number" && console.error(
|
|
71
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
72
|
-
), l.$$typeof) {
|
|
73
|
-
case y:
|
|
74
|
-
return "Portal";
|
|
75
|
-
case _:
|
|
76
|
-
return l.displayName || "Context";
|
|
77
|
-
case w:
|
|
78
|
-
return (l._context.displayName || "Context") + ".Consumer";
|
|
79
|
-
case P:
|
|
80
|
-
var E = l.render;
|
|
81
|
-
return l = l.displayName, l || (l = E.displayName || E.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
|
|
82
|
-
case Z:
|
|
83
|
-
return E = l.displayName || null, E !== null ? E : e(l.type) || "Memo";
|
|
84
|
-
case $:
|
|
85
|
-
E = l._payload, l = l._init;
|
|
86
|
-
try {
|
|
87
|
-
return e(l(E));
|
|
88
|
-
} catch {
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
function t(l) {
|
|
94
|
-
return "" + l;
|
|
95
|
-
}
|
|
96
|
-
function r(l) {
|
|
97
|
-
try {
|
|
98
|
-
t(l);
|
|
99
|
-
var E = !1;
|
|
100
|
-
} catch {
|
|
101
|
-
E = !0;
|
|
102
|
-
}
|
|
103
|
-
if (E) {
|
|
104
|
-
E = console;
|
|
105
|
-
var T = E.error, A = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
|
106
|
-
return T.call(
|
|
107
|
-
E,
|
|
108
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
109
|
-
A
|
|
110
|
-
), t(l);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
function n(l) {
|
|
114
|
-
if (l === h) return "<>";
|
|
115
|
-
if (typeof l == "object" && l !== null && l.$$typeof === $)
|
|
116
|
-
return "<...>";
|
|
117
|
-
try {
|
|
118
|
-
var E = e(l);
|
|
119
|
-
return E ? "<" + E + ">" : "<...>";
|
|
120
|
-
} catch {
|
|
121
|
-
return "<...>";
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
function s() {
|
|
125
|
-
var l = q.A;
|
|
126
|
-
return l === null ? null : l.getOwner();
|
|
127
|
-
}
|
|
128
|
-
function o() {
|
|
129
|
-
return Error("react-stack-top-frame");
|
|
130
|
-
}
|
|
131
|
-
function i(l) {
|
|
132
|
-
if (H.call(l, "key")) {
|
|
133
|
-
var E = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
134
|
-
if (E && E.isReactWarning) return !1;
|
|
135
|
-
}
|
|
136
|
-
return l.key !== void 0;
|
|
137
|
-
}
|
|
138
|
-
function a(l, E) {
|
|
139
|
-
function T() {
|
|
140
|
-
L || (L = !0, console.error(
|
|
141
|
-
"%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://react.dev/link/special-props)",
|
|
142
|
-
E
|
|
143
|
-
));
|
|
144
|
-
}
|
|
145
|
-
T.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
146
|
-
get: T,
|
|
147
|
-
configurable: !0
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
function p() {
|
|
151
|
-
var l = e(this.type);
|
|
152
|
-
return Q[l] || (Q[l] = !0, console.error(
|
|
153
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
154
|
-
)), l = this.props.ref, l !== void 0 ? l : null;
|
|
155
|
-
}
|
|
156
|
-
function f(l, E, T, A, z, Ae) {
|
|
157
|
-
var N = T.ref;
|
|
158
|
-
return l = {
|
|
159
|
-
$$typeof: d,
|
|
160
|
-
type: l,
|
|
161
|
-
key: E,
|
|
162
|
-
props: T,
|
|
163
|
-
_owner: A
|
|
164
|
-
}, (N !== void 0 ? N : null) !== null ? Object.defineProperty(l, "ref", {
|
|
165
|
-
enumerable: !1,
|
|
166
|
-
get: p
|
|
167
|
-
}) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
|
|
168
|
-
configurable: !1,
|
|
169
|
-
enumerable: !1,
|
|
170
|
-
writable: !0,
|
|
171
|
-
value: 0
|
|
172
|
-
}), Object.defineProperty(l, "_debugInfo", {
|
|
173
|
-
configurable: !1,
|
|
174
|
-
enumerable: !1,
|
|
175
|
-
writable: !0,
|
|
176
|
-
value: null
|
|
177
|
-
}), Object.defineProperty(l, "_debugStack", {
|
|
178
|
-
configurable: !1,
|
|
179
|
-
enumerable: !1,
|
|
180
|
-
writable: !0,
|
|
181
|
-
value: z
|
|
182
|
-
}), Object.defineProperty(l, "_debugTask", {
|
|
183
|
-
configurable: !1,
|
|
184
|
-
enumerable: !1,
|
|
185
|
-
writable: !0,
|
|
186
|
-
value: Ae
|
|
187
|
-
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
|
|
188
|
-
}
|
|
189
|
-
function u(l, E, T, A, z, Ae) {
|
|
190
|
-
var N = E.children;
|
|
191
|
-
if (N !== void 0)
|
|
192
|
-
if (A)
|
|
193
|
-
if (M(N)) {
|
|
194
|
-
for (A = 0; A < N.length; A++)
|
|
195
|
-
m(N[A]);
|
|
196
|
-
Object.freeze && Object.freeze(N);
|
|
197
|
-
} else
|
|
198
|
-
console.error(
|
|
199
|
-
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
200
|
-
);
|
|
201
|
-
else m(N);
|
|
202
|
-
if (H.call(E, "key")) {
|
|
203
|
-
N = e(l);
|
|
204
|
-
var Y = Object.keys(E).filter(function(Lt) {
|
|
205
|
-
return Lt !== "key";
|
|
206
|
-
});
|
|
207
|
-
A = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", pe[N + A] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
208
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
209
|
-
let props = %s;
|
|
210
|
-
<%s {...props} />
|
|
211
|
-
React keys must be passed directly to JSX without using spread:
|
|
212
|
-
let props = %s;
|
|
213
|
-
<%s key={someKey} {...props} />`,
|
|
214
|
-
A,
|
|
215
|
-
N,
|
|
216
|
-
Y,
|
|
217
|
-
N
|
|
218
|
-
), pe[N + A] = !0);
|
|
219
|
-
}
|
|
220
|
-
if (N = null, T !== void 0 && (r(T), N = "" + T), i(E) && (r(E.key), N = "" + E.key), "key" in E) {
|
|
221
|
-
T = {};
|
|
222
|
-
for (var xe in E)
|
|
223
|
-
xe !== "key" && (T[xe] = E[xe]);
|
|
224
|
-
} else T = E;
|
|
225
|
-
return N && a(
|
|
226
|
-
T,
|
|
227
|
-
typeof l == "function" ? l.displayName || l.name || "Unknown" : l
|
|
228
|
-
), f(
|
|
229
|
-
l,
|
|
230
|
-
N,
|
|
231
|
-
T,
|
|
232
|
-
s(),
|
|
233
|
-
z,
|
|
234
|
-
Ae
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
function m(l) {
|
|
238
|
-
g(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === $ && (l._payload.status === "fulfilled" ? g(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
|
|
239
|
-
}
|
|
240
|
-
function g(l) {
|
|
241
|
-
return typeof l == "object" && l !== null && l.$$typeof === d;
|
|
242
|
-
}
|
|
243
|
-
var O = It, d = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), U = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), Z = Symbol.for("react.memo"), $ = Symbol.for("react.lazy"), fe = Symbol.for("react.activity"), de = Symbol.for("react.client.reference"), q = O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, H = Object.prototype.hasOwnProperty, M = Array.isArray, K = console.createTask ? console.createTask : function() {
|
|
244
|
-
return null;
|
|
245
|
-
};
|
|
246
|
-
O = {
|
|
247
|
-
react_stack_bottom_frame: function(l) {
|
|
248
|
-
return l();
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
var L, Q = {}, v = O.react_stack_bottom_frame.bind(
|
|
252
|
-
O,
|
|
253
|
-
o
|
|
254
|
-
)(), ee = K(n(o)), pe = {};
|
|
255
|
-
re.Fragment = h, re.jsx = function(l, E, T) {
|
|
256
|
-
var A = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
257
|
-
return u(
|
|
258
|
-
l,
|
|
259
|
-
E,
|
|
260
|
-
T,
|
|
261
|
-
!1,
|
|
262
|
-
A ? Error("react-stack-top-frame") : v,
|
|
263
|
-
A ? K(n(l)) : ee
|
|
264
|
-
);
|
|
265
|
-
}, re.jsxs = function(l, E, T) {
|
|
266
|
-
var A = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
267
|
-
return u(
|
|
268
|
-
l,
|
|
269
|
-
E,
|
|
270
|
-
T,
|
|
271
|
-
!0,
|
|
272
|
-
A ? Error("react-stack-top-frame") : v,
|
|
273
|
-
A ? K(n(l)) : ee
|
|
274
|
-
);
|
|
275
|
-
};
|
|
276
|
-
})()), re;
|
|
277
|
-
}
|
|
278
|
-
var ze;
|
|
279
|
-
function $t() {
|
|
280
|
-
return ze || (ze = 1, process.env.NODE_ENV === "production" ? me.exports = Bt() : me.exports = Mt()), me.exports;
|
|
281
|
-
}
|
|
282
|
-
var R = $t();
|
|
1
|
+
var At = Object.defineProperty;
|
|
2
|
+
var Tt = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Ue = (e, t, n) => Tt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import b, { forwardRef as Qe, createElement as we, useState as J, useRef as Ye, useEffect as Re, useCallback as te } from "react";
|
|
283
5
|
/**
|
|
284
6
|
* @license lucide-react v0.469.0 - ISC
|
|
285
7
|
*
|
|
286
8
|
* This source code is licensed under the ISC license.
|
|
287
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
288
10
|
*/
|
|
289
|
-
const
|
|
11
|
+
const Ct = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), et = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim();
|
|
290
12
|
/**
|
|
291
13
|
* @license lucide-react v0.469.0 - ISC
|
|
292
14
|
*
|
|
293
15
|
* This source code is licensed under the ISC license.
|
|
294
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
295
17
|
*/
|
|
296
|
-
var
|
|
18
|
+
var Nt = {
|
|
297
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
298
20
|
width: 24,
|
|
299
21
|
height: 24,
|
|
@@ -310,30 +32,30 @@ var Ht = {
|
|
|
310
32
|
* This source code is licensed under the ISC license.
|
|
311
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
312
34
|
*/
|
|
313
|
-
const
|
|
35
|
+
const xt = Qe(
|
|
314
36
|
({
|
|
315
37
|
color: e = "currentColor",
|
|
316
38
|
size: t = 24,
|
|
317
|
-
strokeWidth:
|
|
318
|
-
absoluteStrokeWidth:
|
|
39
|
+
strokeWidth: n = 2,
|
|
40
|
+
absoluteStrokeWidth: r,
|
|
319
41
|
className: s = "",
|
|
320
42
|
children: o,
|
|
321
43
|
iconNode: i,
|
|
322
44
|
...a
|
|
323
|
-
},
|
|
45
|
+
}, d) => we(
|
|
324
46
|
"svg",
|
|
325
47
|
{
|
|
326
|
-
ref:
|
|
327
|
-
...
|
|
48
|
+
ref: d,
|
|
49
|
+
...Nt,
|
|
328
50
|
width: t,
|
|
329
51
|
height: t,
|
|
330
52
|
stroke: e,
|
|
331
|
-
strokeWidth:
|
|
332
|
-
className:
|
|
53
|
+
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
54
|
+
className: et("lucide", s),
|
|
333
55
|
...a
|
|
334
56
|
},
|
|
335
57
|
[
|
|
336
|
-
...i.map(([
|
|
58
|
+
...i.map(([u, l]) => we(u, l)),
|
|
337
59
|
...Array.isArray(o) ? o : [o]
|
|
338
60
|
]
|
|
339
61
|
)
|
|
@@ -344,16 +66,16 @@ const zt = lt(
|
|
|
344
66
|
* This source code is licensed under the ISC license.
|
|
345
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
346
68
|
*/
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
({ className:
|
|
69
|
+
const V = (e, t) => {
|
|
70
|
+
const n = Qe(
|
|
71
|
+
({ className: r, ...s }, o) => we(xt, {
|
|
350
72
|
ref: o,
|
|
351
73
|
iconNode: t,
|
|
352
|
-
className:
|
|
74
|
+
className: et(`lucide-${Ct(e)}`, r),
|
|
353
75
|
...s
|
|
354
76
|
})
|
|
355
77
|
);
|
|
356
|
-
return
|
|
78
|
+
return n.displayName = `${e}`, n;
|
|
357
79
|
};
|
|
358
80
|
/**
|
|
359
81
|
* @license lucide-react v0.469.0 - ISC
|
|
@@ -361,7 +83,7 @@ const oe = (e, t) => {
|
|
|
361
83
|
* This source code is licensed under the ISC license.
|
|
362
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
363
85
|
*/
|
|
364
|
-
const
|
|
86
|
+
const Pt = V("ExternalLink", [
|
|
365
87
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
366
88
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
367
89
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
@@ -372,7 +94,7 @@ const Jt = oe("ExternalLink", [
|
|
|
372
94
|
* This source code is licensed under the ISC license.
|
|
373
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
374
96
|
*/
|
|
375
|
-
const
|
|
97
|
+
const Dt = V("LoaderCircle", [
|
|
376
98
|
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
377
99
|
]);
|
|
378
100
|
/**
|
|
@@ -381,7 +103,7 @@ const Vt = oe("LoaderCircle", [
|
|
|
381
103
|
* This source code is licensed under the ISC license.
|
|
382
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
383
105
|
*/
|
|
384
|
-
const
|
|
106
|
+
const Ft = V("MessageCircle", [
|
|
385
107
|
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }]
|
|
386
108
|
]);
|
|
387
109
|
/**
|
|
@@ -390,7 +112,7 @@ const Wt = oe("MessageCircle", [
|
|
|
390
112
|
* This source code is licensed under the ISC license.
|
|
391
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
392
114
|
*/
|
|
393
|
-
const
|
|
115
|
+
const Ut = V("Send", [
|
|
394
116
|
[
|
|
395
117
|
"path",
|
|
396
118
|
{
|
|
@@ -406,85 +128,85 @@ const Kt = oe("Send", [
|
|
|
406
128
|
* This source code is licensed under the ISC license.
|
|
407
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
408
130
|
*/
|
|
409
|
-
const
|
|
131
|
+
const Lt = V("X", [
|
|
410
132
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
411
133
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
412
134
|
]);
|
|
413
|
-
function
|
|
135
|
+
function tt(e, t) {
|
|
414
136
|
return function() {
|
|
415
137
|
return e.apply(t, arguments);
|
|
416
138
|
};
|
|
417
139
|
}
|
|
418
|
-
const { toString:
|
|
419
|
-
const
|
|
420
|
-
return e[
|
|
421
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
422
|
-
function
|
|
423
|
-
return e !== null && !
|
|
140
|
+
const { toString: kt } = Object.prototype, { getPrototypeOf: Oe } = Object, { iterator: ae, toStringTag: nt } = Symbol, ce = /* @__PURE__ */ ((e) => (t) => {
|
|
141
|
+
const n = kt.call(t);
|
|
142
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
143
|
+
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => ce(t) === e), le = (e) => (t) => typeof t === e, { isArray: H } = Array, q = le("undefined");
|
|
144
|
+
function K(e) {
|
|
145
|
+
return e !== null && !q(e) && e.constructor !== null && !q(e.constructor) && C(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
424
146
|
}
|
|
425
|
-
const
|
|
426
|
-
function
|
|
147
|
+
const rt = P("ArrayBuffer");
|
|
148
|
+
function Bt(e) {
|
|
427
149
|
let t;
|
|
428
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
150
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && rt(e.buffer), t;
|
|
429
151
|
}
|
|
430
|
-
const
|
|
431
|
-
if (
|
|
152
|
+
const It = le("string"), C = le("function"), st = le("number"), W = (e) => e !== null && typeof e == "object", jt = (e) => e === !0 || e === !1, re = (e) => {
|
|
153
|
+
if (ce(e) !== "object")
|
|
432
154
|
return !1;
|
|
433
|
-
const t =
|
|
434
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
435
|
-
},
|
|
436
|
-
if (!
|
|
155
|
+
const t = Oe(e);
|
|
156
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(nt in e) && !(ae in e);
|
|
157
|
+
}, Mt = (e) => {
|
|
158
|
+
if (!W(e) || K(e))
|
|
437
159
|
return !1;
|
|
438
160
|
try {
|
|
439
161
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
440
162
|
} catch {
|
|
441
163
|
return !1;
|
|
442
164
|
}
|
|
443
|
-
},
|
|
165
|
+
}, $t = P("Date"), qt = P("File"), Ht = P("Blob"), zt = P("FileList"), vt = (e) => W(e) && C(e.pipe), Jt = (e) => {
|
|
444
166
|
let t;
|
|
445
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
446
|
-
t === "object" &&
|
|
447
|
-
},
|
|
448
|
-
function
|
|
167
|
+
return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t = ce(e)) === "formdata" || // detect form-data instance
|
|
168
|
+
t === "object" && C(e.toString) && e.toString() === "[object FormData]"));
|
|
169
|
+
}, Vt = P("URLSearchParams"), [Kt, Wt, Xt, Gt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), Zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
170
|
+
function X(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
449
171
|
if (e === null || typeof e > "u")
|
|
450
172
|
return;
|
|
451
|
-
let
|
|
452
|
-
if (typeof e != "object" && (e = [e]),
|
|
453
|
-
for (
|
|
454
|
-
t.call(null, e[
|
|
173
|
+
let r, s;
|
|
174
|
+
if (typeof e != "object" && (e = [e]), H(e))
|
|
175
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
176
|
+
t.call(null, e[r], r, e);
|
|
455
177
|
else {
|
|
456
|
-
if (
|
|
178
|
+
if (K(e))
|
|
457
179
|
return;
|
|
458
|
-
const o =
|
|
180
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
459
181
|
let a;
|
|
460
|
-
for (
|
|
461
|
-
a = o[
|
|
182
|
+
for (r = 0; r < i; r++)
|
|
183
|
+
a = o[r], t.call(null, e[a], a, e);
|
|
462
184
|
}
|
|
463
185
|
}
|
|
464
|
-
function
|
|
465
|
-
if (
|
|
186
|
+
function ot(e, t) {
|
|
187
|
+
if (K(e))
|
|
466
188
|
return null;
|
|
467
189
|
t = t.toLowerCase();
|
|
468
|
-
const
|
|
469
|
-
let
|
|
470
|
-
for (;
|
|
471
|
-
if (s = r
|
|
190
|
+
const n = Object.keys(e);
|
|
191
|
+
let r = n.length, s;
|
|
192
|
+
for (; r-- > 0; )
|
|
193
|
+
if (s = n[r], t === s.toLowerCase())
|
|
472
194
|
return s;
|
|
473
195
|
return null;
|
|
474
196
|
}
|
|
475
|
-
const
|
|
476
|
-
function
|
|
477
|
-
const { caseless: e, skipUndefined: t } =
|
|
478
|
-
const i = e &&
|
|
479
|
-
|
|
197
|
+
const I = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, it = (e) => !q(e) && e !== I;
|
|
198
|
+
function Ee() {
|
|
199
|
+
const { caseless: e, skipUndefined: t } = it(this) && this || {}, n = {}, r = (s, o) => {
|
|
200
|
+
const i = e && ot(n, o) || o;
|
|
201
|
+
re(n[i]) && re(s) ? n[i] = Ee(n[i], s) : re(s) ? n[i] = Ee({}, s) : H(s) ? n[i] = s.slice() : (!t || !q(s)) && (n[i] = s);
|
|
480
202
|
};
|
|
481
203
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
482
|
-
arguments[s] &&
|
|
483
|
-
return
|
|
204
|
+
arguments[s] && X(arguments[s], r);
|
|
205
|
+
return n;
|
|
484
206
|
}
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
value:
|
|
207
|
+
const Qt = (e, t, n, { allOwnKeys: r } = {}) => (X(t, (s, o) => {
|
|
208
|
+
n && C(s) ? Object.defineProperty(e, o, {
|
|
209
|
+
value: tt(s, n),
|
|
488
210
|
writable: !0,
|
|
489
211
|
enumerable: !0,
|
|
490
212
|
configurable: !0
|
|
@@ -494,178 +216,178 @@ const pr = (e, t, r, { allOwnKeys: n } = {}) => (ce(t, (s, o) => {
|
|
|
494
216
|
enumerable: !0,
|
|
495
217
|
configurable: !0
|
|
496
218
|
});
|
|
497
|
-
}, { allOwnKeys:
|
|
498
|
-
e.prototype = Object.create(t.prototype,
|
|
219
|
+
}, { allOwnKeys: r }), e), Yt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), en = (e, t, n, r) => {
|
|
220
|
+
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
499
221
|
value: e,
|
|
500
222
|
writable: !0,
|
|
501
223
|
enumerable: !1,
|
|
502
224
|
configurable: !0
|
|
503
225
|
}), Object.defineProperty(e, "super", {
|
|
504
226
|
value: t.prototype
|
|
505
|
-
}),
|
|
506
|
-
},
|
|
227
|
+
}), n && Object.assign(e.prototype, n);
|
|
228
|
+
}, tn = (e, t, n, r) => {
|
|
507
229
|
let s, o, i;
|
|
508
230
|
const a = {};
|
|
509
231
|
if (t = t || {}, e == null) return t;
|
|
510
232
|
do {
|
|
511
233
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
512
|
-
i = s[o], (!
|
|
513
|
-
e =
|
|
514
|
-
} while (e && (!
|
|
234
|
+
i = s[o], (!r || r(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0);
|
|
235
|
+
e = n !== !1 && Oe(e);
|
|
236
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
515
237
|
return t;
|
|
516
|
-
},
|
|
517
|
-
e = String(e), (
|
|
518
|
-
const
|
|
519
|
-
return
|
|
520
|
-
},
|
|
238
|
+
}, nn = (e, t, n) => {
|
|
239
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
240
|
+
const r = e.indexOf(t, n);
|
|
241
|
+
return r !== -1 && r === n;
|
|
242
|
+
}, rn = (e) => {
|
|
521
243
|
if (!e) return null;
|
|
522
|
-
if (
|
|
244
|
+
if (H(e)) return e;
|
|
523
245
|
let t = e.length;
|
|
524
|
-
if (!
|
|
525
|
-
const
|
|
246
|
+
if (!st(t)) return null;
|
|
247
|
+
const n = new Array(t);
|
|
526
248
|
for (; t-- > 0; )
|
|
527
|
-
|
|
528
|
-
return
|
|
529
|
-
},
|
|
530
|
-
const
|
|
249
|
+
n[t] = e[t];
|
|
250
|
+
return n;
|
|
251
|
+
}, sn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Oe(Uint8Array)), on = (e, t) => {
|
|
252
|
+
const r = (e && e[ae]).call(e);
|
|
531
253
|
let s;
|
|
532
|
-
for (; (s =
|
|
254
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
533
255
|
const o = s.value;
|
|
534
256
|
t.call(e, o[0], o[1]);
|
|
535
257
|
}
|
|
536
|
-
},
|
|
537
|
-
let
|
|
538
|
-
const
|
|
539
|
-
for (; (
|
|
540
|
-
|
|
541
|
-
return
|
|
542
|
-
},
|
|
258
|
+
}, an = (e, t) => {
|
|
259
|
+
let n;
|
|
260
|
+
const r = [];
|
|
261
|
+
for (; (n = e.exec(t)) !== null; )
|
|
262
|
+
r.push(n);
|
|
263
|
+
return r;
|
|
264
|
+
}, cn = P("HTMLFormElement"), ln = (e) => e.toLowerCase().replace(
|
|
543
265
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
544
|
-
function(
|
|
545
|
-
return
|
|
266
|
+
function(n, r, s) {
|
|
267
|
+
return r.toUpperCase() + s;
|
|
546
268
|
}
|
|
547
|
-
),
|
|
548
|
-
const
|
|
549
|
-
|
|
269
|
+
), Le = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), un = P("RegExp"), at = (e, t) => {
|
|
270
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
271
|
+
X(n, (s, o) => {
|
|
550
272
|
let i;
|
|
551
|
-
(i = t(s, o, e)) !== !1 && (
|
|
552
|
-
}), Object.defineProperties(e,
|
|
553
|
-
},
|
|
554
|
-
|
|
555
|
-
if (
|
|
273
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
274
|
+
}), Object.defineProperties(e, r);
|
|
275
|
+
}, fn = (e) => {
|
|
276
|
+
at(e, (t, n) => {
|
|
277
|
+
if (C(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
556
278
|
return !1;
|
|
557
|
-
const
|
|
558
|
-
if (
|
|
279
|
+
const r = e[n];
|
|
280
|
+
if (C(r)) {
|
|
559
281
|
if (t.enumerable = !1, "writable" in t) {
|
|
560
282
|
t.writable = !1;
|
|
561
283
|
return;
|
|
562
284
|
}
|
|
563
285
|
t.set || (t.set = () => {
|
|
564
|
-
throw Error("Can not rewrite read-only method '" +
|
|
286
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
565
287
|
});
|
|
566
288
|
}
|
|
567
289
|
});
|
|
568
|
-
},
|
|
569
|
-
const
|
|
290
|
+
}, dn = (e, t) => {
|
|
291
|
+
const n = {}, r = (s) => {
|
|
570
292
|
s.forEach((o) => {
|
|
571
|
-
|
|
293
|
+
n[o] = !0;
|
|
572
294
|
});
|
|
573
295
|
};
|
|
574
|
-
return
|
|
575
|
-
},
|
|
576
|
-
},
|
|
577
|
-
function
|
|
578
|
-
return !!(e &&
|
|
296
|
+
return H(e) ? r(e) : r(String(e).split(t)), n;
|
|
297
|
+
}, pn = () => {
|
|
298
|
+
}, mn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
299
|
+
function hn(e) {
|
|
300
|
+
return !!(e && C(e.append) && e[nt] === "FormData" && e[ae]);
|
|
579
301
|
}
|
|
580
|
-
const
|
|
581
|
-
const t = new Array(10),
|
|
582
|
-
if (
|
|
583
|
-
if (t.indexOf(
|
|
302
|
+
const yn = (e) => {
|
|
303
|
+
const t = new Array(10), n = (r, s) => {
|
|
304
|
+
if (W(r)) {
|
|
305
|
+
if (t.indexOf(r) >= 0)
|
|
584
306
|
return;
|
|
585
|
-
if (
|
|
586
|
-
return
|
|
587
|
-
if (!("toJSON" in
|
|
588
|
-
t[s] =
|
|
589
|
-
const o =
|
|
590
|
-
return
|
|
591
|
-
const
|
|
592
|
-
!
|
|
307
|
+
if (K(r))
|
|
308
|
+
return r;
|
|
309
|
+
if (!("toJSON" in r)) {
|
|
310
|
+
t[s] = r;
|
|
311
|
+
const o = H(r) ? [] : {};
|
|
312
|
+
return X(r, (i, a) => {
|
|
313
|
+
const d = n(i, s + 1);
|
|
314
|
+
!q(d) && (o[a] = d);
|
|
593
315
|
}), t[s] = void 0, o;
|
|
594
316
|
}
|
|
595
317
|
}
|
|
596
|
-
return
|
|
318
|
+
return r;
|
|
597
319
|
};
|
|
598
|
-
return
|
|
599
|
-
},
|
|
600
|
-
s ===
|
|
320
|
+
return n(e, 0);
|
|
321
|
+
}, wn = P("AsyncFunction"), En = (e) => e && (W(e) || C(e)) && C(e.then) && C(e.catch), ct = ((e, t) => e ? setImmediate : t ? ((n, r) => (I.addEventListener("message", ({ source: s, data: o }) => {
|
|
322
|
+
s === I && o === n && r.length && r.shift()();
|
|
601
323
|
}, !1), (s) => {
|
|
602
|
-
|
|
603
|
-
}))(`axios@${Math.random()}`, []) : (
|
|
324
|
+
r.push(s), I.postMessage(n, "*");
|
|
325
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
604
326
|
typeof setImmediate == "function",
|
|
605
|
-
|
|
606
|
-
),
|
|
607
|
-
isArray:
|
|
608
|
-
isArrayBuffer:
|
|
609
|
-
isBuffer:
|
|
610
|
-
isFormData:
|
|
611
|
-
isArrayBufferView:
|
|
612
|
-
isString:
|
|
613
|
-
isNumber:
|
|
614
|
-
isBoolean:
|
|
615
|
-
isObject:
|
|
616
|
-
isPlainObject:
|
|
617
|
-
isEmptyObject:
|
|
618
|
-
isReadableStream:
|
|
619
|
-
isRequest:
|
|
620
|
-
isResponse:
|
|
621
|
-
isHeaders:
|
|
622
|
-
isUndefined:
|
|
623
|
-
isDate:
|
|
624
|
-
isFile:
|
|
625
|
-
isBlob:
|
|
626
|
-
isRegExp:
|
|
627
|
-
isFunction:
|
|
628
|
-
isStream:
|
|
629
|
-
isURLSearchParams:
|
|
630
|
-
isTypedArray:
|
|
631
|
-
isFileList:
|
|
632
|
-
forEach:
|
|
633
|
-
merge:
|
|
634
|
-
extend:
|
|
635
|
-
trim:
|
|
636
|
-
stripBOM:
|
|
637
|
-
inherits:
|
|
638
|
-
toFlatObject:
|
|
639
|
-
kindOf:
|
|
640
|
-
kindOfTest:
|
|
641
|
-
endsWith:
|
|
642
|
-
toArray:
|
|
643
|
-
forEachEntry:
|
|
644
|
-
matchAll:
|
|
645
|
-
isHTMLForm:
|
|
646
|
-
hasOwnProperty:
|
|
647
|
-
hasOwnProp:
|
|
327
|
+
C(I.postMessage)
|
|
328
|
+
), bn = typeof queueMicrotask < "u" ? queueMicrotask.bind(I) : typeof process < "u" && process.nextTick || ct, gn = (e) => e != null && C(e[ae]), c = {
|
|
329
|
+
isArray: H,
|
|
330
|
+
isArrayBuffer: rt,
|
|
331
|
+
isBuffer: K,
|
|
332
|
+
isFormData: Jt,
|
|
333
|
+
isArrayBufferView: Bt,
|
|
334
|
+
isString: It,
|
|
335
|
+
isNumber: st,
|
|
336
|
+
isBoolean: jt,
|
|
337
|
+
isObject: W,
|
|
338
|
+
isPlainObject: re,
|
|
339
|
+
isEmptyObject: Mt,
|
|
340
|
+
isReadableStream: Kt,
|
|
341
|
+
isRequest: Wt,
|
|
342
|
+
isResponse: Xt,
|
|
343
|
+
isHeaders: Gt,
|
|
344
|
+
isUndefined: q,
|
|
345
|
+
isDate: $t,
|
|
346
|
+
isFile: qt,
|
|
347
|
+
isBlob: Ht,
|
|
348
|
+
isRegExp: un,
|
|
349
|
+
isFunction: C,
|
|
350
|
+
isStream: vt,
|
|
351
|
+
isURLSearchParams: Vt,
|
|
352
|
+
isTypedArray: sn,
|
|
353
|
+
isFileList: zt,
|
|
354
|
+
forEach: X,
|
|
355
|
+
merge: Ee,
|
|
356
|
+
extend: Qt,
|
|
357
|
+
trim: Zt,
|
|
358
|
+
stripBOM: Yt,
|
|
359
|
+
inherits: en,
|
|
360
|
+
toFlatObject: tn,
|
|
361
|
+
kindOf: ce,
|
|
362
|
+
kindOfTest: P,
|
|
363
|
+
endsWith: nn,
|
|
364
|
+
toArray: rn,
|
|
365
|
+
forEachEntry: on,
|
|
366
|
+
matchAll: an,
|
|
367
|
+
isHTMLForm: cn,
|
|
368
|
+
hasOwnProperty: Le,
|
|
369
|
+
hasOwnProp: Le,
|
|
648
370
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
649
|
-
reduceDescriptors:
|
|
650
|
-
freezeMethods:
|
|
651
|
-
toObjectSet:
|
|
652
|
-
toCamelCase:
|
|
653
|
-
noop:
|
|
654
|
-
toFiniteNumber:
|
|
655
|
-
findKey:
|
|
656
|
-
global:
|
|
657
|
-
isContextDefined:
|
|
658
|
-
isSpecCompliantForm:
|
|
659
|
-
toJSONObject:
|
|
660
|
-
isAsyncFn:
|
|
661
|
-
isThenable:
|
|
662
|
-
setImmediate:
|
|
663
|
-
asap:
|
|
664
|
-
isIterable:
|
|
371
|
+
reduceDescriptors: at,
|
|
372
|
+
freezeMethods: fn,
|
|
373
|
+
toObjectSet: dn,
|
|
374
|
+
toCamelCase: ln,
|
|
375
|
+
noop: pn,
|
|
376
|
+
toFiniteNumber: mn,
|
|
377
|
+
findKey: ot,
|
|
378
|
+
global: I,
|
|
379
|
+
isContextDefined: it,
|
|
380
|
+
isSpecCompliantForm: hn,
|
|
381
|
+
toJSONObject: yn,
|
|
382
|
+
isAsyncFn: wn,
|
|
383
|
+
isThenable: En,
|
|
384
|
+
setImmediate: ct,
|
|
385
|
+
asap: bn,
|
|
386
|
+
isIterable: gn
|
|
665
387
|
};
|
|
666
|
-
let
|
|
667
|
-
static from(t,
|
|
668
|
-
const a = new
|
|
388
|
+
let w = class lt extends Error {
|
|
389
|
+
static from(t, n, r, s, o, i) {
|
|
390
|
+
const a = new lt(t.message, n || t.code, r, s, o);
|
|
669
391
|
return a.cause = t, a.name = t.name, i && Object.assign(a, i), a;
|
|
670
392
|
}
|
|
671
393
|
/**
|
|
@@ -679,8 +401,8 @@ let b = class gt extends Error {
|
|
|
679
401
|
*
|
|
680
402
|
* @returns {Error} The created error.
|
|
681
403
|
*/
|
|
682
|
-
constructor(t,
|
|
683
|
-
super(t), this.name = "AxiosError", this.isAxiosError = !0,
|
|
404
|
+
constructor(t, n, r, s, o) {
|
|
405
|
+
super(t), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), r && (this.config = r), s && (this.request = s), o && (this.response = o, this.status = o.status);
|
|
684
406
|
}
|
|
685
407
|
toJSON() {
|
|
686
408
|
return {
|
|
@@ -702,100 +424,100 @@ let b = class gt extends Error {
|
|
|
702
424
|
};
|
|
703
425
|
}
|
|
704
426
|
};
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
const
|
|
718
|
-
function
|
|
427
|
+
w.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
428
|
+
w.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
429
|
+
w.ECONNABORTED = "ECONNABORTED";
|
|
430
|
+
w.ETIMEDOUT = "ETIMEDOUT";
|
|
431
|
+
w.ERR_NETWORK = "ERR_NETWORK";
|
|
432
|
+
w.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
433
|
+
w.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
434
|
+
w.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
435
|
+
w.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
436
|
+
w.ERR_CANCELED = "ERR_CANCELED";
|
|
437
|
+
w.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
438
|
+
w.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
439
|
+
const Sn = null;
|
|
440
|
+
function be(e) {
|
|
719
441
|
return c.isPlainObject(e) || c.isArray(e);
|
|
720
442
|
}
|
|
721
|
-
function
|
|
443
|
+
function ut(e) {
|
|
722
444
|
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
723
445
|
}
|
|
724
|
-
function
|
|
446
|
+
function ke(e, t, n) {
|
|
725
447
|
return e ? e.concat(t).map(function(s, o) {
|
|
726
|
-
return s =
|
|
727
|
-
}).join(
|
|
448
|
+
return s = ut(s), !n && o ? "[" + s + "]" : s;
|
|
449
|
+
}).join(n ? "." : "") : t;
|
|
728
450
|
}
|
|
729
|
-
function
|
|
730
|
-
return c.isArray(e) && !e.some(
|
|
451
|
+
function Rn(e) {
|
|
452
|
+
return c.isArray(e) && !e.some(be);
|
|
731
453
|
}
|
|
732
|
-
const
|
|
454
|
+
const On = c.toFlatObject(c, {}, null, function(t) {
|
|
733
455
|
return /^is[A-Z]/.test(t);
|
|
734
456
|
});
|
|
735
|
-
function
|
|
457
|
+
function ue(e, t, n) {
|
|
736
458
|
if (!c.isObject(e))
|
|
737
459
|
throw new TypeError("target must be an object");
|
|
738
|
-
t = t || new FormData(),
|
|
460
|
+
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
739
461
|
metaTokens: !0,
|
|
740
462
|
dots: !1,
|
|
741
463
|
indexes: !1
|
|
742
|
-
}, !1, function(
|
|
743
|
-
return !c.isUndefined(h
|
|
464
|
+
}, !1, function(h, m) {
|
|
465
|
+
return !c.isUndefined(m[h]);
|
|
744
466
|
});
|
|
745
|
-
const
|
|
467
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
746
468
|
if (!c.isFunction(s))
|
|
747
469
|
throw new TypeError("visitor must be a function");
|
|
748
|
-
function f
|
|
749
|
-
if (
|
|
750
|
-
if (c.isDate(
|
|
751
|
-
return
|
|
752
|
-
if (c.isBoolean(
|
|
753
|
-
return
|
|
754
|
-
if (!
|
|
755
|
-
throw new
|
|
756
|
-
return c.isArrayBuffer(
|
|
757
|
-
}
|
|
758
|
-
function
|
|
759
|
-
let
|
|
760
|
-
if (
|
|
761
|
-
if (c.endsWith(
|
|
762
|
-
|
|
763
|
-
else if (c.isArray(
|
|
764
|
-
return
|
|
765
|
-
!(c.isUndefined(
|
|
470
|
+
function u(f) {
|
|
471
|
+
if (f === null) return "";
|
|
472
|
+
if (c.isDate(f))
|
|
473
|
+
return f.toISOString();
|
|
474
|
+
if (c.isBoolean(f))
|
|
475
|
+
return f.toString();
|
|
476
|
+
if (!d && c.isBlob(f))
|
|
477
|
+
throw new w("Blob is not supported. Use a Buffer instead.");
|
|
478
|
+
return c.isArrayBuffer(f) || c.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
479
|
+
}
|
|
480
|
+
function l(f, h, m) {
|
|
481
|
+
let g = f;
|
|
482
|
+
if (f && !m && typeof f == "object") {
|
|
483
|
+
if (c.endsWith(h, "{}"))
|
|
484
|
+
h = r ? h : h.slice(0, -2), f = JSON.stringify(f);
|
|
485
|
+
else if (c.isArray(f) && Rn(f) || (c.isFileList(f) || c.endsWith(h, "[]")) && (g = c.toArray(f)))
|
|
486
|
+
return h = ut(h), g.forEach(function(y, S) {
|
|
487
|
+
!(c.isUndefined(y) || y === null) && t.append(
|
|
766
488
|
// eslint-disable-next-line no-nested-ternary
|
|
767
|
-
i === !0 ?
|
|
768
|
-
|
|
489
|
+
i === !0 ? ke([h], S, o) : i === null ? h : h + "[]",
|
|
490
|
+
u(y)
|
|
769
491
|
);
|
|
770
492
|
}), !1;
|
|
771
493
|
}
|
|
772
|
-
return
|
|
494
|
+
return be(f) ? !0 : (t.append(ke(m, h, o), u(f)), !1);
|
|
773
495
|
}
|
|
774
|
-
const
|
|
775
|
-
defaultVisitor:
|
|
776
|
-
convertValue:
|
|
777
|
-
isVisitable:
|
|
496
|
+
const p = [], E = Object.assign(On, {
|
|
497
|
+
defaultVisitor: l,
|
|
498
|
+
convertValue: u,
|
|
499
|
+
isVisitable: be
|
|
778
500
|
});
|
|
779
|
-
function
|
|
780
|
-
if (!c.isUndefined(
|
|
781
|
-
if (
|
|
782
|
-
throw Error("Circular reference detected in " +
|
|
783
|
-
|
|
784
|
-
(!(c.isUndefined(
|
|
501
|
+
function _(f, h) {
|
|
502
|
+
if (!c.isUndefined(f)) {
|
|
503
|
+
if (p.indexOf(f) !== -1)
|
|
504
|
+
throw Error("Circular reference detected in " + h.join("."));
|
|
505
|
+
p.push(f), c.forEach(f, function(g, R) {
|
|
506
|
+
(!(c.isUndefined(g) || g === null) && s.call(
|
|
785
507
|
t,
|
|
786
|
-
|
|
787
|
-
c.isString(
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
)) === !0 &&
|
|
791
|
-
}),
|
|
508
|
+
g,
|
|
509
|
+
c.isString(R) ? R.trim() : R,
|
|
510
|
+
h,
|
|
511
|
+
E
|
|
512
|
+
)) === !0 && _(g, h ? h.concat(R) : [R]);
|
|
513
|
+
}), p.pop();
|
|
792
514
|
}
|
|
793
515
|
}
|
|
794
516
|
if (!c.isObject(e))
|
|
795
517
|
throw new TypeError("data must be an object");
|
|
796
|
-
return
|
|
518
|
+
return _(e), t;
|
|
797
519
|
}
|
|
798
|
-
function
|
|
520
|
+
function Be(e) {
|
|
799
521
|
const t = {
|
|
800
522
|
"!": "%21",
|
|
801
523
|
"'": "%27",
|
|
@@ -805,42 +527,42 @@ function We(e) {
|
|
|
805
527
|
"%20": "+",
|
|
806
528
|
"%00": "\0"
|
|
807
529
|
};
|
|
808
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
809
|
-
return t[
|
|
530
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
531
|
+
return t[r];
|
|
810
532
|
});
|
|
811
533
|
}
|
|
812
|
-
function
|
|
813
|
-
this._pairs = [], e &&
|
|
534
|
+
function _e(e, t) {
|
|
535
|
+
this._pairs = [], e && ue(e, this, t);
|
|
814
536
|
}
|
|
815
|
-
const
|
|
816
|
-
|
|
817
|
-
this._pairs.push([t,
|
|
537
|
+
const ft = _e.prototype;
|
|
538
|
+
ft.append = function(t, n) {
|
|
539
|
+
this._pairs.push([t, n]);
|
|
818
540
|
};
|
|
819
|
-
|
|
820
|
-
const
|
|
821
|
-
return t.call(this,
|
|
822
|
-
} :
|
|
541
|
+
ft.toString = function(t) {
|
|
542
|
+
const n = t ? function(r) {
|
|
543
|
+
return t.call(this, r, Be);
|
|
544
|
+
} : Be;
|
|
823
545
|
return this._pairs.map(function(s) {
|
|
824
|
-
return
|
|
546
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
825
547
|
}, "").join("&");
|
|
826
548
|
};
|
|
827
|
-
function
|
|
549
|
+
function _n(e) {
|
|
828
550
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
829
551
|
}
|
|
830
|
-
function
|
|
552
|
+
function dt(e, t, n) {
|
|
831
553
|
if (!t)
|
|
832
554
|
return e;
|
|
833
|
-
const
|
|
834
|
-
serialize:
|
|
835
|
-
} :
|
|
555
|
+
const r = n && n.encode || _n, s = c.isFunction(n) ? {
|
|
556
|
+
serialize: n
|
|
557
|
+
} : n, o = s && s.serialize;
|
|
836
558
|
let i;
|
|
837
|
-
if (o ? i = o(t, s) : i = c.isURLSearchParams(t) ? t.toString() : new
|
|
559
|
+
if (o ? i = o(t, s) : i = c.isURLSearchParams(t) ? t.toString() : new _e(t, s).toString(r), i) {
|
|
838
560
|
const a = e.indexOf("#");
|
|
839
561
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
840
562
|
}
|
|
841
563
|
return e;
|
|
842
564
|
}
|
|
843
|
-
class
|
|
565
|
+
class Ie {
|
|
844
566
|
constructor() {
|
|
845
567
|
this.handlers = [];
|
|
846
568
|
}
|
|
@@ -853,12 +575,12 @@ class Ke {
|
|
|
853
575
|
*
|
|
854
576
|
* @return {Number} An ID used to remove interceptor later
|
|
855
577
|
*/
|
|
856
|
-
use(t,
|
|
578
|
+
use(t, n, r) {
|
|
857
579
|
return this.handlers.push({
|
|
858
580
|
fulfilled: t,
|
|
859
|
-
rejected:
|
|
860
|
-
synchronous:
|
|
861
|
-
runWhen:
|
|
581
|
+
rejected: n,
|
|
582
|
+
synchronous: r ? r.synchronous : !1,
|
|
583
|
+
runWhen: r ? r.runWhen : null
|
|
862
584
|
}), this.handlers.length - 1;
|
|
863
585
|
}
|
|
864
586
|
/**
|
|
@@ -890,119 +612,119 @@ class Ke {
|
|
|
890
612
|
* @returns {void}
|
|
891
613
|
*/
|
|
892
614
|
forEach(t) {
|
|
893
|
-
c.forEach(this.handlers, function(
|
|
894
|
-
|
|
615
|
+
c.forEach(this.handlers, function(r) {
|
|
616
|
+
r !== null && t(r);
|
|
895
617
|
});
|
|
896
618
|
}
|
|
897
619
|
}
|
|
898
|
-
const
|
|
620
|
+
const pt = {
|
|
899
621
|
silentJSONParsing: !0,
|
|
900
622
|
forcedJSONParsing: !0,
|
|
901
623
|
clarifyTimeoutError: !1
|
|
902
|
-
},
|
|
624
|
+
}, An = typeof URLSearchParams < "u" ? URLSearchParams : _e, Tn = typeof FormData < "u" ? FormData : null, Cn = typeof Blob < "u" ? Blob : null, Nn = {
|
|
903
625
|
isBrowser: !0,
|
|
904
626
|
classes: {
|
|
905
|
-
URLSearchParams:
|
|
906
|
-
FormData:
|
|
907
|
-
Blob:
|
|
627
|
+
URLSearchParams: An,
|
|
628
|
+
FormData: Tn,
|
|
629
|
+
Blob: Cn
|
|
908
630
|
},
|
|
909
631
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
910
|
-
},
|
|
911
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
632
|
+
}, Ae = typeof window < "u" && typeof document < "u", ge = typeof navigator == "object" && navigator || void 0, xn = Ae && (!ge || ["ReactNative", "NativeScript", "NS"].indexOf(ge.product) < 0), Pn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
633
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Dn = Ae && window.location.href || "http://localhost", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
912
634
|
__proto__: null,
|
|
913
|
-
hasBrowserEnv:
|
|
914
|
-
hasStandardBrowserEnv:
|
|
915
|
-
hasStandardBrowserWebWorkerEnv:
|
|
916
|
-
navigator:
|
|
917
|
-
origin:
|
|
918
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
919
|
-
...
|
|
920
|
-
...
|
|
635
|
+
hasBrowserEnv: Ae,
|
|
636
|
+
hasStandardBrowserEnv: xn,
|
|
637
|
+
hasStandardBrowserWebWorkerEnv: Pn,
|
|
638
|
+
navigator: ge,
|
|
639
|
+
origin: Dn
|
|
640
|
+
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
641
|
+
...Fn,
|
|
642
|
+
...Nn
|
|
921
643
|
};
|
|
922
|
-
function
|
|
923
|
-
return
|
|
924
|
-
visitor: function(
|
|
925
|
-
return
|
|
644
|
+
function Un(e, t) {
|
|
645
|
+
return ue(e, new A.classes.URLSearchParams(), {
|
|
646
|
+
visitor: function(n, r, s, o) {
|
|
647
|
+
return A.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
926
648
|
},
|
|
927
649
|
...t
|
|
928
650
|
});
|
|
929
651
|
}
|
|
930
|
-
function
|
|
652
|
+
function Ln(e) {
|
|
931
653
|
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
932
654
|
}
|
|
933
|
-
function
|
|
934
|
-
const t = {},
|
|
935
|
-
let
|
|
936
|
-
const s =
|
|
655
|
+
function kn(e) {
|
|
656
|
+
const t = {}, n = Object.keys(e);
|
|
657
|
+
let r;
|
|
658
|
+
const s = n.length;
|
|
937
659
|
let o;
|
|
938
|
-
for (
|
|
939
|
-
o = r
|
|
660
|
+
for (r = 0; r < s; r++)
|
|
661
|
+
o = n[r], t[o] = e[o];
|
|
940
662
|
return t;
|
|
941
663
|
}
|
|
942
|
-
function
|
|
943
|
-
function t(
|
|
944
|
-
let i =
|
|
664
|
+
function mt(e) {
|
|
665
|
+
function t(n, r, s, o) {
|
|
666
|
+
let i = n[o++];
|
|
945
667
|
if (i === "__proto__") return !0;
|
|
946
|
-
const a = Number.isFinite(+i),
|
|
947
|
-
return i = !i && c.isArray(s) ? s.length : i,
|
|
668
|
+
const a = Number.isFinite(+i), d = o >= n.length;
|
|
669
|
+
return i = !i && c.isArray(s) ? s.length : i, d ? (c.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !a) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && c.isArray(s[i]) && (s[i] = kn(s[i])), !a);
|
|
948
670
|
}
|
|
949
671
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
950
|
-
const
|
|
951
|
-
return c.forEachEntry(e, (
|
|
952
|
-
t(
|
|
953
|
-
}),
|
|
672
|
+
const n = {};
|
|
673
|
+
return c.forEachEntry(e, (r, s) => {
|
|
674
|
+
t(Ln(r), s, n, 0);
|
|
675
|
+
}), n;
|
|
954
676
|
}
|
|
955
677
|
return null;
|
|
956
678
|
}
|
|
957
|
-
function
|
|
679
|
+
function Bn(e, t, n) {
|
|
958
680
|
if (c.isString(e))
|
|
959
681
|
try {
|
|
960
682
|
return (t || JSON.parse)(e), c.trim(e);
|
|
961
|
-
} catch (
|
|
962
|
-
if (
|
|
963
|
-
throw
|
|
683
|
+
} catch (r) {
|
|
684
|
+
if (r.name !== "SyntaxError")
|
|
685
|
+
throw r;
|
|
964
686
|
}
|
|
965
|
-
return (
|
|
687
|
+
return (n || JSON.stringify)(e);
|
|
966
688
|
}
|
|
967
|
-
const
|
|
968
|
-
transitional:
|
|
689
|
+
const G = {
|
|
690
|
+
transitional: pt,
|
|
969
691
|
adapter: ["xhr", "http", "fetch"],
|
|
970
|
-
transformRequest: [function(t,
|
|
971
|
-
const
|
|
692
|
+
transformRequest: [function(t, n) {
|
|
693
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(t);
|
|
972
694
|
if (o && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
973
|
-
return s ? JSON.stringify(
|
|
695
|
+
return s ? JSON.stringify(mt(t)) : t;
|
|
974
696
|
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
975
697
|
return t;
|
|
976
698
|
if (c.isArrayBufferView(t))
|
|
977
699
|
return t.buffer;
|
|
978
700
|
if (c.isURLSearchParams(t))
|
|
979
|
-
return
|
|
701
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
980
702
|
let a;
|
|
981
703
|
if (o) {
|
|
982
|
-
if (
|
|
983
|
-
return
|
|
984
|
-
if ((a = c.isFileList(t)) ||
|
|
985
|
-
const
|
|
986
|
-
return
|
|
704
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
705
|
+
return Un(t, this.formSerializer).toString();
|
|
706
|
+
if ((a = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
707
|
+
const d = this.env && this.env.FormData;
|
|
708
|
+
return ue(
|
|
987
709
|
a ? { "files[]": t } : t,
|
|
988
|
-
|
|
710
|
+
d && new d(),
|
|
989
711
|
this.formSerializer
|
|
990
712
|
);
|
|
991
713
|
}
|
|
992
714
|
}
|
|
993
|
-
return o || s ? (
|
|
715
|
+
return o || s ? (n.setContentType("application/json", !1), Bn(t)) : t;
|
|
994
716
|
}],
|
|
995
717
|
transformResponse: [function(t) {
|
|
996
|
-
const
|
|
718
|
+
const n = this.transitional || G.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
997
719
|
if (c.isResponse(t) || c.isReadableStream(t))
|
|
998
720
|
return t;
|
|
999
|
-
if (t && c.isString(t) && (
|
|
1000
|
-
const i = !(
|
|
721
|
+
if (t && c.isString(t) && (r && !this.responseType || s)) {
|
|
722
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
1001
723
|
try {
|
|
1002
724
|
return JSON.parse(t, this.parseReviver);
|
|
1003
725
|
} catch (a) {
|
|
1004
726
|
if (i)
|
|
1005
|
-
throw a.name === "SyntaxError" ?
|
|
727
|
+
throw a.name === "SyntaxError" ? w.from(a, w.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
1006
728
|
}
|
|
1007
729
|
}
|
|
1008
730
|
return t;
|
|
@@ -1017,8 +739,8 @@ const le = {
|
|
|
1017
739
|
maxContentLength: -1,
|
|
1018
740
|
maxBodyLength: -1,
|
|
1019
741
|
env: {
|
|
1020
|
-
FormData:
|
|
1021
|
-
Blob:
|
|
742
|
+
FormData: A.classes.FormData,
|
|
743
|
+
Blob: A.classes.Blob
|
|
1022
744
|
},
|
|
1023
745
|
validateStatus: function(t) {
|
|
1024
746
|
return t >= 200 && t < 300;
|
|
@@ -1031,9 +753,9 @@ const le = {
|
|
|
1031
753
|
}
|
|
1032
754
|
};
|
|
1033
755
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1034
|
-
|
|
756
|
+
G.headers[e] = {};
|
|
1035
757
|
});
|
|
1036
|
-
const
|
|
758
|
+
const In = c.toObjectSet([
|
|
1037
759
|
"age",
|
|
1038
760
|
"authorization",
|
|
1039
761
|
"content-length",
|
|
@@ -1051,152 +773,152 @@ const Gr = c.toObjectSet([
|
|
|
1051
773
|
"referer",
|
|
1052
774
|
"retry-after",
|
|
1053
775
|
"user-agent"
|
|
1054
|
-
]),
|
|
776
|
+
]), jn = (e) => {
|
|
1055
777
|
const t = {};
|
|
1056
|
-
let
|
|
778
|
+
let n, r, s;
|
|
1057
779
|
return e && e.split(`
|
|
1058
780
|
`).forEach(function(i) {
|
|
1059
|
-
s = i.indexOf(":"),
|
|
781
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && In[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1060
782
|
}), t;
|
|
1061
|
-
},
|
|
1062
|
-
function
|
|
783
|
+
}, je = Symbol("internals");
|
|
784
|
+
function v(e) {
|
|
1063
785
|
return e && String(e).trim().toLowerCase();
|
|
1064
786
|
}
|
|
1065
|
-
function
|
|
1066
|
-
return e === !1 || e == null ? e : c.isArray(e) ? e.map(
|
|
787
|
+
function se(e) {
|
|
788
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(se) : String(e);
|
|
1067
789
|
}
|
|
1068
|
-
function
|
|
1069
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
1070
|
-
let
|
|
1071
|
-
for (;
|
|
1072
|
-
t[
|
|
790
|
+
function Mn(e) {
|
|
791
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
792
|
+
let r;
|
|
793
|
+
for (; r = n.exec(e); )
|
|
794
|
+
t[r[1]] = r[2];
|
|
1073
795
|
return t;
|
|
1074
796
|
}
|
|
1075
|
-
const
|
|
1076
|
-
function
|
|
1077
|
-
if (c.isFunction(
|
|
1078
|
-
return
|
|
1079
|
-
if (s && (t =
|
|
1080
|
-
if (c.isString(
|
|
1081
|
-
return t.indexOf(
|
|
1082
|
-
if (c.isRegExp(
|
|
1083
|
-
return
|
|
797
|
+
const $n = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
798
|
+
function me(e, t, n, r, s) {
|
|
799
|
+
if (c.isFunction(r))
|
|
800
|
+
return r.call(this, t, n);
|
|
801
|
+
if (s && (t = n), !!c.isString(t)) {
|
|
802
|
+
if (c.isString(r))
|
|
803
|
+
return t.indexOf(r) !== -1;
|
|
804
|
+
if (c.isRegExp(r))
|
|
805
|
+
return r.test(t);
|
|
1084
806
|
}
|
|
1085
807
|
}
|
|
1086
|
-
function
|
|
1087
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
808
|
+
function qn(e) {
|
|
809
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1088
810
|
}
|
|
1089
|
-
function
|
|
1090
|
-
const
|
|
1091
|
-
["get", "set", "has"].forEach((
|
|
1092
|
-
Object.defineProperty(e,
|
|
811
|
+
function Hn(e, t) {
|
|
812
|
+
const n = c.toCamelCase(" " + t);
|
|
813
|
+
["get", "set", "has"].forEach((r) => {
|
|
814
|
+
Object.defineProperty(e, r + n, {
|
|
1093
815
|
value: function(s, o, i) {
|
|
1094
|
-
return this[
|
|
816
|
+
return this[r].call(this, t, s, o, i);
|
|
1095
817
|
},
|
|
1096
818
|
configurable: !0
|
|
1097
819
|
});
|
|
1098
820
|
});
|
|
1099
821
|
}
|
|
1100
|
-
let
|
|
822
|
+
let N = class {
|
|
1101
823
|
constructor(t) {
|
|
1102
824
|
t && this.set(t);
|
|
1103
825
|
}
|
|
1104
|
-
set(t,
|
|
826
|
+
set(t, n, r) {
|
|
1105
827
|
const s = this;
|
|
1106
|
-
function o(a,
|
|
1107
|
-
const
|
|
1108
|
-
if (!
|
|
828
|
+
function o(a, d, u) {
|
|
829
|
+
const l = v(d);
|
|
830
|
+
if (!l)
|
|
1109
831
|
throw new Error("header name must be a non-empty string");
|
|
1110
|
-
const
|
|
1111
|
-
(!
|
|
832
|
+
const p = c.findKey(s, l);
|
|
833
|
+
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || d] = se(a));
|
|
1112
834
|
}
|
|
1113
|
-
const i = (a,
|
|
835
|
+
const i = (a, d) => c.forEach(a, (u, l) => o(u, l, d));
|
|
1114
836
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
1115
|
-
i(t,
|
|
1116
|
-
else if (c.isString(t) && (t = t.trim()) &&
|
|
1117
|
-
i(
|
|
837
|
+
i(t, n);
|
|
838
|
+
else if (c.isString(t) && (t = t.trim()) && !$n(t))
|
|
839
|
+
i(jn(t), n);
|
|
1118
840
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
1119
|
-
let a = {},
|
|
1120
|
-
for (const
|
|
1121
|
-
if (!c.isArray(
|
|
841
|
+
let a = {}, d, u;
|
|
842
|
+
for (const l of t) {
|
|
843
|
+
if (!c.isArray(l))
|
|
1122
844
|
throw TypeError("Object iterator must return a key-value pair");
|
|
1123
|
-
a[
|
|
845
|
+
a[u = l[0]] = (d = a[u]) ? c.isArray(d) ? [...d, l[1]] : [d, l[1]] : l[1];
|
|
1124
846
|
}
|
|
1125
|
-
i(a,
|
|
847
|
+
i(a, n);
|
|
1126
848
|
} else
|
|
1127
|
-
t != null && o(
|
|
849
|
+
t != null && o(n, t, r);
|
|
1128
850
|
return this;
|
|
1129
851
|
}
|
|
1130
|
-
get(t,
|
|
1131
|
-
if (t =
|
|
1132
|
-
const
|
|
1133
|
-
if (
|
|
1134
|
-
const s = this[
|
|
1135
|
-
if (!
|
|
852
|
+
get(t, n) {
|
|
853
|
+
if (t = v(t), t) {
|
|
854
|
+
const r = c.findKey(this, t);
|
|
855
|
+
if (r) {
|
|
856
|
+
const s = this[r];
|
|
857
|
+
if (!n)
|
|
1136
858
|
return s;
|
|
1137
|
-
if (
|
|
1138
|
-
return
|
|
1139
|
-
if (c.isFunction(
|
|
1140
|
-
return
|
|
1141
|
-
if (c.isRegExp(
|
|
1142
|
-
return
|
|
859
|
+
if (n === !0)
|
|
860
|
+
return Mn(s);
|
|
861
|
+
if (c.isFunction(n))
|
|
862
|
+
return n.call(this, s, r);
|
|
863
|
+
if (c.isRegExp(n))
|
|
864
|
+
return n.exec(s);
|
|
1143
865
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
1144
866
|
}
|
|
1145
867
|
}
|
|
1146
868
|
}
|
|
1147
|
-
has(t,
|
|
1148
|
-
if (t =
|
|
1149
|
-
const
|
|
1150
|
-
return !!(
|
|
869
|
+
has(t, n) {
|
|
870
|
+
if (t = v(t), t) {
|
|
871
|
+
const r = c.findKey(this, t);
|
|
872
|
+
return !!(r && this[r] !== void 0 && (!n || me(this, this[r], r, n)));
|
|
1151
873
|
}
|
|
1152
874
|
return !1;
|
|
1153
875
|
}
|
|
1154
|
-
delete(t,
|
|
1155
|
-
const
|
|
876
|
+
delete(t, n) {
|
|
877
|
+
const r = this;
|
|
1156
878
|
let s = !1;
|
|
1157
879
|
function o(i) {
|
|
1158
|
-
if (i =
|
|
1159
|
-
const a = c.findKey(
|
|
1160
|
-
a && (!
|
|
880
|
+
if (i = v(i), i) {
|
|
881
|
+
const a = c.findKey(r, i);
|
|
882
|
+
a && (!n || me(r, r[a], a, n)) && (delete r[a], s = !0);
|
|
1161
883
|
}
|
|
1162
884
|
}
|
|
1163
885
|
return c.isArray(t) ? t.forEach(o) : o(t), s;
|
|
1164
886
|
}
|
|
1165
887
|
clear(t) {
|
|
1166
|
-
const
|
|
1167
|
-
let
|
|
1168
|
-
for (;
|
|
1169
|
-
const o = r
|
|
1170
|
-
(!t ||
|
|
888
|
+
const n = Object.keys(this);
|
|
889
|
+
let r = n.length, s = !1;
|
|
890
|
+
for (; r--; ) {
|
|
891
|
+
const o = n[r];
|
|
892
|
+
(!t || me(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
1171
893
|
}
|
|
1172
894
|
return s;
|
|
1173
895
|
}
|
|
1174
896
|
normalize(t) {
|
|
1175
|
-
const
|
|
897
|
+
const n = this, r = {};
|
|
1176
898
|
return c.forEach(this, (s, o) => {
|
|
1177
|
-
const i = c.findKey(
|
|
899
|
+
const i = c.findKey(r, o);
|
|
1178
900
|
if (i) {
|
|
1179
|
-
|
|
901
|
+
n[i] = se(s), delete n[o];
|
|
1180
902
|
return;
|
|
1181
903
|
}
|
|
1182
|
-
const a = t ?
|
|
1183
|
-
a !== o && delete
|
|
904
|
+
const a = t ? qn(o) : String(o).trim();
|
|
905
|
+
a !== o && delete n[o], n[a] = se(s), r[a] = !0;
|
|
1184
906
|
}), this;
|
|
1185
907
|
}
|
|
1186
908
|
concat(...t) {
|
|
1187
909
|
return this.constructor.concat(this, ...t);
|
|
1188
910
|
}
|
|
1189
911
|
toJSON(t) {
|
|
1190
|
-
const
|
|
1191
|
-
return c.forEach(this, (
|
|
1192
|
-
|
|
1193
|
-
}),
|
|
912
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
913
|
+
return c.forEach(this, (r, s) => {
|
|
914
|
+
r != null && r !== !1 && (n[s] = t && c.isArray(r) ? r.join(", ") : r);
|
|
915
|
+
}), n;
|
|
1194
916
|
}
|
|
1195
917
|
[Symbol.iterator]() {
|
|
1196
918
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1197
919
|
}
|
|
1198
920
|
toString() {
|
|
1199
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
921
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
1200
922
|
`);
|
|
1201
923
|
}
|
|
1202
924
|
getSetCookie() {
|
|
@@ -1208,43 +930,43 @@ let D = class {
|
|
|
1208
930
|
static from(t) {
|
|
1209
931
|
return t instanceof this ? t : new this(t);
|
|
1210
932
|
}
|
|
1211
|
-
static concat(t, ...
|
|
1212
|
-
const
|
|
1213
|
-
return
|
|
933
|
+
static concat(t, ...n) {
|
|
934
|
+
const r = new this(t);
|
|
935
|
+
return n.forEach((s) => r.set(s)), r;
|
|
1214
936
|
}
|
|
1215
937
|
static accessor(t) {
|
|
1216
|
-
const
|
|
938
|
+
const r = (this[je] = this[je] = {
|
|
1217
939
|
accessors: {}
|
|
1218
940
|
}).accessors, s = this.prototype;
|
|
1219
941
|
function o(i) {
|
|
1220
|
-
const a =
|
|
1221
|
-
|
|
942
|
+
const a = v(i);
|
|
943
|
+
r[a] || (Hn(s, i), r[a] = !0);
|
|
1222
944
|
}
|
|
1223
945
|
return c.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1224
946
|
}
|
|
1225
947
|
};
|
|
1226
|
-
|
|
1227
|
-
c.reduceDescriptors(
|
|
1228
|
-
let
|
|
948
|
+
N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
949
|
+
c.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
950
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
1229
951
|
return {
|
|
1230
952
|
get: () => e,
|
|
1231
|
-
set(
|
|
1232
|
-
this[
|
|
953
|
+
set(r) {
|
|
954
|
+
this[n] = r;
|
|
1233
955
|
}
|
|
1234
956
|
};
|
|
1235
957
|
});
|
|
1236
|
-
c.freezeMethods(
|
|
1237
|
-
function
|
|
1238
|
-
const
|
|
1239
|
-
let o =
|
|
958
|
+
c.freezeMethods(N);
|
|
959
|
+
function he(e, t) {
|
|
960
|
+
const n = this || G, r = t || n, s = N.from(r.headers);
|
|
961
|
+
let o = r.data;
|
|
1240
962
|
return c.forEach(e, function(a) {
|
|
1241
|
-
o = a.call(
|
|
963
|
+
o = a.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
1242
964
|
}), s.normalize(), o;
|
|
1243
965
|
}
|
|
1244
|
-
function
|
|
966
|
+
function ht(e) {
|
|
1245
967
|
return !!(e && e.__CANCEL__);
|
|
1246
968
|
}
|
|
1247
|
-
let
|
|
969
|
+
let Z = class extends w {
|
|
1248
970
|
/**
|
|
1249
971
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1250
972
|
*
|
|
@@ -1254,88 +976,88 @@ let ue = class extends b {
|
|
|
1254
976
|
*
|
|
1255
977
|
* @returns {CanceledError} The created error.
|
|
1256
978
|
*/
|
|
1257
|
-
constructor(t,
|
|
1258
|
-
super(t ?? "canceled",
|
|
979
|
+
constructor(t, n, r) {
|
|
980
|
+
super(t ?? "canceled", w.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1259
981
|
}
|
|
1260
982
|
};
|
|
1261
|
-
function
|
|
1262
|
-
const
|
|
1263
|
-
!
|
|
1264
|
-
"Request failed with status code " +
|
|
1265
|
-
[
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
983
|
+
function yt(e, t, n) {
|
|
984
|
+
const r = n.config.validateStatus;
|
|
985
|
+
!n.status || !r || r(n.status) ? e(n) : t(new w(
|
|
986
|
+
"Request failed with status code " + n.status,
|
|
987
|
+
[w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
988
|
+
n.config,
|
|
989
|
+
n.request,
|
|
990
|
+
n
|
|
1269
991
|
));
|
|
1270
992
|
}
|
|
1271
|
-
function
|
|
993
|
+
function zn(e) {
|
|
1272
994
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1273
995
|
return t && t[1] || "";
|
|
1274
996
|
}
|
|
1275
|
-
function
|
|
997
|
+
function vn(e, t) {
|
|
1276
998
|
e = e || 10;
|
|
1277
|
-
const
|
|
999
|
+
const n = new Array(e), r = new Array(e);
|
|
1278
1000
|
let s = 0, o = 0, i;
|
|
1279
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
1280
|
-
const
|
|
1281
|
-
i || (i =
|
|
1282
|
-
let
|
|
1283
|
-
for (;
|
|
1284
|
-
|
|
1285
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e),
|
|
1001
|
+
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1002
|
+
const u = Date.now(), l = r[o];
|
|
1003
|
+
i || (i = u), n[s] = d, r[s] = u;
|
|
1004
|
+
let p = o, E = 0;
|
|
1005
|
+
for (; p !== s; )
|
|
1006
|
+
E += n[p++], p = p % e;
|
|
1007
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
1286
1008
|
return;
|
|
1287
|
-
const
|
|
1288
|
-
return
|
|
1009
|
+
const _ = l && u - l;
|
|
1010
|
+
return _ ? Math.round(E * 1e3 / _) : void 0;
|
|
1289
1011
|
};
|
|
1290
1012
|
}
|
|
1291
|
-
function
|
|
1292
|
-
let
|
|
1293
|
-
const i = (
|
|
1294
|
-
|
|
1013
|
+
function Jn(e, t) {
|
|
1014
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
1015
|
+
const i = (u, l = Date.now()) => {
|
|
1016
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e(...u);
|
|
1295
1017
|
};
|
|
1296
|
-
return [(...
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1018
|
+
return [(...u) => {
|
|
1019
|
+
const l = Date.now(), p = l - n;
|
|
1020
|
+
p >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
1299
1021
|
o = null, i(s);
|
|
1300
|
-
},
|
|
1022
|
+
}, r - p)));
|
|
1301
1023
|
}, () => s && i(s)];
|
|
1302
1024
|
}
|
|
1303
|
-
const
|
|
1304
|
-
let
|
|
1305
|
-
const s =
|
|
1306
|
-
return
|
|
1307
|
-
const i = o.loaded, a = o.lengthComputable ? o.total : void 0,
|
|
1308
|
-
|
|
1309
|
-
const
|
|
1025
|
+
const ie = (e, t, n = 3) => {
|
|
1026
|
+
let r = 0;
|
|
1027
|
+
const s = vn(50, 250);
|
|
1028
|
+
return Jn((o) => {
|
|
1029
|
+
const i = o.loaded, a = o.lengthComputable ? o.total : void 0, d = i - r, u = s(d), l = i <= a;
|
|
1030
|
+
r = i;
|
|
1031
|
+
const p = {
|
|
1310
1032
|
loaded: i,
|
|
1311
1033
|
total: a,
|
|
1312
1034
|
progress: a ? i / a : void 0,
|
|
1313
|
-
bytes:
|
|
1314
|
-
rate:
|
|
1315
|
-
estimated:
|
|
1035
|
+
bytes: d,
|
|
1036
|
+
rate: u || void 0,
|
|
1037
|
+
estimated: u && a && l ? (a - i) / u : void 0,
|
|
1316
1038
|
event: o,
|
|
1317
1039
|
lengthComputable: a != null,
|
|
1318
1040
|
[t ? "download" : "upload"]: !0
|
|
1319
1041
|
};
|
|
1320
|
-
e(
|
|
1321
|
-
},
|
|
1322
|
-
},
|
|
1323
|
-
const
|
|
1324
|
-
return [(
|
|
1325
|
-
lengthComputable:
|
|
1042
|
+
e(p);
|
|
1043
|
+
}, n);
|
|
1044
|
+
}, Me = (e, t) => {
|
|
1045
|
+
const n = e != null;
|
|
1046
|
+
return [(r) => t[0]({
|
|
1047
|
+
lengthComputable: n,
|
|
1326
1048
|
total: e,
|
|
1327
|
-
loaded:
|
|
1049
|
+
loaded: r
|
|
1328
1050
|
}), t[1]];
|
|
1329
|
-
},
|
|
1330
|
-
new URL(
|
|
1331
|
-
|
|
1332
|
-
) : () => !0,
|
|
1051
|
+
}, $e = (e) => (...t) => c.asap(() => e(...t)), Vn = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, A.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1052
|
+
new URL(A.origin),
|
|
1053
|
+
A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
|
|
1054
|
+
) : () => !0, Kn = A.hasStandardBrowserEnv ? (
|
|
1333
1055
|
// Standard browser envs support document.cookie
|
|
1334
1056
|
{
|
|
1335
|
-
write(e, t,
|
|
1057
|
+
write(e, t, n, r, s, o, i) {
|
|
1336
1058
|
if (typeof document > "u") return;
|
|
1337
1059
|
const a = [`${e}=${encodeURIComponent(t)}`];
|
|
1338
|
-
c.isNumber(
|
|
1060
|
+
c.isNumber(n) && a.push(`expires=${new Date(n).toUTCString()}`), c.isString(r) && a.push(`path=${r}`), c.isString(s) && a.push(`domain=${s}`), o === !0 && a.push("secure"), c.isString(i) && a.push(`SameSite=${i}`), document.cookie = a.join("; ");
|
|
1339
1061
|
},
|
|
1340
1062
|
read(e) {
|
|
1341
1063
|
if (typeof document > "u") return null;
|
|
@@ -1358,46 +1080,46 @@ const ge = (e, t, r = 3) => {
|
|
|
1358
1080
|
}
|
|
1359
1081
|
}
|
|
1360
1082
|
);
|
|
1361
|
-
function
|
|
1083
|
+
function Wn(e) {
|
|
1362
1084
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1363
1085
|
}
|
|
1364
|
-
function
|
|
1086
|
+
function Xn(e, t) {
|
|
1365
1087
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1366
1088
|
}
|
|
1367
|
-
function
|
|
1368
|
-
let
|
|
1369
|
-
return e && (
|
|
1089
|
+
function wt(e, t, n) {
|
|
1090
|
+
let r = !Wn(t);
|
|
1091
|
+
return e && (r || n == !1) ? Xn(e, t) : t;
|
|
1370
1092
|
}
|
|
1371
|
-
const
|
|
1372
|
-
function
|
|
1093
|
+
const qe = (e) => e instanceof N ? { ...e } : e;
|
|
1094
|
+
function M(e, t) {
|
|
1373
1095
|
t = t || {};
|
|
1374
|
-
const
|
|
1375
|
-
function
|
|
1376
|
-
return c.isPlainObject(
|
|
1377
|
-
}
|
|
1378
|
-
function s(
|
|
1379
|
-
if (c.isUndefined(
|
|
1380
|
-
if (!c.isUndefined(
|
|
1381
|
-
return
|
|
1382
|
-
} else return
|
|
1383
|
-
}
|
|
1384
|
-
function o(
|
|
1385
|
-
if (!c.isUndefined(
|
|
1386
|
-
return
|
|
1387
|
-
}
|
|
1388
|
-
function i(
|
|
1389
|
-
if (c.isUndefined(
|
|
1390
|
-
if (!c.isUndefined(
|
|
1391
|
-
return
|
|
1392
|
-
} else return
|
|
1393
|
-
}
|
|
1394
|
-
function a(
|
|
1395
|
-
if (
|
|
1396
|
-
return
|
|
1397
|
-
if (
|
|
1398
|
-
return
|
|
1399
|
-
}
|
|
1400
|
-
const
|
|
1096
|
+
const n = {};
|
|
1097
|
+
function r(u, l, p, E) {
|
|
1098
|
+
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: E }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
1099
|
+
}
|
|
1100
|
+
function s(u, l, p, E) {
|
|
1101
|
+
if (c.isUndefined(l)) {
|
|
1102
|
+
if (!c.isUndefined(u))
|
|
1103
|
+
return r(void 0, u, p, E);
|
|
1104
|
+
} else return r(u, l, p, E);
|
|
1105
|
+
}
|
|
1106
|
+
function o(u, l) {
|
|
1107
|
+
if (!c.isUndefined(l))
|
|
1108
|
+
return r(void 0, l);
|
|
1109
|
+
}
|
|
1110
|
+
function i(u, l) {
|
|
1111
|
+
if (c.isUndefined(l)) {
|
|
1112
|
+
if (!c.isUndefined(u))
|
|
1113
|
+
return r(void 0, u);
|
|
1114
|
+
} else return r(void 0, l);
|
|
1115
|
+
}
|
|
1116
|
+
function a(u, l, p) {
|
|
1117
|
+
if (p in t)
|
|
1118
|
+
return r(u, l);
|
|
1119
|
+
if (p in e)
|
|
1120
|
+
return r(void 0, u);
|
|
1121
|
+
}
|
|
1122
|
+
const d = {
|
|
1401
1123
|
url: o,
|
|
1402
1124
|
method: o,
|
|
1403
1125
|
data: o,
|
|
@@ -1426,128 +1148,128 @@ function W(e, t) {
|
|
|
1426
1148
|
socketPath: i,
|
|
1427
1149
|
responseEncoding: i,
|
|
1428
1150
|
validateStatus: a,
|
|
1429
|
-
headers: (
|
|
1151
|
+
headers: (u, l, p) => s(qe(u), qe(l), p, !0)
|
|
1430
1152
|
};
|
|
1431
|
-
return c.forEach(Object.keys({ ...e, ...t }), function(
|
|
1432
|
-
const
|
|
1433
|
-
c.isUndefined(
|
|
1434
|
-
}),
|
|
1153
|
+
return c.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
1154
|
+
const p = d[l] || s, E = p(e[l], t[l], l);
|
|
1155
|
+
c.isUndefined(E) && p !== a || (n[l] = E);
|
|
1156
|
+
}), n;
|
|
1435
1157
|
}
|
|
1436
|
-
const
|
|
1437
|
-
const t =
|
|
1438
|
-
let { data:
|
|
1439
|
-
if (t.headers = i =
|
|
1158
|
+
const Et = (e) => {
|
|
1159
|
+
const t = M({}, e);
|
|
1160
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = t;
|
|
1161
|
+
if (t.headers = i = N.from(i), t.url = dt(wt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1440
1162
|
"Authorization",
|
|
1441
1163
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1442
|
-
), c.isFormData(
|
|
1443
|
-
if (
|
|
1164
|
+
), c.isFormData(n)) {
|
|
1165
|
+
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1444
1166
|
i.setContentType(void 0);
|
|
1445
|
-
else if (c.isFunction(
|
|
1446
|
-
const
|
|
1447
|
-
Object.entries(
|
|
1448
|
-
|
|
1167
|
+
else if (c.isFunction(n.getHeaders)) {
|
|
1168
|
+
const d = n.getHeaders(), u = ["content-type", "content-length"];
|
|
1169
|
+
Object.entries(d).forEach(([l, p]) => {
|
|
1170
|
+
u.includes(l.toLowerCase()) && i.set(l, p);
|
|
1449
1171
|
});
|
|
1450
1172
|
}
|
|
1451
1173
|
}
|
|
1452
|
-
if (
|
|
1453
|
-
const
|
|
1454
|
-
|
|
1174
|
+
if (A.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && Vn(t.url))) {
|
|
1175
|
+
const d = s && o && Kn.read(o);
|
|
1176
|
+
d && i.set(s, d);
|
|
1455
1177
|
}
|
|
1456
1178
|
return t;
|
|
1457
|
-
},
|
|
1458
|
-
return new Promise(function(
|
|
1459
|
-
const s =
|
|
1179
|
+
}, Gn = typeof XMLHttpRequest < "u", Zn = Gn && function(e) {
|
|
1180
|
+
return new Promise(function(n, r) {
|
|
1181
|
+
const s = Et(e);
|
|
1460
1182
|
let o = s.data;
|
|
1461
|
-
const i =
|
|
1462
|
-
let { responseType: a, onUploadProgress:
|
|
1463
|
-
function
|
|
1464
|
-
|
|
1183
|
+
const i = N.from(s.headers).normalize();
|
|
1184
|
+
let { responseType: a, onUploadProgress: d, onDownloadProgress: u } = s, l, p, E, _, f;
|
|
1185
|
+
function h() {
|
|
1186
|
+
_ && _(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1465
1187
|
}
|
|
1466
|
-
let
|
|
1467
|
-
|
|
1468
|
-
function
|
|
1469
|
-
if (!
|
|
1188
|
+
let m = new XMLHttpRequest();
|
|
1189
|
+
m.open(s.method.toUpperCase(), s.url, !0), m.timeout = s.timeout;
|
|
1190
|
+
function g() {
|
|
1191
|
+
if (!m)
|
|
1470
1192
|
return;
|
|
1471
|
-
const
|
|
1472
|
-
"getAllResponseHeaders" in
|
|
1473
|
-
),
|
|
1474
|
-
data: !a || a === "text" || a === "json" ?
|
|
1475
|
-
status:
|
|
1476
|
-
statusText:
|
|
1477
|
-
headers:
|
|
1193
|
+
const y = N.from(
|
|
1194
|
+
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1195
|
+
), T = {
|
|
1196
|
+
data: !a || a === "text" || a === "json" ? m.responseText : m.response,
|
|
1197
|
+
status: m.status,
|
|
1198
|
+
statusText: m.statusText,
|
|
1199
|
+
headers: y,
|
|
1478
1200
|
config: e,
|
|
1479
|
-
request:
|
|
1201
|
+
request: m
|
|
1480
1202
|
};
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
}, function(
|
|
1484
|
-
|
|
1485
|
-
},
|
|
1203
|
+
yt(function(x) {
|
|
1204
|
+
n(x), h();
|
|
1205
|
+
}, function(x) {
|
|
1206
|
+
r(x), h();
|
|
1207
|
+
}, T), m = null;
|
|
1486
1208
|
}
|
|
1487
|
-
"onloadend" in
|
|
1488
|
-
!
|
|
1489
|
-
},
|
|
1490
|
-
|
|
1491
|
-
},
|
|
1492
|
-
const
|
|
1493
|
-
U.event =
|
|
1494
|
-
},
|
|
1495
|
-
let
|
|
1496
|
-
const
|
|
1497
|
-
s.timeoutErrorMessage && (
|
|
1498
|
-
|
|
1499
|
-
|
|
1209
|
+
"onloadend" in m ? m.onloadend = g : m.onreadystatechange = function() {
|
|
1210
|
+
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1211
|
+
}, m.onabort = function() {
|
|
1212
|
+
m && (r(new w("Request aborted", w.ECONNABORTED, e, m)), m = null);
|
|
1213
|
+
}, m.onerror = function(S) {
|
|
1214
|
+
const T = S && S.message ? S.message : "Network Error", U = new w(T, w.ERR_NETWORK, e, m);
|
|
1215
|
+
U.event = S || null, r(U), m = null;
|
|
1216
|
+
}, m.ontimeout = function() {
|
|
1217
|
+
let S = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1218
|
+
const T = s.transitional || pt;
|
|
1219
|
+
s.timeoutErrorMessage && (S = s.timeoutErrorMessage), r(new w(
|
|
1220
|
+
S,
|
|
1221
|
+
T.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
|
1500
1222
|
e,
|
|
1501
|
-
|
|
1502
|
-
)),
|
|
1503
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1504
|
-
|
|
1505
|
-
}), c.isUndefined(s.withCredentials) || (
|
|
1506
|
-
|
|
1507
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1508
|
-
const
|
|
1509
|
-
if (
|
|
1510
|
-
|
|
1223
|
+
m
|
|
1224
|
+
)), m = null;
|
|
1225
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && c.forEach(i.toJSON(), function(S, T) {
|
|
1226
|
+
m.setRequestHeader(T, S);
|
|
1227
|
+
}), c.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), a && a !== "json" && (m.responseType = s.responseType), u && ([E, f] = ie(u, !0), m.addEventListener("progress", E)), d && m.upload && ([p, _] = ie(d), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", _)), (s.cancelToken || s.signal) && (l = (y) => {
|
|
1228
|
+
m && (r(!y || y.type ? new Z(null, e, m) : y), m.abort(), m = null);
|
|
1229
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1230
|
+
const R = zn(s.url);
|
|
1231
|
+
if (R && A.protocols.indexOf(R) === -1) {
|
|
1232
|
+
r(new w("Unsupported protocol " + R + ":", w.ERR_BAD_REQUEST, e));
|
|
1511
1233
|
return;
|
|
1512
1234
|
}
|
|
1513
|
-
|
|
1235
|
+
m.send(o || null);
|
|
1514
1236
|
});
|
|
1515
|
-
},
|
|
1516
|
-
const { length:
|
|
1517
|
-
if (t ||
|
|
1518
|
-
let
|
|
1519
|
-
const o = function(
|
|
1237
|
+
}, Qn = (e, t) => {
|
|
1238
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1239
|
+
if (t || n) {
|
|
1240
|
+
let r = new AbortController(), s;
|
|
1241
|
+
const o = function(u) {
|
|
1520
1242
|
if (!s) {
|
|
1521
1243
|
s = !0, a();
|
|
1522
|
-
const
|
|
1523
|
-
|
|
1244
|
+
const l = u instanceof Error ? u : this.reason;
|
|
1245
|
+
r.abort(l instanceof w ? l : new Z(l instanceof Error ? l.message : l));
|
|
1524
1246
|
}
|
|
1525
1247
|
};
|
|
1526
1248
|
let i = t && setTimeout(() => {
|
|
1527
|
-
i = null, o(new
|
|
1249
|
+
i = null, o(new w(`timeout of ${t}ms exceeded`, w.ETIMEDOUT));
|
|
1528
1250
|
}, t);
|
|
1529
1251
|
const a = () => {
|
|
1530
|
-
e && (i && clearTimeout(i), i = null, e.forEach((
|
|
1531
|
-
|
|
1252
|
+
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1253
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1532
1254
|
}), e = null);
|
|
1533
1255
|
};
|
|
1534
|
-
e.forEach((
|
|
1535
|
-
const { signal:
|
|
1536
|
-
return
|
|
1256
|
+
e.forEach((u) => u.addEventListener("abort", o));
|
|
1257
|
+
const { signal: d } = r;
|
|
1258
|
+
return d.unsubscribe = () => c.asap(a), d;
|
|
1537
1259
|
}
|
|
1538
|
-
},
|
|
1539
|
-
let
|
|
1540
|
-
if (
|
|
1260
|
+
}, Yn = function* (e, t) {
|
|
1261
|
+
let n = e.byteLength;
|
|
1262
|
+
if (n < t) {
|
|
1541
1263
|
yield e;
|
|
1542
1264
|
return;
|
|
1543
1265
|
}
|
|
1544
|
-
let
|
|
1545
|
-
for (;
|
|
1546
|
-
s =
|
|
1547
|
-
},
|
|
1548
|
-
for await (const
|
|
1549
|
-
yield*
|
|
1550
|
-
},
|
|
1266
|
+
let r = 0, s;
|
|
1267
|
+
for (; r < n; )
|
|
1268
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1269
|
+
}, er = async function* (e, t) {
|
|
1270
|
+
for await (const n of tr(e))
|
|
1271
|
+
yield* Yn(n, t);
|
|
1272
|
+
}, tr = async function* (e) {
|
|
1551
1273
|
if (e[Symbol.asyncIterator]) {
|
|
1552
1274
|
yield* e;
|
|
1553
1275
|
return;
|
|
@@ -1555,208 +1277,208 @@ const Nt = (e) => {
|
|
|
1555
1277
|
const t = e.getReader();
|
|
1556
1278
|
try {
|
|
1557
1279
|
for (; ; ) {
|
|
1558
|
-
const { done:
|
|
1559
|
-
if (
|
|
1280
|
+
const { done: n, value: r } = await t.read();
|
|
1281
|
+
if (n)
|
|
1560
1282
|
break;
|
|
1561
|
-
yield
|
|
1283
|
+
yield r;
|
|
1562
1284
|
}
|
|
1563
1285
|
} finally {
|
|
1564
1286
|
await t.cancel();
|
|
1565
1287
|
}
|
|
1566
|
-
},
|
|
1567
|
-
const s =
|
|
1568
|
-
let o = 0, i, a = (
|
|
1569
|
-
i || (i = !0,
|
|
1288
|
+
}, He = (e, t, n, r) => {
|
|
1289
|
+
const s = er(e, t);
|
|
1290
|
+
let o = 0, i, a = (d) => {
|
|
1291
|
+
i || (i = !0, r && r(d));
|
|
1570
1292
|
};
|
|
1571
1293
|
return new ReadableStream({
|
|
1572
|
-
async pull(
|
|
1294
|
+
async pull(d) {
|
|
1573
1295
|
try {
|
|
1574
|
-
const { done:
|
|
1575
|
-
if (
|
|
1576
|
-
a(),
|
|
1296
|
+
const { done: u, value: l } = await s.next();
|
|
1297
|
+
if (u) {
|
|
1298
|
+
a(), d.close();
|
|
1577
1299
|
return;
|
|
1578
1300
|
}
|
|
1579
|
-
let
|
|
1580
|
-
if (
|
|
1581
|
-
let
|
|
1582
|
-
|
|
1301
|
+
let p = l.byteLength;
|
|
1302
|
+
if (n) {
|
|
1303
|
+
let E = o += p;
|
|
1304
|
+
n(E);
|
|
1583
1305
|
}
|
|
1584
|
-
|
|
1585
|
-
} catch (
|
|
1586
|
-
throw a(
|
|
1306
|
+
d.enqueue(new Uint8Array(l));
|
|
1307
|
+
} catch (u) {
|
|
1308
|
+
throw a(u), u;
|
|
1587
1309
|
}
|
|
1588
1310
|
},
|
|
1589
|
-
cancel(
|
|
1590
|
-
return a(
|
|
1311
|
+
cancel(d) {
|
|
1312
|
+
return a(d), s.return();
|
|
1591
1313
|
}
|
|
1592
1314
|
}, {
|
|
1593
1315
|
highWaterMark: 2
|
|
1594
1316
|
});
|
|
1595
|
-
},
|
|
1317
|
+
}, ze = 64 * 1024, { isFunction: ne } = c, nr = (({ Request: e, Response: t }) => ({
|
|
1596
1318
|
Request: e,
|
|
1597
1319
|
Response: t
|
|
1598
1320
|
}))(c.global), {
|
|
1599
|
-
ReadableStream:
|
|
1600
|
-
TextEncoder:
|
|
1601
|
-
} = c.global,
|
|
1321
|
+
ReadableStream: ve,
|
|
1322
|
+
TextEncoder: Je
|
|
1323
|
+
} = c.global, Ve = (e, ...t) => {
|
|
1602
1324
|
try {
|
|
1603
1325
|
return !!e(...t);
|
|
1604
1326
|
} catch {
|
|
1605
1327
|
return !1;
|
|
1606
1328
|
}
|
|
1607
|
-
},
|
|
1329
|
+
}, rr = (e) => {
|
|
1608
1330
|
e = c.merge.call({
|
|
1609
1331
|
skipUndefined: !0
|
|
1610
|
-
},
|
|
1611
|
-
const { fetch: t, Request:
|
|
1332
|
+
}, nr, e);
|
|
1333
|
+
const { fetch: t, Request: n, Response: r } = e, s = t ? ne(t) : typeof fetch == "function", o = ne(n), i = ne(r);
|
|
1612
1334
|
if (!s)
|
|
1613
1335
|
return !1;
|
|
1614
|
-
const a = s &&
|
|
1615
|
-
let
|
|
1616
|
-
const
|
|
1617
|
-
body: new
|
|
1336
|
+
const a = s && ne(ve), d = s && (typeof Je == "function" ? /* @__PURE__ */ ((f) => (h) => f.encode(h))(new Je()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), u = o && a && Ve(() => {
|
|
1337
|
+
let f = !1;
|
|
1338
|
+
const h = new n(A.origin, {
|
|
1339
|
+
body: new ve(),
|
|
1618
1340
|
method: "POST",
|
|
1619
1341
|
get duplex() {
|
|
1620
|
-
return
|
|
1342
|
+
return f = !0, "half";
|
|
1621
1343
|
}
|
|
1622
1344
|
}).headers.has("Content-Type");
|
|
1623
|
-
return
|
|
1624
|
-
}),
|
|
1625
|
-
stream:
|
|
1345
|
+
return f && !h;
|
|
1346
|
+
}), l = i && a && Ve(() => c.isReadableStream(new r("").body)), p = {
|
|
1347
|
+
stream: l && ((f) => f.body)
|
|
1626
1348
|
};
|
|
1627
|
-
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
1628
|
-
!
|
|
1629
|
-
let
|
|
1630
|
-
if (
|
|
1631
|
-
return
|
|
1632
|
-
throw new
|
|
1349
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1350
|
+
!p[f] && (p[f] = (h, m) => {
|
|
1351
|
+
let g = h && h[f];
|
|
1352
|
+
if (g)
|
|
1353
|
+
return g.call(h);
|
|
1354
|
+
throw new w(`Response type '${f}' is not supported`, w.ERR_NOT_SUPPORT, m);
|
|
1633
1355
|
});
|
|
1634
1356
|
});
|
|
1635
|
-
const
|
|
1636
|
-
if (
|
|
1357
|
+
const E = async (f) => {
|
|
1358
|
+
if (f == null)
|
|
1637
1359
|
return 0;
|
|
1638
|
-
if (c.isBlob(
|
|
1639
|
-
return
|
|
1640
|
-
if (c.isSpecCompliantForm(
|
|
1641
|
-
return (await new
|
|
1360
|
+
if (c.isBlob(f))
|
|
1361
|
+
return f.size;
|
|
1362
|
+
if (c.isSpecCompliantForm(f))
|
|
1363
|
+
return (await new n(A.origin, {
|
|
1642
1364
|
method: "POST",
|
|
1643
|
-
body:
|
|
1365
|
+
body: f
|
|
1644
1366
|
}).arrayBuffer()).byteLength;
|
|
1645
|
-
if (c.isArrayBufferView(
|
|
1646
|
-
return
|
|
1647
|
-
if (c.isURLSearchParams(
|
|
1648
|
-
return (await
|
|
1649
|
-
},
|
|
1650
|
-
const
|
|
1651
|
-
return
|
|
1367
|
+
if (c.isArrayBufferView(f) || c.isArrayBuffer(f))
|
|
1368
|
+
return f.byteLength;
|
|
1369
|
+
if (c.isURLSearchParams(f) && (f = f + ""), c.isString(f))
|
|
1370
|
+
return (await d(f)).byteLength;
|
|
1371
|
+
}, _ = async (f, h) => {
|
|
1372
|
+
const m = c.toFiniteNumber(f.getContentLength());
|
|
1373
|
+
return m ?? E(h);
|
|
1652
1374
|
};
|
|
1653
|
-
return async (
|
|
1375
|
+
return async (f) => {
|
|
1654
1376
|
let {
|
|
1655
|
-
url:
|
|
1656
|
-
method:
|
|
1657
|
-
data:
|
|
1658
|
-
signal:
|
|
1659
|
-
cancelToken:
|
|
1660
|
-
timeout:
|
|
1661
|
-
onDownloadProgress:
|
|
1377
|
+
url: h,
|
|
1378
|
+
method: m,
|
|
1379
|
+
data: g,
|
|
1380
|
+
signal: R,
|
|
1381
|
+
cancelToken: y,
|
|
1382
|
+
timeout: S,
|
|
1383
|
+
onDownloadProgress: T,
|
|
1662
1384
|
onUploadProgress: U,
|
|
1663
|
-
responseType:
|
|
1664
|
-
headers:
|
|
1665
|
-
withCredentials:
|
|
1666
|
-
fetchOptions:
|
|
1667
|
-
} =
|
|
1668
|
-
|
|
1669
|
-
let
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1385
|
+
responseType: x,
|
|
1386
|
+
headers: de,
|
|
1387
|
+
withCredentials: Q = "same-origin",
|
|
1388
|
+
fetchOptions: Ce
|
|
1389
|
+
} = Et(f), Ne = t || fetch;
|
|
1390
|
+
x = x ? (x + "").toLowerCase() : "text";
|
|
1391
|
+
let Y = Qn([R, y && y.toAbortSignal()], S), z = null;
|
|
1392
|
+
const B = Y && Y.unsubscribe && (() => {
|
|
1393
|
+
Y.unsubscribe();
|
|
1672
1394
|
});
|
|
1673
|
-
let
|
|
1395
|
+
let xe;
|
|
1674
1396
|
try {
|
|
1675
|
-
if (U &&
|
|
1676
|
-
let
|
|
1397
|
+
if (U && u && m !== "get" && m !== "head" && (xe = await _(de, g)) !== 0) {
|
|
1398
|
+
let k = new n(h, {
|
|
1677
1399
|
method: "POST",
|
|
1678
|
-
body:
|
|
1400
|
+
body: g,
|
|
1679
1401
|
duplex: "half"
|
|
1680
|
-
}),
|
|
1681
|
-
if (c.isFormData(
|
|
1682
|
-
const [
|
|
1683
|
-
|
|
1684
|
-
|
|
1402
|
+
}), $;
|
|
1403
|
+
if (c.isFormData(g) && ($ = k.headers.get("content-type")) && de.setContentType($), k.body) {
|
|
1404
|
+
const [pe, ee] = Me(
|
|
1405
|
+
xe,
|
|
1406
|
+
ie($e(U))
|
|
1685
1407
|
);
|
|
1686
|
-
|
|
1408
|
+
g = He(k.body, ze, pe, ee);
|
|
1687
1409
|
}
|
|
1688
1410
|
}
|
|
1689
|
-
c.isString(
|
|
1690
|
-
const
|
|
1691
|
-
...
|
|
1692
|
-
signal:
|
|
1693
|
-
method:
|
|
1694
|
-
headers:
|
|
1695
|
-
body:
|
|
1411
|
+
c.isString(Q) || (Q = Q ? "include" : "omit");
|
|
1412
|
+
const D = o && "credentials" in n.prototype, Pe = {
|
|
1413
|
+
...Ce,
|
|
1414
|
+
signal: Y,
|
|
1415
|
+
method: m.toUpperCase(),
|
|
1416
|
+
headers: de.normalize().toJSON(),
|
|
1417
|
+
body: g,
|
|
1696
1418
|
duplex: "half",
|
|
1697
|
-
credentials:
|
|
1419
|
+
credentials: D ? Q : void 0
|
|
1698
1420
|
};
|
|
1699
|
-
|
|
1700
|
-
let
|
|
1701
|
-
const
|
|
1702
|
-
if (
|
|
1703
|
-
const
|
|
1704
|
-
["status", "statusText", "headers"].forEach((
|
|
1705
|
-
|
|
1421
|
+
z = o && new n(h, Pe);
|
|
1422
|
+
let L = await (o ? Ne(z, Ce) : Ne(h, Pe));
|
|
1423
|
+
const De = l && (x === "stream" || x === "response");
|
|
1424
|
+
if (l && (T || De && B)) {
|
|
1425
|
+
const k = {};
|
|
1426
|
+
["status", "statusText", "headers"].forEach((Fe) => {
|
|
1427
|
+
k[Fe] = L[Fe];
|
|
1706
1428
|
});
|
|
1707
|
-
const
|
|
1708
|
-
|
|
1709
|
-
|
|
1429
|
+
const $ = c.toFiniteNumber(L.headers.get("content-length")), [pe, ee] = T && Me(
|
|
1430
|
+
$,
|
|
1431
|
+
ie($e(T), !0)
|
|
1710
1432
|
) || [];
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1433
|
+
L = new r(
|
|
1434
|
+
He(L.body, ze, pe, () => {
|
|
1435
|
+
ee && ee(), B && B();
|
|
1714
1436
|
}),
|
|
1715
|
-
|
|
1437
|
+
k
|
|
1716
1438
|
);
|
|
1717
1439
|
}
|
|
1718
|
-
|
|
1719
|
-
let
|
|
1720
|
-
return !
|
|
1721
|
-
|
|
1722
|
-
data:
|
|
1723
|
-
headers:
|
|
1724
|
-
status:
|
|
1725
|
-
statusText:
|
|
1726
|
-
config:
|
|
1727
|
-
request:
|
|
1440
|
+
x = x || "text";
|
|
1441
|
+
let _t = await p[c.findKey(p, x) || "text"](L, f);
|
|
1442
|
+
return !De && B && B(), await new Promise((k, $) => {
|
|
1443
|
+
yt(k, $, {
|
|
1444
|
+
data: _t,
|
|
1445
|
+
headers: N.from(L.headers),
|
|
1446
|
+
status: L.status,
|
|
1447
|
+
statusText: L.statusText,
|
|
1448
|
+
config: f,
|
|
1449
|
+
request: z
|
|
1728
1450
|
});
|
|
1729
1451
|
});
|
|
1730
|
-
} catch (
|
|
1731
|
-
throw
|
|
1732
|
-
new
|
|
1452
|
+
} catch (D) {
|
|
1453
|
+
throw B && B(), D && D.name === "TypeError" && /Load failed|fetch/i.test(D.message) ? Object.assign(
|
|
1454
|
+
new w("Network Error", w.ERR_NETWORK, f, z),
|
|
1733
1455
|
{
|
|
1734
|
-
cause:
|
|
1456
|
+
cause: D.cause || D
|
|
1735
1457
|
}
|
|
1736
|
-
) :
|
|
1458
|
+
) : w.from(D, D && D.code, f, z);
|
|
1737
1459
|
}
|
|
1738
1460
|
};
|
|
1739
|
-
},
|
|
1461
|
+
}, sr = /* @__PURE__ */ new Map(), bt = (e) => {
|
|
1740
1462
|
let t = e && e.env || {};
|
|
1741
|
-
const { fetch:
|
|
1742
|
-
|
|
1463
|
+
const { fetch: n, Request: r, Response: s } = t, o = [
|
|
1464
|
+
r,
|
|
1743
1465
|
s,
|
|
1744
|
-
|
|
1466
|
+
n
|
|
1745
1467
|
];
|
|
1746
|
-
let i = o.length, a = i,
|
|
1468
|
+
let i = o.length, a = i, d, u, l = sr;
|
|
1747
1469
|
for (; a--; )
|
|
1748
|
-
|
|
1749
|
-
return
|
|
1470
|
+
d = o[a], u = l.get(d), u === void 0 && l.set(d, u = a ? /* @__PURE__ */ new Map() : rr(t)), l = u;
|
|
1471
|
+
return u;
|
|
1750
1472
|
};
|
|
1751
|
-
|
|
1752
|
-
const
|
|
1753
|
-
http:
|
|
1754
|
-
xhr:
|
|
1473
|
+
bt();
|
|
1474
|
+
const Te = {
|
|
1475
|
+
http: Sn,
|
|
1476
|
+
xhr: Zn,
|
|
1755
1477
|
fetch: {
|
|
1756
|
-
get:
|
|
1478
|
+
get: bt
|
|
1757
1479
|
}
|
|
1758
1480
|
};
|
|
1759
|
-
c.forEach(
|
|
1481
|
+
c.forEach(Te, (e, t) => {
|
|
1760
1482
|
if (e) {
|
|
1761
1483
|
try {
|
|
1762
1484
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1765,123 +1487,123 @@ c.forEach(Me, (e, t) => {
|
|
|
1765
1487
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1766
1488
|
}
|
|
1767
1489
|
});
|
|
1768
|
-
const
|
|
1769
|
-
function
|
|
1490
|
+
const Ke = (e) => `- ${e}`, or = (e) => c.isFunction(e) || e === null || e === !1;
|
|
1491
|
+
function ir(e, t) {
|
|
1770
1492
|
e = c.isArray(e) ? e : [e];
|
|
1771
|
-
const { length:
|
|
1772
|
-
let
|
|
1493
|
+
const { length: n } = e;
|
|
1494
|
+
let r, s;
|
|
1773
1495
|
const o = {};
|
|
1774
|
-
for (let i = 0; i <
|
|
1775
|
-
|
|
1496
|
+
for (let i = 0; i < n; i++) {
|
|
1497
|
+
r = e[i];
|
|
1776
1498
|
let a;
|
|
1777
|
-
if (s =
|
|
1778
|
-
throw new
|
|
1499
|
+
if (s = r, !or(r) && (s = Te[(a = String(r)).toLowerCase()], s === void 0))
|
|
1500
|
+
throw new w(`Unknown adapter '${a}'`);
|
|
1779
1501
|
if (s && (c.isFunction(s) || (s = s.get(t))))
|
|
1780
1502
|
break;
|
|
1781
1503
|
o[a || "#" + i] = s;
|
|
1782
1504
|
}
|
|
1783
1505
|
if (!s) {
|
|
1784
1506
|
const i = Object.entries(o).map(
|
|
1785
|
-
([
|
|
1507
|
+
([d, u]) => `adapter ${d} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1786
1508
|
);
|
|
1787
|
-
let a =
|
|
1788
|
-
` + i.map(
|
|
1789
|
-
`) : " " +
|
|
1790
|
-
throw new
|
|
1509
|
+
let a = n ? i.length > 1 ? `since :
|
|
1510
|
+
` + i.map(Ke).join(`
|
|
1511
|
+
`) : " " + Ke(i[0]) : "as no adapter specified";
|
|
1512
|
+
throw new w(
|
|
1791
1513
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1792
1514
|
"ERR_NOT_SUPPORT"
|
|
1793
1515
|
);
|
|
1794
1516
|
}
|
|
1795
1517
|
return s;
|
|
1796
1518
|
}
|
|
1797
|
-
const
|
|
1519
|
+
const gt = {
|
|
1798
1520
|
/**
|
|
1799
1521
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1800
1522
|
* @type {Function}
|
|
1801
1523
|
*/
|
|
1802
|
-
getAdapter:
|
|
1524
|
+
getAdapter: ir,
|
|
1803
1525
|
/**
|
|
1804
1526
|
* Exposes all known adapters
|
|
1805
1527
|
* @type {Object<string, Function|Object>}
|
|
1806
1528
|
*/
|
|
1807
|
-
adapters:
|
|
1529
|
+
adapters: Te
|
|
1808
1530
|
};
|
|
1809
|
-
function
|
|
1531
|
+
function ye(e) {
|
|
1810
1532
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1811
|
-
throw new
|
|
1533
|
+
throw new Z(null, e);
|
|
1812
1534
|
}
|
|
1813
|
-
function
|
|
1814
|
-
return
|
|
1535
|
+
function We(e) {
|
|
1536
|
+
return ye(e), e.headers = N.from(e.headers), e.data = he.call(
|
|
1815
1537
|
e,
|
|
1816
1538
|
e.transformRequest
|
|
1817
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1818
|
-
return
|
|
1539
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gt.getAdapter(e.adapter || G.adapter, e)(e).then(function(r) {
|
|
1540
|
+
return ye(e), r.data = he.call(
|
|
1819
1541
|
e,
|
|
1820
1542
|
e.transformResponse,
|
|
1821
|
-
|
|
1822
|
-
),
|
|
1823
|
-
}, function(
|
|
1824
|
-
return
|
|
1543
|
+
r
|
|
1544
|
+
), r.headers = N.from(r.headers), r;
|
|
1545
|
+
}, function(r) {
|
|
1546
|
+
return ht(r) || (ye(e), r && r.response && (r.response.data = he.call(
|
|
1825
1547
|
e,
|
|
1826
1548
|
e.transformResponse,
|
|
1827
|
-
|
|
1828
|
-
),
|
|
1549
|
+
r.response
|
|
1550
|
+
), r.response.headers = N.from(r.response.headers))), Promise.reject(r);
|
|
1829
1551
|
});
|
|
1830
1552
|
}
|
|
1831
|
-
const
|
|
1553
|
+
const St = "1.13.4", fe = {};
|
|
1832
1554
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1833
|
-
|
|
1834
|
-
return typeof
|
|
1555
|
+
fe[e] = function(r) {
|
|
1556
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1835
1557
|
};
|
|
1836
1558
|
});
|
|
1837
|
-
const
|
|
1838
|
-
|
|
1559
|
+
const Xe = {};
|
|
1560
|
+
fe.transitional = function(t, n, r) {
|
|
1839
1561
|
function s(o, i) {
|
|
1840
|
-
return "[Axios v" +
|
|
1562
|
+
return "[Axios v" + St + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1841
1563
|
}
|
|
1842
1564
|
return (o, i, a) => {
|
|
1843
1565
|
if (t === !1)
|
|
1844
|
-
throw new
|
|
1845
|
-
s(i, " has been removed" + (
|
|
1846
|
-
|
|
1566
|
+
throw new w(
|
|
1567
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1568
|
+
w.ERR_DEPRECATED
|
|
1847
1569
|
);
|
|
1848
|
-
return
|
|
1570
|
+
return n && !Xe[i] && (Xe[i] = !0, console.warn(
|
|
1849
1571
|
s(
|
|
1850
1572
|
i,
|
|
1851
|
-
" has been deprecated since v" +
|
|
1573
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1852
1574
|
)
|
|
1853
1575
|
)), t ? t(o, i, a) : !0;
|
|
1854
1576
|
};
|
|
1855
1577
|
};
|
|
1856
|
-
|
|
1857
|
-
return (
|
|
1578
|
+
fe.spelling = function(t) {
|
|
1579
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1858
1580
|
};
|
|
1859
|
-
function
|
|
1581
|
+
function ar(e, t, n) {
|
|
1860
1582
|
if (typeof e != "object")
|
|
1861
|
-
throw new
|
|
1862
|
-
const
|
|
1863
|
-
let s =
|
|
1583
|
+
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
1584
|
+
const r = Object.keys(e);
|
|
1585
|
+
let s = r.length;
|
|
1864
1586
|
for (; s-- > 0; ) {
|
|
1865
|
-
const o =
|
|
1587
|
+
const o = r[s], i = t[o];
|
|
1866
1588
|
if (i) {
|
|
1867
|
-
const a = e[o],
|
|
1868
|
-
if (
|
|
1869
|
-
throw new
|
|
1589
|
+
const a = e[o], d = a === void 0 || i(a, o, e);
|
|
1590
|
+
if (d !== !0)
|
|
1591
|
+
throw new w("option " + o + " must be " + d, w.ERR_BAD_OPTION_VALUE);
|
|
1870
1592
|
continue;
|
|
1871
1593
|
}
|
|
1872
|
-
if (
|
|
1873
|
-
throw new
|
|
1594
|
+
if (n !== !0)
|
|
1595
|
+
throw new w("Unknown option " + o, w.ERR_BAD_OPTION);
|
|
1874
1596
|
}
|
|
1875
1597
|
}
|
|
1876
|
-
const
|
|
1877
|
-
assertOptions:
|
|
1878
|
-
validators:
|
|
1879
|
-
},
|
|
1880
|
-
let
|
|
1598
|
+
const oe = {
|
|
1599
|
+
assertOptions: ar,
|
|
1600
|
+
validators: fe
|
|
1601
|
+
}, F = oe.validators;
|
|
1602
|
+
let j = class {
|
|
1881
1603
|
constructor(t) {
|
|
1882
1604
|
this.defaults = t || {}, this.interceptors = {
|
|
1883
|
-
request: new
|
|
1884
|
-
response: new
|
|
1605
|
+
request: new Ie(),
|
|
1606
|
+
response: new Ie()
|
|
1885
1607
|
};
|
|
1886
1608
|
}
|
|
1887
1609
|
/**
|
|
@@ -1892,106 +1614,106 @@ let V = class {
|
|
|
1892
1614
|
*
|
|
1893
1615
|
* @returns {Promise} The Promise to be fulfilled
|
|
1894
1616
|
*/
|
|
1895
|
-
async request(t,
|
|
1617
|
+
async request(t, n) {
|
|
1896
1618
|
try {
|
|
1897
|
-
return await this._request(t,
|
|
1898
|
-
} catch (
|
|
1899
|
-
if (
|
|
1619
|
+
return await this._request(t, n);
|
|
1620
|
+
} catch (r) {
|
|
1621
|
+
if (r instanceof Error) {
|
|
1900
1622
|
let s = {};
|
|
1901
1623
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1902
1624
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1903
1625
|
try {
|
|
1904
|
-
|
|
1905
|
-
` + o) :
|
|
1626
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1627
|
+
` + o) : r.stack = o;
|
|
1906
1628
|
} catch {
|
|
1907
1629
|
}
|
|
1908
1630
|
}
|
|
1909
|
-
throw
|
|
1631
|
+
throw r;
|
|
1910
1632
|
}
|
|
1911
1633
|
}
|
|
1912
|
-
_request(t,
|
|
1913
|
-
typeof t == "string" ? (
|
|
1914
|
-
const { transitional:
|
|
1915
|
-
|
|
1916
|
-
silentJSONParsing:
|
|
1917
|
-
forcedJSONParsing:
|
|
1918
|
-
clarifyTimeoutError:
|
|
1919
|
-
}, !1), s != null && (c.isFunction(s) ?
|
|
1634
|
+
_request(t, n) {
|
|
1635
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = M(this.defaults, n);
|
|
1636
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1637
|
+
r !== void 0 && oe.assertOptions(r, {
|
|
1638
|
+
silentJSONParsing: F.transitional(F.boolean),
|
|
1639
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
|
1640
|
+
clarifyTimeoutError: F.transitional(F.boolean)
|
|
1641
|
+
}, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
|
|
1920
1642
|
serialize: s
|
|
1921
|
-
} :
|
|
1922
|
-
encode:
|
|
1923
|
-
serialize:
|
|
1924
|
-
}, !0)),
|
|
1925
|
-
baseUrl:
|
|
1926
|
-
withXsrfToken:
|
|
1927
|
-
}, !0),
|
|
1643
|
+
} : oe.assertOptions(s, {
|
|
1644
|
+
encode: F.function,
|
|
1645
|
+
serialize: F.function
|
|
1646
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), oe.assertOptions(n, {
|
|
1647
|
+
baseUrl: F.spelling("baseURL"),
|
|
1648
|
+
withXsrfToken: F.spelling("withXSRFToken")
|
|
1649
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1928
1650
|
let i = o && c.merge(
|
|
1929
1651
|
o.common,
|
|
1930
|
-
o[
|
|
1652
|
+
o[n.method]
|
|
1931
1653
|
);
|
|
1932
1654
|
o && c.forEach(
|
|
1933
1655
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1934
|
-
(
|
|
1935
|
-
delete o[
|
|
1656
|
+
(f) => {
|
|
1657
|
+
delete o[f];
|
|
1936
1658
|
}
|
|
1937
|
-
),
|
|
1659
|
+
), n.headers = N.concat(i, o);
|
|
1938
1660
|
const a = [];
|
|
1939
|
-
let
|
|
1940
|
-
this.interceptors.request.forEach(function(
|
|
1941
|
-
typeof
|
|
1661
|
+
let d = !0;
|
|
1662
|
+
this.interceptors.request.forEach(function(h) {
|
|
1663
|
+
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (d = d && h.synchronous, a.unshift(h.fulfilled, h.rejected));
|
|
1942
1664
|
});
|
|
1943
|
-
const
|
|
1944
|
-
this.interceptors.response.forEach(function(
|
|
1945
|
-
|
|
1665
|
+
const u = [];
|
|
1666
|
+
this.interceptors.response.forEach(function(h) {
|
|
1667
|
+
u.push(h.fulfilled, h.rejected);
|
|
1946
1668
|
});
|
|
1947
|
-
let
|
|
1948
|
-
if (!
|
|
1949
|
-
const
|
|
1950
|
-
for (
|
|
1951
|
-
|
|
1952
|
-
return
|
|
1669
|
+
let l, p = 0, E;
|
|
1670
|
+
if (!d) {
|
|
1671
|
+
const f = [We.bind(this), void 0];
|
|
1672
|
+
for (f.unshift(...a), f.push(...u), E = f.length, l = Promise.resolve(n); p < E; )
|
|
1673
|
+
l = l.then(f[p++], f[p++]);
|
|
1674
|
+
return l;
|
|
1953
1675
|
}
|
|
1954
|
-
|
|
1955
|
-
let
|
|
1956
|
-
for (;
|
|
1957
|
-
const
|
|
1676
|
+
E = a.length;
|
|
1677
|
+
let _ = n;
|
|
1678
|
+
for (; p < E; ) {
|
|
1679
|
+
const f = a[p++], h = a[p++];
|
|
1958
1680
|
try {
|
|
1959
|
-
|
|
1960
|
-
} catch (
|
|
1961
|
-
|
|
1681
|
+
_ = f(_);
|
|
1682
|
+
} catch (m) {
|
|
1683
|
+
h.call(this, m);
|
|
1962
1684
|
break;
|
|
1963
1685
|
}
|
|
1964
1686
|
}
|
|
1965
1687
|
try {
|
|
1966
|
-
|
|
1967
|
-
} catch (
|
|
1968
|
-
return Promise.reject(
|
|
1688
|
+
l = We.call(this, _);
|
|
1689
|
+
} catch (f) {
|
|
1690
|
+
return Promise.reject(f);
|
|
1969
1691
|
}
|
|
1970
|
-
for (
|
|
1971
|
-
|
|
1972
|
-
return
|
|
1692
|
+
for (p = 0, E = u.length; p < E; )
|
|
1693
|
+
l = l.then(u[p++], u[p++]);
|
|
1694
|
+
return l;
|
|
1973
1695
|
}
|
|
1974
1696
|
getUri(t) {
|
|
1975
|
-
t =
|
|
1976
|
-
const
|
|
1977
|
-
return
|
|
1697
|
+
t = M(this.defaults, t);
|
|
1698
|
+
const n = wt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1699
|
+
return dt(n, t.params, t.paramsSerializer);
|
|
1978
1700
|
}
|
|
1979
1701
|
};
|
|
1980
1702
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1981
|
-
|
|
1982
|
-
return this.request(
|
|
1703
|
+
j.prototype[t] = function(n, r) {
|
|
1704
|
+
return this.request(M(r || {}, {
|
|
1983
1705
|
method: t,
|
|
1984
|
-
url:
|
|
1985
|
-
data: (
|
|
1706
|
+
url: n,
|
|
1707
|
+
data: (r || {}).data
|
|
1986
1708
|
}));
|
|
1987
1709
|
};
|
|
1988
1710
|
});
|
|
1989
1711
|
c.forEach(["post", "put", "patch"], function(t) {
|
|
1990
|
-
function r
|
|
1712
|
+
function n(r) {
|
|
1991
1713
|
return function(o, i, a) {
|
|
1992
|
-
return this.request(
|
|
1714
|
+
return this.request(M(a || {}, {
|
|
1993
1715
|
method: t,
|
|
1994
|
-
headers:
|
|
1716
|
+
headers: r ? {
|
|
1995
1717
|
"Content-Type": "multipart/form-data"
|
|
1996
1718
|
} : {},
|
|
1997
1719
|
url: o,
|
|
@@ -1999,33 +1721,33 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1999
1721
|
}));
|
|
2000
1722
|
};
|
|
2001
1723
|
}
|
|
2002
|
-
|
|
1724
|
+
j.prototype[t] = n(), j.prototype[t + "Form"] = n(!0);
|
|
2003
1725
|
});
|
|
2004
|
-
let
|
|
1726
|
+
let cr = class Rt {
|
|
2005
1727
|
constructor(t) {
|
|
2006
1728
|
if (typeof t != "function")
|
|
2007
1729
|
throw new TypeError("executor must be a function.");
|
|
2008
|
-
let
|
|
1730
|
+
let n;
|
|
2009
1731
|
this.promise = new Promise(function(o) {
|
|
2010
|
-
|
|
1732
|
+
n = o;
|
|
2011
1733
|
});
|
|
2012
|
-
const
|
|
1734
|
+
const r = this;
|
|
2013
1735
|
this.promise.then((s) => {
|
|
2014
|
-
if (!
|
|
2015
|
-
let o =
|
|
1736
|
+
if (!r._listeners) return;
|
|
1737
|
+
let o = r._listeners.length;
|
|
2016
1738
|
for (; o-- > 0; )
|
|
2017
|
-
|
|
2018
|
-
|
|
1739
|
+
r._listeners[o](s);
|
|
1740
|
+
r._listeners = null;
|
|
2019
1741
|
}), this.promise.then = (s) => {
|
|
2020
1742
|
let o;
|
|
2021
1743
|
const i = new Promise((a) => {
|
|
2022
|
-
|
|
1744
|
+
r.subscribe(a), o = a;
|
|
2023
1745
|
}).then(s);
|
|
2024
1746
|
return i.cancel = function() {
|
|
2025
|
-
|
|
1747
|
+
r.unsubscribe(o);
|
|
2026
1748
|
}, i;
|
|
2027
1749
|
}, t(function(o, i, a) {
|
|
2028
|
-
|
|
1750
|
+
r.reason || (r.reason = new Z(o, i, a), n(r.reason));
|
|
2029
1751
|
});
|
|
2030
1752
|
}
|
|
2031
1753
|
/**
|
|
@@ -2051,14 +1773,14 @@ let _n = class Ft {
|
|
|
2051
1773
|
unsubscribe(t) {
|
|
2052
1774
|
if (!this._listeners)
|
|
2053
1775
|
return;
|
|
2054
|
-
const
|
|
2055
|
-
|
|
1776
|
+
const n = this._listeners.indexOf(t);
|
|
1777
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2056
1778
|
}
|
|
2057
1779
|
toAbortSignal() {
|
|
2058
|
-
const t = new AbortController(),
|
|
2059
|
-
t.abort(
|
|
1780
|
+
const t = new AbortController(), n = (r) => {
|
|
1781
|
+
t.abort(r);
|
|
2060
1782
|
};
|
|
2061
|
-
return this.subscribe(
|
|
1783
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
2062
1784
|
}
|
|
2063
1785
|
/**
|
|
2064
1786
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -2067,22 +1789,22 @@ let _n = class Ft {
|
|
|
2067
1789
|
static source() {
|
|
2068
1790
|
let t;
|
|
2069
1791
|
return {
|
|
2070
|
-
token: new
|
|
1792
|
+
token: new Rt(function(s) {
|
|
2071
1793
|
t = s;
|
|
2072
1794
|
}),
|
|
2073
1795
|
cancel: t
|
|
2074
1796
|
};
|
|
2075
1797
|
}
|
|
2076
1798
|
};
|
|
2077
|
-
function
|
|
2078
|
-
return function(
|
|
2079
|
-
return e.apply(null,
|
|
1799
|
+
function lr(e) {
|
|
1800
|
+
return function(n) {
|
|
1801
|
+
return e.apply(null, n);
|
|
2080
1802
|
};
|
|
2081
1803
|
}
|
|
2082
|
-
function
|
|
1804
|
+
function ur(e) {
|
|
2083
1805
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
2084
1806
|
}
|
|
2085
|
-
const
|
|
1807
|
+
const Se = {
|
|
2086
1808
|
Continue: 100,
|
|
2087
1809
|
SwitchingProtocols: 101,
|
|
2088
1810
|
Processing: 102,
|
|
@@ -2153,58 +1875,58 @@ const Le = {
|
|
|
2153
1875
|
SslHandshakeFailed: 525,
|
|
2154
1876
|
InvalidSslCertificate: 526
|
|
2155
1877
|
};
|
|
2156
|
-
Object.entries(
|
|
2157
|
-
|
|
1878
|
+
Object.entries(Se).forEach(([e, t]) => {
|
|
1879
|
+
Se[t] = e;
|
|
2158
1880
|
});
|
|
2159
|
-
function
|
|
2160
|
-
const t = new
|
|
2161
|
-
return c.extend(
|
|
2162
|
-
return
|
|
2163
|
-
},
|
|
1881
|
+
function Ot(e) {
|
|
1882
|
+
const t = new j(e), n = tt(j.prototype.request, t);
|
|
1883
|
+
return c.extend(n, j.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1884
|
+
return Ot(M(e, s));
|
|
1885
|
+
}, n;
|
|
2164
1886
|
}
|
|
2165
|
-
const
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
1887
|
+
const O = Ot(G);
|
|
1888
|
+
O.Axios = j;
|
|
1889
|
+
O.CanceledError = Z;
|
|
1890
|
+
O.CancelToken = cr;
|
|
1891
|
+
O.isCancel = ht;
|
|
1892
|
+
O.VERSION = St;
|
|
1893
|
+
O.toFormData = ue;
|
|
1894
|
+
O.AxiosError = w;
|
|
1895
|
+
O.Cancel = O.CanceledError;
|
|
1896
|
+
O.all = function(t) {
|
|
2175
1897
|
return Promise.all(t);
|
|
2176
1898
|
};
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
1899
|
+
O.spread = lr;
|
|
1900
|
+
O.isAxiosError = ur;
|
|
1901
|
+
O.mergeConfig = M;
|
|
1902
|
+
O.AxiosHeaders = N;
|
|
1903
|
+
O.formToJSON = (e) => mt(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
1904
|
+
O.getAdapter = gt.getAdapter;
|
|
1905
|
+
O.HttpStatusCode = Se;
|
|
1906
|
+
O.default = O;
|
|
2185
1907
|
const {
|
|
2186
|
-
Axios:
|
|
2187
|
-
AxiosError:
|
|
2188
|
-
CanceledError:
|
|
2189
|
-
isCancel:
|
|
2190
|
-
CancelToken:
|
|
2191
|
-
VERSION:
|
|
2192
|
-
all:
|
|
2193
|
-
Cancel:
|
|
2194
|
-
isAxiosError:
|
|
2195
|
-
spread:
|
|
2196
|
-
toFormData:
|
|
2197
|
-
AxiosHeaders:
|
|
2198
|
-
HttpStatusCode:
|
|
2199
|
-
formToJSON:
|
|
2200
|
-
getAdapter:
|
|
2201
|
-
mergeConfig:
|
|
2202
|
-
} =
|
|
2203
|
-
class
|
|
2204
|
-
constructor(t,
|
|
2205
|
-
|
|
2206
|
-
this.client =
|
|
2207
|
-
baseURL:
|
|
1908
|
+
Axios: _r,
|
|
1909
|
+
AxiosError: Ar,
|
|
1910
|
+
CanceledError: Tr,
|
|
1911
|
+
isCancel: Cr,
|
|
1912
|
+
CancelToken: Nr,
|
|
1913
|
+
VERSION: xr,
|
|
1914
|
+
all: Pr,
|
|
1915
|
+
Cancel: Dr,
|
|
1916
|
+
isAxiosError: Fr,
|
|
1917
|
+
spread: Ur,
|
|
1918
|
+
toFormData: Lr,
|
|
1919
|
+
AxiosHeaders: kr,
|
|
1920
|
+
HttpStatusCode: Br,
|
|
1921
|
+
formToJSON: Ir,
|
|
1922
|
+
getAdapter: jr,
|
|
1923
|
+
mergeConfig: Mr
|
|
1924
|
+
} = O, fr = "http://localhost:8000/api";
|
|
1925
|
+
class dr {
|
|
1926
|
+
constructor(t, n = fr) {
|
|
1927
|
+
Ue(this, "client");
|
|
1928
|
+
this.client = O.create({
|
|
1929
|
+
baseURL: n,
|
|
2208
1930
|
headers: {
|
|
2209
1931
|
"Content-Type": "application/json",
|
|
2210
1932
|
"X-API-Key": t
|
|
@@ -2212,30 +1934,30 @@ class xn {
|
|
|
2212
1934
|
timeout: 3e4
|
|
2213
1935
|
// 30 seconds
|
|
2214
1936
|
}), this.client.interceptors.response.use(
|
|
2215
|
-
(
|
|
2216
|
-
(
|
|
1937
|
+
(r) => r,
|
|
1938
|
+
(r) => {
|
|
2217
1939
|
var s, o;
|
|
2218
|
-
if ((s =
|
|
2219
|
-
const a = ((o =
|
|
1940
|
+
if ((s = r.response) != null && s.data) {
|
|
1941
|
+
const a = ((o = r.response.data.response) == null ? void 0 : o.message) || "An unknown error occurred";
|
|
2220
1942
|
throw new Error(a);
|
|
2221
|
-
} else throw
|
|
1943
|
+
} else throw r.request ? new Error("No response from server. Please check your connection.") : new Error(r.message || "Request failed");
|
|
2222
1944
|
}
|
|
2223
1945
|
);
|
|
2224
1946
|
}
|
|
2225
1947
|
/**
|
|
2226
1948
|
* Send a message to the customer support API
|
|
2227
1949
|
*/
|
|
2228
|
-
async sendMessage(t,
|
|
1950
|
+
async sendMessage(t, n) {
|
|
2229
1951
|
try {
|
|
2230
|
-
const
|
|
1952
|
+
const r = await this.client.post("/chat/", {
|
|
2231
1953
|
question: t,
|
|
2232
|
-
session_id:
|
|
1954
|
+
session_id: n
|
|
2233
1955
|
});
|
|
2234
|
-
if (
|
|
2235
|
-
throw new Error(
|
|
2236
|
-
return
|
|
2237
|
-
} catch (
|
|
2238
|
-
throw
|
|
1956
|
+
if (r.data.response.status !== "success")
|
|
1957
|
+
throw new Error(r.data.response.message);
|
|
1958
|
+
return r.data.data;
|
|
1959
|
+
} catch (r) {
|
|
1960
|
+
throw r instanceof Error ? r : new Error("Failed to send message");
|
|
2239
1961
|
}
|
|
2240
1962
|
}
|
|
2241
1963
|
/**
|
|
@@ -2243,14 +1965,14 @@ class xn {
|
|
|
2243
1965
|
*/
|
|
2244
1966
|
async getConversationHistory(t) {
|
|
2245
1967
|
try {
|
|
2246
|
-
const
|
|
1968
|
+
const n = await this.client.get(
|
|
2247
1969
|
`/chat/history/${t}/`
|
|
2248
1970
|
);
|
|
2249
|
-
if (
|
|
2250
|
-
throw new Error(
|
|
2251
|
-
return
|
|
2252
|
-
} catch (
|
|
2253
|
-
throw
|
|
1971
|
+
if (n.data.response.status !== "success")
|
|
1972
|
+
throw new Error(n.data.response.message);
|
|
1973
|
+
return n.data.data;
|
|
1974
|
+
} catch (n) {
|
|
1975
|
+
throw n instanceof Error ? n : new Error("Failed to load conversation history");
|
|
2254
1976
|
}
|
|
2255
1977
|
}
|
|
2256
1978
|
/**
|
|
@@ -2266,8 +1988,8 @@ class xn {
|
|
|
2266
1988
|
this.client.defaults.baseURL = t;
|
|
2267
1989
|
}
|
|
2268
1990
|
}
|
|
2269
|
-
function
|
|
2270
|
-
const [
|
|
1991
|
+
function Ge(e, t) {
|
|
1992
|
+
const [n, r] = J(() => {
|
|
2271
1993
|
try {
|
|
2272
1994
|
const o = window.localStorage.getItem(e);
|
|
2273
1995
|
return o ? JSON.parse(o) : t;
|
|
@@ -2275,283 +1997,242 @@ function at(e, t) {
|
|
|
2275
1997
|
return console.warn(`Error reading localStorage key "${e}":`, o), t;
|
|
2276
1998
|
}
|
|
2277
1999
|
});
|
|
2278
|
-
return [
|
|
2000
|
+
return [n, (o) => {
|
|
2279
2001
|
try {
|
|
2280
|
-
const i = o instanceof Function ? o(
|
|
2281
|
-
|
|
2002
|
+
const i = o instanceof Function ? o(n) : o;
|
|
2003
|
+
r(i), window.localStorage.setItem(e, JSON.stringify(i));
|
|
2282
2004
|
} catch (i) {
|
|
2283
2005
|
console.warn(`Error setting localStorage key "${e}":`, i);
|
|
2284
2006
|
}
|
|
2285
2007
|
}];
|
|
2286
2008
|
}
|
|
2287
|
-
function
|
|
2009
|
+
function Ze() {
|
|
2288
2010
|
return `session_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
|
|
2289
2011
|
}
|
|
2290
|
-
const
|
|
2291
|
-
function
|
|
2292
|
-
const { apiKey: t, baseUrl:
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
), [
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
}, [t,
|
|
2299
|
-
const
|
|
2300
|
-
|
|
2301
|
-
}, []),
|
|
2302
|
-
async (
|
|
2303
|
-
if (!
|
|
2304
|
-
const
|
|
2305
|
-
|
|
2012
|
+
const pr = "customer_support_session_id", mr = "customer_support_messages";
|
|
2013
|
+
function hr(e) {
|
|
2014
|
+
const { apiKey: t, baseUrl: n, onError: r } = e, [s, o] = Ge(mr, []), [i, a] = Ge(
|
|
2015
|
+
pr,
|
|
2016
|
+
Ze()
|
|
2017
|
+
), [d, u] = J(!1), [l, p] = J(null), E = Ye(null);
|
|
2018
|
+
Re(() => {
|
|
2019
|
+
E.current = new dr(t, n);
|
|
2020
|
+
}, [t, n]);
|
|
2021
|
+
const _ = te(() => {
|
|
2022
|
+
p(null);
|
|
2023
|
+
}, []), f = te(
|
|
2024
|
+
async (g) => {
|
|
2025
|
+
if (!E.current) {
|
|
2026
|
+
const y = new Error("API client not initialized");
|
|
2027
|
+
p(y), r == null || r(y);
|
|
2306
2028
|
return;
|
|
2307
2029
|
}
|
|
2308
|
-
if (!
|
|
2030
|
+
if (!g.trim())
|
|
2309
2031
|
return;
|
|
2310
|
-
const
|
|
2032
|
+
const R = {
|
|
2311
2033
|
id: `user_${Date.now()}`,
|
|
2312
2034
|
role: "USER",
|
|
2313
|
-
content:
|
|
2035
|
+
content: g,
|
|
2314
2036
|
timestamp: /* @__PURE__ */ new Date()
|
|
2315
2037
|
};
|
|
2316
|
-
o((
|
|
2038
|
+
o((y) => [...y, R]), u(!0), p(null);
|
|
2317
2039
|
try {
|
|
2318
|
-
const
|
|
2040
|
+
const y = await E.current.sendMessage(g, i), S = {
|
|
2319
2041
|
id: `assistant_${Date.now()}`,
|
|
2320
2042
|
role: "ASSISTANT",
|
|
2321
|
-
content:
|
|
2043
|
+
content: y.answer,
|
|
2322
2044
|
timestamp: /* @__PURE__ */ new Date(),
|
|
2323
|
-
sources:
|
|
2045
|
+
sources: y.sources
|
|
2324
2046
|
};
|
|
2325
|
-
o((
|
|
2326
|
-
} catch (
|
|
2327
|
-
const
|
|
2328
|
-
|
|
2329
|
-
const
|
|
2047
|
+
o((T) => [...T, S]), y.session_id !== i && a(y.session_id);
|
|
2048
|
+
} catch (y) {
|
|
2049
|
+
const S = y instanceof Error ? y : new Error("Failed to send message");
|
|
2050
|
+
p(S), r == null || r(S);
|
|
2051
|
+
const T = {
|
|
2330
2052
|
id: `error_${Date.now()}`,
|
|
2331
2053
|
role: "ASSISTANT",
|
|
2332
|
-
content: `Sorry, I encountered an error: ${
|
|
2054
|
+
content: `Sorry, I encountered an error: ${S.message}`,
|
|
2333
2055
|
timestamp: /* @__PURE__ */ new Date()
|
|
2334
2056
|
};
|
|
2335
|
-
o((U) => [...U,
|
|
2057
|
+
o((U) => [...U, T]);
|
|
2336
2058
|
} finally {
|
|
2337
|
-
|
|
2059
|
+
u(!1);
|
|
2338
2060
|
}
|
|
2339
2061
|
},
|
|
2340
|
-
[i,
|
|
2341
|
-
),
|
|
2342
|
-
if (!(!
|
|
2343
|
-
|
|
2062
|
+
[i, r, o, a]
|
|
2063
|
+
), h = te(async () => {
|
|
2064
|
+
if (!(!E.current || !i)) {
|
|
2065
|
+
u(!0), p(null);
|
|
2344
2066
|
try {
|
|
2345
|
-
const
|
|
2346
|
-
id: `${
|
|
2347
|
-
role:
|
|
2348
|
-
content:
|
|
2349
|
-
timestamp: new Date(
|
|
2067
|
+
const R = (await E.current.getConversationHistory(i)).messages.map((y, S) => ({
|
|
2068
|
+
id: `${y.role.toLowerCase()}_${S}_${Date.now()}`,
|
|
2069
|
+
role: y.role,
|
|
2070
|
+
content: y.content,
|
|
2071
|
+
timestamp: new Date(y.created_at)
|
|
2350
2072
|
}));
|
|
2351
|
-
o(
|
|
2352
|
-
} catch (
|
|
2353
|
-
const
|
|
2354
|
-
|
|
2073
|
+
o(R);
|
|
2074
|
+
} catch (g) {
|
|
2075
|
+
const R = g instanceof Error ? g : new Error("Failed to load history");
|
|
2076
|
+
p(R), r == null || r(R);
|
|
2355
2077
|
} finally {
|
|
2356
|
-
|
|
2078
|
+
u(!1);
|
|
2357
2079
|
}
|
|
2358
2080
|
}
|
|
2359
|
-
}, [i,
|
|
2360
|
-
o([]), a(
|
|
2081
|
+
}, [i, r, o]), m = te(() => {
|
|
2082
|
+
o([]), a(Ze());
|
|
2361
2083
|
}, [o, a]);
|
|
2362
2084
|
return {
|
|
2363
2085
|
messages: s,
|
|
2364
|
-
sendMessage:
|
|
2365
|
-
isLoading:
|
|
2366
|
-
error:
|
|
2367
|
-
clearError:
|
|
2086
|
+
sendMessage: f,
|
|
2087
|
+
isLoading: d,
|
|
2088
|
+
error: l,
|
|
2089
|
+
clearError: _,
|
|
2368
2090
|
sessionId: i,
|
|
2369
|
-
loadHistory:
|
|
2370
|
-
clearHistory:
|
|
2091
|
+
loadHistory: h,
|
|
2092
|
+
clearHistory: m
|
|
2371
2093
|
};
|
|
2372
2094
|
}
|
|
2373
|
-
const
|
|
2374
|
-
const t = e.role === "USER",
|
|
2375
|
-
return /* @__PURE__ */
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
className: "cs-message__source-link",
|
|
2388
|
-
children: [
|
|
2389
|
-
/* @__PURE__ */ R.jsx(Jt, { size: 12 }),
|
|
2390
|
-
/* @__PURE__ */ R.jsx("span", { children: n.title })
|
|
2391
|
-
]
|
|
2392
|
-
}
|
|
2393
|
-
),
|
|
2394
|
-
/* @__PURE__ */ R.jsxs("span", { className: "cs-message__source-similarity", children: [
|
|
2395
|
-
Math.round(n.similarity * 100),
|
|
2396
|
-
"% match"
|
|
2397
|
-
] })
|
|
2398
|
-
] }, s)) })
|
|
2399
|
-
] })
|
|
2400
|
-
] }),
|
|
2401
|
-
/* @__PURE__ */ R.jsx("time", { className: "cs-message__time", dateTime: r.toISOString(), children: r.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) })
|
|
2402
|
-
] });
|
|
2403
|
-
}, jn = ({
|
|
2095
|
+
const yr = ({ message: e }) => {
|
|
2096
|
+
const t = e.role === "USER", n = e.timestamp instanceof Date ? e.timestamp : new Date(e.timestamp);
|
|
2097
|
+
return /* @__PURE__ */ b.createElement("div", { className: `cs-message ${t ? "cs-message--user" : "cs-message--assistant"}` }, /* @__PURE__ */ b.createElement("div", { className: "cs-message__content" }, /* @__PURE__ */ b.createElement("p", { className: "cs-message__text" }, e.content), e.sources && e.sources.length > 0 && /* @__PURE__ */ b.createElement("div", { className: "cs-message__sources" }, /* @__PURE__ */ b.createElement("p", { className: "cs-message__sources-title" }, "Sources:"), /* @__PURE__ */ b.createElement("ul", { className: "cs-message__sources-list" }, e.sources.map((r, s) => /* @__PURE__ */ b.createElement("li", { key: s, className: "cs-message__source-item" }, /* @__PURE__ */ b.createElement(
|
|
2098
|
+
"a",
|
|
2099
|
+
{
|
|
2100
|
+
href: r.url,
|
|
2101
|
+
target: "_blank",
|
|
2102
|
+
rel: "noopener noreferrer",
|
|
2103
|
+
className: "cs-message__source-link"
|
|
2104
|
+
},
|
|
2105
|
+
/* @__PURE__ */ b.createElement(Pt, { size: 12 }),
|
|
2106
|
+
/* @__PURE__ */ b.createElement("span", null, r.title)
|
|
2107
|
+
), /* @__PURE__ */ b.createElement("span", { className: "cs-message__source-similarity" }, Math.round(r.similarity * 100), "% match")))))), /* @__PURE__ */ b.createElement("time", { className: "cs-message__time", dateTime: n.toISOString() }, n.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })));
|
|
2108
|
+
}, wr = ({
|
|
2404
2109
|
onSendMessage: e,
|
|
2405
2110
|
isLoading: t,
|
|
2406
|
-
placeholder:
|
|
2111
|
+
placeholder: n = "Type your message..."
|
|
2407
2112
|
}) => {
|
|
2408
|
-
const [
|
|
2409
|
-
a.preventDefault(),
|
|
2113
|
+
const [r, s] = J(""), o = (a) => {
|
|
2114
|
+
a.preventDefault(), r.trim() && !t && (e(r), s(""));
|
|
2410
2115
|
}, i = (a) => {
|
|
2411
2116
|
a.key === "Enter" && !a.shiftKey && (a.preventDefault(), o(a));
|
|
2412
2117
|
};
|
|
2413
|
-
return /* @__PURE__ */
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
"
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
)
|
|
2437
|
-
] });
|
|
2438
|
-
}, Fn = ({
|
|
2118
|
+
return /* @__PURE__ */ b.createElement("form", { className: "cs-input", onSubmit: o }, /* @__PURE__ */ b.createElement(
|
|
2119
|
+
"textarea",
|
|
2120
|
+
{
|
|
2121
|
+
className: "cs-input__textarea",
|
|
2122
|
+
value: r,
|
|
2123
|
+
onChange: (a) => s(a.target.value),
|
|
2124
|
+
onKeyDown: i,
|
|
2125
|
+
placeholder: n,
|
|
2126
|
+
disabled: t,
|
|
2127
|
+
rows: 1,
|
|
2128
|
+
"aria-label": "Message input"
|
|
2129
|
+
}
|
|
2130
|
+
), /* @__PURE__ */ b.createElement(
|
|
2131
|
+
"button",
|
|
2132
|
+
{
|
|
2133
|
+
type: "submit",
|
|
2134
|
+
className: "cs-input__button",
|
|
2135
|
+
disabled: !r.trim() || t,
|
|
2136
|
+
"aria-label": "Send message"
|
|
2137
|
+
},
|
|
2138
|
+
/* @__PURE__ */ b.createElement(Ut, { size: 20 })
|
|
2139
|
+
));
|
|
2140
|
+
}, Er = ({
|
|
2439
2141
|
messages: e,
|
|
2440
2142
|
onSendMessage: t,
|
|
2441
|
-
onClose:
|
|
2442
|
-
isLoading:
|
|
2143
|
+
onClose: n,
|
|
2144
|
+
isLoading: r,
|
|
2443
2145
|
error: s,
|
|
2444
2146
|
placeholder: o,
|
|
2445
2147
|
welcomeMessage: i = "Hi! How can I help you today?"
|
|
2446
2148
|
}) => {
|
|
2447
|
-
const a =
|
|
2448
|
-
return
|
|
2449
|
-
var
|
|
2450
|
-
(
|
|
2451
|
-
}, [e]), /* @__PURE__ */
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
/* @__PURE__ */ R.jsx(Vt, { size: 20, className: "cs-window__typing-icon" }),
|
|
2469
|
-
/* @__PURE__ */ R.jsx("span", { children: "Thinking..." })
|
|
2470
|
-
] }),
|
|
2471
|
-
s && /* @__PURE__ */ R.jsx("div", { className: "cs-window__error", children: /* @__PURE__ */ R.jsx("p", { children: s.message }) }),
|
|
2472
|
-
/* @__PURE__ */ R.jsx("div", { ref: a })
|
|
2473
|
-
] }),
|
|
2474
|
-
/* @__PURE__ */ R.jsx("div", { className: "cs-window__input-wrapper", children: /* @__PURE__ */ R.jsx(
|
|
2475
|
-
jn,
|
|
2476
|
-
{
|
|
2477
|
-
onSendMessage: t,
|
|
2478
|
-
isLoading: n,
|
|
2479
|
-
placeholder: o
|
|
2480
|
-
}
|
|
2481
|
-
) })
|
|
2482
|
-
] });
|
|
2483
|
-
}, ts = ({
|
|
2149
|
+
const a = Ye(null);
|
|
2150
|
+
return Re(() => {
|
|
2151
|
+
var d;
|
|
2152
|
+
(d = a.current) == null || d.scrollIntoView({ behavior: "smooth" });
|
|
2153
|
+
}, [e]), /* @__PURE__ */ b.createElement("div", { className: "cs-window" }, /* @__PURE__ */ b.createElement("div", { className: "cs-window__header" }, /* @__PURE__ */ b.createElement("h3", { className: "cs-window__title" }, "Customer Support"), /* @__PURE__ */ b.createElement(
|
|
2154
|
+
"button",
|
|
2155
|
+
{
|
|
2156
|
+
className: "cs-window__close",
|
|
2157
|
+
onClick: n,
|
|
2158
|
+
"aria-label": "Close chat"
|
|
2159
|
+
},
|
|
2160
|
+
/* @__PURE__ */ b.createElement(Lt, { size: 20 })
|
|
2161
|
+
)), /* @__PURE__ */ b.createElement("div", { className: "cs-window__messages" }, e.length === 0 && !r && /* @__PURE__ */ b.createElement("div", { className: "cs-window__welcome" }, /* @__PURE__ */ b.createElement("p", null, i)), e.map((d) => /* @__PURE__ */ b.createElement(yr, { key: d.id, message: d })), r && /* @__PURE__ */ b.createElement("div", { className: "cs-window__typing" }, /* @__PURE__ */ b.createElement(Dt, { size: 20, className: "cs-window__typing-icon" }), /* @__PURE__ */ b.createElement("span", null, "Thinking...")), s && /* @__PURE__ */ b.createElement("div", { className: "cs-window__error" }, /* @__PURE__ */ b.createElement("p", null, s.message)), /* @__PURE__ */ b.createElement("div", { ref: a })), /* @__PURE__ */ b.createElement("div", { className: "cs-window__input-wrapper" }, /* @__PURE__ */ b.createElement(
|
|
2162
|
+
wr,
|
|
2163
|
+
{
|
|
2164
|
+
onSendMessage: t,
|
|
2165
|
+
isLoading: r,
|
|
2166
|
+
placeholder: o
|
|
2167
|
+
}
|
|
2168
|
+
)));
|
|
2169
|
+
}, $r = ({
|
|
2484
2170
|
apiKey: e,
|
|
2485
2171
|
baseUrl: t,
|
|
2486
|
-
theme:
|
|
2487
|
-
position:
|
|
2172
|
+
theme: n,
|
|
2173
|
+
position: r = "bottom-right",
|
|
2488
2174
|
welcomeMessage: s,
|
|
2489
2175
|
placeholder: o,
|
|
2490
2176
|
className: i = "",
|
|
2491
2177
|
onError: a,
|
|
2492
|
-
onMessageSent:
|
|
2493
|
-
onMessageReceived:
|
|
2178
|
+
onMessageSent: d,
|
|
2179
|
+
onMessageReceived: u
|
|
2494
2180
|
}) => {
|
|
2495
|
-
const [
|
|
2496
|
-
messages:
|
|
2497
|
-
sendMessage:
|
|
2498
|
-
isLoading:
|
|
2499
|
-
error:
|
|
2500
|
-
clearError:
|
|
2501
|
-
} =
|
|
2181
|
+
const [l, p] = J(!1), {
|
|
2182
|
+
messages: E,
|
|
2183
|
+
sendMessage: _,
|
|
2184
|
+
isLoading: f,
|
|
2185
|
+
error: h,
|
|
2186
|
+
clearError: m
|
|
2187
|
+
} = hr({
|
|
2502
2188
|
apiKey: e,
|
|
2503
2189
|
baseUrl: t,
|
|
2504
2190
|
onError: a
|
|
2505
2191
|
});
|
|
2506
|
-
|
|
2507
|
-
if (
|
|
2508
|
-
const
|
|
2509
|
-
|
|
2192
|
+
Re(() => {
|
|
2193
|
+
if (n) {
|
|
2194
|
+
const y = document.documentElement;
|
|
2195
|
+
n.primaryColor && y.style.setProperty("--cs-primary-color", n.primaryColor), n.secondaryColor && y.style.setProperty("--cs-secondary-color", n.secondaryColor), n.backgroundColor && y.style.setProperty("--cs-bg-color", n.backgroundColor), n.textColor && y.style.setProperty("--cs-text-color", n.textColor), n.fontFamily && y.style.setProperty("--cs-font-family", n.fontFamily), n.borderRadius && y.style.setProperty("--cs-border-radius", n.borderRadius), n.buttonColor && y.style.setProperty("--cs-button-color", n.buttonColor), n.userMessageColor && y.style.setProperty("--cs-user-message-color", n.userMessageColor), n.assistantMessageColor && y.style.setProperty("--cs-assistant-message-color", n.assistantMessageColor);
|
|
2510
2196
|
}
|
|
2511
|
-
}, [
|
|
2512
|
-
const
|
|
2513
|
-
if (
|
|
2514
|
-
const
|
|
2515
|
-
(
|
|
2197
|
+
}, [n]);
|
|
2198
|
+
const g = async (y) => {
|
|
2199
|
+
if (d == null || d(y), await _(y), !h) {
|
|
2200
|
+
const S = E[E.length - 1];
|
|
2201
|
+
(S == null ? void 0 : S.role) === "ASSISTANT" && (u == null || u(S.content));
|
|
2516
2202
|
}
|
|
2517
|
-
},
|
|
2518
|
-
|
|
2203
|
+
}, R = () => {
|
|
2204
|
+
p(!l), h && m();
|
|
2519
2205
|
};
|
|
2520
|
-
return /* @__PURE__ */
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
"
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
!u && g.length > 0 && /* @__PURE__ */ R.jsx("span", { className: "cs-widget__badge", children: g.filter((w) => w.role === "ASSISTANT").length })
|
|
2543
|
-
]
|
|
2544
|
-
}
|
|
2545
|
-
)
|
|
2546
|
-
] });
|
|
2206
|
+
return /* @__PURE__ */ b.createElement("div", { className: `cs-widget cs-widget--${r} ${i}` }, l && /* @__PURE__ */ b.createElement(
|
|
2207
|
+
Er,
|
|
2208
|
+
{
|
|
2209
|
+
messages: E,
|
|
2210
|
+
onSendMessage: g,
|
|
2211
|
+
onClose: () => p(!1),
|
|
2212
|
+
isLoading: f,
|
|
2213
|
+
error: h,
|
|
2214
|
+
placeholder: o,
|
|
2215
|
+
welcomeMessage: s
|
|
2216
|
+
}
|
|
2217
|
+
), /* @__PURE__ */ b.createElement(
|
|
2218
|
+
"button",
|
|
2219
|
+
{
|
|
2220
|
+
className: `cs-widget__toggle ${l ? "cs-widget__toggle--open" : ""}`,
|
|
2221
|
+
onClick: R,
|
|
2222
|
+
"aria-label": l ? "Close chat" : "Open chat",
|
|
2223
|
+
"aria-expanded": l
|
|
2224
|
+
},
|
|
2225
|
+
/* @__PURE__ */ b.createElement(Ft, { size: 24 }),
|
|
2226
|
+
!l && E.length > 0 && /* @__PURE__ */ b.createElement("span", { className: "cs-widget__badge" }, E.filter((y) => y.role === "ASSISTANT").length)
|
|
2227
|
+
));
|
|
2547
2228
|
};
|
|
2548
2229
|
export {
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2230
|
+
wr as ChatInput,
|
|
2231
|
+
yr as ChatMessage,
|
|
2232
|
+
Er as ChatWindow,
|
|
2233
|
+
dr as CustomerSupportAPIClient,
|
|
2234
|
+
$r as CustomerSupportWidget,
|
|
2235
|
+
hr as useCustomerSupport,
|
|
2236
|
+
Ge as useLocalStorage
|
|
2556
2237
|
};
|
|
2557
2238
|
//# sourceMappingURL=index.es.js.map
|