react-aichatbot-widget 1.2.0 → 1.3.1

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.js CHANGED
@@ -1,6 +1,6 @@
1
- import { jsxs as A, jsx as b, Fragment as Ee } from "react/jsx-runtime";
2
- import { useState as j, useRef as Rt, useEffect as Ve } from "react";
3
- import { X as Ke, MessageCircle as Xe, Send as Ge, Ellipsis as Ct } from "lucide-react";
1
+ import { jsxs as O, jsx as y, Fragment as Ee } from "react/jsx-runtime";
2
+ import { useState as L, useRef as Ct, useEffect as Ke } from "react";
3
+ import { X as Xe, MessageCircle as Ye, Send as Ge, Bot as Pe } from "lucide-react";
4
4
  import { v4 as Tt } from "uuid";
5
5
  const Ot = ({ onClick: e, isOpen: t, theme: n, chatBotData: r }) => {
6
6
  const o = r.position === "left", l = {
@@ -26,18 +26,18 @@ const Ot = ({ onClick: e, isOpen: t, theme: n, chatBotData: r }) => {
26
26
  transform: "scale(1.10)",
27
27
  boxShadow: "0 25px 35px -5px rgba(0,0,0,0.2)"
28
28
  };
29
- return /* @__PURE__ */ A(
29
+ return /* @__PURE__ */ O(
30
30
  "button",
31
31
  {
32
32
  onClick: e,
33
33
  style: l,
34
34
  onMouseEnter: (c) => Object.assign(c.currentTarget.style, p),
35
- onMouseLeave: (c) => Object.keys(p).forEach((f) => c.currentTarget.style[f] = l[f] || ""),
35
+ onMouseLeave: (c) => Object.keys(p).forEach((d) => c.currentTarget.style[d] = l[d] || ""),
36
36
  onFocus: (c) => Object.assign(c.currentTarget.style, p),
37
- onBlur: (c) => Object.keys(p).forEach((f) => c.currentTarget.style[f] = l[f] || ""),
37
+ onBlur: (c) => Object.keys(p).forEach((d) => c.currentTarget.style[d] = l[d] || ""),
38
38
  children: [
39
- t ? /* @__PURE__ */ b(Ke, { size: 30, strokeWidth: 2.5 }) : /* @__PURE__ */ b(Xe, { size: 30, strokeWidth: 2.5 }),
40
- !t && /* @__PURE__ */ b("span", { style: {
39
+ t ? /* @__PURE__ */ y(Xe, { size: 30, strokeWidth: 2.5 }) : /* @__PURE__ */ y(Ye, { size: 30, strokeWidth: 2.5 }),
40
+ !t && /* @__PURE__ */ y("span", { style: {
41
41
  position: "absolute",
42
42
  top: "-4px",
43
43
  right: "-4px",
@@ -49,7 +49,7 @@ const Ot = ({ onClick: e, isOpen: t, theme: n, chatBotData: r }) => {
49
49
  border: "4px solid white",
50
50
  animation: "pulse 2s infinite"
51
51
  } }),
52
- /* @__PURE__ */ b("style", { jsx: !0, children: `
52
+ /* @__PURE__ */ y("style", { jsx: !0, children: `
53
53
  @keyframes pulse {
54
54
  0% {
55
55
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
@@ -66,10 +66,10 @@ const Ot = ({ onClick: e, isOpen: t, theme: n, chatBotData: r }) => {
66
66
  }
67
67
  );
68
68
  }, At = ({ onSendMessage: e, isLoading: t, theme: n }) => {
69
- const [r, o] = j(""), s = () => {
69
+ const [r, o] = L(""), s = () => {
70
70
  !r.trim() || t || (e(r.trim()), o(""));
71
- }, i = (f) => {
72
- f.key === "Enter" && !f.shiftKey && (f.preventDefault(), s());
71
+ }, i = (d) => {
72
+ d.key === "Enter" && !d.shiftKey && (d.preventDefault(), s());
73
73
  }, l = {
74
74
  padding: "16px",
75
75
  borderTop: "1px solid rgba(255, 255, 255, 0.2)",
@@ -109,50 +109,52 @@ const Ot = ({ onClick: e, isOpen: t, theme: n, chatBotData: r }) => {
109
109
  transition: "all 0.2s ease",
110
110
  minWidth: "48px"
111
111
  };
112
- return /* @__PURE__ */ b("div", { style: l, children: /* @__PURE__ */ A("div", { style: p, children: [
113
- /* @__PURE__ */ b(
112
+ return /* @__PURE__ */ y("div", { style: l, children: /* @__PURE__ */ O("div", { style: p, children: [
113
+ /* @__PURE__ */ y(
114
114
  "input",
115
115
  {
116
116
  type: "text",
117
117
  placeholder: "Type a message...",
118
118
  value: r,
119
- onChange: (f) => o(f.target.value),
119
+ onChange: (d) => o(d.target.value),
120
120
  onKeyDown: i,
121
121
  disabled: t,
122
122
  style: u,
123
- onFocus: (f) => {
124
- f.target.style.boxShadow = "0 0 0 3px rgba(100, 150, 255, 0.3)", f.target.style.borderColor = "#60a5fa";
123
+ onFocus: (d) => {
124
+ d.target.style.boxShadow = "0 0 0 3px rgba(100, 150, 255, 0.3)", d.target.style.borderColor = "#60a5fa";
125
125
  },
126
- onBlur: (f) => {
127
- f.target.style.boxShadow = "none", f.target.style.borderColor = n.fontColor;
126
+ onBlur: (d) => {
127
+ d.target.style.boxShadow = "none", d.target.style.borderColor = n.fontColor;
128
128
  }
129
129
  }
130
130
  ),
131
- /* @__PURE__ */ b(
131
+ /* @__PURE__ */ y(
132
132
  "button",
133
133
  {
134
134
  onClick: s,
135
135
  disabled: t || !r.trim(),
136
136
  style: c,
137
137
  "aria-label": "Send message",
138
- onMouseEnter: (f) => {
139
- !t && r.trim() && (f.currentTarget.style.transform = "translateY(-2px)", f.currentTarget.style.boxShadow = "0 8px 16px rgba(0,0,0,0.15)");
138
+ onMouseEnter: (d) => {
139
+ !t && r.trim() && (d.currentTarget.style.transform = "translateY(-2px)", d.currentTarget.style.boxShadow = "0 8px 16px rgba(0,0,0,0.15)");
140
140
  },
141
- onMouseLeave: (f) => {
142
- f.currentTarget.style.transform = "translateY(0)", f.currentTarget.style.boxShadow = "none";
141
+ onMouseLeave: (d) => {
142
+ d.currentTarget.style.transform = "translateY(0)", d.currentTarget.style.boxShadow = "none";
143
143
  },
144
- children: /* @__PURE__ */ b(Ge, { size: 18 })
144
+ children: /* @__PURE__ */ y(Ge, { size: 18 })
145
145
  }
146
146
  )
147
147
  ] }) });
148
- }, kt = ({ messages: e, isLoading: t, theme: n }) => {
149
- const r = Rt(null), o = () => {
150
- r.current?.scrollIntoView({ behavior: "smooth" });
148
+ }, kt = ({ messages: e, isLoading: t, theme: n, botResponseTime: r }) => {
149
+ const o = Ct(null);
150
+ console.log("Messages in MessageBox:", e);
151
+ const s = () => {
152
+ o.current?.scrollIntoView({ behavior: "smooth" });
151
153
  };
152
- Ve(() => {
153
- o();
154
+ Ke(() => {
155
+ s();
154
156
  }, [e, t]);
155
- const s = {
157
+ const i = {
156
158
  flex: 1,
157
159
  overflowY: "auto",
158
160
  padding: "20px",
@@ -162,86 +164,106 @@ const Ot = ({ onClick: e, isOpen: t, theme: n, chatBotData: r }) => {
162
164
  display: "flex",
163
165
  flexDirection: "column",
164
166
  gap: "16px"
165
- }, i = (u) => ({
167
+ }, l = (d) => ({
166
168
  display: "flex",
167
- justifyContent: u === "user" ? "flex-end" : "flex-start",
169
+ justifyContent: d === "user" ? "flex-end" : "flex-start",
168
170
  width: "100%"
169
- }), l = (u) => ({
171
+ }), p = {
172
+ display: "flex",
173
+ flexDirection: "column",
174
+ maxWidth: "80%"
175
+ }, u = (d) => ({
170
176
  padding: "12px 16px",
171
177
  borderRadius: "16px",
172
178
  boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)",
173
179
  border: "1px solid #e4e4e7",
174
- maxWidth: "80%",
175
180
  fontSize: "14px",
176
181
  lineHeight: "1.5",
177
- background: u === "user" ? n.primaryColor : n.backgroundColor,
182
+ background: d === "user" ? n.primaryColor : n.backgroundColor,
178
183
  color: n.fontColor,
179
184
  wordWrap: "break-word"
180
- }), p = {
181
- ...l("bot"),
182
- borderBottomLeftRadius: "4px"
183
- // instead of rounded-bl-none
185
+ }), c = {
186
+ ...u("bot"),
187
+ animation: "fadeIn 0.3s ease-in-out, pulse 1.5s ease-in-out infinite",
188
+ animationDelay: "0s, 0.3s"
184
189
  };
185
- return /* @__PURE__ */ A("div", { style: s, children: [
186
- e.map((u, c) => /* @__PURE__ */ b("div", { style: i(u.type), children: /* @__PURE__ */ b("div", { style: l(u.type), children: u.text }) }, c)),
187
- t && /* @__PURE__ */ b("div", { style: i("bot"), children: /* @__PURE__ */ b("div", { style: p, children: /* @__PURE__ */ b(Ct, { size: 24, style: { animation: "pulse 1.5s ease-in-out infinite" } }) }) }),
188
- /* @__PURE__ */ b("div", { ref: r }),
189
- /* @__PURE__ */ b("style", { jsx: !0, children: `
190
- @keyframes pulse {
191
- 0%, 100% {
192
- opacity: 0.4;
193
- }
194
- 50% {
195
- opacity: 1;
190
+ return /* @__PURE__ */ O("div", { style: i, children: [
191
+ e.map((d, g) => /* @__PURE__ */ y("div", { style: l(d.type), children: /* @__PURE__ */ O("div", { style: p, children: [
192
+ d.type === "bot" && r && /* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: "4px", justifyContent: "flex-start", marginLeft: "4px", marginBottom: "2px" }, children: [
193
+ /* @__PURE__ */ y(Pe, { size: 14, color: n.fontColor }),
194
+ /* @__PURE__ */ y(
195
+ "span",
196
+ {
197
+ style: {
198
+ fontSize: "10px",
199
+ opacity: 0.55,
200
+ color: n.fontColor
201
+ },
202
+ children: r
196
203
  }
204
+ )
205
+ ] }),
206
+ d.type === "user" && /* @__PURE__ */ y("div", { style: { display: "flex", alignItems: "center", gap: "4px", justifyContent: "flex-end", marginRight: "4px", marginBottom: "2px" }, children: /* @__PURE__ */ y(
207
+ "span",
208
+ {
209
+ style: {
210
+ fontSize: "10px",
211
+ opacity: 0.55,
212
+ color: n.fontColor
213
+ },
214
+ children: "You"
197
215
  }
198
- ` })
216
+ ) }),
217
+ /* @__PURE__ */ y("div", { style: u(d.type), children: d.text })
218
+ ] }) }, g)),
219
+ t && /* @__PURE__ */ y("div", { style: l("bot"), children: /* @__PURE__ */ y("div", { style: c, children: /* @__PURE__ */ y(Pe, { size: 24 }) }) }),
220
+ /* @__PURE__ */ y("div", { ref: o })
199
221
  ] });
200
222
  };
201
- function Ye(e, t) {
223
+ function Qe(e, t) {
202
224
  return function() {
203
225
  return e.apply(t, arguments);
204
226
  };
205
227
  }
206
- const { toString: Ft } = Object.prototype, { getPrototypeOf: Re } = Object, { iterator: ce, toStringTag: Qe } = Symbol, ue = /* @__PURE__ */ ((e) => (t) => {
228
+ const { toString: Ft } = Object.prototype, { getPrototypeOf: Re } = Object, { iterator: ce, toStringTag: Ze } = Symbol, ue = /* @__PURE__ */ ((e) => (t) => {
207
229
  const n = Ft.call(t);
208
230
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
209
- })(/* @__PURE__ */ Object.create(null)), L = (e) => (e = e.toLowerCase(), (t) => ue(t) === e), de = (e) => (t) => typeof t === e, { isArray: V } = Array, J = de("undefined");
210
- function Y(e) {
211
- return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && P(e.constructor.isBuffer) && e.constructor.isBuffer(e);
231
+ })(/* @__PURE__ */ Object.create(null)), B = (e) => (e = e.toLowerCase(), (t) => ue(t) === e), de = (e) => (t) => typeof t === e, { isArray: K } = Array, V = de("undefined");
232
+ function Q(e) {
233
+ return e !== null && !V(e) && e.constructor !== null && !V(e.constructor) && U(e.constructor.isBuffer) && e.constructor.isBuffer(e);
212
234
  }
213
- const Ze = L("ArrayBuffer");
235
+ const et = B("ArrayBuffer");
214
236
  function Nt(e) {
215
237
  let t;
216
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ze(e.buffer), t;
238
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && et(e.buffer), t;
217
239
  }
218
- const Pt = de("string"), P = de("function"), et = de("number"), Q = (e) => e !== null && typeof e == "object", Ut = (e) => e === !0 || e === !1, se = (e) => {
240
+ const Pt = de("string"), U = de("function"), tt = de("number"), Z = (e) => e !== null && typeof e == "object", Ut = (e) => e === !0 || e === !1, se = (e) => {
219
241
  if (ue(e) !== "object")
220
242
  return !1;
221
243
  const t = Re(e);
222
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Qe in e) && !(ce in e);
244
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ze in e) && !(ce in e);
223
245
  }, _t = (e) => {
224
- if (!Q(e) || Y(e))
246
+ if (!Z(e) || Q(e))
225
247
  return !1;
226
248
  try {
227
249
  return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
228
250
  } catch {
229
251
  return !1;
230
252
  }
231
- }, Lt = L("Date"), Bt = L("File"), Dt = L("Blob"), jt = L("FileList"), It = (e) => Q(e) && P(e.pipe), vt = (e) => {
253
+ }, Lt = B("Date"), Bt = B("File"), Dt = B("Blob"), jt = B("FileList"), It = (e) => Z(e) && U(e.pipe), vt = (e) => {
232
254
  let t;
233
- return e && (typeof FormData == "function" && e instanceof FormData || P(e.append) && ((t = ue(e)) === "formdata" || // detect form-data instance
234
- t === "object" && P(e.toString) && e.toString() === "[object FormData]"));
235
- }, Ht = L("URLSearchParams"), [qt, Mt, zt, $t] = ["ReadableStream", "Request", "Response", "Headers"].map(L), Wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
236
- function Z(e, t, { allOwnKeys: n = !1 } = {}) {
255
+ return e && (typeof FormData == "function" && e instanceof FormData || U(e.append) && ((t = ue(e)) === "formdata" || // detect form-data instance
256
+ t === "object" && U(e.toString) && e.toString() === "[object FormData]"));
257
+ }, zt = B("URLSearchParams"), [Ht, Mt, qt, $t] = ["ReadableStream", "Request", "Response", "Headers"].map(B), Wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
258
+ function ee(e, t, { allOwnKeys: n = !1 } = {}) {
237
259
  if (e === null || typeof e > "u")
238
260
  return;
239
261
  let r, o;
240
- if (typeof e != "object" && (e = [e]), V(e))
262
+ if (typeof e != "object" && (e = [e]), K(e))
241
263
  for (r = 0, o = e.length; r < o; r++)
242
264
  t.call(null, e[r], r, e);
243
265
  else {
244
- if (Y(e))
266
+ if (Q(e))
245
267
  return;
246
268
  const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
247
269
  let l;
@@ -249,8 +271,8 @@ function Z(e, t, { allOwnKeys: n = !1 } = {}) {
249
271
  l = s[r], t.call(null, e[l], l, e);
250
272
  }
251
273
  }
252
- function tt(e, t) {
253
- if (Y(e))
274
+ function nt(e, t) {
275
+ if (Q(e))
254
276
  return null;
255
277
  t = t.toLowerCase();
256
278
  const n = Object.keys(e);
@@ -260,18 +282,18 @@ function tt(e, t) {
260
282
  return o;
261
283
  return null;
262
284
  }
263
- const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, nt = (e) => !J(e) && e !== q;
285
+ const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, rt = (e) => !V(e) && e !== M;
264
286
  function ge() {
265
- const { caseless: e, skipUndefined: t } = nt(this) && this || {}, n = {}, r = (o, s) => {
266
- const i = e && tt(n, s) || s;
267
- se(n[i]) && se(o) ? n[i] = ge(n[i], o) : se(o) ? n[i] = ge({}, o) : V(o) ? n[i] = o.slice() : (!t || !J(o)) && (n[i] = o);
287
+ const { caseless: e, skipUndefined: t } = rt(this) && this || {}, n = {}, r = (o, s) => {
288
+ const i = e && nt(n, s) || s;
289
+ se(n[i]) && se(o) ? n[i] = ge(n[i], o) : se(o) ? n[i] = ge({}, o) : K(o) ? n[i] = o.slice() : (!t || !V(o)) && (n[i] = o);
268
290
  };
269
291
  for (let o = 0, s = arguments.length; o < s; o++)
270
- arguments[o] && Z(arguments[o], r);
292
+ arguments[o] && ee(arguments[o], r);
271
293
  return n;
272
294
  }
273
- const Jt = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (o, s) => {
274
- n && P(o) ? e[s] = Ye(o, n) : e[s] = o;
295
+ const Jt = (e, t, n, { allOwnKeys: r } = {}) => (ee(t, (o, s) => {
296
+ n && U(o) ? e[s] = Qe(o, n) : e[s] = o;
275
297
  }, { allOwnKeys: r }), e), Vt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Kt = (e, t, n, r) => {
276
298
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
277
299
  value: t.prototype
@@ -286,15 +308,15 @@ const Jt = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (o, s) => {
286
308
  e = n !== !1 && Re(e);
287
309
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
288
310
  return t;
289
- }, Gt = (e, t, n) => {
311
+ }, Yt = (e, t, n) => {
290
312
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
291
313
  const r = e.indexOf(t, n);
292
314
  return r !== -1 && r === n;
293
- }, Yt = (e) => {
315
+ }, Gt = (e) => {
294
316
  if (!e) return null;
295
- if (V(e)) return e;
317
+ if (K(e)) return e;
296
318
  let t = e.length;
297
- if (!et(t)) return null;
319
+ if (!tt(t)) return null;
298
320
  const n = new Array(t);
299
321
  for (; t-- > 0; )
300
322
  n[t] = e[t];
@@ -312,23 +334,23 @@ const Jt = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (o, s) => {
312
334
  for (; (n = e.exec(t)) !== null; )
313
335
  r.push(n);
314
336
  return r;
315
- }, tn = L("HTMLFormElement"), nn = (e) => e.toLowerCase().replace(
337
+ }, tn = B("HTMLFormElement"), nn = (e) => e.toLowerCase().replace(
316
338
  /[-_\s]([a-z\d])(\w*)/g,
317
339
  function(n, r, o) {
318
340
  return r.toUpperCase() + o;
319
341
  }
320
- ), Pe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), rn = L("RegExp"), rt = (e, t) => {
342
+ ), Ue = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), rn = B("RegExp"), ot = (e, t) => {
321
343
  const n = Object.getOwnPropertyDescriptors(e), r = {};
322
- Z(n, (o, s) => {
344
+ ee(n, (o, s) => {
323
345
  let i;
324
346
  (i = t(o, s, e)) !== !1 && (r[s] = i || o);
325
347
  }), Object.defineProperties(e, r);
326
348
  }, on = (e) => {
327
- rt(e, (t, n) => {
328
- if (P(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
349
+ ot(e, (t, n) => {
350
+ if (U(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
329
351
  return !1;
330
352
  const r = e[n];
331
- if (P(r)) {
353
+ if (U(r)) {
332
354
  if (t.enumerable = !1, "writable" in t) {
333
355
  t.writable = !1;
334
356
  return;
@@ -344,65 +366,65 @@ const Jt = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (o, s) => {
344
366
  n[s] = !0;
345
367
  });
346
368
  };
347
- return V(e) ? r(e) : r(String(e).split(t)), n;
369
+ return K(e) ? r(e) : r(String(e).split(t)), n;
348
370
  }, an = () => {
349
371
  }, ln = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
350
372
  function cn(e) {
351
- return !!(e && P(e.append) && e[Qe] === "FormData" && e[ce]);
373
+ return !!(e && U(e.append) && e[Ze] === "FormData" && e[ce]);
352
374
  }
353
375
  const un = (e) => {
354
376
  const t = new Array(10), n = (r, o) => {
355
- if (Q(r)) {
377
+ if (Z(r)) {
356
378
  if (t.indexOf(r) >= 0)
357
379
  return;
358
- if (Y(r))
380
+ if (Q(r))
359
381
  return r;
360
382
  if (!("toJSON" in r)) {
361
383
  t[o] = r;
362
- const s = V(r) ? [] : {};
363
- return Z(r, (i, l) => {
384
+ const s = K(r) ? [] : {};
385
+ return ee(r, (i, l) => {
364
386
  const p = n(i, o + 1);
365
- !J(p) && (s[l] = p);
387
+ !V(p) && (s[l] = p);
366
388
  }), t[o] = void 0, s;
367
389
  }
368
390
  }
369
391
  return r;
370
392
  };
371
393
  return n(e, 0);
372
- }, dn = L("AsyncFunction"), fn = (e) => e && (Q(e) || P(e)) && P(e.then) && P(e.catch), ot = ((e, t) => e ? setImmediate : t ? ((n, r) => (q.addEventListener("message", ({ source: o, data: s }) => {
373
- o === q && s === n && r.length && r.shift()();
394
+ }, dn = B("AsyncFunction"), fn = (e) => e && (Z(e) || U(e)) && U(e.then) && U(e.catch), st = ((e, t) => e ? setImmediate : t ? ((n, r) => (M.addEventListener("message", ({ source: o, data: s }) => {
395
+ o === M && s === n && r.length && r.shift()();
374
396
  }, !1), (o) => {
375
- r.push(o), q.postMessage(n, "*");
397
+ r.push(o), M.postMessage(n, "*");
376
398
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
377
399
  typeof setImmediate == "function",
378
- P(q.postMessage)
379
- ), pn = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || ot, hn = (e) => e != null && P(e[ce]), a = {
380
- isArray: V,
381
- isArrayBuffer: Ze,
382
- isBuffer: Y,
400
+ U(M.postMessage)
401
+ ), pn = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || st, hn = (e) => e != null && U(e[ce]), a = {
402
+ isArray: K,
403
+ isArrayBuffer: et,
404
+ isBuffer: Q,
383
405
  isFormData: vt,
384
406
  isArrayBufferView: Nt,
385
407
  isString: Pt,
386
- isNumber: et,
408
+ isNumber: tt,
387
409
  isBoolean: Ut,
388
- isObject: Q,
410
+ isObject: Z,
389
411
  isPlainObject: se,
390
412
  isEmptyObject: _t,
391
- isReadableStream: qt,
413
+ isReadableStream: Ht,
392
414
  isRequest: Mt,
393
- isResponse: zt,
415
+ isResponse: qt,
394
416
  isHeaders: $t,
395
- isUndefined: J,
417
+ isUndefined: V,
396
418
  isDate: Lt,
397
419
  isFile: Bt,
398
420
  isBlob: Dt,
399
421
  isRegExp: rn,
400
- isFunction: P,
422
+ isFunction: U,
401
423
  isStream: It,
402
- isURLSearchParams: Ht,
424
+ isURLSearchParams: zt,
403
425
  isTypedArray: Qt,
404
426
  isFileList: jt,
405
- forEach: Z,
427
+ forEach: ee,
406
428
  merge: ge,
407
429
  extend: Jt,
408
430
  trim: Wt,
@@ -410,36 +432,36 @@ const un = (e) => {
410
432
  inherits: Kt,
411
433
  toFlatObject: Xt,
412
434
  kindOf: ue,
413
- kindOfTest: L,
414
- endsWith: Gt,
415
- toArray: Yt,
435
+ kindOfTest: B,
436
+ endsWith: Yt,
437
+ toArray: Gt,
416
438
  forEachEntry: Zt,
417
439
  matchAll: en,
418
440
  isHTMLForm: tn,
419
- hasOwnProperty: Pe,
420
- hasOwnProp: Pe,
441
+ hasOwnProperty: Ue,
442
+ hasOwnProp: Ue,
421
443
  // an alias to avoid ESLint no-prototype-builtins detection
422
- reduceDescriptors: rt,
444
+ reduceDescriptors: ot,
423
445
  freezeMethods: on,
424
446
  toObjectSet: sn,
425
447
  toCamelCase: nn,
426
448
  noop: an,
427
449
  toFiniteNumber: ln,
428
- findKey: tt,
429
- global: q,
430
- isContextDefined: nt,
450
+ findKey: nt,
451
+ global: M,
452
+ isContextDefined: rt,
431
453
  isSpecCompliantForm: cn,
432
454
  toJSONObject: un,
433
455
  isAsyncFn: dn,
434
456
  isThenable: fn,
435
- setImmediate: ot,
457
+ setImmediate: st,
436
458
  asap: pn,
437
459
  isIterable: hn
438
460
  };
439
- function y(e, t, n, r, o) {
461
+ function b(e, t, n, r, o) {
440
462
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
441
463
  }
442
- a.inherits(y, Error, {
464
+ a.inherits(b, Error, {
443
465
  toJSON: function() {
444
466
  return {
445
467
  // Standard
@@ -460,7 +482,7 @@ a.inherits(y, Error, {
460
482
  };
461
483
  }
462
484
  });
463
- const st = y.prototype, it = {};
485
+ const it = b.prototype, at = {};
464
486
  [
465
487
  "ERR_BAD_OPTION_VALUE",
466
488
  "ERR_BAD_OPTION",
@@ -476,28 +498,28 @@ const st = y.prototype, it = {};
476
498
  "ERR_INVALID_URL"
477
499
  // eslint-disable-next-line func-names
478
500
  ].forEach((e) => {
479
- it[e] = { value: e };
501
+ at[e] = { value: e };
480
502
  });
481
- Object.defineProperties(y, it);
482
- Object.defineProperty(st, "isAxiosError", { value: !0 });
483
- y.from = (e, t, n, r, o, s) => {
484
- const i = Object.create(st);
503
+ Object.defineProperties(b, at);
504
+ Object.defineProperty(it, "isAxiosError", { value: !0 });
505
+ b.from = (e, t, n, r, o, s) => {
506
+ const i = Object.create(it);
485
507
  a.toFlatObject(e, i, function(c) {
486
508
  return c !== Error.prototype;
487
509
  }, (u) => u !== "isAxiosError");
488
510
  const l = e && e.message ? e.message : "Error", p = t == null && e ? e.code : t;
489
- return y.call(i, l, p, n, r, o), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", s && Object.assign(i, s), i;
511
+ return b.call(i, l, p, n, r, o), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", s && Object.assign(i, s), i;
490
512
  };
491
513
  const mn = null;
492
514
  function xe(e) {
493
515
  return a.isPlainObject(e) || a.isArray(e);
494
516
  }
495
- function at(e) {
517
+ function lt(e) {
496
518
  return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
497
519
  }
498
- function Ue(e, t, n) {
520
+ function _e(e, t, n) {
499
521
  return e ? e.concat(t).map(function(o, s) {
500
- return o = at(o), !n && s ? "[" + o + "]" : o;
522
+ return o = lt(o), !n && s ? "[" + o + "]" : o;
501
523
  }).join(n ? "." : "") : t;
502
524
  }
503
525
  function yn(e) {
@@ -519,42 +541,42 @@ function fe(e, t, n) {
519
541
  const r = n.metaTokens, o = n.visitor || c, s = n.dots, i = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
520
542
  if (!a.isFunction(o))
521
543
  throw new TypeError("visitor must be a function");
522
- function u(d) {
523
- if (d === null) return "";
524
- if (a.isDate(d))
525
- return d.toISOString();
526
- if (a.isBoolean(d))
527
- return d.toString();
528
- if (!p && a.isBlob(d))
529
- throw new y("Blob is not supported. Use a Buffer instead.");
530
- return a.isArrayBuffer(d) || a.isTypedArray(d) ? p && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
531
- }
532
- function c(d, m, h) {
533
- let w = d;
534
- if (d && !h && typeof d == "object") {
544
+ function u(f) {
545
+ if (f === null) return "";
546
+ if (a.isDate(f))
547
+ return f.toISOString();
548
+ if (a.isBoolean(f))
549
+ return f.toString();
550
+ if (!p && a.isBlob(f))
551
+ throw new b("Blob is not supported. Use a Buffer instead.");
552
+ return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
553
+ }
554
+ function c(f, m, h) {
555
+ let w = f;
556
+ if (f && !h && typeof f == "object") {
535
557
  if (a.endsWith(m, "{}"))
536
- m = r ? m : m.slice(0, -2), d = JSON.stringify(d);
537
- else if (a.isArray(d) && yn(d) || (a.isFileList(d) || a.endsWith(m, "[]")) && (w = a.toArray(d)))
538
- return m = at(m), w.forEach(function(S, x) {
558
+ m = r ? m : m.slice(0, -2), f = JSON.stringify(f);
559
+ else if (a.isArray(f) && yn(f) || (a.isFileList(f) || a.endsWith(m, "[]")) && (w = a.toArray(f)))
560
+ return m = lt(m), w.forEach(function(S, x) {
539
561
  !(a.isUndefined(S) || S === null) && t.append(
540
562
  // eslint-disable-next-line no-nested-ternary
541
- i === !0 ? Ue([m], x, s) : i === null ? m : m + "[]",
563
+ i === !0 ? _e([m], x, s) : i === null ? m : m + "[]",
542
564
  u(S)
543
565
  );
544
566
  }), !1;
545
567
  }
546
- return xe(d) ? !0 : (t.append(Ue(h, m, s), u(d)), !1);
568
+ return xe(f) ? !0 : (t.append(_e(h, m, s), u(f)), !1);
547
569
  }
548
- const f = [], g = Object.assign(bn, {
570
+ const d = [], g = Object.assign(bn, {
549
571
  defaultVisitor: c,
550
572
  convertValue: u,
551
573
  isVisitable: xe
552
574
  });
553
- function E(d, m) {
554
- if (!a.isUndefined(d)) {
555
- if (f.indexOf(d) !== -1)
575
+ function E(f, m) {
576
+ if (!a.isUndefined(f)) {
577
+ if (d.indexOf(f) !== -1)
556
578
  throw Error("Circular reference detected in " + m.join("."));
557
- f.push(d), a.forEach(d, function(w, C) {
579
+ d.push(f), a.forEach(f, function(w, C) {
558
580
  (!(a.isUndefined(w) || w === null) && o.call(
559
581
  t,
560
582
  w,
@@ -562,14 +584,14 @@ function fe(e, t, n) {
562
584
  m,
563
585
  g
564
586
  )) === !0 && E(w, m ? m.concat(C) : [C]);
565
- }), f.pop();
587
+ }), d.pop();
566
588
  }
567
589
  }
568
590
  if (!a.isObject(e))
569
591
  throw new TypeError("data must be an object");
570
592
  return E(e), t;
571
593
  }
572
- function _e(e) {
594
+ function Le(e) {
573
595
  const t = {
574
596
  "!": "%21",
575
597
  "'": "%27",
@@ -586,14 +608,14 @@ function _e(e) {
586
608
  function Ce(e, t) {
587
609
  this._pairs = [], e && fe(e, this, t);
588
610
  }
589
- const lt = Ce.prototype;
590
- lt.append = function(t, n) {
611
+ const ct = Ce.prototype;
612
+ ct.append = function(t, n) {
591
613
  this._pairs.push([t, n]);
592
614
  };
593
- lt.toString = function(t) {
615
+ ct.toString = function(t) {
594
616
  const n = t ? function(r) {
595
- return t.call(this, r, _e);
596
- } : _e;
617
+ return t.call(this, r, Le);
618
+ } : Le;
597
619
  return this._pairs.map(function(o) {
598
620
  return n(o[0]) + "=" + n(o[1]);
599
621
  }, "").join("&");
@@ -601,7 +623,7 @@ lt.toString = function(t) {
601
623
  function gn(e) {
602
624
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
603
625
  }
604
- function ct(e, t, n) {
626
+ function ut(e, t, n) {
605
627
  if (!t)
606
628
  return e;
607
629
  const r = n && n.encode || gn;
@@ -616,7 +638,7 @@ function ct(e, t, n) {
616
638
  }
617
639
  return e;
618
640
  }
619
- class Le {
641
+ class Be {
620
642
  constructor() {
621
643
  this.handlers = [];
622
644
  }
@@ -670,7 +692,7 @@ class Le {
670
692
  });
671
693
  }
672
694
  }
673
- const ut = {
695
+ const dt = {
674
696
  silentJSONParsing: !0,
675
697
  forcedJSONParsing: !0,
676
698
  clarifyTimeoutError: !1
@@ -690,14 +712,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Tn
690
712
  hasStandardBrowserWebWorkerEnv: Cn,
691
713
  navigator: we,
692
714
  origin: Tn
693
- }, Symbol.toStringTag, { value: "Module" })), k = {
715
+ }, Symbol.toStringTag, { value: "Module" })), N = {
694
716
  ...On,
695
717
  ...En
696
718
  };
697
719
  function An(e, t) {
698
- return fe(e, new k.classes.URLSearchParams(), {
720
+ return fe(e, new N.classes.URLSearchParams(), {
699
721
  visitor: function(n, r, o, s) {
700
- return k.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
722
+ return N.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
701
723
  },
702
724
  ...t
703
725
  });
@@ -714,7 +736,7 @@ function Fn(e) {
714
736
  s = n[r], t[s] = e[s];
715
737
  return t;
716
738
  }
717
- function dt(e) {
739
+ function ft(e) {
718
740
  function t(n, r, o, s) {
719
741
  let i = n[s++];
720
742
  if (i === "__proto__") return !0;
@@ -739,13 +761,13 @@ function Nn(e, t, n) {
739
761
  }
740
762
  return (n || JSON.stringify)(e);
741
763
  }
742
- const ee = {
743
- transitional: ut,
764
+ const te = {
765
+ transitional: dt,
744
766
  adapter: ["xhr", "http", "fetch"],
745
767
  transformRequest: [function(t, n) {
746
768
  const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = a.isObject(t);
747
769
  if (s && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
748
- return o ? JSON.stringify(dt(t)) : t;
770
+ return o ? JSON.stringify(ft(t)) : t;
749
771
  if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
750
772
  return t;
751
773
  if (a.isArrayBufferView(t))
@@ -768,7 +790,7 @@ const ee = {
768
790
  return s || o ? (n.setContentType("application/json", !1), Nn(t)) : t;
769
791
  }],
770
792
  transformResponse: [function(t) {
771
- const n = this.transitional || ee.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
793
+ const n = this.transitional || te.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
772
794
  if (a.isResponse(t) || a.isReadableStream(t))
773
795
  return t;
774
796
  if (t && a.isString(t) && (r && !this.responseType || o)) {
@@ -777,7 +799,7 @@ const ee = {
777
799
  return JSON.parse(t, this.parseReviver);
778
800
  } catch (l) {
779
801
  if (i)
780
- throw l.name === "SyntaxError" ? y.from(l, y.ERR_BAD_RESPONSE, this, null, this.response) : l;
802
+ throw l.name === "SyntaxError" ? b.from(l, b.ERR_BAD_RESPONSE, this, null, this.response) : l;
781
803
  }
782
804
  }
783
805
  return t;
@@ -792,8 +814,8 @@ const ee = {
792
814
  maxContentLength: -1,
793
815
  maxBodyLength: -1,
794
816
  env: {
795
- FormData: k.classes.FormData,
796
- Blob: k.classes.Blob
817
+ FormData: N.classes.FormData,
818
+ Blob: N.classes.Blob
797
819
  },
798
820
  validateStatus: function(t) {
799
821
  return t >= 200 && t < 300;
@@ -806,7 +828,7 @@ const ee = {
806
828
  }
807
829
  };
808
830
  a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
809
- ee.headers[e] = {};
831
+ te.headers[e] = {};
810
832
  });
811
833
  const Pn = a.toObjectSet([
812
834
  "age",
@@ -833,7 +855,7 @@ const Pn = a.toObjectSet([
833
855
  `).forEach(function(i) {
834
856
  o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && Pn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
835
857
  }), t;
836
- }, Be = Symbol("internals");
858
+ }, De = Symbol("internals");
837
859
  function G(e) {
838
860
  return e && String(e).trim().toLowerCase();
839
861
  }
@@ -872,7 +894,7 @@ function Dn(e, t) {
872
894
  });
873
895
  });
874
896
  }
875
- let U = class {
897
+ let _ = class {
876
898
  constructor(t) {
877
899
  t && this.set(t);
878
900
  }
@@ -882,8 +904,8 @@ let U = class {
882
904
  const c = G(p);
883
905
  if (!c)
884
906
  throw new Error("header name must be a non-empty string");
885
- const f = a.findKey(o, c);
886
- (!f || o[f] === void 0 || u === !0 || u === void 0 && o[f] !== !1) && (o[f || p] = ie(l));
907
+ const d = a.findKey(o, c);
908
+ (!d || o[d] === void 0 || u === !0 || u === void 0 && o[d] !== !1) && (o[d || p] = ie(l));
887
909
  }
888
910
  const i = (l, p) => a.forEach(l, (u, c) => s(u, c, p));
889
911
  if (a.isPlainObject(t) || t instanceof this.constructor)
@@ -988,7 +1010,7 @@ let U = class {
988
1010
  return n.forEach((o) => r.set(o)), r;
989
1011
  }
990
1012
  static accessor(t) {
991
- const r = (this[Be] = this[Be] = {
1013
+ const r = (this[De] = this[De] = {
992
1014
  accessors: {}
993
1015
  }).accessors, o = this.prototype;
994
1016
  function s(i) {
@@ -998,8 +1020,8 @@ let U = class {
998
1020
  return a.isArray(t) ? t.forEach(s) : s(t), this;
999
1021
  }
1000
1022
  };
1001
- U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1002
- a.reduceDescriptors(U.prototype, ({ value: e }, t) => {
1023
+ _.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1024
+ a.reduceDescriptors(_.prototype, ({ value: e }, t) => {
1003
1025
  let n = t[0].toUpperCase() + t.slice(1);
1004
1026
  return {
1005
1027
  get: () => e,
@@ -1008,28 +1030,28 @@ a.reduceDescriptors(U.prototype, ({ value: e }, t) => {
1008
1030
  }
1009
1031
  };
1010
1032
  });
1011
- a.freezeMethods(U);
1033
+ a.freezeMethods(_);
1012
1034
  function ye(e, t) {
1013
- const n = this || ee, r = t || n, o = U.from(r.headers);
1035
+ const n = this || te, r = t || n, o = _.from(r.headers);
1014
1036
  let s = r.data;
1015
1037
  return a.forEach(e, function(l) {
1016
1038
  s = l.call(n, s, o.normalize(), t ? t.status : void 0);
1017
1039
  }), o.normalize(), s;
1018
1040
  }
1019
- function ft(e) {
1041
+ function pt(e) {
1020
1042
  return !!(e && e.__CANCEL__);
1021
1043
  }
1022
- function K(e, t, n) {
1023
- y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
1044
+ function X(e, t, n) {
1045
+ b.call(this, e ?? "canceled", b.ERR_CANCELED, t, n), this.name = "CanceledError";
1024
1046
  }
1025
- a.inherits(K, y, {
1047
+ a.inherits(X, b, {
1026
1048
  __CANCEL__: !0
1027
1049
  });
1028
- function pt(e, t, n) {
1050
+ function ht(e, t, n) {
1029
1051
  const r = n.config.validateStatus;
1030
- !n.status || !r || r(n.status) ? e(n) : t(new y(
1052
+ !n.status || !r || r(n.status) ? e(n) : t(new b(
1031
1053
  "Request failed with status code " + n.status,
1032
- [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1054
+ [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1033
1055
  n.config,
1034
1056
  n.request,
1035
1057
  n
@@ -1046,9 +1068,9 @@ function In(e, t) {
1046
1068
  return t = t !== void 0 ? t : 1e3, function(p) {
1047
1069
  const u = Date.now(), c = r[s];
1048
1070
  i || (i = u), n[o] = p, r[o] = u;
1049
- let f = s, g = 0;
1050
- for (; f !== o; )
1051
- g += n[f++], f = f % e;
1071
+ let d = s, g = 0;
1072
+ for (; d !== o; )
1073
+ g += n[d++], d = d % e;
1052
1074
  if (o = (o + 1) % e, o === s && (s = (s + 1) % e), u - i < t)
1053
1075
  return;
1054
1076
  const E = c && u - c;
@@ -1061,10 +1083,10 @@ function vn(e, t) {
1061
1083
  n = c, o = null, s && (clearTimeout(s), s = null), e(...u);
1062
1084
  };
1063
1085
  return [(...u) => {
1064
- const c = Date.now(), f = c - n;
1065
- f >= r ? i(u, c) : (o = u, s || (s = setTimeout(() => {
1086
+ const c = Date.now(), d = c - n;
1087
+ d >= r ? i(u, c) : (o = u, s || (s = setTimeout(() => {
1066
1088
  s = null, i(o);
1067
- }, r - f)));
1089
+ }, r - d)));
1068
1090
  }, () => o && i(o)];
1069
1091
  }
1070
1092
  const le = (e, t, n = 3) => {
@@ -1073,7 +1095,7 @@ const le = (e, t, n = 3) => {
1073
1095
  return vn((s) => {
1074
1096
  const i = s.loaded, l = s.lengthComputable ? s.total : void 0, p = i - r, u = o(p), c = i <= l;
1075
1097
  r = i;
1076
- const f = {
1098
+ const d = {
1077
1099
  loaded: i,
1078
1100
  total: l,
1079
1101
  progress: l ? i / l : void 0,
@@ -1084,19 +1106,19 @@ const le = (e, t, n = 3) => {
1084
1106
  lengthComputable: l != null,
1085
1107
  [t ? "download" : "upload"]: !0
1086
1108
  };
1087
- e(f);
1109
+ e(d);
1088
1110
  }, n);
1089
- }, De = (e, t) => {
1111
+ }, je = (e, t) => {
1090
1112
  const n = e != null;
1091
1113
  return [(r) => t[0]({
1092
1114
  lengthComputable: n,
1093
1115
  total: e,
1094
1116
  loaded: r
1095
1117
  }), t[1]];
1096
- }, je = (e) => (...t) => a.asap(() => e(...t)), Hn = k.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, k.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1097
- new URL(k.origin),
1098
- k.navigator && /(msie|trident)/i.test(k.navigator.userAgent)
1099
- ) : () => !0, qn = k.hasStandardBrowserEnv ? (
1118
+ }, Ie = (e) => (...t) => a.asap(() => e(...t)), zn = N.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, N.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1119
+ new URL(N.origin),
1120
+ N.navigator && /(msie|trident)/i.test(N.navigator.userAgent)
1121
+ ) : () => !0, Hn = N.hasStandardBrowserEnv ? (
1100
1122
  // Standard browser envs support document.cookie
1101
1123
  {
1102
1124
  write(e, t, n, r, o, s, i) {
@@ -1128,25 +1150,25 @@ const le = (e, t, n = 3) => {
1128
1150
  function Mn(e) {
1129
1151
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1130
1152
  }
1131
- function zn(e, t) {
1153
+ function qn(e, t) {
1132
1154
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1133
1155
  }
1134
- function ht(e, t, n) {
1156
+ function mt(e, t, n) {
1135
1157
  let r = !Mn(t);
1136
- return e && (r || n == !1) ? zn(e, t) : t;
1158
+ return e && (r || n == !1) ? qn(e, t) : t;
1137
1159
  }
1138
- const Ie = (e) => e instanceof U ? { ...e } : e;
1139
- function z(e, t) {
1160
+ const ve = (e) => e instanceof _ ? { ...e } : e;
1161
+ function $(e, t) {
1140
1162
  t = t || {};
1141
1163
  const n = {};
1142
- function r(u, c, f, g) {
1164
+ function r(u, c, d, g) {
1143
1165
  return a.isPlainObject(u) && a.isPlainObject(c) ? a.merge.call({ caseless: g }, u, c) : a.isPlainObject(c) ? a.merge({}, c) : a.isArray(c) ? c.slice() : c;
1144
1166
  }
1145
- function o(u, c, f, g) {
1167
+ function o(u, c, d, g) {
1146
1168
  if (a.isUndefined(c)) {
1147
1169
  if (!a.isUndefined(u))
1148
- return r(void 0, u, f, g);
1149
- } else return r(u, c, f, g);
1170
+ return r(void 0, u, d, g);
1171
+ } else return r(u, c, d, g);
1150
1172
  }
1151
1173
  function s(u, c) {
1152
1174
  if (!a.isUndefined(c))
@@ -1158,10 +1180,10 @@ function z(e, t) {
1158
1180
  return r(void 0, u);
1159
1181
  } else return r(void 0, c);
1160
1182
  }
1161
- function l(u, c, f) {
1162
- if (f in t)
1183
+ function l(u, c, d) {
1184
+ if (d in t)
1163
1185
  return r(u, c);
1164
- if (f in e)
1186
+ if (d in e)
1165
1187
  return r(void 0, u);
1166
1188
  }
1167
1189
  const p = {
@@ -1193,49 +1215,49 @@ function z(e, t) {
1193
1215
  socketPath: i,
1194
1216
  responseEncoding: i,
1195
1217
  validateStatus: l,
1196
- headers: (u, c, f) => o(Ie(u), Ie(c), f, !0)
1218
+ headers: (u, c, d) => o(ve(u), ve(c), d, !0)
1197
1219
  };
1198
1220
  return a.forEach(Object.keys({ ...e, ...t }), function(c) {
1199
- const f = p[c] || o, g = f(e[c], t[c], c);
1200
- a.isUndefined(g) && f !== l || (n[c] = g);
1221
+ const d = p[c] || o, g = d(e[c], t[c], c);
1222
+ a.isUndefined(g) && d !== l || (n[c] = g);
1201
1223
  }), n;
1202
1224
  }
1203
- const mt = (e) => {
1204
- const t = z({}, e);
1225
+ const yt = (e) => {
1226
+ const t = $({}, e);
1205
1227
  let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: l } = t;
1206
- if (t.headers = i = U.from(i), t.url = ct(ht(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && i.set(
1228
+ if (t.headers = i = _.from(i), t.url = ut(mt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && i.set(
1207
1229
  "Authorization",
1208
1230
  "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
1209
1231
  ), a.isFormData(n)) {
1210
- if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv)
1232
+ if (N.hasStandardBrowserEnv || N.hasStandardBrowserWebWorkerEnv)
1211
1233
  i.setContentType(void 0);
1212
1234
  else if (a.isFunction(n.getHeaders)) {
1213
1235
  const p = n.getHeaders(), u = ["content-type", "content-length"];
1214
- Object.entries(p).forEach(([c, f]) => {
1215
- u.includes(c.toLowerCase()) && i.set(c, f);
1236
+ Object.entries(p).forEach(([c, d]) => {
1237
+ u.includes(c.toLowerCase()) && i.set(c, d);
1216
1238
  });
1217
1239
  }
1218
1240
  }
1219
- if (k.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Hn(t.url))) {
1220
- const p = o && s && qn.read(s);
1241
+ if (N.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && zn(t.url))) {
1242
+ const p = o && s && Hn.read(s);
1221
1243
  p && i.set(o, p);
1222
1244
  }
1223
1245
  return t;
1224
1246
  }, $n = typeof XMLHttpRequest < "u", Wn = $n && function(e) {
1225
1247
  return new Promise(function(n, r) {
1226
- const o = mt(e);
1248
+ const o = yt(e);
1227
1249
  let s = o.data;
1228
- const i = U.from(o.headers).normalize();
1229
- let { responseType: l, onUploadProgress: p, onDownloadProgress: u } = o, c, f, g, E, d;
1250
+ const i = _.from(o.headers).normalize();
1251
+ let { responseType: l, onUploadProgress: p, onDownloadProgress: u } = o, c, d, g, E, f;
1230
1252
  function m() {
1231
- E && E(), d && d(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
1253
+ E && E(), f && f(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
1232
1254
  }
1233
1255
  let h = new XMLHttpRequest();
1234
1256
  h.open(o.method.toUpperCase(), o.url, !0), h.timeout = o.timeout;
1235
1257
  function w() {
1236
1258
  if (!h)
1237
1259
  return;
1238
- const S = U.from(
1260
+ const S = _.from(
1239
1261
  "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1240
1262
  ), T = {
1241
1263
  data: !l || l === "text" || l === "json" ? h.responseText : h.response,
@@ -1245,36 +1267,36 @@ const mt = (e) => {
1245
1267
  config: e,
1246
1268
  request: h
1247
1269
  };
1248
- pt(function(O) {
1249
- n(O), m();
1250
- }, function(O) {
1251
- r(O), m();
1270
+ ht(function(A) {
1271
+ n(A), m();
1272
+ }, function(A) {
1273
+ r(A), m();
1252
1274
  }, T), h = null;
1253
1275
  }
1254
1276
  "onloadend" in h ? h.onloadend = w : h.onreadystatechange = function() {
1255
1277
  !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(w);
1256
1278
  }, h.onabort = function() {
1257
- h && (r(new y("Request aborted", y.ECONNABORTED, e, h)), h = null);
1279
+ h && (r(new b("Request aborted", b.ECONNABORTED, e, h)), h = null);
1258
1280
  }, h.onerror = function(x) {
1259
- const T = x && x.message ? x.message : "Network Error", F = new y(T, y.ERR_NETWORK, e, h);
1260
- F.event = x || null, r(F), h = null;
1281
+ const T = x && x.message ? x.message : "Network Error", k = new b(T, b.ERR_NETWORK, e, h);
1282
+ k.event = x || null, r(k), h = null;
1261
1283
  }, h.ontimeout = function() {
1262
1284
  let x = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
1263
- const T = o.transitional || ut;
1264
- o.timeoutErrorMessage && (x = o.timeoutErrorMessage), r(new y(
1285
+ const T = o.transitional || dt;
1286
+ o.timeoutErrorMessage && (x = o.timeoutErrorMessage), r(new b(
1265
1287
  x,
1266
- T.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1288
+ T.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1267
1289
  e,
1268
1290
  h
1269
1291
  )), h = null;
1270
1292
  }, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(x, T) {
1271
1293
  h.setRequestHeader(T, x);
1272
- }), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), l && l !== "json" && (h.responseType = o.responseType), u && ([g, d] = le(u, !0), h.addEventListener("progress", g)), p && h.upload && ([f, E] = le(p), h.upload.addEventListener("progress", f), h.upload.addEventListener("loadend", E)), (o.cancelToken || o.signal) && (c = (S) => {
1273
- h && (r(!S || S.type ? new K(null, e, h) : S), h.abort(), h = null);
1294
+ }), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), l && l !== "json" && (h.responseType = o.responseType), u && ([g, f] = le(u, !0), h.addEventListener("progress", g)), p && h.upload && ([d, E] = le(p), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", E)), (o.cancelToken || o.signal) && (c = (S) => {
1295
+ h && (r(!S || S.type ? new X(null, e, h) : S), h.abort(), h = null);
1274
1296
  }, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
1275
1297
  const C = jn(o.url);
1276
- if (C && k.protocols.indexOf(C) === -1) {
1277
- r(new y("Unsupported protocol " + C + ":", y.ERR_BAD_REQUEST, e));
1298
+ if (C && N.protocols.indexOf(C) === -1) {
1299
+ r(new b("Unsupported protocol " + C + ":", b.ERR_BAD_REQUEST, e));
1278
1300
  return;
1279
1301
  }
1280
1302
  h.send(s || null);
@@ -1287,11 +1309,11 @@ const mt = (e) => {
1287
1309
  if (!o) {
1288
1310
  o = !0, l();
1289
1311
  const c = u instanceof Error ? u : this.reason;
1290
- r.abort(c instanceof y ? c : new K(c instanceof Error ? c.message : c));
1312
+ r.abort(c instanceof b ? c : new X(c instanceof Error ? c.message : c));
1291
1313
  }
1292
1314
  };
1293
1315
  let i = t && setTimeout(() => {
1294
- i = null, s(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
1316
+ i = null, s(new b(`timeout ${t} of ms exceeded`, b.ETIMEDOUT));
1295
1317
  }, t);
1296
1318
  const l = () => {
1297
1319
  e && (i && clearTimeout(i), i = null, e.forEach((u) => {
@@ -1330,7 +1352,7 @@ const mt = (e) => {
1330
1352
  } finally {
1331
1353
  await t.cancel();
1332
1354
  }
1333
- }, ve = (e, t, n, r) => {
1355
+ }, ze = (e, t, n, r) => {
1334
1356
  const o = Kn(e, t);
1335
1357
  let s = 0, i, l = (p) => {
1336
1358
  i || (i = !0, r && r(p));
@@ -1343,9 +1365,9 @@ const mt = (e) => {
1343
1365
  l(), p.close();
1344
1366
  return;
1345
1367
  }
1346
- let f = c.byteLength;
1368
+ let d = c.byteLength;
1347
1369
  if (n) {
1348
- let g = s += f;
1370
+ let g = s += d;
1349
1371
  n(g);
1350
1372
  }
1351
1373
  p.enqueue(new Uint8Array(c));
@@ -1359,65 +1381,65 @@ const mt = (e) => {
1359
1381
  }, {
1360
1382
  highWaterMark: 2
1361
1383
  });
1362
- }, He = 64 * 1024, { isFunction: oe } = a, Gn = (({ Request: e, Response: t }) => ({
1384
+ }, He = 64 * 1024, { isFunction: oe } = a, Yn = (({ Request: e, Response: t }) => ({
1363
1385
  Request: e,
1364
1386
  Response: t
1365
1387
  }))(a.global), {
1366
- ReadableStream: qe,
1367
- TextEncoder: Me
1368
- } = a.global, ze = (e, ...t) => {
1388
+ ReadableStream: Me,
1389
+ TextEncoder: qe
1390
+ } = a.global, $e = (e, ...t) => {
1369
1391
  try {
1370
1392
  return !!e(...t);
1371
1393
  } catch {
1372
1394
  return !1;
1373
1395
  }
1374
- }, Yn = (e) => {
1396
+ }, Gn = (e) => {
1375
1397
  e = a.merge.call({
1376
1398
  skipUndefined: !0
1377
- }, Gn, e);
1399
+ }, Yn, e);
1378
1400
  const { fetch: t, Request: n, Response: r } = e, o = t ? oe(t) : typeof fetch == "function", s = oe(n), i = oe(r);
1379
1401
  if (!o)
1380
1402
  return !1;
1381
- const l = o && oe(qe), p = o && (typeof Me == "function" ? /* @__PURE__ */ ((d) => (m) => d.encode(m))(new Me()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), u = s && l && ze(() => {
1382
- let d = !1;
1383
- const m = new n(k.origin, {
1384
- body: new qe(),
1403
+ const l = o && oe(Me), p = o && (typeof qe == "function" ? /* @__PURE__ */ ((f) => (m) => f.encode(m))(new qe()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), u = s && l && $e(() => {
1404
+ let f = !1;
1405
+ const m = new n(N.origin, {
1406
+ body: new Me(),
1385
1407
  method: "POST",
1386
1408
  get duplex() {
1387
- return d = !0, "half";
1409
+ return f = !0, "half";
1388
1410
  }
1389
1411
  }).headers.has("Content-Type");
1390
- return d && !m;
1391
- }), c = i && l && ze(() => a.isReadableStream(new r("").body)), f = {
1392
- stream: c && ((d) => d.body)
1412
+ return f && !m;
1413
+ }), c = i && l && $e(() => a.isReadableStream(new r("").body)), d = {
1414
+ stream: c && ((f) => f.body)
1393
1415
  };
1394
- o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
1395
- !f[d] && (f[d] = (m, h) => {
1396
- let w = m && m[d];
1416
+ o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
1417
+ !d[f] && (d[f] = (m, h) => {
1418
+ let w = m && m[f];
1397
1419
  if (w)
1398
1420
  return w.call(m);
1399
- throw new y(`Response type '${d}' is not supported`, y.ERR_NOT_SUPPORT, h);
1421
+ throw new b(`Response type '${f}' is not supported`, b.ERR_NOT_SUPPORT, h);
1400
1422
  });
1401
1423
  });
1402
- const g = async (d) => {
1403
- if (d == null)
1424
+ const g = async (f) => {
1425
+ if (f == null)
1404
1426
  return 0;
1405
- if (a.isBlob(d))
1406
- return d.size;
1407
- if (a.isSpecCompliantForm(d))
1408
- return (await new n(k.origin, {
1427
+ if (a.isBlob(f))
1428
+ return f.size;
1429
+ if (a.isSpecCompliantForm(f))
1430
+ return (await new n(N.origin, {
1409
1431
  method: "POST",
1410
- body: d
1432
+ body: f
1411
1433
  }).arrayBuffer()).byteLength;
1412
- if (a.isArrayBufferView(d) || a.isArrayBuffer(d))
1413
- return d.byteLength;
1414
- if (a.isURLSearchParams(d) && (d = d + ""), a.isString(d))
1415
- return (await p(d)).byteLength;
1416
- }, E = async (d, m) => {
1417
- const h = a.toFiniteNumber(d.getContentLength());
1434
+ if (a.isArrayBufferView(f) || a.isArrayBuffer(f))
1435
+ return f.byteLength;
1436
+ if (a.isURLSearchParams(f) && (f = f + ""), a.isString(f))
1437
+ return (await p(f)).byteLength;
1438
+ }, E = async (f, m) => {
1439
+ const h = a.toFiniteNumber(f.getContentLength());
1418
1440
  return h ?? g(m);
1419
1441
  };
1420
- return async (d) => {
1442
+ return async (f) => {
1421
1443
  let {
1422
1444
  url: m,
1423
1445
  method: h,
@@ -1426,84 +1448,84 @@ const mt = (e) => {
1426
1448
  cancelToken: S,
1427
1449
  timeout: x,
1428
1450
  onDownloadProgress: T,
1429
- onUploadProgress: F,
1430
- responseType: O,
1431
- headers: N,
1432
- withCredentials: _ = "same-origin",
1433
- fetchOptions: $
1434
- } = mt(d), te = t || fetch;
1435
- O = O ? (O + "").toLowerCase() : "text";
1436
- let ne = Jn([C, S && S.toAbortSignal()], x), X = null;
1437
- const H = ne && ne.unsubscribe && (() => {
1438
- ne.unsubscribe();
1451
+ onUploadProgress: k,
1452
+ responseType: A,
1453
+ headers: Y,
1454
+ withCredentials: W = "same-origin",
1455
+ fetchOptions: ne
1456
+ } = yt(f), F = t || fetch;
1457
+ A = A ? (A + "").toLowerCase() : "text";
1458
+ let P = Jn([C, S && S.toAbortSignal()], x), I = null;
1459
+ const v = P && P.unsubscribe && (() => {
1460
+ P.unsubscribe();
1439
1461
  });
1440
1462
  let Ae;
1441
1463
  try {
1442
- if (F && u && h !== "get" && h !== "head" && (Ae = await E(N, w)) !== 0) {
1443
- let v = new n(m, {
1464
+ if (k && u && h !== "get" && h !== "head" && (Ae = await E(Y, w)) !== 0) {
1465
+ let H = new n(m, {
1444
1466
  method: "POST",
1445
1467
  body: w,
1446
1468
  duplex: "half"
1447
- }), W;
1448
- if (a.isFormData(w) && (W = v.headers.get("content-type")) && N.setContentType(W), v.body) {
1449
- const [he, re] = De(
1469
+ }), J;
1470
+ if (a.isFormData(w) && (J = H.headers.get("content-type")) && Y.setContentType(J), H.body) {
1471
+ const [he, re] = je(
1450
1472
  Ae,
1451
- le(je(F))
1473
+ le(Ie(k))
1452
1474
  );
1453
- w = ve(v.body, He, he, re);
1475
+ w = ze(H.body, He, he, re);
1454
1476
  }
1455
1477
  }
1456
- a.isString(_) || (_ = _ ? "include" : "omit");
1457
- const B = s && "credentials" in n.prototype, ke = {
1458
- ...$,
1459
- signal: ne,
1478
+ a.isString(W) || (W = W ? "include" : "omit");
1479
+ const D = s && "credentials" in n.prototype, ke = {
1480
+ ...ne,
1481
+ signal: P,
1460
1482
  method: h.toUpperCase(),
1461
- headers: N.normalize().toJSON(),
1483
+ headers: Y.normalize().toJSON(),
1462
1484
  body: w,
1463
1485
  duplex: "half",
1464
- credentials: B ? _ : void 0
1486
+ credentials: D ? W : void 0
1465
1487
  };
1466
- X = s && new n(m, ke);
1467
- let I = await (s ? te(X, $) : te(m, ke));
1468
- const Fe = c && (O === "stream" || O === "response");
1469
- if (c && (T || Fe && H)) {
1470
- const v = {};
1488
+ I = s && new n(m, ke);
1489
+ let z = await (s ? F(I, ne) : F(m, ke));
1490
+ const Fe = c && (A === "stream" || A === "response");
1491
+ if (c && (T || Fe && v)) {
1492
+ const H = {};
1471
1493
  ["status", "statusText", "headers"].forEach((Ne) => {
1472
- v[Ne] = I[Ne];
1494
+ H[Ne] = z[Ne];
1473
1495
  });
1474
- const W = a.toFiniteNumber(I.headers.get("content-length")), [he, re] = T && De(
1475
- W,
1476
- le(je(T), !0)
1496
+ const J = a.toFiniteNumber(z.headers.get("content-length")), [he, re] = T && je(
1497
+ J,
1498
+ le(Ie(T), !0)
1477
1499
  ) || [];
1478
- I = new r(
1479
- ve(I.body, He, he, () => {
1480
- re && re(), H && H();
1500
+ z = new r(
1501
+ ze(z.body, He, he, () => {
1502
+ re && re(), v && v();
1481
1503
  }),
1482
- v
1504
+ H
1483
1505
  );
1484
1506
  }
1485
- O = O || "text";
1486
- let Et = await f[a.findKey(f, O) || "text"](I, d);
1487
- return !Fe && H && H(), await new Promise((v, W) => {
1488
- pt(v, W, {
1489
- data: Et,
1490
- headers: U.from(I.headers),
1491
- status: I.status,
1492
- statusText: I.statusText,
1493
- config: d,
1494
- request: X
1507
+ A = A || "text";
1508
+ let Rt = await d[a.findKey(d, A) || "text"](z, f);
1509
+ return !Fe && v && v(), await new Promise((H, J) => {
1510
+ ht(H, J, {
1511
+ data: Rt,
1512
+ headers: _.from(z.headers),
1513
+ status: z.status,
1514
+ statusText: z.statusText,
1515
+ config: f,
1516
+ request: I
1495
1517
  });
1496
1518
  });
1497
- } catch (B) {
1498
- throw H && H(), B && B.name === "TypeError" && /Load failed|fetch/i.test(B.message) ? Object.assign(
1499
- new y("Network Error", y.ERR_NETWORK, d, X),
1519
+ } catch (D) {
1520
+ throw v && v(), D && D.name === "TypeError" && /Load failed|fetch/i.test(D.message) ? Object.assign(
1521
+ new b("Network Error", b.ERR_NETWORK, f, I),
1500
1522
  {
1501
- cause: B.cause || B
1523
+ cause: D.cause || D
1502
1524
  }
1503
- ) : y.from(B, B && B.code, d, X);
1525
+ ) : b.from(D, D && D.code, f, I);
1504
1526
  }
1505
1527
  };
1506
- }, Qn = /* @__PURE__ */ new Map(), yt = (e) => {
1528
+ }, Qn = /* @__PURE__ */ new Map(), bt = (e) => {
1507
1529
  let t = e && e.env || {};
1508
1530
  const { fetch: n, Request: r, Response: o } = t, s = [
1509
1531
  r,
@@ -1512,15 +1534,15 @@ const mt = (e) => {
1512
1534
  ];
1513
1535
  let i = s.length, l = i, p, u, c = Qn;
1514
1536
  for (; l--; )
1515
- p = s[l], u = c.get(p), u === void 0 && c.set(p, u = l ? /* @__PURE__ */ new Map() : Yn(t)), c = u;
1537
+ p = s[l], u = c.get(p), u === void 0 && c.set(p, u = l ? /* @__PURE__ */ new Map() : Gn(t)), c = u;
1516
1538
  return u;
1517
1539
  };
1518
- yt();
1540
+ bt();
1519
1541
  const Oe = {
1520
1542
  http: mn,
1521
1543
  xhr: Wn,
1522
1544
  fetch: {
1523
- get: yt
1545
+ get: bt
1524
1546
  }
1525
1547
  };
1526
1548
  a.forEach(Oe, (e, t) => {
@@ -1532,7 +1554,7 @@ a.forEach(Oe, (e, t) => {
1532
1554
  Object.defineProperty(e, "adapterName", { value: t });
1533
1555
  }
1534
1556
  });
1535
- const $e = (e) => `- ${e}`, Zn = (e) => a.isFunction(e) || e === null || e === !1;
1557
+ const We = (e) => `- ${e}`, Zn = (e) => a.isFunction(e) || e === null || e === !1;
1536
1558
  function er(e, t) {
1537
1559
  e = a.isArray(e) ? e : [e];
1538
1560
  const { length: n } = e;
@@ -1542,7 +1564,7 @@ function er(e, t) {
1542
1564
  r = e[i];
1543
1565
  let l;
1544
1566
  if (o = r, !Zn(r) && (o = Oe[(l = String(r)).toLowerCase()], o === void 0))
1545
- throw new y(`Unknown adapter '${l}'`);
1567
+ throw new b(`Unknown adapter '${l}'`);
1546
1568
  if (o && (a.isFunction(o) || (o = o.get(t))))
1547
1569
  break;
1548
1570
  s[l || "#" + i] = o;
@@ -1552,16 +1574,16 @@ function er(e, t) {
1552
1574
  ([p, u]) => `adapter ${p} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
1553
1575
  );
1554
1576
  let l = n ? i.length > 1 ? `since :
1555
- ` + i.map($e).join(`
1556
- `) : " " + $e(i[0]) : "as no adapter specified";
1557
- throw new y(
1577
+ ` + i.map(We).join(`
1578
+ `) : " " + We(i[0]) : "as no adapter specified";
1579
+ throw new b(
1558
1580
  "There is no suitable adapter to dispatch the request " + l,
1559
1581
  "ERR_NOT_SUPPORT"
1560
1582
  );
1561
1583
  }
1562
1584
  return o;
1563
1585
  }
1564
- const bt = {
1586
+ const gt = {
1565
1587
  /**
1566
1588
  * Resolve an adapter from a list of adapter names or functions.
1567
1589
  * @type {Function}
@@ -1575,44 +1597,44 @@ const bt = {
1575
1597
  };
1576
1598
  function be(e) {
1577
1599
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1578
- throw new K(null, e);
1600
+ throw new X(null, e);
1579
1601
  }
1580
- function We(e) {
1581
- return be(e), e.headers = U.from(e.headers), e.data = ye.call(
1602
+ function Je(e) {
1603
+ return be(e), e.headers = _.from(e.headers), e.data = ye.call(
1582
1604
  e,
1583
1605
  e.transformRequest
1584
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), bt.getAdapter(e.adapter || ee.adapter, e)(e).then(function(r) {
1606
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), gt.getAdapter(e.adapter || te.adapter, e)(e).then(function(r) {
1585
1607
  return be(e), r.data = ye.call(
1586
1608
  e,
1587
1609
  e.transformResponse,
1588
1610
  r
1589
- ), r.headers = U.from(r.headers), r;
1611
+ ), r.headers = _.from(r.headers), r;
1590
1612
  }, function(r) {
1591
- return ft(r) || (be(e), r && r.response && (r.response.data = ye.call(
1613
+ return pt(r) || (be(e), r && r.response && (r.response.data = ye.call(
1592
1614
  e,
1593
1615
  e.transformResponse,
1594
1616
  r.response
1595
- ), r.response.headers = U.from(r.response.headers))), Promise.reject(r);
1617
+ ), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
1596
1618
  });
1597
1619
  }
1598
- const gt = "1.13.2", pe = {};
1620
+ const xt = "1.13.2", pe = {};
1599
1621
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1600
1622
  pe[e] = function(r) {
1601
1623
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1602
1624
  };
1603
1625
  });
1604
- const Je = {};
1626
+ const Ve = {};
1605
1627
  pe.transitional = function(t, n, r) {
1606
1628
  function o(s, i) {
1607
- return "[Axios v" + gt + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
1629
+ return "[Axios v" + xt + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
1608
1630
  }
1609
1631
  return (s, i, l) => {
1610
1632
  if (t === !1)
1611
- throw new y(
1633
+ throw new b(
1612
1634
  o(i, " has been removed" + (n ? " in " + n : "")),
1613
- y.ERR_DEPRECATED
1635
+ b.ERR_DEPRECATED
1614
1636
  );
1615
- return n && !Je[i] && (Je[i] = !0, console.warn(
1637
+ return n && !Ve[i] && (Ve[i] = !0, console.warn(
1616
1638
  o(
1617
1639
  i,
1618
1640
  " has been deprecated since v" + n + " and will be removed in the near future"
@@ -1625,7 +1647,7 @@ pe.spelling = function(t) {
1625
1647
  };
1626
1648
  function tr(e, t, n) {
1627
1649
  if (typeof e != "object")
1628
- throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1650
+ throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
1629
1651
  const r = Object.keys(e);
1630
1652
  let o = r.length;
1631
1653
  for (; o-- > 0; ) {
@@ -1633,22 +1655,22 @@ function tr(e, t, n) {
1633
1655
  if (i) {
1634
1656
  const l = e[s], p = l === void 0 || i(l, s, e);
1635
1657
  if (p !== !0)
1636
- throw new y("option " + s + " must be " + p, y.ERR_BAD_OPTION_VALUE);
1658
+ throw new b("option " + s + " must be " + p, b.ERR_BAD_OPTION_VALUE);
1637
1659
  continue;
1638
1660
  }
1639
1661
  if (n !== !0)
1640
- throw new y("Unknown option " + s, y.ERR_BAD_OPTION);
1662
+ throw new b("Unknown option " + s, b.ERR_BAD_OPTION);
1641
1663
  }
1642
1664
  }
1643
1665
  const ae = {
1644
1666
  assertOptions: tr,
1645
1667
  validators: pe
1646
- }, D = ae.validators;
1647
- let M = class {
1668
+ }, j = ae.validators;
1669
+ let q = class {
1648
1670
  constructor(t) {
1649
1671
  this.defaults = t || {}, this.interceptors = {
1650
- request: new Le(),
1651
- response: new Le()
1672
+ request: new Be(),
1673
+ response: new Be()
1652
1674
  };
1653
1675
  }
1654
1676
  /**
@@ -1677,20 +1699,20 @@ let M = class {
1677
1699
  }
1678
1700
  }
1679
1701
  _request(t, n) {
1680
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = z(this.defaults, n);
1702
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = $(this.defaults, n);
1681
1703
  const { transitional: r, paramsSerializer: o, headers: s } = n;
1682
1704
  r !== void 0 && ae.assertOptions(r, {
1683
- silentJSONParsing: D.transitional(D.boolean),
1684
- forcedJSONParsing: D.transitional(D.boolean),
1685
- clarifyTimeoutError: D.transitional(D.boolean)
1705
+ silentJSONParsing: j.transitional(j.boolean),
1706
+ forcedJSONParsing: j.transitional(j.boolean),
1707
+ clarifyTimeoutError: j.transitional(j.boolean)
1686
1708
  }, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
1687
1709
  serialize: o
1688
1710
  } : ae.assertOptions(o, {
1689
- encode: D.function,
1690
- serialize: D.function
1711
+ encode: j.function,
1712
+ serialize: j.function
1691
1713
  }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ae.assertOptions(n, {
1692
- baseUrl: D.spelling("baseURL"),
1693
- withXsrfToken: D.spelling("withXSRFToken")
1714
+ baseUrl: j.spelling("baseURL"),
1715
+ withXsrfToken: j.spelling("withXSRFToken")
1694
1716
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1695
1717
  let i = s && a.merge(
1696
1718
  s.common,
@@ -1698,10 +1720,10 @@ let M = class {
1698
1720
  );
1699
1721
  s && a.forEach(
1700
1722
  ["delete", "get", "head", "post", "put", "patch", "common"],
1701
- (d) => {
1702
- delete s[d];
1723
+ (f) => {
1724
+ delete s[f];
1703
1725
  }
1704
- ), n.headers = U.concat(i, s);
1726
+ ), n.headers = _.concat(i, s);
1705
1727
  const l = [];
1706
1728
  let p = !0;
1707
1729
  this.interceptors.request.forEach(function(m) {
@@ -1711,42 +1733,42 @@ let M = class {
1711
1733
  this.interceptors.response.forEach(function(m) {
1712
1734
  u.push(m.fulfilled, m.rejected);
1713
1735
  });
1714
- let c, f = 0, g;
1736
+ let c, d = 0, g;
1715
1737
  if (!p) {
1716
- const d = [We.bind(this), void 0];
1717
- for (d.unshift(...l), d.push(...u), g = d.length, c = Promise.resolve(n); f < g; )
1718
- c = c.then(d[f++], d[f++]);
1738
+ const f = [Je.bind(this), void 0];
1739
+ for (f.unshift(...l), f.push(...u), g = f.length, c = Promise.resolve(n); d < g; )
1740
+ c = c.then(f[d++], f[d++]);
1719
1741
  return c;
1720
1742
  }
1721
1743
  g = l.length;
1722
1744
  let E = n;
1723
- for (; f < g; ) {
1724
- const d = l[f++], m = l[f++];
1745
+ for (; d < g; ) {
1746
+ const f = l[d++], m = l[d++];
1725
1747
  try {
1726
- E = d(E);
1748
+ E = f(E);
1727
1749
  } catch (h) {
1728
1750
  m.call(this, h);
1729
1751
  break;
1730
1752
  }
1731
1753
  }
1732
1754
  try {
1733
- c = We.call(this, E);
1734
- } catch (d) {
1735
- return Promise.reject(d);
1755
+ c = Je.call(this, E);
1756
+ } catch (f) {
1757
+ return Promise.reject(f);
1736
1758
  }
1737
- for (f = 0, g = u.length; f < g; )
1738
- c = c.then(u[f++], u[f++]);
1759
+ for (d = 0, g = u.length; d < g; )
1760
+ c = c.then(u[d++], u[d++]);
1739
1761
  return c;
1740
1762
  }
1741
1763
  getUri(t) {
1742
- t = z(this.defaults, t);
1743
- const n = ht(t.baseURL, t.url, t.allowAbsoluteUrls);
1744
- return ct(n, t.params, t.paramsSerializer);
1764
+ t = $(this.defaults, t);
1765
+ const n = mt(t.baseURL, t.url, t.allowAbsoluteUrls);
1766
+ return ut(n, t.params, t.paramsSerializer);
1745
1767
  }
1746
1768
  };
1747
1769
  a.forEach(["delete", "get", "head", "options"], function(t) {
1748
- M.prototype[t] = function(n, r) {
1749
- return this.request(z(r || {}, {
1770
+ q.prototype[t] = function(n, r) {
1771
+ return this.request($(r || {}, {
1750
1772
  method: t,
1751
1773
  url: n,
1752
1774
  data: (r || {}).data
@@ -1756,7 +1778,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
1756
1778
  a.forEach(["post", "put", "patch"], function(t) {
1757
1779
  function n(r) {
1758
1780
  return function(s, i, l) {
1759
- return this.request(z(l || {}, {
1781
+ return this.request($(l || {}, {
1760
1782
  method: t,
1761
1783
  headers: r ? {
1762
1784
  "Content-Type": "multipart/form-data"
@@ -1766,9 +1788,9 @@ a.forEach(["post", "put", "patch"], function(t) {
1766
1788
  }));
1767
1789
  };
1768
1790
  }
1769
- M.prototype[t] = n(), M.prototype[t + "Form"] = n(!0);
1791
+ q.prototype[t] = n(), q.prototype[t + "Form"] = n(!0);
1770
1792
  });
1771
- let nr = class xt {
1793
+ let nr = class wt {
1772
1794
  constructor(t) {
1773
1795
  if (typeof t != "function")
1774
1796
  throw new TypeError("executor must be a function.");
@@ -1792,7 +1814,7 @@ let nr = class xt {
1792
1814
  r.unsubscribe(s);
1793
1815
  }, i;
1794
1816
  }, t(function(s, i, l) {
1795
- r.reason || (r.reason = new K(s, i, l), n(r.reason));
1817
+ r.reason || (r.reason = new X(s, i, l), n(r.reason));
1796
1818
  });
1797
1819
  }
1798
1820
  /**
@@ -1834,7 +1856,7 @@ let nr = class xt {
1834
1856
  static source() {
1835
1857
  let t;
1836
1858
  return {
1837
- token: new xt(function(o) {
1859
+ token: new wt(function(o) {
1838
1860
  t = o;
1839
1861
  }),
1840
1862
  cancel: t
@@ -1923,30 +1945,30 @@ const Se = {
1923
1945
  Object.entries(Se).forEach(([e, t]) => {
1924
1946
  Se[t] = e;
1925
1947
  });
1926
- function wt(e) {
1927
- const t = new M(e), n = Ye(M.prototype.request, t);
1928
- return a.extend(n, M.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
1929
- return wt(z(e, o));
1948
+ function St(e) {
1949
+ const t = new q(e), n = Qe(q.prototype.request, t);
1950
+ return a.extend(n, q.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
1951
+ return St($(e, o));
1930
1952
  }, n;
1931
1953
  }
1932
- const R = wt(ee);
1933
- R.Axios = M;
1934
- R.CanceledError = K;
1954
+ const R = St(te);
1955
+ R.Axios = q;
1956
+ R.CanceledError = X;
1935
1957
  R.CancelToken = nr;
1936
- R.isCancel = ft;
1937
- R.VERSION = gt;
1958
+ R.isCancel = pt;
1959
+ R.VERSION = xt;
1938
1960
  R.toFormData = fe;
1939
- R.AxiosError = y;
1961
+ R.AxiosError = b;
1940
1962
  R.Cancel = R.CanceledError;
1941
1963
  R.all = function(t) {
1942
1964
  return Promise.all(t);
1943
1965
  };
1944
1966
  R.spread = rr;
1945
1967
  R.isAxiosError = or;
1946
- R.mergeConfig = z;
1947
- R.AxiosHeaders = U;
1948
- R.formToJSON = (e) => dt(a.isHTMLForm(e) ? new FormData(e) : e);
1949
- R.getAdapter = bt.getAdapter;
1968
+ R.mergeConfig = $;
1969
+ R.AxiosHeaders = _;
1970
+ R.formToJSON = (e) => ft(a.isHTMLForm(e) ? new FormData(e) : e);
1971
+ R.getAdapter = gt.getAdapter;
1950
1972
  R.HttpStatusCode = Se;
1951
1973
  R.default = R;
1952
1974
  const {
@@ -1966,7 +1988,7 @@ const {
1966
1988
  formToJSON: Or,
1967
1989
  getAdapter: Ar,
1968
1990
  mergeConfig: kr
1969
- } = R, St = async (e, t, n, r) => {
1991
+ } = R, Et = async (e, t, n, r) => {
1970
1992
  const o = {
1971
1993
  chatInput: e,
1972
1994
  sessionId: t,
@@ -1975,7 +1997,7 @@ const {
1975
1997
  }
1976
1998
  };
1977
1999
  try {
1978
- return (await R.post(
2000
+ const s = await R.post(
1979
2001
  r,
1980
2002
  o,
1981
2003
  {
@@ -1983,30 +2005,33 @@ const {
1983
2005
  "Content-Type": "application/json"
1984
2006
  }
1985
2007
  }
1986
- )).data.output;
2008
+ ), i = s.data.response;
2009
+ return console.log("API response:", s), i;
1987
2010
  } catch (s) {
1988
2011
  throw console.error("Error communicating with chat API:", s), s;
1989
2012
  }
1990
2013
  }, sr = ({ handleMessageFromForm: e, theme: t, chatBotData: n }) => {
1991
- const [r, o] = j(""), [s, i] = j(""), [l, p] = j(""), [u, c] = j(!1), f = async (x) => {
2014
+ const [r, o] = L(""), [s, i] = L(""), [l, p] = L(""), [u, c] = L(!1), d = async (x) => {
1992
2015
  if (x.preventDefault(), c(!0), p(""), !r.trim() || !s.trim()) {
1993
2016
  p("Name and email are required"), c(!1);
1994
2017
  return;
1995
2018
  }
1996
2019
  const T = `Hi, I am ${r} and my email is ${s}`;
1997
2020
  try {
1998
- const O = (await St(
2021
+ const k = await Et(
1999
2022
  T,
2000
2023
  n.sessionId,
2001
2024
  n.pineconeNamespace,
2002
2025
  n.url
2003
- )).response;
2026
+ );
2027
+ console.log("metaData from user form:", k);
2028
+ const A = k.output;
2004
2029
  e([
2005
2030
  { type: "user", text: T },
2006
- { type: "bot", text: O }
2031
+ { type: "bot", text: A }
2007
2032
  ]);
2008
- } catch (F) {
2009
- console.log("error sending user details", F), p("Failed to submit. Please try again.");
2033
+ } catch (k) {
2034
+ console.log("error sending user details", k), p("Failed to submit. Please try again.");
2010
2035
  } finally {
2011
2036
  c(!1);
2012
2037
  }
@@ -2020,7 +2045,7 @@ const {
2020
2045
  display: "flex",
2021
2046
  flexDirection: "column",
2022
2047
  gap: "24px"
2023
- }, d = {
2048
+ }, f = {
2024
2049
  fontSize: "14px",
2025
2050
  fontWeight: "500",
2026
2051
  color: t.fontColor,
@@ -2061,8 +2086,8 @@ const {
2061
2086
  marginTop: "80px",
2062
2087
  transition: "all 0.2s ease"
2063
2088
  };
2064
- return /* @__PURE__ */ b("div", { style: g, children: /* @__PURE__ */ A("form", { onSubmit: f, style: E, children: [
2065
- l && /* @__PURE__ */ b("div", { style: {
2089
+ return /* @__PURE__ */ y("div", { style: g, children: /* @__PURE__ */ O("form", { onSubmit: d, style: E, children: [
2090
+ l && /* @__PURE__ */ y("div", { style: {
2066
2091
  backgroundColor: "#fee2e2",
2067
2092
  color: "#713f12",
2068
2093
  padding: "8px 12px",
@@ -2071,11 +2096,11 @@ const {
2071
2096
  textAlign: "center",
2072
2097
  fontWeight: "500"
2073
2098
  }, role: "alert", children: l }),
2074
- /* @__PURE__ */ b("p", { style: d, children: n.welcomeText }),
2075
- /* @__PURE__ */ A("div", { style: m, children: [
2076
- /* @__PURE__ */ A("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
2077
- /* @__PURE__ */ b("label", { style: h, children: "Full Name" }),
2078
- /* @__PURE__ */ b(
2099
+ /* @__PURE__ */ y("p", { style: f, children: n.welcomeText }),
2100
+ /* @__PURE__ */ O("div", { style: m, children: [
2101
+ /* @__PURE__ */ O("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
2102
+ /* @__PURE__ */ y("label", { style: h, children: "Full Name" }),
2103
+ /* @__PURE__ */ y(
2079
2104
  "input",
2080
2105
  {
2081
2106
  type: "text",
@@ -2089,9 +2114,9 @@ const {
2089
2114
  }
2090
2115
  )
2091
2116
  ] }),
2092
- /* @__PURE__ */ A("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
2093
- /* @__PURE__ */ b("label", { style: h, children: "Email Address" }),
2094
- /* @__PURE__ */ b(
2117
+ /* @__PURE__ */ O("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
2118
+ /* @__PURE__ */ y("label", { style: h, children: "Email Address" }),
2119
+ /* @__PURE__ */ y(
2095
2120
  "input",
2096
2121
  {
2097
2122
  type: "email",
@@ -2106,7 +2131,7 @@ const {
2106
2131
  )
2107
2132
  ] })
2108
2133
  ] }),
2109
- /* @__PURE__ */ b(
2134
+ /* @__PURE__ */ y(
2110
2135
  "button",
2111
2136
  {
2112
2137
  type: "submit",
@@ -2118,15 +2143,15 @@ const {
2118
2143
  onMouseLeave: (x) => {
2119
2144
  x.currentTarget.style.transform = "translateY(0)", x.currentTarget.style.boxShadow = "none";
2120
2145
  },
2121
- children: u ? "Submitting..." : /* @__PURE__ */ A(Ee, { children: [
2122
- /* @__PURE__ */ b(Ge, { size: 18 }),
2146
+ children: u ? "Submitting..." : /* @__PURE__ */ O(Ee, { children: [
2147
+ /* @__PURE__ */ y(Ge, { size: 18 }),
2123
2148
  "Submit"
2124
2149
  ] })
2125
2150
  }
2126
2151
  )
2127
2152
  ] }) });
2128
2153
  }, ir = ({ onClose: e, theme: t, chatBotData: n }) => {
2129
- const [r, o] = j([]), [s, i] = j(!1), [l, p] = j(!1), c = {
2154
+ const [r, o] = L([]), [s, i] = L(!1), [l, p] = L(!1), [u, c] = L(null), g = {
2130
2155
  position: "fixed",
2131
2156
  bottom: "112px",
2132
2157
  // 28 + 84 (button height)
@@ -2145,7 +2170,7 @@ const {
2145
2170
  flexDirection: "column",
2146
2171
  overflow: "hidden",
2147
2172
  fontFamily: "system-ui, -apple-system, sans-serif"
2148
- }, f = {
2173
+ }, E = {
2149
2174
  padding: "16px 20px",
2150
2175
  background: `linear-gradient(135deg, ${t.primaryColor}, ${t.secondaryColor})`,
2151
2176
  color: t.fontColor,
@@ -2154,9 +2179,9 @@ const {
2154
2179
  alignItems: "center",
2155
2180
  justifyContent: "space-between",
2156
2181
  boxShadow: "0 4px 6px -1px rgba(0,0,0,0.1)"
2157
- }, g = {
2182
+ }, f = {
2158
2183
  position: "relative"
2159
- }, E = {
2184
+ }, m = {
2160
2185
  width: "44px",
2161
2186
  height: "44px",
2162
2187
  borderRadius: "50%",
@@ -2164,7 +2189,7 @@ const {
2164
2189
  display: "flex",
2165
2190
  alignItems: "center",
2166
2191
  justifyContent: "center"
2167
- }, d = {
2192
+ }, h = {
2168
2193
  position: "absolute",
2169
2194
  bottom: 0,
2170
2195
  right: 0,
@@ -2173,96 +2198,99 @@ const {
2173
2198
  backgroundColor: "#34d399",
2174
2199
  borderRadius: "50%",
2175
2200
  border: "3px solid white"
2176
- }, m = {
2201
+ }, w = {
2177
2202
  fontSize: "18px",
2178
2203
  fontWeight: "600",
2179
2204
  margin: 0,
2180
2205
  lineHeight: "1.2"
2181
- }, h = {
2206
+ }, C = {
2182
2207
  fontSize: "12px",
2183
2208
  opacity: 0.9,
2184
2209
  margin: 0,
2185
2210
  lineHeight: "1.3"
2186
- }, w = {
2211
+ }, S = {
2187
2212
  padding: "8px",
2188
2213
  borderRadius: "50%",
2189
2214
  background: "transparent",
2190
2215
  border: "none",
2191
2216
  cursor: "pointer",
2192
2217
  transition: "background 0.2s"
2193
- }, C = {
2218
+ }, x = {
2194
2219
  padding: "12px 20px",
2195
2220
  borderTop: "1px solid rgba(255,255,255,0.2)",
2196
2221
  background: t.backgroundColor,
2197
2222
  textAlign: "center"
2198
- }, S = {
2223
+ }, T = {
2199
2224
  fontSize: "11px",
2200
2225
  color: t.fontColor,
2201
2226
  letterSpacing: "0.5px"
2202
- }, x = {
2227
+ }, k = {
2203
2228
  fontWeight: "600"
2204
- }, T = (N, _) => {
2205
- N.currentTarget.style.background = _ ? "rgba(255,255,255,0.2)" : "transparent";
2206
- }, F = (N) => {
2207
- o(N), p(!0);
2208
- }, O = async (N) => {
2209
- i(!0), o((_) => [..._, { type: "user", text: N }]);
2229
+ }, A = (F, P) => {
2230
+ F.currentTarget.style.background = P ? "rgba(255,255,255,0.2)" : "transparent";
2231
+ }, Y = (F) => F ? new Date(F).toLocaleTimeString("en-AU", {
2232
+ hour: "2-digit",
2233
+ minute: "2-digit"
2234
+ }) : "", W = (F) => {
2235
+ o(F), p(!0);
2236
+ }, ne = async (F) => {
2237
+ i(!0), o((P) => [...P, { type: "user", text: F }]);
2210
2238
  try {
2211
- const $ = (await St(
2212
- N,
2239
+ const P = await Et(
2240
+ F,
2213
2241
  n.sessionId,
2214
2242
  n.pineconeNamespace,
2215
2243
  n.url
2216
- )).response;
2217
- o((te) => [...te, { type: "bot", text: $ }]);
2218
- } catch (_) {
2219
- console.error("Chat error:", _), o(($) => [
2220
- ...$,
2244
+ ), I = P.output;
2245
+ c(Y(P.response_timestamp)), o((v) => [...v, { type: "bot", text: I }]);
2246
+ } catch (P) {
2247
+ console.error("Chat error:", P), o((I) => [
2248
+ ...I,
2221
2249
  { type: "bot", text: "Sorry, something went wrong." }
2222
2250
  ]);
2223
2251
  } finally {
2224
2252
  i(!1);
2225
2253
  }
2226
2254
  };
2227
- return /* @__PURE__ */ A("div", { style: c, children: [
2228
- /* @__PURE__ */ A("div", { style: f, children: [
2229
- /* @__PURE__ */ A("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
2230
- /* @__PURE__ */ A("div", { style: g, children: [
2231
- /* @__PURE__ */ b("div", { style: E, children: /* @__PURE__ */ b(Xe, { size: 22 }) }),
2232
- /* @__PURE__ */ b("span", { style: d })
2255
+ return /* @__PURE__ */ O("div", { style: g, children: [
2256
+ /* @__PURE__ */ O("div", { style: E, children: [
2257
+ /* @__PURE__ */ O("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
2258
+ /* @__PURE__ */ O("div", { style: f, children: [
2259
+ /* @__PURE__ */ y("div", { style: m, children: /* @__PURE__ */ y(Ye, { size: 22 }) }),
2260
+ /* @__PURE__ */ y("span", { style: h })
2233
2261
  ] }),
2234
- /* @__PURE__ */ A("div", { children: [
2235
- /* @__PURE__ */ b("h3", { style: m, children: n.name }),
2236
- /* @__PURE__ */ b("p", { style: h, children: n.subTitle })
2262
+ /* @__PURE__ */ O("div", { children: [
2263
+ /* @__PURE__ */ y("h3", { style: w, children: n.name }),
2264
+ /* @__PURE__ */ y("p", { style: C, children: n.subTitle })
2237
2265
  ] })
2238
2266
  ] }),
2239
- /* @__PURE__ */ b(
2267
+ /* @__PURE__ */ y(
2240
2268
  "button",
2241
2269
  {
2242
2270
  onClick: e,
2243
2271
  "aria-label": "Close chat",
2244
- style: w,
2245
- onMouseEnter: (N) => T(N, !0),
2246
- onMouseLeave: (N) => T(N, !1),
2247
- children: /* @__PURE__ */ b(Ke, { size: 20 })
2272
+ style: S,
2273
+ onMouseEnter: (F) => A(F, !0),
2274
+ onMouseLeave: (F) => A(F, !1),
2275
+ children: /* @__PURE__ */ y(Xe, { size: 20 })
2248
2276
  }
2249
2277
  )
2250
2278
  ] }),
2251
- l ? /* @__PURE__ */ A(Ee, { children: [
2252
- /* @__PURE__ */ b(kt, { messages: r, isLoading: s, theme: t }),
2253
- /* @__PURE__ */ b(At, { onSendMessage: O, isLoading: s, theme: t })
2254
- ] }) : /* @__PURE__ */ b(
2279
+ l ? /* @__PURE__ */ O(Ee, { children: [
2280
+ /* @__PURE__ */ y(kt, { messages: r, isLoading: s, theme: t, botResponseTime: u }),
2281
+ /* @__PURE__ */ y(At, { onSendMessage: ne, isLoading: s, theme: t })
2282
+ ] }) : /* @__PURE__ */ y(
2255
2283
  sr,
2256
2284
  {
2257
- handleMessageFromForm: F,
2285
+ handleMessageFromForm: W,
2258
2286
  theme: t,
2259
2287
  chatBotData: n
2260
2288
  }
2261
2289
  ),
2262
- /* @__PURE__ */ b("div", { style: C, children: /* @__PURE__ */ A("p", { style: S, children: [
2290
+ /* @__PURE__ */ y("div", { style: x, children: /* @__PURE__ */ O("p", { style: T, children: [
2263
2291
  "powered by",
2264
2292
  " ",
2265
- /* @__PURE__ */ b("span", { style: x, children: "clone67.com" })
2293
+ /* @__PURE__ */ y("span", { style: k, children: "clone67.com" })
2266
2294
  ] }) })
2267
2295
  ] });
2268
2296
  }, Fr = ({
@@ -2278,11 +2306,11 @@ const {
2278
2306
  subTitle: u = "Typically replies instantly",
2279
2307
  welcomeText: c = "Hi! How can I help you today?"
2280
2308
  }) => {
2281
- const [f, g] = j(!1), [E, d] = j("");
2282
- Ve(() => {
2283
- d(Tt());
2309
+ const [d, g] = L(!1), [E, f] = L("");
2310
+ Ke(() => {
2311
+ f(Tt());
2284
2312
  }, []);
2285
- const m = () => g((F) => !F), h = {
2313
+ const m = () => g((k) => !k), h = {
2286
2314
  primaryColor: n,
2287
2315
  secondaryColor: r,
2288
2316
  backgroundColor: o,
@@ -2312,8 +2340,8 @@ const {
2312
2340
  zIndex: 1e4,
2313
2341
  pointerEvents: "auto"
2314
2342
  };
2315
- return /* @__PURE__ */ A(Ee, { children: [
2316
- f && /* @__PURE__ */ b("div", { style: x, children: /* @__PURE__ */ b(
2343
+ return /* @__PURE__ */ O(Ee, { children: [
2344
+ d && /* @__PURE__ */ y("div", { style: x, children: /* @__PURE__ */ y(
2317
2345
  ir,
2318
2346
  {
2319
2347
  onClose: m,
@@ -2321,11 +2349,11 @@ const {
2321
2349
  chatBotData: w
2322
2350
  }
2323
2351
  ) }),
2324
- /* @__PURE__ */ b("div", { style: T, children: /* @__PURE__ */ b(
2352
+ /* @__PURE__ */ y("div", { style: T, children: /* @__PURE__ */ y(
2325
2353
  Ot,
2326
2354
  {
2327
2355
  onClick: m,
2328
- isOpen: f,
2356
+ isOpen: d,
2329
2357
  theme: h,
2330
2358
  chatBotData: w
2331
2359
  }