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