@tarxemo/customer_support 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +628 -670
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +13 -13
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import { forwardRef as Ye, createElement as be, useState as K, useRef as et, useEffect as Oe, useCallback as ne } from "react";
|
|
1
|
+
var At = Object.defineProperty;
|
|
2
|
+
var Tt = (e, t, n) => t in e ? At(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Ue = (e, t, n) => Tt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import b, { forwardRef as Qe, createElement as we, useState as J, useRef as Ye, useEffect as Re, useCallback as te } from "react";
|
|
6
5
|
/**
|
|
7
6
|
* @license lucide-react v0.469.0 - ISC
|
|
8
7
|
*
|
|
9
8
|
* This source code is licensed under the ISC license.
|
|
10
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
10
|
*/
|
|
12
|
-
const
|
|
11
|
+
const Ct = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), et = (...e) => e.filter((t, n, r) => !!t && t.trim() !== "" && r.indexOf(t) === n).join(" ").trim();
|
|
13
12
|
/**
|
|
14
13
|
* @license lucide-react v0.469.0 - ISC
|
|
15
14
|
*
|
|
16
15
|
* This source code is licensed under the ISC license.
|
|
17
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
18
17
|
*/
|
|
19
|
-
var
|
|
18
|
+
var Nt = {
|
|
20
19
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21
20
|
width: 24,
|
|
22
21
|
height: 24,
|
|
@@ -33,7 +32,7 @@ var xt = {
|
|
|
33
32
|
* This source code is licensed under the ISC license.
|
|
34
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
34
|
*/
|
|
36
|
-
const
|
|
35
|
+
const xt = Qe(
|
|
37
36
|
({
|
|
38
37
|
color: e = "currentColor",
|
|
39
38
|
size: t = 24,
|
|
@@ -43,20 +42,20 @@ const Pt = Ye(
|
|
|
43
42
|
children: o,
|
|
44
43
|
iconNode: i,
|
|
45
44
|
...a
|
|
46
|
-
}, d) =>
|
|
45
|
+
}, d) => we(
|
|
47
46
|
"svg",
|
|
48
47
|
{
|
|
49
48
|
ref: d,
|
|
50
|
-
...
|
|
49
|
+
...Nt,
|
|
51
50
|
width: t,
|
|
52
51
|
height: t,
|
|
53
52
|
stroke: e,
|
|
54
53
|
strokeWidth: r ? Number(n) * 24 / Number(t) : n,
|
|
55
|
-
className:
|
|
54
|
+
className: et("lucide", s),
|
|
56
55
|
...a
|
|
57
56
|
},
|
|
58
57
|
[
|
|
59
|
-
...i.map(([u, l]) =>
|
|
58
|
+
...i.map(([u, l]) => we(u, l)),
|
|
60
59
|
...Array.isArray(o) ? o : [o]
|
|
61
60
|
]
|
|
62
61
|
)
|
|
@@ -68,11 +67,11 @@ const Pt = Ye(
|
|
|
68
67
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
68
|
*/
|
|
70
69
|
const V = (e, t) => {
|
|
71
|
-
const n =
|
|
72
|
-
({ className: r, ...s }, o) =>
|
|
70
|
+
const n = Qe(
|
|
71
|
+
({ className: r, ...s }, o) => we(xt, {
|
|
73
72
|
ref: o,
|
|
74
73
|
iconNode: t,
|
|
75
|
-
className:
|
|
74
|
+
className: et(`lucide-${Ct(e)}`, r),
|
|
76
75
|
...s
|
|
77
76
|
})
|
|
78
77
|
);
|
|
@@ -84,7 +83,7 @@ const V = (e, t) => {
|
|
|
84
83
|
* This source code is licensed under the ISC license.
|
|
85
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
85
|
*/
|
|
87
|
-
const
|
|
86
|
+
const Pt = V("ExternalLink", [
|
|
88
87
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
89
88
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
90
89
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
@@ -95,7 +94,7 @@ const Dt = V("ExternalLink", [
|
|
|
95
94
|
* This source code is licensed under the ISC license.
|
|
96
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
96
|
*/
|
|
98
|
-
const
|
|
97
|
+
const Dt = V("LoaderCircle", [
|
|
99
98
|
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
100
99
|
]);
|
|
101
100
|
/**
|
|
@@ -104,7 +103,7 @@ const Ft = V("LoaderCircle", [
|
|
|
104
103
|
* This source code is licensed under the ISC license.
|
|
105
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
105
|
*/
|
|
107
|
-
const
|
|
106
|
+
const Ft = V("MessageCircle", [
|
|
108
107
|
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }]
|
|
109
108
|
]);
|
|
110
109
|
/**
|
|
@@ -113,7 +112,7 @@ const Ut = V("MessageCircle", [
|
|
|
113
112
|
* This source code is licensed under the ISC license.
|
|
114
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
114
|
*/
|
|
116
|
-
const
|
|
115
|
+
const Ut = V("Send", [
|
|
117
116
|
[
|
|
118
117
|
"path",
|
|
119
118
|
{
|
|
@@ -129,54 +128,54 @@ const Lt = V("Send", [
|
|
|
129
128
|
* This source code is licensed under the ISC license.
|
|
130
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
130
|
*/
|
|
132
|
-
const
|
|
131
|
+
const Lt = V("X", [
|
|
133
132
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
134
133
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
135
134
|
]);
|
|
136
|
-
function
|
|
135
|
+
function tt(e, t) {
|
|
137
136
|
return function() {
|
|
138
137
|
return e.apply(t, arguments);
|
|
139
138
|
};
|
|
140
139
|
}
|
|
141
|
-
const { toString:
|
|
142
|
-
const n =
|
|
140
|
+
const { toString: kt } = Object.prototype, { getPrototypeOf: Oe } = Object, { iterator: ae, toStringTag: nt } = Symbol, ce = /* @__PURE__ */ ((e) => (t) => {
|
|
141
|
+
const n = kt.call(t);
|
|
143
142
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
144
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
145
|
-
function
|
|
146
|
-
return e !== null && !
|
|
143
|
+
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => ce(t) === e), le = (e) => (t) => typeof t === e, { isArray: H } = Array, q = le("undefined");
|
|
144
|
+
function K(e) {
|
|
145
|
+
return e !== null && !q(e) && e.constructor !== null && !q(e.constructor) && C(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
147
146
|
}
|
|
148
|
-
const
|
|
149
|
-
function
|
|
147
|
+
const rt = P("ArrayBuffer");
|
|
148
|
+
function Bt(e) {
|
|
150
149
|
let t;
|
|
151
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
150
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && rt(e.buffer), t;
|
|
152
151
|
}
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
152
|
+
const It = le("string"), C = le("function"), st = le("number"), W = (e) => e !== null && typeof e == "object", jt = (e) => e === !0 || e === !1, re = (e) => {
|
|
153
|
+
if (ce(e) !== "object")
|
|
155
154
|
return !1;
|
|
156
|
-
const t =
|
|
157
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
158
|
-
},
|
|
159
|
-
if (!
|
|
155
|
+
const t = Oe(e);
|
|
156
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(nt in e) && !(ae in e);
|
|
157
|
+
}, Mt = (e) => {
|
|
158
|
+
if (!W(e) || K(e))
|
|
160
159
|
return !1;
|
|
161
160
|
try {
|
|
162
161
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
163
162
|
} catch {
|
|
164
163
|
return !1;
|
|
165
164
|
}
|
|
166
|
-
},
|
|
165
|
+
}, $t = P("Date"), qt = P("File"), Ht = P("Blob"), zt = P("FileList"), vt = (e) => W(e) && C(e.pipe), Jt = (e) => {
|
|
167
166
|
let t;
|
|
168
|
-
return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t =
|
|
167
|
+
return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t = ce(e)) === "formdata" || // detect form-data instance
|
|
169
168
|
t === "object" && C(e.toString) && e.toString() === "[object FormData]"));
|
|
170
|
-
}, Vt =
|
|
171
|
-
function
|
|
169
|
+
}, Vt = P("URLSearchParams"), [Kt, Wt, Xt, Gt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), Zt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
170
|
+
function X(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
172
171
|
if (e === null || typeof e > "u")
|
|
173
172
|
return;
|
|
174
173
|
let r, s;
|
|
175
|
-
if (typeof e != "object" && (e = [e]),
|
|
174
|
+
if (typeof e != "object" && (e = [e]), H(e))
|
|
176
175
|
for (r = 0, s = e.length; r < s; r++)
|
|
177
176
|
t.call(null, e[r], r, e);
|
|
178
177
|
else {
|
|
179
|
-
if (
|
|
178
|
+
if (K(e))
|
|
180
179
|
return;
|
|
181
180
|
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
182
181
|
let a;
|
|
@@ -184,8 +183,8 @@ function G(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
184
183
|
a = o[r], t.call(null, e[a], a, e);
|
|
185
184
|
}
|
|
186
185
|
}
|
|
187
|
-
function
|
|
188
|
-
if (
|
|
186
|
+
function ot(e, t) {
|
|
187
|
+
if (K(e))
|
|
189
188
|
return null;
|
|
190
189
|
t = t.toLowerCase();
|
|
191
190
|
const n = Object.keys(e);
|
|
@@ -195,19 +194,19 @@ function it(e, t) {
|
|
|
195
194
|
return s;
|
|
196
195
|
return null;
|
|
197
196
|
}
|
|
198
|
-
const
|
|
199
|
-
function
|
|
200
|
-
const { caseless: e, skipUndefined: t } =
|
|
201
|
-
const i = e &&
|
|
202
|
-
|
|
197
|
+
const I = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, it = (e) => !q(e) && e !== I;
|
|
198
|
+
function Ee() {
|
|
199
|
+
const { caseless: e, skipUndefined: t } = it(this) && this || {}, n = {}, r = (s, o) => {
|
|
200
|
+
const i = e && ot(n, o) || o;
|
|
201
|
+
re(n[i]) && re(s) ? n[i] = Ee(n[i], s) : re(s) ? n[i] = Ee({}, s) : H(s) ? n[i] = s.slice() : (!t || !q(s)) && (n[i] = s);
|
|
203
202
|
};
|
|
204
203
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
205
|
-
arguments[s] &&
|
|
204
|
+
arguments[s] && X(arguments[s], r);
|
|
206
205
|
return n;
|
|
207
206
|
}
|
|
208
|
-
const
|
|
207
|
+
const Qt = (e, t, n, { allOwnKeys: r } = {}) => (X(t, (s, o) => {
|
|
209
208
|
n && C(s) ? Object.defineProperty(e, o, {
|
|
210
|
-
value:
|
|
209
|
+
value: tt(s, n),
|
|
211
210
|
writable: !0,
|
|
212
211
|
enumerable: !0,
|
|
213
212
|
configurable: !0
|
|
@@ -217,7 +216,7 @@ const Yt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, o) => {
|
|
|
217
216
|
enumerable: !0,
|
|
218
217
|
configurable: !0
|
|
219
218
|
});
|
|
220
|
-
}, { allOwnKeys: r }), e),
|
|
219
|
+
}, { allOwnKeys: r }), e), Yt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), en = (e, t, n, r) => {
|
|
221
220
|
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
222
221
|
value: e,
|
|
223
222
|
writable: !0,
|
|
@@ -226,55 +225,55 @@ const Yt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, o) => {
|
|
|
226
225
|
}), Object.defineProperty(e, "super", {
|
|
227
226
|
value: t.prototype
|
|
228
227
|
}), n && Object.assign(e.prototype, n);
|
|
229
|
-
},
|
|
228
|
+
}, tn = (e, t, n, r) => {
|
|
230
229
|
let s, o, i;
|
|
231
230
|
const a = {};
|
|
232
231
|
if (t = t || {}, e == null) return t;
|
|
233
232
|
do {
|
|
234
233
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
235
234
|
i = s[o], (!r || r(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0);
|
|
236
|
-
e = n !== !1 &&
|
|
235
|
+
e = n !== !1 && Oe(e);
|
|
237
236
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
238
237
|
return t;
|
|
239
|
-
},
|
|
238
|
+
}, nn = (e, t, n) => {
|
|
240
239
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
241
240
|
const r = e.indexOf(t, n);
|
|
242
241
|
return r !== -1 && r === n;
|
|
243
|
-
},
|
|
242
|
+
}, rn = (e) => {
|
|
244
243
|
if (!e) return null;
|
|
245
|
-
if (
|
|
244
|
+
if (H(e)) return e;
|
|
246
245
|
let t = e.length;
|
|
247
|
-
if (!
|
|
246
|
+
if (!st(t)) return null;
|
|
248
247
|
const n = new Array(t);
|
|
249
248
|
for (; t-- > 0; )
|
|
250
249
|
n[t] = e[t];
|
|
251
250
|
return n;
|
|
252
|
-
},
|
|
253
|
-
const r = (e && e[
|
|
251
|
+
}, sn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Oe(Uint8Array)), on = (e, t) => {
|
|
252
|
+
const r = (e && e[ae]).call(e);
|
|
254
253
|
let s;
|
|
255
254
|
for (; (s = r.next()) && !s.done; ) {
|
|
256
255
|
const o = s.value;
|
|
257
256
|
t.call(e, o[0], o[1]);
|
|
258
257
|
}
|
|
259
|
-
},
|
|
258
|
+
}, an = (e, t) => {
|
|
260
259
|
let n;
|
|
261
260
|
const r = [];
|
|
262
261
|
for (; (n = e.exec(t)) !== null; )
|
|
263
262
|
r.push(n);
|
|
264
263
|
return r;
|
|
265
|
-
},
|
|
264
|
+
}, cn = P("HTMLFormElement"), ln = (e) => e.toLowerCase().replace(
|
|
266
265
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
267
266
|
function(n, r, s) {
|
|
268
267
|
return r.toUpperCase() + s;
|
|
269
268
|
}
|
|
270
|
-
),
|
|
269
|
+
), Le = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), un = P("RegExp"), at = (e, t) => {
|
|
271
270
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
272
|
-
|
|
271
|
+
X(n, (s, o) => {
|
|
273
272
|
let i;
|
|
274
273
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
275
274
|
}), Object.defineProperties(e, r);
|
|
276
|
-
},
|
|
277
|
-
|
|
275
|
+
}, fn = (e) => {
|
|
276
|
+
at(e, (t, n) => {
|
|
278
277
|
if (C(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
279
278
|
return !1;
|
|
280
279
|
const r = e[n];
|
|
@@ -288,107 +287,107 @@ const Yt = (e, t, n, { allOwnKeys: r } = {}) => (G(t, (s, o) => {
|
|
|
288
287
|
});
|
|
289
288
|
}
|
|
290
289
|
});
|
|
291
|
-
},
|
|
290
|
+
}, dn = (e, t) => {
|
|
292
291
|
const n = {}, r = (s) => {
|
|
293
292
|
s.forEach((o) => {
|
|
294
293
|
n[o] = !0;
|
|
295
294
|
});
|
|
296
295
|
};
|
|
297
|
-
return
|
|
298
|
-
},
|
|
296
|
+
return H(e) ? r(e) : r(String(e).split(t)), n;
|
|
297
|
+
}, pn = () => {
|
|
299
298
|
}, mn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
300
|
-
function
|
|
301
|
-
return !!(e && C(e.append) && e[
|
|
299
|
+
function hn(e) {
|
|
300
|
+
return !!(e && C(e.append) && e[nt] === "FormData" && e[ae]);
|
|
302
301
|
}
|
|
303
|
-
const
|
|
302
|
+
const yn = (e) => {
|
|
304
303
|
const t = new Array(10), n = (r, s) => {
|
|
305
|
-
if (
|
|
304
|
+
if (W(r)) {
|
|
306
305
|
if (t.indexOf(r) >= 0)
|
|
307
306
|
return;
|
|
308
|
-
if (
|
|
307
|
+
if (K(r))
|
|
309
308
|
return r;
|
|
310
309
|
if (!("toJSON" in r)) {
|
|
311
310
|
t[s] = r;
|
|
312
|
-
const o =
|
|
313
|
-
return
|
|
311
|
+
const o = H(r) ? [] : {};
|
|
312
|
+
return X(r, (i, a) => {
|
|
314
313
|
const d = n(i, s + 1);
|
|
315
|
-
!
|
|
314
|
+
!q(d) && (o[a] = d);
|
|
316
315
|
}), t[s] = void 0, o;
|
|
317
316
|
}
|
|
318
317
|
}
|
|
319
318
|
return r;
|
|
320
319
|
};
|
|
321
320
|
return n(e, 0);
|
|
322
|
-
},
|
|
323
|
-
s ===
|
|
321
|
+
}, wn = P("AsyncFunction"), En = (e) => e && (W(e) || C(e)) && C(e.then) && C(e.catch), ct = ((e, t) => e ? setImmediate : t ? ((n, r) => (I.addEventListener("message", ({ source: s, data: o }) => {
|
|
322
|
+
s === I && o === n && r.length && r.shift()();
|
|
324
323
|
}, !1), (s) => {
|
|
325
|
-
r.push(s),
|
|
324
|
+
r.push(s), I.postMessage(n, "*");
|
|
326
325
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
327
326
|
typeof setImmediate == "function",
|
|
328
|
-
C(
|
|
329
|
-
),
|
|
330
|
-
isArray:
|
|
331
|
-
isArrayBuffer:
|
|
332
|
-
isBuffer:
|
|
333
|
-
isFormData:
|
|
334
|
-
isArrayBufferView:
|
|
335
|
-
isString:
|
|
336
|
-
isNumber:
|
|
337
|
-
isBoolean:
|
|
338
|
-
isObject:
|
|
339
|
-
isPlainObject:
|
|
340
|
-
isEmptyObject:
|
|
341
|
-
isReadableStream:
|
|
342
|
-
isRequest:
|
|
343
|
-
isResponse:
|
|
344
|
-
isHeaders:
|
|
345
|
-
isUndefined:
|
|
346
|
-
isDate:
|
|
347
|
-
isFile:
|
|
348
|
-
isBlob:
|
|
349
|
-
isRegExp:
|
|
327
|
+
C(I.postMessage)
|
|
328
|
+
), bn = typeof queueMicrotask < "u" ? queueMicrotask.bind(I) : typeof process < "u" && process.nextTick || ct, gn = (e) => e != null && C(e[ae]), c = {
|
|
329
|
+
isArray: H,
|
|
330
|
+
isArrayBuffer: rt,
|
|
331
|
+
isBuffer: K,
|
|
332
|
+
isFormData: Jt,
|
|
333
|
+
isArrayBufferView: Bt,
|
|
334
|
+
isString: It,
|
|
335
|
+
isNumber: st,
|
|
336
|
+
isBoolean: jt,
|
|
337
|
+
isObject: W,
|
|
338
|
+
isPlainObject: re,
|
|
339
|
+
isEmptyObject: Mt,
|
|
340
|
+
isReadableStream: Kt,
|
|
341
|
+
isRequest: Wt,
|
|
342
|
+
isResponse: Xt,
|
|
343
|
+
isHeaders: Gt,
|
|
344
|
+
isUndefined: q,
|
|
345
|
+
isDate: $t,
|
|
346
|
+
isFile: qt,
|
|
347
|
+
isBlob: Ht,
|
|
348
|
+
isRegExp: un,
|
|
350
349
|
isFunction: C,
|
|
351
|
-
isStream:
|
|
350
|
+
isStream: vt,
|
|
352
351
|
isURLSearchParams: Vt,
|
|
353
|
-
isTypedArray:
|
|
354
|
-
isFileList:
|
|
355
|
-
forEach:
|
|
356
|
-
merge:
|
|
357
|
-
extend:
|
|
358
|
-
trim:
|
|
359
|
-
stripBOM:
|
|
360
|
-
inherits:
|
|
361
|
-
toFlatObject:
|
|
362
|
-
kindOf:
|
|
363
|
-
kindOfTest:
|
|
364
|
-
endsWith:
|
|
365
|
-
toArray:
|
|
366
|
-
forEachEntry:
|
|
367
|
-
matchAll:
|
|
368
|
-
isHTMLForm:
|
|
369
|
-
hasOwnProperty:
|
|
370
|
-
hasOwnProp:
|
|
352
|
+
isTypedArray: sn,
|
|
353
|
+
isFileList: zt,
|
|
354
|
+
forEach: X,
|
|
355
|
+
merge: Ee,
|
|
356
|
+
extend: Qt,
|
|
357
|
+
trim: Zt,
|
|
358
|
+
stripBOM: Yt,
|
|
359
|
+
inherits: en,
|
|
360
|
+
toFlatObject: tn,
|
|
361
|
+
kindOf: ce,
|
|
362
|
+
kindOfTest: P,
|
|
363
|
+
endsWith: nn,
|
|
364
|
+
toArray: rn,
|
|
365
|
+
forEachEntry: on,
|
|
366
|
+
matchAll: an,
|
|
367
|
+
isHTMLForm: cn,
|
|
368
|
+
hasOwnProperty: Le,
|
|
369
|
+
hasOwnProp: Le,
|
|
371
370
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
372
|
-
reduceDescriptors:
|
|
373
|
-
freezeMethods:
|
|
374
|
-
toObjectSet:
|
|
375
|
-
toCamelCase:
|
|
376
|
-
noop:
|
|
371
|
+
reduceDescriptors: at,
|
|
372
|
+
freezeMethods: fn,
|
|
373
|
+
toObjectSet: dn,
|
|
374
|
+
toCamelCase: ln,
|
|
375
|
+
noop: pn,
|
|
377
376
|
toFiniteNumber: mn,
|
|
378
|
-
findKey:
|
|
379
|
-
global:
|
|
380
|
-
isContextDefined:
|
|
381
|
-
isSpecCompliantForm:
|
|
382
|
-
toJSONObject:
|
|
383
|
-
isAsyncFn:
|
|
384
|
-
isThenable:
|
|
385
|
-
setImmediate:
|
|
386
|
-
asap:
|
|
387
|
-
isIterable:
|
|
377
|
+
findKey: ot,
|
|
378
|
+
global: I,
|
|
379
|
+
isContextDefined: it,
|
|
380
|
+
isSpecCompliantForm: hn,
|
|
381
|
+
toJSONObject: yn,
|
|
382
|
+
isAsyncFn: wn,
|
|
383
|
+
isThenable: En,
|
|
384
|
+
setImmediate: ct,
|
|
385
|
+
asap: bn,
|
|
386
|
+
isIterable: gn
|
|
388
387
|
};
|
|
389
|
-
let w = class
|
|
388
|
+
let w = class lt extends Error {
|
|
390
389
|
static from(t, n, r, s, o, i) {
|
|
391
|
-
const a = new
|
|
390
|
+
const a = new lt(t.message, n || t.code, r, s, o);
|
|
392
391
|
return a.cause = t, a.name = t.name, i && Object.assign(a, i), a;
|
|
393
392
|
}
|
|
394
393
|
/**
|
|
@@ -437,33 +436,33 @@ w.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
|
437
436
|
w.ERR_CANCELED = "ERR_CANCELED";
|
|
438
437
|
w.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
439
438
|
w.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
440
|
-
const
|
|
441
|
-
function
|
|
439
|
+
const Sn = null;
|
|
440
|
+
function be(e) {
|
|
442
441
|
return c.isPlainObject(e) || c.isArray(e);
|
|
443
442
|
}
|
|
444
|
-
function
|
|
443
|
+
function ut(e) {
|
|
445
444
|
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
446
445
|
}
|
|
447
|
-
function
|
|
446
|
+
function ke(e, t, n) {
|
|
448
447
|
return e ? e.concat(t).map(function(s, o) {
|
|
449
|
-
return s =
|
|
448
|
+
return s = ut(s), !n && o ? "[" + s + "]" : s;
|
|
450
449
|
}).join(n ? "." : "") : t;
|
|
451
450
|
}
|
|
452
|
-
function
|
|
453
|
-
return c.isArray(e) && !e.some(
|
|
451
|
+
function Rn(e) {
|
|
452
|
+
return c.isArray(e) && !e.some(be);
|
|
454
453
|
}
|
|
455
|
-
const
|
|
454
|
+
const On = c.toFlatObject(c, {}, null, function(t) {
|
|
456
455
|
return /^is[A-Z]/.test(t);
|
|
457
456
|
});
|
|
458
|
-
function
|
|
457
|
+
function ue(e, t, n) {
|
|
459
458
|
if (!c.isObject(e))
|
|
460
459
|
throw new TypeError("target must be an object");
|
|
461
460
|
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
462
461
|
metaTokens: !0,
|
|
463
462
|
dots: !1,
|
|
464
463
|
indexes: !1
|
|
465
|
-
}, !1, function(
|
|
466
|
-
return !c.isUndefined(h
|
|
464
|
+
}, !1, function(h, m) {
|
|
465
|
+
return !c.isUndefined(m[h]);
|
|
467
466
|
});
|
|
468
467
|
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
469
468
|
if (!c.isFunction(s))
|
|
@@ -478,39 +477,39 @@ function fe(e, t, n) {
|
|
|
478
477
|
throw new w("Blob is not supported. Use a Buffer instead.");
|
|
479
478
|
return c.isArrayBuffer(f) || c.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
480
479
|
}
|
|
481
|
-
function l(f,
|
|
480
|
+
function l(f, h, m) {
|
|
482
481
|
let g = f;
|
|
483
|
-
if (f && !
|
|
484
|
-
if (c.endsWith(
|
|
485
|
-
|
|
486
|
-
else if (c.isArray(f) &&
|
|
487
|
-
return
|
|
482
|
+
if (f && !m && typeof f == "object") {
|
|
483
|
+
if (c.endsWith(h, "{}"))
|
|
484
|
+
h = r ? h : h.slice(0, -2), f = JSON.stringify(f);
|
|
485
|
+
else if (c.isArray(f) && Rn(f) || (c.isFileList(f) || c.endsWith(h, "[]")) && (g = c.toArray(f)))
|
|
486
|
+
return h = ut(h), g.forEach(function(y, S) {
|
|
488
487
|
!(c.isUndefined(y) || y === null) && t.append(
|
|
489
488
|
// eslint-disable-next-line no-nested-ternary
|
|
490
|
-
i === !0 ?
|
|
489
|
+
i === !0 ? ke([h], S, o) : i === null ? h : h + "[]",
|
|
491
490
|
u(y)
|
|
492
491
|
);
|
|
493
492
|
}), !1;
|
|
494
493
|
}
|
|
495
|
-
return
|
|
494
|
+
return be(f) ? !0 : (t.append(ke(m, h, o), u(f)), !1);
|
|
496
495
|
}
|
|
497
|
-
const p = [],
|
|
496
|
+
const p = [], E = Object.assign(On, {
|
|
498
497
|
defaultVisitor: l,
|
|
499
498
|
convertValue: u,
|
|
500
|
-
isVisitable:
|
|
499
|
+
isVisitable: be
|
|
501
500
|
});
|
|
502
|
-
function _(f,
|
|
501
|
+
function _(f, h) {
|
|
503
502
|
if (!c.isUndefined(f)) {
|
|
504
503
|
if (p.indexOf(f) !== -1)
|
|
505
|
-
throw Error("Circular reference detected in " +
|
|
504
|
+
throw Error("Circular reference detected in " + h.join("."));
|
|
506
505
|
p.push(f), c.forEach(f, function(g, R) {
|
|
507
506
|
(!(c.isUndefined(g) || g === null) && s.call(
|
|
508
507
|
t,
|
|
509
508
|
g,
|
|
510
509
|
c.isString(R) ? R.trim() : R,
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
)) === !0 && _(g,
|
|
510
|
+
h,
|
|
511
|
+
E
|
|
512
|
+
)) === !0 && _(g, h ? h.concat(R) : [R]);
|
|
514
513
|
}), p.pop();
|
|
515
514
|
}
|
|
516
515
|
}
|
|
@@ -518,7 +517,7 @@ function fe(e, t, n) {
|
|
|
518
517
|
throw new TypeError("data must be an object");
|
|
519
518
|
return _(e), t;
|
|
520
519
|
}
|
|
521
|
-
function
|
|
520
|
+
function Be(e) {
|
|
522
521
|
const t = {
|
|
523
522
|
"!": "%21",
|
|
524
523
|
"'": "%27",
|
|
@@ -532,38 +531,38 @@ function Ie(e) {
|
|
|
532
531
|
return t[r];
|
|
533
532
|
});
|
|
534
533
|
}
|
|
535
|
-
function
|
|
536
|
-
this._pairs = [], e &&
|
|
534
|
+
function _e(e, t) {
|
|
535
|
+
this._pairs = [], e && ue(e, this, t);
|
|
537
536
|
}
|
|
538
|
-
const
|
|
539
|
-
|
|
537
|
+
const ft = _e.prototype;
|
|
538
|
+
ft.append = function(t, n) {
|
|
540
539
|
this._pairs.push([t, n]);
|
|
541
540
|
};
|
|
542
|
-
|
|
541
|
+
ft.toString = function(t) {
|
|
543
542
|
const n = t ? function(r) {
|
|
544
|
-
return t.call(this, r,
|
|
545
|
-
} :
|
|
543
|
+
return t.call(this, r, Be);
|
|
544
|
+
} : Be;
|
|
546
545
|
return this._pairs.map(function(s) {
|
|
547
546
|
return n(s[0]) + "=" + n(s[1]);
|
|
548
547
|
}, "").join("&");
|
|
549
548
|
};
|
|
550
|
-
function
|
|
549
|
+
function _n(e) {
|
|
551
550
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
552
551
|
}
|
|
553
|
-
function
|
|
552
|
+
function dt(e, t, n) {
|
|
554
553
|
if (!t)
|
|
555
554
|
return e;
|
|
556
|
-
const r = n && n.encode ||
|
|
555
|
+
const r = n && n.encode || _n, s = c.isFunction(n) ? {
|
|
557
556
|
serialize: n
|
|
558
557
|
} : n, o = s && s.serialize;
|
|
559
558
|
let i;
|
|
560
|
-
if (o ? i = o(t, s) : i = c.isURLSearchParams(t) ? t.toString() : new
|
|
559
|
+
if (o ? i = o(t, s) : i = c.isURLSearchParams(t) ? t.toString() : new _e(t, s).toString(r), i) {
|
|
561
560
|
const a = e.indexOf("#");
|
|
562
561
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
563
562
|
}
|
|
564
563
|
return e;
|
|
565
564
|
}
|
|
566
|
-
class
|
|
565
|
+
class Ie {
|
|
567
566
|
constructor() {
|
|
568
567
|
this.handlers = [];
|
|
569
568
|
}
|
|
@@ -618,42 +617,42 @@ class je {
|
|
|
618
617
|
});
|
|
619
618
|
}
|
|
620
619
|
}
|
|
621
|
-
const
|
|
620
|
+
const pt = {
|
|
622
621
|
silentJSONParsing: !0,
|
|
623
622
|
forcedJSONParsing: !0,
|
|
624
623
|
clarifyTimeoutError: !1
|
|
625
|
-
},
|
|
624
|
+
}, An = typeof URLSearchParams < "u" ? URLSearchParams : _e, Tn = typeof FormData < "u" ? FormData : null, Cn = typeof Blob < "u" ? Blob : null, Nn = {
|
|
626
625
|
isBrowser: !0,
|
|
627
626
|
classes: {
|
|
628
|
-
URLSearchParams:
|
|
629
|
-
FormData:
|
|
630
|
-
Blob:
|
|
627
|
+
URLSearchParams: An,
|
|
628
|
+
FormData: Tn,
|
|
629
|
+
Blob: Cn
|
|
631
630
|
},
|
|
632
631
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
633
|
-
},
|
|
634
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
632
|
+
}, Ae = typeof window < "u" && typeof document < "u", ge = typeof navigator == "object" && navigator || void 0, xn = Ae && (!ge || ["ReactNative", "NativeScript", "NS"].indexOf(ge.product) < 0), Pn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
633
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Dn = Ae && window.location.href || "http://localhost", Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
635
634
|
__proto__: null,
|
|
636
|
-
hasBrowserEnv:
|
|
637
|
-
hasStandardBrowserEnv:
|
|
638
|
-
hasStandardBrowserWebWorkerEnv:
|
|
639
|
-
navigator:
|
|
640
|
-
origin:
|
|
635
|
+
hasBrowserEnv: Ae,
|
|
636
|
+
hasStandardBrowserEnv: xn,
|
|
637
|
+
hasStandardBrowserWebWorkerEnv: Pn,
|
|
638
|
+
navigator: ge,
|
|
639
|
+
origin: Dn
|
|
641
640
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
642
|
-
...
|
|
643
|
-
...
|
|
641
|
+
...Fn,
|
|
642
|
+
...Nn
|
|
644
643
|
};
|
|
645
|
-
function
|
|
646
|
-
return
|
|
644
|
+
function Un(e, t) {
|
|
645
|
+
return ue(e, new A.classes.URLSearchParams(), {
|
|
647
646
|
visitor: function(n, r, s, o) {
|
|
648
647
|
return A.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
649
648
|
},
|
|
650
649
|
...t
|
|
651
650
|
});
|
|
652
651
|
}
|
|
653
|
-
function
|
|
652
|
+
function Ln(e) {
|
|
654
653
|
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
655
654
|
}
|
|
656
|
-
function
|
|
655
|
+
function kn(e) {
|
|
657
656
|
const t = {}, n = Object.keys(e);
|
|
658
657
|
let r;
|
|
659
658
|
const s = n.length;
|
|
@@ -667,17 +666,17 @@ function mt(e) {
|
|
|
667
666
|
let i = n[o++];
|
|
668
667
|
if (i === "__proto__") return !0;
|
|
669
668
|
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] =
|
|
669
|
+
return i = !i && c.isArray(s) ? s.length : i, d ? (c.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !a) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && c.isArray(s[i]) && (s[i] = kn(s[i])), !a);
|
|
671
670
|
}
|
|
672
671
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
673
672
|
const n = {};
|
|
674
673
|
return c.forEachEntry(e, (r, s) => {
|
|
675
|
-
t(
|
|
674
|
+
t(Ln(r), s, n, 0);
|
|
676
675
|
}), n;
|
|
677
676
|
}
|
|
678
677
|
return null;
|
|
679
678
|
}
|
|
680
|
-
function
|
|
679
|
+
function Bn(e, t, n) {
|
|
681
680
|
if (c.isString(e))
|
|
682
681
|
try {
|
|
683
682
|
return (t || JSON.parse)(e), c.trim(e);
|
|
@@ -687,8 +686,8 @@ function In(e, t, n) {
|
|
|
687
686
|
}
|
|
688
687
|
return (n || JSON.stringify)(e);
|
|
689
688
|
}
|
|
690
|
-
const
|
|
691
|
-
transitional:
|
|
689
|
+
const G = {
|
|
690
|
+
transitional: pt,
|
|
692
691
|
adapter: ["xhr", "http", "fetch"],
|
|
693
692
|
transformRequest: [function(t, n) {
|
|
694
693
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = c.isObject(t);
|
|
@@ -703,20 +702,20 @@ const Z = {
|
|
|
703
702
|
let a;
|
|
704
703
|
if (o) {
|
|
705
704
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
706
|
-
return
|
|
705
|
+
return Un(t, this.formSerializer).toString();
|
|
707
706
|
if ((a = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
708
707
|
const d = this.env && this.env.FormData;
|
|
709
|
-
return
|
|
708
|
+
return ue(
|
|
710
709
|
a ? { "files[]": t } : t,
|
|
711
710
|
d && new d(),
|
|
712
711
|
this.formSerializer
|
|
713
712
|
);
|
|
714
713
|
}
|
|
715
714
|
}
|
|
716
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
715
|
+
return o || s ? (n.setContentType("application/json", !1), Bn(t)) : t;
|
|
717
716
|
}],
|
|
718
717
|
transformResponse: [function(t) {
|
|
719
|
-
const n = this.transitional ||
|
|
718
|
+
const n = this.transitional || G.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
720
719
|
if (c.isResponse(t) || c.isReadableStream(t))
|
|
721
720
|
return t;
|
|
722
721
|
if (t && c.isString(t) && (r && !this.responseType || s)) {
|
|
@@ -754,9 +753,9 @@ const Z = {
|
|
|
754
753
|
}
|
|
755
754
|
};
|
|
756
755
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
757
|
-
|
|
756
|
+
G.headers[e] = {};
|
|
758
757
|
});
|
|
759
|
-
const
|
|
758
|
+
const In = c.toObjectSet([
|
|
760
759
|
"age",
|
|
761
760
|
"authorization",
|
|
762
761
|
"content-length",
|
|
@@ -774,28 +773,28 @@ const jn = c.toObjectSet([
|
|
|
774
773
|
"referer",
|
|
775
774
|
"retry-after",
|
|
776
775
|
"user-agent"
|
|
777
|
-
]),
|
|
776
|
+
]), jn = (e) => {
|
|
778
777
|
const t = {};
|
|
779
778
|
let n, r, s;
|
|
780
779
|
return e && e.split(`
|
|
781
780
|
`).forEach(function(i) {
|
|
782
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
781
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && In[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
783
782
|
}), t;
|
|
784
|
-
},
|
|
785
|
-
function
|
|
783
|
+
}, je = Symbol("internals");
|
|
784
|
+
function v(e) {
|
|
786
785
|
return e && String(e).trim().toLowerCase();
|
|
787
786
|
}
|
|
788
|
-
function
|
|
789
|
-
return e === !1 || e == null ? e : c.isArray(e) ? e.map(
|
|
787
|
+
function se(e) {
|
|
788
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(se) : String(e);
|
|
790
789
|
}
|
|
791
|
-
function
|
|
790
|
+
function Mn(e) {
|
|
792
791
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
793
792
|
let r;
|
|
794
793
|
for (; r = n.exec(e); )
|
|
795
794
|
t[r[1]] = r[2];
|
|
796
795
|
return t;
|
|
797
796
|
}
|
|
798
|
-
const
|
|
797
|
+
const $n = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
799
798
|
function me(e, t, n, r, s) {
|
|
800
799
|
if (c.isFunction(r))
|
|
801
800
|
return r.call(this, t, n);
|
|
@@ -806,10 +805,10 @@ function me(e, t, n, r, s) {
|
|
|
806
805
|
return r.test(t);
|
|
807
806
|
}
|
|
808
807
|
}
|
|
809
|
-
function
|
|
808
|
+
function qn(e) {
|
|
810
809
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
811
810
|
}
|
|
812
|
-
function
|
|
811
|
+
function Hn(e, t) {
|
|
813
812
|
const n = c.toCamelCase(" " + t);
|
|
814
813
|
["get", "set", "has"].forEach((r) => {
|
|
815
814
|
Object.defineProperty(e, r + n, {
|
|
@@ -827,17 +826,17 @@ let N = class {
|
|
|
827
826
|
set(t, n, r) {
|
|
828
827
|
const s = this;
|
|
829
828
|
function o(a, d, u) {
|
|
830
|
-
const l =
|
|
829
|
+
const l = v(d);
|
|
831
830
|
if (!l)
|
|
832
831
|
throw new Error("header name must be a non-empty string");
|
|
833
832
|
const p = c.findKey(s, l);
|
|
834
|
-
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || d] =
|
|
833
|
+
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || d] = se(a));
|
|
835
834
|
}
|
|
836
835
|
const i = (a, d) => c.forEach(a, (u, l) => o(u, l, d));
|
|
837
836
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
838
837
|
i(t, n);
|
|
839
|
-
else if (c.isString(t) && (t = t.trim()) &&
|
|
840
|
-
i(
|
|
838
|
+
else if (c.isString(t) && (t = t.trim()) && !$n(t))
|
|
839
|
+
i(jn(t), n);
|
|
841
840
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
842
841
|
let a = {}, d, u;
|
|
843
842
|
for (const l of t) {
|
|
@@ -851,14 +850,14 @@ let N = class {
|
|
|
851
850
|
return this;
|
|
852
851
|
}
|
|
853
852
|
get(t, n) {
|
|
854
|
-
if (t =
|
|
853
|
+
if (t = v(t), t) {
|
|
855
854
|
const r = c.findKey(this, t);
|
|
856
855
|
if (r) {
|
|
857
856
|
const s = this[r];
|
|
858
857
|
if (!n)
|
|
859
858
|
return s;
|
|
860
859
|
if (n === !0)
|
|
861
|
-
return
|
|
860
|
+
return Mn(s);
|
|
862
861
|
if (c.isFunction(n))
|
|
863
862
|
return n.call(this, s, r);
|
|
864
863
|
if (c.isRegExp(n))
|
|
@@ -868,7 +867,7 @@ let N = class {
|
|
|
868
867
|
}
|
|
869
868
|
}
|
|
870
869
|
has(t, n) {
|
|
871
|
-
if (t =
|
|
870
|
+
if (t = v(t), t) {
|
|
872
871
|
const r = c.findKey(this, t);
|
|
873
872
|
return !!(r && this[r] !== void 0 && (!n || me(this, this[r], r, n)));
|
|
874
873
|
}
|
|
@@ -878,7 +877,7 @@ let N = class {
|
|
|
878
877
|
const r = this;
|
|
879
878
|
let s = !1;
|
|
880
879
|
function o(i) {
|
|
881
|
-
if (i =
|
|
880
|
+
if (i = v(i), i) {
|
|
882
881
|
const a = c.findKey(r, i);
|
|
883
882
|
a && (!n || me(r, r[a], a, n)) && (delete r[a], s = !0);
|
|
884
883
|
}
|
|
@@ -899,11 +898,11 @@ let N = class {
|
|
|
899
898
|
return c.forEach(this, (s, o) => {
|
|
900
899
|
const i = c.findKey(r, o);
|
|
901
900
|
if (i) {
|
|
902
|
-
n[i] =
|
|
901
|
+
n[i] = se(s), delete n[o];
|
|
903
902
|
return;
|
|
904
903
|
}
|
|
905
|
-
const a = t ?
|
|
906
|
-
a !== o && delete n[o], n[a] =
|
|
904
|
+
const a = t ? qn(o) : String(o).trim();
|
|
905
|
+
a !== o && delete n[o], n[a] = se(s), r[a] = !0;
|
|
907
906
|
}), this;
|
|
908
907
|
}
|
|
909
908
|
concat(...t) {
|
|
@@ -936,12 +935,12 @@ let N = class {
|
|
|
936
935
|
return n.forEach((s) => r.set(s)), r;
|
|
937
936
|
}
|
|
938
937
|
static accessor(t) {
|
|
939
|
-
const r = (this[
|
|
938
|
+
const r = (this[je] = this[je] = {
|
|
940
939
|
accessors: {}
|
|
941
940
|
}).accessors, s = this.prototype;
|
|
942
941
|
function o(i) {
|
|
943
|
-
const a =
|
|
944
|
-
r[a] || (
|
|
942
|
+
const a = v(i);
|
|
943
|
+
r[a] || (Hn(s, i), r[a] = !0);
|
|
945
944
|
}
|
|
946
945
|
return c.isArray(t) ? t.forEach(o) : o(t), this;
|
|
947
946
|
}
|
|
@@ -957,17 +956,17 @@ c.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
|
957
956
|
};
|
|
958
957
|
});
|
|
959
958
|
c.freezeMethods(N);
|
|
960
|
-
function
|
|
961
|
-
const n = this ||
|
|
959
|
+
function he(e, t) {
|
|
960
|
+
const n = this || G, r = t || n, s = N.from(r.headers);
|
|
962
961
|
let o = r.data;
|
|
963
962
|
return c.forEach(e, function(a) {
|
|
964
963
|
o = a.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
965
964
|
}), s.normalize(), o;
|
|
966
965
|
}
|
|
967
|
-
function
|
|
966
|
+
function ht(e) {
|
|
968
967
|
return !!(e && e.__CANCEL__);
|
|
969
968
|
}
|
|
970
|
-
let
|
|
969
|
+
let Z = class extends w {
|
|
971
970
|
/**
|
|
972
971
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
973
972
|
*
|
|
@@ -981,7 +980,7 @@ let Q = class extends w {
|
|
|
981
980
|
super(t ?? "canceled", w.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
982
981
|
}
|
|
983
982
|
};
|
|
984
|
-
function
|
|
983
|
+
function yt(e, t, n) {
|
|
985
984
|
const r = n.config.validateStatus;
|
|
986
985
|
!n.status || !r || r(n.status) ? e(n) : t(new w(
|
|
987
986
|
"Request failed with status code " + n.status,
|
|
@@ -991,27 +990,27 @@ function wt(e, t, n) {
|
|
|
991
990
|
n
|
|
992
991
|
));
|
|
993
992
|
}
|
|
994
|
-
function
|
|
993
|
+
function zn(e) {
|
|
995
994
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
996
995
|
return t && t[1] || "";
|
|
997
996
|
}
|
|
998
|
-
function
|
|
997
|
+
function vn(e, t) {
|
|
999
998
|
e = e || 10;
|
|
1000
999
|
const n = new Array(e), r = new Array(e);
|
|
1001
1000
|
let s = 0, o = 0, i;
|
|
1002
1001
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1003
1002
|
const u = Date.now(), l = r[o];
|
|
1004
1003
|
i || (i = u), n[s] = d, r[s] = u;
|
|
1005
|
-
let p = o,
|
|
1004
|
+
let p = o, E = 0;
|
|
1006
1005
|
for (; p !== s; )
|
|
1007
|
-
|
|
1006
|
+
E += n[p++], p = p % e;
|
|
1008
1007
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
1009
1008
|
return;
|
|
1010
1009
|
const _ = l && u - l;
|
|
1011
|
-
return _ ? Math.round(
|
|
1010
|
+
return _ ? Math.round(E * 1e3 / _) : void 0;
|
|
1012
1011
|
};
|
|
1013
1012
|
}
|
|
1014
|
-
function
|
|
1013
|
+
function Jn(e, t) {
|
|
1015
1014
|
let n = 0, r = 1e3 / t, s, o;
|
|
1016
1015
|
const i = (u, l = Date.now()) => {
|
|
1017
1016
|
n = l, s = null, o && (clearTimeout(o), o = null), e(...u);
|
|
@@ -1023,10 +1022,10 @@ function Kn(e, t) {
|
|
|
1023
1022
|
}, r - p)));
|
|
1024
1023
|
}, () => s && i(s)];
|
|
1025
1024
|
}
|
|
1026
|
-
const
|
|
1025
|
+
const ie = (e, t, n = 3) => {
|
|
1027
1026
|
let r = 0;
|
|
1028
|
-
const s =
|
|
1029
|
-
return
|
|
1027
|
+
const s = vn(50, 250);
|
|
1028
|
+
return Jn((o) => {
|
|
1030
1029
|
const i = o.loaded, a = o.lengthComputable ? o.total : void 0, d = i - r, u = s(d), l = i <= a;
|
|
1031
1030
|
r = i;
|
|
1032
1031
|
const p = {
|
|
@@ -1042,17 +1041,17 @@ const ae = (e, t, n = 3) => {
|
|
|
1042
1041
|
};
|
|
1043
1042
|
e(p);
|
|
1044
1043
|
}, n);
|
|
1045
|
-
},
|
|
1044
|
+
}, Me = (e, t) => {
|
|
1046
1045
|
const n = e != null;
|
|
1047
1046
|
return [(r) => t[0]({
|
|
1048
1047
|
lengthComputable: n,
|
|
1049
1048
|
total: e,
|
|
1050
1049
|
loaded: r
|
|
1051
1050
|
}), t[1]];
|
|
1052
|
-
},
|
|
1051
|
+
}, $e = (e) => (...t) => c.asap(() => e(...t)), Vn = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, A.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1053
1052
|
new URL(A.origin),
|
|
1054
1053
|
A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
|
|
1055
|
-
) : () => !0,
|
|
1054
|
+
) : () => !0, Kn = A.hasStandardBrowserEnv ? (
|
|
1056
1055
|
// Standard browser envs support document.cookie
|
|
1057
1056
|
{
|
|
1058
1057
|
write(e, t, n, r, s, o, i) {
|
|
@@ -1081,28 +1080,28 @@ const ae = (e, t, n = 3) => {
|
|
|
1081
1080
|
}
|
|
1082
1081
|
}
|
|
1083
1082
|
);
|
|
1084
|
-
function
|
|
1083
|
+
function Wn(e) {
|
|
1085
1084
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1086
1085
|
}
|
|
1087
|
-
function
|
|
1086
|
+
function Xn(e, t) {
|
|
1088
1087
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1089
1088
|
}
|
|
1090
|
-
function
|
|
1091
|
-
let r = !
|
|
1092
|
-
return e && (r || n == !1) ?
|
|
1089
|
+
function wt(e, t, n) {
|
|
1090
|
+
let r = !Wn(t);
|
|
1091
|
+
return e && (r || n == !1) ? Xn(e, t) : t;
|
|
1093
1092
|
}
|
|
1094
|
-
const
|
|
1095
|
-
function
|
|
1093
|
+
const qe = (e) => e instanceof N ? { ...e } : e;
|
|
1094
|
+
function M(e, t) {
|
|
1096
1095
|
t = t || {};
|
|
1097
1096
|
const n = {};
|
|
1098
|
-
function r(u, l, p,
|
|
1099
|
-
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless:
|
|
1097
|
+
function r(u, l, p, E) {
|
|
1098
|
+
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: E }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
1100
1099
|
}
|
|
1101
|
-
function s(u, l, p,
|
|
1100
|
+
function s(u, l, p, E) {
|
|
1102
1101
|
if (c.isUndefined(l)) {
|
|
1103
1102
|
if (!c.isUndefined(u))
|
|
1104
|
-
return r(void 0, u, p,
|
|
1105
|
-
} else return r(u, l, p,
|
|
1103
|
+
return r(void 0, u, p, E);
|
|
1104
|
+
} else return r(u, l, p, E);
|
|
1106
1105
|
}
|
|
1107
1106
|
function o(u, l) {
|
|
1108
1107
|
if (!c.isUndefined(l))
|
|
@@ -1149,17 +1148,17 @@ function $(e, t) {
|
|
|
1149
1148
|
socketPath: i,
|
|
1150
1149
|
responseEncoding: i,
|
|
1151
1150
|
validateStatus: a,
|
|
1152
|
-
headers: (u, l, p) => s(
|
|
1151
|
+
headers: (u, l, p) => s(qe(u), qe(l), p, !0)
|
|
1153
1152
|
};
|
|
1154
1153
|
return c.forEach(Object.keys({ ...e, ...t }), function(l) {
|
|
1155
|
-
const p = d[l] || s,
|
|
1156
|
-
c.isUndefined(
|
|
1154
|
+
const p = d[l] || s, E = p(e[l], t[l], l);
|
|
1155
|
+
c.isUndefined(E) && p !== a || (n[l] = E);
|
|
1157
1156
|
}), n;
|
|
1158
1157
|
}
|
|
1159
|
-
const
|
|
1160
|
-
const t =
|
|
1158
|
+
const Et = (e) => {
|
|
1159
|
+
const t = M({}, e);
|
|
1161
1160
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = t;
|
|
1162
|
-
if (t.headers = i = N.from(i), t.url =
|
|
1161
|
+
if (t.headers = i = N.from(i), t.url = dt(wt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1163
1162
|
"Authorization",
|
|
1164
1163
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1165
1164
|
), c.isFormData(n)) {
|
|
@@ -1173,69 +1172,69 @@ const gt = (e) => {
|
|
|
1173
1172
|
}
|
|
1174
1173
|
}
|
|
1175
1174
|
if (A.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && Vn(t.url))) {
|
|
1176
|
-
const d = s && o &&
|
|
1175
|
+
const d = s && o && Kn.read(o);
|
|
1177
1176
|
d && i.set(s, d);
|
|
1178
1177
|
}
|
|
1179
1178
|
return t;
|
|
1180
|
-
},
|
|
1179
|
+
}, Gn = typeof XMLHttpRequest < "u", Zn = Gn && function(e) {
|
|
1181
1180
|
return new Promise(function(n, r) {
|
|
1182
|
-
const s =
|
|
1181
|
+
const s = Et(e);
|
|
1183
1182
|
let o = s.data;
|
|
1184
1183
|
const i = N.from(s.headers).normalize();
|
|
1185
|
-
let { responseType: a, onUploadProgress: d, onDownloadProgress: u } = s, l, p,
|
|
1186
|
-
function
|
|
1184
|
+
let { responseType: a, onUploadProgress: d, onDownloadProgress: u } = s, l, p, E, _, f;
|
|
1185
|
+
function h() {
|
|
1187
1186
|
_ && _(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1188
1187
|
}
|
|
1189
|
-
let
|
|
1190
|
-
|
|
1188
|
+
let m = new XMLHttpRequest();
|
|
1189
|
+
m.open(s.method.toUpperCase(), s.url, !0), m.timeout = s.timeout;
|
|
1191
1190
|
function g() {
|
|
1192
|
-
if (!
|
|
1191
|
+
if (!m)
|
|
1193
1192
|
return;
|
|
1194
1193
|
const y = N.from(
|
|
1195
|
-
"getAllResponseHeaders" in
|
|
1194
|
+
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1196
1195
|
), T = {
|
|
1197
|
-
data: !a || a === "text" || a === "json" ?
|
|
1198
|
-
status:
|
|
1199
|
-
statusText:
|
|
1196
|
+
data: !a || a === "text" || a === "json" ? m.responseText : m.response,
|
|
1197
|
+
status: m.status,
|
|
1198
|
+
statusText: m.statusText,
|
|
1200
1199
|
headers: y,
|
|
1201
1200
|
config: e,
|
|
1202
|
-
request:
|
|
1201
|
+
request: m
|
|
1203
1202
|
};
|
|
1204
|
-
|
|
1205
|
-
n(
|
|
1206
|
-
}, function(
|
|
1207
|
-
r(
|
|
1208
|
-
}, T),
|
|
1203
|
+
yt(function(x) {
|
|
1204
|
+
n(x), h();
|
|
1205
|
+
}, function(x) {
|
|
1206
|
+
r(x), h();
|
|
1207
|
+
}, T), m = null;
|
|
1209
1208
|
}
|
|
1210
|
-
"onloadend" in
|
|
1211
|
-
!
|
|
1212
|
-
},
|
|
1213
|
-
|
|
1214
|
-
},
|
|
1215
|
-
const T =
|
|
1216
|
-
|
|
1217
|
-
},
|
|
1218
|
-
let
|
|
1219
|
-
const T = s.transitional ||
|
|
1220
|
-
s.timeoutErrorMessage && (
|
|
1221
|
-
|
|
1209
|
+
"onloadend" in m ? m.onloadend = g : m.onreadystatechange = function() {
|
|
1210
|
+
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1211
|
+
}, m.onabort = function() {
|
|
1212
|
+
m && (r(new w("Request aborted", w.ECONNABORTED, e, m)), m = null);
|
|
1213
|
+
}, m.onerror = function(S) {
|
|
1214
|
+
const T = S && S.message ? S.message : "Network Error", U = new w(T, w.ERR_NETWORK, e, m);
|
|
1215
|
+
U.event = S || null, r(U), m = null;
|
|
1216
|
+
}, m.ontimeout = function() {
|
|
1217
|
+
let S = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1218
|
+
const T = s.transitional || pt;
|
|
1219
|
+
s.timeoutErrorMessage && (S = s.timeoutErrorMessage), r(new w(
|
|
1220
|
+
S,
|
|
1222
1221
|
T.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
|
1223
1222
|
e,
|
|
1224
|
-
|
|
1225
|
-
)),
|
|
1226
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1227
|
-
|
|
1228
|
-
}), c.isUndefined(s.withCredentials) || (
|
|
1229
|
-
|
|
1223
|
+
m
|
|
1224
|
+
)), m = null;
|
|
1225
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in m && c.forEach(i.toJSON(), function(S, T) {
|
|
1226
|
+
m.setRequestHeader(T, S);
|
|
1227
|
+
}), c.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), a && a !== "json" && (m.responseType = s.responseType), u && ([E, f] = ie(u, !0), m.addEventListener("progress", E)), d && m.upload && ([p, _] = ie(d), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", _)), (s.cancelToken || s.signal) && (l = (y) => {
|
|
1228
|
+
m && (r(!y || y.type ? new Z(null, e, m) : y), m.abort(), m = null);
|
|
1230
1229
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1231
|
-
const R =
|
|
1230
|
+
const R = zn(s.url);
|
|
1232
1231
|
if (R && A.protocols.indexOf(R) === -1) {
|
|
1233
1232
|
r(new w("Unsupported protocol " + R + ":", w.ERR_BAD_REQUEST, e));
|
|
1234
1233
|
return;
|
|
1235
1234
|
}
|
|
1236
|
-
|
|
1235
|
+
m.send(o || null);
|
|
1237
1236
|
});
|
|
1238
|
-
},
|
|
1237
|
+
}, Qn = (e, t) => {
|
|
1239
1238
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1240
1239
|
if (t || n) {
|
|
1241
1240
|
let r = new AbortController(), s;
|
|
@@ -1243,7 +1242,7 @@ const gt = (e) => {
|
|
|
1243
1242
|
if (!s) {
|
|
1244
1243
|
s = !0, a();
|
|
1245
1244
|
const l = u instanceof Error ? u : this.reason;
|
|
1246
|
-
r.abort(l instanceof w ? l : new
|
|
1245
|
+
r.abort(l instanceof w ? l : new Z(l instanceof Error ? l.message : l));
|
|
1247
1246
|
}
|
|
1248
1247
|
};
|
|
1249
1248
|
let i = t && setTimeout(() => {
|
|
@@ -1258,7 +1257,7 @@ const gt = (e) => {
|
|
|
1258
1257
|
const { signal: d } = r;
|
|
1259
1258
|
return d.unsubscribe = () => c.asap(a), d;
|
|
1260
1259
|
}
|
|
1261
|
-
},
|
|
1260
|
+
}, Yn = function* (e, t) {
|
|
1262
1261
|
let n = e.byteLength;
|
|
1263
1262
|
if (n < t) {
|
|
1264
1263
|
yield e;
|
|
@@ -1267,10 +1266,10 @@ const gt = (e) => {
|
|
|
1267
1266
|
let r = 0, s;
|
|
1268
1267
|
for (; r < n; )
|
|
1269
1268
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1270
|
-
},
|
|
1271
|
-
for await (const n of
|
|
1272
|
-
yield*
|
|
1273
|
-
},
|
|
1269
|
+
}, er = async function* (e, t) {
|
|
1270
|
+
for await (const n of tr(e))
|
|
1271
|
+
yield* Yn(n, t);
|
|
1272
|
+
}, tr = async function* (e) {
|
|
1274
1273
|
if (e[Symbol.asyncIterator]) {
|
|
1275
1274
|
yield* e;
|
|
1276
1275
|
return;
|
|
@@ -1286,8 +1285,8 @@ const gt = (e) => {
|
|
|
1286
1285
|
} finally {
|
|
1287
1286
|
await t.cancel();
|
|
1288
1287
|
}
|
|
1289
|
-
},
|
|
1290
|
-
const s =
|
|
1288
|
+
}, He = (e, t, n, r) => {
|
|
1289
|
+
const s = er(e, t);
|
|
1291
1290
|
let o = 0, i, a = (d) => {
|
|
1292
1291
|
i || (i = !0, r && r(d));
|
|
1293
1292
|
};
|
|
@@ -1301,8 +1300,8 @@ const gt = (e) => {
|
|
|
1301
1300
|
}
|
|
1302
1301
|
let p = l.byteLength;
|
|
1303
1302
|
if (n) {
|
|
1304
|
-
let
|
|
1305
|
-
n(
|
|
1303
|
+
let E = o += p;
|
|
1304
|
+
n(E);
|
|
1306
1305
|
}
|
|
1307
1306
|
d.enqueue(new Uint8Array(l));
|
|
1308
1307
|
} catch (u) {
|
|
@@ -1315,47 +1314,47 @@ const gt = (e) => {
|
|
|
1315
1314
|
}, {
|
|
1316
1315
|
highWaterMark: 2
|
|
1317
1316
|
});
|
|
1318
|
-
},
|
|
1317
|
+
}, ze = 64 * 1024, { isFunction: ne } = c, nr = (({ Request: e, Response: t }) => ({
|
|
1319
1318
|
Request: e,
|
|
1320
1319
|
Response: t
|
|
1321
1320
|
}))(c.global), {
|
|
1322
|
-
ReadableStream:
|
|
1323
|
-
TextEncoder:
|
|
1321
|
+
ReadableStream: ve,
|
|
1322
|
+
TextEncoder: Je
|
|
1324
1323
|
} = c.global, Ve = (e, ...t) => {
|
|
1325
1324
|
try {
|
|
1326
1325
|
return !!e(...t);
|
|
1327
1326
|
} catch {
|
|
1328
1327
|
return !1;
|
|
1329
1328
|
}
|
|
1330
|
-
},
|
|
1329
|
+
}, rr = (e) => {
|
|
1331
1330
|
e = c.merge.call({
|
|
1332
1331
|
skipUndefined: !0
|
|
1333
|
-
},
|
|
1334
|
-
const { fetch: t, Request: n, Response: r } = e, s = t ?
|
|
1332
|
+
}, nr, e);
|
|
1333
|
+
const { fetch: t, Request: n, Response: r } = e, s = t ? ne(t) : typeof fetch == "function", o = ne(n), i = ne(r);
|
|
1335
1334
|
if (!s)
|
|
1336
1335
|
return !1;
|
|
1337
|
-
const a = s &&
|
|
1336
|
+
const a = s && ne(ve), d = s && (typeof Je == "function" ? /* @__PURE__ */ ((f) => (h) => f.encode(h))(new Je()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), u = o && a && Ve(() => {
|
|
1338
1337
|
let f = !1;
|
|
1339
|
-
const
|
|
1340
|
-
body: new
|
|
1338
|
+
const h = new n(A.origin, {
|
|
1339
|
+
body: new ve(),
|
|
1341
1340
|
method: "POST",
|
|
1342
1341
|
get duplex() {
|
|
1343
1342
|
return f = !0, "half";
|
|
1344
1343
|
}
|
|
1345
1344
|
}).headers.has("Content-Type");
|
|
1346
|
-
return f && !
|
|
1345
|
+
return f && !h;
|
|
1347
1346
|
}), l = i && a && Ve(() => c.isReadableStream(new r("").body)), p = {
|
|
1348
1347
|
stream: l && ((f) => f.body)
|
|
1349
1348
|
};
|
|
1350
1349
|
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1351
|
-
!p[f] && (p[f] = (
|
|
1352
|
-
let g =
|
|
1350
|
+
!p[f] && (p[f] = (h, m) => {
|
|
1351
|
+
let g = h && h[f];
|
|
1353
1352
|
if (g)
|
|
1354
|
-
return g.call(
|
|
1355
|
-
throw new w(`Response type '${f}' is not supported`, w.ERR_NOT_SUPPORT,
|
|
1353
|
+
return g.call(h);
|
|
1354
|
+
throw new w(`Response type '${f}' is not supported`, w.ERR_NOT_SUPPORT, m);
|
|
1356
1355
|
});
|
|
1357
1356
|
});
|
|
1358
|
-
const
|
|
1357
|
+
const E = async (f) => {
|
|
1359
1358
|
if (f == null)
|
|
1360
1359
|
return 0;
|
|
1361
1360
|
if (c.isBlob(f))
|
|
@@ -1369,117 +1368,117 @@ const gt = (e) => {
|
|
|
1369
1368
|
return f.byteLength;
|
|
1370
1369
|
if (c.isURLSearchParams(f) && (f = f + ""), c.isString(f))
|
|
1371
1370
|
return (await d(f)).byteLength;
|
|
1372
|
-
}, _ = async (f,
|
|
1373
|
-
const
|
|
1374
|
-
return
|
|
1371
|
+
}, _ = async (f, h) => {
|
|
1372
|
+
const m = c.toFiniteNumber(f.getContentLength());
|
|
1373
|
+
return m ?? E(h);
|
|
1375
1374
|
};
|
|
1376
1375
|
return async (f) => {
|
|
1377
1376
|
let {
|
|
1378
|
-
url:
|
|
1379
|
-
method:
|
|
1377
|
+
url: h,
|
|
1378
|
+
method: m,
|
|
1380
1379
|
data: g,
|
|
1381
1380
|
signal: R,
|
|
1382
1381
|
cancelToken: y,
|
|
1383
|
-
timeout:
|
|
1382
|
+
timeout: S,
|
|
1384
1383
|
onDownloadProgress: T,
|
|
1385
|
-
onUploadProgress:
|
|
1386
|
-
responseType:
|
|
1387
|
-
headers:
|
|
1388
|
-
withCredentials:
|
|
1389
|
-
fetchOptions:
|
|
1390
|
-
} =
|
|
1391
|
-
|
|
1392
|
-
let
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1384
|
+
onUploadProgress: U,
|
|
1385
|
+
responseType: x,
|
|
1386
|
+
headers: de,
|
|
1387
|
+
withCredentials: Q = "same-origin",
|
|
1388
|
+
fetchOptions: Ce
|
|
1389
|
+
} = Et(f), Ne = t || fetch;
|
|
1390
|
+
x = x ? (x + "").toLowerCase() : "text";
|
|
1391
|
+
let Y = Qn([R, y && y.toAbortSignal()], S), z = null;
|
|
1392
|
+
const B = Y && Y.unsubscribe && (() => {
|
|
1393
|
+
Y.unsubscribe();
|
|
1395
1394
|
});
|
|
1396
|
-
let
|
|
1395
|
+
let xe;
|
|
1397
1396
|
try {
|
|
1398
|
-
if (
|
|
1399
|
-
let
|
|
1397
|
+
if (U && u && m !== "get" && m !== "head" && (xe = await _(de, g)) !== 0) {
|
|
1398
|
+
let k = new n(h, {
|
|
1400
1399
|
method: "POST",
|
|
1401
1400
|
body: g,
|
|
1402
1401
|
duplex: "half"
|
|
1403
|
-
}),
|
|
1404
|
-
if (c.isFormData(g) && (
|
|
1405
|
-
const [
|
|
1406
|
-
|
|
1407
|
-
|
|
1402
|
+
}), $;
|
|
1403
|
+
if (c.isFormData(g) && ($ = k.headers.get("content-type")) && de.setContentType($), k.body) {
|
|
1404
|
+
const [pe, ee] = Me(
|
|
1405
|
+
xe,
|
|
1406
|
+
ie($e(U))
|
|
1408
1407
|
);
|
|
1409
|
-
g =
|
|
1408
|
+
g = He(k.body, ze, pe, ee);
|
|
1410
1409
|
}
|
|
1411
1410
|
}
|
|
1412
|
-
c.isString(
|
|
1413
|
-
const
|
|
1414
|
-
...
|
|
1415
|
-
signal:
|
|
1416
|
-
method:
|
|
1417
|
-
headers:
|
|
1411
|
+
c.isString(Q) || (Q = Q ? "include" : "omit");
|
|
1412
|
+
const D = o && "credentials" in n.prototype, Pe = {
|
|
1413
|
+
...Ce,
|
|
1414
|
+
signal: Y,
|
|
1415
|
+
method: m.toUpperCase(),
|
|
1416
|
+
headers: de.normalize().toJSON(),
|
|
1418
1417
|
body: g,
|
|
1419
1418
|
duplex: "half",
|
|
1420
|
-
credentials:
|
|
1419
|
+
credentials: D ? Q : void 0
|
|
1421
1420
|
};
|
|
1422
|
-
|
|
1423
|
-
let
|
|
1424
|
-
const
|
|
1425
|
-
if (l && (T ||
|
|
1426
|
-
const
|
|
1427
|
-
["status", "statusText", "headers"].forEach((
|
|
1428
|
-
|
|
1421
|
+
z = o && new n(h, Pe);
|
|
1422
|
+
let L = await (o ? Ne(z, Ce) : Ne(h, Pe));
|
|
1423
|
+
const De = l && (x === "stream" || x === "response");
|
|
1424
|
+
if (l && (T || De && B)) {
|
|
1425
|
+
const k = {};
|
|
1426
|
+
["status", "statusText", "headers"].forEach((Fe) => {
|
|
1427
|
+
k[Fe] = L[Fe];
|
|
1429
1428
|
});
|
|
1430
|
-
const
|
|
1431
|
-
|
|
1432
|
-
|
|
1429
|
+
const $ = c.toFiniteNumber(L.headers.get("content-length")), [pe, ee] = T && Me(
|
|
1430
|
+
$,
|
|
1431
|
+
ie($e(T), !0)
|
|
1433
1432
|
) || [];
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1433
|
+
L = new r(
|
|
1434
|
+
He(L.body, ze, pe, () => {
|
|
1435
|
+
ee && ee(), B && B();
|
|
1437
1436
|
}),
|
|
1438
|
-
|
|
1437
|
+
k
|
|
1439
1438
|
);
|
|
1440
1439
|
}
|
|
1441
|
-
|
|
1442
|
-
let
|
|
1443
|
-
return !
|
|
1444
|
-
|
|
1445
|
-
data:
|
|
1446
|
-
headers: N.from(
|
|
1447
|
-
status:
|
|
1448
|
-
statusText:
|
|
1440
|
+
x = x || "text";
|
|
1441
|
+
let _t = await p[c.findKey(p, x) || "text"](L, f);
|
|
1442
|
+
return !De && B && B(), await new Promise((k, $) => {
|
|
1443
|
+
yt(k, $, {
|
|
1444
|
+
data: _t,
|
|
1445
|
+
headers: N.from(L.headers),
|
|
1446
|
+
status: L.status,
|
|
1447
|
+
statusText: L.statusText,
|
|
1449
1448
|
config: f,
|
|
1450
|
-
request:
|
|
1449
|
+
request: z
|
|
1451
1450
|
});
|
|
1452
1451
|
});
|
|
1453
|
-
} catch (
|
|
1454
|
-
throw
|
|
1455
|
-
new w("Network Error", w.ERR_NETWORK, f,
|
|
1452
|
+
} catch (D) {
|
|
1453
|
+
throw B && B(), D && D.name === "TypeError" && /Load failed|fetch/i.test(D.message) ? Object.assign(
|
|
1454
|
+
new w("Network Error", w.ERR_NETWORK, f, z),
|
|
1456
1455
|
{
|
|
1457
|
-
cause:
|
|
1456
|
+
cause: D.cause || D
|
|
1458
1457
|
}
|
|
1459
|
-
) : w.from(
|
|
1458
|
+
) : w.from(D, D && D.code, f, z);
|
|
1460
1459
|
}
|
|
1461
1460
|
};
|
|
1462
|
-
},
|
|
1461
|
+
}, sr = /* @__PURE__ */ new Map(), bt = (e) => {
|
|
1463
1462
|
let t = e && e.env || {};
|
|
1464
1463
|
const { fetch: n, Request: r, Response: s } = t, o = [
|
|
1465
1464
|
r,
|
|
1466
1465
|
s,
|
|
1467
1466
|
n
|
|
1468
1467
|
];
|
|
1469
|
-
let i = o.length, a = i, d, u, l =
|
|
1468
|
+
let i = o.length, a = i, d, u, l = sr;
|
|
1470
1469
|
for (; a--; )
|
|
1471
|
-
d = o[a], u = l.get(d), u === void 0 && l.set(d, u = a ? /* @__PURE__ */ new Map() :
|
|
1470
|
+
d = o[a], u = l.get(d), u === void 0 && l.set(d, u = a ? /* @__PURE__ */ new Map() : rr(t)), l = u;
|
|
1472
1471
|
return u;
|
|
1473
1472
|
};
|
|
1474
|
-
|
|
1475
|
-
const
|
|
1476
|
-
http:
|
|
1477
|
-
xhr:
|
|
1473
|
+
bt();
|
|
1474
|
+
const Te = {
|
|
1475
|
+
http: Sn,
|
|
1476
|
+
xhr: Zn,
|
|
1478
1477
|
fetch: {
|
|
1479
|
-
get:
|
|
1478
|
+
get: bt
|
|
1480
1479
|
}
|
|
1481
1480
|
};
|
|
1482
|
-
c.forEach(
|
|
1481
|
+
c.forEach(Te, (e, t) => {
|
|
1483
1482
|
if (e) {
|
|
1484
1483
|
try {
|
|
1485
1484
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1488,8 +1487,8 @@ c.forEach(Ce, (e, t) => {
|
|
|
1488
1487
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1489
1488
|
}
|
|
1490
1489
|
});
|
|
1491
|
-
const
|
|
1492
|
-
function
|
|
1490
|
+
const Ke = (e) => `- ${e}`, or = (e) => c.isFunction(e) || e === null || e === !1;
|
|
1491
|
+
function ir(e, t) {
|
|
1493
1492
|
e = c.isArray(e) ? e : [e];
|
|
1494
1493
|
const { length: n } = e;
|
|
1495
1494
|
let r, s;
|
|
@@ -1497,7 +1496,7 @@ function ar(e, t) {
|
|
|
1497
1496
|
for (let i = 0; i < n; i++) {
|
|
1498
1497
|
r = e[i];
|
|
1499
1498
|
let a;
|
|
1500
|
-
if (s = r, !
|
|
1499
|
+
if (s = r, !or(r) && (s = Te[(a = String(r)).toLowerCase()], s === void 0))
|
|
1501
1500
|
throw new w(`Unknown adapter '${a}'`);
|
|
1502
1501
|
if (s && (c.isFunction(s) || (s = s.get(t))))
|
|
1503
1502
|
break;
|
|
@@ -1508,8 +1507,8 @@ function ar(e, t) {
|
|
|
1508
1507
|
([d, u]) => `adapter ${d} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1509
1508
|
);
|
|
1510
1509
|
let a = n ? i.length > 1 ? `since :
|
|
1511
|
-
` + i.map(
|
|
1512
|
-
`) : " " +
|
|
1510
|
+
` + i.map(Ke).join(`
|
|
1511
|
+
`) : " " + Ke(i[0]) : "as no adapter specified";
|
|
1513
1512
|
throw new w(
|
|
1514
1513
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1515
1514
|
"ERR_NOT_SUPPORT"
|
|
@@ -1517,50 +1516,50 @@ function ar(e, t) {
|
|
|
1517
1516
|
}
|
|
1518
1517
|
return s;
|
|
1519
1518
|
}
|
|
1520
|
-
const
|
|
1519
|
+
const gt = {
|
|
1521
1520
|
/**
|
|
1522
1521
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1523
1522
|
* @type {Function}
|
|
1524
1523
|
*/
|
|
1525
|
-
getAdapter:
|
|
1524
|
+
getAdapter: ir,
|
|
1526
1525
|
/**
|
|
1527
1526
|
* Exposes all known adapters
|
|
1528
1527
|
* @type {Object<string, Function|Object>}
|
|
1529
1528
|
*/
|
|
1530
|
-
adapters:
|
|
1529
|
+
adapters: Te
|
|
1531
1530
|
};
|
|
1532
|
-
function
|
|
1531
|
+
function ye(e) {
|
|
1533
1532
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1534
|
-
throw new
|
|
1533
|
+
throw new Z(null, e);
|
|
1535
1534
|
}
|
|
1536
|
-
function
|
|
1537
|
-
return
|
|
1535
|
+
function We(e) {
|
|
1536
|
+
return ye(e), e.headers = N.from(e.headers), e.data = he.call(
|
|
1538
1537
|
e,
|
|
1539
1538
|
e.transformRequest
|
|
1540
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1541
|
-
return
|
|
1539
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gt.getAdapter(e.adapter || G.adapter, e)(e).then(function(r) {
|
|
1540
|
+
return ye(e), r.data = he.call(
|
|
1542
1541
|
e,
|
|
1543
1542
|
e.transformResponse,
|
|
1544
1543
|
r
|
|
1545
1544
|
), r.headers = N.from(r.headers), r;
|
|
1546
1545
|
}, function(r) {
|
|
1547
|
-
return
|
|
1546
|
+
return ht(r) || (ye(e), r && r.response && (r.response.data = he.call(
|
|
1548
1547
|
e,
|
|
1549
1548
|
e.transformResponse,
|
|
1550
1549
|
r.response
|
|
1551
1550
|
), r.response.headers = N.from(r.response.headers))), Promise.reject(r);
|
|
1552
1551
|
});
|
|
1553
1552
|
}
|
|
1554
|
-
const
|
|
1553
|
+
const St = "1.13.4", fe = {};
|
|
1555
1554
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1556
|
-
|
|
1555
|
+
fe[e] = function(r) {
|
|
1557
1556
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1558
1557
|
};
|
|
1559
1558
|
});
|
|
1560
|
-
const
|
|
1561
|
-
|
|
1559
|
+
const Xe = {};
|
|
1560
|
+
fe.transitional = function(t, n, r) {
|
|
1562
1561
|
function s(o, i) {
|
|
1563
|
-
return "[Axios v" +
|
|
1562
|
+
return "[Axios v" + St + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1564
1563
|
}
|
|
1565
1564
|
return (o, i, a) => {
|
|
1566
1565
|
if (t === !1)
|
|
@@ -1568,7 +1567,7 @@ de.transitional = function(t, n, r) {
|
|
|
1568
1567
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1569
1568
|
w.ERR_DEPRECATED
|
|
1570
1569
|
);
|
|
1571
|
-
return n && !
|
|
1570
|
+
return n && !Xe[i] && (Xe[i] = !0, console.warn(
|
|
1572
1571
|
s(
|
|
1573
1572
|
i,
|
|
1574
1573
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1576,10 +1575,10 @@ de.transitional = function(t, n, r) {
|
|
|
1576
1575
|
)), t ? t(o, i, a) : !0;
|
|
1577
1576
|
};
|
|
1578
1577
|
};
|
|
1579
|
-
|
|
1578
|
+
fe.spelling = function(t) {
|
|
1580
1579
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1581
1580
|
};
|
|
1582
|
-
function
|
|
1581
|
+
function ar(e, t, n) {
|
|
1583
1582
|
if (typeof e != "object")
|
|
1584
1583
|
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
1585
1584
|
const r = Object.keys(e);
|
|
@@ -1596,15 +1595,15 @@ function cr(e, t, n) {
|
|
|
1596
1595
|
throw new w("Unknown option " + o, w.ERR_BAD_OPTION);
|
|
1597
1596
|
}
|
|
1598
1597
|
}
|
|
1599
|
-
const
|
|
1600
|
-
assertOptions:
|
|
1601
|
-
validators:
|
|
1602
|
-
},
|
|
1603
|
-
let
|
|
1598
|
+
const oe = {
|
|
1599
|
+
assertOptions: ar,
|
|
1600
|
+
validators: fe
|
|
1601
|
+
}, F = oe.validators;
|
|
1602
|
+
let j = class {
|
|
1604
1603
|
constructor(t) {
|
|
1605
1604
|
this.defaults = t || {}, this.interceptors = {
|
|
1606
|
-
request: new
|
|
1607
|
-
response: new
|
|
1605
|
+
request: new Ie(),
|
|
1606
|
+
response: new Ie()
|
|
1608
1607
|
};
|
|
1609
1608
|
}
|
|
1610
1609
|
/**
|
|
@@ -1633,20 +1632,20 @@ let M = class {
|
|
|
1633
1632
|
}
|
|
1634
1633
|
}
|
|
1635
1634
|
_request(t, n) {
|
|
1636
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1635
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = M(this.defaults, n);
|
|
1637
1636
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1638
|
-
r !== void 0 &&
|
|
1639
|
-
silentJSONParsing:
|
|
1640
|
-
forcedJSONParsing:
|
|
1641
|
-
clarifyTimeoutError:
|
|
1637
|
+
r !== void 0 && oe.assertOptions(r, {
|
|
1638
|
+
silentJSONParsing: F.transitional(F.boolean),
|
|
1639
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
|
1640
|
+
clarifyTimeoutError: F.transitional(F.boolean)
|
|
1642
1641
|
}, !1), s != null && (c.isFunction(s) ? n.paramsSerializer = {
|
|
1643
1642
|
serialize: s
|
|
1644
|
-
} :
|
|
1645
|
-
encode:
|
|
1646
|
-
serialize:
|
|
1647
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1648
|
-
baseUrl:
|
|
1649
|
-
withXsrfToken:
|
|
1643
|
+
} : oe.assertOptions(s, {
|
|
1644
|
+
encode: F.function,
|
|
1645
|
+
serialize: F.function
|
|
1646
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), oe.assertOptions(n, {
|
|
1647
|
+
baseUrl: F.spelling("baseURL"),
|
|
1648
|
+
withXsrfToken: F.spelling("withXSRFToken")
|
|
1650
1649
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1651
1650
|
let i = o && c.merge(
|
|
1652
1651
|
o.common,
|
|
@@ -1660,49 +1659,49 @@ let M = class {
|
|
|
1660
1659
|
), n.headers = N.concat(i, o);
|
|
1661
1660
|
const a = [];
|
|
1662
1661
|
let d = !0;
|
|
1663
|
-
this.interceptors.request.forEach(function(
|
|
1664
|
-
typeof
|
|
1662
|
+
this.interceptors.request.forEach(function(h) {
|
|
1663
|
+
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (d = d && h.synchronous, a.unshift(h.fulfilled, h.rejected));
|
|
1665
1664
|
});
|
|
1666
1665
|
const u = [];
|
|
1667
|
-
this.interceptors.response.forEach(function(
|
|
1668
|
-
u.push(
|
|
1666
|
+
this.interceptors.response.forEach(function(h) {
|
|
1667
|
+
u.push(h.fulfilled, h.rejected);
|
|
1669
1668
|
});
|
|
1670
|
-
let l, p = 0,
|
|
1669
|
+
let l, p = 0, E;
|
|
1671
1670
|
if (!d) {
|
|
1672
|
-
const f = [
|
|
1673
|
-
for (f.unshift(...a), f.push(...u),
|
|
1671
|
+
const f = [We.bind(this), void 0];
|
|
1672
|
+
for (f.unshift(...a), f.push(...u), E = f.length, l = Promise.resolve(n); p < E; )
|
|
1674
1673
|
l = l.then(f[p++], f[p++]);
|
|
1675
1674
|
return l;
|
|
1676
1675
|
}
|
|
1677
|
-
|
|
1676
|
+
E = a.length;
|
|
1678
1677
|
let _ = n;
|
|
1679
|
-
for (; p <
|
|
1680
|
-
const f = a[p++],
|
|
1678
|
+
for (; p < E; ) {
|
|
1679
|
+
const f = a[p++], h = a[p++];
|
|
1681
1680
|
try {
|
|
1682
1681
|
_ = f(_);
|
|
1683
|
-
} catch (
|
|
1684
|
-
|
|
1682
|
+
} catch (m) {
|
|
1683
|
+
h.call(this, m);
|
|
1685
1684
|
break;
|
|
1686
1685
|
}
|
|
1687
1686
|
}
|
|
1688
1687
|
try {
|
|
1689
|
-
l =
|
|
1688
|
+
l = We.call(this, _);
|
|
1690
1689
|
} catch (f) {
|
|
1691
1690
|
return Promise.reject(f);
|
|
1692
1691
|
}
|
|
1693
|
-
for (p = 0,
|
|
1692
|
+
for (p = 0, E = u.length; p < E; )
|
|
1694
1693
|
l = l.then(u[p++], u[p++]);
|
|
1695
1694
|
return l;
|
|
1696
1695
|
}
|
|
1697
1696
|
getUri(t) {
|
|
1698
|
-
t =
|
|
1699
|
-
const n =
|
|
1700
|
-
return
|
|
1697
|
+
t = M(this.defaults, t);
|
|
1698
|
+
const n = wt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1699
|
+
return dt(n, t.params, t.paramsSerializer);
|
|
1701
1700
|
}
|
|
1702
1701
|
};
|
|
1703
1702
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1704
|
-
|
|
1705
|
-
return this.request(
|
|
1703
|
+
j.prototype[t] = function(n, r) {
|
|
1704
|
+
return this.request(M(r || {}, {
|
|
1706
1705
|
method: t,
|
|
1707
1706
|
url: n,
|
|
1708
1707
|
data: (r || {}).data
|
|
@@ -1712,7 +1711,7 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1712
1711
|
c.forEach(["post", "put", "patch"], function(t) {
|
|
1713
1712
|
function n(r) {
|
|
1714
1713
|
return function(o, i, a) {
|
|
1715
|
-
return this.request(
|
|
1714
|
+
return this.request(M(a || {}, {
|
|
1716
1715
|
method: t,
|
|
1717
1716
|
headers: r ? {
|
|
1718
1717
|
"Content-Type": "multipart/form-data"
|
|
@@ -1722,9 +1721,9 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1722
1721
|
}));
|
|
1723
1722
|
};
|
|
1724
1723
|
}
|
|
1725
|
-
|
|
1724
|
+
j.prototype[t] = n(), j.prototype[t + "Form"] = n(!0);
|
|
1726
1725
|
});
|
|
1727
|
-
let
|
|
1726
|
+
let cr = class Rt {
|
|
1728
1727
|
constructor(t) {
|
|
1729
1728
|
if (typeof t != "function")
|
|
1730
1729
|
throw new TypeError("executor must be a function.");
|
|
@@ -1748,7 +1747,7 @@ let lr = class Ot {
|
|
|
1748
1747
|
r.unsubscribe(o);
|
|
1749
1748
|
}, i;
|
|
1750
1749
|
}, t(function(o, i, a) {
|
|
1751
|
-
r.reason || (r.reason = new
|
|
1750
|
+
r.reason || (r.reason = new Z(o, i, a), n(r.reason));
|
|
1752
1751
|
});
|
|
1753
1752
|
}
|
|
1754
1753
|
/**
|
|
@@ -1790,22 +1789,22 @@ let lr = class Ot {
|
|
|
1790
1789
|
static source() {
|
|
1791
1790
|
let t;
|
|
1792
1791
|
return {
|
|
1793
|
-
token: new
|
|
1792
|
+
token: new Rt(function(s) {
|
|
1794
1793
|
t = s;
|
|
1795
1794
|
}),
|
|
1796
1795
|
cancel: t
|
|
1797
1796
|
};
|
|
1798
1797
|
}
|
|
1799
1798
|
};
|
|
1800
|
-
function
|
|
1799
|
+
function lr(e) {
|
|
1801
1800
|
return function(n) {
|
|
1802
1801
|
return e.apply(null, n);
|
|
1803
1802
|
};
|
|
1804
1803
|
}
|
|
1805
|
-
function
|
|
1804
|
+
function ur(e) {
|
|
1806
1805
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
1807
1806
|
}
|
|
1808
|
-
const
|
|
1807
|
+
const Se = {
|
|
1809
1808
|
Continue: 100,
|
|
1810
1809
|
SwitchingProtocols: 101,
|
|
1811
1810
|
Processing: 102,
|
|
@@ -1876,56 +1875,56 @@ const Re = {
|
|
|
1876
1875
|
SslHandshakeFailed: 525,
|
|
1877
1876
|
InvalidSslCertificate: 526
|
|
1878
1877
|
};
|
|
1879
|
-
Object.entries(
|
|
1880
|
-
|
|
1878
|
+
Object.entries(Se).forEach(([e, t]) => {
|
|
1879
|
+
Se[t] = e;
|
|
1881
1880
|
});
|
|
1882
|
-
function
|
|
1883
|
-
const t = new
|
|
1884
|
-
return c.extend(n,
|
|
1885
|
-
return
|
|
1881
|
+
function Ot(e) {
|
|
1882
|
+
const t = new j(e), n = tt(j.prototype.request, t);
|
|
1883
|
+
return c.extend(n, j.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1884
|
+
return Ot(M(e, s));
|
|
1886
1885
|
}, n;
|
|
1887
1886
|
}
|
|
1888
|
-
const O =
|
|
1889
|
-
O.Axios =
|
|
1890
|
-
O.CanceledError =
|
|
1891
|
-
O.CancelToken =
|
|
1892
|
-
O.isCancel =
|
|
1893
|
-
O.VERSION =
|
|
1894
|
-
O.toFormData =
|
|
1887
|
+
const O = Ot(G);
|
|
1888
|
+
O.Axios = j;
|
|
1889
|
+
O.CanceledError = Z;
|
|
1890
|
+
O.CancelToken = cr;
|
|
1891
|
+
O.isCancel = ht;
|
|
1892
|
+
O.VERSION = St;
|
|
1893
|
+
O.toFormData = ue;
|
|
1895
1894
|
O.AxiosError = w;
|
|
1896
1895
|
O.Cancel = O.CanceledError;
|
|
1897
1896
|
O.all = function(t) {
|
|
1898
1897
|
return Promise.all(t);
|
|
1899
1898
|
};
|
|
1900
|
-
O.spread =
|
|
1901
|
-
O.isAxiosError =
|
|
1902
|
-
O.mergeConfig =
|
|
1899
|
+
O.spread = lr;
|
|
1900
|
+
O.isAxiosError = ur;
|
|
1901
|
+
O.mergeConfig = M;
|
|
1903
1902
|
O.AxiosHeaders = N;
|
|
1904
1903
|
O.formToJSON = (e) => mt(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
1905
|
-
O.getAdapter =
|
|
1906
|
-
O.HttpStatusCode =
|
|
1904
|
+
O.getAdapter = gt.getAdapter;
|
|
1905
|
+
O.HttpStatusCode = Se;
|
|
1907
1906
|
O.default = O;
|
|
1908
1907
|
const {
|
|
1909
|
-
Axios:
|
|
1910
|
-
AxiosError:
|
|
1911
|
-
CanceledError:
|
|
1912
|
-
isCancel:
|
|
1913
|
-
CancelToken:
|
|
1914
|
-
VERSION:
|
|
1915
|
-
all:
|
|
1916
|
-
Cancel:
|
|
1917
|
-
isAxiosError:
|
|
1918
|
-
spread:
|
|
1919
|
-
toFormData:
|
|
1920
|
-
AxiosHeaders:
|
|
1921
|
-
HttpStatusCode:
|
|
1922
|
-
formToJSON:
|
|
1923
|
-
getAdapter:
|
|
1924
|
-
mergeConfig:
|
|
1925
|
-
} = O,
|
|
1926
|
-
class
|
|
1927
|
-
constructor(t, n =
|
|
1928
|
-
|
|
1908
|
+
Axios: _r,
|
|
1909
|
+
AxiosError: Ar,
|
|
1910
|
+
CanceledError: Tr,
|
|
1911
|
+
isCancel: Cr,
|
|
1912
|
+
CancelToken: Nr,
|
|
1913
|
+
VERSION: xr,
|
|
1914
|
+
all: Pr,
|
|
1915
|
+
Cancel: Dr,
|
|
1916
|
+
isAxiosError: Fr,
|
|
1917
|
+
spread: Ur,
|
|
1918
|
+
toFormData: Lr,
|
|
1919
|
+
AxiosHeaders: kr,
|
|
1920
|
+
HttpStatusCode: Br,
|
|
1921
|
+
formToJSON: Ir,
|
|
1922
|
+
getAdapter: jr,
|
|
1923
|
+
mergeConfig: Mr
|
|
1924
|
+
} = O, fr = "http://localhost:8000/api";
|
|
1925
|
+
class dr {
|
|
1926
|
+
constructor(t, n = fr) {
|
|
1927
|
+
Ue(this, "client");
|
|
1929
1928
|
this.client = O.create({
|
|
1930
1929
|
baseURL: n,
|
|
1931
1930
|
headers: {
|
|
@@ -1989,8 +1988,8 @@ class pr {
|
|
|
1989
1988
|
this.client.defaults.baseURL = t;
|
|
1990
1989
|
}
|
|
1991
1990
|
}
|
|
1992
|
-
function
|
|
1993
|
-
const [n, r] =
|
|
1991
|
+
function Ge(e, t) {
|
|
1992
|
+
const [n, r] = J(() => {
|
|
1994
1993
|
try {
|
|
1995
1994
|
const o = window.localStorage.getItem(e);
|
|
1996
1995
|
return o ? JSON.parse(o) : t;
|
|
@@ -2007,23 +2006,23 @@ function Ze(e, t) {
|
|
|
2007
2006
|
}
|
|
2008
2007
|
}];
|
|
2009
2008
|
}
|
|
2010
|
-
function
|
|
2009
|
+
function Ze() {
|
|
2011
2010
|
return `session_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
|
|
2012
2011
|
}
|
|
2013
|
-
const
|
|
2014
|
-
function
|
|
2015
|
-
const { apiKey: t, baseUrl: n, onError: r } = e, [s, o] =
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
), [d, u] =
|
|
2019
|
-
|
|
2020
|
-
|
|
2012
|
+
const pr = "customer_support_session_id", mr = "customer_support_messages";
|
|
2013
|
+
function hr(e) {
|
|
2014
|
+
const { apiKey: t, baseUrl: n, onError: r } = e, [s, o] = Ge(mr, []), [i, a] = Ge(
|
|
2015
|
+
pr,
|
|
2016
|
+
Ze()
|
|
2017
|
+
), [d, u] = J(!1), [l, p] = J(null), E = Ye(null);
|
|
2018
|
+
Re(() => {
|
|
2019
|
+
E.current = new dr(t, n);
|
|
2021
2020
|
}, [t, n]);
|
|
2022
|
-
const _ =
|
|
2021
|
+
const _ = te(() => {
|
|
2023
2022
|
p(null);
|
|
2024
|
-
}, []), f =
|
|
2023
|
+
}, []), f = te(
|
|
2025
2024
|
async (g) => {
|
|
2026
|
-
if (!
|
|
2025
|
+
if (!E.current) {
|
|
2027
2026
|
const y = new Error("API client not initialized");
|
|
2028
2027
|
p(y), r == null || r(y);
|
|
2029
2028
|
return;
|
|
@@ -2038,35 +2037,35 @@ function yr(e) {
|
|
|
2038
2037
|
};
|
|
2039
2038
|
o((y) => [...y, R]), u(!0), p(null);
|
|
2040
2039
|
try {
|
|
2041
|
-
const y = await
|
|
2040
|
+
const y = await E.current.sendMessage(g, i), S = {
|
|
2042
2041
|
id: `assistant_${Date.now()}`,
|
|
2043
2042
|
role: "ASSISTANT",
|
|
2044
2043
|
content: y.answer,
|
|
2045
2044
|
timestamp: /* @__PURE__ */ new Date(),
|
|
2046
2045
|
sources: y.sources
|
|
2047
2046
|
};
|
|
2048
|
-
o((T) => [...T,
|
|
2047
|
+
o((T) => [...T, S]), y.session_id !== i && a(y.session_id);
|
|
2049
2048
|
} catch (y) {
|
|
2050
|
-
const
|
|
2051
|
-
p(
|
|
2049
|
+
const S = y instanceof Error ? y : new Error("Failed to send message");
|
|
2050
|
+
p(S), r == null || r(S);
|
|
2052
2051
|
const T = {
|
|
2053
2052
|
id: `error_${Date.now()}`,
|
|
2054
2053
|
role: "ASSISTANT",
|
|
2055
|
-
content: `Sorry, I encountered an error: ${
|
|
2054
|
+
content: `Sorry, I encountered an error: ${S.message}`,
|
|
2056
2055
|
timestamp: /* @__PURE__ */ new Date()
|
|
2057
2056
|
};
|
|
2058
|
-
o((
|
|
2057
|
+
o((U) => [...U, T]);
|
|
2059
2058
|
} finally {
|
|
2060
2059
|
u(!1);
|
|
2061
2060
|
}
|
|
2062
2061
|
},
|
|
2063
2062
|
[i, r, o, a]
|
|
2064
|
-
),
|
|
2065
|
-
if (!(!
|
|
2063
|
+
), h = te(async () => {
|
|
2064
|
+
if (!(!E.current || !i)) {
|
|
2066
2065
|
u(!0), p(null);
|
|
2067
2066
|
try {
|
|
2068
|
-
const R = (await
|
|
2069
|
-
id: `${y.role.toLowerCase()}_${
|
|
2067
|
+
const R = (await E.current.getConversationHistory(i)).messages.map((y, S) => ({
|
|
2068
|
+
id: `${y.role.toLowerCase()}_${S}_${Date.now()}`,
|
|
2070
2069
|
role: y.role,
|
|
2071
2070
|
content: y.content,
|
|
2072
2071
|
timestamp: new Date(y.created_at)
|
|
@@ -2079,8 +2078,8 @@ function yr(e) {
|
|
|
2079
2078
|
u(!1);
|
|
2080
2079
|
}
|
|
2081
2080
|
}
|
|
2082
|
-
}, [i, r, o]),
|
|
2083
|
-
o([]), a(
|
|
2081
|
+
}, [i, r, o]), m = te(() => {
|
|
2082
|
+
o([]), a(Ze());
|
|
2084
2083
|
}, [o, a]);
|
|
2085
2084
|
return {
|
|
2086
2085
|
messages: s,
|
|
@@ -2089,76 +2088,56 @@ function yr(e) {
|
|
|
2089
2088
|
error: l,
|
|
2090
2089
|
clearError: _,
|
|
2091
2090
|
sessionId: i,
|
|
2092
|
-
loadHistory:
|
|
2093
|
-
clearHistory:
|
|
2091
|
+
loadHistory: h,
|
|
2092
|
+
clearHistory: m
|
|
2094
2093
|
};
|
|
2095
2094
|
}
|
|
2096
|
-
const
|
|
2095
|
+
const yr = ({ message: e }) => {
|
|
2097
2096
|
const t = e.role === "USER", n = e.timestamp instanceof Date ? e.timestamp : new Date(e.timestamp);
|
|
2098
|
-
return /* @__PURE__ */
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
className: "cs-message__source-link",
|
|
2111
|
-
children: [
|
|
2112
|
-
/* @__PURE__ */ S(Dt, { size: 12 }),
|
|
2113
|
-
/* @__PURE__ */ S("span", { children: r.title })
|
|
2114
|
-
]
|
|
2115
|
-
}
|
|
2116
|
-
),
|
|
2117
|
-
/* @__PURE__ */ x("span", { className: "cs-message__source-similarity", children: [
|
|
2118
|
-
Math.round(r.similarity * 100),
|
|
2119
|
-
"% match"
|
|
2120
|
-
] })
|
|
2121
|
-
] }, s)) })
|
|
2122
|
-
] })
|
|
2123
|
-
] }),
|
|
2124
|
-
/* @__PURE__ */ S("time", { className: "cs-message__time", dateTime: n.toISOString(), children: n.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) })
|
|
2125
|
-
] });
|
|
2126
|
-
}, br = ({
|
|
2097
|
+
return /* @__PURE__ */ b.createElement("div", { className: `cs-message ${t ? "cs-message--user" : "cs-message--assistant"}` }, /* @__PURE__ */ b.createElement("div", { className: "cs-message__content" }, /* @__PURE__ */ b.createElement("p", { className: "cs-message__text" }, e.content), e.sources && e.sources.length > 0 && /* @__PURE__ */ b.createElement("div", { className: "cs-message__sources" }, /* @__PURE__ */ b.createElement("p", { className: "cs-message__sources-title" }, "Sources:"), /* @__PURE__ */ b.createElement("ul", { className: "cs-message__sources-list" }, e.sources.map((r, s) => /* @__PURE__ */ b.createElement("li", { key: s, className: "cs-message__source-item" }, /* @__PURE__ */ b.createElement(
|
|
2098
|
+
"a",
|
|
2099
|
+
{
|
|
2100
|
+
href: r.url,
|
|
2101
|
+
target: "_blank",
|
|
2102
|
+
rel: "noopener noreferrer",
|
|
2103
|
+
className: "cs-message__source-link"
|
|
2104
|
+
},
|
|
2105
|
+
/* @__PURE__ */ b.createElement(Pt, { size: 12 }),
|
|
2106
|
+
/* @__PURE__ */ b.createElement("span", null, r.title)
|
|
2107
|
+
), /* @__PURE__ */ b.createElement("span", { className: "cs-message__source-similarity" }, Math.round(r.similarity * 100), "% match")))))), /* @__PURE__ */ b.createElement("time", { className: "cs-message__time", dateTime: n.toISOString() }, n.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" })));
|
|
2108
|
+
}, wr = ({
|
|
2127
2109
|
onSendMessage: e,
|
|
2128
2110
|
isLoading: t,
|
|
2129
2111
|
placeholder: n = "Type your message..."
|
|
2130
2112
|
}) => {
|
|
2131
|
-
const [r, s] =
|
|
2113
|
+
const [r, s] = J(""), o = (a) => {
|
|
2132
2114
|
a.preventDefault(), r.trim() && !t && (e(r), s(""));
|
|
2115
|
+
}, i = (a) => {
|
|
2116
|
+
a.key === "Enter" && !a.shiftKey && (a.preventDefault(), o(a));
|
|
2133
2117
|
};
|
|
2134
|
-
return /* @__PURE__ */
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
children: /* @__PURE__ */ S(Lt, { size: 20 })
|
|
2158
|
-
}
|
|
2159
|
-
)
|
|
2160
|
-
] });
|
|
2161
|
-
}, gr = ({
|
|
2118
|
+
return /* @__PURE__ */ b.createElement("form", { className: "cs-input", onSubmit: o }, /* @__PURE__ */ b.createElement(
|
|
2119
|
+
"textarea",
|
|
2120
|
+
{
|
|
2121
|
+
className: "cs-input__textarea",
|
|
2122
|
+
value: r,
|
|
2123
|
+
onChange: (a) => s(a.target.value),
|
|
2124
|
+
onKeyDown: i,
|
|
2125
|
+
placeholder: n,
|
|
2126
|
+
disabled: t,
|
|
2127
|
+
rows: 1,
|
|
2128
|
+
"aria-label": "Message input"
|
|
2129
|
+
}
|
|
2130
|
+
), /* @__PURE__ */ b.createElement(
|
|
2131
|
+
"button",
|
|
2132
|
+
{
|
|
2133
|
+
type: "submit",
|
|
2134
|
+
className: "cs-input__button",
|
|
2135
|
+
disabled: !r.trim() || t,
|
|
2136
|
+
"aria-label": "Send message"
|
|
2137
|
+
},
|
|
2138
|
+
/* @__PURE__ */ b.createElement(Ut, { size: 20 })
|
|
2139
|
+
));
|
|
2140
|
+
}, Er = ({
|
|
2162
2141
|
messages: e,
|
|
2163
2142
|
onSendMessage: t,
|
|
2164
2143
|
onClose: n,
|
|
@@ -2167,43 +2146,27 @@ const wr = ({ message: e }) => {
|
|
|
2167
2146
|
placeholder: o,
|
|
2168
2147
|
welcomeMessage: i = "Hi! How can I help you today?"
|
|
2169
2148
|
}) => {
|
|
2170
|
-
const a =
|
|
2171
|
-
return
|
|
2149
|
+
const a = Ye(null);
|
|
2150
|
+
return Re(() => {
|
|
2172
2151
|
var d;
|
|
2173
2152
|
(d = a.current) == null || d.scrollIntoView({ behavior: "smooth" });
|
|
2174
|
-
}, [e]), /* @__PURE__ */
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
/* @__PURE__ */ S(Ft, { size: 20, className: "cs-window__typing-icon" }),
|
|
2192
|
-
/* @__PURE__ */ S("span", { children: "Thinking..." })
|
|
2193
|
-
] }),
|
|
2194
|
-
s && /* @__PURE__ */ S("div", { className: "cs-window__error", children: /* @__PURE__ */ S("p", { children: s.message }) }),
|
|
2195
|
-
/* @__PURE__ */ S("div", { ref: a })
|
|
2196
|
-
] }),
|
|
2197
|
-
/* @__PURE__ */ S("div", { className: "cs-window__input-wrapper", children: /* @__PURE__ */ S(
|
|
2198
|
-
br,
|
|
2199
|
-
{
|
|
2200
|
-
onSendMessage: t,
|
|
2201
|
-
isLoading: r,
|
|
2202
|
-
placeholder: o
|
|
2203
|
-
}
|
|
2204
|
-
) })
|
|
2205
|
-
] });
|
|
2206
|
-
}, Hr = ({
|
|
2153
|
+
}, [e]), /* @__PURE__ */ b.createElement("div", { className: "cs-window" }, /* @__PURE__ */ b.createElement("div", { className: "cs-window__header" }, /* @__PURE__ */ b.createElement("h3", { className: "cs-window__title" }, "Customer Support"), /* @__PURE__ */ b.createElement(
|
|
2154
|
+
"button",
|
|
2155
|
+
{
|
|
2156
|
+
className: "cs-window__close",
|
|
2157
|
+
onClick: n,
|
|
2158
|
+
"aria-label": "Close chat"
|
|
2159
|
+
},
|
|
2160
|
+
/* @__PURE__ */ b.createElement(Lt, { size: 20 })
|
|
2161
|
+
)), /* @__PURE__ */ b.createElement("div", { className: "cs-window__messages" }, e.length === 0 && !r && /* @__PURE__ */ b.createElement("div", { className: "cs-window__welcome" }, /* @__PURE__ */ b.createElement("p", null, i)), e.map((d) => /* @__PURE__ */ b.createElement(yr, { key: d.id, message: d })), r && /* @__PURE__ */ b.createElement("div", { className: "cs-window__typing" }, /* @__PURE__ */ b.createElement(Dt, { size: 20, className: "cs-window__typing-icon" }), /* @__PURE__ */ b.createElement("span", null, "Thinking...")), s && /* @__PURE__ */ b.createElement("div", { className: "cs-window__error" }, /* @__PURE__ */ b.createElement("p", null, s.message)), /* @__PURE__ */ b.createElement("div", { ref: a })), /* @__PURE__ */ b.createElement("div", { className: "cs-window__input-wrapper" }, /* @__PURE__ */ b.createElement(
|
|
2162
|
+
wr,
|
|
2163
|
+
{
|
|
2164
|
+
onSendMessage: t,
|
|
2165
|
+
isLoading: r,
|
|
2166
|
+
placeholder: o
|
|
2167
|
+
}
|
|
2168
|
+
)));
|
|
2169
|
+
}, $r = ({
|
|
2207
2170
|
apiKey: e,
|
|
2208
2171
|
baseUrl: t,
|
|
2209
2172
|
theme: n,
|
|
@@ -2215,66 +2178,61 @@ const wr = ({ message: e }) => {
|
|
|
2215
2178
|
onMessageSent: d,
|
|
2216
2179
|
onMessageReceived: u
|
|
2217
2180
|
}) => {
|
|
2218
|
-
const [l, p] =
|
|
2219
|
-
messages:
|
|
2181
|
+
const [l, p] = J(!1), {
|
|
2182
|
+
messages: E,
|
|
2220
2183
|
sendMessage: _,
|
|
2221
2184
|
isLoading: f,
|
|
2222
|
-
error:
|
|
2223
|
-
clearError:
|
|
2224
|
-
} =
|
|
2185
|
+
error: h,
|
|
2186
|
+
clearError: m
|
|
2187
|
+
} = hr({
|
|
2225
2188
|
apiKey: e,
|
|
2226
2189
|
baseUrl: t,
|
|
2227
2190
|
onError: a
|
|
2228
2191
|
});
|
|
2229
|
-
|
|
2192
|
+
Re(() => {
|
|
2230
2193
|
if (n) {
|
|
2231
2194
|
const y = document.documentElement;
|
|
2232
2195
|
n.primaryColor && y.style.setProperty("--cs-primary-color", n.primaryColor), n.secondaryColor && y.style.setProperty("--cs-secondary-color", n.secondaryColor), n.backgroundColor && y.style.setProperty("--cs-bg-color", n.backgroundColor), n.textColor && y.style.setProperty("--cs-text-color", n.textColor), n.fontFamily && y.style.setProperty("--cs-font-family", n.fontFamily), n.borderRadius && y.style.setProperty("--cs-border-radius", n.borderRadius), n.buttonColor && y.style.setProperty("--cs-button-color", n.buttonColor), n.userMessageColor && y.style.setProperty("--cs-user-message-color", n.userMessageColor), n.assistantMessageColor && y.style.setProperty("--cs-assistant-message-color", n.assistantMessageColor);
|
|
2233
2196
|
}
|
|
2234
2197
|
}, [n]);
|
|
2235
2198
|
const g = async (y) => {
|
|
2236
|
-
if (d == null || d(y), await _(y), !
|
|
2237
|
-
const
|
|
2238
|
-
(
|
|
2199
|
+
if (d == null || d(y), await _(y), !h) {
|
|
2200
|
+
const S = E[E.length - 1];
|
|
2201
|
+
(S == null ? void 0 : S.role) === "ASSISTANT" && (u == null || u(S.content));
|
|
2239
2202
|
}
|
|
2240
2203
|
}, R = () => {
|
|
2241
|
-
p(!l),
|
|
2204
|
+
p(!l), h && m();
|
|
2242
2205
|
};
|
|
2243
|
-
return /* @__PURE__ */
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
"
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
!l && b.length > 0 && /* @__PURE__ */ S("span", { className: "cs-widget__badge", children: b.filter((y) => y.role === "ASSISTANT").length })
|
|
2266
|
-
]
|
|
2267
|
-
}
|
|
2268
|
-
)
|
|
2269
|
-
] });
|
|
2206
|
+
return /* @__PURE__ */ b.createElement("div", { className: `cs-widget cs-widget--${r} ${i}` }, l && /* @__PURE__ */ b.createElement(
|
|
2207
|
+
Er,
|
|
2208
|
+
{
|
|
2209
|
+
messages: E,
|
|
2210
|
+
onSendMessage: g,
|
|
2211
|
+
onClose: () => p(!1),
|
|
2212
|
+
isLoading: f,
|
|
2213
|
+
error: h,
|
|
2214
|
+
placeholder: o,
|
|
2215
|
+
welcomeMessage: s
|
|
2216
|
+
}
|
|
2217
|
+
), /* @__PURE__ */ b.createElement(
|
|
2218
|
+
"button",
|
|
2219
|
+
{
|
|
2220
|
+
className: `cs-widget__toggle ${l ? "cs-widget__toggle--open" : ""}`,
|
|
2221
|
+
onClick: R,
|
|
2222
|
+
"aria-label": l ? "Close chat" : "Open chat",
|
|
2223
|
+
"aria-expanded": l
|
|
2224
|
+
},
|
|
2225
|
+
/* @__PURE__ */ b.createElement(Ft, { size: 24 }),
|
|
2226
|
+
!l && E.length > 0 && /* @__PURE__ */ b.createElement("span", { className: "cs-widget__badge" }, E.filter((y) => y.role === "ASSISTANT").length)
|
|
2227
|
+
));
|
|
2270
2228
|
};
|
|
2271
2229
|
export {
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2230
|
+
wr as ChatInput,
|
|
2231
|
+
yr as ChatMessage,
|
|
2232
|
+
Er as ChatWindow,
|
|
2233
|
+
dr as CustomerSupportAPIClient,
|
|
2234
|
+
$r as CustomerSupportWidget,
|
|
2235
|
+
hr as useCustomerSupport,
|
|
2236
|
+
Ge as useLocalStorage
|
|
2279
2237
|
};
|
|
2280
2238
|
//# sourceMappingURL=index.es.js.map
|