ordify-chat-widget 1.1.3 → 1.1.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.esm.js CHANGED
@@ -1,9 +1,9 @@
1
- var Dn = Object.defineProperty;
2
- var zn = (e, t, r) => t in e ? Dn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var xt = (e, t, r) => zn(e, typeof t != "symbol" ? t + "" : t, r);
4
- import * as Lt from "react";
5
- import F, { useState as ee, useRef as ae, useEffect as Oe, useCallback as Z, useMemo as Ft, forwardRef as Hr, createElement as et, useContext as qr, useImperativeHandle as On, useLayoutEffect as Nn, createContext as Bn } from "react";
6
- var Gr = { exports: {} }, st = {};
1
+ var zn = Object.defineProperty;
2
+ var On = (e, t, r) => t in e ? zn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var kt = (e, t, r) => On(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import * as Ft from "react";
5
+ import F, { useState as ee, useRef as ae, useEffect as Oe, useCallback as Z, useMemo as Kt, forwardRef as qr, createElement as tt, useContext as Gr, useImperativeHandle as Nn, useLayoutEffect as Bn, createContext as Ln } from "react";
6
+ var Qr = { exports: {} }, it = {};
7
7
  /**
8
8
  * @license React
9
9
  * react-jsx-runtime.production.min.js
@@ -13,42 +13,42 @@ var Gr = { exports: {} }, st = {};
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- var Ln = F, Fn = Symbol.for("react.element"), Kn = Symbol.for("react.fragment"), Wn = Object.prototype.hasOwnProperty, Un = Ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Hn = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function Qr(e, t, r) {
16
+ var Fn = F, Kn = Symbol.for("react.element"), Wn = Symbol.for("react.fragment"), Un = Object.prototype.hasOwnProperty, Hn = Fn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, qn = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function Yr(e, t, r) {
18
18
  var n, o = {}, c = null, u = null;
19
19
  r !== void 0 && (c = "" + r), t.key !== void 0 && (c = "" + t.key), t.ref !== void 0 && (u = t.ref);
20
- for (n in t) Wn.call(t, n) && !Hn.hasOwnProperty(n) && (o[n] = t[n]);
20
+ for (n in t) Un.call(t, n) && !qn.hasOwnProperty(n) && (o[n] = t[n]);
21
21
  if (e && e.defaultProps) for (n in t = e.defaultProps, t) o[n] === void 0 && (o[n] = t[n]);
22
- return { $$typeof: Fn, type: e, key: c, ref: u, props: o, _owner: Un.current };
23
- }
24
- st.Fragment = Kn;
25
- st.jsx = Qr;
26
- st.jsxs = Qr;
27
- Gr.exports = st;
28
- var l = Gr.exports;
29
- function qe() {
22
+ return { $$typeof: Kn, type: e, key: c, ref: u, props: o, _owner: Hn.current };
23
+ }
24
+ it.Fragment = Wn;
25
+ it.jsx = Yr;
26
+ it.jsxs = Yr;
27
+ Qr.exports = it;
28
+ var l = Qr.exports;
29
+ function Ge() {
30
30
  return Math.random().toString(36).substr(2, 9);
31
31
  }
32
- function Ci(e) {
32
+ function Ai(e) {
33
33
  return new Intl.DateTimeFormat("en-US", {
34
34
  hour: "2-digit",
35
35
  minute: "2-digit",
36
36
  hour12: !0
37
37
  }).format(e);
38
38
  }
39
- function ji(e, t) {
39
+ function Ei(e, t) {
40
40
  let r;
41
41
  return (...n) => {
42
42
  clearTimeout(r), r = setTimeout(() => e(...n), t);
43
43
  };
44
44
  }
45
- function Ii(e, t) {
45
+ function Mi(e, t) {
46
46
  let r;
47
47
  return (...n) => {
48
48
  r || (e(...n), r = !0, setTimeout(() => r = !1, t));
49
49
  };
50
50
  }
51
- function cr(e) {
51
+ function lr(e) {
52
52
  let t = e.replace(/\r\n/g, `
53
53
  `);
54
54
  return t = t.replace(/\n\nUsing [^\n]+\.{3}(?:\s*\n)+/g, `
@@ -59,11 +59,11 @@ function cr(e) {
59
59
 
60
60
  `), t;
61
61
  }
62
- function qn(e) {
62
+ function Gn(e) {
63
63
  const t = e.type;
64
64
  return t === "adk_tool" || t === "ADK_TOOL";
65
65
  }
66
- function Gn(e) {
66
+ function Qn(e) {
67
67
  return {
68
68
  id: e.id,
69
69
  name: e.name,
@@ -75,10 +75,10 @@ function Gn(e) {
75
75
  oauth_token: null
76
76
  };
77
77
  }
78
- class Qn {
78
+ class Yn {
79
79
  constructor(t) {
80
- xt(this, "config");
81
- xt(this, "warnedLegacyApiKey", !1);
80
+ kt(this, "config");
81
+ kt(this, "warnedLegacyApiKey", !1);
82
82
  if (this.config = t, !this.config.publishableKey && !this.config.apiKey)
83
83
  throw new Error("Either publishableKey or apiKey is required.");
84
84
  this.config.publishableKey && this.config.apiKey && console.warn("[Ordify] Both publishableKey and apiKey provided. publishableKey will be used.");
@@ -135,12 +135,12 @@ class Qn {
135
135
  if (!o.ok) {
136
136
  let p = `HTTP ${o.status}`;
137
137
  try {
138
- const k = await o.json();
139
- p = typeof k.detail == "string" ? k.detail : p;
138
+ const w = await o.json();
139
+ p = typeof w.detail == "string" ? w.detail : p;
140
140
  } catch {
141
141
  try {
142
- const k = await o.text();
143
- k && (p = k.slice(0, 500));
142
+ const w = await o.text();
143
+ w && (p = w.slice(0, 500));
144
144
  } catch {
145
145
  }
146
146
  }
@@ -160,7 +160,7 @@ class Qn {
160
160
  g.href = b, g.download = d, g.rel = "noopener noreferrer", document.body.appendChild(g), g.click(), document.body.removeChild(g), URL.revokeObjectURL(b);
161
161
  }
162
162
  async sendMessage(t, r, n, o) {
163
- const c = this.usePublishableKey() ? `/widget/chat/${this.config.agentId}` : `/chat/agents/${this.config.agentId}`, u = `${this.config.apiBaseUrl}${c}`, d = o != null && o.length ? o.map(Gn) : void 0, h = {
163
+ const c = this.usePublishableKey() ? `/widget/chat/${this.config.agentId}` : `/chat/agents/${this.config.agentId}`, u = `${this.config.apiBaseUrl}${c}`, d = o != null && o.length ? o.map(Qn) : void 0, h = {
164
164
  message: t,
165
165
  sessionId: r,
166
166
  context: n,
@@ -274,7 +274,7 @@ class Qn {
274
274
  return r.json();
275
275
  }
276
276
  }
277
- function Yn(e) {
277
+ function Vn(e) {
278
278
  try {
279
279
  if (e.startsWith("data: ")) {
280
280
  const t = e.slice(6).trim();
@@ -318,18 +318,18 @@ ${n}
318
318
  }
319
319
  return null;
320
320
  }
321
- function lr(e) {
321
+ function dr(e) {
322
322
  const t = (e.attachments || []).map((r) => r.id).join("|");
323
323
  return `${e.role}:${e.content.trim()}:${t}`;
324
324
  }
325
- function Vn(e) {
325
+ function Zn(e) {
326
326
  const t = e.attachments;
327
327
  if (!t || !Array.isArray(t) || t.length === 0) return;
328
328
  const r = [];
329
329
  for (const n of t) {
330
330
  const o = n.url || "";
331
331
  o && r.push({
332
- id: n.id || qe(),
332
+ id: n.id || Ge(),
333
333
  name: String(n.name || "attachment"),
334
334
  type: n.type === "image" ? "image" : "document",
335
335
  url: o,
@@ -340,9 +340,9 @@ function Vn(e) {
340
340
  }
341
341
  return r.length ? r : void 0;
342
342
  }
343
- function Zn(e) {
344
- const [t, r] = ee([]), [n, o] = ee(!1), [c, u] = ee(null), [d, h] = ee(e.sessionId || null), [b, g] = ee(!1), [p, k] = ee(!1), [w, S] = ee(!1), [j, v] = ee(!1), [a, i] = ee(!1), s = ae(null), f = ae(""), m = ae(!1), x = ae(!1), y = ae(!1), T = `${e.publishableKey ?? ""}|${e.apiKey ?? ""}|${e.apiBaseUrl ?? ""}|${e.agentId}|${e.useThinking === !0 ? "1" : "0"}|img:${e.enableImageGeneration === !0 ? "1" : e.enableImageGeneration === !1 ? "0" : ""}`;
345
- f.current !== T && (s.current = null, f.current = T), s.current || (s.current = new Qn({
343
+ function Jn(e) {
344
+ const [t, r] = ee([]), [n, o] = ee(!1), [c, u] = ee(null), [d, h] = ee(e.sessionId || null), [b, g] = ee(!1), [p, w] = ee(!1), [k, S] = ee(!1), [j, v] = ee(!1), [a, i] = ee(!1), s = ae(null), f = ae(""), m = ae(!1), x = ae(!1), y = ae(!1), T = `${e.publishableKey ?? ""}|${e.apiKey ?? ""}|${e.apiBaseUrl ?? ""}|${e.agentId}|${e.useThinking === !0 ? "1" : "0"}|img:${e.enableImageGeneration === !0 ? "1" : e.enableImageGeneration === !1 ? "0" : ""}`;
345
+ f.current !== T && (s.current = null, f.current = T), s.current || (s.current = new Yn({
346
346
  publishableKey: e.publishableKey,
347
347
  apiKey: e.apiKey,
348
348
  apiBaseUrl: e.apiBaseUrl || "https://api.ordify.ai",
@@ -375,15 +375,15 @@ function Zn(e) {
375
375
  try {
376
376
  const $ = await s.current.getSessionWithMessages(D);
377
377
  if ($.messages && $.messages.length > 0) {
378
- const P = $.messages.filter((O) => !qn(O)).map((O) => {
378
+ const P = $.messages.filter((O) => !Gn(O)).map((O) => {
379
379
  const L = O.role === "assistant" ? "assistant" : "user", _ = String(O.content || "");
380
380
  return {
381
- id: O.id || qe(),
382
- content: L === "assistant" ? cr(_) : _,
381
+ id: O.id || Ge(),
382
+ content: L === "assistant" ? lr(_) : _,
383
383
  role: L,
384
384
  timestamp: O.timestamp ? new Date(O.timestamp) : /* @__PURE__ */ new Date(),
385
385
  sessionId: D,
386
- attachments: Vn(O)
386
+ attachments: Zn(O)
387
387
  };
388
388
  });
389
389
  r((O) => {
@@ -391,10 +391,10 @@ function Zn(e) {
391
391
  const L = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
392
392
  return O.forEach((N) => {
393
393
  L.set(N.id, N);
394
- const q = lr(N);
394
+ const q = dr(N);
395
395
  _.has(q) || _.set(q, N);
396
396
  }), P.forEach((N) => {
397
- const q = lr(N);
397
+ const q = dr(N);
398
398
  !L.has(N.id) && !_.has(q) ? (L.set(N.id, N), _.set(q, N)) : L.has(N.id) && L.set(N.id, N);
399
399
  }), Array.from(L.values()).sort(
400
400
  (N, q) => N.timestamp.getTime() - q.timestamp.getTime()
@@ -428,7 +428,7 @@ function Zn(e) {
428
428
  o(!0), u(null);
429
429
  try {
430
430
  const O = H != null && H.length ? H.map((J) => ({ ...J })) : void 0, L = {
431
- id: qe(),
431
+ id: Ge(),
432
432
  content: $,
433
433
  role: "user",
434
434
  timestamp: /* @__PURE__ */ new Date(),
@@ -445,7 +445,7 @@ function Zn(e) {
445
445
  O
446
446
  )).getReader(), q = new TextDecoder();
447
447
  let V = {
448
- id: qe(),
448
+ id: Ge(),
449
449
  content: "",
450
450
  role: "assistant",
451
451
  timestamp: /* @__PURE__ */ new Date(),
@@ -458,14 +458,14 @@ function Zn(e) {
458
458
  `);
459
459
  for (const me of Re) {
460
460
  if (!me.trim()) continue;
461
- const X = Yn(me);
461
+ const X = Vn(me);
462
462
  if (X) {
463
463
  if (X.type === "stream" && X.text)
464
- V.content = cr(
464
+ V.content = lr(
465
465
  V.content + X.text
466
- ), r((yt) => yt.find((Pe) => Pe.id === V.id) ? yt.map(
466
+ ), r((xt) => xt.find((Pe) => Pe.id === V.id) ? xt.map(
467
467
  (Pe) => Pe.id === V.id ? { ...Pe, content: V.content } : Pe
468
- ) : [...yt, { ...V, content: V.content }]);
468
+ ) : [...xt, { ...V, content: V.content }]);
469
469
  else if (X.type === "done")
470
470
  break;
471
471
  }
@@ -491,9 +491,9 @@ function Zn(e) {
491
491
  ]
492
492
  );
493
493
  return Oe(() => {
494
- const D = !(d || e.sessionId) || !w, H = e.quickQuestions && e.quickQuestions.length > 0;
494
+ const D = !(d || e.sessionId) || !k, H = e.quickQuestions && e.quickQuestions.length > 0;
495
495
  if ((e.initialMessage || e.initialContext) && D && !p && !n && !j && !m.current && x.current && !H) {
496
- k(!0), m.current = !0;
496
+ w(!0), m.current = !0;
497
497
  let $, P;
498
498
  if (e.initialMessage && e.initialContext)
499
499
  $ = e.initialMessage, P = e.initialContext;
@@ -507,7 +507,7 @@ function Zn(e) {
507
507
  W($, P);
508
508
  }, 0);
509
509
  }
510
- }, [e.initialMessage, e.initialContext, p, n, j, w, d, e.sessionId, W]), {
510
+ }, [e.initialMessage, e.initialContext, p, n, j, k, d, e.sessionId, W]), {
511
511
  messages: t,
512
512
  sendMessage: W,
513
513
  uploadAttachment: K,
@@ -521,15 +521,15 @@ function Zn(e) {
521
521
  hasSessionStarted: a
522
522
  };
523
523
  }
524
- function Ke(e) {
524
+ function We(e) {
525
525
  if (typeof process > "u" || !process.env)
526
526
  return;
527
527
  const t = process.env[e];
528
528
  return typeof t == "string" && t.length > 0 ? t : void 0;
529
529
  }
530
- function Jn(e) {
531
- return Ft(() => {
532
- const t = e.agentId || Ke("ORDIFY_AGENT_ID"), r = e.publishableKey || Ke("ORDIFY_PUBLISHABLE_KEY"), n = e.apiKey || Ke("ORDIFY_API_KEY"), o = e.apiBaseUrl || Ke("ORDIFY_API_BASE_URL") || "https://r.ordify.ai";
530
+ function Xn(e) {
531
+ return Kt(() => {
532
+ const t = e.agentId || We("ORDIFY_AGENT_ID"), r = e.publishableKey || We("ORDIFY_PUBLISHABLE_KEY"), n = e.apiKey || We("ORDIFY_API_KEY"), o = e.apiBaseUrl || We("ORDIFY_API_BASE_URL") || "https://r.ordify.ai";
533
533
  if (!t)
534
534
  throw new Error("Ordify agent ID is required. Provide agentId prop or set ORDIFY_AGENT_ID environment variable.");
535
535
  if (!r && !n)
@@ -576,7 +576,7 @@ function Jn(e) {
576
576
  };
577
577
  }, [e]);
578
578
  }
579
- async function Xn(e) {
579
+ async function eo(e) {
580
580
  var r;
581
581
  if (typeof navigator < "u" && ((r = navigator.clipboard) != null && r.writeText))
582
582
  try {
@@ -598,13 +598,13 @@ async function Xn(e) {
598
598
  * This source code is licensed under the ISC license.
599
599
  * See the LICENSE file in the root directory of this source tree.
600
600
  */
601
- const eo = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), to = (e) => e.replace(
601
+ const to = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), ro = (e) => e.replace(
602
602
  /^([A-Z])|[\s-_]+(\w)/g,
603
603
  (t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
604
- ), dr = (e) => {
605
- const t = to(e);
604
+ ), ur = (e) => {
605
+ const t = ro(e);
606
606
  return t.charAt(0).toUpperCase() + t.slice(1);
607
- }, Yr = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), ro = (e) => {
607
+ }, Vr = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), no = (e) => {
608
608
  for (const t in e)
609
609
  if (t.startsWith("aria-") || t === "role" || t === "title")
610
610
  return !0;
@@ -615,7 +615,7 @@ const eo = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), to = (
615
615
  * This source code is licensed under the ISC license.
616
616
  * See the LICENSE file in the root directory of this source tree.
617
617
  */
618
- var no = {
618
+ var oo = {
619
619
  xmlns: "http://www.w3.org/2000/svg",
620
620
  width: 24,
621
621
  height: 24,
@@ -632,7 +632,7 @@ var no = {
632
632
  * This source code is licensed under the ISC license.
633
633
  * See the LICENSE file in the root directory of this source tree.
634
634
  */
635
- const oo = Hr(
635
+ const ao = qr(
636
636
  ({
637
637
  color: e = "currentColor",
638
638
  size: t = 24,
@@ -642,21 +642,21 @@ const oo = Hr(
642
642
  children: c,
643
643
  iconNode: u,
644
644
  ...d
645
- }, h) => et(
645
+ }, h) => tt(
646
646
  "svg",
647
647
  {
648
648
  ref: h,
649
- ...no,
649
+ ...oo,
650
650
  width: t,
651
651
  height: t,
652
652
  stroke: e,
653
653
  strokeWidth: n ? Number(r) * 24 / Number(t) : r,
654
- className: Yr("lucide", o),
655
- ...!c && !ro(d) && { "aria-hidden": "true" },
654
+ className: Vr("lucide", o),
655
+ ...!c && !no(d) && { "aria-hidden": "true" },
656
656
  ...d
657
657
  },
658
658
  [
659
- ...u.map(([b, g]) => et(b, g)),
659
+ ...u.map(([b, g]) => tt(b, g)),
660
660
  ...Array.isArray(c) ? c : [c]
661
661
  ]
662
662
  )
@@ -668,19 +668,19 @@ const oo = Hr(
668
668
  * See the LICENSE file in the root directory of this source tree.
669
669
  */
670
670
  const Me = (e, t) => {
671
- const r = Hr(
672
- ({ className: n, ...o }, c) => et(oo, {
671
+ const r = qr(
672
+ ({ className: n, ...o }, c) => tt(ao, {
673
673
  ref: c,
674
674
  iconNode: t,
675
- className: Yr(
676
- `lucide-${eo(dr(e))}`,
675
+ className: Vr(
676
+ `lucide-${to(ur(e))}`,
677
677
  `lucide-${e}`,
678
678
  n
679
679
  ),
680
680
  ...o
681
681
  })
682
682
  );
683
- return r.displayName = dr(e), r;
683
+ return r.displayName = ur(e), r;
684
684
  };
685
685
  /**
686
686
  * @license lucide-react v0.544.0 - ISC
@@ -688,53 +688,53 @@ const Me = (e, t) => {
688
688
  * This source code is licensed under the ISC license.
689
689
  * See the LICENSE file in the root directory of this source tree.
690
690
  */
691
- const ao = [
691
+ const so = [
692
692
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
693
693
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
694
- ], so = Me("copy", ao);
694
+ ], io = Me("copy", so);
695
695
  /**
696
696
  * @license lucide-react v0.544.0 - ISC
697
697
  *
698
698
  * This source code is licensed under the ISC license.
699
699
  * See the LICENSE file in the root directory of this source tree.
700
700
  */
701
- const io = [
701
+ const co = [
702
702
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
703
703
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
704
704
  ["path", { d: "M12 18v-6", key: "17g6i2" }],
705
705
  ["path", { d: "m9 15 3 3 3-3", key: "1npd3o" }]
706
- ], co = Me("file-down", io);
706
+ ], lo = Me("file-down", co);
707
707
  /**
708
708
  * @license lucide-react v0.544.0 - ISC
709
709
  *
710
710
  * This source code is licensed under the ISC license.
711
711
  * See the LICENSE file in the root directory of this source tree.
712
712
  */
713
- const lo = [
713
+ const uo = [
714
714
  ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
715
715
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
716
716
  ["path", { d: "M10 9H8", key: "b1mrlr" }],
717
717
  ["path", { d: "M16 13H8", key: "t4e002" }],
718
718
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
719
- ], uo = Me("file-text", lo);
719
+ ], po = Me("file-text", uo);
720
720
  /**
721
721
  * @license lucide-react v0.544.0 - ISC
722
722
  *
723
723
  * This source code is licensed under the ISC license.
724
724
  * See the LICENSE file in the root directory of this source tree.
725
725
  */
726
- const po = [
726
+ const fo = [
727
727
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
728
728
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
729
729
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
730
- ], fo = Me("image", po);
730
+ ], ho = Me("image", fo);
731
731
  /**
732
732
  * @license lucide-react v0.544.0 - ISC
733
733
  *
734
734
  * This source code is licensed under the ISC license.
735
735
  * See the LICENSE file in the root directory of this source tree.
736
736
  */
737
- const ho = [
737
+ const mo = [
738
738
  [
739
739
  "path",
740
740
  {
@@ -742,17 +742,17 @@ const ho = [
742
742
  key: "1miecu"
743
743
  }
744
744
  ]
745
- ], mo = Me("paperclip", ho);
745
+ ], go = Me("paperclip", mo);
746
746
  /**
747
747
  * @license lucide-react v0.544.0 - ISC
748
748
  *
749
749
  * This source code is licensed under the ISC license.
750
750
  * See the LICENSE file in the root directory of this source tree.
751
751
  */
752
- const go = [
752
+ const bo = [
753
753
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
754
754
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
755
- ], bo = Me("x", go);
755
+ ], yo = Me("x", bo);
756
756
  var te = function() {
757
757
  return te = Object.assign || function(t) {
758
758
  for (var r, n = 1, o = arguments.length; n < o; n++) {
@@ -762,16 +762,16 @@ var te = function() {
762
762
  return t;
763
763
  }, te.apply(this, arguments);
764
764
  };
765
- function tt(e, t, r) {
765
+ function rt(e, t, r) {
766
766
  if (r || arguments.length === 2) for (var n = 0, o = t.length, c; n < o; n++)
767
767
  (c || !(n in t)) && (c || (c = Array.prototype.slice.call(t, 0, n)), c[n] = t[n]);
768
768
  return e.concat(c || Array.prototype.slice.call(t));
769
769
  }
770
- var U = "-ms-", Ne = "-moz-", B = "-webkit-", Vr = "comm", it = "rule", Kt = "decl", yo = "@import", Zr = "@keyframes", xo = "@layer", Jr = Math.abs, Wt = String.fromCharCode, Rt = Object.assign;
770
+ var U = "-ms-", Ne = "-moz-", B = "-webkit-", Zr = "comm", ct = "rule", Wt = "decl", xo = "@import", Jr = "@keyframes", ko = "@layer", Xr = Math.abs, Ut = String.fromCharCode, Pt = Object.assign;
771
771
  function wo(e, t) {
772
772
  return Q(e, 0) ^ 45 ? (((t << 2 ^ Q(e, 0)) << 2 ^ Q(e, 1)) << 2 ^ Q(e, 2)) << 2 ^ Q(e, 3) : 0;
773
773
  }
774
- function Xr(e) {
774
+ function en(e) {
775
775
  return e.trim();
776
776
  }
777
777
  function ce(e, t) {
@@ -780,7 +780,7 @@ function ce(e, t) {
780
780
  function M(e, t, r) {
781
781
  return e.replace(t, r);
782
782
  }
783
- function Ge(e, t, r) {
783
+ function Qe(e, t, r) {
784
784
  return e.indexOf(t, r);
785
785
  }
786
786
  function Q(e, t) {
@@ -792,51 +792,51 @@ function Ce(e, t, r) {
792
792
  function se(e) {
793
793
  return e.length;
794
794
  }
795
- function en(e) {
795
+ function tn(e) {
796
796
  return e.length;
797
797
  }
798
798
  function ze(e, t) {
799
799
  return t.push(e), e;
800
800
  }
801
- function ko(e, t) {
801
+ function vo(e, t) {
802
802
  return e.map(t).join("");
803
803
  }
804
- function ur(e, t) {
804
+ function pr(e, t) {
805
805
  return e.filter(function(r) {
806
806
  return !ce(r, t);
807
807
  });
808
808
  }
809
- var ct = 1, je = 1, tn = 0, re = 0, G = 0, _e = "";
810
- function lt(e, t, r, n, o, c, u, d) {
811
- return { value: e, root: t, parent: r, type: n, props: o, children: c, line: ct, column: je, length: u, return: "", siblings: d };
809
+ var lt = 1, je = 1, rn = 0, re = 0, G = 0, _e = "";
810
+ function dt(e, t, r, n, o, c, u, d) {
811
+ return { value: e, root: t, parent: r, type: n, props: o, children: c, line: lt, column: je, length: u, return: "", siblings: d };
812
812
  }
813
813
  function fe(e, t) {
814
- return Rt(lt("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
814
+ return Pt(dt("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
815
815
  }
816
816
  function ve(e) {
817
817
  for (; e.root; )
818
818
  e = fe(e.root, { children: [e] });
819
819
  ze(e, e.siblings);
820
820
  }
821
- function vo() {
821
+ function $o() {
822
822
  return G;
823
823
  }
824
- function $o() {
825
- return G = re > 0 ? Q(_e, --re) : 0, je--, G === 10 && (je = 1, ct--), G;
824
+ function So() {
825
+ return G = re > 0 ? Q(_e, --re) : 0, je--, G === 10 && (je = 1, lt--), G;
826
826
  }
827
827
  function ne() {
828
- return G = re < tn ? Q(_e, re++) : 0, je++, G === 10 && (je = 1, ct++), G;
828
+ return G = re < rn ? Q(_e, re++) : 0, je++, G === 10 && (je = 1, lt++), G;
829
829
  }
830
830
  function ye() {
831
831
  return Q(_e, re);
832
832
  }
833
- function Qe() {
833
+ function Ye() {
834
834
  return re;
835
835
  }
836
- function dt(e, t) {
836
+ function ut(e, t) {
837
837
  return Ce(_e, e, t);
838
838
  }
839
- function Pt(e) {
839
+ function Dt(e) {
840
840
  switch (e) {
841
841
  case 0:
842
842
  case 9:
@@ -868,36 +868,36 @@ function Pt(e) {
868
868
  }
869
869
  return 0;
870
870
  }
871
- function So(e) {
872
- return ct = je = 1, tn = se(_e = e), re = 0, [];
873
- }
874
871
  function Co(e) {
872
+ return lt = je = 1, rn = se(_e = e), re = 0, [];
873
+ }
874
+ function jo(e) {
875
875
  return _e = "", e;
876
876
  }
877
877
  function wt(e) {
878
- return Xr(dt(re - 1, Dt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
878
+ return en(ut(re - 1, zt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
879
879
  }
880
- function jo(e) {
880
+ function Io(e) {
881
881
  for (; (G = ye()) && G < 33; )
882
882
  ne();
883
- return Pt(e) > 2 || Pt(G) > 3 ? "" : " ";
883
+ return Dt(e) > 2 || Dt(G) > 3 ? "" : " ";
884
884
  }
885
- function Io(e, t) {
885
+ function To(e, t) {
886
886
  for (; --t && ne() && !(G < 48 || G > 102 || G > 57 && G < 65 || G > 70 && G < 97); )
887
887
  ;
888
- return dt(e, Qe() + (t < 6 && ye() == 32 && ne() == 32));
888
+ return ut(e, Ye() + (t < 6 && ye() == 32 && ne() == 32));
889
889
  }
890
- function Dt(e) {
890
+ function zt(e) {
891
891
  for (; ne(); )
892
892
  switch (G) {
893
893
  case e:
894
894
  return re;
895
895
  case 34:
896
896
  case 39:
897
- e !== 34 && e !== 39 && Dt(G);
897
+ e !== 34 && e !== 39 && zt(G);
898
898
  break;
899
899
  case 40:
900
- e === 41 && Dt(e);
900
+ e === 41 && zt(e);
901
901
  break;
902
902
  case 92:
903
903
  ne();
@@ -905,26 +905,26 @@ function Dt(e) {
905
905
  }
906
906
  return re;
907
907
  }
908
- function To(e, t) {
908
+ function Ao(e, t) {
909
909
  for (; ne() && e + G !== 57; )
910
910
  if (e + G === 84 && ye() === 47)
911
911
  break;
912
- return "/*" + dt(t, re - 1) + "*" + Wt(e === 47 ? e : ne());
912
+ return "/*" + ut(t, re - 1) + "*" + Ut(e === 47 ? e : ne());
913
913
  }
914
- function Ao(e) {
915
- for (; !Pt(ye()); )
914
+ function Eo(e) {
915
+ for (; !Dt(ye()); )
916
916
  ne();
917
- return dt(e, re);
917
+ return ut(e, re);
918
918
  }
919
- function Eo(e) {
920
- return Co(Ye("", null, null, null, [""], e = So(e), 0, [0], e));
919
+ function Mo(e) {
920
+ return jo(Ve("", null, null, null, [""], e = Co(e), 0, [0], e));
921
921
  }
922
- function Ye(e, t, r, n, o, c, u, d, h) {
923
- for (var b = 0, g = 0, p = u, k = 0, w = 0, S = 0, j = 1, v = 1, a = 1, i = 0, s = "", f = o, m = c, x = n, y = s; v; )
922
+ function Ve(e, t, r, n, o, c, u, d, h) {
923
+ for (var b = 0, g = 0, p = u, w = 0, k = 0, S = 0, j = 1, v = 1, a = 1, i = 0, s = "", f = o, m = c, x = n, y = s; v; )
924
924
  switch (S = i, i = ne()) {
925
925
  case 40:
926
926
  if (S != 108 && Q(y, p - 1) == 58) {
927
- Ge(y += M(wt(i), "&", "&\f"), "&\f", Jr(b ? d[b - 1] : 0)) != -1 && (a = -1);
927
+ Qe(y += M(wt(i), "&", "&\f"), "&\f", Xr(b ? d[b - 1] : 0)) != -1 && (a = -1);
928
928
  break;
929
929
  }
930
930
  case 34:
@@ -936,16 +936,16 @@ function Ye(e, t, r, n, o, c, u, d, h) {
936
936
  case 10:
937
937
  case 13:
938
938
  case 32:
939
- y += jo(S);
939
+ y += Io(S);
940
940
  break;
941
941
  case 92:
942
- y += Io(Qe() - 1, 7);
942
+ y += To(Ye() - 1, 7);
943
943
  continue;
944
944
  case 47:
945
945
  switch (ye()) {
946
946
  case 42:
947
947
  case 47:
948
- ze(Mo(To(ne(), Qe()), t, r, h), h);
948
+ ze(_o(Ao(ne(), Ye()), t, r, h), h);
949
949
  break;
950
950
  default:
951
951
  y += "/";
@@ -961,38 +961,38 @@ function Ye(e, t, r, n, o, c, u, d, h) {
961
961
  case 125:
962
962
  v = 0;
963
963
  case 59 + g:
964
- a == -1 && (y = M(y, /\f/g, "")), w > 0 && se(y) - p && ze(w > 32 ? fr(y + ";", n, r, p - 1, h) : fr(M(y, " ", "") + ";", n, r, p - 2, h), h);
964
+ a == -1 && (y = M(y, /\f/g, "")), k > 0 && se(y) - p && ze(k > 32 ? hr(y + ";", n, r, p - 1, h) : hr(M(y, " ", "") + ";", n, r, p - 2, h), h);
965
965
  break;
966
966
  case 59:
967
967
  y += ";";
968
968
  default:
969
- if (ze(x = pr(y, t, r, b, g, o, d, s, f = [], m = [], p, c), c), i === 123)
969
+ if (ze(x = fr(y, t, r, b, g, o, d, s, f = [], m = [], p, c), c), i === 123)
970
970
  if (g === 0)
971
- Ye(y, t, x, x, f, c, p, d, m);
971
+ Ve(y, t, x, x, f, c, p, d, m);
972
972
  else
973
- switch (k === 99 && Q(y, 3) === 110 ? 100 : k) {
973
+ switch (w === 99 && Q(y, 3) === 110 ? 100 : w) {
974
974
  case 100:
975
975
  case 108:
976
976
  case 109:
977
977
  case 115:
978
- Ye(e, x, x, n && ze(pr(e, x, x, 0, 0, o, d, s, o, f = [], p, m), m), o, m, p, d, n ? f : m);
978
+ Ve(e, x, x, n && ze(fr(e, x, x, 0, 0, o, d, s, o, f = [], p, m), m), o, m, p, d, n ? f : m);
979
979
  break;
980
980
  default:
981
- Ye(y, x, x, x, [""], m, 0, d, m);
981
+ Ve(y, x, x, x, [""], m, 0, d, m);
982
982
  }
983
983
  }
984
- b = g = w = 0, j = a = 1, s = y = "", p = u;
984
+ b = g = k = 0, j = a = 1, s = y = "", p = u;
985
985
  break;
986
986
  case 58:
987
- p = 1 + se(y), w = S;
987
+ p = 1 + se(y), k = S;
988
988
  default:
989
989
  if (j < 1) {
990
990
  if (i == 123)
991
991
  --j;
992
- else if (i == 125 && j++ == 0 && $o() == 125)
992
+ else if (i == 125 && j++ == 0 && So() == 125)
993
993
  continue;
994
994
  }
995
- switch (y += Wt(i), i * j) {
995
+ switch (y += Ut(i), i * j) {
996
996
  case 38:
997
997
  a = g > 0 ? 1 : (y += "\f", -1);
998
998
  break;
@@ -1000,7 +1000,7 @@ function Ye(e, t, r, n, o, c, u, d, h) {
1000
1000
  d[b++] = (se(y) - 1) * a, a = 1;
1001
1001
  break;
1002
1002
  case 64:
1003
- ye() === 45 && (y += wt(ne())), k = ye(), g = p = se(s = y += Ao(Qe())), i++;
1003
+ ye() === 45 && (y += wt(ne())), w = ye(), g = p = se(s = y += Eo(Ye())), i++;
1004
1004
  break;
1005
1005
  case 45:
1006
1006
  S === 45 && se(y) == 2 && (j = 0);
@@ -1008,19 +1008,19 @@ function Ye(e, t, r, n, o, c, u, d, h) {
1008
1008
  }
1009
1009
  return c;
1010
1010
  }
1011
- function pr(e, t, r, n, o, c, u, d, h, b, g, p) {
1012
- for (var k = o - 1, w = o === 0 ? c : [""], S = en(w), j = 0, v = 0, a = 0; j < n; ++j)
1013
- for (var i = 0, s = Ce(e, k + 1, k = Jr(v = u[j])), f = e; i < S; ++i)
1014
- (f = Xr(v > 0 ? w[i] + " " + s : M(s, /&\f/g, w[i]))) && (h[a++] = f);
1015
- return lt(e, t, r, o === 0 ? it : d, h, b, g, p);
1011
+ function fr(e, t, r, n, o, c, u, d, h, b, g, p) {
1012
+ for (var w = o - 1, k = o === 0 ? c : [""], S = tn(k), j = 0, v = 0, a = 0; j < n; ++j)
1013
+ for (var i = 0, s = Ce(e, w + 1, w = Xr(v = u[j])), f = e; i < S; ++i)
1014
+ (f = en(v > 0 ? k[i] + " " + s : M(s, /&\f/g, k[i]))) && (h[a++] = f);
1015
+ return dt(e, t, r, o === 0 ? ct : d, h, b, g, p);
1016
1016
  }
1017
- function Mo(e, t, r, n) {
1018
- return lt(e, t, r, Vr, Wt(vo()), Ce(e, 2, -2), 0, n);
1017
+ function _o(e, t, r, n) {
1018
+ return dt(e, t, r, Zr, Ut($o()), Ce(e, 2, -2), 0, n);
1019
1019
  }
1020
- function fr(e, t, r, n, o) {
1021
- return lt(e, t, r, Kt, Ce(e, 0, n), Ce(e, n + 1, -1), n, o);
1020
+ function hr(e, t, r, n, o) {
1021
+ return dt(e, t, r, Wt, Ce(e, 0, n), Ce(e, n + 1, -1), n, o);
1022
1022
  }
1023
- function rn(e, t, r) {
1023
+ function nn(e, t, r) {
1024
1024
  switch (wo(e, t)) {
1025
1025
  case 5103:
1026
1026
  return B + "print-" + e + e;
@@ -1104,7 +1104,7 @@ function rn(e, t, r) {
1104
1104
  case 3616:
1105
1105
  return r && r.some(function(n, o) {
1106
1106
  return t = o, ce(n.props, /grid-\w+-end/);
1107
- }) ? ~Ge(e + (r = r[t].value), "span", 0) ? e : U + M(e, "-start", "") + e + U + "grid-row-span:" + (~Ge(r, "span", 0) ? ce(r, /\d+/) : +ce(r, /\d+/) - +ce(e, /\d+/)) + ";" : U + M(e, "-start", "") + e;
1107
+ }) ? ~Qe(e + (r = r[t].value), "span", 0) ? e : U + M(e, "-start", "") + e + U + "grid-row-span:" + (~Qe(r, "span", 0) ? ce(r, /\d+/) : +ce(r, /\d+/) - +ce(e, /\d+/)) + ";" : U + M(e, "-start", "") + e;
1108
1108
  case 4896:
1109
1109
  case 4128:
1110
1110
  return r && r.some(function(n) {
@@ -1135,7 +1135,7 @@ function rn(e, t, r) {
1135
1135
  case 102:
1136
1136
  return M(e, /(.+:)(.+)-([^]+)/, "$1" + B + "$2-$3$1" + Ne + (Q(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
1137
1137
  case 115:
1138
- return ~Ge(e, "stretch", 0) ? rn(M(e, "stretch", "fill-available"), t, r) + e : e;
1138
+ return ~Qe(e, "stretch", 0) ? nn(M(e, "stretch", "fill-available"), t, r) + e : e;
1139
1139
  }
1140
1140
  break;
1141
1141
  case 5152:
@@ -1164,65 +1164,65 @@ function rn(e, t, r) {
1164
1164
  }
1165
1165
  return e;
1166
1166
  }
1167
- function rt(e, t) {
1167
+ function nt(e, t) {
1168
1168
  for (var r = "", n = 0; n < e.length; n++)
1169
1169
  r += t(e[n], n, e, t) || "";
1170
1170
  return r;
1171
1171
  }
1172
- function _o(e, t, r, n) {
1172
+ function Ro(e, t, r, n) {
1173
1173
  switch (e.type) {
1174
- case xo:
1174
+ case ko:
1175
1175
  if (e.children.length) break;
1176
- case yo:
1177
- case Kt:
1176
+ case xo:
1177
+ case Wt:
1178
1178
  return e.return = e.return || e.value;
1179
- case Vr:
1180
- return "";
1181
1179
  case Zr:
1182
- return e.return = e.value + "{" + rt(e.children, n) + "}";
1183
- case it:
1180
+ return "";
1181
+ case Jr:
1182
+ return e.return = e.value + "{" + nt(e.children, n) + "}";
1183
+ case ct:
1184
1184
  if (!se(e.value = e.props.join(","))) return "";
1185
1185
  }
1186
- return se(r = rt(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
1186
+ return se(r = nt(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
1187
1187
  }
1188
- function Ro(e) {
1189
- var t = en(e);
1188
+ function Po(e) {
1189
+ var t = tn(e);
1190
1190
  return function(r, n, o, c) {
1191
1191
  for (var u = "", d = 0; d < t; d++)
1192
1192
  u += e[d](r, n, o, c) || "";
1193
1193
  return u;
1194
1194
  };
1195
1195
  }
1196
- function Po(e) {
1196
+ function Do(e) {
1197
1197
  return function(t) {
1198
1198
  t.root || (t = t.return) && e(t);
1199
1199
  };
1200
1200
  }
1201
- function Do(e, t, r, n) {
1201
+ function zo(e, t, r, n) {
1202
1202
  if (e.length > -1 && !e.return)
1203
1203
  switch (e.type) {
1204
- case Kt:
1205
- e.return = rn(e.value, e.length, r);
1204
+ case Wt:
1205
+ e.return = nn(e.value, e.length, r);
1206
1206
  return;
1207
- case Zr:
1208
- return rt([fe(e, { value: M(e.value, "@", "@" + B) })], n);
1209
- case it:
1207
+ case Jr:
1208
+ return nt([fe(e, { value: M(e.value, "@", "@" + B) })], n);
1209
+ case ct:
1210
1210
  if (e.length)
1211
- return ko(r = e.props, function(o) {
1211
+ return vo(r = e.props, function(o) {
1212
1212
  switch (ce(o, n = /(::plac\w+|:read-\w+)/)) {
1213
1213
  case ":read-only":
1214
1214
  case ":read-write":
1215
- ve(fe(e, { props: [M(o, /:(read-\w+)/, ":" + Ne + "$1")] })), ve(fe(e, { props: [o] })), Rt(e, { props: ur(r, n) });
1215
+ ve(fe(e, { props: [M(o, /:(read-\w+)/, ":" + Ne + "$1")] })), ve(fe(e, { props: [o] })), Pt(e, { props: pr(r, n) });
1216
1216
  break;
1217
1217
  case "::placeholder":
1218
- ve(fe(e, { props: [M(o, /:(plac\w+)/, ":" + B + "input-$1")] })), ve(fe(e, { props: [M(o, /:(plac\w+)/, ":" + Ne + "$1")] })), ve(fe(e, { props: [M(o, /:(plac\w+)/, U + "input-$1")] })), ve(fe(e, { props: [o] })), Rt(e, { props: ur(r, n) });
1218
+ ve(fe(e, { props: [M(o, /:(plac\w+)/, ":" + B + "input-$1")] })), ve(fe(e, { props: [M(o, /:(plac\w+)/, ":" + Ne + "$1")] })), ve(fe(e, { props: [M(o, /:(plac\w+)/, U + "input-$1")] })), ve(fe(e, { props: [o] })), Pt(e, { props: pr(r, n) });
1219
1219
  break;
1220
1220
  }
1221
1221
  return "";
1222
1222
  });
1223
1223
  }
1224
1224
  }
1225
- var zo = {
1225
+ var Oo = {
1226
1226
  animationIterationCount: 1,
1227
1227
  aspectRatio: 1,
1228
1228
  borderImageOutset: 1,
@@ -1270,58 +1270,58 @@ var zo = {
1270
1270
  strokeMiterlimit: 1,
1271
1271
  strokeOpacity: 1,
1272
1272
  strokeWidth: 1
1273
- }, Ie = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", nn = "active", on = "data-styled-version", ut = "6.1.19", Ut = `/*!sc*/
1274
- `, nt = typeof window < "u" && typeof document < "u", Oo = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" && process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY), pt = Object.freeze([]), Te = Object.freeze({});
1275
- function No(e, t, r) {
1273
+ }, Ie = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", on = "active", an = "data-styled-version", pt = "6.1.19", Ht = `/*!sc*/
1274
+ `, ot = typeof window < "u" && typeof document < "u", No = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" && process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY), ft = Object.freeze([]), Te = Object.freeze({});
1275
+ function Bo(e, t, r) {
1276
1276
  return r === void 0 && (r = Te), e.theme !== r.theme && e.theme || t || r.theme;
1277
1277
  }
1278
- var an = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), Bo = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Lo = /(^-|-$)/g;
1279
- function hr(e) {
1280
- return e.replace(Bo, "-").replace(Lo, "");
1278
+ var sn = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), Lo = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Fo = /(^-|-$)/g;
1279
+ function mr(e) {
1280
+ return e.replace(Lo, "-").replace(Fo, "");
1281
1281
  }
1282
- var Fo = /(a)(d)/gi, We = 52, mr = function(e) {
1282
+ var Ko = /(a)(d)/gi, Ue = 52, gr = function(e) {
1283
1283
  return String.fromCharCode(e + (e > 25 ? 39 : 97));
1284
1284
  };
1285
- function zt(e) {
1285
+ function Ot(e) {
1286
1286
  var t, r = "";
1287
- for (t = Math.abs(e); t > We; t = t / We | 0) r = mr(t % We) + r;
1288
- return (mr(t % We) + r).replace(Fo, "$1-$2");
1287
+ for (t = Math.abs(e); t > Ue; t = t / Ue | 0) r = gr(t % Ue) + r;
1288
+ return (gr(t % Ue) + r).replace(Ko, "$1-$2");
1289
1289
  }
1290
- var kt, sn = 5381, Se = function(e, t) {
1290
+ var vt, cn = 5381, Se = function(e, t) {
1291
1291
  for (var r = t.length; r; ) e = 33 * e ^ t.charCodeAt(--r);
1292
1292
  return e;
1293
- }, cn = function(e) {
1294
- return Se(sn, e);
1293
+ }, ln = function(e) {
1294
+ return Se(cn, e);
1295
1295
  };
1296
- function Ko(e) {
1297
- return zt(cn(e) >>> 0);
1298
- }
1299
1296
  function Wo(e) {
1297
+ return Ot(ln(e) >>> 0);
1298
+ }
1299
+ function Uo(e) {
1300
1300
  return e.displayName || e.name || "Component";
1301
1301
  }
1302
- function vt(e) {
1302
+ function $t(e) {
1303
1303
  return typeof e == "string" && !0;
1304
1304
  }
1305
- var ln = typeof Symbol == "function" && Symbol.for, dn = ln ? Symbol.for("react.memo") : 60115, Uo = ln ? Symbol.for("react.forward_ref") : 60112, Ho = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, qo = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, un = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Go = ((kt = {})[Uo] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, kt[dn] = un, kt);
1306
- function gr(e) {
1307
- return ("type" in (t = e) && t.type.$$typeof) === dn ? un : "$$typeof" in e ? Go[e.$$typeof] : Ho;
1305
+ var dn = typeof Symbol == "function" && Symbol.for, un = dn ? Symbol.for("react.memo") : 60115, Ho = dn ? Symbol.for("react.forward_ref") : 60112, qo = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, Go = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, pn = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, Qo = ((vt = {})[Ho] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, vt[un] = pn, vt);
1306
+ function br(e) {
1307
+ return ("type" in (t = e) && t.type.$$typeof) === un ? pn : "$$typeof" in e ? Qo[e.$$typeof] : qo;
1308
1308
  var t;
1309
1309
  }
1310
- var Qo = Object.defineProperty, Yo = Object.getOwnPropertyNames, br = Object.getOwnPropertySymbols, Vo = Object.getOwnPropertyDescriptor, Zo = Object.getPrototypeOf, yr = Object.prototype;
1311
- function pn(e, t, r) {
1310
+ var Yo = Object.defineProperty, Vo = Object.getOwnPropertyNames, yr = Object.getOwnPropertySymbols, Zo = Object.getOwnPropertyDescriptor, Jo = Object.getPrototypeOf, xr = Object.prototype;
1311
+ function fn(e, t, r) {
1312
1312
  if (typeof t != "string") {
1313
- if (yr) {
1314
- var n = Zo(t);
1315
- n && n !== yr && pn(e, n, r);
1313
+ if (xr) {
1314
+ var n = Jo(t);
1315
+ n && n !== xr && fn(e, n, r);
1316
1316
  }
1317
- var o = Yo(t);
1318
- br && (o = o.concat(br(t)));
1319
- for (var c = gr(e), u = gr(t), d = 0; d < o.length; ++d) {
1317
+ var o = Vo(t);
1318
+ yr && (o = o.concat(yr(t)));
1319
+ for (var c = br(e), u = br(t), d = 0; d < o.length; ++d) {
1320
1320
  var h = o[d];
1321
- if (!(h in qo || r && r[h] || u && h in u || c && h in c)) {
1322
- var b = Vo(t, h);
1321
+ if (!(h in Go || r && r[h] || u && h in u || c && h in c)) {
1322
+ var b = Zo(t, h);
1323
1323
  try {
1324
- Qo(e, h, b);
1324
+ Yo(e, h, b);
1325
1325
  } catch {
1326
1326
  }
1327
1327
  }
@@ -1332,13 +1332,13 @@ function pn(e, t, r) {
1332
1332
  function Ae(e) {
1333
1333
  return typeof e == "function";
1334
1334
  }
1335
- function Ht(e) {
1335
+ function qt(e) {
1336
1336
  return typeof e == "object" && "styledComponentId" in e;
1337
1337
  }
1338
1338
  function be(e, t) {
1339
1339
  return e && t ? "".concat(e, " ").concat(t) : e || t || "";
1340
1340
  }
1341
- function xr(e, t) {
1341
+ function kr(e, t) {
1342
1342
  if (e.length === 0) return "";
1343
1343
  for (var r = e[0], n = 1; n < e.length; n++) r += e[n];
1344
1344
  return r;
@@ -1346,20 +1346,20 @@ function xr(e, t) {
1346
1346
  function Le(e) {
1347
1347
  return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
1348
1348
  }
1349
- function Ot(e, t, r) {
1349
+ function Nt(e, t, r) {
1350
1350
  if (r === void 0 && (r = !1), !r && !Le(e) && !Array.isArray(e)) return t;
1351
- if (Array.isArray(t)) for (var n = 0; n < t.length; n++) e[n] = Ot(e[n], t[n]);
1352
- else if (Le(t)) for (var n in t) e[n] = Ot(e[n], t[n]);
1351
+ if (Array.isArray(t)) for (var n = 0; n < t.length; n++) e[n] = Nt(e[n], t[n]);
1352
+ else if (Le(t)) for (var n in t) e[n] = Nt(e[n], t[n]);
1353
1353
  return e;
1354
1354
  }
1355
- function qt(e, t) {
1355
+ function Gt(e, t) {
1356
1356
  Object.defineProperty(e, "toString", { value: t });
1357
1357
  }
1358
1358
  function Fe(e) {
1359
1359
  for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
1360
1360
  return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(t.length > 0 ? " Args: ".concat(t.join(", ")) : ""));
1361
1361
  }
1362
- var Jo = function() {
1362
+ var Xo = function() {
1363
1363
  function e(t) {
1364
1364
  this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = t;
1365
1365
  }
@@ -1382,49 +1382,49 @@ var Jo = function() {
1382
1382
  }, e.prototype.getGroup = function(t) {
1383
1383
  var r = "";
1384
1384
  if (t >= this.length || this.groupSizes[t] === 0) return r;
1385
- for (var n = this.groupSizes[t], o = this.indexOfGroup(t), c = o + n, u = o; u < c; u++) r += "".concat(this.tag.getRule(u)).concat(Ut);
1385
+ for (var n = this.groupSizes[t], o = this.indexOfGroup(t), c = o + n, u = o; u < c; u++) r += "".concat(this.tag.getRule(u)).concat(Ht);
1386
1386
  return r;
1387
1387
  }, e;
1388
- }(), Ve = /* @__PURE__ */ new Map(), ot = /* @__PURE__ */ new Map(), Ze = 1, Ue = function(e) {
1389
- if (Ve.has(e)) return Ve.get(e);
1390
- for (; ot.has(Ze); ) Ze++;
1391
- var t = Ze++;
1392
- return Ve.set(e, t), ot.set(t, e), t;
1393
- }, Xo = function(e, t) {
1394
- Ze = t + 1, Ve.set(e, t), ot.set(t, e);
1395
- }, ea = "style[".concat(Ie, "][").concat(on, '="').concat(ut, '"]'), ta = new RegExp("^".concat(Ie, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), ra = function(e, t, r) {
1388
+ }(), Ze = /* @__PURE__ */ new Map(), at = /* @__PURE__ */ new Map(), Je = 1, He = function(e) {
1389
+ if (Ze.has(e)) return Ze.get(e);
1390
+ for (; at.has(Je); ) Je++;
1391
+ var t = Je++;
1392
+ return Ze.set(e, t), at.set(t, e), t;
1393
+ }, ea = function(e, t) {
1394
+ Je = t + 1, Ze.set(e, t), at.set(t, e);
1395
+ }, ta = "style[".concat(Ie, "][").concat(an, '="').concat(pt, '"]'), ra = new RegExp("^".concat(Ie, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), na = function(e, t, r) {
1396
1396
  for (var n, o = r.split(","), c = 0, u = o.length; c < u; c++) (n = o[c]) && e.registerName(t, n);
1397
- }, na = function(e, t) {
1398
- for (var r, n = ((r = t.textContent) !== null && r !== void 0 ? r : "").split(Ut), o = [], c = 0, u = n.length; c < u; c++) {
1397
+ }, oa = function(e, t) {
1398
+ for (var r, n = ((r = t.textContent) !== null && r !== void 0 ? r : "").split(Ht), o = [], c = 0, u = n.length; c < u; c++) {
1399
1399
  var d = n[c].trim();
1400
1400
  if (d) {
1401
- var h = d.match(ta);
1401
+ var h = d.match(ra);
1402
1402
  if (h) {
1403
1403
  var b = 0 | parseInt(h[1], 10), g = h[2];
1404
- b !== 0 && (Xo(g, b), ra(e, g, h[3]), e.getTag().insertRules(b, o)), o.length = 0;
1404
+ b !== 0 && (ea(g, b), na(e, g, h[3]), e.getTag().insertRules(b, o)), o.length = 0;
1405
1405
  } else o.push(d);
1406
1406
  }
1407
1407
  }
1408
1408
  }, wr = function(e) {
1409
- for (var t = document.querySelectorAll(ea), r = 0, n = t.length; r < n; r++) {
1409
+ for (var t = document.querySelectorAll(ta), r = 0, n = t.length; r < n; r++) {
1410
1410
  var o = t[r];
1411
- o && o.getAttribute(Ie) !== nn && (na(e, o), o.parentNode && o.parentNode.removeChild(o));
1411
+ o && o.getAttribute(Ie) !== on && (oa(e, o), o.parentNode && o.parentNode.removeChild(o));
1412
1412
  }
1413
1413
  };
1414
- function oa() {
1414
+ function aa() {
1415
1415
  return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
1416
1416
  }
1417
- var fn = function(e) {
1417
+ var hn = function(e) {
1418
1418
  var t = document.head, r = e || t, n = document.createElement("style"), o = function(d) {
1419
1419
  var h = Array.from(d.querySelectorAll("style[".concat(Ie, "]")));
1420
1420
  return h[h.length - 1];
1421
1421
  }(r), c = o !== void 0 ? o.nextSibling : null;
1422
- n.setAttribute(Ie, nn), n.setAttribute(on, ut);
1423
- var u = oa();
1422
+ n.setAttribute(Ie, on), n.setAttribute(an, pt);
1423
+ var u = aa();
1424
1424
  return u && n.setAttribute("nonce", u), r.insertBefore(n, c), n;
1425
- }, aa = function() {
1425
+ }, sa = function() {
1426
1426
  function e(t) {
1427
- this.element = fn(t), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) {
1427
+ this.element = hn(t), this.element.appendChild(document.createTextNode("")), this.sheet = function(r) {
1428
1428
  if (r.sheet) return r.sheet;
1429
1429
  for (var n = document.styleSheets, o = 0, c = n.length; o < c; o++) {
1430
1430
  var u = n[o];
@@ -1445,9 +1445,9 @@ var fn = function(e) {
1445
1445
  var r = this.sheet.cssRules[t];
1446
1446
  return r && r.cssText ? r.cssText : "";
1447
1447
  }, e;
1448
- }(), sa = function() {
1448
+ }(), ia = function() {
1449
1449
  function e(t) {
1450
- this.element = fn(t), this.nodes = this.element.childNodes, this.length = 0;
1450
+ this.element = hn(t), this.nodes = this.element.childNodes, this.length = 0;
1451
1451
  }
1452
1452
  return e.prototype.insertRule = function(t, r) {
1453
1453
  if (t <= this.length && t >= 0) {
@@ -1460,7 +1460,7 @@ var fn = function(e) {
1460
1460
  }, e.prototype.getRule = function(t) {
1461
1461
  return t < this.length ? this.nodes[t].textContent : "";
1462
1462
  }, e;
1463
- }(), ia = function() {
1463
+ }(), ca = function() {
1464
1464
  function e(t) {
1465
1465
  this.rules = [], this.length = 0;
1466
1466
  }
@@ -1471,32 +1471,32 @@ var fn = function(e) {
1471
1471
  }, e.prototype.getRule = function(t) {
1472
1472
  return t < this.length ? this.rules[t] : "";
1473
1473
  }, e;
1474
- }(), kr = nt, ca = { isServer: !nt, useCSSOMInjection: !Oo }, hn = function() {
1474
+ }(), vr = ot, la = { isServer: !ot, useCSSOMInjection: !No }, mn = function() {
1475
1475
  function e(t, r, n) {
1476
1476
  t === void 0 && (t = Te), r === void 0 && (r = {});
1477
1477
  var o = this;
1478
- this.options = te(te({}, ca), t), this.gs = r, this.names = new Map(n), this.server = !!t.isServer, !this.server && nt && kr && (kr = !1, wr(this)), qt(this, function() {
1478
+ this.options = te(te({}, la), t), this.gs = r, this.names = new Map(n), this.server = !!t.isServer, !this.server && ot && vr && (vr = !1, wr(this)), Gt(this, function() {
1479
1479
  return function(c) {
1480
1480
  for (var u = c.getTag(), d = u.length, h = "", b = function(p) {
1481
- var k = function(a) {
1482
- return ot.get(a);
1481
+ var w = function(a) {
1482
+ return at.get(a);
1483
1483
  }(p);
1484
- if (k === void 0) return "continue";
1485
- var w = c.names.get(k), S = u.getGroup(p);
1486
- if (w === void 0 || !w.size || S.length === 0) return "continue";
1487
- var j = "".concat(Ie, ".g").concat(p, '[id="').concat(k, '"]'), v = "";
1488
- w !== void 0 && w.forEach(function(a) {
1484
+ if (w === void 0) return "continue";
1485
+ var k = c.names.get(w), S = u.getGroup(p);
1486
+ if (k === void 0 || !k.size || S.length === 0) return "continue";
1487
+ var j = "".concat(Ie, ".g").concat(p, '[id="').concat(w, '"]'), v = "";
1488
+ k !== void 0 && k.forEach(function(a) {
1489
1489
  a.length > 0 && (v += "".concat(a, ","));
1490
- }), h += "".concat(S).concat(j, '{content:"').concat(v, '"}').concat(Ut);
1490
+ }), h += "".concat(S).concat(j, '{content:"').concat(v, '"}').concat(Ht);
1491
1491
  }, g = 0; g < d; g++) b(g);
1492
1492
  return h;
1493
1493
  }(o);
1494
1494
  });
1495
1495
  }
1496
1496
  return e.registerId = function(t) {
1497
- return Ue(t);
1497
+ return He(t);
1498
1498
  }, e.prototype.rehydrate = function() {
1499
- !this.server && nt && wr(this);
1499
+ !this.server && ot && wr(this);
1500
1500
  }, e.prototype.reconstructWithOptions = function(t, r) {
1501
1501
  return r === void 0 && (r = !0), new e(te(te({}, this.options), t), this.gs, r && this.names || void 0);
1502
1502
  }, e.prototype.allocateGSInstance = function(t) {
@@ -1504,124 +1504,124 @@ var fn = function(e) {
1504
1504
  }, e.prototype.getTag = function() {
1505
1505
  return this.tag || (this.tag = (t = function(r) {
1506
1506
  var n = r.useCSSOMInjection, o = r.target;
1507
- return r.isServer ? new ia(o) : n ? new aa(o) : new sa(o);
1508
- }(this.options), new Jo(t)));
1507
+ return r.isServer ? new ca(o) : n ? new sa(o) : new ia(o);
1508
+ }(this.options), new Xo(t)));
1509
1509
  var t;
1510
1510
  }, e.prototype.hasNameForId = function(t, r) {
1511
1511
  return this.names.has(t) && this.names.get(t).has(r);
1512
1512
  }, e.prototype.registerName = function(t, r) {
1513
- if (Ue(t), this.names.has(t)) this.names.get(t).add(r);
1513
+ if (He(t), this.names.has(t)) this.names.get(t).add(r);
1514
1514
  else {
1515
1515
  var n = /* @__PURE__ */ new Set();
1516
1516
  n.add(r), this.names.set(t, n);
1517
1517
  }
1518
1518
  }, e.prototype.insertRules = function(t, r, n) {
1519
- this.registerName(t, r), this.getTag().insertRules(Ue(t), n);
1519
+ this.registerName(t, r), this.getTag().insertRules(He(t), n);
1520
1520
  }, e.prototype.clearNames = function(t) {
1521
1521
  this.names.has(t) && this.names.get(t).clear();
1522
1522
  }, e.prototype.clearRules = function(t) {
1523
- this.getTag().clearGroup(Ue(t)), this.clearNames(t);
1523
+ this.getTag().clearGroup(He(t)), this.clearNames(t);
1524
1524
  }, e.prototype.clearTag = function() {
1525
1525
  this.tag = void 0;
1526
1526
  }, e;
1527
- }(), la = /&/g, da = /^\s*\/\/.*$/gm;
1528
- function mn(e, t) {
1527
+ }(), da = /&/g, ua = /^\s*\/\/.*$/gm;
1528
+ function gn(e, t) {
1529
1529
  return e.map(function(r) {
1530
1530
  return r.type === "rule" && (r.value = "".concat(t, " ").concat(r.value), r.value = r.value.replaceAll(",", ",".concat(t, " ")), r.props = r.props.map(function(n) {
1531
1531
  return "".concat(t, " ").concat(n);
1532
- })), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = mn(r.children, t)), r;
1532
+ })), Array.isArray(r.children) && r.type !== "@keyframes" && (r.children = gn(r.children, t)), r;
1533
1533
  });
1534
1534
  }
1535
- function ua(e) {
1536
- var t, r, n, o = Te, c = o.options, u = c === void 0 ? Te : c, d = o.plugins, h = d === void 0 ? pt : d, b = function(k, w, S) {
1537
- return S.startsWith(r) && S.endsWith(r) && S.replaceAll(r, "").length > 0 ? ".".concat(t) : k;
1535
+ function pa(e) {
1536
+ var t, r, n, o = Te, c = o.options, u = c === void 0 ? Te : c, d = o.plugins, h = d === void 0 ? ft : d, b = function(w, k, S) {
1537
+ return S.startsWith(r) && S.endsWith(r) && S.replaceAll(r, "").length > 0 ? ".".concat(t) : w;
1538
1538
  }, g = h.slice();
1539
- g.push(function(k) {
1540
- k.type === it && k.value.includes("&") && (k.props[0] = k.props[0].replace(la, r).replace(n, b));
1541
- }), u.prefix && g.push(Do), g.push(_o);
1542
- var p = function(k, w, S, j) {
1543
- w === void 0 && (w = ""), S === void 0 && (S = ""), j === void 0 && (j = "&"), t = j, r = w, n = new RegExp("\\".concat(r, "\\b"), "g");
1544
- var v = k.replace(da, ""), a = Eo(S || w ? "".concat(S, " ").concat(w, " { ").concat(v, " }") : v);
1545
- u.namespace && (a = mn(a, u.namespace));
1539
+ g.push(function(w) {
1540
+ w.type === ct && w.value.includes("&") && (w.props[0] = w.props[0].replace(da, r).replace(n, b));
1541
+ }), u.prefix && g.push(zo), g.push(Ro);
1542
+ var p = function(w, k, S, j) {
1543
+ k === void 0 && (k = ""), S === void 0 && (S = ""), j === void 0 && (j = "&"), t = j, r = k, n = new RegExp("\\".concat(r, "\\b"), "g");
1544
+ var v = w.replace(ua, ""), a = Mo(S || k ? "".concat(S, " ").concat(k, " { ").concat(v, " }") : v);
1545
+ u.namespace && (a = gn(a, u.namespace));
1546
1546
  var i = [];
1547
- return rt(a, Ro(g.concat(Po(function(s) {
1547
+ return nt(a, Po(g.concat(Do(function(s) {
1548
1548
  return i.push(s);
1549
1549
  })))), i;
1550
1550
  };
1551
- return p.hash = h.length ? h.reduce(function(k, w) {
1552
- return w.name || Fe(15), Se(k, w.name);
1553
- }, sn).toString() : "", p;
1551
+ return p.hash = h.length ? h.reduce(function(w, k) {
1552
+ return k.name || Fe(15), Se(w, k.name);
1553
+ }, cn).toString() : "", p;
1554
1554
  }
1555
- var pa = new hn(), Nt = ua(), gn = F.createContext({ shouldForwardProp: void 0, styleSheet: pa, stylis: Nt });
1556
- gn.Consumer;
1555
+ var fa = new mn(), Bt = pa(), bn = F.createContext({ shouldForwardProp: void 0, styleSheet: fa, stylis: Bt });
1556
+ bn.Consumer;
1557
1557
  F.createContext(void 0);
1558
- function vr() {
1559
- return qr(gn);
1558
+ function $r() {
1559
+ return Gr(bn);
1560
1560
  }
1561
- var fa = function() {
1561
+ var ha = function() {
1562
1562
  function e(t, r) {
1563
1563
  var n = this;
1564
1564
  this.inject = function(o, c) {
1565
- c === void 0 && (c = Nt);
1565
+ c === void 0 && (c = Bt);
1566
1566
  var u = n.name + c.hash;
1567
1567
  o.hasNameForId(n.id, u) || o.insertRules(n.id, u, c(n.rules, u, "@keyframes"));
1568
- }, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = r, qt(this, function() {
1568
+ }, this.name = t, this.id = "sc-keyframes-".concat(t), this.rules = r, Gt(this, function() {
1569
1569
  throw Fe(12, String(n.name));
1570
1570
  });
1571
1571
  }
1572
1572
  return e.prototype.getName = function(t) {
1573
- return t === void 0 && (t = Nt), this.name + t.hash;
1573
+ return t === void 0 && (t = Bt), this.name + t.hash;
1574
1574
  }, e;
1575
- }(), ha = function(e) {
1575
+ }(), ma = function(e) {
1576
1576
  return e >= "A" && e <= "Z";
1577
1577
  };
1578
- function $r(e) {
1578
+ function Sr(e) {
1579
1579
  for (var t = "", r = 0; r < e.length; r++) {
1580
1580
  var n = e[r];
1581
1581
  if (r === 1 && n === "-" && e[0] === "-") return e;
1582
- ha(n) ? t += "-" + n.toLowerCase() : t += n;
1582
+ ma(n) ? t += "-" + n.toLowerCase() : t += n;
1583
1583
  }
1584
1584
  return t.startsWith("ms-") ? "-" + t : t;
1585
1585
  }
1586
- var bn = function(e) {
1586
+ var yn = function(e) {
1587
1587
  return e == null || e === !1 || e === "";
1588
- }, yn = function(e) {
1588
+ }, xn = function(e) {
1589
1589
  var t, r, n = [];
1590
1590
  for (var o in e) {
1591
1591
  var c = e[o];
1592
- e.hasOwnProperty(o) && !bn(c) && (Array.isArray(c) && c.isCss || Ae(c) ? n.push("".concat($r(o), ":"), c, ";") : Le(c) ? n.push.apply(n, tt(tt(["".concat(o, " {")], yn(c), !1), ["}"], !1)) : n.push("".concat($r(o), ": ").concat((t = o, (r = c) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || t in zo || t.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";")));
1592
+ e.hasOwnProperty(o) && !yn(c) && (Array.isArray(c) && c.isCss || Ae(c) ? n.push("".concat(Sr(o), ":"), c, ";") : Le(c) ? n.push.apply(n, rt(rt(["".concat(o, " {")], xn(c), !1), ["}"], !1)) : n.push("".concat(Sr(o), ": ").concat((t = o, (r = c) == null || typeof r == "boolean" || r === "" ? "" : typeof r != "number" || r === 0 || t in Oo || t.startsWith("--") ? String(r).trim() : "".concat(r, "px")), ";")));
1593
1593
  }
1594
1594
  return n;
1595
1595
  };
1596
1596
  function xe(e, t, r, n) {
1597
- if (bn(e)) return [];
1598
- if (Ht(e)) return [".".concat(e.styledComponentId)];
1597
+ if (yn(e)) return [];
1598
+ if (qt(e)) return [".".concat(e.styledComponentId)];
1599
1599
  if (Ae(e)) {
1600
1600
  if (!Ae(c = e) || c.prototype && c.prototype.isReactComponent || !t) return [e];
1601
1601
  var o = e(t);
1602
1602
  return xe(o, t, r, n);
1603
1603
  }
1604
1604
  var c;
1605
- return e instanceof fa ? r ? (e.inject(r, n), [e.getName(n)]) : [e] : Le(e) ? yn(e) : Array.isArray(e) ? Array.prototype.concat.apply(pt, e.map(function(u) {
1605
+ return e instanceof ha ? r ? (e.inject(r, n), [e.getName(n)]) : [e] : Le(e) ? xn(e) : Array.isArray(e) ? Array.prototype.concat.apply(ft, e.map(function(u) {
1606
1606
  return xe(u, t, r, n);
1607
1607
  })) : [e.toString()];
1608
1608
  }
1609
- function ma(e) {
1609
+ function ga(e) {
1610
1610
  for (var t = 0; t < e.length; t += 1) {
1611
1611
  var r = e[t];
1612
- if (Ae(r) && !Ht(r)) return !1;
1612
+ if (Ae(r) && !qt(r)) return !1;
1613
1613
  }
1614
1614
  return !0;
1615
1615
  }
1616
- var ga = cn(ut), ba = function() {
1616
+ var ba = ln(pt), ya = function() {
1617
1617
  function e(t, r, n) {
1618
- this.rules = t, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) && ma(t), this.componentId = r, this.baseHash = Se(ga, r), this.baseStyle = n, hn.registerId(r);
1618
+ this.rules = t, this.staticRulesId = "", this.isStatic = (n === void 0 || n.isStatic) && ga(t), this.componentId = r, this.baseHash = Se(ba, r), this.baseStyle = n, mn.registerId(r);
1619
1619
  }
1620
1620
  return e.prototype.generateAndInjectStyles = function(t, r, n) {
1621
1621
  var o = this.baseStyle ? this.baseStyle.generateAndInjectStyles(t, r, n) : "";
1622
1622
  if (this.isStatic && !n.hash) if (this.staticRulesId && r.hasNameForId(this.componentId, this.staticRulesId)) o = be(o, this.staticRulesId);
1623
1623
  else {
1624
- var c = xr(xe(this.rules, t, r, n)), u = zt(Se(this.baseHash, c) >>> 0);
1624
+ var c = kr(xe(this.rules, t, r, n)), u = Ot(Se(this.baseHash, c) >>> 0);
1625
1625
  if (!r.hasNameForId(this.componentId, u)) {
1626
1626
  var d = n(c, ".".concat(u), void 0, this.componentId);
1627
1627
  r.insertRules(this.componentId, u, d);
@@ -1633,29 +1633,29 @@ var ga = cn(ut), ba = function() {
1633
1633
  var p = this.rules[g];
1634
1634
  if (typeof p == "string") b += p;
1635
1635
  else if (p) {
1636
- var k = xr(xe(p, t, r, n));
1637
- h = Se(h, k + g), b += k;
1636
+ var w = kr(xe(p, t, r, n));
1637
+ h = Se(h, w + g), b += w;
1638
1638
  }
1639
1639
  }
1640
1640
  if (b) {
1641
- var w = zt(h >>> 0);
1642
- r.hasNameForId(this.componentId, w) || r.insertRules(this.componentId, w, n(b, ".".concat(w), void 0, this.componentId)), o = be(o, w);
1641
+ var k = Ot(h >>> 0);
1642
+ r.hasNameForId(this.componentId, k) || r.insertRules(this.componentId, k, n(b, ".".concat(k), void 0, this.componentId)), o = be(o, k);
1643
1643
  }
1644
1644
  }
1645
1645
  return o;
1646
1646
  }, e;
1647
- }(), xn = F.createContext(void 0);
1648
- xn.Consumer;
1649
- var $t = {};
1650
- function ya(e, t, r) {
1651
- var n = Ht(e), o = e, c = !vt(e), u = t.attrs, d = u === void 0 ? pt : u, h = t.componentId, b = h === void 0 ? function(f, m) {
1652
- var x = typeof f != "string" ? "sc" : hr(f);
1653
- $t[x] = ($t[x] || 0) + 1;
1654
- var y = "".concat(x, "-").concat(Ko(ut + x + $t[x]));
1647
+ }(), kn = F.createContext(void 0);
1648
+ kn.Consumer;
1649
+ var St = {};
1650
+ function xa(e, t, r) {
1651
+ var n = qt(e), o = e, c = !$t(e), u = t.attrs, d = u === void 0 ? ft : u, h = t.componentId, b = h === void 0 ? function(f, m) {
1652
+ var x = typeof f != "string" ? "sc" : mr(f);
1653
+ St[x] = (St[x] || 0) + 1;
1654
+ var y = "".concat(x, "-").concat(Wo(pt + x + St[x]));
1655
1655
  return m ? "".concat(m, "-").concat(y) : y;
1656
1656
  }(t.displayName, t.parentComponentId) : h, g = t.displayName, p = g === void 0 ? function(f) {
1657
- return vt(f) ? "styled.".concat(f) : "Styled(".concat(Wo(f), ")");
1658
- }(e) : g, k = t.displayName && t.componentId ? "".concat(hr(t.displayName), "-").concat(t.componentId) : t.componentId || b, w = n && o.attrs ? o.attrs.concat(d).filter(Boolean) : d, S = t.shouldForwardProp;
1657
+ return $t(f) ? "styled.".concat(f) : "Styled(".concat(Uo(f), ")");
1658
+ }(e) : g, w = t.displayName && t.componentId ? "".concat(mr(t.displayName), "-").concat(t.componentId) : t.componentId || b, k = n && o.attrs ? o.attrs.concat(d).filter(Boolean) : d, S = t.shouldForwardProp;
1659
1659
  if (n && o.shouldForwardProp) {
1660
1660
  var j = o.shouldForwardProp;
1661
1661
  if (t.shouldForwardProp) {
@@ -1665,10 +1665,10 @@ function ya(e, t, r) {
1665
1665
  };
1666
1666
  } else S = j;
1667
1667
  }
1668
- var a = new ba(r, k, n ? o.componentStyle : void 0);
1668
+ var a = new ya(r, w, n ? o.componentStyle : void 0);
1669
1669
  function i(f, m) {
1670
1670
  return function(x, y, T) {
1671
- var E = x.attrs, z = x.componentStyle, R = x.defaultProps, K = x.foldedComponentIds, C = x.styledComponentId, W = x.target, I = F.useContext(xn), D = vr(), H = x.shouldForwardProp || D.shouldForwardProp, $ = No(y, I, R) || Te, P = function(q, V, J) {
1671
+ var E = x.attrs, z = x.componentStyle, R = x.defaultProps, K = x.foldedComponentIds, C = x.styledComponentId, W = x.target, I = F.useContext(kn), D = $r(), H = x.shouldForwardProp || D.shouldForwardProp, $ = Bo(y, I, R) || Te, P = function(q, V, J) {
1672
1672
  for (var le, de = te(te({}, V), { className: void 0, theme: J }), Re = 0; Re < q.length; Re += 1) {
1673
1673
  var me = Ae(le = q[Re]) ? le(de) : le;
1674
1674
  for (var X in me) de[X] = X === "className" ? be(de[X], me[X]) : X === "style" ? te(te({}, de[X]), me[X]) : me[X];
@@ -1677,64 +1677,64 @@ function ya(e, t, r) {
1677
1677
  }(E, y, $), O = P.as || W, L = {};
1678
1678
  for (var _ in P) P[_] === void 0 || _[0] === "$" || _ === "as" || _ === "theme" && P.theme === $ || (_ === "forwardedAs" ? L.as = P.forwardedAs : H && !H(_, O) || (L[_] = P[_]));
1679
1679
  var Y = function(q, V) {
1680
- var J = vr(), le = q.generateAndInjectStyles(V, J.styleSheet, J.stylis);
1680
+ var J = $r(), le = q.generateAndInjectStyles(V, J.styleSheet, J.stylis);
1681
1681
  return le;
1682
1682
  }(z, P), N = be(K, C);
1683
- return Y && (N += " " + Y), P.className && (N += " " + P.className), L[vt(O) && !an.has(O) ? "class" : "className"] = N, T && (L.ref = T), et(O, L);
1683
+ return Y && (N += " " + Y), P.className && (N += " " + P.className), L[$t(O) && !sn.has(O) ? "class" : "className"] = N, T && (L.ref = T), tt(O, L);
1684
1684
  }(s, f, m);
1685
1685
  }
1686
1686
  i.displayName = p;
1687
1687
  var s = F.forwardRef(i);
1688
- return s.attrs = w, s.componentStyle = a, s.displayName = p, s.shouldForwardProp = S, s.foldedComponentIds = n ? be(o.foldedComponentIds, o.styledComponentId) : "", s.styledComponentId = k, s.target = n ? o.target : e, Object.defineProperty(s, "defaultProps", { get: function() {
1688
+ return s.attrs = k, s.componentStyle = a, s.displayName = p, s.shouldForwardProp = S, s.foldedComponentIds = n ? be(o.foldedComponentIds, o.styledComponentId) : "", s.styledComponentId = w, s.target = n ? o.target : e, Object.defineProperty(s, "defaultProps", { get: function() {
1689
1689
  return this._foldedDefaultProps;
1690
1690
  }, set: function(f) {
1691
1691
  this._foldedDefaultProps = n ? function(m) {
1692
1692
  for (var x = [], y = 1; y < arguments.length; y++) x[y - 1] = arguments[y];
1693
- for (var T = 0, E = x; T < E.length; T++) Ot(m, E[T], !0);
1693
+ for (var T = 0, E = x; T < E.length; T++) Nt(m, E[T], !0);
1694
1694
  return m;
1695
1695
  }({}, o.defaultProps, f) : f;
1696
- } }), qt(s, function() {
1696
+ } }), Gt(s, function() {
1697
1697
  return ".".concat(s.styledComponentId);
1698
- }), c && pn(s, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), s;
1698
+ }), c && fn(s, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), s;
1699
1699
  }
1700
- function Sr(e, t) {
1700
+ function Cr(e, t) {
1701
1701
  for (var r = [e[0]], n = 0, o = t.length; n < o; n += 1) r.push(t[n], e[n + 1]);
1702
1702
  return r;
1703
1703
  }
1704
- var Cr = function(e) {
1704
+ var jr = function(e) {
1705
1705
  return Object.assign(e, { isCss: !0 });
1706
1706
  };
1707
- function xa(e) {
1707
+ function Ke(e) {
1708
1708
  for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
1709
- if (Ae(e) || Le(e)) return Cr(xe(Sr(pt, tt([e], t, !0))));
1709
+ if (Ae(e) || Le(e)) return jr(xe(Cr(ft, rt([e], t, !0))));
1710
1710
  var n = e;
1711
- return t.length === 0 && n.length === 1 && typeof n[0] == "string" ? xe(n) : Cr(xe(Sr(n, t)));
1711
+ return t.length === 0 && n.length === 1 && typeof n[0] == "string" ? xe(n) : jr(xe(Cr(n, t)));
1712
1712
  }
1713
- function Bt(e, t, r) {
1713
+ function Lt(e, t, r) {
1714
1714
  if (r === void 0 && (r = Te), !t) throw Fe(1, t);
1715
1715
  var n = function(o) {
1716
1716
  for (var c = [], u = 1; u < arguments.length; u++) c[u - 1] = arguments[u];
1717
- return e(t, r, xa.apply(void 0, tt([o], c, !1)));
1717
+ return e(t, r, Ke.apply(void 0, rt([o], c, !1)));
1718
1718
  };
1719
1719
  return n.attrs = function(o) {
1720
- return Bt(e, t, te(te({}, r), { attrs: Array.prototype.concat(r.attrs, o).filter(Boolean) }));
1720
+ return Lt(e, t, te(te({}, r), { attrs: Array.prototype.concat(r.attrs, o).filter(Boolean) }));
1721
1721
  }, n.withConfig = function(o) {
1722
- return Bt(e, t, te(te({}, r), o));
1722
+ return Lt(e, t, te(te({}, r), o));
1723
1723
  }, n;
1724
1724
  }
1725
1725
  var wn = function(e) {
1726
- return Bt(ya, e);
1726
+ return Lt(xa, e);
1727
1727
  }, A = wn;
1728
- an.forEach(function(e) {
1728
+ sn.forEach(function(e) {
1729
1729
  A[e] = wn(e);
1730
1730
  });
1731
- const wa = A.div`
1731
+ const ka = A.div`
1732
1732
  display: flex;
1733
1733
  align-items: center;
1734
1734
  gap: 4px;
1735
1735
  margin-top: 6px;
1736
1736
  padding-left: 2px;
1737
- `, jr = A.button`
1737
+ `, Ir = A.button`
1738
1738
  cursor: pointer;
1739
1739
  display: inline-flex;
1740
1740
  align-items: center;
@@ -1767,13 +1767,13 @@ const wa = A.div`
1767
1767
  }
1768
1768
  }
1769
1769
  `;
1770
- function kn({
1770
+ function vn({
1771
1771
  content: e,
1772
1772
  disabled: t,
1773
1773
  onExportPdf: r
1774
1774
  }) {
1775
1775
  const [n, o] = F.useState(!1), c = () => {
1776
- Xn(e);
1776
+ eo(e);
1777
1777
  }, u = async () => {
1778
1778
  o(!0);
1779
1779
  try {
@@ -1782,44 +1782,37 @@ function kn({
1782
1782
  o(!1);
1783
1783
  }
1784
1784
  };
1785
- return /* @__PURE__ */ l.jsxs(wa, { children: [
1785
+ return /* @__PURE__ */ l.jsxs(ka, { children: [
1786
1786
  /* @__PURE__ */ l.jsx(
1787
- jr,
1787
+ Ir,
1788
1788
  {
1789
1789
  type: "button",
1790
1790
  onClick: c,
1791
1791
  disabled: t,
1792
1792
  "aria-label": "Copy message",
1793
1793
  title: "Copy",
1794
- children: /* @__PURE__ */ l.jsx(so, { size: 16, strokeWidth: 1.75 })
1794
+ children: /* @__PURE__ */ l.jsx(io, { size: 16, strokeWidth: 1.75 })
1795
1795
  }
1796
1796
  ),
1797
1797
  /* @__PURE__ */ l.jsx(
1798
- jr,
1798
+ Ir,
1799
1799
  {
1800
1800
  type: "button",
1801
1801
  onClick: () => void u(),
1802
1802
  disabled: t || n,
1803
1803
  "aria-label": "Download PDF",
1804
1804
  title: "Download PDF",
1805
- children: /* @__PURE__ */ l.jsx(co, { size: 16, strokeWidth: 1.75 })
1805
+ children: /* @__PURE__ */ l.jsx(lo, { size: 16, strokeWidth: 1.75 })
1806
1806
  }
1807
1807
  )
1808
1808
  ] });
1809
1809
  }
1810
- const ka = A.div`
1810
+ const wa = A.div`
1811
1811
  display: flex;
1812
1812
  flex-wrap: wrap;
1813
1813
  gap: 6px;
1814
1814
  margin-bottom: 6px;
1815
- `, va = A.div`
1816
- display: inline-flex;
1817
- align-items: center;
1818
- gap: 6px;
1819
- max-width: 220px;
1820
- padding: 4px 8px;
1821
- border-radius: 8px;
1822
- font-size: 12px;
1815
+ `, va = Ke`
1823
1816
  background: ${(e) => e.$isImage ? "rgba(59, 130, 246, 0.12)" : "rgba(107, 114, 128, 0.12)"};
1824
1817
  color: #374151;
1825
1818
  border: 1px solid #e5e7eb;
@@ -1829,18 +1822,52 @@ const ka = A.div`
1829
1822
  border-color: #4b5563;
1830
1823
  background: ${(e) => e.$isImage ? "rgba(59, 130, 246, 0.2)" : "rgba(107, 114, 128, 0.25)"};
1831
1824
  }
1832
- `, $a = A.img`
1825
+ `, $a = Ke`
1826
+ background: ${(e) => e.$isImage ? "rgba(255, 255, 255, 0.22)" : "rgba(255, 255, 255, 0.16)"};
1827
+ color: #ffffff;
1828
+ border: 1px solid rgba(255, 255, 255, 0.45);
1829
+ `, Sa = A.div`
1830
+ display: inline-flex;
1831
+ align-items: center;
1832
+ gap: 6px;
1833
+ max-width: 220px;
1834
+ padding: 5px 10px;
1835
+ border-radius: 8px;
1836
+ font-size: 12px;
1837
+ font-weight: 500;
1838
+ line-height: 1.3;
1839
+ transition:
1840
+ background-color 0.2s ease,
1841
+ border-color 0.2s ease;
1842
+
1843
+ ${(e) => e.$tone === "onPrimary" ? $a : va}
1844
+ `, Ca = A.img`
1833
1845
  width: 28px;
1834
1846
  height: 28px;
1835
1847
  object-fit: cover;
1836
1848
  border-radius: 4px;
1837
- `, Sa = A.span`
1849
+ flex-shrink: 0;
1850
+ `, ja = A.span`
1838
1851
  overflow: hidden;
1839
1852
  text-overflow: ellipsis;
1840
1853
  white-space: nowrap;
1841
1854
  flex: 1;
1842
1855
  min-width: 0;
1843
- `, Ca = A.button`
1856
+ `, Ia = Ke`
1857
+ color: #6b7280;
1858
+
1859
+ &:hover {
1860
+ color: #ef4444;
1861
+ background: rgba(239, 68, 68, 0.1);
1862
+ }
1863
+ `, Ta = Ke`
1864
+ color: rgba(255, 255, 255, 0.85);
1865
+
1866
+ &:hover {
1867
+ color: #ffffff;
1868
+ background: rgba(255, 255, 255, 0.2);
1869
+ }
1870
+ `, Aa = A.button`
1844
1871
  display: flex;
1845
1872
  align-items: center;
1846
1873
  justify-content: center;
@@ -1848,22 +1875,43 @@ const ka = A.div`
1848
1875
  border: none;
1849
1876
  background: transparent;
1850
1877
  cursor: pointer;
1851
- color: #6b7280;
1852
1878
  border-radius: 4px;
1879
+ transition:
1880
+ color 0.2s ease,
1881
+ background-color 0.2s ease;
1853
1882
 
1854
- &:hover {
1855
- color: #ef4444;
1856
- background: rgba(239, 68, 68, 0.1);
1857
- }
1883
+ ${(e) => e.$tone === "onPrimary" ? Ta : Ia}
1858
1884
  `;
1859
- function we({ attachments: e, onRemove: t, readOnly: r }) {
1860
- return e.length ? /* @__PURE__ */ l.jsx(ka, { children: e.map((n) => {
1861
- const o = n.type === "image", c = o && (n.preview || n.url);
1862
- return /* @__PURE__ */ l.jsxs(va, { $isImage: o, title: n.name, children: [
1863
- c ? /* @__PURE__ */ l.jsx($a, { src: n.preview || n.url, alt: "", loading: "lazy", decoding: "async" }) : o ? /* @__PURE__ */ l.jsx(fo, { size: 16, "aria-hidden": !0 }) : /* @__PURE__ */ l.jsx(uo, { size: 16, "aria-hidden": !0 }),
1864
- /* @__PURE__ */ l.jsx(Sa, { children: n.name }),
1865
- !r && t && /* @__PURE__ */ l.jsx(Ca, { type: "button", onClick: () => t(n.id), "aria-label": `Remove ${n.name}`, children: /* @__PURE__ */ l.jsx(bo, { size: 14 }) })
1866
- ] }, n.id);
1885
+ function ke({
1886
+ attachments: e,
1887
+ onRemove: t,
1888
+ readOnly: r,
1889
+ tone: n = "default"
1890
+ }) {
1891
+ return e.length ? /* @__PURE__ */ l.jsx(wa, { children: e.map((o) => {
1892
+ const c = o.type === "image", u = c && (o.preview || o.url);
1893
+ return /* @__PURE__ */ l.jsxs(Sa, { $isImage: c, $tone: n, title: o.name, children: [
1894
+ u ? /* @__PURE__ */ l.jsx(
1895
+ Ca,
1896
+ {
1897
+ src: o.preview || o.url,
1898
+ alt: "",
1899
+ loading: "lazy",
1900
+ decoding: "async"
1901
+ }
1902
+ ) : c ? /* @__PURE__ */ l.jsx(ho, { size: 16, "aria-hidden": !0 }) : /* @__PURE__ */ l.jsx(po, { size: 16, "aria-hidden": !0 }),
1903
+ /* @__PURE__ */ l.jsx(ja, { children: o.name }),
1904
+ !r && t && /* @__PURE__ */ l.jsx(
1905
+ Aa,
1906
+ {
1907
+ type: "button",
1908
+ $tone: n,
1909
+ onClick: () => t(o.id),
1910
+ "aria-label": `Remove ${o.name}`,
1911
+ children: /* @__PURE__ */ l.jsx(yo, { size: 14 })
1912
+ }
1913
+ )
1914
+ ] }, o.id);
1867
1915
  }) }) : null;
1868
1916
  }
1869
1917
  function ge() {
@@ -1875,35 +1923,35 @@ function ge() {
1875
1923
  return e;
1876
1924
  }, ge.apply(this, arguments);
1877
1925
  }
1878
- const ja = ["children", "options"], Ir = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), { class: "className", for: "htmlFor" }), Tr = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, Ia = ["style", "script", "pre"], Ta = ["src", "href", "data", "formAction", "srcDoc", "action"], Aa = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Ea = /mailto:/i, Ma = /\n{2,}$/, Ar = /^(\s*>[\s\S]*?)(?=\n\n|$)/, _a = /^ *> ?/gm, Ra = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Pa = /^ {2,}\n/, Da = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Er = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, Mr = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, za = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Oa = /^(?:\n *)*\n/, Na = /\r\n?/g, Ba = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, La = /^\[\^([^\]]+)]/, Fa = /\f/g, Ka = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Wa = /^\s*?\[(x|\s)\]/, _r = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Rr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Pr = /^([^\n]+)\n *(=|-){3,} *\n/, St = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Ua = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, Dr = /^<!--[\s\S]*?(?:-->)/, Ha = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Ct = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, qa = /^\{.*\}$/, Ga = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Qa = /^<([^ >]+@[^ >]+)>/, Ya = /^<([^ >]+:\/[^ >]+)>/, Va = /-([a-z])?/gi, zr = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Za = /^[^\n]+(?: \n|\n{2,})/, Ja = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Xa = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, es = /^\[([^\]]*)\] ?\[([^\]]*)\]/, ts = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, rs = /\t/g, ns = /(^ *\||\| *$)/g, os = /^ *:-+: *$/, as = /^ *:-+ *$/, ss = /^ *-+: *$/, ft = (e) => `(?=[\\s\\S]+?\\1${e ? "\\1" : ""})`, ht = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", is = RegExp(`^([*_])\\1${ft(1)}${ht}\\1\\1(?!\\1)`), cs = RegExp(`^([*_])${ft(0)}${ht}\\1(?!\\1)`), ls = RegExp(`^(==)${ft(0)}${ht}\\1`), ds = RegExp(`^(~~)${ft(0)}${ht}\\1`), us = /^(:[a-zA-Z0-9-_]+:)/, ps = /^\\([^0-9A-Za-z\s])/, fs = /\\([^0-9A-Za-z\s])/g, hs = /^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/, ms = /^\n+/, gs = /^([ \t]*)/, bs = /(?:^|\n)( *)$/, Gt = "(?:\\d+\\.)", Qt = "(?:[*+-])";
1879
- function vn(e) {
1880
- return "( *)(" + (e === 1 ? Gt : Qt) + ") +";
1881
- }
1882
- const $n = vn(1), Sn = vn(2);
1883
- function Cn(e) {
1884
- return RegExp("^" + (e === 1 ? $n : Sn));
1926
+ const Ea = ["children", "options"], Tr = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), { class: "className", for: "htmlFor" }), Ar = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, Ma = ["style", "script", "pre"], _a = ["src", "href", "data", "formAction", "srcDoc", "action"], Ra = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, Pa = /mailto:/i, Da = /\n{2,}$/, Er = /^(\s*>[\s\S]*?)(?=\n\n|$)/, za = /^ *> ?/gm, Oa = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, Na = /^ {2,}\n/, Ba = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, Mr = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, _r = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, La = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, Fa = /^(?:\n *)*\n/, Ka = /\r\n?/g, Wa = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, Ua = /^\[\^([^\]]+)]/, Ha = /\f/g, qa = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, Ga = /^\s*?\[(x|\s)\]/, Rr = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Pr = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, Dr = /^([^\n]+)\n *(=|-){3,} *\n/, Ct = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Qa = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, zr = /^<!--[\s\S]*?(?:-->)/, Ya = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, jt = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Va = /^\{.*\}$/, Za = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, Ja = /^<([^ >]+@[^ >]+)>/, Xa = /^<([^ >]+:\/[^ >]+)>/, es = /-([a-z])?/gi, Or = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, ts = /^[^\n]+(?: \n|\n{2,})/, rs = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, ns = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, os = /^\[([^\]]*)\] ?\[([^\]]*)\]/, as = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, ss = /\t/g, is = /(^ *\||\| *$)/g, cs = /^ *:-+: *$/, ls = /^ *:-+ *$/, ds = /^ *-+: *$/, ht = (e) => `(?=[\\s\\S]+?\\1${e ? "\\1" : ""})`, mt = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", us = RegExp(`^([*_])\\1${ht(1)}${mt}\\1\\1(?!\\1)`), ps = RegExp(`^([*_])${ht(0)}${mt}\\1(?!\\1)`), fs = RegExp(`^(==)${ht(0)}${mt}\\1`), hs = RegExp(`^(~~)${ht(0)}${mt}\\1`), ms = /^(:[a-zA-Z0-9-_]+:)/, gs = /^\\([^0-9A-Za-z\s])/, bs = /\\([^0-9A-Za-z\s])/g, ys = /^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/, xs = /^\n+/, ks = /^([ \t]*)/, ws = /(?:^|\n)( *)$/, Qt = "(?:\\d+\\.)", Yt = "(?:[*+-])";
1927
+ function $n(e) {
1928
+ return "( *)(" + (e === 1 ? Qt : Yt) + ") +";
1885
1929
  }
1886
- const ys = Cn(1), xs = Cn(2);
1930
+ const Sn = $n(1), Cn = $n(2);
1887
1931
  function jn(e) {
1888
- return RegExp("^" + (e === 1 ? $n : Sn) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Gt : Qt) + " )[^\\n]*)*(\\n|$)", "gm");
1932
+ return RegExp("^" + (e === 1 ? Sn : Cn));
1889
1933
  }
1890
- const ws = jn(1), ks = jn(2);
1934
+ const vs = jn(1), $s = jn(2);
1891
1935
  function In(e) {
1892
- const t = e === 1 ? Gt : Qt;
1936
+ return RegExp("^" + (e === 1 ? Sn : Cn) + "[^\\n]*(?:\\n(?!\\1" + (e === 1 ? Qt : Yt) + " )[^\\n]*)*(\\n|$)", "gm");
1937
+ }
1938
+ const Ss = In(1), Cs = In(2);
1939
+ function Tn(e) {
1940
+ const t = e === 1 ? Qt : Yt;
1893
1941
  return RegExp("^( *)(" + t + ") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1" + t + " (?!" + t + " ))\\n*|\\s*\\n*$)");
1894
1942
  }
1895
- const Tn = In(1), An = In(2);
1896
- function Or(e, t) {
1897
- const r = t === 1, n = r ? Tn : An, o = r ? ws : ks, c = r ? ys : xs;
1943
+ const An = Tn(1), En = Tn(2);
1944
+ function Nr(e, t) {
1945
+ const r = t === 1, n = r ? An : En, o = r ? Ss : Cs, c = r ? vs : $s;
1898
1946
  return { t: (u) => c.test(u), o: Ee(function(u, d) {
1899
- const h = bs.exec(d.prevCapture);
1947
+ const h = ws.exec(d.prevCapture);
1900
1948
  return h && (d.list || !d.inline && !d.simple) ? n.exec(u = h[1] + u) : null;
1901
1949
  }), i: 1, u(u, d, h) {
1902
- const b = r ? +u[2] : void 0, g = u[0].replace(Ma, `
1950
+ const b = r ? +u[2] : void 0, g = u[0].replace(Da, `
1903
1951
  `).match(o);
1904
1952
  let p = !1;
1905
- return { items: g.map(function(k, w) {
1906
- const S = c.exec(k)[0].length, j = RegExp("^ {1," + S + "}", "gm"), v = k.replace(j, "").replace(c, ""), a = w === g.length - 1, i = v.indexOf(`
1953
+ return { items: g.map(function(w, k) {
1954
+ const S = c.exec(w)[0].length, j = RegExp("^ {1," + S + "}", "gm"), v = w.replace(j, "").replace(c, ""), a = k === g.length - 1, i = v.indexOf(`
1907
1955
 
1908
1956
  `) !== -1 || a && p;
1909
1957
  p = i;
@@ -1919,18 +1967,18 @@ function Or(e, t) {
1919
1967
  return e("li", { key: g }, d(b, h));
1920
1968
  })) };
1921
1969
  }
1922
- const vs = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), $s = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
1970
+ const js = RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), Is = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;
1923
1971
  function Be(e) {
1924
1972
  let t = e.length;
1925
1973
  for (; t > 0 && e[t - 1] <= " "; ) t--;
1926
1974
  return e.slice(0, t);
1927
1975
  }
1928
- function Je(e, t) {
1976
+ function Xe(e, t) {
1929
1977
  return e.startsWith(t);
1930
1978
  }
1931
- function Ss(e, t, r) {
1979
+ function Ts(e, t, r) {
1932
1980
  if (Array.isArray(r)) {
1933
- for (let n = 0; n < r.length; n++) if (Je(e, r[n])) return !0;
1981
+ for (let n = 0; n < r.length; n++) if (Xe(e, r[n])) return !0;
1934
1982
  return !1;
1935
1983
  }
1936
1984
  return r(e, t);
@@ -1938,10 +1986,10 @@ function Ss(e, t, r) {
1938
1986
  function De(e) {
1939
1987
  return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g, "a").replace(/[çÇ]/g, "c").replace(/[ðÐ]/g, "d").replace(/[ÈÉÊËéèêë]/g, "e").replace(/[ÏïÎîÍíÌì]/g, "i").replace(/[Ññ]/g, "n").replace(/[øØœŒÕõÔôÓóÒò]/g, "o").replace(/[ÜüÛûÚúÙù]/g, "u").replace(/[ŸÿÝý]/g, "y").replace(/[^a-z0-9- ]/gi, "").replace(/ /gi, "-").toLowerCase();
1940
1988
  }
1941
- function Cs(e) {
1942
- return ss.test(e) ? "right" : os.test(e) ? "center" : as.test(e) ? "left" : null;
1989
+ function As(e) {
1990
+ return ds.test(e) ? "right" : cs.test(e) ? "center" : ls.test(e) ? "left" : null;
1943
1991
  }
1944
- function Nr(e, t, r, n) {
1992
+ function Br(e, t, r, n) {
1945
1993
  const o = r.inTable;
1946
1994
  r.inTable = !0;
1947
1995
  let c = [[]], u = "";
@@ -1954,17 +2002,17 @@ function Nr(e, t, r, n) {
1954
2002
  h.trim() === "|" && (d(), n) ? b !== 0 && b !== g.length - 1 && c.push([]) : u += h;
1955
2003
  }), d(), r.inTable = o, c;
1956
2004
  }
1957
- function js(e, t, r) {
2005
+ function Es(e, t, r) {
1958
2006
  r.inline = !0;
1959
- const n = e[2] ? e[2].replace(ns, "").split("|").map(Cs) : [], o = e[3] ? function(u, d, h) {
2007
+ const n = e[2] ? e[2].replace(is, "").split("|").map(As) : [], o = e[3] ? function(u, d, h) {
1960
2008
  return u.trim().split(`
1961
2009
  `).map(function(b) {
1962
- return Nr(b, d, h, !0);
2010
+ return Br(b, d, h, !0);
1963
2011
  });
1964
- }(e[3], t, r) : [], c = Nr(e[1], t, r, !!o.length);
2012
+ }(e[3], t, r) : [], c = Br(e[1], t, r, !!o.length);
1965
2013
  return r.inline = !1, o.length ? { align: n, cells: o, header: c, type: "25" } : { children: c, type: "21" };
1966
2014
  }
1967
- function Br(e, t) {
2015
+ function Lr(e, t) {
1968
2016
  return e.align[t] == null ? {} : { textAlign: e.align[t] };
1969
2017
  }
1970
2018
  function Ee(e) {
@@ -1985,73 +2033,73 @@ function ie(e) {
1985
2033
  return r.inline || r.simple ? null : e.exec(t);
1986
2034
  };
1987
2035
  }
1988
- function He(e) {
2036
+ function qe(e) {
1989
2037
  return Ee(function(t) {
1990
2038
  return e.exec(t);
1991
2039
  });
1992
2040
  }
1993
- const Is = /(javascript|vbscript|data(?!:image)):/i;
1994
- function Ts(e) {
2041
+ const Ms = /(javascript|vbscript|data(?!:image)):/i;
2042
+ function _s(e) {
1995
2043
  try {
1996
2044
  const t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
1997
- if (Is.test(t)) return null;
2045
+ if (Ms.test(t)) return null;
1998
2046
  } catch {
1999
2047
  return null;
2000
2048
  }
2001
2049
  return e;
2002
2050
  }
2003
2051
  function oe(e) {
2004
- return e && e.replace(fs, "$1");
2052
+ return e && e.replace(bs, "$1");
2005
2053
  }
2006
- function Xe(e, t, r) {
2054
+ function et(e, t, r) {
2007
2055
  const n = r.inline || !1, o = r.simple || !1;
2008
2056
  r.inline = !0, r.simple = !0;
2009
2057
  const c = e(t, r);
2010
2058
  return r.inline = n, r.simple = o, c;
2011
2059
  }
2012
- function As(e, t, r) {
2060
+ function Rs(e, t, r) {
2013
2061
  const n = r.inline || !1, o = r.simple || !1;
2014
2062
  r.inline = !1, r.simple = !0;
2015
2063
  const c = e(t, r);
2016
2064
  return r.inline = n, r.simple = o, c;
2017
2065
  }
2018
- function Es(e, t, r) {
2066
+ function Ps(e, t, r) {
2019
2067
  const n = r.inline || !1;
2020
2068
  r.inline = !1;
2021
2069
  const o = e(t, r);
2022
2070
  return r.inline = n, o;
2023
2071
  }
2024
- const jt = (e, t, r) => ({ children: Xe(t, e[2], r) });
2025
- function It() {
2072
+ const It = (e, t, r) => ({ children: et(t, e[2], r) });
2073
+ function Tt() {
2026
2074
  return {};
2027
2075
  }
2028
- function Tt() {
2076
+ function At() {
2029
2077
  return null;
2030
2078
  }
2031
- function Ms(...e) {
2079
+ function Ds(...e) {
2032
2080
  return e.filter(Boolean).join(" ");
2033
2081
  }
2034
- function At(e, t, r) {
2082
+ function Et(e, t, r) {
2035
2083
  let n = e;
2036
2084
  const o = t.split(".");
2037
2085
  for (; o.length && (n = n[o[0]], n !== void 0); ) o.shift();
2038
2086
  return n || r;
2039
2087
  }
2040
- function _s(e = "", t = {}) {
2041
- t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? ge({}, Tr, t.namedCodesToUnicode) : Tr;
2042
- const r = t.slugify || De, n = t.sanitizer || Ts, o = t.createElement || Lt.createElement, c = [Ar, Er, Mr, t.enforceAtxHeadings ? Rr : _r, Pr, zr, Tn, An], u = [...c, Za, St, Dr, Ct];
2088
+ function zs(e = "", t = {}) {
2089
+ t.overrides = t.overrides || {}, t.namedCodesToUnicode = t.namedCodesToUnicode ? ge({}, Ar, t.namedCodesToUnicode) : Ar;
2090
+ const r = t.slugify || De, n = t.sanitizer || _s, o = t.createElement || Ft.createElement, c = [Er, Mr, _r, t.enforceAtxHeadings ? Pr : Rr, Dr, Or, An, En], u = [...c, ts, Ct, zr, jt];
2043
2091
  function d(a, i, ...s) {
2044
- const f = At(t.overrides, a + ".props", {});
2092
+ const f = Et(t.overrides, a + ".props", {});
2045
2093
  return o(function(m, x) {
2046
- const y = At(x, m);
2047
- return y ? typeof y == "function" || typeof y == "object" && "render" in y ? y : At(x, m + ".component", m) : m;
2048
- }(a, t.overrides), ge({}, i, f, { className: Ms(i == null ? void 0 : i.className, f.className) || void 0 }), ...s);
2094
+ const y = Et(x, m);
2095
+ return y ? typeof y == "function" || typeof y == "object" && "render" in y ? y : Et(x, m + ".component", m) : m;
2096
+ }(a, t.overrides), ge({}, i, f, { className: Ds(i == null ? void 0 : i.className, f.className) || void 0 }), ...s);
2049
2097
  }
2050
2098
  function h(a) {
2051
- a = a.replace(Ka, "");
2099
+ a = a.replace(qa, "");
2052
2100
  let i = !1;
2053
- t.forceInline ? i = !0 : t.forceBlock || (i = ts.test(a) === !1);
2054
- const s = S(w(i ? a : Be(a).replace(ms, "") + `
2101
+ t.forceInline ? i = !0 : t.forceBlock || (i = as.test(a) === !1);
2102
+ const s = S(k(i ? a : Be(a).replace(xs, "") + `
2055
2103
 
2056
2104
  `, { inline: i }));
2057
2105
  for (; typeof s[s.length - 1] == "string" && !s[s.length - 1].trim(); ) s.pop();
@@ -2067,18 +2115,18 @@ function _s(e = "", t = {}) {
2067
2115
  }
2068
2116
  function b(a, i) {
2069
2117
  if (!i || !i.trim()) return null;
2070
- const s = i.match(Aa);
2118
+ const s = i.match(Ra);
2071
2119
  return s ? s.reduce(function(f, m) {
2072
2120
  const x = m.indexOf("=");
2073
2121
  if (x !== -1) {
2074
2122
  const y = function(R) {
2075
- return R.indexOf("-") !== -1 && R.match(Ha) === null && (R = R.replace(Va, function(K, C) {
2123
+ return R.indexOf("-") !== -1 && R.match(Ya) === null && (R = R.replace(es, function(K, C) {
2076
2124
  return C.toUpperCase();
2077
2125
  })), R;
2078
2126
  }(m.slice(0, x)).trim(), T = function(R) {
2079
2127
  const K = R[0];
2080
2128
  return (K === '"' || K === "'") && R.length >= 2 && R[R.length - 1] === K ? R.slice(1, -1) : R;
2081
- }(m.slice(x + 1).trim()), E = Ir[y] || y;
2129
+ }(m.slice(x + 1).trim()), E = Tr[y] || y;
2082
2130
  if (E === "ref") return f;
2083
2131
  const z = f[E] = function(R, K, C, W) {
2084
2132
  return K === "style" ? function(I) {
@@ -2111,39 +2159,39 @@ function _s(e = "", t = {}) {
2111
2159
  return D;
2112
2160
  }(C).reduce(function(I, [D, H]) {
2113
2161
  return I[D.replace(/(-[a-z])/g, ($) => $[1].toUpperCase())] = W(H, R, D), I;
2114
- }, {}) : Ta.indexOf(K) !== -1 ? W(oe(C), R, K) : (C.match(qa) && (C = oe(C.slice(1, C.length - 1))), C === "true" || C !== "false" && C);
2162
+ }, {}) : _a.indexOf(K) !== -1 ? W(oe(C), R, K) : (C.match(Va) && (C = oe(C.slice(1, C.length - 1))), C === "true" || C !== "false" && C);
2115
2163
  }(a, y, T, n);
2116
- typeof z == "string" && (St.test(z) || Ct.test(z)) && (f[E] = h(z.trim()));
2117
- } else m !== "style" && (f[Ir[m] || m] = !0);
2164
+ typeof z == "string" && (Ct.test(z) || jt.test(z)) && (f[E] = h(z.trim()));
2165
+ } else m !== "style" && (f[Tr[m] || m] = !0);
2118
2166
  return f;
2119
2167
  }, {}) : null;
2120
2168
  }
2121
- const g = [], p = {}, k = { 0: { t: [">"], o: ie(Ar), i: 1, u(a, i, s) {
2122
- const [, f, m] = a[0].replace(_a, "").match(Ra);
2169
+ const g = [], p = {}, w = { 0: { t: [">"], o: ie(Er), i: 1, u(a, i, s) {
2170
+ const [, f, m] = a[0].replace(za, "").match(Oa);
2123
2171
  return { alert: f, children: i(m, s) };
2124
2172
  }, l(a, i, s) {
2125
2173
  const f = { key: s.key };
2126
2174
  return a.alert && (f.className = "markdown-alert-" + r(a.alert.toLowerCase(), De), a.children.unshift({ attrs: {}, children: [{ type: "27", text: a.alert }], noInnerParse: !0, type: "11", tag: "header" })), d("blockquote", f, i(a.children, s));
2127
- } }, 1: { o: He(Pa), i: 1, u: It, l: (a, i, s) => d("br", { key: s.key }) }, 2: { t: (a) => {
2175
+ } }, 1: { o: qe(Na), i: 1, u: Tt, l: (a, i, s) => d("br", { key: s.key }) }, 2: { t: (a) => {
2128
2176
  const i = a[0];
2129
2177
  return i === "-" || i === "*" || i === "_";
2130
- }, o: ie(Da), i: 1, u: It, l: (a, i, s) => d("hr", { key: s.key }) }, 3: { t: [" "], o: ie(Mr), i: 0, u: (a) => ({ lang: void 0, text: oe(Be(a[0].replace(/^ {4}/gm, ""))) }), l: (a, i, s) => d("pre", { key: s.key }, d("code", ge({}, a.attrs, { className: a.lang ? "lang-" + a.lang : "" }), a.text)) }, 4: { t: ["```", "~~~"], o: ie(Er), i: 0, u: (a) => ({ attrs: b("code", a[3] || ""), lang: a[2] || void 0, text: a[4], type: "3" }) }, 5: { t: ["`"], o: pe(za), i: 3, u: (a) => ({ text: oe(a[2]) }), l: (a, i, s) => d("code", { key: s.key }, a.text) }, 6: { t: ["[^"], o: ie(Ba), i: 0, u: (a) => (g.push({ footnote: a[2], identifier: a[1] }), {}), l: Tt }, 7: { t: ["[^"], o: ue(La), i: 1, u: (a) => ({ target: "#" + r(a[1], De), text: a[1] }), l: (a, i, s) => d("a", { key: s.key, href: n(a.target, "a", "href") }, d("sup", { key: s.key }, a.text)) }, 8: { t: ["[ ]", "[x]"], o: ue(Wa), i: 1, u: (a) => ({ completed: a[1].toLowerCase() === "x" }), l: (a, i, s) => d("input", { checked: a.completed, key: s.key, readOnly: !0, type: "checkbox" }) }, 9: { t: ["#"], o: ie(t.enforceAtxHeadings ? Rr : _r), i: 1, u: (a, i, s) => ({ children: Xe(i, a[2], s), id: r(a[2], De), level: a[1].length }), l: (a, i, s) => d("h" + a.level, { id: a.id, key: s.key }, i(a.children, s)) }, 10: { o: ie(Pr), i: 0, u: (a, i, s) => ({ children: Xe(i, a[1], s), level: a[2] === "=" ? 1 : 2, type: "9" }) }, 11: { t: ["<"], o: He(St), i: 1, u(a, i, s) {
2131
- const [, f] = a[3].match(gs), m = RegExp("^" + f, "gm"), x = a[3].replace(m, ""), y = (T = x, u.some((C) => C.test(T)) ? Es : Xe);
2178
+ }, o: ie(Ba), i: 1, u: Tt, l: (a, i, s) => d("hr", { key: s.key }) }, 3: { t: [" "], o: ie(_r), i: 0, u: (a) => ({ lang: void 0, text: oe(Be(a[0].replace(/^ {4}/gm, ""))) }), l: (a, i, s) => d("pre", { key: s.key }, d("code", ge({}, a.attrs, { className: a.lang ? "lang-" + a.lang : "" }), a.text)) }, 4: { t: ["```", "~~~"], o: ie(Mr), i: 0, u: (a) => ({ attrs: b("code", a[3] || ""), lang: a[2] || void 0, text: a[4], type: "3" }) }, 5: { t: ["`"], o: pe(La), i: 3, u: (a) => ({ text: oe(a[2]) }), l: (a, i, s) => d("code", { key: s.key }, a.text) }, 6: { t: ["[^"], o: ie(Wa), i: 0, u: (a) => (g.push({ footnote: a[2], identifier: a[1] }), {}), l: At }, 7: { t: ["[^"], o: ue(Ua), i: 1, u: (a) => ({ target: "#" + r(a[1], De), text: a[1] }), l: (a, i, s) => d("a", { key: s.key, href: n(a.target, "a", "href") }, d("sup", { key: s.key }, a.text)) }, 8: { t: ["[ ]", "[x]"], o: ue(Ga), i: 1, u: (a) => ({ completed: a[1].toLowerCase() === "x" }), l: (a, i, s) => d("input", { checked: a.completed, key: s.key, readOnly: !0, type: "checkbox" }) }, 9: { t: ["#"], o: ie(t.enforceAtxHeadings ? Pr : Rr), i: 1, u: (a, i, s) => ({ children: et(i, a[2], s), id: r(a[2], De), level: a[1].length }), l: (a, i, s) => d("h" + a.level, { id: a.id, key: s.key }, i(a.children, s)) }, 10: { o: ie(Dr), i: 0, u: (a, i, s) => ({ children: et(i, a[1], s), level: a[2] === "=" ? 1 : 2, type: "9" }) }, 11: { t: ["<"], o: qe(Ct), i: 1, u(a, i, s) {
2179
+ const [, f] = a[3].match(ks), m = RegExp("^" + f, "gm"), x = a[3].replace(m, ""), y = (T = x, u.some((C) => C.test(T)) ? Ps : et);
2132
2180
  var T;
2133
- const E = a[1].toLowerCase(), z = Ia.indexOf(E) !== -1, R = (z ? E : a[1]).trim(), K = { attrs: b(R, a[2]), noInnerParse: z, tag: R };
2181
+ const E = a[1].toLowerCase(), z = Ma.indexOf(E) !== -1, R = (z ? E : a[1]).trim(), K = { attrs: b(R, a[2]), noInnerParse: z, tag: R };
2134
2182
  if (s.inAnchor = s.inAnchor || E === "a", z) K.text = a[3];
2135
2183
  else {
2136
2184
  const C = s.inHTML;
2137
2185
  s.inHTML = !0, K.children = y(i, x, s), s.inHTML = C;
2138
2186
  }
2139
2187
  return s.inAnchor = !1, K;
2140
- }, l: (a, i, s) => d(a.tag, ge({ key: s.key }, a.attrs), a.text || (a.children ? i(a.children, s) : "")) }, 13: { t: ["<"], o: He(Ct), i: 1, u(a) {
2188
+ }, l: (a, i, s) => d(a.tag, ge({ key: s.key }, a.attrs), a.text || (a.children ? i(a.children, s) : "")) }, 13: { t: ["<"], o: qe(jt), i: 1, u(a) {
2141
2189
  const i = a[1].trim();
2142
2190
  return { attrs: b(i, a[2] || ""), tag: i };
2143
- }, l: (a, i, s) => d(a.tag, ge({}, a.attrs, { key: s.key })) }, 12: { t: ["<!--"], o: He(Dr), i: 1, u: () => ({}), l: Tt }, 14: { t: ["!["], o: pe($s), i: 1, u: (a) => ({ alt: oe(a[1]), target: oe(a[2]), title: oe(a[3]) }), l: (a, i, s) => d("img", { key: s.key, alt: a.alt || void 0, title: a.title || void 0, src: n(a.target, "img", "src") }) }, 15: { t: ["["], o: ue(vs), i: 3, u: (a, i, s) => ({ children: As(i, a[1], s), target: oe(a[2]), title: oe(a[3]) }), l: (a, i, s) => d("a", { key: s.key, href: n(a.target, "a", "href"), title: a.title }, i(a.children, s)) }, 16: { t: ["<"], o: ue(Ya), i: 0, u: (a) => ({ children: [{ text: a[1], type: "27" }], target: a[1], type: "15" }) }, 17: { t: (a, i) => !i.inAnchor && !t.disableAutoLink && (Je(a, "http://") || Je(a, "https://")), o: ue(Ga), i: 0, u: (a) => ({ children: [{ text: a[1], type: "27" }], target: a[1], title: void 0, type: "15" }) }, 18: { t: ["<"], o: ue(Qa), i: 0, u(a) {
2191
+ }, l: (a, i, s) => d(a.tag, ge({}, a.attrs, { key: s.key })) }, 12: { t: ["<!--"], o: qe(zr), i: 1, u: () => ({}), l: At }, 14: { t: ["!["], o: pe(Is), i: 1, u: (a) => ({ alt: oe(a[1]), target: oe(a[2]), title: oe(a[3]) }), l: (a, i, s) => d("img", { key: s.key, alt: a.alt || void 0, title: a.title || void 0, src: n(a.target, "img", "src") }) }, 15: { t: ["["], o: ue(js), i: 3, u: (a, i, s) => ({ children: Rs(i, a[1], s), target: oe(a[2]), title: oe(a[3]) }), l: (a, i, s) => d("a", { key: s.key, href: n(a.target, "a", "href"), title: a.title }, i(a.children, s)) }, 16: { t: ["<"], o: ue(Xa), i: 0, u: (a) => ({ children: [{ text: a[1], type: "27" }], target: a[1], type: "15" }) }, 17: { t: (a, i) => !i.inAnchor && !t.disableAutoLink && (Xe(a, "http://") || Xe(a, "https://")), o: ue(Za), i: 0, u: (a) => ({ children: [{ text: a[1], type: "27" }], target: a[1], title: void 0, type: "15" }) }, 18: { t: ["<"], o: ue(Ja), i: 0, u(a) {
2144
2192
  let i = a[1], s = a[1];
2145
- return Ea.test(s) || (s = "mailto:" + s), { children: [{ text: i.replace("mailto:", ""), type: "27" }], target: s, type: "15" };
2146
- } }, 20: Or(d, 1), 33: Or(d, 2), 19: { o: ie(Oa), i: 3, u: It, l: () => `
2193
+ return Pa.test(s) || (s = "mailto:" + s), { children: [{ text: i.replace("mailto:", ""), type: "27" }], target: s, type: "15" };
2194
+ } }, 20: Nr(d, 1), 33: Nr(d, 2), 19: { o: ie(Fa), i: 3, u: Tt, l: () => `
2147
2195
  ` }, 21: { o: Ee(function(a, i) {
2148
2196
  if (i.inline || i.simple || i.inHTML && a.indexOf(`
2149
2197
 
@@ -2156,33 +2204,33 @@ function _s(e = "", t = {}) {
2156
2204
  `, !c.some((x) => x.test(m)) && (s += m, !!m.trim())));
2157
2205
  const f = Be(s);
2158
2206
  return f === "" ? null : [s, , f];
2159
- }), i: 3, u: jt, l: (a, i, s) => d("p", { key: s.key }, i(a.children, s)) }, 22: { t: ["["], o: ue(Ja), i: 0, u: (a) => (p[a[1]] = { target: a[2], title: a[4] }, {}), l: Tt }, 23: { t: ["!["], o: pe(Xa), i: 0, u: (a) => ({ alt: a[1] ? oe(a[1]) : void 0, ref: a[2] }), l: (a, i, s) => p[a.ref] ? d("img", { key: s.key, alt: a.alt, src: n(p[a.ref].target, "img", "src"), title: p[a.ref].title }) : null }, 24: { t: (a) => a[0] === "[" && a.indexOf("](") === -1, o: ue(es), i: 0, u: (a, i, s) => ({ children: i(a[1], s), fallbackChildren: a[0], ref: a[2] }), l: (a, i, s) => p[a.ref] ? d("a", { key: s.key, href: n(p[a.ref].target, "a", "href"), title: p[a.ref].title }, i(a.children, s)) : d("span", { key: s.key }, a.fallbackChildren) }, 25: { t: ["|"], o: ie(zr), i: 1, u: js, l(a, i, s) {
2207
+ }), i: 3, u: It, l: (a, i, s) => d("p", { key: s.key }, i(a.children, s)) }, 22: { t: ["["], o: ue(rs), i: 0, u: (a) => (p[a[1]] = { target: a[2], title: a[4] }, {}), l: At }, 23: { t: ["!["], o: pe(ns), i: 0, u: (a) => ({ alt: a[1] ? oe(a[1]) : void 0, ref: a[2] }), l: (a, i, s) => p[a.ref] ? d("img", { key: s.key, alt: a.alt, src: n(p[a.ref].target, "img", "src"), title: p[a.ref].title }) : null }, 24: { t: (a) => a[0] === "[" && a.indexOf("](") === -1, o: ue(os), i: 0, u: (a, i, s) => ({ children: i(a[1], s), fallbackChildren: a[0], ref: a[2] }), l: (a, i, s) => p[a.ref] ? d("a", { key: s.key, href: n(p[a.ref].target, "a", "href"), title: p[a.ref].title }, i(a.children, s)) : d("span", { key: s.key }, a.fallbackChildren) }, 25: { t: ["|"], o: ie(Or), i: 1, u: Es, l(a, i, s) {
2160
2208
  const f = a;
2161
2209
  return d("table", { key: s.key }, d("thead", null, d("tr", null, f.header.map(function(m, x) {
2162
- return d("th", { key: x, style: Br(f, x) }, i(m, s));
2210
+ return d("th", { key: x, style: Lr(f, x) }, i(m, s));
2163
2211
  }))), d("tbody", null, f.cells.map(function(m, x) {
2164
2212
  return d("tr", { key: x }, m.map(function(y, T) {
2165
- return d("td", { key: T, style: Br(f, T) }, i(y, s));
2213
+ return d("td", { key: T, style: Lr(f, T) }, i(y, s));
2166
2214
  }));
2167
2215
  })));
2168
2216
  } }, 27: { o: Ee(function(a, i) {
2169
2217
  let s;
2170
- return Je(a, ":") && (s = us.exec(a)), s || hs.exec(a);
2218
+ return Xe(a, ":") && (s = ms.exec(a)), s || ys.exec(a);
2171
2219
  }), i: 4, u(a) {
2172
2220
  const i = a[0];
2173
- return { text: i.indexOf("&") === -1 ? i : i.replace(Ua, (s, f) => t.namedCodesToUnicode[f] || s) };
2174
- }, l: (a) => a.text }, 28: { t: ["**", "__"], o: pe(is), i: 2, u: (a, i, s) => ({ children: i(a[2], s) }), l: (a, i, s) => d("strong", { key: s.key }, i(a.children, s)) }, 29: { t: (a) => {
2221
+ return { text: i.indexOf("&") === -1 ? i : i.replace(Qa, (s, f) => t.namedCodesToUnicode[f] || s) };
2222
+ }, l: (a) => a.text }, 28: { t: ["**", "__"], o: pe(us), i: 2, u: (a, i, s) => ({ children: i(a[2], s) }), l: (a, i, s) => d("strong", { key: s.key }, i(a.children, s)) }, 29: { t: (a) => {
2175
2223
  const i = a[0];
2176
2224
  return (i === "*" || i === "_") && a[1] !== i;
2177
- }, o: pe(cs), i: 3, u: (a, i, s) => ({ children: i(a[2], s) }), l: (a, i, s) => d("em", { key: s.key }, i(a.children, s)) }, 30: { t: ["\\"], o: pe(ps), i: 1, u: (a) => ({ text: a[1], type: "27" }) }, 31: { t: ["=="], o: pe(ls), i: 3, u: jt, l: (a, i, s) => d("mark", { key: s.key }, i(a.children, s)) }, 32: { t: ["~~"], o: pe(ds), i: 3, u: jt, l: (a, i, s) => d("del", { key: s.key }, i(a.children, s)) } };
2178
- t.disableParsingRawHTML === !0 && (delete k[11], delete k[13]);
2179
- const w = function(a) {
2225
+ }, o: pe(ps), i: 3, u: (a, i, s) => ({ children: i(a[2], s) }), l: (a, i, s) => d("em", { key: s.key }, i(a.children, s)) }, 30: { t: ["\\"], o: pe(gs), i: 1, u: (a) => ({ text: a[1], type: "27" }) }, 31: { t: ["=="], o: pe(fs), i: 3, u: It, l: (a, i, s) => d("mark", { key: s.key }, i(a.children, s)) }, 32: { t: ["~~"], o: pe(hs), i: 3, u: It, l: (a, i, s) => d("del", { key: s.key }, i(a.children, s)) } };
2226
+ t.disableParsingRawHTML === !0 && (delete w[11], delete w[13]);
2227
+ const k = function(a) {
2180
2228
  var i = Object.keys(a);
2181
2229
  function s(f, m) {
2182
2230
  var x = [];
2183
2231
  if (m.prevCapture = m.prevCapture || "", f.trim()) for (; f; ) for (var y = 0; y < i.length; ) {
2184
2232
  var T = i[y], E = a[T];
2185
- if (!E.t || Ss(f, m, E.t)) {
2233
+ if (!E.t || Ts(f, m, E.t)) {
2186
2234
  var z = E.o(f, m);
2187
2235
  if (z && z[0]) {
2188
2236
  f = f.substring(z[0].length);
@@ -2199,16 +2247,16 @@ function _s(e = "", t = {}) {
2199
2247
  return a[f].i - a[m].i || (f < m ? -1 : 1);
2200
2248
  }), function(f, m) {
2201
2249
  return s(function(x) {
2202
- return x.replace(Na, `
2203
- `).replace(Fa, "").replace(rs, " ");
2250
+ return x.replace(Ka, `
2251
+ `).replace(Ha, "").replace(ss, " ");
2204
2252
  }(f), m);
2205
2253
  };
2206
- }(k), S = (j = /* @__PURE__ */ function(a, i) {
2254
+ }(w), S = (j = /* @__PURE__ */ function(a, i) {
2207
2255
  return function(s, f, m) {
2208
2256
  const x = a[s.type].l;
2209
2257
  return i ? i(() => x(s, f, m), s, f, m) : x(s, f, m);
2210
2258
  };
2211
- }(k, t.renderRule), function a(i, s = {}) {
2259
+ }(w, t.renderRule), function a(i, s = {}) {
2212
2260
  if (Array.isArray(i)) {
2213
2261
  const f = s.key, m = [];
2214
2262
  let x = !1;
@@ -2224,18 +2272,18 @@ function _s(e = "", t = {}) {
2224
2272
  var j;
2225
2273
  const v = h(e);
2226
2274
  return g.length ? d("div", null, v, d("footer", { key: "footer" }, g.map(function(a) {
2227
- return d("div", { id: r(a.identifier, De), key: a.identifier }, a.identifier, S(w(a.footnote, { inline: !0 })));
2275
+ return d("div", { id: r(a.identifier, De), key: a.identifier }, a.identifier, S(k(a.footnote, { inline: !0 })));
2228
2276
  }))) : v;
2229
2277
  }
2230
- const Rs = (e) => {
2278
+ const Os = (e) => {
2231
2279
  let { children: t = "", options: r } = e, n = function(o, c) {
2232
2280
  if (o == null) return {};
2233
2281
  var u, d, h = {}, b = Object.keys(o);
2234
2282
  for (d = 0; d < b.length; d++) c.indexOf(u = b[d]) >= 0 || (h[u] = o[u]);
2235
2283
  return h;
2236
- }(e, ja);
2237
- return Lt.cloneElement(_s(t, r), n);
2238
- }, Ps = A.div`
2284
+ }(e, Ea);
2285
+ return Ft.cloneElement(zs(t, r), n);
2286
+ }, Ns = A.div`
2239
2287
  overflow-wrap: anywhere;
2240
2288
 
2241
2289
  > *:first-child {
@@ -2271,21 +2319,21 @@ const Rs = (e) => {
2271
2319
  background-color: #374151 !important;
2272
2320
  color: #f9fafb !important;
2273
2321
  }
2274
- `, Ds = {
2322
+ `, Bs = {
2275
2323
  marginTop: 0,
2276
2324
  marginBottom: "12px",
2277
2325
  paddingLeft: "20px",
2278
2326
  listStyleType: "disc",
2279
2327
  listStylePosition: "outside",
2280
2328
  lineHeight: 1.5
2281
- }, zs = {
2329
+ }, Ls = {
2282
2330
  marginTop: 0,
2283
2331
  marginBottom: "12px",
2284
2332
  paddingLeft: "20px",
2285
2333
  listStyleType: "decimal",
2286
2334
  listStylePosition: "outside",
2287
2335
  lineHeight: 1.5
2288
- }, Os = {
2336
+ }, Fs = {
2289
2337
  marginBottom: "4px",
2290
2338
  lineHeight: 1.5,
2291
2339
  color: "inherit"
@@ -2296,7 +2344,7 @@ const Rs = (e) => {
2296
2344
  marginBottom: "8px",
2297
2345
  color: "inherit"
2298
2346
  });
2299
- function Ns({
2347
+ function Ks({
2300
2348
  children: e,
2301
2349
  ...t
2302
2350
  }) {
@@ -2326,9 +2374,9 @@ function Ns({
2326
2374
  }
2327
2375
  );
2328
2376
  }
2329
- function Bs({ content: e, className: t }) {
2330
- return /* @__PURE__ */ l.jsx(Ps, { className: t, children: /* @__PURE__ */ l.jsx(
2331
- Rs,
2377
+ function Ws({ content: e, className: t }) {
2378
+ return /* @__PURE__ */ l.jsx(Ns, { className: t, children: /* @__PURE__ */ l.jsx(
2379
+ Os,
2332
2380
  {
2333
2381
  options: {
2334
2382
  overrides: {
@@ -2387,21 +2435,21 @@ function Bs({ content: e, className: t }) {
2387
2435
  },
2388
2436
  ul: {
2389
2437
  props: {
2390
- style: Ds
2438
+ style: Bs
2391
2439
  }
2392
2440
  },
2393
2441
  ol: {
2394
2442
  props: {
2395
- style: zs
2443
+ style: Ls
2396
2444
  }
2397
2445
  },
2398
2446
  li: {
2399
2447
  props: {
2400
- style: Os
2448
+ style: Fs
2401
2449
  }
2402
2450
  },
2403
2451
  table: {
2404
- component: Ns
2452
+ component: Ks
2405
2453
  },
2406
2454
  th: {
2407
2455
  props: {
@@ -2531,7 +2579,7 @@ function Bs({ content: e, className: t }) {
2531
2579
  }
2532
2580
  ) });
2533
2581
  }
2534
- function Yt({ message: e, className: t }) {
2582
+ function Vt({ message: e, className: t }) {
2535
2583
  const r = e.attachments || [], n = r.filter((c) => c.type === "image" && c.url), o = r.filter((c) => !(c.type === "image" && c.url));
2536
2584
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2537
2585
  n.map((c) => /* @__PURE__ */ l.jsx(
@@ -2551,11 +2599,11 @@ function Yt({ message: e, className: t }) {
2551
2599
  },
2552
2600
  c.id
2553
2601
  )),
2554
- o.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: o, readOnly: !0 }),
2555
- /* @__PURE__ */ l.jsx(Bs, { content: e.content, className: t })
2602
+ o.length > 0 && /* @__PURE__ */ l.jsx(ke, { attachments: o, readOnly: !0 }),
2603
+ /* @__PURE__ */ l.jsx(Ws, { content: e.content, className: t })
2556
2604
  ] });
2557
2605
  }
2558
- const En = [
2606
+ const Mn = [
2559
2607
  "application/pdf",
2560
2608
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
2561
2609
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@@ -2568,7 +2616,7 @@ const En = [
2568
2616
  "image/jpeg",
2569
2617
  "image/webp",
2570
2618
  "image/gif"
2571
- ], Ls = {
2619
+ ], Us = {
2572
2620
  ".pdf": "application/pdf",
2573
2621
  ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
2574
2622
  ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@@ -2583,12 +2631,12 @@ const En = [
2583
2631
  ".webp": "image/webp",
2584
2632
  ".gif": "image/gif"
2585
2633
  };
2586
- function Fs(e) {
2634
+ function Hs(e) {
2587
2635
  const t = e.lastIndexOf(".");
2588
2636
  if (!(t < 0))
2589
- return Ls[e.slice(t).toLowerCase()];
2637
+ return Us[e.slice(t).toLowerCase()];
2590
2638
  }
2591
- async function Vt(e) {
2639
+ async function Zt(e) {
2592
2640
  var r;
2593
2641
  if (!e) return [];
2594
2642
  const t = [];
@@ -2597,14 +2645,14 @@ async function Vt(e) {
2597
2645
  t.push(e.files[n]);
2598
2646
  return t;
2599
2647
  }
2600
- function Mn(e, t, r) {
2648
+ function _n(e, t, r) {
2601
2649
  if (e.size > t)
2602
2650
  return `File too large (max ${Math.floor(t / (1024 * 1024))}MB)`;
2603
2651
  if (r.includes(e.type)) return null;
2604
- const n = Fs(e.name);
2652
+ const n = Hs(e.name);
2605
2653
  return n && r.includes(n) ? null : "File type not allowed for attachments";
2606
2654
  }
2607
- const Ks = A.button`
2655
+ const qs = A.button`
2608
2656
  display: flex;
2609
2657
  align-items: center;
2610
2658
  justify-content: center;
@@ -2635,7 +2683,7 @@ const Ks = A.button`
2635
2683
  border-color: #4b5563;
2636
2684
  color: #e5e7eb;
2637
2685
  }
2638
- `, Ws = A.button`
2686
+ `, Gs = A.button`
2639
2687
  display: flex;
2640
2688
  align-items: center;
2641
2689
  justify-content: center;
@@ -2670,24 +2718,24 @@ const Ks = A.button`
2670
2718
  }
2671
2719
  }
2672
2720
  `;
2673
- function Zt({
2721
+ function Jt({
2674
2722
  disabled: e,
2675
2723
  integrated: t = !1,
2676
2724
  maxFileBytes: r,
2677
2725
  maxFiles: n,
2678
- allowedMime: o = En,
2726
+ allowedMime: o = Mn,
2679
2727
  currentCount: c,
2680
2728
  uploadAttachment: u,
2681
2729
  onUploaded: d,
2682
2730
  onError: h
2683
2731
  }) {
2684
- const b = F.useRef(null), [g, p] = F.useState(!1), k = F.useMemo(
2732
+ const b = F.useRef(null), [g, p] = F.useState(!1), w = F.useMemo(
2685
2733
  () => [
2686
2734
  ".pdf,.docx,.xlsx,.xls,.csv,.txt,.md,.json",
2687
2735
  "image/png,image/jpeg,image/webp,image/gif"
2688
2736
  ].join(","),
2689
2737
  []
2690
- ), w = F.useCallback(
2738
+ ), k = F.useCallback(
2691
2739
  async (i) => {
2692
2740
  const s = Array.from(i);
2693
2741
  if (!s.length) return;
@@ -2697,7 +2745,7 @@ function Zt({
2697
2745
  h == null || h(`You can attach at most ${n} files per message.`);
2698
2746
  break;
2699
2747
  }
2700
- const x = Mn(m, r, o);
2748
+ const x = _n(m, r, o);
2701
2749
  if (x) {
2702
2750
  h == null || h(`${m.name}: ${x}`);
2703
2751
  continue;
@@ -2717,8 +2765,8 @@ function Zt({
2717
2765
  [o, c, r, n, h, d, u]
2718
2766
  ), S = (i) => {
2719
2767
  const s = i.target.files;
2720
- s != null && s.length && w(s), i.target.value = "";
2721
- }, j = c >= n, v = !!(e || g || j), a = t ? Ws : Ks;
2768
+ s != null && s.length && k(s), i.target.value = "";
2769
+ }, j = c >= n, v = !!(e || g || j), a = t ? Gs : qs;
2722
2770
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2723
2771
  /* @__PURE__ */ l.jsx(
2724
2772
  "input",
@@ -2726,7 +2774,7 @@ function Zt({
2726
2774
  ref: b,
2727
2775
  type: "file",
2728
2776
  multiple: !0,
2729
- accept: k,
2777
+ accept: w,
2730
2778
  style: { display: "none" },
2731
2779
  onChange: S
2732
2780
  }
@@ -2742,12 +2790,12 @@ function Zt({
2742
2790
  var i;
2743
2791
  return (i = b.current) == null ? void 0 : i.click();
2744
2792
  },
2745
- children: /* @__PURE__ */ l.jsx(mo, { size: 16, strokeWidth: 2 })
2793
+ children: /* @__PURE__ */ l.jsx(go, { size: 16, strokeWidth: 2 })
2746
2794
  }
2747
2795
  )
2748
2796
  ] });
2749
2797
  }
2750
- const _n = A.div`
2798
+ const Rn = A.div`
2751
2799
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
2752
2800
  background-color: white;
2753
2801
  border: 1px solid #e5e7eb;
@@ -2825,7 +2873,7 @@ const _n = A.div`
2825
2873
  color: inherit;
2826
2874
  }
2827
2875
  }
2828
- `, Jt = A.div`
2876
+ `, Xt = A.div`
2829
2877
  display: flex;
2830
2878
  flex-direction: column;
2831
2879
  flex: 1;
@@ -2849,7 +2897,7 @@ const _n = A.div`
2849
2897
  border-color: rgba(255, 255, 255, 0.3);
2850
2898
  }
2851
2899
  }
2852
- `, Xt = A.div`
2900
+ `, er = A.div`
2853
2901
  display: flex;
2854
2902
  align-items: center;
2855
2903
  justify-content: space-between;
@@ -2863,7 +2911,7 @@ const _n = A.div`
2863
2911
  border-top-color: #52525b;
2864
2912
  background-color: #3f3f46;
2865
2913
  }
2866
- `, Us = A.textarea`
2914
+ `, Qs = A.textarea`
2867
2915
  display: block;
2868
2916
  width: 100%;
2869
2917
  min-width: 0;
@@ -2900,7 +2948,7 @@ const _n = A.div`
2900
2948
  color: #9ca3af;
2901
2949
  }
2902
2950
  }
2903
- `, er = A.div`
2951
+ `, tr = A.div`
2904
2952
  display: flex;
2905
2953
  align-items: center;
2906
2954
  gap: 8px;
@@ -2912,7 +2960,7 @@ const _n = A.div`
2912
2960
  background-color: #1f2937;
2913
2961
  border-top-color: #374151;
2914
2962
  }
2915
- `, Hs = A.textarea`
2963
+ `, Ys = A.textarea`
2916
2964
  flex: 1;
2917
2965
  width: 100%;
2918
2966
  margin: 0;
@@ -2957,7 +3005,7 @@ const _n = A.div`
2957
3005
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
2958
3006
  }
2959
3007
  }
2960
- `, qs = A.button`
3008
+ `, Vs = A.button`
2961
3009
  width: 32px;
2962
3010
  height: 32px;
2963
3011
  min-width: 32px;
@@ -3017,7 +3065,7 @@ const _n = A.div`
3017
3065
  color: #6b7280;
3018
3066
  }
3019
3067
  }
3020
- `, tr = A.button`
3068
+ `, rr = A.button`
3021
3069
  width: 26px;
3022
3070
  height: 26px;
3023
3071
  min-width: 26px;
@@ -3092,7 +3140,7 @@ const _n = A.div`
3092
3140
  color: #6b7280;
3093
3141
  }
3094
3142
  }
3095
- `, Et = (e, t = 0.15) => {
3143
+ `, Mt = (e, t = 0.15) => {
3096
3144
  if (e && e.startsWith("#")) {
3097
3145
  const r = e.replace("#", ""), n = parseInt(r, 16);
3098
3146
  if (isNaN(n)) return e;
@@ -3100,7 +3148,7 @@ const _n = A.div`
3100
3148
  return `#${Math.floor(o).toString(16).padStart(2, "0")}${Math.floor(c).toString(16).padStart(2, "0")}${Math.floor(u).toString(16).padStart(2, "0")}`;
3101
3149
  }
3102
3150
  return e || "#2563eb";
3103
- }, Gs = A.button`
3151
+ }, Zs = A.button`
3104
3152
  position: fixed;
3105
3153
  z-index: 50;
3106
3154
  height: 48px;
@@ -3109,7 +3157,7 @@ const _n = A.div`
3109
3157
  line-height: normal;
3110
3158
  background: ${(e) => {
3111
3159
  if (e.$primaryColor) {
3112
- const t = Et(e.$primaryColor, 0.1);
3160
+ const t = Mt(e.$primaryColor, 0.1);
3113
3161
  return `linear-gradient(135deg, ${e.$primaryColor} 0%, ${t} 100%)`;
3114
3162
  }
3115
3163
  return "linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%)";
@@ -3143,7 +3191,7 @@ const _n = A.div`
3143
3191
  &:hover {
3144
3192
  background: ${(e) => {
3145
3193
  if (e.$primaryColor) {
3146
- const t = Et(e.$primaryColor, 0.2), r = Et(e.$primaryColor, 0.3);
3194
+ const t = Mt(e.$primaryColor, 0.2), r = Mt(e.$primaryColor, 0.3);
3147
3195
  return `linear-gradient(135deg, ${t} 0%, ${r} 100%)`;
3148
3196
  }
3149
3197
  return "linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%)";
@@ -3160,7 +3208,7 @@ const _n = A.div`
3160
3208
  align-items: center;
3161
3209
  justify-content: center;
3162
3210
  }
3163
- `, Qs = A.div`
3211
+ `, Js = A.div`
3164
3212
  position: fixed;
3165
3213
  z-index: 50;
3166
3214
  width: 320px;
@@ -3287,7 +3335,7 @@ A.div`
3287
3335
  }
3288
3336
  }
3289
3337
  `;
3290
- const rr = A.div`
3338
+ const nr = A.div`
3291
3339
  display: flex;
3292
3340
  gap: 4px;
3293
3341
  align-items: center;
@@ -3328,7 +3376,7 @@ A.div`
3328
3376
  color: ${(e) => e.$isUser ? "rgba(255, 255, 255, 0.8)" : "#d1d5db"};
3329
3377
  }
3330
3378
  `;
3331
- const nr = A.div`
3379
+ const or = A.div`
3332
3380
  font-size: 14px;
3333
3381
  color: #dc2626;
3334
3382
  text-align: center;
@@ -3338,7 +3386,7 @@ const nr = A.div`
3338
3386
  [data-theme="dark"] & {
3339
3387
  color: #f87171;
3340
3388
  }
3341
- `, Ys = A.div`
3389
+ `, Xs = A.div`
3342
3390
  position: absolute;
3343
3391
  ${(e) => e.$position === "top" ? "top: 0;" : "bottom: 0;"}
3344
3392
  left: 0;
@@ -3362,7 +3410,7 @@ const nr = A.div`
3362
3410
  background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 50%, #3b82f6 100%);
3363
3411
  }
3364
3412
  }
3365
- `, ke = A.img`
3413
+ `, we = A.img`
3366
3414
  width: ${(e) => e.$size || "32px"};
3367
3415
  height: ${(e) => e.$size || "32px"};
3368
3416
  border-radius: 50%;
@@ -3370,7 +3418,7 @@ const nr = A.div`
3370
3418
  flex-shrink: 0;
3371
3419
  border: 2px solid rgba(255, 255, 255, 0.2);
3372
3420
  background-color: rgba(255, 255, 255, 0.1);
3373
- `, Vs = A.div`
3421
+ `, ei = A.div`
3374
3422
  display: flex;
3375
3423
  flex-direction: column;
3376
3424
  align-items: center;
@@ -3392,7 +3440,7 @@ const nr = A.div`
3392
3440
  [data-theme="light"] & {
3393
3441
  background: ${(e) => e.$primaryColor ? `linear-gradient(to bottom, ${e.$primaryColor} 0%, ${e.$primaryColor} 20%, rgba(255, 255, 255, 0.3) 45%, rgba(255, 255, 255, 0.7) 65%, rgba(255, 255, 255, 1) 100%)` : "#ffffff"};
3394
3442
  }
3395
- `, Zs = A.div`
3443
+ `, ti = A.div`
3396
3444
  font-size: 18px;
3397
3445
  font-weight: 600;
3398
3446
  text-align: center;
@@ -3406,7 +3454,7 @@ const nr = A.div`
3406
3454
  [data-theme="light"] & {
3407
3455
  color: #111827;
3408
3456
  }
3409
- `, Js = A.img`
3457
+ `, ri = A.img`
3410
3458
  max-width: 120px;
3411
3459
  max-height: 120px;
3412
3460
  width: auto;
@@ -3414,14 +3462,14 @@ const nr = A.div`
3414
3462
  object-fit: contain;
3415
3463
  margin-bottom: 8px;
3416
3464
  border-radius: 8px;
3417
- `, Xs = A.div`
3465
+ `, ni = A.div`
3418
3466
  display: flex;
3419
3467
  flex-direction: column;
3420
3468
  gap: 12px;
3421
3469
  width: 100%;
3422
3470
  max-width: 100%;
3423
3471
  margin-bottom: 16px;
3424
- `, ei = A.button`
3472
+ `, oi = A.button`
3425
3473
  width: 100%;
3426
3474
  padding: 12px 16px;
3427
3475
  box-sizing: border-box;
@@ -3462,7 +3510,7 @@ const nr = A.div`
3462
3510
  border-color: ${(e) => e.$primaryColor || "#6b7280"};
3463
3511
  }
3464
3512
  }
3465
- `, ti = A.div`
3513
+ `, ai = A.div`
3466
3514
  display: flex;
3467
3515
  align-items: center;
3468
3516
  gap: 8px;
@@ -3474,7 +3522,7 @@ const nr = A.div`
3474
3522
  [data-theme="dark"] & {
3475
3523
  border-top-color: #374151;
3476
3524
  }
3477
- `, mt = F.forwardRef(function({
3525
+ `, gt = F.forwardRef(function({
3478
3526
  value: t,
3479
3527
  onChange: r,
3480
3528
  onKeyDown: n,
@@ -3484,13 +3532,13 @@ const nr = A.div`
3484
3532
  maxLength: d = 2e3,
3485
3533
  variant: h = "default"
3486
3534
  }, b) {
3487
- const g = (w) => {
3488
- r(w.target.value);
3489
- }, p = (w) => {
3490
- w.key === "Enter" && !w.shiftKey && w.preventDefault(), n(w);
3491
- }, k = h === "composer" ? Us : Hs;
3535
+ const g = (k) => {
3536
+ r(k.target.value);
3537
+ }, p = (k) => {
3538
+ k.key === "Enter" && !k.shiftKey && k.preventDefault(), n(k);
3539
+ }, w = h === "composer" ? Qs : Ys;
3492
3540
  return /* @__PURE__ */ l.jsx(
3493
- k,
3541
+ w,
3494
3542
  {
3495
3543
  ref: b,
3496
3544
  value: t,
@@ -3500,8 +3548,8 @@ const nr = A.div`
3500
3548
  disabled: c,
3501
3549
  maxLength: d,
3502
3550
  className: u,
3503
- onInput: (w) => {
3504
- const S = w.target;
3551
+ onInput: (k) => {
3552
+ const S = k.target;
3505
3553
  S.style.height = "auto";
3506
3554
  const j = h === "composer" ? 96 : 120;
3507
3555
  S.style.height = `${Math.min(S.scrollHeight, j)}px`;
@@ -3509,7 +3557,7 @@ const nr = A.div`
3509
3557
  }
3510
3558
  );
3511
3559
  });
3512
- function gt({ size: e = 16 }) {
3560
+ function bt({ size: e = 16 }) {
3513
3561
  return /* @__PURE__ */ l.jsxs(
3514
3562
  "svg",
3515
3563
  {
@@ -3529,23 +3577,23 @@ function gt({ size: e = 16 }) {
3529
3577
  }
3530
3578
  );
3531
3579
  }
3532
- function or({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
3580
+ function ar({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
3533
3581
  const [o, c] = F.useState(""), u = F.useRef(null), d = async () => {
3534
3582
  !o.trim() || n || (await r(o.trim()), c(""));
3535
3583
  }, h = (g) => {
3536
3584
  g.key === "Enter" && !g.shiftKey && (g.preventDefault(), d());
3537
3585
  }, b = e.welcomeMessage || "Hi there 👋 How can we help?";
3538
- return /* @__PURE__ */ l.jsxs(Vs, { $primaryColor: e.primaryColor, children: [
3586
+ return /* @__PURE__ */ l.jsxs(ei, { $primaryColor: e.primaryColor, children: [
3539
3587
  e.welcomeImage && /* @__PURE__ */ l.jsx(
3540
- Js,
3588
+ ri,
3541
3589
  {
3542
3590
  src: e.welcomeImage,
3543
3591
  alt: "Welcome"
3544
3592
  }
3545
3593
  ),
3546
- /* @__PURE__ */ l.jsx(Zs, { children: b }),
3547
- e.quickQuestions && e.quickQuestions.length > 0 && /* @__PURE__ */ l.jsx(Xs, { children: e.quickQuestions.map((g, p) => /* @__PURE__ */ l.jsx(
3548
- ei,
3594
+ /* @__PURE__ */ l.jsx(ti, { children: b }),
3595
+ e.quickQuestions && e.quickQuestions.length > 0 && /* @__PURE__ */ l.jsx(ni, { children: e.quickQuestions.map((g, p) => /* @__PURE__ */ l.jsx(
3596
+ oi,
3549
3597
  {
3550
3598
  onClick: () => t(g),
3551
3599
  disabled: n,
@@ -3554,9 +3602,9 @@ function or({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
3554
3602
  },
3555
3603
  p
3556
3604
  )) }),
3557
- /* @__PURE__ */ l.jsxs(ti, { children: [
3605
+ /* @__PURE__ */ l.jsxs(ai, { children: [
3558
3606
  /* @__PURE__ */ l.jsx(
3559
- mt,
3607
+ gt,
3560
3608
  {
3561
3609
  ref: u,
3562
3610
  value: o,
@@ -3567,19 +3615,19 @@ function or({ config: e, onQuestionClick: t, onSendMessage: r, isLoading: n }) {
3567
3615
  }
3568
3616
  ),
3569
3617
  /* @__PURE__ */ l.jsx(
3570
- qs,
3618
+ Vs,
3571
3619
  {
3572
3620
  onClick: d,
3573
3621
  disabled: n || !o.trim(),
3574
- children: /* @__PURE__ */ l.jsx(gt, { size: 16 })
3622
+ children: /* @__PURE__ */ l.jsx(bt, { size: 16 })
3575
3623
  }
3576
3624
  )
3577
3625
  ] })
3578
3626
  ] });
3579
3627
  }
3580
- function ar(e, t) {
3628
+ function sr(e, t) {
3581
3629
  var j;
3582
- const r = (e.maxAttachmentSizeMB ?? 10) * 1024 * 1024, n = e.maxAttachments ?? 3, o = (j = e.allowedAttachmentTypes) != null && j.length ? e.allowedAttachmentTypes : En, c = !!(e.enableAttachments && e.publishableKey), [u, d] = ee([]), [h, b] = ee(null), g = ae([]);
3630
+ const r = (e.maxAttachmentSizeMB ?? 10) * 1024 * 1024, n = e.maxAttachments ?? 3, o = (j = e.allowedAttachmentTypes) != null && j.length ? e.allowedAttachmentTypes : Mn, c = !!(e.enableAttachments && e.publishableKey), [u, d] = ee([]), [h, b] = ee(null), g = ae([]);
3583
3631
  Oe(() => {
3584
3632
  g.current = u;
3585
3633
  }, [u]);
@@ -3592,7 +3640,7 @@ function ar(e, t) {
3592
3640
  b(`At most ${n} attachments per message.`);
3593
3641
  break;
3594
3642
  }
3595
- const i = Mn(a, r, o);
3643
+ const i = _n(a, r, o);
3596
3644
  if (i) {
3597
3645
  b(`${a.name}: ${i}`);
3598
3646
  continue;
@@ -3611,12 +3659,12 @@ function ar(e, t) {
3611
3659
  }
3612
3660
  },
3613
3661
  [o, c, r, n, t]
3614
- ), k = Z((v) => {
3662
+ ), w = Z((v) => {
3615
3663
  d((a) => {
3616
3664
  const i = a.filter((s) => s.id !== v);
3617
3665
  return g.current = i, i;
3618
3666
  });
3619
- }, []), w = Z(() => {
3667
+ }, []), k = Z(() => {
3620
3668
  d([]), g.current = [], b(null);
3621
3669
  }, []), S = Z(
3622
3670
  (v) => {
@@ -3635,19 +3683,19 @@ function ar(e, t) {
3635
3683
  setAttachmentError: b,
3636
3684
  addFiles: p,
3637
3685
  appendStaged: S,
3638
- removeStaged: k,
3639
- clearStaged: w,
3686
+ removeStaged: w,
3687
+ clearStaged: k,
3640
3688
  maxFiles: n,
3641
3689
  maxBytes: r,
3642
3690
  allowed: o
3643
3691
  };
3644
3692
  }
3645
- function Rn(e, t, r) {
3693
+ function Pn(e, t, r) {
3646
3694
  if (e.role !== "assistant" || !e.content.trim()) return !1;
3647
3695
  const n = t[t.length - 1];
3648
3696
  return n ? !(r && n.role === "assistant" && n.id === e.id) : !0;
3649
3697
  }
3650
- function ri({ size: e = 16 }) {
3698
+ function si({ size: e = 16 }) {
3651
3699
  return /* @__PURE__ */ l.jsx(
3652
3700
  "svg",
3653
3701
  {
@@ -3664,7 +3712,7 @@ function ri({ size: e = 16 }) {
3664
3712
  }
3665
3713
  );
3666
3714
  }
3667
- function ni({ size: e = 16 }) {
3715
+ function ii({ size: e = 16 }) {
3668
3716
  return /* @__PURE__ */ l.jsxs(
3669
3717
  "svg",
3670
3718
  {
@@ -3688,7 +3736,7 @@ function ni({ size: e = 16 }) {
3688
3736
  * Copyright (c) StackBlitz. All rights reserved.
3689
3737
  * Licensed under the MIT License. See License.txt in the project root for license information.
3690
3738
  *--------------------------------------------------------------------------------------------*/
3691
- const oi = {
3739
+ const ci = {
3692
3740
  /**
3693
3741
  * A value from 0 to 1, on how much to damp the animation.
3694
3742
  * 0 means no damping, 1 means full damping.
@@ -3709,26 +3757,26 @@ const oi = {
3709
3757
  * @default 1.25
3710
3758
  */
3711
3759
  mass: 1.25
3712
- }, ai = 70, si = 1e3 / 60, ii = 350;
3713
- let bt = !1;
3714
- var Kr;
3715
- (Kr = globalThis.document) == null || Kr.addEventListener("mousedown", () => {
3716
- bt = !0;
3717
- });
3760
+ }, li = 70, di = 1e3 / 60, ui = 350;
3761
+ let yt = !1;
3718
3762
  var Wr;
3719
- (Wr = globalThis.document) == null || Wr.addEventListener("mouseup", () => {
3720
- bt = !1;
3763
+ (Wr = globalThis.document) == null || Wr.addEventListener("mousedown", () => {
3764
+ yt = !0;
3721
3765
  });
3722
3766
  var Ur;
3723
- (Ur = globalThis.document) == null || Ur.addEventListener("click", () => {
3724
- bt = !1;
3767
+ (Ur = globalThis.document) == null || Ur.addEventListener("mouseup", () => {
3768
+ yt = !1;
3725
3769
  });
3726
- const ci = (e = {}) => {
3770
+ var Hr;
3771
+ (Hr = globalThis.document) == null || Hr.addEventListener("click", () => {
3772
+ yt = !1;
3773
+ });
3774
+ const pi = (e = {}) => {
3727
3775
  const [t, r] = ee(!1), [n, o] = ee(e.initial !== !1), [c, u] = ee(!1), d = ae(null);
3728
3776
  d.current = e;
3729
3777
  const h = Z(() => {
3730
3778
  var f;
3731
- if (!bt)
3779
+ if (!yt)
3732
3780
  return !1;
3733
3781
  const i = window.getSelection();
3734
3782
  if (!i || !i.rangeCount)
@@ -3739,7 +3787,7 @@ const ci = (e = {}) => {
3739
3787
  p.isAtBottom = i, o(i);
3740
3788
  }, []), g = Z((i) => {
3741
3789
  p.escapedFromLock = i, r(i);
3742
- }, []), p = Ft(() => {
3790
+ }, []), p = Kt(() => {
3743
3791
  let i;
3744
3792
  return {
3745
3793
  escapedFromLock: t,
@@ -3778,13 +3826,13 @@ const ci = (e = {}) => {
3778
3826
  return this.calculatedTargetScrollTop - this.scrollTop;
3779
3827
  },
3780
3828
  get isNearBottom() {
3781
- return this.scrollDifference <= ai;
3829
+ return this.scrollDifference <= li;
3782
3830
  }
3783
3831
  };
3784
- }, []), k = Z((i = {}) => {
3832
+ }, []), w = Z((i = {}) => {
3785
3833
  var E;
3786
3834
  typeof i == "string" && (i = { animation: i }), i.preserveScrollPosition || b(!0);
3787
- const s = Date.now() + (Number(i.wait) || 0), f = _t(d.current, i.animation), { ignoreEscapes: m = !1 } = i;
3835
+ const s = Date.now() + (Number(i.wait) || 0), f = Rt(d.current, i.animation), { ignoreEscapes: m = !1 } = i;
3788
3836
  let x, y = p.calculatedTargetScrollTop;
3789
3837
  i.duration instanceof Promise ? i.duration.finally(() => {
3790
3838
  x = Date.now();
@@ -3794,7 +3842,7 @@ const ci = (e = {}) => {
3794
3842
  var W;
3795
3843
  if (!p.isAtBottom)
3796
3844
  return p.animation = void 0, !1;
3797
- const { scrollTop: R } = p, K = performance.now(), C = (K - (p.lastTick ?? K)) / si;
3845
+ const { scrollTop: R } = p, K = performance.now(), C = (K - (p.lastTick ?? K)) / di;
3798
3846
  if (p.animation || (p.animation = { behavior: f, promise: z, ignoreEscapes: m }), p.animation.behavior === f && (p.lastTick = K), h() || s > Date.now())
3799
3847
  return T();
3800
3848
  if (R < Math.min(y, p.calculatedTargetScrollTop)) {
@@ -3805,8 +3853,8 @@ const ci = (e = {}) => {
3805
3853
  }
3806
3854
  return T();
3807
3855
  }
3808
- return x > Date.now() ? (y = p.calculatedTargetScrollTop, T()) : (p.animation = void 0, p.scrollTop < p.calculatedTargetScrollTop ? k({
3809
- animation: _t(d.current, d.current.resize),
3856
+ return x > Date.now() ? (y = p.calculatedTargetScrollTop, T()) : (p.animation = void 0, p.scrollTop < p.calculatedTargetScrollTop ? w({
3857
+ animation: Rt(d.current, d.current.resize),
3810
3858
  ignoreEscapes: m,
3811
3859
  duration: Math.max(0, x - Date.now()) || void 0
3812
3860
  }) : p.isAtBottom);
@@ -3816,7 +3864,7 @@ const ci = (e = {}) => {
3816
3864
  }), R));
3817
3865
  };
3818
3866
  return i.wait !== !0 && (p.animation = void 0), ((E = p.animation) == null ? void 0 : E.behavior) === f ? p.animation.promise : T();
3819
- }, [b, h, p]), w = Z(() => {
3867
+ }, [b, h, p]), k = Z(() => {
3820
3868
  g(!0), b(!1);
3821
3869
  }, [g, b]), S = Z(({ target: i }) => {
3822
3870
  if (i !== v.current)
@@ -3847,10 +3895,10 @@ const ci = (e = {}) => {
3847
3895
  f = f.parentElement;
3848
3896
  }
3849
3897
  f === v.current && s < 0 && v.current.scrollHeight > v.current.clientHeight && !((m = p.animation) != null && m.ignoreEscapes) && (g(!0), b(!1));
3850
- }, [g, b, p]), v = Lr((i) => {
3898
+ }, [g, b, p]), v = Fr((i) => {
3851
3899
  var s, f;
3852
3900
  (s = v.current) == null || s.removeEventListener("scroll", S), (f = v.current) == null || f.removeEventListener("wheel", j), i == null || i.addEventListener("scroll", S, { passive: !0 }), i == null || i.addEventListener("wheel", j, { passive: !0 });
3853
- }, []), a = Lr((i) => {
3901
+ }, []), a = Fr((i) => {
3854
3902
  var f, m;
3855
3903
  if ((f = p.resizeObserver) == null || f.disconnect(), !i)
3856
3904
  return;
@@ -3858,12 +3906,12 @@ const ci = (e = {}) => {
3858
3906
  p.resizeObserver = new ResizeObserver(([x]) => {
3859
3907
  const { height: y } = x.contentRect, T = y - (s ?? y);
3860
3908
  if (p.resizeDifference = T, p.scrollTop > p.targetScrollTop && (p.scrollTop = p.targetScrollTop), u(p.isNearBottom), T >= 0) {
3861
- const E = _t(d.current, s ? d.current.resize : d.current.initial);
3862
- k({
3909
+ const E = Rt(d.current, s ? d.current.resize : d.current.initial);
3910
+ w({
3863
3911
  animation: E,
3864
3912
  wait: !0,
3865
3913
  preserveScrollPosition: !0,
3866
- duration: E === "instant" ? void 0 : ii
3914
+ duration: E === "instant" ? void 0 : ui
3867
3915
  });
3868
3916
  } else
3869
3917
  p.isNearBottom && (g(!1), b(!0));
@@ -3877,21 +3925,21 @@ const ci = (e = {}) => {
3877
3925
  return {
3878
3926
  contentRef: a,
3879
3927
  scrollRef: v,
3880
- scrollToBottom: k,
3881
- stopScroll: w,
3928
+ scrollToBottom: w,
3929
+ stopScroll: k,
3882
3930
  isAtBottom: n || c,
3883
3931
  isNearBottom: c,
3884
3932
  escapedFromLock: t,
3885
3933
  state: p
3886
3934
  };
3887
3935
  };
3888
- function Lr(e, t) {
3936
+ function Fr(e, t) {
3889
3937
  const r = Z((n) => (r.current = n, e(n)), t);
3890
3938
  return r;
3891
3939
  }
3892
- const Mt = /* @__PURE__ */ new Map();
3893
- function _t(...e) {
3894
- const t = { ...oi };
3940
+ const _t = /* @__PURE__ */ new Map();
3941
+ function Rt(...e) {
3942
+ const t = { ...ci };
3895
3943
  let r = !1;
3896
3944
  for (const o of e) {
3897
3945
  if (o === "instant") {
@@ -3901,24 +3949,24 @@ function _t(...e) {
3901
3949
  typeof o == "object" && (r = !1, t.damping = o.damping ?? t.damping, t.stiffness = o.stiffness ?? t.stiffness, t.mass = o.mass ?? t.mass);
3902
3950
  }
3903
3951
  const n = JSON.stringify(t);
3904
- return Mt.has(n) || Mt.set(n, Object.freeze(t)), r ? "instant" : Mt.get(n);
3952
+ return _t.has(n) || _t.set(n, Object.freeze(t)), r ? "instant" : _t.get(n);
3905
3953
  }
3906
- const Pn = Bn(null), li = typeof window < "u" ? Nn : Oe;
3907
- function at({ instance: e, children: t, resize: r, initial: n, mass: o, damping: c, stiffness: u, targetScrollTop: d, contextRef: h, ...b }) {
3908
- const g = ae(null), p = Lt.useCallback((m, x) => {
3954
+ const Dn = Ln(null), fi = typeof window < "u" ? Bn : Oe;
3955
+ function st({ instance: e, children: t, resize: r, initial: n, mass: o, damping: c, stiffness: u, targetScrollTop: d, contextRef: h, ...b }) {
3956
+ const g = ae(null), p = Ft.useCallback((m, x) => {
3909
3957
  const y = (f == null ? void 0 : f.targetScrollTop) ?? d;
3910
3958
  return (y == null ? void 0 : y(m, x)) ?? m;
3911
- }, [d]), k = ci({
3959
+ }, [d]), w = pi({
3912
3960
  mass: o,
3913
3961
  damping: c,
3914
3962
  stiffness: u,
3915
3963
  resize: r,
3916
3964
  initial: n,
3917
3965
  targetScrollTop: p
3918
- }), { scrollRef: w, contentRef: S, scrollToBottom: j, stopScroll: v, isAtBottom: a, escapedFromLock: i, state: s } = e ?? k, f = Ft(() => ({
3966
+ }), { scrollRef: k, contentRef: S, scrollToBottom: j, stopScroll: v, isAtBottom: a, escapedFromLock: i, state: s } = e ?? w, f = Kt(() => ({
3919
3967
  scrollToBottom: j,
3920
3968
  stopScroll: v,
3921
- scrollRef: w,
3969
+ scrollRef: k,
3922
3970
  isAtBottom: a,
3923
3971
  escapedFromLock: i,
3924
3972
  contentRef: S,
@@ -3933,32 +3981,32 @@ function at({ instance: e, children: t, resize: r, initial: n, mass: o, damping:
3933
3981
  j,
3934
3982
  a,
3935
3983
  S,
3936
- w,
3984
+ k,
3937
3985
  v,
3938
3986
  i,
3939
3987
  s
3940
3988
  ]);
3941
- return On(h, () => f, [f]), li(() => {
3942
- w.current && getComputedStyle(w.current).overflow === "visible" && (w.current.style.overflow = "auto");
3943
- }, []), l.jsx(Pn.Provider, { value: f, children: l.jsx("div", { ...b, children: typeof t == "function" ? t(f) : t }) });
3989
+ return Nn(h, () => f, [f]), fi(() => {
3990
+ k.current && getComputedStyle(k.current).overflow === "visible" && (k.current.style.overflow = "auto");
3991
+ }, []), l.jsx(Dn.Provider, { value: f, children: l.jsx("div", { ...b, children: typeof t == "function" ? t(f) : t }) });
3944
3992
  }
3945
3993
  (function(e) {
3946
3994
  function t({ children: r, ...n }) {
3947
- const o = di();
3995
+ const o = hi();
3948
3996
  return l.jsx("div", { ref: o.scrollRef, style: {
3949
3997
  height: "100%",
3950
3998
  width: "100%"
3951
3999
  }, children: l.jsx("div", { ...n, ref: o.contentRef, children: typeof r == "function" ? r(o) : r }) });
3952
4000
  }
3953
4001
  e.Content = t;
3954
- })(at || (at = {}));
3955
- function di() {
3956
- const e = qr(Pn);
4002
+ })(st || (st = {}));
4003
+ function hi() {
4004
+ const e = Gr(Dn);
3957
4005
  if (!e)
3958
4006
  throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");
3959
4007
  return e;
3960
4008
  }
3961
- const ui = A(at)`
4009
+ const mi = A(st)`
3962
4010
  position: relative;
3963
4011
  flex: 1;
3964
4012
  overflow-y: auto;
@@ -3997,7 +4045,7 @@ const ui = A(at)`
3997
4045
  background-color: rgba(100, 116, 139, 0.75);
3998
4046
  }
3999
4047
  }
4000
- `, pi = A(at.Content)`
4048
+ `, gi = A(st.Content)`
4001
4049
  padding: 16px;
4002
4050
  `;
4003
4051
  A.button`
@@ -4041,7 +4089,7 @@ A.button`
4041
4089
  }
4042
4090
  }
4043
4091
  `;
4044
- function sr({
4092
+ function ir({
4045
4093
  className: e,
4046
4094
  children: t,
4047
4095
  style: r,
@@ -4052,7 +4100,7 @@ function sr({
4052
4100
  }) {
4053
4101
  const d = n === "dark" ? "dark" : "light";
4054
4102
  return /* @__PURE__ */ l.jsx(
4055
- ui,
4103
+ mi,
4056
4104
  {
4057
4105
  className: e,
4058
4106
  style: r,
@@ -4067,10 +4115,10 @@ function sr({
4067
4115
  }
4068
4116
  );
4069
4117
  }
4070
- function ir({ className: e, children: t }) {
4071
- return /* @__PURE__ */ l.jsx(pi, { className: e, children: t });
4118
+ function cr({ className: e, children: t }) {
4119
+ return /* @__PURE__ */ l.jsx(gi, { className: e, children: t });
4072
4120
  }
4073
- function fi({ config: e, chat: t }) {
4121
+ function bi({ config: e, chat: t }) {
4074
4122
  const {
4075
4123
  messages: r,
4076
4124
  sendMessage: n,
@@ -4079,7 +4127,7 @@ function fi({ config: e, chat: t }) {
4079
4127
  isLoading: u,
4080
4128
  error: d,
4081
4129
  hasSessionStarted: h
4082
- } = t, [b, g] = F.useState(""), [p, k] = F.useState(!1), w = F.useRef(null), {
4130
+ } = t, [b, g] = F.useState(""), [p, w] = F.useState(!1), k = F.useRef(null), {
4083
4131
  enabled: S,
4084
4132
  staged: j,
4085
4133
  attachmentError: v,
@@ -4091,23 +4139,27 @@ function fi({ config: e, chat: t }) {
4091
4139
  maxFiles: x,
4092
4140
  maxBytes: y,
4093
4141
  allowed: T
4094
- } = ar(e, o), E = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : p ? "dark" : "light";
4142
+ } = sr(e, o), E = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : p ? "dark" : "light";
4095
4143
  F.useEffect(() => {
4096
4144
  if (e.theme === "auto" || !e.theme) {
4097
4145
  const I = () => {
4098
- k(window.matchMedia("(prefers-color-scheme: dark)").matches);
4146
+ w(window.matchMedia("(prefers-color-scheme: dark)").matches);
4099
4147
  };
4100
4148
  I();
4101
4149
  const D = window.matchMedia("(prefers-color-scheme: dark)");
4102
4150
  return D.addEventListener("change", I), () => D.removeEventListener("change", I);
4103
4151
  } else
4104
- k(e.theme === "dark");
4152
+ w(e.theme === "dark");
4105
4153
  }, [e.theme]);
4106
4154
  const z = async () => {
4107
4155
  const I = b.trim();
4108
- !I && j.length === 0 || u || (await n(I, void 0, j.length ? j : void 0), g(""), m(), setTimeout(() => {
4156
+ !I && j.length === 0 || u || (await n(
4157
+ I,
4158
+ void 0,
4159
+ j.length ? j : void 0
4160
+ ), g(""), m(), setTimeout(() => {
4109
4161
  var D;
4110
- (D = w.current) == null || D.focus();
4162
+ (D = k.current) == null || D.focus();
4111
4163
  }, 100));
4112
4164
  }, R = (I) => {
4113
4165
  I.key === "Enter" && !I.shiftKey && (I.preventDefault(), z());
@@ -4127,11 +4179,11 @@ function fi({ config: e, chat: t }) {
4127
4179
  }, W = async (I) => {
4128
4180
  if (!S) return;
4129
4181
  I.preventDefault();
4130
- const D = await Vt(I.dataTransfer);
4182
+ const D = await Zt(I.dataTransfer);
4131
4183
  D.length && await i(D);
4132
4184
  };
4133
4185
  return /* @__PURE__ */ l.jsx(
4134
- _n,
4186
+ Rn,
4135
4187
  {
4136
4188
  "data-theme": E(),
4137
4189
  style: {
@@ -4141,7 +4193,7 @@ function fi({ config: e, chat: t }) {
4141
4193
  ...e.borderRadius != null && e.borderRadius !== "" ? { borderRadius: e.borderRadius } : {}
4142
4194
  },
4143
4195
  children: e.quickQuestions && e.quickQuestions.length > 0 && !h ? /* @__PURE__ */ l.jsx(
4144
- or,
4196
+ ar,
4145
4197
  {
4146
4198
  config: e,
4147
4199
  onQuestionClick: async (I) => {
@@ -4152,13 +4204,13 @@ function fi({ config: e, chat: t }) {
4152
4204
  }
4153
4205
  ) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4154
4206
  /* @__PURE__ */ l.jsx(
4155
- sr,
4207
+ ir,
4156
4208
  {
4157
4209
  style: { flex: 1 },
4158
4210
  surfaceTheme: E(),
4159
4211
  onDragOver: C,
4160
4212
  onDrop: W,
4161
- children: /* @__PURE__ */ l.jsxs(ir, { children: [
4213
+ children: /* @__PURE__ */ l.jsxs(cr, { children: [
4162
4214
  r.map((I) => /* @__PURE__ */ l.jsxs(
4163
4215
  "div",
4164
4216
  {
@@ -4171,7 +4223,7 @@ function fi({ config: e, chat: t }) {
4171
4223
  },
4172
4224
  children: [
4173
4225
  I.role === "assistant" && e.agentImage && /* @__PURE__ */ l.jsx(
4174
- ke,
4226
+ we,
4175
4227
  {
4176
4228
  src: e.agentImage,
4177
4229
  alt: e.chatName || "Agent",
@@ -4188,9 +4240,13 @@ function fi({ config: e, chat: t }) {
4188
4240
  maxWidth: "80%"
4189
4241
  },
4190
4242
  children: [
4191
- /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsx(Yt, { message: I }) }),
4192
- Rn(I, r, u) && /* @__PURE__ */ l.jsx(
4193
- kn,
4243
+ /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsx(Vt, { message: I }) }),
4244
+ Pn(
4245
+ I,
4246
+ r,
4247
+ u
4248
+ ) && /* @__PURE__ */ l.jsx(
4249
+ vn,
4194
4250
  {
4195
4251
  content: I.content,
4196
4252
  disabled: u,
@@ -4200,83 +4256,132 @@ function fi({ config: e, chat: t }) {
4200
4256
  ]
4201
4257
  }
4202
4258
  ) : /* @__PURE__ */ l.jsx(he, { $isUser: !0, children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4203
- I.attachments && I.attachments.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: I.attachments, readOnly: !0 }),
4259
+ I.attachments && I.attachments.length > 0 && /* @__PURE__ */ l.jsx(
4260
+ ke,
4261
+ {
4262
+ attachments: I.attachments,
4263
+ readOnly: !0,
4264
+ tone: "onPrimary"
4265
+ }
4266
+ ),
4204
4267
  I.content ? I.content : null
4205
4268
  ] }) })
4206
4269
  ]
4207
4270
  },
4208
4271
  I.id
4209
4272
  )),
4210
- u && /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", justifyContent: "flex-start", alignItems: "flex-start", gap: "8px", marginBottom: "16px" }, children: [
4211
- e.agentImage && /* @__PURE__ */ l.jsx(
4212
- ke,
4273
+ u && /* @__PURE__ */ l.jsxs(
4274
+ "div",
4275
+ {
4276
+ style: {
4277
+ display: "flex",
4278
+ justifyContent: "flex-start",
4279
+ alignItems: "flex-start",
4280
+ gap: "8px",
4281
+ marginBottom: "16px"
4282
+ },
4283
+ children: [
4284
+ e.agentImage && /* @__PURE__ */ l.jsx(
4285
+ we,
4286
+ {
4287
+ src: e.agentImage,
4288
+ alt: e.chatName || "Agent",
4289
+ $size: "28px"
4290
+ }
4291
+ ),
4292
+ /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(nr, { children: [
4293
+ /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4294
+ /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4295
+ /* @__PURE__ */ l.jsx("div", { className: "dot" })
4296
+ ] }) })
4297
+ ]
4298
+ }
4299
+ ),
4300
+ d && /* @__PURE__ */ l.jsx(or, { children: d })
4301
+ ] })
4302
+ }
4303
+ ),
4304
+ /* @__PURE__ */ l.jsxs(
4305
+ tr,
4306
+ {
4307
+ style: { flexDirection: "column", alignItems: "stretch", gap: 0 },
4308
+ children: [
4309
+ (v || S && j.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
4310
+ v && /* @__PURE__ */ l.jsx(
4311
+ "div",
4213
4312
  {
4214
- src: e.agentImage,
4215
- alt: e.chatName || "Agent",
4216
- $size: "28px"
4313
+ style: { fontSize: 12, color: "#dc2626", marginBottom: 4 },
4314
+ children: v
4217
4315
  }
4218
4316
  ),
4219
- /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(rr, { children: [
4220
- /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4221
- /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4222
- /* @__PURE__ */ l.jsx("div", { className: "dot" })
4223
- ] }) })
4317
+ S && j.length > 0 && /* @__PURE__ */ l.jsx(
4318
+ ke,
4319
+ {
4320
+ attachments: j,
4321
+ onRemove: f
4322
+ }
4323
+ )
4224
4324
  ] }),
4225
- d && /* @__PURE__ */ l.jsx(nr, { children: d })
4226
- ] })
4325
+ /* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(Xt, { children: [
4326
+ /* @__PURE__ */ l.jsx(
4327
+ gt,
4328
+ {
4329
+ ref: k,
4330
+ variant: "composer",
4331
+ value: b,
4332
+ onChange: g,
4333
+ onKeyDown: R,
4334
+ placeholder: e.placeholder,
4335
+ disabled: u
4336
+ }
4337
+ ),
4338
+ /* @__PURE__ */ l.jsxs(er, { children: [
4339
+ /* @__PURE__ */ l.jsx(
4340
+ "div",
4341
+ {
4342
+ style: {
4343
+ display: "flex",
4344
+ alignItems: "center",
4345
+ gap: 8,
4346
+ flex: 1,
4347
+ minWidth: 0
4348
+ },
4349
+ children: S && /* @__PURE__ */ l.jsx(
4350
+ Jt,
4351
+ {
4352
+ integrated: !0,
4353
+ disabled: u,
4354
+ maxFileBytes: y,
4355
+ maxFiles: x,
4356
+ allowedMime: T,
4357
+ currentCount: j.length,
4358
+ uploadAttachment: o,
4359
+ onUploaded: s,
4360
+ onError: a
4361
+ }
4362
+ )
4363
+ }
4364
+ ),
4365
+ /* @__PURE__ */ l.jsx(
4366
+ rr,
4367
+ {
4368
+ type: "button",
4369
+ onClick: z,
4370
+ disabled: u || !b.trim() && j.length === 0,
4371
+ "aria-label": "Send message",
4372
+ children: /* @__PURE__ */ l.jsx(bt, { size: 13 })
4373
+ }
4374
+ )
4375
+ ] })
4376
+ ] }) })
4377
+ ]
4227
4378
  }
4228
- ),
4229
- /* @__PURE__ */ l.jsxs(er, { style: { flexDirection: "column", alignItems: "stretch", gap: 0 }, children: [
4230
- (v || S && j.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
4231
- v && /* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: "#dc2626", marginBottom: 4 }, children: v }),
4232
- S && j.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: j, onRemove: f })
4233
- ] }),
4234
- /* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(Jt, { children: [
4235
- /* @__PURE__ */ l.jsx(
4236
- mt,
4237
- {
4238
- ref: w,
4239
- variant: "composer",
4240
- value: b,
4241
- onChange: g,
4242
- onKeyDown: R,
4243
- placeholder: e.placeholder,
4244
- disabled: u
4245
- }
4246
- ),
4247
- /* @__PURE__ */ l.jsxs(Xt, { children: [
4248
- /* @__PURE__ */ l.jsx("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: S && /* @__PURE__ */ l.jsx(
4249
- Zt,
4250
- {
4251
- integrated: !0,
4252
- disabled: u,
4253
- maxFileBytes: y,
4254
- maxFiles: x,
4255
- allowedMime: T,
4256
- currentCount: j.length,
4257
- uploadAttachment: o,
4258
- onUploaded: s,
4259
- onError: a
4260
- }
4261
- ) }),
4262
- /* @__PURE__ */ l.jsx(
4263
- tr,
4264
- {
4265
- type: "button",
4266
- onClick: z,
4267
- disabled: u || !b.trim() && j.length === 0,
4268
- "aria-label": "Send message",
4269
- children: /* @__PURE__ */ l.jsx(gt, { size: 13 })
4270
- }
4271
- )
4272
- ] })
4273
- ] }) })
4274
- ] })
4379
+ )
4275
4380
  ] })
4276
4381
  }
4277
4382
  );
4278
4383
  }
4279
- const hi = A.div`
4384
+ const yi = A.div`
4280
4385
  display: flex;
4281
4386
  align-items: center;
4282
4387
  justify-content: space-between;
@@ -4296,15 +4401,15 @@ const hi = A.div`
4296
4401
  background: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? e.$primaryColor : "#ffffff"};
4297
4402
  color: ${(e) => e.$showWelcomeScreen && e.$primaryColor ? "white" : "#111827"};
4298
4403
  }
4299
- `, mi = A.div`
4404
+ `, xi = A.div`
4300
4405
  display: flex;
4301
4406
  align-items: center;
4302
4407
  gap: 12px;
4303
- `, gi = A.div`
4408
+ `, ki = A.div`
4304
4409
  display: flex;
4305
4410
  align-items: center;
4306
4411
  gap: 8px;
4307
- `, bi = A.div`
4412
+ `, wi = A.div`
4308
4413
  width: 8px;
4309
4414
  height: 8px;
4310
4415
  background: #10b981;
@@ -4319,14 +4424,14 @@ const hi = A.div`
4319
4424
  opacity: 0.5;
4320
4425
  }
4321
4426
  }
4322
- `, yi = A.span`
4427
+ `, vi = A.span`
4323
4428
  font-weight: 500;
4324
4429
  font-size: 14px;
4325
- `, xi = A.div`
4430
+ `, $i = A.div`
4326
4431
  display: flex;
4327
4432
  align-items: center;
4328
4433
  gap: 4px;
4329
- `, wi = A.button`
4434
+ `, Si = A.button`
4330
4435
  padding: 4px;
4331
4436
  background: transparent;
4332
4437
  border: none;
@@ -4347,7 +4452,7 @@ const hi = A.div`
4347
4452
  height: 16px;
4348
4453
  }
4349
4454
  `;
4350
- function ki({
4455
+ function Ci({
4351
4456
  chatName: e = "Chat Assistant",
4352
4457
  showCloseButton: t = !0,
4353
4458
  onClose: r,
@@ -4357,39 +4462,39 @@ function ki({
4357
4462
  showWelcomeScreen: u = !1
4358
4463
  }) {
4359
4464
  return /* @__PURE__ */ l.jsxs(
4360
- hi,
4465
+ yi,
4361
4466
  {
4362
4467
  className: o,
4363
4468
  $primaryColor: c,
4364
4469
  $showWelcomeScreen: u,
4365
4470
  children: [
4366
- /* @__PURE__ */ l.jsxs(mi, { children: [
4471
+ /* @__PURE__ */ l.jsxs(xi, { children: [
4367
4472
  n && /* @__PURE__ */ l.jsx(
4368
- ke,
4473
+ we,
4369
4474
  {
4370
4475
  src: n,
4371
4476
  alt: e || "Agent",
4372
4477
  $size: "32px"
4373
4478
  }
4374
4479
  ),
4375
- /* @__PURE__ */ l.jsxs(gi, { children: [
4376
- /* @__PURE__ */ l.jsx(bi, {}),
4377
- /* @__PURE__ */ l.jsx(yi, { children: e })
4480
+ /* @__PURE__ */ l.jsxs(ki, { children: [
4481
+ /* @__PURE__ */ l.jsx(wi, {}),
4482
+ /* @__PURE__ */ l.jsx(vi, { children: e })
4378
4483
  ] })
4379
4484
  ] }),
4380
- /* @__PURE__ */ l.jsx(xi, { children: t && /* @__PURE__ */ l.jsx(
4381
- wi,
4485
+ /* @__PURE__ */ l.jsx($i, { children: t && /* @__PURE__ */ l.jsx(
4486
+ Si,
4382
4487
  {
4383
4488
  onClick: r,
4384
4489
  "aria-label": "Close",
4385
- children: /* @__PURE__ */ l.jsx(ni, { size: 16 })
4490
+ children: /* @__PURE__ */ l.jsx(ii, { size: 16 })
4386
4491
  }
4387
4492
  ) })
4388
4493
  ]
4389
4494
  }
4390
4495
  );
4391
4496
  }
4392
- function Fr({ config: e, chat: t }) {
4497
+ function Kr({ config: e, chat: t }) {
4393
4498
  const {
4394
4499
  messages: r,
4395
4500
  sendMessage: n,
@@ -4400,7 +4505,9 @@ function Fr({ config: e, chat: t }) {
4400
4505
  isOpen: h,
4401
4506
  setIsOpen: b,
4402
4507
  hasSessionStarted: g
4403
- } = t, [p, k] = F.useState(""), [w, S] = F.useState(e.height || 600), [j, v] = F.useState(!1), a = F.useRef(null), {
4508
+ } = t, [p, w] = F.useState(""), [k, S] = F.useState(
4509
+ e.height || 600
4510
+ ), [j, v] = F.useState(!1), a = F.useRef(null), {
4404
4511
  enabled: i,
4405
4512
  staged: s,
4406
4513
  attachmentError: f,
@@ -4412,7 +4519,7 @@ function Fr({ config: e, chat: t }) {
4412
4519
  maxFiles: z,
4413
4520
  maxBytes: R,
4414
4521
  allowed: K
4415
- } = ar(e, o), C = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : j ? "dark" : "light";
4522
+ } = sr(e, o), C = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : j ? "dark" : "light";
4416
4523
  F.useEffect(() => {
4417
4524
  if (e.theme === "auto" || !e.theme) {
4418
4525
  const $ = () => {
@@ -4426,7 +4533,11 @@ function Fr({ config: e, chat: t }) {
4426
4533
  }, [e.theme]);
4427
4534
  const W = async () => {
4428
4535
  const $ = p.trim();
4429
- !$ && s.length === 0 || u || (await n($, void 0, s.length ? s : void 0), k(""), E(), setTimeout(() => {
4536
+ !$ && s.length === 0 || u || (await n(
4537
+ $,
4538
+ void 0,
4539
+ s.length ? s : void 0
4540
+ ), w(""), E(), setTimeout(() => {
4430
4541
  var P;
4431
4542
  (P = a.current) == null || P.focus();
4432
4543
  }, 100));
@@ -4437,28 +4548,28 @@ function Fr({ config: e, chat: t }) {
4437
4548
  }, H = async ($) => {
4438
4549
  if (!i) return;
4439
4550
  $.preventDefault();
4440
- const P = await Vt($.dataTransfer);
4551
+ const P = await Zt($.dataTransfer);
4441
4552
  P.length && await x(P);
4442
4553
  };
4443
4554
  return h ? /* @__PURE__ */ l.jsxs(
4444
- Qs,
4555
+ Js,
4445
4556
  {
4446
4557
  $position: e.position || "bottom-right",
4447
4558
  "data-theme": C(),
4448
4559
  style: {
4449
- height: w,
4560
+ height: k,
4450
4561
  ...e.backgroundColor ? { backgroundColor: e.backgroundColor } : {},
4451
4562
  ...e.textColor ? { color: e.textColor } : {},
4452
4563
  ...e.chatWindowStyle
4453
4564
  },
4454
4565
  children: [
4455
4566
  e.resizable !== !1 && /* @__PURE__ */ l.jsx(
4456
- Ys,
4567
+ Xs,
4457
4568
  {
4458
4569
  $position: "top",
4459
4570
  onMouseDown: ($) => {
4460
4571
  $.preventDefault();
4461
- const P = $.clientY, O = typeof w == "number" ? w : 600, L = (Y) => {
4572
+ const P = $.clientY, O = typeof k == "number" ? k : 600, L = (Y) => {
4462
4573
  const N = Y.clientY - P, q = O - N;
4463
4574
  S(Math.max(200, Math.min(600, q)));
4464
4575
  }, _ = () => {
@@ -4469,7 +4580,7 @@ function Fr({ config: e, chat: t }) {
4469
4580
  }
4470
4581
  ),
4471
4582
  e.showHeader !== !1 && /* @__PURE__ */ l.jsx(
4472
- ki,
4583
+ Ci,
4473
4584
  {
4474
4585
  agentImage: e.agentImage,
4475
4586
  chatName: e.chatName,
@@ -4479,7 +4590,7 @@ function Fr({ config: e, chat: t }) {
4479
4590
  }
4480
4591
  ),
4481
4592
  e.quickQuestions && e.quickQuestions.length > 0 && !g ? /* @__PURE__ */ l.jsx(
4482
- or,
4593
+ ar,
4483
4594
  {
4484
4595
  config: e,
4485
4596
  onQuestionClick: async ($) => {
@@ -4489,123 +4600,184 @@ function Fr({ config: e, chat: t }) {
4489
4600
  isLoading: u
4490
4601
  }
4491
4602
  ) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4492
- /* @__PURE__ */ l.jsx(sr, { surfaceTheme: C(), onDragOver: D, onDrop: H, children: /* @__PURE__ */ l.jsxs(ir, { children: [
4493
- r.map(($) => /* @__PURE__ */ l.jsxs(
4494
- "div",
4495
- {
4496
- style: {
4497
- display: "flex",
4498
- marginBottom: "16px",
4499
- justifyContent: $.role === "user" ? "flex-end" : "flex-start",
4500
- alignItems: "flex-start",
4501
- gap: "8px"
4502
- },
4503
- children: [
4504
- $.role === "assistant" && e.agentImage && /* @__PURE__ */ l.jsx(
4505
- ke,
4603
+ /* @__PURE__ */ l.jsx(
4604
+ ir,
4605
+ {
4606
+ surfaceTheme: C(),
4607
+ onDragOver: D,
4608
+ onDrop: H,
4609
+ children: /* @__PURE__ */ l.jsxs(cr, { children: [
4610
+ r.map(($) => /* @__PURE__ */ l.jsxs(
4611
+ "div",
4612
+ {
4613
+ style: {
4614
+ display: "flex",
4615
+ marginBottom: "16px",
4616
+ justifyContent: $.role === "user" ? "flex-end" : "flex-start",
4617
+ alignItems: "flex-start",
4618
+ gap: "8px"
4619
+ },
4620
+ children: [
4621
+ $.role === "assistant" && e.agentImage && /* @__PURE__ */ l.jsx(
4622
+ we,
4623
+ {
4624
+ src: e.agentImage,
4625
+ alt: e.chatName || "Agent",
4626
+ $size: "28px"
4627
+ }
4628
+ ),
4629
+ $.role === "assistant" ? /* @__PURE__ */ l.jsxs(
4630
+ "div",
4631
+ {
4632
+ style: {
4633
+ display: "flex",
4634
+ flexDirection: "column",
4635
+ alignItems: "flex-start",
4636
+ maxWidth: "80%"
4637
+ },
4638
+ children: [
4639
+ /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsx(Vt, { message: $ }) }),
4640
+ Pn(
4641
+ $,
4642
+ r,
4643
+ u
4644
+ ) && /* @__PURE__ */ l.jsx(
4645
+ vn,
4646
+ {
4647
+ content: $.content,
4648
+ disabled: u,
4649
+ onExportPdf: (P) => c(P)
4650
+ }
4651
+ )
4652
+ ]
4653
+ }
4654
+ ) : /* @__PURE__ */ l.jsx(he, { $isUser: !0, children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4655
+ $.attachments && $.attachments.length > 0 && /* @__PURE__ */ l.jsx(
4656
+ ke,
4657
+ {
4658
+ attachments: $.attachments,
4659
+ readOnly: !0,
4660
+ tone: "onPrimary"
4661
+ }
4662
+ ),
4663
+ $.content ? $.content : null
4664
+ ] }) })
4665
+ ]
4666
+ },
4667
+ $.id
4668
+ )),
4669
+ u && /* @__PURE__ */ l.jsxs(
4670
+ "div",
4671
+ {
4672
+ style: {
4673
+ display: "flex",
4674
+ justifyContent: "flex-start",
4675
+ alignItems: "flex-start",
4676
+ gap: "8px",
4677
+ marginBottom: "16px"
4678
+ },
4679
+ children: [
4680
+ e.agentImage && /* @__PURE__ */ l.jsx(
4681
+ we,
4682
+ {
4683
+ src: e.agentImage,
4684
+ alt: e.chatName || "Agent",
4685
+ $size: "28px"
4686
+ }
4687
+ ),
4688
+ /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(nr, { children: [
4689
+ /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4690
+ /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4691
+ /* @__PURE__ */ l.jsx("div", { className: "dot" })
4692
+ ] }) })
4693
+ ]
4694
+ }
4695
+ ),
4696
+ d && /* @__PURE__ */ l.jsx(or, { children: d })
4697
+ ] })
4698
+ }
4699
+ ),
4700
+ /* @__PURE__ */ l.jsxs(
4701
+ tr,
4702
+ {
4703
+ style: { flexDirection: "column", alignItems: "stretch", gap: 0 },
4704
+ children: [
4705
+ (f || i && s.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
4706
+ f && /* @__PURE__ */ l.jsx(
4707
+ "div",
4506
4708
  {
4507
- src: e.agentImage,
4508
- alt: e.chatName || "Agent",
4509
- $size: "28px"
4709
+ style: { fontSize: 12, color: "#dc2626", marginBottom: 4 },
4710
+ children: f
4510
4711
  }
4511
4712
  ),
4512
- $.role === "assistant" ? /* @__PURE__ */ l.jsxs(
4513
- "div",
4713
+ i && s.length > 0 && /* @__PURE__ */ l.jsx(
4714
+ ke,
4514
4715
  {
4515
- style: {
4516
- display: "flex",
4517
- flexDirection: "column",
4518
- alignItems: "flex-start",
4519
- maxWidth: "80%"
4520
- },
4521
- children: [
4522
- /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsx(Yt, { message: $ }) }),
4523
- Rn($, r, u) && /* @__PURE__ */ l.jsx(
4524
- kn,
4716
+ attachments: s,
4717
+ onRemove: T
4718
+ }
4719
+ )
4720
+ ] }),
4721
+ /* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(Xt, { children: [
4722
+ /* @__PURE__ */ l.jsx(
4723
+ gt,
4724
+ {
4725
+ ref: a,
4726
+ variant: "composer",
4727
+ value: p,
4728
+ onChange: w,
4729
+ onKeyDown: I,
4730
+ placeholder: e.placeholder,
4731
+ disabled: u
4732
+ }
4733
+ ),
4734
+ /* @__PURE__ */ l.jsxs(er, { children: [
4735
+ /* @__PURE__ */ l.jsx(
4736
+ "div",
4737
+ {
4738
+ style: {
4739
+ display: "flex",
4740
+ alignItems: "center",
4741
+ gap: 8,
4742
+ flex: 1,
4743
+ minWidth: 0
4744
+ },
4745
+ children: i && /* @__PURE__ */ l.jsx(
4746
+ Jt,
4525
4747
  {
4526
- content: $.content,
4748
+ integrated: !0,
4527
4749
  disabled: u,
4528
- onExportPdf: (P) => c(P)
4750
+ maxFileBytes: R,
4751
+ maxFiles: z,
4752
+ allowedMime: K,
4753
+ currentCount: s.length,
4754
+ uploadAttachment: o,
4755
+ onUploaded: y,
4756
+ onError: m
4529
4757
  }
4530
4758
  )
4531
- ]
4532
- }
4533
- ) : /* @__PURE__ */ l.jsx(he, { $isUser: !0, children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4534
- $.attachments && $.attachments.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: $.attachments, readOnly: !0 }),
4535
- $.content ? $.content : null
4536
- ] }) })
4537
- ]
4538
- },
4539
- $.id
4540
- )),
4541
- u && /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", justifyContent: "flex-start", alignItems: "flex-start", gap: "8px", marginBottom: "16px" }, children: [
4542
- e.agentImage && /* @__PURE__ */ l.jsx(
4543
- ke,
4544
- {
4545
- src: e.agentImage,
4546
- alt: e.chatName || "Agent",
4547
- $size: "28px"
4548
- }
4549
- ),
4550
- /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(rr, { children: [
4551
- /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4552
- /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4553
- /* @__PURE__ */ l.jsx("div", { className: "dot" })
4554
- ] }) })
4555
- ] }),
4556
- d && /* @__PURE__ */ l.jsx(nr, { children: d })
4557
- ] }) }),
4558
- /* @__PURE__ */ l.jsxs(er, { style: { flexDirection: "column", alignItems: "stretch", gap: 0 }, children: [
4559
- (f || i && s.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
4560
- f && /* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: "#dc2626", marginBottom: 4 }, children: f }),
4561
- i && s.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: s, onRemove: T })
4562
- ] }),
4563
- /* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(Jt, { children: [
4564
- /* @__PURE__ */ l.jsx(
4565
- mt,
4566
- {
4567
- ref: a,
4568
- variant: "composer",
4569
- value: p,
4570
- onChange: k,
4571
- onKeyDown: I,
4572
- placeholder: e.placeholder,
4573
- disabled: u
4574
- }
4575
- ),
4576
- /* @__PURE__ */ l.jsxs(Xt, { children: [
4577
- /* @__PURE__ */ l.jsx("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: i && /* @__PURE__ */ l.jsx(
4578
- Zt,
4579
- {
4580
- integrated: !0,
4581
- disabled: u,
4582
- maxFileBytes: R,
4583
- maxFiles: z,
4584
- allowedMime: K,
4585
- currentCount: s.length,
4586
- uploadAttachment: o,
4587
- onUploaded: y,
4588
- onError: m
4589
- }
4590
- ) }),
4591
- /* @__PURE__ */ l.jsx(
4592
- tr,
4593
- {
4594
- type: "button",
4595
- onClick: W,
4596
- disabled: u || !p.trim() && s.length === 0,
4597
- "aria-label": "Send message",
4598
- children: /* @__PURE__ */ l.jsx(gt, { size: 13 })
4599
- }
4600
- )
4601
- ] })
4602
- ] }) })
4603
- ] })
4759
+ }
4760
+ ),
4761
+ /* @__PURE__ */ l.jsx(
4762
+ rr,
4763
+ {
4764
+ type: "button",
4765
+ onClick: W,
4766
+ disabled: u || !p.trim() && s.length === 0,
4767
+ "aria-label": "Send message",
4768
+ children: /* @__PURE__ */ l.jsx(bt, { size: 13 })
4769
+ }
4770
+ )
4771
+ ] })
4772
+ ] }) })
4773
+ ]
4774
+ }
4775
+ )
4604
4776
  ] })
4605
4777
  ]
4606
4778
  }
4607
4779
  ) : /* @__PURE__ */ l.jsxs(
4608
- Gs,
4780
+ Zs,
4609
4781
  {
4610
4782
  onClick: () => b(!0),
4611
4783
  style: e.buttonStyle,
@@ -4613,28 +4785,35 @@ function Fr({ config: e, chat: t }) {
4613
4785
  $primaryColor: e.primaryColor,
4614
4786
  "aria-label": "Open chat",
4615
4787
  children: [
4616
- /* @__PURE__ */ l.jsx("div", { className: "icon-container", children: /* @__PURE__ */ l.jsx(ri, { size: 16 }) }),
4788
+ /* @__PURE__ */ l.jsx("div", { className: "icon-container", children: /* @__PURE__ */ l.jsx(si, { size: 16 }) }),
4617
4789
  /* @__PURE__ */ l.jsx("span", { children: e.buttonText || e.chatName || "AI Chat" })
4618
4790
  ]
4619
4791
  }
4620
4792
  );
4621
4793
  }
4622
- function Ti(e) {
4623
- const t = Jn(e), r = Zn(t);
4794
+ function _i(e) {
4795
+ const t = Xn(e), r = Jn(t);
4624
4796
  switch (t.mode) {
4625
4797
  case "floating":
4626
- return /* @__PURE__ */ l.jsx(Fr, { config: t, chat: r });
4798
+ return /* @__PURE__ */ l.jsx(Kr, { config: t, chat: r });
4627
4799
  case "embedded":
4628
- return /* @__PURE__ */ l.jsx(fi, { config: t, chat: r });
4800
+ return /* @__PURE__ */ l.jsx(bi, { config: t, chat: r });
4629
4801
  default:
4630
- return /* @__PURE__ */ l.jsx(Fr, { config: t, chat: r });
4802
+ return /* @__PURE__ */ l.jsx(Kr, { config: t, chat: r });
4631
4803
  }
4632
4804
  }
4633
- function Ai({ config: e, chat: t }) {
4634
- const { messages: r, sendMessage: n, uploadAttachment: o, isLoading: c, error: u, hasSessionStarted: d } = t, [h, b] = F.useState(""), g = F.useRef(null), {
4805
+ function Ri({ config: e, chat: t }) {
4806
+ const {
4807
+ messages: r,
4808
+ sendMessage: n,
4809
+ uploadAttachment: o,
4810
+ isLoading: c,
4811
+ error: u,
4812
+ hasSessionStarted: d
4813
+ } = t, [h, b] = F.useState(""), g = F.useRef(null), {
4635
4814
  enabled: p,
4636
- staged: k,
4637
- attachmentError: w,
4815
+ staged: w,
4816
+ attachmentError: k,
4638
4817
  setAttachmentError: S,
4639
4818
  addFiles: j,
4640
4819
  appendStaged: v,
@@ -4643,7 +4822,7 @@ function Ai({ config: e, chat: t }) {
4643
4822
  maxFiles: s,
4644
4823
  maxBytes: f,
4645
4824
  allowed: m
4646
- } = ar(e, o), [x, y] = F.useState(!1), T = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : x ? "dark" : "light";
4825
+ } = sr(e, o), [x, y] = F.useState(!1), T = () => e.theme === "dark" ? "dark" : e.theme === "light" ? "light" : x ? "dark" : "light";
4647
4826
  F.useEffect(() => {
4648
4827
  if (e.theme === "auto" || !e.theme) {
4649
4828
  const C = () => {
@@ -4657,7 +4836,11 @@ function Ai({ config: e, chat: t }) {
4657
4836
  }, [e.theme]);
4658
4837
  const E = async () => {
4659
4838
  const C = h.trim();
4660
- !C && k.length === 0 || c || (await n(C, void 0, k.length ? k : void 0), b(""), i(), setTimeout(() => {
4839
+ !C && w.length === 0 || c || (await n(
4840
+ C,
4841
+ void 0,
4842
+ w.length ? w : void 0
4843
+ ), b(""), i(), setTimeout(() => {
4661
4844
  var W;
4662
4845
  (W = g.current) == null || W.focus();
4663
4846
  }, 100));
@@ -4668,11 +4851,11 @@ function Ai({ config: e, chat: t }) {
4668
4851
  }, K = async (C) => {
4669
4852
  if (!p) return;
4670
4853
  C.preventDefault();
4671
- const W = await Vt(C.dataTransfer);
4854
+ const W = await Zt(C.dataTransfer);
4672
4855
  W.length && await j(W);
4673
4856
  };
4674
4857
  return /* @__PURE__ */ l.jsx(
4675
- _n,
4858
+ Rn,
4676
4859
  {
4677
4860
  "data-theme": T(),
4678
4861
  style: {
@@ -4682,7 +4865,7 @@ function Ai({ config: e, chat: t }) {
4682
4865
  borderRadius: "8px"
4683
4866
  },
4684
4867
  children: e.quickQuestions && e.quickQuestions.length > 0 && !d ? /* @__PURE__ */ l.jsx(
4685
- or,
4868
+ ar,
4686
4869
  {
4687
4870
  config: e,
4688
4871
  onQuestionClick: async (C) => {
@@ -4693,13 +4876,13 @@ function Ai({ config: e, chat: t }) {
4693
4876
  }
4694
4877
  ) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4695
4878
  /* @__PURE__ */ l.jsx(
4696
- sr,
4879
+ ir,
4697
4880
  {
4698
4881
  style: { flex: 1 },
4699
4882
  surfaceTheme: T(),
4700
4883
  onDragOver: R,
4701
4884
  onDrop: K,
4702
- children: /* @__PURE__ */ l.jsxs(ir, { children: [
4885
+ children: /* @__PURE__ */ l.jsxs(cr, { children: [
4703
4886
  r.map((C) => /* @__PURE__ */ l.jsxs(
4704
4887
  "div",
4705
4888
  {
@@ -4712,103 +4895,152 @@ function Ai({ config: e, chat: t }) {
4712
4895
  },
4713
4896
  children: [
4714
4897
  C.role === "assistant" && e.agentImage && /* @__PURE__ */ l.jsx(
4715
- ke,
4898
+ we,
4716
4899
  {
4717
4900
  src: e.agentImage,
4718
4901
  alt: e.chatName || "Agent",
4719
4902
  $size: "28px"
4720
4903
  }
4721
4904
  ),
4722
- /* @__PURE__ */ l.jsx(he, { $isUser: C.role === "user", children: C.role === "assistant" ? /* @__PURE__ */ l.jsx(Yt, { message: C }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4723
- C.attachments && C.attachments.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: C.attachments, readOnly: !0 }),
4905
+ /* @__PURE__ */ l.jsx(he, { $isUser: C.role === "user", children: C.role === "assistant" ? /* @__PURE__ */ l.jsx(Vt, { message: C }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
4906
+ C.attachments && C.attachments.length > 0 && /* @__PURE__ */ l.jsx(
4907
+ ke,
4908
+ {
4909
+ attachments: C.attachments,
4910
+ readOnly: !0,
4911
+ tone: "onPrimary"
4912
+ }
4913
+ ),
4724
4914
  C.content ? C.content : null
4725
4915
  ] }) })
4726
4916
  ]
4727
4917
  },
4728
4918
  C.id
4729
4919
  )),
4730
- c && /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", justifyContent: "flex-start", alignItems: "flex-start", gap: "8px", marginBottom: "12px" }, children: [
4731
- e.agentImage && /* @__PURE__ */ l.jsx(
4732
- ke,
4920
+ c && /* @__PURE__ */ l.jsxs(
4921
+ "div",
4922
+ {
4923
+ style: {
4924
+ display: "flex",
4925
+ justifyContent: "flex-start",
4926
+ alignItems: "flex-start",
4927
+ gap: "8px",
4928
+ marginBottom: "12px"
4929
+ },
4930
+ children: [
4931
+ e.agentImage && /* @__PURE__ */ l.jsx(
4932
+ we,
4933
+ {
4934
+ src: e.agentImage,
4935
+ alt: e.chatName || "Agent",
4936
+ $size: "28px"
4937
+ }
4938
+ ),
4939
+ /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(nr, { children: [
4940
+ /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4941
+ /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4942
+ /* @__PURE__ */ l.jsx("div", { className: "dot" })
4943
+ ] }) })
4944
+ ]
4945
+ }
4946
+ ),
4947
+ u && /* @__PURE__ */ l.jsx(or, { children: u })
4948
+ ] })
4949
+ }
4950
+ ),
4951
+ /* @__PURE__ */ l.jsxs(
4952
+ tr,
4953
+ {
4954
+ style: { flexDirection: "column", alignItems: "stretch", gap: 0 },
4955
+ children: [
4956
+ (k || p && w.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
4957
+ k && /* @__PURE__ */ l.jsx(
4958
+ "div",
4733
4959
  {
4734
- src: e.agentImage,
4735
- alt: e.chatName || "Agent",
4736
- $size: "28px"
4960
+ style: { fontSize: 12, color: "#dc2626", marginBottom: 4 },
4961
+ children: k
4737
4962
  }
4738
4963
  ),
4739
- /* @__PURE__ */ l.jsx(he, { $isUser: !1, children: /* @__PURE__ */ l.jsxs(rr, { children: [
4740
- /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4741
- /* @__PURE__ */ l.jsx("div", { className: "dot" }),
4742
- /* @__PURE__ */ l.jsx("div", { className: "dot" })
4743
- ] }) })
4964
+ p && w.length > 0 && /* @__PURE__ */ l.jsx(
4965
+ ke,
4966
+ {
4967
+ attachments: w,
4968
+ onRemove: a
4969
+ }
4970
+ )
4744
4971
  ] }),
4745
- u && /* @__PURE__ */ l.jsx(nr, { children: u })
4746
- ] })
4972
+ /* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(Xt, { children: [
4973
+ /* @__PURE__ */ l.jsx(
4974
+ gt,
4975
+ {
4976
+ ref: g,
4977
+ variant: "composer",
4978
+ value: h,
4979
+ onChange: b,
4980
+ onKeyDown: z,
4981
+ placeholder: e.placeholder,
4982
+ disabled: c
4983
+ }
4984
+ ),
4985
+ /* @__PURE__ */ l.jsxs(er, { children: [
4986
+ /* @__PURE__ */ l.jsx(
4987
+ "div",
4988
+ {
4989
+ style: {
4990
+ display: "flex",
4991
+ alignItems: "center",
4992
+ gap: 8,
4993
+ flex: 1,
4994
+ minWidth: 0
4995
+ },
4996
+ children: p && /* @__PURE__ */ l.jsx(
4997
+ Jt,
4998
+ {
4999
+ integrated: !0,
5000
+ disabled: c,
5001
+ maxFileBytes: f,
5002
+ maxFiles: s,
5003
+ allowedMime: m,
5004
+ currentCount: w.length,
5005
+ uploadAttachment: o,
5006
+ onUploaded: v,
5007
+ onError: S
5008
+ }
5009
+ )
5010
+ }
5011
+ ),
5012
+ /* @__PURE__ */ l.jsx(
5013
+ rr,
5014
+ {
5015
+ type: "button",
5016
+ onClick: E,
5017
+ disabled: c || !h.trim() && w.length === 0,
5018
+ "aria-label": "Send message",
5019
+ children: /* @__PURE__ */ l.jsx(bt, { size: 13 })
5020
+ }
5021
+ )
5022
+ ] })
5023
+ ] }) })
5024
+ ]
4747
5025
  }
4748
- ),
4749
- /* @__PURE__ */ l.jsxs(er, { style: { flexDirection: "column", alignItems: "stretch", gap: 0 }, children: [
4750
- (w || p && k.length > 0) && /* @__PURE__ */ l.jsxs("div", { style: { paddingBottom: 8 }, children: [
4751
- w && /* @__PURE__ */ l.jsx("div", { style: { fontSize: 12, color: "#dc2626", marginBottom: 4 }, children: w }),
4752
- p && k.length > 0 && /* @__PURE__ */ l.jsx(we, { attachments: k, onRemove: a })
4753
- ] }),
4754
- /* @__PURE__ */ l.jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ l.jsxs(Jt, { children: [
4755
- /* @__PURE__ */ l.jsx(
4756
- mt,
4757
- {
4758
- ref: g,
4759
- variant: "composer",
4760
- value: h,
4761
- onChange: b,
4762
- onKeyDown: z,
4763
- placeholder: e.placeholder,
4764
- disabled: c
4765
- }
4766
- ),
4767
- /* @__PURE__ */ l.jsxs(Xt, { children: [
4768
- /* @__PURE__ */ l.jsx("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1, minWidth: 0 }, children: p && /* @__PURE__ */ l.jsx(
4769
- Zt,
4770
- {
4771
- integrated: !0,
4772
- disabled: c,
4773
- maxFileBytes: f,
4774
- maxFiles: s,
4775
- allowedMime: m,
4776
- currentCount: k.length,
4777
- uploadAttachment: o,
4778
- onUploaded: v,
4779
- onError: S
4780
- }
4781
- ) }),
4782
- /* @__PURE__ */ l.jsx(
4783
- tr,
4784
- {
4785
- type: "button",
4786
- onClick: E,
4787
- disabled: c || !h.trim() && k.length === 0,
4788
- "aria-label": "Send message",
4789
- children: /* @__PURE__ */ l.jsx(gt, { size: 13 })
4790
- }
4791
- )
4792
- ] })
4793
- ] }) })
4794
- ] })
5026
+ )
4795
5027
  ] })
4796
5028
  }
4797
5029
  );
4798
5030
  }
4799
5031
  export {
4800
- fi as EmbeddedChat,
4801
- Fr as FloatingChat,
4802
- Ai as InlineChat,
4803
- Bs as MarkdownRenderer,
4804
- Qn as OrdifyApiClient,
4805
- Ti as OrdifyChat,
4806
- ji as debounce,
4807
- Ci as formatTime,
4808
- qe as generateId,
4809
- Yn as parseStreamingResponse,
4810
- Ii as throttle,
4811
- Zn as useOrdifyChat,
4812
- Jn as useOrdifyConfig,
4813
- ar as useWidgetAttachmentStaging
5032
+ bi as EmbeddedChat,
5033
+ Kr as FloatingChat,
5034
+ Ri as InlineChat,
5035
+ Ws as MarkdownRenderer,
5036
+ Yn as OrdifyApiClient,
5037
+ _i as OrdifyChat,
5038
+ Ei as debounce,
5039
+ Ai as formatTime,
5040
+ Ge as generateId,
5041
+ Vn as parseStreamingResponse,
5042
+ Mi as throttle,
5043
+ Jn as useOrdifyChat,
5044
+ Xn as useOrdifyConfig,
5045
+ sr as useWidgetAttachmentStaging
4814
5046
  };