@tarxemo/customer_support 1.0.2 → 1.0.4

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