@epam/ai-dial-conversation-input 1.2.0-dev.2 → 1.2.0-dev.21

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/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, RESIZABLE_TEXTAREA_CLASS_NAME as r, RequestStatus as i, ResponseFormat as a, SELECT_LIST_MAX_HEIGHT_PX as o, buildCssVars as s, mergeClasses as c, useIsMobile as l } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as u, Button as d, CloseButton as f, DIAL_ICON_SIZE as p, DIAL_KIT_ICON_STROKE as m, Dropdown as h, ElementSize as g, ErrorText as _, GhostIconButton as v, Highlight as y, MenuItemMark as b, NeutralButton as x, Popup as S, PopupSize as C, PrimaryButton as w, PrimaryIconButton as T, RadioGroup as E, RadioGroupOrientation as D, Search as O, Skeleton as k, SkeletonVariant as ee, Slider as A, Spinner as te, StaticIconButton as j, Textarea as ne, TextareaResize as re, Tooltip as ie } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowLeft as ae, IconArrowNarrowRight as oe, IconCheck as M, IconChevronDown as N, IconChevronRight as P, IconFile as se, IconMicrophone as ce, IconPaperclip as le, IconPlayerStopFilled as F, IconPlaystationSquare as ue, IconPlus as de, IconSettings as fe, IconTool as pe, IconX as me } from "@tabler/icons-react";
4
- import { createElement as he, memo as ge, useCallback as I, useEffect as L, useImperativeHandle as R, useLayoutEffect as _e, useMemo as z, useRef as B, useState as V } from "react";
5
- import { createPortal as ve } from "react-dom";
2
+ import { BASE_ICON_SIZE as u, Button as d, CloseButton as f, DIAL_ICON_SIZE as p, DIAL_KIT_ICON_STROKE as m, Dropdown as h, ElementSize as g, ErrorText as _, GhostIconButton as v, Highlight as y, MenuItemMark as b, NeutralButton as x, Popup as S, PopupSize as C, PrimaryButton as w, PrimaryIconButton as T, RadioGroup as E, RadioGroupOrientation as D, Search as O, Skeleton as k, SkeletonVariant as ee, Slider as A, Spinner as te, StaticIconButton as j, Textarea as ne, TextareaResize as M, Tooltip as N } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowLeft as re, IconArrowNarrowRight as ie, IconCheck as ae, IconChevronDown as P, IconChevronRight as oe, IconFile as se, IconMicrophone as ce, IconPaperclip as le, IconPlayerStopFilled as F, IconPlaystationSquare as ue, IconPlus as de, IconSettings as fe, IconTool as pe, IconX as me } from "@tabler/icons-react";
4
+ import { createElement as he, memo as ge, useCallback as I, useEffect as L, useImperativeHandle as _e, useLayoutEffect as ve, useMemo as R, useRef as z, useState as B } from "react";
5
+ import { createPortal as V } from "react-dom";
6
6
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
7
7
  import { AttachmentTray as ye, MAX_UPLOADS_PER_MINUTE as be, generateAttachmentId as xe, useClipboardPaste as Se } from "@epam/ai-dial-attachment-input";
8
8
  //#region src/hooks/useBottomSheet.ts
@@ -42,7 +42,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
42
42
  title: "_title_1d50f_18",
43
43
  divider: "_divider_1d50f_22"
44
44
  }, Ee = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": o, style: l, titleClassName: u = "dial-body-semi-text", className: d, colors: h, children: _ }) => {
45
- let y = B(null);
45
+ let y = z(null);
46
46
  if (we(e, r, y), !e || typeof document > "u") return null;
47
47
  let b = s({
48
48
  "--ci-backdrop": h?.backdrop,
@@ -50,7 +50,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
50
50
  "--ci-sheet-text": h?.sheetText,
51
51
  "--ci-sheet-divider": h?.divider
52
52
  });
53
- return ve(/* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("div", {
53
+ return V(/* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("div", {
54
54
  className: c(Te.backdrop, "fixed inset-0 z-[55]"),
55
55
  style: b,
56
56
  onPointerDown: r,
@@ -72,7 +72,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
72
72
  i && /* @__PURE__ */ U("div", {
73
73
  className: "absolute start-4",
74
74
  children: /* @__PURE__ */ U(v, {
75
- icon: /* @__PURE__ */ U(ae, {
75
+ icon: /* @__PURE__ */ U(re, {
76
76
  size: p.LG,
77
77
  stroke: m,
78
78
  className: "rtl:scale-x-[-1]"
@@ -104,7 +104,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
104
104
  for (let t = 0; t < e.length; t++) t > 0 && await new Promise((e) => setTimeout(e, r)), i.push(n(e[t]));
105
105
  await Promise.allSettled(i);
106
106
  }, Oe = ({ initialAttachments: n, onUploadAttachment: r, onAttachmentsChange: a, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, pendingAttachments: l, onPendingAttachmentsConsumed: u, onExpandPastedText: d, maximumAttachmentsAmount: f, baseAttachmentsAmount: p = 0, onAttachmentsLimitExceeded: m }) => {
107
- let [h, g] = V(n), _ = B(h);
107
+ let [h, g] = B(n), _ = z(h);
108
108
  L(() => {
109
109
  _.current = h;
110
110
  }, [h]), L(() => () => {
@@ -124,11 +124,11 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
124
124
  previewUrl: a,
125
125
  playUrl: o
126
126
  };
127
- }), []), y = B(a);
127
+ }), []), y = z(a);
128
128
  L(() => {
129
129
  y.current = a;
130
130
  }, [a]);
131
- let b = B(!0), x = I((e) => {
131
+ let b = z(!0), x = I((e) => {
132
132
  g((t) => {
133
133
  let n = e(t);
134
134
  return n === t ? t : n;
@@ -271,7 +271,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
271
271
  let n = e.slice(t.length);
272
272
  return !/\s/.test(n) && !n.includes(t);
273
273
  }, Ae = ({ config: e, message: t }) => {
274
- let [n, r] = V(!1), [i, a] = V(!1), o = e != null && ke(t, e.triggerPrefix) ? t.slice(e.triggerPrefix.length) : "", s = I((n, a, o) => {
274
+ let [n, r] = B(!1), [i, a] = B(!1), o = e != null && ke(t, e.triggerPrefix) ? t.slice(e.triggerPrefix.length) : "", s = I((n, a, o) => {
275
275
  if (e == null || a || t !== "" || i) return;
276
276
  let s = n === e.triggerPrefix, c = o === "insertFromPaste" && ke(n, e.triggerPrefix);
277
277
  (s || c) && r(!0);
@@ -295,9 +295,9 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
295
295
  handleValueChange: s
296
296
  };
297
297
  }, je = (e, t) => !e.slice(0, t).includes("\n"), Me = (e, t) => !e.slice(t).includes("\n"), Ne = (e) => {
298
- let t = B(e);
298
+ let t = z(e);
299
299
  t.current = e;
300
- let n = B(-1), r = B(""), i = I((e, i, a) => {
300
+ let n = z(-1), r = z(""), i = I((e, i, a) => {
301
301
  let o = t.current;
302
302
  return !o || o.length === 0 ? null : e === "up" ? !je(i, a) || n.current === 0 ? null : (n.current === -1 ? (r.current = i, n.current = o.length - 1) : --n.current, o[n.current]) : n.current === -1 || !Me(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
303
303
  }, []), a = I(() => {
@@ -305,7 +305,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
305
305
  }, []), o = I(() => {
306
306
  n.current = -1, r.current = "";
307
307
  }, []);
308
- return z(() => ({
308
+ return R(() => ({
309
309
  navigate: i,
310
310
  notifyChange: a,
311
311
  reset: o
@@ -315,7 +315,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
315
315
  o
316
316
  ]);
317
317
  }, Pe = ({ messageProp: e, messageRevision: t }) => {
318
- let [n, r] = V(e), i = B(null);
318
+ let [n, r] = B(e), i = z(null);
319
319
  return L(() => {
320
320
  r(e);
321
321
  }, [e, t]), {
@@ -327,9 +327,9 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
327
327
  let r = Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype, "value")?.set;
328
328
  r ? r.call(e, t) : e.value = t, e.setSelectionRange(n, n), e.dispatchEvent(new Event("input", { bubbles: !0 }));
329
329
  }, Ie = ({ insertion: e, textareaRef: t }) => {
330
- let n = e?.revision, r = B(e?.text);
330
+ let n = e?.revision, r = z(e?.text);
331
331
  r.current = e?.text;
332
- let i = B(n);
332
+ let i = z(n);
333
333
  L(() => {
334
334
  if (n === i.current) return;
335
335
  i.current = n;
@@ -347,7 +347,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
347
347
  "audio/ogg;codecs=opus",
348
348
  "audio/webm"
349
349
  ], Be = 100, Ve = 100, He = .01, Ue = ({ onAttachAudio: e, onTranscribeAudio: t, onTranscript: n, errorLabel: r = "Voice input failed" }) => {
350
- let [i, a] = V("idle"), [o, s] = V(null), c = B(null), l = B(null), u = B({
350
+ let [i, a] = B("idle"), [o, s] = B(null), c = z(null), l = z(null), u = z({
351
351
  onAttachAudio: e,
352
352
  onTranscribeAudio: t,
353
353
  onTranscript: n,
@@ -362,7 +362,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
362
362
  let d = I((e = "dictation") => {
363
363
  if (l.current) return;
364
364
  let t = { controller: new AbortController() };
365
- l.current = t, a("recording");
365
+ l.current = t, s(null), a("recording");
366
366
  let { signal: n } = t.controller, r = e === "dictation" ? u.current.onTranscribeAudio : void 0, i, o, d, f, p = !1, m = !1, h = [], g = () => {
367
367
  clearInterval(f), f = void 0;
368
368
  }, _ = () => {
@@ -374,7 +374,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
374
374
  let v = () => {
375
375
  n.aborted || (_(), l.current = null, s(null), a("idle"));
376
376
  }, y = (e) => {
377
- n.aborted || (t.controller.abort(), s(e instanceof Error ? e.message : u.current.errorLabel), a("error"));
377
+ n.aborted || (t.controller.abort(), l.current = null, s(e instanceof Error ? e.message : u.current.errorLabel), a("error"));
378
378
  }, b = () => {
379
379
  if (!i || n.aborted) return;
380
380
  let e = ze.find((e) => MediaRecorder.isTypeSupported(e)), t = new MediaRecorder(i, e ? { mimeType: e } : void 0);
@@ -491,7 +491,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
491
491
  })
492
492
  });
493
493
  }, qe = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
494
- let [s, c] = V(t), [l, u] = V(n), [d, f] = V(r), p = B(o);
494
+ let [s, c] = B(t), [l, u] = B(n), [d, f] = B(r), p = z(o);
495
495
  L(() => {
496
496
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
497
497
  }, [
@@ -523,12 +523,12 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
523
523
  a
524
524
  ])
525
525
  };
526
- }, G = { label: "_label_14i7c_1" }, Je = ({ features: e, responseFormat: t, systemPrompt: n, temperature: i, onResponseFormatChange: o, onSystemPromptChange: l, onTemperatureChange: u, responseFormatLabel: d = "Response format", responseFormatHint: f = "Applies to new and existing messages", responseFormatMarkdownLabel: p = "Markdown", responseFormatPlainTextLabel: m = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
526
+ }, Je = { label: "_label_14i7c_1" }, Ye = ({ features: e, responseFormat: t, systemPrompt: n, temperature: i, onResponseFormatChange: o, onSystemPromptChange: l, onTemperatureChange: u, responseFormatLabel: d = "Response format", responseFormatHint: f = "Applies to new and existing messages", responseFormatMarkdownLabel: p = "Markdown", responseFormatPlainTextLabel: m = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
527
527
  "Precise",
528
528
  "Neutral",
529
529
  "Creative"
530
530
  ], temperatureHint: y, labelClassName: b = "!dial-small-semi-text", colors: x }) => {
531
- let S = s({ "--csf-label-text": x?.labelText }), C = c(b, G.label, "gap-1");
531
+ let S = s({ "--csf-label-text": x?.labelText }), C = c(b, Je.label, "gap-1");
532
532
  return /* @__PURE__ */ W("div", {
533
533
  className: "flex flex-col gap-4 px-6 pb-3",
534
534
  style: S,
@@ -556,7 +556,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
556
556
  value: n,
557
557
  placeholder: g,
558
558
  className: r,
559
- resize: re.Vertical,
559
+ resize: M.Vertical,
560
560
  labelProps: {
561
561
  className: C,
562
562
  label: h
@@ -579,7 +579,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
579
579
  })
580
580
  ]
581
581
  });
582
- }, Ye = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
582
+ }, G = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: s, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
583
583
  let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: ee, setTemperature: A, handleSubmit: te } = qe({
584
584
  isOpen: e,
585
585
  features: o,
@@ -597,7 +597,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
597
597
  onBack: t,
598
598
  backLabel: n,
599
599
  style: a,
600
- children: [/* @__PURE__ */ U(Je, {
600
+ children: [/* @__PURE__ */ U(Ye, {
601
601
  features: o,
602
602
  responseFormat: T,
603
603
  systemPrompt: E,
@@ -616,7 +616,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
616
616
  temperatureHint: x
617
617
  }), /* @__PURE__ */ U("div", {
618
618
  className: c("px-6 py-4 mobile:pb-8"),
619
- children: /* @__PURE__ */ U(ie, {
619
+ children: /* @__PURE__ */ U(N, {
620
620
  tooltip: C,
621
621
  hideTooltip: O || !C,
622
622
  triggerClassName: "w-full",
@@ -647,7 +647,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
647
647
  className: y,
648
648
  footer: /* @__PURE__ */ U("div", {
649
649
  className: "flex justify-end px-6 py-4",
650
- children: /* @__PURE__ */ U(ie, {
650
+ children: /* @__PURE__ */ U(N, {
651
651
  tooltip: v,
652
652
  hideTooltip: E || !v,
653
653
  children: /* @__PURE__ */ U(w, {
@@ -657,7 +657,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
657
657
  })
658
658
  })
659
659
  }),
660
- children: /* @__PURE__ */ U(Je, {
660
+ children: /* @__PURE__ */ U(Ye, {
661
661
  features: e,
662
662
  responseFormat: b,
663
663
  systemPrompt: x,
@@ -707,7 +707,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
707
707
  }),
708
708
  iconAfter: e.isSelected ? /* @__PURE__ */ U("span", {
709
709
  className: c("ms-auto", Qe.selectedIcon),
710
- children: /* @__PURE__ */ U(M, {
710
+ children: /* @__PURE__ */ U(ae, {
711
711
  size: u,
712
712
  "aria-hidden": !0,
713
713
  stroke: m
@@ -725,14 +725,14 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
725
725
  toolIcon: "_toolIcon_ma5s5_1",
726
726
  chevronIcon: "_chevronIcon_ma5s5_5"
727
727
  }, tt = ({ onAttachClick: e, onRecordVoice: t, recordVoiceLabel: n = "Record voice", attachLabel: r, addMenuTitle: i, menuTitle: o, menuCloseLabel: d, style: f, listClassName: _ = "w-[240px]", isDisabled: y = !1, chatSettings: x, extraMenuItems: S, toolsMenuItems: C = [], onToolToggle: w, toolsMenuTitle: T = "Tools", toolsBackLabel: E = "Back", menuOverlays: D, colors: O }) => {
728
- let k = l(), [ee, A] = V(!1), [te, j] = V(!1), [ne, re] = V(!1), [ie, ae] = V(null), [oe, M] = V(!1), N = z(() => s({
728
+ let k = l(), [ee, A] = B(!1), [te, j] = B(!1), [ne, M] = B(!1), [N, re] = B(null), [ie, ae] = B(!1), P = R(() => s({
729
729
  "--aab-tool-icon": O?.toolIcon,
730
730
  "--aab-chevron-icon": O?.chevronIcon
731
- }), [O?.toolIcon, O?.chevronIcon]), se = C.length > 0 && w != null, F = D != null && D.length > 0, ue = z(() => C.map((e) => ({
731
+ }), [O?.toolIcon, O?.chevronIcon]), se = C.length > 0 && w != null, F = D != null && D.length > 0, ue = R(() => C.map((e) => ({
732
732
  key: e.id,
733
733
  label: e.label,
734
734
  icon: /* @__PURE__ */ U("span", {
735
- style: N,
735
+ style: P,
736
736
  className: c("flex items-center", et.toolIcon),
737
737
  children: e.icon
738
738
  }),
@@ -743,8 +743,8 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
743
743
  })), [
744
744
  C,
745
745
  w,
746
- N
747
- ]), me = z(() => [
746
+ P
747
+ ]), me = R(() => [
748
748
  ...e == null ? [] : [{
749
749
  key: "attach",
750
750
  label: r,
@@ -765,12 +765,12 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
765
765
  stroke: m
766
766
  }),
767
767
  onClick: k ? () => {
768
- re(!0), A(!1);
768
+ M(!0), A(!1);
769
769
  } : () => void 0,
770
- ...k ? { iconAfter: /* @__PURE__ */ U(P, {
770
+ ...k ? { iconAfter: /* @__PURE__ */ U(oe, {
771
771
  size: u,
772
772
  stroke: m,
773
- style: N,
773
+ style: P,
774
774
  className: c("rtl:scale-x-[-1]", et.chevronIcon),
775
775
  "aria-hidden": !0
776
776
  }) } : { children: ue }
@@ -780,12 +780,12 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
780
780
  label: e.title,
781
781
  icon: e.icon,
782
782
  onClick: k ? () => {
783
- ae(e.key), A(!1);
783
+ re(e.key), A(!1);
784
784
  } : () => void 0,
785
- ...k ? { iconAfter: /* @__PURE__ */ U(P, {
785
+ ...k ? { iconAfter: /* @__PURE__ */ U(oe, {
786
786
  size: u,
787
787
  stroke: m,
788
- style: N,
788
+ style: P,
789
789
  className: c("rtl:scale-x-[-1]", et.chevronIcon),
790
790
  "aria-hidden": !0
791
791
  }) } : {
@@ -793,7 +793,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
793
793
  key: `${e.key}-panel`,
794
794
  label: ""
795
795
  }],
796
- renderSubMenu: () => e.renderOverlay(() => M(!1))
796
+ renderSubMenu: () => e.renderOverlay(() => ae(!1))
797
797
  }
798
798
  })),
799
799
  ...t == null ? [] : [{
@@ -805,7 +805,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
805
805
  stroke: m
806
806
  }),
807
807
  onClick: () => {
808
- A(!1), M(!1), t();
808
+ A(!1), ae(!1), t();
809
809
  }
810
810
  }],
811
811
  ...x == null ? [] : [{
@@ -816,10 +816,10 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
816
816
  "aria-hidden": !0,
817
817
  stroke: m
818
818
  }),
819
- iconAfter: k ? /* @__PURE__ */ U(P, {
819
+ iconAfter: k ? /* @__PURE__ */ U(oe, {
820
820
  size: u,
821
821
  stroke: m,
822
- style: N,
822
+ style: P,
823
823
  className: c("rtl:scale-x-[-1]", et.chevronIcon),
824
824
  "aria-hidden": !0
825
825
  }) : null,
@@ -837,7 +837,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
837
837
  T,
838
838
  ue,
839
839
  D,
840
- N
840
+ P
841
841
  ]);
842
842
  if (me.length === 0) return null;
843
843
  let he = /* @__PURE__ */ U(h, {
@@ -845,8 +845,8 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
845
845
  placement: "bottom-start",
846
846
  listClassName: _,
847
847
  items: me,
848
- open: F ? oe : void 0,
849
- onOpenChange: F ? M : void 0,
848
+ open: F ? ie : void 0,
849
+ onOpenChange: F ? ae : void 0,
850
850
  children: /* @__PURE__ */ U(v, {
851
851
  icon: /* @__PURE__ */ U(de, {
852
852
  size: p.LG,
@@ -884,10 +884,10 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
884
884
  se && /* @__PURE__ */ U($e, {
885
885
  isOpen: ne,
886
886
  onBack: () => {
887
- re(!1), A(!0);
887
+ M(!1), A(!0);
888
888
  },
889
889
  backLabel: E,
890
- onClose: () => re(!1),
890
+ onClose: () => M(!1),
891
891
  closeLabel: d,
892
892
  style: f,
893
893
  title: T,
@@ -895,18 +895,18 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
895
895
  onToolToggle: w
896
896
  }),
897
897
  D?.map((e) => /* @__PURE__ */ U(Ee, {
898
- isOpen: ie === e.key,
898
+ isOpen: N === e.key,
899
899
  title: e.title,
900
900
  closeLabel: d,
901
901
  onBack: () => {
902
- ae(null), A(!0);
902
+ re(null), A(!0);
903
903
  },
904
904
  backLabel: e.backLabel ?? "Back",
905
- onClose: () => ae(null),
905
+ onClose: () => re(null),
906
906
  style: f,
907
- children: e.renderOverlay(() => ae(null))
907
+ children: e.renderOverlay(() => re(null))
908
908
  }, e.key)),
909
- x != null && /* @__PURE__ */ U(Ye, {
909
+ x != null && /* @__PURE__ */ U(G, {
910
910
  isOpen: te,
911
911
  onBack: () => {
912
912
  j(!1), A(!0);
@@ -1017,17 +1017,17 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1017
1017
  waveformCanvas: "_waveformCanvas_129ri_5",
1018
1018
  recordingDot: "_recordingDot_129ri_19",
1019
1019
  "recording-pulse": "_recording-pulse_129ri_1"
1020
- }, ot = 3, st = 4, q = 200, ct = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, attachButton: a, stopLabel: o = "Stop recording", discardLabel: s = "Discard recording", processingLabel: l = "Transcribing audio…", style: u, className: d, embedded: f = !1 }) => {
1021
- let h = B(null), g = B(new Float32Array(q)), y = B(0), b = B(0), x = e === Le.Recording, S = e === Le.Error, C = e === Le.Processing, w = I((e) => {
1020
+ }, ot = 3, st = 4, ct = 200, lt = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, attachButton: a, stopLabel: o = "Stop recording", discardLabel: s = "Discard recording", processingLabel: l = "Transcribing audio…", style: u, className: d, embedded: f = !1 }) => {
1021
+ let h = z(null), g = z(new Float32Array(ct)), y = z(0), b = z(0), x = e === Le.Recording, S = e === Le.Error, C = e === Le.Processing, w = I((e) => {
1022
1022
  let t = e.getContext("2d");
1023
1023
  if (!t) return;
1024
1024
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
1025
1025
  let { width: n, height: r } = e;
1026
1026
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
1027
- let i = Math.min(Math.max(1, Math.floor(n / st)), q - 1), a = y.current, o = b.current;
1027
+ let i = Math.min(Math.max(1, Math.floor(n / st)), ct - 1), a = y.current, o = b.current;
1028
1028
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
1029
1029
  for (let e = 0; e <= i; e++) {
1030
- let n = ((a - i + e) % q + q) % q, o = g.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
1030
+ let n = ((a - i + e) % ct + ct) % ct, o = g.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
1031
1031
  t.fillRect(e * st, (r - c) / 2, ot, c);
1032
1032
  }
1033
1033
  t.restore();
@@ -1049,7 +1049,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1049
1049
  let r = (t[e] - 128) / 128;
1050
1050
  n += r * r;
1051
1051
  }
1052
- g.current[y.current % q] = Math.sqrt(n / t.length), y.current++;
1052
+ g.current[y.current % ct] = Math.sqrt(n / t.length), y.current++;
1053
1053
  }
1054
1054
  }
1055
1055
  w(e), n = requestAnimationFrame(r);
@@ -1129,28 +1129,29 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1129
1129
  })
1130
1130
  })]
1131
1131
  });
1132
- }, lt = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message" }) => /* @__PURE__ */ U(T, {
1132
+ }, ut = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", sendTooltip: r }) => /* @__PURE__ */ U(T, {
1133
1133
  "aria-label": n,
1134
1134
  onClick: () => e?.(),
1135
1135
  disabled: t,
1136
- icon: /* @__PURE__ */ U(oe, {
1136
+ tooltipProps: r ? { tooltip: r } : void 0,
1137
+ icon: /* @__PURE__ */ U(ie, {
1137
1138
  size: p.LG,
1138
1139
  className: "rtl:scale-x-[-1]",
1139
1140
  stroke: m
1140
1141
  })
1141
- }), ut = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ U(j, {
1142
+ }), dt = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ U(j, {
1142
1143
  icon: /* @__PURE__ */ U(ue, {
1143
1144
  size: p.LG,
1144
1145
  stroke: m
1145
1146
  }),
1146
1147
  onClick: () => e?.(),
1147
1148
  "aria-label": t
1148
- }), dt = ({ size: e = 20 }) => /* @__PURE__ */ U(k, {
1149
+ }), ft = ({ size: e = 20 }) => /* @__PURE__ */ U(k, {
1149
1150
  variant: ee.Circular,
1150
1151
  width: e,
1151
1152
  height: e,
1152
1153
  active: !0
1153
- }), ft = ({ loadingLabel: e }) => /* @__PURE__ */ W("span", {
1154
+ }), pt = ({ loadingLabel: e }) => /* @__PURE__ */ W("span", {
1154
1155
  className: "flex min-w-0 flex-1 items-center",
1155
1156
  children: [/* @__PURE__ */ U(k, {
1156
1157
  variant: ee.Text,
@@ -1161,24 +1162,24 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1161
1162
  className: "sr-only",
1162
1163
  children: e
1163
1164
  })]
1164
- }), pt = ({ loadingLabel: e }) => /* @__PURE__ */ U("div", {
1165
+ }), mt = ({ loadingLabel: e }) => /* @__PURE__ */ U("div", {
1165
1166
  role: "status",
1166
1167
  "aria-label": e,
1167
1168
  children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ W("div", {
1168
1169
  className: "flex h-11 items-center gap-3 px-4",
1169
1170
  "aria-hidden": "true",
1170
- children: [/* @__PURE__ */ U(dt, {}), /* @__PURE__ */ U(ft, {})]
1171
+ children: [/* @__PURE__ */ U(ft, {}), /* @__PURE__ */ U(pt, {})]
1171
1172
  }, t))
1172
- }), J = (e) => e.displayName ?? e.id, Y = (e, t) => {
1173
+ }), ht = (e) => e.displayName ?? e.id, gt = (e, t) => {
1173
1174
  let n = t.trim().toLowerCase();
1174
- return n ? e.filter((e) => J(e).toLowerCase().includes(n)) : e;
1175
- }, mt = (e, t, r, i = 18, a) => /* @__PURE__ */ U(n, {
1175
+ return n ? e.filter((e) => ht(e).toLowerCase().includes(n)) : e;
1176
+ }, q = (e, t, r, i = 18, a) => /* @__PURE__ */ U(n, {
1176
1177
  src: e,
1177
1178
  size: i,
1178
1179
  labels: { tooltip: a },
1179
1180
  initialsName: r
1180
- }), ht = { searchHeader: "_searchHeader_1728o_1" }, gt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = ht.searchHeader, colors: a }) => {
1181
- let [o, l] = V(""), u = z(() => e?.find((e) => e.id === t), [e, t]), d = r?.loading !== void 0, f = !d && !u && !!t, m = z(() => d ? /* @__PURE__ */ U(dt, { size: p.LG }) : mt(u?.iconUrl, u?.type, u?.displayName ?? u?.id ?? "", p.LG, f ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1181
+ }), J = { searchHeader: "_searchHeader_1728o_1" }, _t = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = J.searchHeader, colors: a }) => {
1182
+ let [o, l] = B(""), u = R(() => e?.find((e) => e.id === t), [e, t]), d = r?.loading !== void 0, f = !d && !u && !!t, m = R(() => d ? /* @__PURE__ */ U(ft, { size: p.LG }) : q(u?.iconUrl, u?.type, u?.displayName ?? u?.id ?? "", p.LG, f ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1182
1183
  d,
1183
1184
  u,
1184
1185
  f,
@@ -1189,11 +1190,11 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1189
1190
  selectorAriaLabel: h ? `${r?.ariaLabel ?? "Select model"}: ${h}` : r?.ariaLabel ?? "Select model",
1190
1191
  selectedLabel: h,
1191
1192
  selectedVersion: _,
1192
- menuItems: z(() => {
1193
+ menuItems: R(() => {
1193
1194
  if (d) return Array.from({ length: 7 }, (e, t) => ({
1194
1195
  key: `__loading-${t}`,
1195
- icon: /* @__PURE__ */ U(dt, {}),
1196
- label: /* @__PURE__ */ U(ft, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1196
+ icon: /* @__PURE__ */ U(ft, {}),
1197
+ label: /* @__PURE__ */ U(pt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1197
1198
  disabled: !0
1198
1199
  }));
1199
1200
  if (!e || e.length === 0) {
@@ -1204,14 +1205,14 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1204
1205
  disabled: !0
1205
1206
  }] : [];
1206
1207
  }
1207
- return Y(e, o).map((e) => ({
1208
+ return gt(e, o).map((e) => ({
1208
1209
  key: e.id,
1209
1210
  label: /* @__PURE__ */ U(y, {
1210
- text: J(e),
1211
+ text: ht(e),
1211
1212
  query: o,
1212
1213
  maxLines: 1
1213
1214
  }),
1214
- icon: mt(e.iconUrl, e.type, e.displayName ?? e.id),
1215
+ icon: q(e.iconUrl, e.type, e.displayName ?? e.id),
1215
1216
  mark: b.Check,
1216
1217
  checked: e.id === t,
1217
1218
  onClick: () => n?.(e.id)
@@ -1224,7 +1225,7 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1224
1225
  r,
1225
1226
  n
1226
1227
  ]),
1227
- menuHeader: z(() => !d && e && e.length > 0 ? /* @__PURE__ */ U("div", {
1228
+ menuHeader: R(() => !d && e && e.length > 0 ? /* @__PURE__ */ U("div", {
1228
1229
  style: s({ "--ms-search-header-bg": a?.searchHeaderBackground }),
1229
1230
  className: c("sticky top-0 z-10 pb-1 pe-2 pt-2", i),
1230
1231
  children: /* @__PURE__ */ U(O, {
@@ -1246,8 +1247,8 @@ var Ce = "a[href], button:not([disabled]), input:not([disabled]), select:not([di
1246
1247
  e || l("");
1247
1248
  }
1248
1249
  };
1249
- }, _t = typeof window < "u" ? _e : L;
1250
- function vt(e) {
1250
+ }, vt = typeof window < "u" ? ve : L;
1251
+ function yt(e) {
1251
1252
  if (e !== void 0) switch (typeof e) {
1252
1253
  case "number": return e;
1253
1254
  case "string":
@@ -1255,15 +1256,15 @@ function vt(e) {
1255
1256
  break;
1256
1257
  }
1257
1258
  }
1258
- function X({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1259
- let { styleHeight: s, styleWidth: c } = z(() => ({
1260
- styleHeight: vt(o?.height),
1261
- styleWidth: vt(o?.width)
1262
- }), [o?.height, o?.width]), [l, u] = V({
1259
+ function bt({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1260
+ let { styleHeight: s, styleWidth: c } = R(() => ({
1261
+ styleHeight: yt(o?.height),
1262
+ styleWidth: yt(o?.width)
1263
+ }), [o?.height, o?.width]), [l, u] = B({
1263
1264
  height: t,
1264
1265
  width: n
1265
1266
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
1266
- return _t(() => {
1267
+ return vt(() => {
1267
1268
  if (i === null || d) return;
1268
1269
  let t = new ResizeObserver((e) => {
1269
1270
  for (let t of e) {
@@ -1283,7 +1284,7 @@ function X({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i,
1283
1284
  i,
1284
1285
  s,
1285
1286
  c
1286
- ]), z(() => ({
1287
+ ]), R(() => ({
1287
1288
  height: s ?? l.height,
1288
1289
  width: c ?? l.width
1289
1290
  }), [
@@ -1292,26 +1293,26 @@ function X({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i,
1292
1293
  c
1293
1294
  ]);
1294
1295
  }
1295
- function Z(e) {
1296
- let t = B(() => {
1296
+ function xt(e) {
1297
+ let t = z(() => {
1297
1298
  throw Error("Cannot call during render.");
1298
1299
  });
1299
- return _t(() => {
1300
+ return vt(() => {
1300
1301
  t.current = e;
1301
1302
  }, [e]), I((e) => t.current?.(e), [t]);
1302
1303
  }
1303
- var Q = null;
1304
- function yt(e = !1) {
1305
- if (Q === null || e) {
1304
+ var Y = null;
1305
+ function X(e = !1) {
1306
+ if (Y === null || e) {
1306
1307
  let e = document.createElement("div"), t = e.style;
1307
1308
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
1308
1309
  let n = document.createElement("div"), r = n.style;
1309
- return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? Q = "positive-descending" : (e.scrollLeft = 1, Q = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), Q;
1310
+ return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? Y = "positive-descending" : (e.scrollLeft = 1, Y = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), Y;
1310
1311
  }
1311
- return Q;
1312
+ return Y;
1312
1313
  }
1313
- function bt({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1314
- if (t === "horizontal" && n) switch (yt()) {
1314
+ function Z({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1315
+ if (t === "horizontal" && n) switch (X()) {
1315
1316
  case "negative": return -r;
1316
1317
  case "positive-descending":
1317
1318
  if (e) {
@@ -1322,26 +1323,26 @@ function bt({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1322
1323
  }
1323
1324
  return r;
1324
1325
  }
1325
- function $(e, t = "Assertion error") {
1326
+ function Q(e, t = "Assertion error") {
1326
1327
  if (!e) throw console.error(t), Error(t);
1327
1328
  }
1328
- function xt(e, t) {
1329
+ function St(e, t) {
1329
1330
  if (e === t) return !0;
1330
- if (!!e != !!t || ($(e !== void 0), $(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1331
+ if (!!e != !!t || (Q(e !== void 0), Q(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1331
1332
  for (let n in e) if (!Object.is(t[n], e[n])) return !1;
1332
1333
  return !0;
1333
1334
  }
1334
- function St({ cachedBounds: e, itemCount: t, itemSize: n }) {
1335
+ function Ct({ cachedBounds: e, itemCount: t, itemSize: n }) {
1335
1336
  if (t === 0) return 0;
1336
1337
  if (typeof n == "number") return t * n;
1337
1338
  {
1338
1339
  let n = e.get(e.size === 0 ? 0 : e.size - 1);
1339
- return $(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1340
+ return Q(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1340
1341
  }
1341
1342
  }
1342
- function Ct({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1343
+ function wt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1343
1344
  if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
1344
- let s = St({
1345
+ let s = Ct({
1345
1346
  cachedBounds: t,
1346
1347
  itemCount: r,
1347
1348
  itemSize: i
@@ -1353,7 +1354,7 @@ function Ct({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, co
1353
1354
  default: return a >= u && a <= l ? a : a < u ? u : l;
1354
1355
  }
1355
1356
  }
1356
- function wt({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1357
+ function Tt({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1357
1358
  let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
1358
1359
  for (; u < a;) {
1359
1360
  let n = e.get(u);
@@ -1372,11 +1373,11 @@ function wt({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
1372
1373
  stopIndexOverscan: l
1373
1374
  };
1374
1375
  }
1375
- function Tt({ itemCount: e, itemProps: t, itemSize: n }) {
1376
+ function Et({ itemCount: e, itemProps: t, itemSize: n }) {
1376
1377
  let r = /* @__PURE__ */ new Map();
1377
1378
  return {
1378
1379
  get(i) {
1379
- for ($(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1380
+ for (Q(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1380
1381
  let e = r.size, a;
1381
1382
  switch (typeof n) {
1382
1383
  case "function":
@@ -1392,14 +1393,14 @@ function Tt({ itemCount: e, itemProps: t, itemSize: n }) {
1392
1393
  });
1393
1394
  else {
1394
1395
  let t = r.get(e - 1);
1395
- $(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1396
+ Q(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1396
1397
  scrollOffset: t.scrollOffset + t.size,
1397
1398
  size: a
1398
1399
  });
1399
1400
  }
1400
1401
  }
1401
1402
  let a = r.get(i);
1402
- return $(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1403
+ return Q(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1403
1404
  },
1404
1405
  set(e, t) {
1405
1406
  r.set(e, t);
@@ -1409,8 +1410,8 @@ function Tt({ itemCount: e, itemProps: t, itemSize: n }) {
1409
1410
  }
1410
1411
  };
1411
1412
  }
1412
- function Et({ itemCount: e, itemProps: t, itemSize: n }) {
1413
- return z(() => Tt({
1413
+ function Dt({ itemCount: e, itemProps: t, itemSize: n }) {
1414
+ return R(() => Et({
1414
1415
  itemCount: e,
1415
1416
  itemProps: t,
1416
1417
  itemSize: n
@@ -1420,11 +1421,11 @@ function Et({ itemCount: e, itemProps: t, itemSize: n }) {
1420
1421
  n
1421
1422
  ]);
1422
1423
  }
1423
- function Dt({ containerSize: e, itemSize: t }) {
1424
+ function Ot({ containerSize: e, itemSize: t }) {
1424
1425
  let n;
1425
1426
  switch (typeof t) {
1426
1427
  case "string":
1427
- $(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), $(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1428
+ Q(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), Q(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
1428
1429
  break;
1429
1430
  default:
1430
1431
  n = t;
@@ -1432,21 +1433,21 @@ function Dt({ containerSize: e, itemSize: t }) {
1432
1433
  }
1433
1434
  return n;
1434
1435
  }
1435
- function Ot({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1436
- let { height: u = n, width: d = n } = X({
1436
+ function kt({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1437
+ let { height: u = n, width: d = n } = bt({
1437
1438
  defaultHeight: r === "vertical" ? n : void 0,
1438
1439
  defaultWidth: r === "horizontal" ? n : void 0,
1439
1440
  element: e,
1440
1441
  mode: r === "vertical" ? "only-height" : "only-width",
1441
1442
  style: t
1442
- }), f = B({
1443
+ }), f = z({
1443
1444
  height: 0,
1444
1445
  width: 0
1445
- }), p = r === "vertical" ? u : d, m = Dt({
1446
+ }), p = r === "vertical" ? u : d, m = Ot({
1446
1447
  containerSize: p,
1447
1448
  itemSize: s
1448
1449
  });
1449
- _e(() => {
1450
+ ve(() => {
1450
1451
  if (typeof c == "function") {
1451
1452
  let e = f.current;
1452
1453
  (e.height !== u || e.width !== d) && (c({
@@ -1459,11 +1460,11 @@ function Ot({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1459
1460
  c,
1460
1461
  d
1461
1462
  ]);
1462
- let h = Et({
1463
+ let h = Dt({
1463
1464
  itemCount: a,
1464
1465
  itemProps: o,
1465
1466
  itemSize: m
1466
- }), g = I((e) => h.get(e), [h]), [_, v] = V(() => wt({
1467
+ }), g = I((e) => h.get(e), [h]), [_, v] = B(() => Tt({
1467
1468
  cachedBounds: h,
1468
1469
  containerScrollOffset: 0,
1469
1470
  containerSize: p,
@@ -1474,7 +1475,7 @@ function Ot({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1474
1475
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
1475
1476
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
1476
1477
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
1477
- }, C = I(() => St({
1478
+ }, C = I(() => Ct({
1478
1479
  cachedBounds: h,
1479
1480
  itemCount: a,
1480
1481
  itemSize: m
@@ -1482,9 +1483,9 @@ function Ot({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1482
1483
  h,
1483
1484
  a,
1484
1485
  m
1485
- ]), w = I((t) => wt({
1486
+ ]), w = I((t) => Tt({
1486
1487
  cachedBounds: h,
1487
- containerScrollOffset: bt({
1488
+ containerScrollOffset: Z({
1488
1489
  containerElement: e,
1489
1490
  direction: r,
1490
1491
  isRtl: i,
@@ -1502,19 +1503,19 @@ function Ot({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1502
1503
  a,
1503
1504
  l
1504
1505
  ]);
1505
- return _t(() => {
1506
+ return vt(() => {
1506
1507
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
1507
1508
  }, [
1508
1509
  e,
1509
1510
  r,
1510
1511
  w
1511
- ]), _t(() => {
1512
+ ]), vt(() => {
1512
1513
  if (!e) return;
1513
1514
  let t = () => {
1514
1515
  v((t) => {
1515
- let { scrollLeft: n, scrollTop: o } = e, s = wt({
1516
+ let { scrollLeft: n, scrollTop: o } = e, s = Tt({
1516
1517
  cachedBounds: h,
1517
- containerScrollOffset: bt({
1518
+ containerScrollOffset: Z({
1518
1519
  containerElement: e,
1519
1520
  direction: r,
1520
1521
  isRtl: i,
@@ -1524,7 +1525,7 @@ function Ot({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1524
1525
  itemCount: a,
1525
1526
  overscanCount: l
1526
1527
  });
1527
- return xt(s, t) ? t : s;
1528
+ return St(s, t) ? t : s;
1528
1529
  });
1529
1530
  };
1530
1531
  return e.addEventListener("scroll", t), () => {
@@ -1540,8 +1541,8 @@ function Ot({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1540
1541
  ]), {
1541
1542
  getCellBounds: g,
1542
1543
  getEstimatedSize: C,
1543
- scrollToIndex: Z(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1544
- let s = Ct({
1544
+ scrollToIndex: xt(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1545
+ let s = wt({
1545
1546
  align: t,
1546
1547
  cachedBounds: h,
1547
1548
  containerScrollOffset: n,
@@ -1551,14 +1552,14 @@ function Ot({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1551
1552
  itemSize: m
1552
1553
  });
1553
1554
  if (e) {
1554
- if (s = bt({
1555
+ if (s = Z({
1555
1556
  containerElement: e,
1556
1557
  direction: r,
1557
1558
  isRtl: i,
1558
1559
  scrollOffset: s
1559
1560
  }), typeof e.scrollTo != "function") {
1560
1561
  let e = w(s);
1561
- xt(_, e) || v(e);
1562
+ St(_, e) || v(e);
1562
1563
  }
1563
1564
  return s;
1564
1565
  }
@@ -1569,30 +1570,30 @@ function Ot({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1569
1570
  stopIndexVisible: x
1570
1571
  };
1571
1572
  }
1572
- function kt(e) {
1573
- return z(() => e, Object.values(e));
1573
+ function At(e) {
1574
+ return R(() => e, Object.values(e));
1574
1575
  }
1575
- function At(e, t) {
1576
+ function jt(e, t) {
1576
1577
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
1577
- return xt(n, a) && xt(r, o) && xt(i, s);
1578
+ return St(n, a) && St(r, o) && St(i, s);
1578
1579
  }
1579
- function jt(e) {
1580
+ function Mt(e) {
1580
1581
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
1581
1582
  }
1582
- var Mt = "data-react-window-index";
1583
- function Nt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
1584
- let m = kt(u), h = z(() => ge(s, At), [s]), [g, _] = V(null), v = jt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = Ot({
1583
+ var Nt = "data-react-window-index";
1584
+ function Pt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowProps: u, tagName: d = "div", style: f, ...p }) {
1585
+ let m = At(u), h = R(() => ge(s, jt), [s]), [g, _] = B(null), v = Mt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = kt({
1585
1586
  containerElement: g,
1586
1587
  containerStyle: f,
1587
1588
  defaultContainerSize: n,
1588
1589
  direction: "vertical",
1589
1590
  itemCount: c,
1590
1591
  itemProps: m,
1591
- itemSize: z(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1592
+ itemSize: R(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1592
1593
  onResize: i,
1593
1594
  overscanCount: o
1594
1595
  });
1595
- R(r, () => ({
1596
+ _e(r, () => ({
1596
1597
  get element() {
1597
1598
  return g;
1598
1599
  },
@@ -1607,12 +1608,12 @@ function Nt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1607
1608
  top: r
1608
1609
  });
1609
1610
  }
1610
- }), [g, x]), _t(() => {
1611
+ }), [g, x]), vt(() => {
1611
1612
  if (!g) return;
1612
1613
  let e = Array.from(g.children).filter((e, t) => {
1613
1614
  if (e.hasAttribute("aria-hidden")) return !1;
1614
1615
  let n = `${S + t}`;
1615
- return e.setAttribute(Mt, n), !0;
1616
+ return e.setAttribute(Nt, n), !0;
1616
1617
  });
1617
1618
  if (v) return l.observeRowElements(e);
1618
1619
  }, [
@@ -1636,7 +1637,7 @@ function Nt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1636
1637
  w,
1637
1638
  T
1638
1639
  ]);
1639
- let E = z(() => {
1640
+ let E = R(() => {
1640
1641
  let e = [];
1641
1642
  if (c > 0) for (let t = S; t <= w; t++) {
1642
1643
  let n = y(t);
@@ -1689,23 +1690,23 @@ function Nt({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1689
1690
  }
1690
1691
  }, E, e, D);
1691
1692
  }
1692
- var Pt = {
1693
+ var Ft = {
1693
1694
  divider: "_divider_1tiyp_1",
1694
1695
  item: "_item_1tiyp_5",
1695
1696
  itemIcon: "_itemIcon_1tiyp_15",
1696
1697
  checkIcon: "_checkIcon_1tiyp_19",
1697
1698
  stateLabel: "_stateLabel_1tiyp_23"
1698
- }, Ft = 44, It = 8, Lt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, onSelect: s }) => {
1699
- let l = r[e], u = mt(l.iconUrl, l.type, l.displayName ?? l.id, p.SM), f = l.id === i;
1699
+ }, It = 44, Lt = 8, Rt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: o, onSelect: s }) => {
1700
+ let l = r[e], u = q(l.iconUrl, l.type, l.displayName ?? l.id, p.SM), f = l.id === i;
1700
1701
  return /* @__PURE__ */ U("div", {
1701
1702
  style: t,
1702
1703
  ...n,
1703
1704
  children: /* @__PURE__ */ U(d, {
1704
1705
  type: "button",
1705
1706
  "aria-current": f ? "true" : void 0,
1706
- className: c(Pt.item, "h-full w-full gap-3 px-4"),
1707
+ className: c(Ft.item, "h-full w-full gap-3 px-4"),
1707
1708
  iconBefore: /* @__PURE__ */ U("span", {
1708
- className: Pt.itemIcon,
1709
+ className: Ft.itemIcon,
1709
1710
  children: u
1710
1711
  }),
1711
1712
  label: /* @__PURE__ */ W("span", {
@@ -1715,9 +1716,9 @@ var Pt = {
1715
1716
  query: o,
1716
1717
  maxLines: 1,
1717
1718
  className: c(a, "min-w-0 flex-1 text-start")
1718
- }), f && /* @__PURE__ */ U(M, {
1719
+ }), f && /* @__PURE__ */ U(ae, {
1719
1720
  size: p.SM,
1720
- className: Pt.checkIcon,
1721
+ className: Ft.checkIcon,
1721
1722
  "aria-hidden": !0,
1722
1723
  stroke: m
1723
1724
  })]
@@ -1725,12 +1726,12 @@ var Pt = {
1725
1726
  onClick: () => s(l.id)
1726
1727
  })
1727
1728
  });
1728
- }, Rt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: _ }) => {
1729
- let [v, y] = V("");
1729
+ }, zt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: _ }) => {
1730
+ let [v, y] = B("");
1730
1731
  L(() => {
1731
1732
  e || y("");
1732
1733
  }, [e]);
1733
- let b = a && a.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? Y(a, v) : [], w = (e) => {
1734
+ let b = a && a.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? gt(a, v) : [], w = (e) => {
1734
1735
  l(e), i();
1735
1736
  }, T = s({
1736
1737
  "--ci-sheet-divider": _?.divider,
@@ -1760,17 +1761,17 @@ var Pt = {
1760
1761
  size: g.Standard,
1761
1762
  onChange: (e) => y(e ?? "")
1762
1763
  })
1763
- }), /* @__PURE__ */ U("div", { className: c(Pt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ U(pt, { loadingLabel: u }) : S ? /* @__PURE__ */ U("div", {
1764
+ }), /* @__PURE__ */ U("div", { className: c(Ft.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ U(mt, { loadingLabel: u }) : S ? /* @__PURE__ */ U("div", {
1764
1765
  role: "list",
1765
- className: c(Pt.stateLabel, h, "px-4 py-4"),
1766
+ className: c(Ft.stateLabel, h, "px-4 py-4"),
1766
1767
  children: S
1767
- }) : /* @__PURE__ */ U(Nt, {
1768
+ }) : /* @__PURE__ */ U(Pt, {
1768
1769
  role: "list",
1769
1770
  className: "overflow-y-auto",
1770
- style: { height: Math.min(C.length, It) * Ft },
1771
- rowComponent: Lt,
1771
+ style: { height: Math.min(C.length, Lt) * It },
1772
+ rowComponent: Rt,
1772
1773
  rowCount: C.length,
1773
- rowHeight: Ft,
1774
+ rowHeight: It,
1774
1775
  rowProps: {
1775
1776
  items: C,
1776
1777
  selectedDeploymentId: o,
@@ -1781,21 +1782,21 @@ var Pt = {
1781
1782
  })]
1782
1783
  })
1783
1784
  });
1784
- }, zt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: l, modelPickerOverlay: u, isPickerOpen: d, onPickerToggle: f, onPickerOpenChange: g }) => {
1785
- let [_, y] = V(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, selectedVersion: C, menuItems: w, menuHeader: T, onOpenChange: E } = gt({
1785
+ }, Bt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: l, modelPickerOverlay: u, isPickerOpen: d, onPickerToggle: f, onPickerOpenChange: g }) => {
1786
+ let [_, y] = B(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, selectedVersion: C, menuItems: w, menuHeader: T, onOpenChange: E } = _t({
1786
1787
  deployments: e,
1787
1788
  selectedDeploymentId: t,
1788
1789
  onDeploymentChange: n,
1789
1790
  modelSelectorLabels: r
1790
1791
  });
1791
1792
  if (!e) return null;
1792
- let D = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, O = /* @__PURE__ */ U(N, {
1793
+ let D = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, O = /* @__PURE__ */ U(P, {
1793
1794
  size: p.SM,
1794
1795
  className: K.modelSelectorCaret,
1795
1796
  "aria-hidden": !0,
1796
1797
  stroke: m
1797
1798
  });
1798
- return a ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(ie, {
1799
+ return a ? /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(N, {
1799
1800
  tooltip: S,
1800
1801
  children: /* @__PURE__ */ U(v, {
1801
1802
  icon: /* @__PURE__ */ W("div", {
@@ -1815,7 +1816,7 @@ var Pt = {
1815
1816
  onClose: () => y(!1),
1816
1817
  style: l,
1817
1818
  children: u(() => y(!1))
1818
- }) : /* @__PURE__ */ U(Rt, {
1819
+ }) : /* @__PURE__ */ U(zt, {
1819
1820
  isOpen: _,
1820
1821
  title: r?.ariaLabel ?? "Select model",
1821
1822
  closeLabel: r?.closeLabel ?? "Close",
@@ -1837,7 +1838,7 @@ var Pt = {
1837
1838
  outsideClosable: !0,
1838
1839
  renderOverlay: () => u(() => g?.(!1)),
1839
1840
  listClassName: "!w-[368px] !bg-layer-raised",
1840
- children: /* @__PURE__ */ U(ie, {
1841
+ children: /* @__PURE__ */ U(N, {
1841
1842
  tooltip: C ? `${S} · ${C}` : S,
1842
1843
  children: /* @__PURE__ */ W("button", {
1843
1844
  type: "button",
@@ -1875,7 +1876,7 @@ var Pt = {
1875
1876
  listClassName: "!w-[240px]",
1876
1877
  disabled: s,
1877
1878
  onOpenChange: s ? void 0 : E,
1878
- children: /* @__PURE__ */ U(ie, {
1879
+ children: /* @__PURE__ */ U(N, {
1879
1880
  tooltip: S,
1880
1881
  children: /* @__PURE__ */ W("button", {
1881
1882
  type: "button",
@@ -1887,211 +1888,211 @@ var Pt = {
1887
1888
  })
1888
1889
  })
1889
1890
  });
1890
- }, Bt = ({ message: e = "", messageRevision: t, textInsertion: n, onSend: r, onUploadAttachment: i, onStop: a, isStreaming: o = !1, onChange: d, onAttachmentsChange: f, placeholder: g = "Type a message...", ariaLabel: _, attachLabel: y = "Attach file", fileAccept: b, addMenuTitle: x = "Add", menuTitle: S = "Menu", menuCloseLabel: C = "Close", removeLabel: w, retryLabel: T, uploadingLabel: E, sendLabel: D, stopLabel: O, micLabel: k = "Dictate", recordVoiceLabel: ee = "Record voice", stopRecordingLabel: A, discardRecordingLabel: te, colors: j, typography: ne, className: re, pendingDropFiles: ie = [], onDropFilesConsumed: ae, pendingAttachments: oe = [], onPendingAttachmentsConsumed: M, pasteTextThreshold: N = 4e3, maxMessageLength: P = 5e4, deployments: le, selectedDeploymentId: F, onDeploymentChange: ue, modelSelectorLabels: de, initialAttachments: fe = [], hideAddButton: pe = !1, hideAttachFile: me = !1, hideActionBar: he = !1, renderFooterActions: ge, isInputDisabled: R = !1, isModelSelectorDisabled: _e = !1, isSendDisabled: ve = !1, isAudioMessageSupported: be = !1, isVoiceRecordingSupported: xe = be, onTranscribeAudio: Ce, transcribingLabel: we, voiceErrorLabel: Te, sendOnEnter: Ee = We.Enter, prefixAttachments: De = [], onRemovePrefixAttachment: ke, chatSettings: je, toolsMenuItems: Me, onToolToggle: Fe, canRemoveTools: ze = !0, toolsMenuTitle: Be, toolsBackLabel: Ve, toolsChipLabels: He, menuOverlays: Ge, inlineStartSlot: Ke, onInlineStartRemove: qe, commandMenu: G, autoFocus: Je = !1, messageHistory: Ye, onDialFileSystemClick: Xe, dialFileSystemLabel: Ze, validateAttachment: Qe, onAttachmentClick: $e, modelPickerOverlay: et, maximumAttachmentsAmount: nt, onAttachmentsLimitExceeded: rt, isAttachmentsEnabled: at = !0, isTextAttachmentsAllowed: ot = !0, usageLimitsSlot: st, onMessageTooLong: q }) => {
1891
- let dt = l(), [ft, pt] = V(!1), J = Ne(Ye), Y = Ke != null, mt = B(null), [ht, gt] = V(0), _t = z(() => s({
1892
- "--ci-bg": j?.background,
1893
- "--ci-text": j?.text,
1894
- "--ci-border": j?.border,
1895
- "--ci-border-focus": j?.borderFocus,
1896
- "--ci-placeholder": j?.placeholder,
1897
- "--ci-text-disabled": j?.textDisabled,
1898
- "--ci-model-selector-caret-color": j?.modelSelectorCaret,
1899
- "--ci-model-selector-hover-bg": j?.modelSelectorHoverBg,
1900
- "--ci-model-selector-disabled-color": j?.modelSelectorDisabled,
1901
- "--ci-model-selector-name-color": j?.modelSelectorName,
1902
- "--ci-model-selector-version-color": j?.modelSelectorVersion,
1903
- "--ci-voice-error": j?.voiceError,
1904
- "--ci-voice-waveform": j?.voiceWaveform,
1905
- "--ci-voice-accent": j?.voiceAccent,
1906
- "--ci-first-line-indent": Y ? `calc(${ht}px + 4px)` : void 0
1891
+ }, Vt = ({ message: e = "", messageRevision: t, textInsertion: n, onSend: r, onUploadAttachment: i, onStop: a, isStreaming: o = !1, onChange: d, onAttachmentsChange: f, placeholder: g = "Type a message...", ariaLabel: y, attachLabel: b = "Attach file", fileAccept: x, addMenuTitle: S = "Add", menuTitle: C = "Menu", menuCloseLabel: w = "Close", removeLabel: T, retryLabel: E, uploadingLabel: D, sendLabel: O, sendTooltip: k, stopLabel: ee, micLabel: A = "Dictate", recordVoiceLabel: te = "Record voice", stopRecordingLabel: j, discardRecordingLabel: ne, colors: M, typography: N, className: re, pendingDropFiles: ie = [], onDropFilesConsumed: ae, pendingAttachments: P = [], onPendingAttachmentsConsumed: oe, pasteTextThreshold: le = 4e3, maxMessageLength: F = 5e4, deployments: ue, selectedDeploymentId: de, onDeploymentChange: fe, modelSelectorLabels: pe, initialAttachments: me = [], hideAddButton: he = !1, hideAttachFile: ge = !1, hideActionBar: _e = !1, renderFooterActions: ve, isInputDisabled: V = !1, isModelSelectorDisabled: be = !1, isSendDisabled: xe = !1, isAudioMessageSupported: Ce = !1, isVoiceRecordingSupported: we = Ce, onTranscribeAudio: Te, transcribingLabel: Ee, voiceErrorLabel: De, sendOnEnter: ke = We.Enter, prefixAttachments: je = [], onRemovePrefixAttachment: Me, chatSettings: Fe, toolsMenuItems: ze, onToolToggle: Be, canRemoveTools: Ve = !0, toolsMenuTitle: He, toolsBackLabel: Ge, toolsChipLabels: Ke, menuOverlays: qe, inlineStartSlot: Je, onInlineStartRemove: Ye, commandMenu: G, autoFocus: Xe = !1, messageHistory: Ze, onDialFileSystemClick: Qe, dialFileSystemLabel: $e, validateAttachment: et, onAttachmentClick: nt, modelPickerOverlay: rt, maximumAttachmentsAmount: at, onAttachmentsLimitExceeded: ot, isAttachmentsEnabled: st = !0, isTextAttachmentsAllowed: ct = !0, usageLimitsSlot: ft, onMessageTooLong: pt }) => {
1892
+ let mt = l(), [ht, gt] = B(!1), q = Ne(Ze), J = Je != null, _t = z(null), [vt, yt] = B(0), bt = R(() => s({
1893
+ "--ci-bg": M?.background,
1894
+ "--ci-text": M?.text,
1895
+ "--ci-border": M?.border,
1896
+ "--ci-border-focus": M?.borderFocus,
1897
+ "--ci-placeholder": M?.placeholder,
1898
+ "--ci-text-disabled": M?.textDisabled,
1899
+ "--ci-model-selector-caret-color": M?.modelSelectorCaret,
1900
+ "--ci-model-selector-hover-bg": M?.modelSelectorHoverBg,
1901
+ "--ci-model-selector-disabled-color": M?.modelSelectorDisabled,
1902
+ "--ci-model-selector-name-color": M?.modelSelectorName,
1903
+ "--ci-model-selector-version-color": M?.modelSelectorVersion,
1904
+ "--ci-voice-error": M?.voiceError,
1905
+ "--ci-voice-waveform": M?.voiceWaveform,
1906
+ "--ci-voice-accent": M?.voiceAccent,
1907
+ "--ci-first-line-indent": J ? `calc(${vt}px + 4px)` : void 0
1907
1908
  }), [
1908
- j,
1909
- Y,
1910
- ht
1911
- ]), vt = z(() => Xe ? [{
1909
+ M,
1910
+ J,
1911
+ vt
1912
+ ]), xt = R(() => Qe ? [{
1912
1913
  key: "dial-fs",
1913
- label: Ze ?? "DIAL file system",
1914
+ label: $e ?? "DIAL file system",
1914
1915
  icon: /* @__PURE__ */ U(se, {
1915
1916
  size: u,
1916
1917
  "aria-hidden": !0,
1917
1918
  stroke: m
1918
1919
  }),
1919
- onClick: Xe
1920
- }] : [], [Xe, Ze]), { message: X, setMessage: Z, textareaRef: Q } = Pe({
1920
+ onClick: Qe
1921
+ }] : [], [Qe, $e]), { message: Y, setMessage: X, textareaRef: Z } = Pe({
1921
1922
  messageProp: e,
1922
1923
  messageRevision: t
1923
1924
  });
1924
1925
  Ie({
1925
1926
  insertion: n,
1926
- textareaRef: Q
1927
+ textareaRef: Z
1927
1928
  });
1928
- let { isMenuOpen: yt, query: bt, dismiss: $, handleValueChange: xt } = Ae({
1929
+ let { isMenuOpen: Q, query: St, dismiss: Ct, handleValueChange: wt } = Ae({
1929
1930
  config: G,
1930
- message: X
1931
- }), St = G?.emptyQueryHint != null, Ct = St && yt && bt === "", wt = I((e) => {
1932
- if (G == null || ($(), !e?.consumeQuery)) return;
1933
- Q.current?.focus();
1934
- let t = `${G.triggerPrefix}${bt}`;
1935
- if (!X.startsWith(t)) return;
1936
- let n = X.slice(t.length);
1937
- Z(n), J.notifyChange(), d?.(n);
1931
+ message: Y
1932
+ }), Tt = G?.emptyQueryHint != null, Et = Tt && Q && St === "", Dt = I((e) => {
1933
+ if (G == null || (Ct(), !e?.consumeQuery)) return;
1934
+ Z.current?.focus();
1935
+ let t = `${G.triggerPrefix}${St}`;
1936
+ if (!Y.startsWith(t)) return;
1937
+ let n = Y.slice(t.length);
1938
+ X(n), q.notifyChange(), d?.(n);
1938
1939
  }, [
1939
1940
  G,
1940
- $,
1941
- bt,
1941
+ Ct,
1942
+ St,
1943
+ Y,
1942
1944
  X,
1943
- Z,
1944
- J,
1945
+ q,
1945
1946
  d,
1946
- Q
1947
+ Z
1947
1948
  ]);
1948
1949
  L(() => {
1949
- let e = mt.current;
1950
+ let e = _t.current;
1950
1951
  if (e == null) return;
1951
1952
  let t = new ResizeObserver((e) => {
1952
1953
  let t = e[0];
1953
- t != null && gt(t.contentRect.width);
1954
+ t != null && yt(t.contentRect.width);
1954
1955
  });
1955
1956
  return t.observe(e), () => t.disconnect();
1956
- }, [Y]);
1957
- let { attachments: Tt, buildAttachments: Et, addAttachments: Dt, resetAttachments: Ot, handleRemove: kt, handleRetry: At, handleExpand: jt, hasBlockedAttachments: Mt } = Oe({
1958
- initialAttachments: fe,
1957
+ }, [J]);
1958
+ let { attachments: Ot, buildAttachments: kt, addAttachments: At, resetAttachments: jt, handleRemove: Mt, handleRetry: Nt, handleExpand: Pt, hasBlockedAttachments: Ft } = Oe({
1959
+ initialAttachments: me,
1959
1960
  onUploadAttachment: i,
1960
1961
  onAttachmentsChange: f,
1961
- validateAttachment: Qe,
1962
+ validateAttachment: et,
1962
1963
  pendingDropFiles: ie,
1963
1964
  onDropFilesConsumed: ae,
1964
- pendingAttachments: oe,
1965
- onPendingAttachmentsConsumed: M,
1965
+ pendingAttachments: P,
1966
+ onPendingAttachmentsConsumed: oe,
1966
1967
  onExpandPastedText: I((e) => {
1967
- Z((t) => t ? `${t}\n${e}` : e);
1968
- }, [Z]),
1969
- maximumAttachmentsAmount: nt,
1970
- baseAttachmentsAmount: De.length,
1971
- onAttachmentsLimitExceeded: rt
1972
- }), Nt = I((e) => {
1973
- Dt(Et([e]));
1974
- }, [Dt, Et]), Pt = B(!1), Ft = B(X);
1975
- Ft.current = X;
1976
- let [It, Lt] = V({
1968
+ X((t) => t ? `${t}\n${e}` : e);
1969
+ }, [X]),
1970
+ maximumAttachmentsAmount: at,
1971
+ baseAttachmentsAmount: je.length,
1972
+ onAttachmentsLimitExceeded: ot
1973
+ }), It = I((e) => {
1974
+ At(kt([e]));
1975
+ }, [At, kt]), Lt = z(!1), Rt = z(Y);
1976
+ Rt.current = Y;
1977
+ let [zt, Vt] = B({
1977
1978
  text: "",
1978
1979
  revision: 0
1979
- }), { state: Rt, analyserNodeRef: Bt, errorMessage: Vt, startRecording: Ht, stopRecording: Ut, discardRecording: Wt } = Ue({
1980
- onAttachAudio: Nt,
1981
- onTranscribeAudio: Ce,
1980
+ }), { state: Ht, analyserNodeRef: Ut, errorMessage: Wt, startRecording: Gt, stopRecording: Kt, discardRecording: qt } = Ue({
1981
+ onAttachAudio: It,
1982
+ onTranscribeAudio: Te,
1982
1983
  onTranscript: I((e) => {
1983
1984
  let t = e.trim();
1984
1985
  if (t) {
1985
- let e = Ft.current, n = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
1986
- Ft.current = n, Z(n), Lt((e) => ({
1986
+ let e = Rt.current, n = `${e}${e && !/\s$/.test(e) ? " " : ""}${t}`;
1987
+ Rt.current = n, X(n), Vt((e) => ({
1987
1988
  text: t,
1988
1989
  revision: e.revision + 1
1989
- })), J.notifyChange(), d?.(n);
1990
+ })), q.notifyChange(), d?.(n);
1990
1991
  }
1991
- Pt.current = !0;
1992
+ Lt.current = !0;
1992
1993
  }, [
1993
- Z,
1994
- J,
1994
+ X,
1995
+ q,
1995
1996
  d
1996
1997
  ]),
1997
- errorLabel: Te
1998
- }), Gt = Rt !== Le.Idle;
1998
+ errorLabel: De
1999
+ }), $ = Ht === Le.Recording || Ht === Le.Processing;
1999
2000
  L(() => {
2000
- Rt === Le.Idle && Pt.current && (Pt.current = !1, Q.current?.focus());
2001
- }, [Rt, Q]);
2002
- let Kt = B(null), qt = B(null), Jt = at && ot, { handlePaste: Yt } = Se(Dt, Jt ? N : Infinity), Xt = I((e) => {
2003
- if (!Jt) {
2001
+ (Ht === Le.Error || Ht === Le.Idle && Lt.current) && (Lt.current = !1, Z.current?.focus());
2002
+ }, [Ht, Z]);
2003
+ let Jt = z(null), Yt = z(null), Xt = st && ct, { handlePaste: Zt } = Se(At, Xt ? le : Infinity), Qt = I((e) => {
2004
+ if (!Xt) {
2004
2005
  let t = e.clipboardData.getData("text/plain");
2005
- t.length >= P && q?.(t.length, P);
2006
+ t.length >= F && pt?.(t.length, F);
2006
2007
  }
2007
- Yt(e);
2008
+ Zt(e);
2008
2009
  }, [
2009
- Jt,
2010
- P,
2011
- q,
2012
- Yt
2013
- ]), Zt = (X.trim().length > 0 || Tt.length > 0 || Y) && !Mt && !ve && !Gt, [Qt, $t] = V([]);
2010
+ Xt,
2011
+ F,
2012
+ pt,
2013
+ Zt
2014
+ ]), $t = (Y.trim().length > 0 || Ot.length > 0 || J) && !Ft && !xe && !$, [en, tn] = B([]);
2014
2015
  L(() => {
2015
- $t([]);
2016
- }, [(Me ?? []).map((e) => e.id).join("|")]);
2017
- let en = z(() => {
2018
- let e = Me ?? [];
2019
- return ze ? e.filter((e) => e.isSelected || !Qt.includes(e.id)) : e;
2016
+ tn([]);
2017
+ }, [(ze ?? []).map((e) => e.id).join("|")]);
2018
+ let nn = R(() => {
2019
+ let e = ze ?? [];
2020
+ return Ve ? e.filter((e) => e.isSelected || !en.includes(e.id)) : e;
2020
2021
  }, [
2021
- Me,
2022
- Qt,
2023
- ze
2024
- ]), tn = I((e) => {
2025
- $t((t) => t.includes(e) ? t : [...t, e]), Me?.find((t) => t.id === e)?.isSelected && Fe?.(e);
2026
- }, [Me, Fe]), nn = le === void 0 || F != null, rn = be && !o, an = async () => {
2027
- if (ve || Gt) return;
2028
- if (X.length >= P) {
2029
- q?.(X.length, P);
2022
+ ze,
2023
+ en,
2024
+ Ve
2025
+ ]), rn = I((e) => {
2026
+ tn((t) => t.includes(e) ? t : [...t, e]), ze?.find((t) => t.id === e)?.isSelected && Be?.(e);
2027
+ }, [ze, Be]), an = ue === void 0 || de != null, on = Ce && !o, sn = async () => {
2028
+ if (xe || $) return;
2029
+ if (Y.length >= F) {
2030
+ pt?.(Y.length, F);
2030
2031
  return;
2031
2032
  }
2032
- let e = X, t = Tt;
2033
- Z(""), J.reset();
2033
+ let e = Y, t = Ot;
2034
+ X(""), q.reset();
2034
2035
  try {
2035
2036
  await r?.(e, t), t.forEach((e) => {
2036
2037
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
2037
- }), Ot([]);
2038
+ }), jt([]);
2038
2039
  } catch {
2039
- Z(e), Ot(t);
2040
+ X(e), jt(t);
2040
2041
  }
2041
- }, on = (e) => {
2042
- if (!Gt) {
2043
- if (!e.nativeEvent.isComposing && !R && !o) {
2042
+ }, cn = (e) => {
2043
+ if (!$) {
2044
+ if (!e.nativeEvent.isComposing && !V && !o) {
2044
2045
  if (e.key === "ArrowUp" || e.key === "ArrowDown") {
2045
- let t = e.currentTarget.selectionStart ?? 0, n = J.navigate(e.key === "ArrowUp" ? "up" : "down", X, t);
2046
+ let t = e.currentTarget.selectionStart ?? 0, n = q.navigate(e.key === "ArrowUp" ? "up" : "down", Y, t);
2046
2047
  if (n !== null) {
2047
- e.preventDefault(), Z(n);
2048
+ e.preventDefault(), X(n);
2048
2049
  return;
2049
2050
  }
2050
2051
  }
2051
- if (e.key === "Backspace" && Y && qe != null && e.currentTarget.selectionStart === 0 && e.currentTarget.selectionEnd === 0) {
2052
- e.preventDefault(), qe();
2052
+ if (e.key === "Backspace" && J && Ye != null && e.currentTarget.selectionStart === 0 && e.currentTarget.selectionEnd === 0) {
2053
+ e.preventDefault(), Ye();
2053
2054
  return;
2054
2055
  }
2055
2056
  }
2056
- e.key === "Enter" && (Ee === We.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !o && Zt && nn && !R && an());
2057
+ e.key === "Enter" && (ke === We.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !o && $t && an && !V && sn());
2057
2058
  }
2058
- }, sn = (e) => {
2059
+ }, ln = (e) => {
2059
2060
  let t = Array.from(e.target.files ?? []);
2060
2061
  if (t.length === 0) return;
2061
- let n = Et(t);
2062
- e.target.value = "", Dt(n);
2063
- }, cn = /* @__PURE__ */ U("textarea", {
2064
- className: c(K.textarea, Y && K.textareaIndented, ne?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]", "disabled:cursor-not-allowed"),
2065
- ref: Q,
2066
- autoFocus: Je,
2067
- value: X,
2062
+ let n = kt(t);
2063
+ e.target.value = "", At(n);
2064
+ }, un = /* @__PURE__ */ U("textarea", {
2065
+ className: c(K.textarea, J && K.textareaIndented, N?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]", "disabled:cursor-not-allowed"),
2066
+ ref: Z,
2067
+ autoFocus: Xe,
2068
+ value: Y,
2068
2069
  onChange: (e) => {
2069
- Z(e.target.value), J.notifyChange();
2070
+ X(e.target.value), q.notifyChange();
2070
2071
  let t = e.nativeEvent instanceof InputEvent ? e.nativeEvent : void 0;
2071
- xt(e.target.value, t?.isComposing ?? !1, t?.inputType), d?.(e.target.value);
2072
+ wt(e.target.value, t?.isComposing ?? !1, t?.inputType), d?.(e.target.value);
2072
2073
  },
2073
- onKeyDown: on,
2074
- onPaste: Xt,
2075
- placeholder: Y ? void 0 : g,
2076
- "aria-label": _,
2077
- disabled: R,
2078
- readOnly: Gt,
2074
+ onKeyDown: cn,
2075
+ onPaste: Qt,
2076
+ placeholder: J ? void 0 : g,
2077
+ "aria-label": y,
2078
+ disabled: V,
2079
+ readOnly: $,
2079
2080
  rows: 1
2080
- }), ln = G == null ? cn : /* @__PURE__ */ U(h, {
2081
+ }), dn = G == null ? un : /* @__PURE__ */ U(h, {
2081
2082
  className: "w-full",
2082
- open: yt,
2083
+ open: Q,
2083
2084
  onOpenChange: (e) => {
2084
- e || $();
2085
+ e || Ct();
2085
2086
  },
2086
2087
  placement: "top-start",
2087
2088
  trigger: [],
2088
2089
  initialFocus: -1,
2089
2090
  matchReferenceWidth: !1,
2090
- outsidePressIgnoreRef: Q,
2091
+ outsidePressIgnoreRef: Z,
2091
2092
  renderOverlay: () => {
2092
2093
  let e = G.renderMenu({
2093
- query: bt,
2094
- close: wt
2094
+ query: St,
2095
+ close: Dt
2095
2096
  });
2096
2097
  return G.menuLabel == null ? e : /* @__PURE__ */ U("div", {
2097
2098
  role: "group",
@@ -2099,149 +2100,154 @@ var Pt = {
2099
2100
  children: e
2100
2101
  });
2101
2102
  },
2102
- children: cn
2103
- }), un = Y || St ? /* @__PURE__ */ W("div", {
2103
+ children: un
2104
+ }), fn = J || Tt ? /* @__PURE__ */ W("div", {
2104
2105
  className: "relative w-full",
2105
2106
  children: [
2106
- Y && /* @__PURE__ */ U("div", {
2107
- ref: mt,
2107
+ J && /* @__PURE__ */ U("div", {
2108
+ ref: _t,
2108
2109
  className: "absolute start-0 top-0",
2109
- children: Ke
2110
+ children: Je
2110
2111
  }),
2111
- Ct && G != null && /* @__PURE__ */ W("span", {
2112
- className: c(K.commandHint, "pointer-events-none absolute start-[var(--ci-first-line-indent,0px)] top-0", ne?.fontClassName || "dial-body-paragraph-text"),
2112
+ Et && G != null && /* @__PURE__ */ W("span", {
2113
+ className: c(K.commandHint, "pointer-events-none absolute start-[var(--ci-first-line-indent,0px)] top-0", N?.fontClassName || "dial-body-paragraph-text"),
2113
2114
  "aria-hidden": !0,
2114
2115
  children: [/* @__PURE__ */ U("span", {
2115
2116
  className: "invisible",
2116
2117
  children: G.triggerPrefix
2117
2118
  }), G.emptyQueryHint]
2118
2119
  }),
2119
- ln
2120
+ dn
2120
2121
  ]
2121
- }) : ln, dn = pe ? void 0 : /* @__PURE__ */ U(tt, {
2122
- onAttachClick: me ? void 0 : () => Kt.current?.click(),
2123
- attachLabel: y,
2124
- addMenuTitle: x,
2125
- menuTitle: S,
2126
- menuCloseLabel: C,
2127
- style: _t,
2128
- isDisabled: R || Gt && Rt !== Le.Recording,
2129
- chatSettings: je,
2130
- extraMenuItems: vt,
2131
- onRecordVoice: xe && at && !o && !Gt ? () => Ht(Re.Attachment) : void 0,
2132
- recordVoiceLabel: ee,
2133
- toolsMenuItems: ze ? Me : void 0,
2134
- onToolToggle: Fe,
2135
- toolsMenuTitle: Be,
2136
- toolsBackLabel: Ve,
2137
- menuOverlays: Ge
2122
+ }) : dn, pn = he ? void 0 : /* @__PURE__ */ U(tt, {
2123
+ onAttachClick: ge ? void 0 : () => Jt.current?.click(),
2124
+ attachLabel: b,
2125
+ addMenuTitle: S,
2126
+ menuTitle: C,
2127
+ menuCloseLabel: w,
2128
+ style: bt,
2129
+ isDisabled: V || $,
2130
+ chatSettings: Fe,
2131
+ extraMenuItems: xt,
2132
+ onRecordVoice: we && st && !o && !$ ? () => Gt(Re.Attachment) : void 0,
2133
+ recordVoiceLabel: te,
2134
+ toolsMenuItems: Ve ? ze : void 0,
2135
+ onToolToggle: Be,
2136
+ toolsMenuTitle: He,
2137
+ toolsBackLabel: Ge,
2138
+ menuOverlays: qe
2138
2139
  });
2139
2140
  return /* @__PURE__ */ W("div", {
2140
- ref: qt,
2141
- style: _t,
2142
- className: c(K.wrapper, R && K.wrapperDisabled, R && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", Tt.length > 6 ? "py-4 ps-4" : "p-4", re),
2141
+ ref: Yt,
2142
+ style: bt,
2143
+ className: c(K.wrapper, V && K.wrapperDisabled, V && "cursor-not-allowed", "flex w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", Ot.length > 6 ? "py-4 ps-4" : "p-4", re),
2143
2144
  children: [
2144
- (De.length > 0 || Tt.length > 0) && /* @__PURE__ */ U(ye, {
2145
- attachments: [...De, ...Tt],
2145
+ (je.length > 0 || Ot.length > 0) && /* @__PURE__ */ U(ye, {
2146
+ attachments: [...je, ...Ot],
2146
2147
  onRemove: (e) => {
2147
- De.some((t) => t.id === e) ? ke?.(e) : kt(e);
2148
+ je.some((t) => t.id === e) ? Me?.(e) : Mt(e);
2148
2149
  },
2149
- onRetry: At,
2150
- onExpand: jt,
2150
+ onRetry: Nt,
2151
+ onExpand: Pt,
2151
2152
  labels: {
2152
- removeLabel: w,
2153
- retryLabel: T,
2154
- uploadingLabel: E
2153
+ removeLabel: T,
2154
+ retryLabel: E,
2155
+ uploadingLabel: D
2155
2156
  },
2156
- onAttachmentClick: $e == null ? void 0 : (e) => {
2157
- let t = [...De, ...Tt].find((t) => t.id === e);
2158
- t != null && $e(t);
2157
+ onAttachmentClick: nt == null ? void 0 : (e) => {
2158
+ let t = [...je, ...Ot].find((t) => t.id === e);
2159
+ t != null && nt(t);
2159
2160
  }
2160
2161
  }),
2161
- !pe && /* @__PURE__ */ U("input", {
2162
- ref: Kt,
2162
+ !he && /* @__PURE__ */ U("input", {
2163
+ ref: Jt,
2163
2164
  type: "file",
2164
2165
  multiple: !0,
2165
- accept: b,
2166
+ accept: x,
2166
2167
  className: "sr-only",
2167
2168
  "aria-hidden": !0,
2168
2169
  tabIndex: -1,
2169
- onChange: sn
2170
+ onChange: ln
2171
+ }),
2172
+ Wt && /* @__PURE__ */ U(_, {
2173
+ text: Wt,
2174
+ className: "min-w-0 break-words px-1"
2170
2175
  }),
2171
- Gt && /* @__PURE__ */ U(ct, {
2176
+ $ && /* @__PURE__ */ U(lt, {
2172
2177
  embedded: !0,
2173
- state: Rt,
2174
- analyserNodeRef: Bt,
2175
- errorMessage: Vt,
2176
- onStop: Ut,
2177
- onDiscard: Wt,
2178
- attachButton: dn,
2179
- stopLabel: A,
2180
- discardLabel: te,
2181
- processingLabel: we
2178
+ state: Ht,
2179
+ analyserNodeRef: Ut,
2180
+ errorMessage: Wt,
2181
+ onStop: Kt,
2182
+ onDiscard: qt,
2183
+ attachButton: pn,
2184
+ stopLabel: j,
2185
+ discardLabel: ne,
2186
+ processingLabel: Ee
2182
2187
  }),
2183
- !Gt && he && un,
2184
- !Gt && !he && /* @__PURE__ */ W("div", {
2188
+ !$ && _e && fn,
2189
+ !$ && !_e && /* @__PURE__ */ W("div", {
2185
2190
  className: "flex flex-wrap items-center gap-2",
2186
2191
  children: [
2187
2192
  /* @__PURE__ */ U("div", {
2188
2193
  className: "flex w-full min-w-0 items-center self-stretch",
2189
- children: un
2194
+ children: fn
2190
2195
  }),
2191
- dn && /* @__PURE__ */ U("div", {
2196
+ pn && /* @__PURE__ */ U("div", {
2192
2197
  className: "flex",
2193
- children: dn
2198
+ children: pn
2194
2199
  }),
2195
- en.length > 0 && Fe != null && /* @__PURE__ */ U("div", {
2200
+ nn.length > 0 && Be != null && /* @__PURE__ */ U("div", {
2196
2201
  className: "min-w-0 flex-1",
2197
2202
  children: /* @__PURE__ */ U(it, {
2198
- items: en,
2199
- onToolToggle: Fe,
2200
- onToolDismiss: tn,
2201
- canRemove: ze,
2202
- removeLabel: He?.removeLabel
2203
+ items: nn,
2204
+ onToolToggle: Be,
2205
+ onToolDismiss: rn,
2206
+ canRemove: Ve,
2207
+ removeLabel: Ke?.removeLabel
2203
2208
  })
2204
2209
  }),
2205
2210
  /* @__PURE__ */ U("div", {
2206
2211
  className: "ms-auto flex flex-shrink-0 items-center gap-2",
2207
- children: ge ? ge({
2208
- canSend: Zt,
2209
- onSend: an
2212
+ children: ve ? ve({
2213
+ canSend: $t,
2214
+ onSend: sn
2210
2215
  }) : /* @__PURE__ */ W(H, { children: [
2211
- st,
2212
- /* @__PURE__ */ U(zt, {
2213
- deployments: le,
2214
- selectedDeploymentId: F,
2215
- onDeploymentChange: ue,
2216
- modelSelectorLabels: de,
2216
+ ft,
2217
+ /* @__PURE__ */ U(Bt, {
2218
+ deployments: ue,
2219
+ selectedDeploymentId: de,
2220
+ onDeploymentChange: fe,
2221
+ modelSelectorLabels: pe,
2217
2222
  isStreaming: o,
2218
- isMobile: dt,
2219
- isDisabled: _e,
2220
- style: _t,
2221
- modelPickerOverlay: et,
2222
- isPickerOpen: ft,
2223
- onPickerToggle: () => pt((e) => !e),
2224
- onPickerOpenChange: pt
2223
+ isMobile: mt,
2224
+ isDisabled: be,
2225
+ style: bt,
2226
+ modelPickerOverlay: rt,
2227
+ isPickerOpen: ht,
2228
+ onPickerToggle: () => gt((e) => !e),
2229
+ onPickerOpenChange: gt
2225
2230
  }),
2226
- rn && /* @__PURE__ */ U(v, {
2231
+ on && /* @__PURE__ */ U(v, {
2227
2232
  icon: /* @__PURE__ */ U(ce, {
2228
2233
  size: p.LG,
2229
2234
  stroke: m,
2230
2235
  "aria-hidden": !0
2231
2236
  }),
2232
- "aria-label": k,
2233
- tooltipProps: { tooltip: k },
2237
+ "aria-label": A,
2238
+ tooltipProps: { tooltip: A },
2234
2239
  className: "size-[40px] flex-shrink-0 mobile:min-h-11 mobile:min-w-11",
2235
- onClick: () => Ht(Re.Dictation),
2236
- disabled: R || o
2240
+ onClick: () => Gt(Re.Dictation),
2241
+ disabled: V || o
2237
2242
  }),
2238
- o && a ? /* @__PURE__ */ U(ut, {
2243
+ o && a ? /* @__PURE__ */ U(dt, {
2239
2244
  onStop: a,
2240
- ariaLabel: O
2241
- }) : !o && /* @__PURE__ */ U(lt, {
2242
- onSend: an,
2243
- isDisabled: !nn || !Zt,
2244
- ariaLabel: D
2245
+ ariaLabel: ee
2246
+ }) : !o && /* @__PURE__ */ U(ut, {
2247
+ onSend: sn,
2248
+ isDisabled: !an || !$t,
2249
+ ariaLabel: O,
2250
+ sendTooltip: k
2245
2251
  })
2246
2252
  ] })
2247
2253
  })
@@ -2252,14 +2258,14 @@ var Pt = {
2252
2258
  role: "status",
2253
2259
  "aria-live": "polite",
2254
2260
  "aria-atomic": "true",
2255
- children: /* @__PURE__ */ U("span", { children: It.text }, It.revision)
2261
+ children: /* @__PURE__ */ U("span", { children: zt.text }, zt.revision)
2256
2262
  })
2257
2263
  ]
2258
2264
  });
2259
- }, Vt = {
2265
+ }, Ht = {
2260
2266
  welcome: "_welcome_1icyo_1",
2261
2267
  description: "_description_1icyo_5"
2262
- }, Ht = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, descriptionText: r, styles: i, className: a, inputClassName: o, isInputDisabled: l = !1, ...u }) => {
2268
+ }, Ut = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, descriptionText: r, styles: i, className: a, inputClassName: o, isInputDisabled: l = !1, ...u }) => {
2263
2269
  let { colors: d, typography: f } = i ?? {};
2264
2270
  return /* @__PURE__ */ W("div", {
2265
2271
  style: s({
@@ -2270,15 +2276,15 @@ var Pt = {
2270
2276
  children: [n && /* @__PURE__ */ W("div", {
2271
2277
  className: "flex flex-col items-center gap-4 text-center",
2272
2278
  children: [/* @__PURE__ */ U("h1", {
2273
- className: c(Vt.welcome, "m-0", f?.welcomeClassName || "dial-display2-text"),
2279
+ className: c(Ht.welcome, "m-0", f?.welcomeClassName || "dial-display2-text"),
2274
2280
  children: n
2275
2281
  }), r && /* @__PURE__ */ U("p", {
2276
- className: c(Vt.description, "m-0 max-w-[540px]", f?.descriptionClassName || "dial-body-paragraph-text"),
2282
+ className: c(Ht.description, "m-0 max-w-[540px]", f?.descriptionClassName || "dial-body-paragraph-text"),
2277
2283
  children: r
2278
2284
  })]
2279
2285
  }), /* @__PURE__ */ U("div", {
2280
2286
  className: c("relative w-full", n ? "max-w-[700px]" : "max-w-[748px]"),
2281
- children: /* @__PURE__ */ U(Bt, {
2287
+ children: /* @__PURE__ */ U(Vt, {
2282
2288
  placeholder: t,
2283
2289
  isStreaming: e,
2284
2290
  isInputDisabled: l,
@@ -2289,27 +2295,27 @@ var Pt = {
2289
2295
  })
2290
2296
  })]
2291
2297
  });
2292
- }, Ut = ({ message: e, inlineStartSlot: t, onInlineStartRemove: n, initialAttachments: r = [], onCancel: a, onSave: o, onUploadAttachment: s, cancelLabel: l = "Cancel", saveLabel: d = "Save & Submit", ariaLabel: f, removeLabel: p, retryLabel: h, uploadingLabel: g, addMenuTitle: _ = "Add", attachLabel: v = "Attach file", menuTitle: y = "Menu", menuCloseLabel: b = "Close", className: S, pendingDropFiles: C, onDropFilesConsumed: T, validateAttachment: E, isAttachmentsEnabled: D, isTextAttachmentsAllowed: O, hideAttachFile: k = !1, fileAccept: ee, maximumAttachmentsAmount: A, onAttachmentsLimitExceeded: te, onDialFileSystemClick: j, dialFileSystemLabel: ne, pendingAttachments: re, onPendingAttachmentsConsumed: ie, onAttachmentClick: ae, pasteTextThreshold: oe, maxMessageLength: M = 5e4, onMessageTooLong: N }) => {
2293
- let P = B(null), [ce, le] = V([]);
2298
+ }, Wt = ({ message: e, inlineStartSlot: t, onInlineStartRemove: n, initialAttachments: r = [], onCancel: a, onSave: o, onUploadAttachment: s, cancelLabel: l = "Cancel", saveLabel: d = "Save & Submit", ariaLabel: f, removeLabel: p, retryLabel: h, uploadingLabel: g, addMenuTitle: _ = "Add", attachLabel: v = "Attach file", menuTitle: y = "Menu", menuCloseLabel: b = "Close", className: S, pendingDropFiles: C, onDropFilesConsumed: T, validateAttachment: E, isAttachmentsEnabled: D, isTextAttachmentsAllowed: O, hideAttachFile: k = !1, fileAccept: ee, maximumAttachmentsAmount: A, onAttachmentsLimitExceeded: te, onDialFileSystemClick: j, dialFileSystemLabel: ne, pendingAttachments: M, onPendingAttachmentsConsumed: N, onAttachmentClick: re, pasteTextThreshold: ie, maxMessageLength: ae = 5e4, onMessageTooLong: P }) => {
2299
+ let oe = z(null), [ce, le] = B([]);
2294
2300
  L(() => {
2295
2301
  C?.length && (le(C), T?.());
2296
2302
  }, [C, T]);
2297
- let [F, ue] = V(e ?? ""), [de, fe] = V([]), [pe, me] = V(r), he = de.some((e) => e.status === i.Loading || e.status === i.Error), ge = (F.trim().length > 0 || de.length > 0 || pe.length > 0) && !he, R = (e) => {
2303
+ let [F, ue] = B(e ?? ""), [de, fe] = B([]), [pe, me] = B(r), he = de.some((e) => e.status === i.Loading || e.status === i.Error), ge = (F.trim().length > 0 || de.length > 0 || pe.length > 0) && !he, _e = (e) => {
2298
2304
  me((t) => t.filter((t) => t.id !== e));
2299
- }, _e = I((e, t) => {
2305
+ }, ve = I((e, t) => {
2300
2306
  o(e, pe, t);
2301
- }, [pe, o]), ve = () => {
2307
+ }, [pe, o]), V = () => {
2302
2308
  if (ge) {
2303
- if (F.length >= M) {
2304
- N?.(F.length, M);
2309
+ if (F.length >= ae) {
2310
+ P?.(F.length, ae);
2305
2311
  return;
2306
2312
  }
2307
- _e(F, de);
2313
+ ve(F, de);
2308
2314
  }
2309
2315
  }, ye = I(() => le([]), []), be = I((e) => {
2310
2316
  let t = Array.from(e.target.files ?? []);
2311
2317
  t.length !== 0 && (e.target.value = "", le(t));
2312
- }, []), xe = z(() => j ? [{
2318
+ }, []), xe = R(() => j ? [{
2313
2319
  key: "dial-fs",
2314
2320
  label: ne ?? "DIAL file system",
2315
2321
  icon: /* @__PURE__ */ U(se, {
@@ -2321,7 +2327,7 @@ var Pt = {
2321
2327
  }] : [], [j, ne]);
2322
2328
  return /* @__PURE__ */ W("div", {
2323
2329
  className: c("flex w-full flex-col gap-2", S),
2324
- children: [/* @__PURE__ */ U(Bt, {
2330
+ children: [/* @__PURE__ */ U(Vt, {
2325
2331
  message: e,
2326
2332
  inlineStartSlot: t,
2327
2333
  onInlineStartRemove: n,
@@ -2329,7 +2335,7 @@ var Pt = {
2329
2335
  hideActionBar: !0,
2330
2336
  pendingDropFiles: ce,
2331
2337
  onDropFilesConsumed: ye,
2332
- onSend: _e,
2338
+ onSend: ve,
2333
2339
  onUploadAttachment: s,
2334
2340
  onChange: ue,
2335
2341
  onAttachmentsChange: fe,
@@ -2338,24 +2344,24 @@ var Pt = {
2338
2344
  uploadingLabel: g,
2339
2345
  className: "max-w-full",
2340
2346
  prefixAttachments: pe,
2341
- onRemovePrefixAttachment: R,
2347
+ onRemovePrefixAttachment: _e,
2342
2348
  validateAttachment: E,
2343
2349
  isAttachmentsEnabled: D,
2344
2350
  isTextAttachmentsAllowed: O,
2345
2351
  maximumAttachmentsAmount: A,
2346
2352
  onAttachmentsLimitExceeded: te,
2347
- pendingAttachments: re,
2348
- onPendingAttachmentsConsumed: ie,
2349
- onAttachmentClick: ae,
2350
- pasteTextThreshold: oe,
2351
- maxMessageLength: M,
2352
- onMessageTooLong: N
2353
+ pendingAttachments: M,
2354
+ onPendingAttachmentsConsumed: N,
2355
+ onAttachmentClick: re,
2356
+ pasteTextThreshold: ie,
2357
+ maxMessageLength: ae,
2358
+ onMessageTooLong: P
2353
2359
  }), /* @__PURE__ */ W("div", {
2354
2360
  className: "flex items-center justify-between",
2355
2361
  children: [/* @__PURE__ */ U("div", {
2356
2362
  className: "flex",
2357
2363
  children: !k && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("input", {
2358
- ref: P,
2364
+ ref: oe,
2359
2365
  type: "file",
2360
2366
  multiple: !0,
2361
2367
  accept: ee,
@@ -2364,7 +2370,7 @@ var Pt = {
2364
2370
  tabIndex: -1,
2365
2371
  onChange: be
2366
2372
  }), /* @__PURE__ */ U(tt, {
2367
- onAttachClick: () => P.current?.click(),
2373
+ onAttachClick: () => oe.current?.click(),
2368
2374
  attachLabel: v,
2369
2375
  addMenuTitle: _,
2370
2376
  menuTitle: y,
@@ -2378,7 +2384,7 @@ var Pt = {
2378
2384
  onClick: a
2379
2385
  }), /* @__PURE__ */ U(w, {
2380
2386
  label: d,
2381
- onClick: ve,
2387
+ onClick: V,
2382
2388
  disabled: !ge
2383
2389
  })]
2384
2390
  })]
@@ -2386,4 +2392,4 @@ var Pt = {
2386
2392
  });
2387
2393
  };
2388
2394
  //#endregion
2389
- export { Ee as BottomSheetShell, Ze as ChatSettingsModal, Ht as ConversationInput, Ut as EditMessageInput, Bt as Input, We as SendOnEnter };
2395
+ export { Ee as BottomSheetShell, Ze as ChatSettingsModal, Ut as ConversationInput, Wt as EditMessageInput, Vt as Input, We as SendOnEnter };