@epam/ai-dial-conversation-input 1.0.0 → 1.0.2

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,101 +1,101 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, RequestStatus as r, ResponseFormat as i, buildCssVars as a, mergeClasses as o, useIsMobile as s } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as c, Button as l, CloseButton as u, DIAL_ICON_SIZE as d, DialDropdownIcon as f, DialSlider as p, Dropdown as m, ElementSize as h, ErrorText as g, GhostIconButton as _, Highlight as v, NeutralButton as y, Popup as b, PopupSize as x, PrimaryButton as S, PrimaryIconButton as C, RadioGroup as w, RadioGroupOrientation as T, Search as E, Skeleton as D, SkeletonVariant as O, StaticIconButton as k, Textarea as A, Tooltip as j } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowLeft as ee, IconArrowNarrowRight as te, IconCheck as M, IconChevronDown as ne, IconChevronRight as N, IconFile as re, IconMicrophone as ie, IconPaperclip as ae, IconPlayerStopFilled as P, IconPlaystationSquare as F, IconPlus as oe, IconPrompt as se, IconSettings as ce, IconTool as le, IconX as I } from "@tabler/icons-react";
4
- import { createPortal as ue } from "react-dom";
5
- import { createElement as L, memo as R, useCallback as z, useEffect as B, useImperativeHandle as de, useLayoutEffect as fe, useMemo as V, useRef as H, useState as U } from "react";
6
- import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
7
- import { AttachmentCard as pe, AttachmentGroup as me, AttachmentTray as he, AttachmentTray as ge, FileDndOverlay as _e, MAX_UPLOADS_PER_MINUTE as ve, generateAttachmentId as ye, getAttachmentIcon as be, useClipboardPaste as xe } from "@epam/ai-dial-attachment-input";
2
+ import { BASE_ICON_SIZE as c, Button as l, CloseButton as u, DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, DialDropdownIcon as p, DialSlider as m, Dropdown as h, ElementSize as g, ErrorText as _, GhostIconButton as v, Highlight as y, NeutralButton as b, Popup as x, PopupSize as S, PrimaryButton as C, PrimaryIconButton as w, RadioGroup as T, RadioGroupOrientation as E, Search as D, Skeleton as O, SkeletonVariant as k, StaticIconButton as A, Textarea as ee, Tooltip as j } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowLeft as te, IconArrowNarrowRight as ne, IconCheck as M, IconChevronDown as re, IconChevronRight as N, IconFile as ie, IconMicrophone as ae, IconPaperclip as oe, IconPlayerStopFilled as P, IconPlaystationSquare as F, IconPlus as se, IconPrompt as ce, IconSettings as le, IconTool as ue, IconX as de } from "@tabler/icons-react";
4
+ import { createPortal as fe } from "react-dom";
5
+ import { createElement as I, memo as L, useCallback as R, useEffect as z, useImperativeHandle as pe, useLayoutEffect as me, useMemo as B, useRef as V, useState as H } from "react";
6
+ import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
7
+ import { AttachmentTray as he, MAX_UPLOADS_PER_MINUTE as ge, generateAttachmentId as _e, useClipboardPaste as ve } from "@epam/ai-dial-attachment-input";
8
8
  //#region src/hooks/useBottomSheet.ts
9
- var Se = (e, t) => {
10
- B(() => {
9
+ var ye = (e, t) => {
10
+ z(() => {
11
11
  if (!e) return;
12
12
  let n = (e) => {
13
13
  e.key === "Escape" && t();
14
14
  };
15
15
  return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
16
- }, [e, t]), B(() => {
16
+ }, [e, t]), z(() => {
17
17
  if (e) return document.body.style.overflow = "hidden", () => {
18
18
  document.body.style.overflow = "";
19
19
  };
20
20
  }, [e]);
21
- }, Ce = {
21
+ }, be = {
22
22
  backdrop: "_backdrop_1d50f_9",
23
23
  sheet: "_sheet_1d50f_13",
24
24
  "slide-up": "_slide-up_1d50f_1",
25
25
  title: "_title_1d50f_18",
26
26
  divider: "_divider_1d50f_22"
27
- }, q = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: f = "dial-body-semi-text", className: p, colors: m, children: g }) => {
28
- if (Se(e, r), !e || typeof document > "u") return null;
29
- let v = a({
30
- "--ci-backdrop": m?.backdrop,
31
- "--ci-sheet-bg": m?.sheetBg,
32
- "--ci-sheet-text": m?.sheetText,
33
- "--ci-sheet-divider": m?.divider
27
+ }, K = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: s, "aria-label": c, style: l, titleClassName: p = "dial-body-semi-text", className: m, colors: h, children: _ }) => {
28
+ if (ye(e, r), !e || typeof document > "u") return null;
29
+ let y = a({
30
+ "--ci-backdrop": h?.backdrop,
31
+ "--ci-sheet-bg": h?.sheetBg,
32
+ "--ci-sheet-text": h?.sheetText,
33
+ "--ci-sheet-divider": h?.divider
34
34
  });
35
- return ue(/* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
36
- className: o(Ce.backdrop, "fixed inset-0 z-[55]"),
37
- style: v,
35
+ return fe(/* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
36
+ className: o(be.backdrop, "fixed inset-0 z-[55]"),
37
+ style: y,
38
38
  onPointerDown: r,
39
39
  "aria-hidden": !0
40
- }), /* @__PURE__ */ K("div", {
40
+ }), /* @__PURE__ */ G("div", {
41
41
  role: "dialog",
42
42
  "aria-modal": !0,
43
43
  "aria-label": t ?? c,
44
44
  style: {
45
- ...v,
45
+ ...y,
46
46
  ...l
47
47
  },
48
- className: o(Ce.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col rounded-t-lg", p),
49
- children: [t != null && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K("div", {
48
+ className: o(be.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col rounded-t-lg", m),
49
+ children: [t != null && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ G("div", {
50
50
  className: "relative flex h-[60px] flex-shrink-0 items-center justify-center px-4",
51
51
  children: [
52
- i && /* @__PURE__ */ G("div", {
52
+ i && /* @__PURE__ */ W("div", {
53
53
  className: "absolute start-4",
54
- children: /* @__PURE__ */ G(_, {
55
- icon: /* @__PURE__ */ G(ee, {
54
+ children: /* @__PURE__ */ W(v, {
55
+ icon: /* @__PURE__ */ W(te, {
56
56
  size: d.LG,
57
- stroke: 1.5,
57
+ stroke: f,
58
58
  className: "rtl:scale-x-[-1]"
59
59
  }),
60
60
  "aria-label": s,
61
61
  onClick: i
62
62
  })
63
63
  }),
64
- /* @__PURE__ */ G("span", {
65
- className: o(Ce.title, f),
64
+ /* @__PURE__ */ W("span", {
65
+ className: o(be.title, p),
66
66
  children: t
67
67
  }),
68
- /* @__PURE__ */ G("div", {
68
+ /* @__PURE__ */ W("div", {
69
69
  className: "absolute end-4 m-2",
70
- children: /* @__PURE__ */ G(u, {
70
+ children: /* @__PURE__ */ W(u, {
71
71
  ariaLabel: n,
72
72
  onClose: r,
73
- size: h.Standard
73
+ size: g.Standard
74
74
  })
75
75
  })
76
76
  ]
77
- }), /* @__PURE__ */ G("div", { className: o(Ce.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ G("div", {
77
+ }), /* @__PURE__ */ W("div", { className: o(be.divider, "h-px flex-shrink-0") })] }), /* @__PURE__ */ W("div", {
78
78
  className: "overflow-y-auto",
79
- children: g
79
+ children: _
80
80
  })]
81
81
  })] }), document.body);
82
- }, we = async (e, t, n) => {
82
+ }, xe = async (e, t, n) => {
83
83
  let r = 6e4 / t, i = [];
84
84
  for (let t = 0; t < e.length; t++) t > 0 && await new Promise((e) => setTimeout(e, r)), i.push(n(e[t]));
85
85
  await Promise.allSettled(i);
86
- }, Te = ({ initialAttachments: n, onUploadAttachment: i, onAttachmentsChange: a, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, pendingAttachments: l, onPendingAttachmentsConsumed: u, onExpandPastedText: d, maximumAttachmentsAmount: f, baseAttachmentsAmount: p = 0, onAttachmentsLimitExceeded: m }) => {
87
- let [h, g] = U(n), _ = H(h);
88
- B(() => {
86
+ }, Se = ({ initialAttachments: n, onUploadAttachment: i, onAttachmentsChange: a, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, pendingAttachments: l, onPendingAttachmentsConsumed: u, onExpandPastedText: d, maximumAttachmentsAmount: f, baseAttachmentsAmount: p = 0, onAttachmentsLimitExceeded: m }) => {
87
+ let [h, g] = H(n), _ = V(h);
88
+ z(() => {
89
89
  _.current = h;
90
- }, [h]), B(() => () => {
90
+ }, [h]), z(() => () => {
91
91
  _.current.forEach((e) => {
92
92
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
93
93
  });
94
94
  }, []);
95
- let v = z((e) => e.map((e) => {
95
+ let v = R((e) => e.map((e) => {
96
96
  let n = e.type.startsWith("image/"), i = e.type.startsWith("audio/"), a = n ? URL.createObjectURL(e) : void 0, o = i ? URL.createObjectURL(e) : void 0;
97
97
  return {
98
- id: ye(),
98
+ id: _e(),
99
99
  name: e.name,
100
100
  contentType: e.type,
101
101
  file: e,
@@ -104,26 +104,26 @@ var Se = (e, t) => {
104
104
  previewUrl: a,
105
105
  playUrl: o
106
106
  };
107
- }), []), y = H(a);
108
- B(() => {
107
+ }), []), y = V(a);
108
+ z(() => {
109
109
  y.current = a;
110
110
  }, [a]);
111
- let b = H(!0), x = z((e) => {
111
+ let b = V(!0), x = R((e) => {
112
112
  g((t) => {
113
113
  let n = e(t);
114
114
  return n === t ? t : n;
115
115
  });
116
116
  }, []);
117
- B(() => {
117
+ z(() => {
118
118
  if (b.current) {
119
119
  b.current = !1;
120
120
  return;
121
121
  }
122
122
  y.current?.(h);
123
123
  }, [h]);
124
- let S = z((e) => {
124
+ let S = R((e) => {
125
125
  g(e);
126
- }, []), C = z(async (t) => {
126
+ }, []), C = R(async (t) => {
127
127
  if (i) {
128
128
  x((e) => e.map((e) => e.id === t.id ? {
129
129
  ...e,
@@ -145,7 +145,7 @@ var Se = (e, t) => {
145
145
  } : e));
146
146
  }
147
147
  }
148
- }, [i, x]), w = z((e, t = !0) => {
148
+ }, [i, x]), w = R((e, t = !0) => {
149
149
  let n = new Set(_.current.map((e) => e.id)), i = e.filter((e) => !n.has(e.id));
150
150
  if (i.length !== 0) {
151
151
  if (f != null && f > 0 && Number.isFinite(f)) {
@@ -166,7 +166,7 @@ var Se = (e, t) => {
166
166
  status: r.Error,
167
167
  errorReason: n
168
168
  } : e));
169
- }), we(e, ve, C);
169
+ }), xe(e, ge, C);
170
170
  }
171
171
  }
172
172
  }, [
@@ -177,20 +177,20 @@ var Se = (e, t) => {
177
177
  C,
178
178
  o
179
179
  ]);
180
- B(() => {
180
+ z(() => {
181
181
  s.length !== 0 && (w(v(s)), c?.());
182
182
  }, [
183
183
  w,
184
184
  v,
185
185
  c,
186
186
  s
187
- ]), B(() => {
187
+ ]), z(() => {
188
188
  l.length !== 0 && (w(l, !1), u?.());
189
189
  }, [
190
190
  w,
191
191
  u,
192
192
  l
193
- ]), B(() => {
193
+ ]), z(() => {
194
194
  if (!o) return;
195
195
  let t = !1, n = [], i = _.current.map((i) => {
196
196
  if (i.status === r.Loading) return i;
@@ -217,7 +217,7 @@ var Se = (e, t) => {
217
217
  x,
218
218
  C
219
219
  ]);
220
- let T = z((e) => {
220
+ let T = R((e) => {
221
221
  x((t) => {
222
222
  let n = t.find((t) => t.id === e);
223
223
  return n?.previewUrl && URL.revokeObjectURL(n.previewUrl), n?.playUrl && URL.revokeObjectURL(n.playUrl), t.filter((t) => t.id !== e);
@@ -229,11 +229,11 @@ var Se = (e, t) => {
229
229
  addAttachments: w,
230
230
  resetAttachments: S,
231
231
  handleRemove: T,
232
- handleRetry: z((e) => {
232
+ handleRetry: R((e) => {
233
233
  let t = h.find((t) => t.id === e);
234
234
  t && C(t);
235
235
  }, [h, C]),
236
- handleExpand: z(async (e) => {
236
+ handleExpand: R(async (e) => {
237
237
  let n = h.find((t) => t.id === e);
238
238
  if (!n || n.type !== t.Pasted) return;
239
239
  let r = await n.file.text();
@@ -245,9 +245,9 @@ var Se = (e, t) => {
245
245
  ]),
246
246
  hasBlockedAttachments: h.some((e) => e.status === r.Loading || e.status === r.Error)
247
247
  };
248
- }, Ee = (e, t) => {
249
- let [n, r] = U(e), [i, a] = U(!1), [o, s] = U(0);
250
- return B(() => {
248
+ }, Ce = (e, t) => {
249
+ let [n, r] = H(e), [i, a] = H(!1), [o, s] = H(0);
250
+ return z(() => {
251
251
  if (e) {
252
252
  r(!0), a(!1), s((e) => e + 1);
253
253
  return;
@@ -263,18 +263,18 @@ var Se = (e, t) => {
263
263
  isExiting: i,
264
264
  instanceKey: o
265
265
  };
266
- }, De = (e, t) => !e.slice(0, t).includes("\n"), Oe = (e, t) => !e.slice(t).includes("\n"), ke = (e) => {
267
- let t = H(e);
266
+ }, we = (e, t) => !e.slice(0, t).includes("\n"), Te = (e, t) => !e.slice(t).includes("\n"), Ee = (e) => {
267
+ let t = V(e);
268
268
  t.current = e;
269
- let n = H(-1), r = H(""), i = z((e, i, a) => {
269
+ let n = V(-1), r = V(""), i = R((e, i, a) => {
270
270
  let o = t.current;
271
- return !o || o.length === 0 ? null : e === "up" ? !De(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 || !Oe(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
272
- }, []), a = z(() => {
271
+ return !o || o.length === 0 ? null : e === "up" ? !we(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 || !Te(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
272
+ }, []), a = R(() => {
273
273
  n.current = -1, r.current = "";
274
- }, []), o = z(() => {
274
+ }, []), o = R(() => {
275
275
  n.current = -1, r.current = "";
276
276
  }, []);
277
- return V(() => ({
277
+ return B(() => ({
278
278
  navigate: i,
279
279
  notifyChange: a,
280
280
  reset: o
@@ -283,13 +283,13 @@ var Se = (e, t) => {
283
283
  a,
284
284
  o
285
285
  ]);
286
- }, Ae = ({ messageProp: e, messageRevision: t }) => {
287
- let [n, r] = U(e), i = H(null), a = H(0), [o, s] = U(!1);
288
- return B(() => {
286
+ }, De = ({ messageProp: e, messageRevision: t }) => {
287
+ let [n, r] = H(e), i = V(null), a = V(0), [o, s] = H(!1);
288
+ return z(() => {
289
289
  r(e);
290
- }, [e, t]), B(() => {
290
+ }, [e, t]), z(() => {
291
291
  i.current && (a.current = i.current.offsetHeight);
292
- }, []), fe(() => {
292
+ }, []), me(() => {
293
293
  if (!i.current || a.current === 0) return;
294
294
  let e = i.current.offsetHeight > a.current;
295
295
  s((t) => e ? !0 : n === "" ? !1 : t);
@@ -299,18 +299,18 @@ var Se = (e, t) => {
299
299
  textareaRef: i,
300
300
  isMultiLine: o
301
301
  };
302
- }, je = /* @__PURE__ */ function(e) {
302
+ }, Oe = /* @__PURE__ */ function(e) {
303
303
  return e.Idle = "idle", e.Recording = "recording", e.Error = "error", e;
304
- }({}), Me = [
304
+ }({}), ke = [
305
305
  "audio/webm;codecs=opus",
306
306
  "audio/ogg;codecs=opus",
307
307
  "audio/webm"
308
- ], Ne = () => Me.find((e) => MediaRecorder.isTypeSupported(e)) ?? "", Pe = ({ onAttachAudio: e }) => {
309
- let [t, n] = U("idle"), [r, i] = U(null), a = H(null), o = H(null), s = H(null), c = H(null), l = H([]), u = H(""), d = H(e);
308
+ ], Ae = () => ke.find((e) => MediaRecorder.isTypeSupported(e)) ?? "", je = ({ onAttachAudio: e }) => {
309
+ let [t, n] = H("idle"), [r, i] = H(null), a = V(null), o = V(null), s = V(null), c = V(null), l = V([]), u = V(""), d = V(e);
310
310
  d.current = e;
311
- let f = z(() => {
311
+ let f = R(() => {
312
312
  a.current &&= (a.current.getTracks().forEach((e) => e.stop()), null), o.current &&= (o.current.close(), null), s.current = null, c.current = null;
313
- }, []), p = z(() => {
313
+ }, []), p = R(() => {
314
314
  (async () => {
315
315
  try {
316
316
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
@@ -319,7 +319,7 @@ var Se = (e, t) => {
319
319
  o.current = t;
320
320
  let r = t.createAnalyser();
321
321
  r.fftSize = 256, s.current = r, t.createMediaStreamSource(e).connect(r);
322
- let i = Ne();
322
+ let i = Ae();
323
323
  u.current = i, l.current = [];
324
324
  let d = new MediaRecorder(e, i ? { mimeType: i } : void 0);
325
325
  c.current = d, d.ondataavailable = (e) => {
@@ -329,17 +329,17 @@ var Se = (e, t) => {
329
329
  i(e instanceof Error ? e.message : "Microphone access denied"), n("error");
330
330
  }
331
331
  })();
332
- }, []), m = z(() => {
332
+ }, []), m = R(() => {
333
333
  let e = c.current;
334
334
  !e || e.state !== "recording" || (e.onstop = () => {
335
335
  let e = u.current || "audio/webm", t = new Blob(l.current, { type: e }), r = e.split(";")[0].split("/")[1] ?? "webm", a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, -1), o = new File([t], `voice-${a}.${r}`, { type: e });
336
336
  d.current(o), f(), i(null), n("idle");
337
337
  }, e.stop());
338
- }, [f]), h = z(() => {
338
+ }, [f]), h = R(() => {
339
339
  let e = c.current;
340
340
  e && e.state === "recording" && (e.ondataavailable = null, e.onstop = null, e.stop()), f(), i(null), n("idle");
341
341
  }, [f]);
342
- return B(() => () => {
342
+ return z(() => () => {
343
343
  f();
344
344
  }, [f]), {
345
345
  state: t,
@@ -349,12 +349,12 @@ var Se = (e, t) => {
349
349
  stopRecording: m,
350
350
  discardRecording: h
351
351
  };
352
- }, Fe = /* @__PURE__ */ function(e) {
352
+ }, Me = /* @__PURE__ */ function(e) {
353
353
  return e.Enter = "enter", e.MetaEnter = "meta-enter", e;
354
- }({}), Ie = {
354
+ }({}), Ne = {
355
355
  item: "_item_1sr2n_1",
356
356
  itemIcon: "_itemIcon_1sr2n_11"
357
- }, Le = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: s, className: c, titleClassName: u = "dial-body-semi-text", itemLabelClassName: d = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
357
+ }, Pe = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: s, className: c, titleClassName: u = "dial-body-semi-text", itemLabelClassName: d = "dial-small-text", btnTextClassName: f = "", colors: p }) => {
358
358
  let m = (e) => {
359
359
  e(), r();
360
360
  }, h = a({
@@ -363,7 +363,7 @@ var Se = (e, t) => {
363
363
  "--ci-sheet-item-active": p?.itemActiveBg,
364
364
  "--ci-sheet-icon": p?.itemIcon
365
365
  });
366
- return /* @__PURE__ */ G(q, {
366
+ return /* @__PURE__ */ W(K, {
367
367
  isOpen: e,
368
368
  title: t,
369
369
  closeLabel: n,
@@ -372,23 +372,23 @@ var Se = (e, t) => {
372
372
  className: c,
373
373
  titleClassName: u,
374
374
  colors: p?.shell,
375
- children: /* @__PURE__ */ G("ul", {
375
+ children: /* @__PURE__ */ W("ul", {
376
376
  role: "list",
377
377
  className: "flex flex-col",
378
378
  style: h,
379
- children: s.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ G("li", { children: /* @__PURE__ */ G(l, {
379
+ children: s.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ W("li", { children: /* @__PURE__ */ W(l, {
380
380
  type: "button",
381
- className: o(Ie.item, "w-full gap-3 px-4 py-[10px] text-start"),
382
- iconBefore: /* @__PURE__ */ G("span", {
383
- className: Ie.itemIcon,
381
+ className: o(Ne.item, "w-full gap-3 px-4 py-[10px] text-start"),
382
+ iconBefore: /* @__PURE__ */ W("span", {
383
+ className: Ne.itemIcon,
384
384
  children: n
385
385
  }),
386
- iconAfter: r ? /* @__PURE__ */ G("span", {
386
+ iconAfter: r ? /* @__PURE__ */ W("span", {
387
387
  className: "ms-auto",
388
388
  children: r
389
389
  }) : null,
390
390
  textClassName: f,
391
- label: /* @__PURE__ */ G("span", {
391
+ label: /* @__PURE__ */ W("span", {
392
392
  className: d,
393
393
  children: t
394
394
  }),
@@ -396,9 +396,9 @@ var Se = (e, t) => {
396
396
  }) }, e))
397
397
  })
398
398
  });
399
- }, Re = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
400
- let [s, c] = U(t), [l, u] = U(n), [d, f] = U(r), p = H(o);
401
- B(() => {
399
+ }, Fe = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
400
+ let [s, c] = H(t), [l, u] = H(n), [d, f] = H(r), p = V(o);
401
+ z(() => {
402
402
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
403
403
  }, [
404
404
  o,
@@ -415,7 +415,7 @@ var Se = (e, t) => {
415
415
  setResponseFormat: c,
416
416
  setSystemPrompt: u,
417
417
  setTemperature: f,
418
- handleSubmit: z(() => {
418
+ handleSubmit: R(() => {
419
419
  if (!m) return;
420
420
  let t = {};
421
421
  e.responseFormat && s != null && (t.responseFormat = s), e.systemPrompt && (t.systemPrompt = l), e.temperature && (t.temperature = d), i(t), a();
@@ -429,17 +429,17 @@ var Se = (e, t) => {
429
429
  a
430
430
  ])
431
431
  };
432
- }, ze = { label: "_label_14i7c_1" }, Be = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: s, onSystemPromptChange: c, onTemperatureChange: l, responseFormatLabel: u = "Response format", responseFormatHint: d = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel: m = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
432
+ }, Ie = { label: "_label_14i7c_1" }, Le = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: s, onSystemPromptChange: c, onTemperatureChange: l, responseFormatLabel: u = "Response format", responseFormatHint: d = "Applies to new and existing messages", responseFormatMarkdownLabel: f = "Markdown", responseFormatPlainTextLabel: p = "Plain text", systemPromptLabel: h = "System prompt", systemPromptTooltip: g = "Enter a prompt", temperatureLabel: _ = "Temperature", temperatureLabels: v = [
433
433
  "Precise",
434
434
  "Neutral",
435
435
  "Creative"
436
436
  ], temperatureHint: y, labelClassName: b = "!dial-small-semi-text", colors: x }) => {
437
- let S = a({ "--csf-label-text": x?.labelText }), C = o(b, ze.label, "gap-1");
438
- return /* @__PURE__ */ K("div", {
437
+ let S = a({ "--csf-label-text": x?.labelText }), C = o(b, Ie.label, "gap-1");
438
+ return /* @__PURE__ */ G("div", {
439
439
  className: "flex flex-col gap-4 px-6 pb-3",
440
440
  style: S,
441
441
  children: [
442
- e.responseFormat && /* @__PURE__ */ G(w, {
442
+ e.responseFormat && /* @__PURE__ */ W(T, {
443
443
  id: "response-format",
444
444
  labelProps: {
445
445
  label: u,
@@ -447,18 +447,18 @@ var Se = (e, t) => {
447
447
  caption: d
448
448
  },
449
449
  optionsClassName: "mb-2",
450
- orientation: T.Column,
450
+ orientation: E.Column,
451
451
  value: t ?? i.Markdown,
452
452
  items: [{
453
453
  value: i.Markdown,
454
454
  label: f
455
455
  }, {
456
456
  value: i.PlainText,
457
- label: m
457
+ label: p
458
458
  }],
459
459
  onChange: (e) => s(e)
460
460
  }),
461
- e.systemPrompt && /* @__PURE__ */ G(A, {
461
+ e.systemPrompt && /* @__PURE__ */ W(ee, {
462
462
  value: n,
463
463
  placeholder: g,
464
464
  resize: !0,
@@ -468,7 +468,7 @@ var Se = (e, t) => {
468
468
  },
469
469
  onChange: (e) => c(e ?? "")
470
470
  }),
471
- e.temperature && /* @__PURE__ */ G(p, {
471
+ e.temperature && /* @__PURE__ */ W(m, {
472
472
  labelProps: {
473
473
  label: _,
474
474
  className: C,
@@ -483,8 +483,8 @@ var Se = (e, t) => {
483
483
  })
484
484
  ]
485
485
  });
486
- }, Ve = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: s, initialResponseFormat: c, 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: C = "Apply changes", saveDisabledTooltip: w }) => {
487
- let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: A, setTemperature: ee, handleSubmit: te } = Re({
486
+ }, Re = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: s, initialResponseFormat: c, 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: w }) => {
487
+ let { responseFormat: T, systemPrompt: E, temperature: D, canSubmit: O, setResponseFormat: k, setSystemPrompt: A, setTemperature: ee, handleSubmit: te } = Fe({
488
488
  isOpen: e,
489
489
  features: s,
490
490
  initialResponseFormat: c,
@@ -493,7 +493,7 @@ var Se = (e, t) => {
493
493
  onSave: d,
494
494
  onClose: r
495
495
  });
496
- return /* @__PURE__ */ K(q, {
496
+ return /* @__PURE__ */ G(K, {
497
497
  isOpen: e,
498
498
  title: f,
499
499
  closeLabel: i,
@@ -501,7 +501,7 @@ var Se = (e, t) => {
501
501
  onBack: t,
502
502
  backLabel: n,
503
503
  style: a,
504
- children: [/* @__PURE__ */ G(Be, {
504
+ children: [/* @__PURE__ */ W(Le, {
505
505
  features: s,
506
506
  responseFormat: T,
507
507
  systemPrompt: E,
@@ -518,14 +518,14 @@ var Se = (e, t) => {
518
518
  temperatureLabel: y,
519
519
  temperatureLabels: b,
520
520
  temperatureHint: x
521
- }), /* @__PURE__ */ G("div", {
521
+ }), /* @__PURE__ */ W("div", {
522
522
  className: o("px-6 py-4 mobile:pb-8"),
523
- children: /* @__PURE__ */ G(j, {
523
+ children: /* @__PURE__ */ W(j, {
524
524
  tooltip: w,
525
525
  hideTooltip: O || !w,
526
526
  triggerClassName: "w-full",
527
- children: /* @__PURE__ */ G(S, {
528
- label: C,
527
+ children: /* @__PURE__ */ W(C, {
528
+ label: S,
529
529
  onClick: te,
530
530
  disabled: !O,
531
531
  className: "w-full"
@@ -533,8 +533,8 @@ var Se = (e, t) => {
533
533
  })
534
534
  })]
535
535
  });
536
- }, He = { modal: "_modal_kl0h0_1" }, Ue = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = He.modal }) => {
537
- let { responseFormat: C, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = Re({
536
+ }, ze = { modal: "_modal_kl0h0_1" }, Be = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", titleClassName: s = "dial-h1-text", responseFormatLabel: c, responseFormatHint: l, responseFormatMarkdownLabel: u, responseFormatPlainTextLabel: d, systemPromptLabel: f, systemPromptTooltip: p, temperatureLabel: m, temperatureLabels: h, temperatureHint: g, saveLabel: _ = "Apply changes", saveDisabledTooltip: v, backgroundClassName: y = ze.modal }) => {
537
+ let { responseFormat: b, systemPrompt: w, temperature: T, canSubmit: E, setResponseFormat: D, setSystemPrompt: O, setTemperature: k, handleSubmit: A } = Fe({
538
538
  features: e,
539
539
  initialResponseFormat: t,
540
540
  initialSystemPrompt: n,
@@ -542,28 +542,28 @@ var Se = (e, t) => {
542
542
  onSave: i,
543
543
  onClose: a
544
544
  });
545
- return /* @__PURE__ */ G(b, {
545
+ return /* @__PURE__ */ W(x, {
546
546
  open: !0,
547
547
  header: o,
548
548
  titleClassName: s,
549
- size: x.Sm,
549
+ size: S.Sm,
550
550
  onClose: a,
551
551
  className: y,
552
- footer: /* @__PURE__ */ G("div", {
552
+ footer: /* @__PURE__ */ W("div", {
553
553
  className: "flex justify-end px-6 py-4",
554
- children: /* @__PURE__ */ G(j, {
554
+ children: /* @__PURE__ */ W(j, {
555
555
  tooltip: v,
556
556
  hideTooltip: E || !v,
557
- children: /* @__PURE__ */ G(S, {
557
+ children: /* @__PURE__ */ W(C, {
558
558
  label: _,
559
559
  onClick: A,
560
560
  disabled: !E
561
561
  })
562
562
  })
563
563
  }),
564
- children: /* @__PURE__ */ G(Be, {
564
+ children: /* @__PURE__ */ W(Le, {
565
565
  features: e,
566
- responseFormat: C,
566
+ responseFormat: b,
567
567
  systemPrompt: w,
568
568
  temperature: T,
569
569
  onResponseFormatChange: D,
@@ -581,11 +581,11 @@ var Se = (e, t) => {
581
581
  })
582
582
  });
583
583
  };
584
- R(Ue);
585
- var We = {
584
+ L(Be);
585
+ var Ve = {
586
586
  icon: "_icon_1fv6z_1",
587
587
  selectedIcon: "_selectedIcon_1fv6z_5"
588
- }, Ge = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: s, title: u = "Tools", items: d, onToolToggle: f, itemLabelClassName: p = "dial-small-text", colors: m }) => /* @__PURE__ */ G(q, {
588
+ }, He = ({ isOpen: e, onBack: t, backLabel: n = "Back", onClose: r, closeLabel: i = "Close", style: s, title: u = "Tools", items: d, onToolToggle: p, itemLabelClassName: m = "dial-small-text", colors: h }) => /* @__PURE__ */ W(K, {
589
589
  isOpen: e,
590
590
  title: u,
591
591
  closeLabel: i,
@@ -593,141 +593,147 @@ var We = {
593
593
  onBack: t,
594
594
  backLabel: n,
595
595
  style: s,
596
- children: /* @__PURE__ */ G("ul", {
596
+ children: /* @__PURE__ */ W("ul", {
597
597
  role: "menu",
598
598
  className: "flex flex-col pb-4",
599
599
  style: a({
600
- "--tbs-icon-text": m?.iconText,
601
- "--tbs-selected-icon-text": m?.selectedIconText
600
+ "--tbs-icon-text": h?.iconText,
601
+ "--tbs-selected-icon-text": h?.selectedIconText
602
602
  }),
603
- children: d.map((e) => /* @__PURE__ */ G("li", {
603
+ children: d.map((e) => /* @__PURE__ */ W("li", {
604
604
  role: "none",
605
- children: /* @__PURE__ */ G(l, {
605
+ children: /* @__PURE__ */ W(l, {
606
606
  type: "button",
607
607
  role: "menuitemcheckbox",
608
608
  "aria-checked": e.isSelected,
609
609
  className: "w-full gap-3 px-4 py-[10px] text-start",
610
- iconBefore: /* @__PURE__ */ G("span", {
611
- className: o("flex items-center", We.icon),
610
+ iconBefore: /* @__PURE__ */ W("span", {
611
+ className: o("flex items-center", Ve.icon),
612
612
  children: e.icon
613
613
  }),
614
- iconAfter: e.isSelected ? /* @__PURE__ */ G("span", {
615
- className: o("ms-auto", We.selectedIcon),
616
- children: /* @__PURE__ */ G(M, {
614
+ iconAfter: e.isSelected ? /* @__PURE__ */ W("span", {
615
+ className: o("ms-auto", Ve.selectedIcon),
616
+ children: /* @__PURE__ */ W(M, {
617
617
  size: c,
618
- "aria-hidden": !0
618
+ "aria-hidden": !0,
619
+ stroke: f
619
620
  })
620
621
  }) : null,
621
- label: /* @__PURE__ */ G("span", {
622
- className: p,
622
+ label: /* @__PURE__ */ W("span", {
623
+ className: m,
623
624
  children: e.label
624
625
  }),
625
- onClick: () => f(e.id)
626
+ onClick: () => p(e.id)
626
627
  })
627
628
  }, e.id))
628
629
  })
629
- }), Ke = {
630
+ }), Ue = {
630
631
  selectedToolIcon: "_selectedToolIcon_r268y_1",
631
632
  toolIcon: "_toolIcon_r268y_5",
632
633
  chevronIcon: "_chevronIcon_r268y_9"
633
- }, qe = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: u, listClassName: f = "w-[240px]", isDisabled: p = !1, chatSettings: g, extraMenuItems: v, toolsMenuItems: y = [], onToolToggle: b, toolsMenuTitle: x = "Tools", toolsBackLabel: S = "Back", promptsMenuOverlay: C, promptsMenuTitle: w = "Prompts", promptsBackLabel: T = "Back", colors: E }) => {
634
- let D = s(), [O, k] = U(!1), [A, j] = U(!1), [ee, te] = U(!1), [ne, re] = U(!1), [ie, P] = U(!1), F = V(() => a({
635
- "--aab-selected-tool-icon": E?.selectedToolIcon,
636
- "--aab-tool-icon": E?.toolIcon,
637
- "--aab-chevron-icon": E?.chevronIcon
634
+ }, We = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: l, style: u, listClassName: p = "w-[240px]", isDisabled: m = !1, chatSettings: _, extraMenuItems: y, toolsMenuItems: b = [], onToolToggle: x, toolsMenuTitle: S = "Tools", toolsBackLabel: C = "Back", promptsMenuOverlay: w, promptsMenuTitle: T = "Prompts", promptsBackLabel: E = "Back", colors: D }) => {
635
+ let O = s(), [k, A] = H(!1), [ee, j] = H(!1), [te, ne] = H(!1), [re, ie] = H(!1), [ae, P] = H(!1), F = B(() => a({
636
+ "--aab-selected-tool-icon": D?.selectedToolIcon,
637
+ "--aab-tool-icon": D?.toolIcon,
638
+ "--aab-chevron-icon": D?.chevronIcon
638
639
  }), [
639
- E?.selectedToolIcon,
640
- E?.toolIcon,
641
- E?.chevronIcon
642
- ]), I = y.length > 0 && b != null, ue = V(() => y.map((e) => ({
640
+ D?.selectedToolIcon,
641
+ D?.toolIcon,
642
+ D?.chevronIcon
643
+ ]), de = b.length > 0 && x != null, fe = B(() => b.map((e) => ({
643
644
  key: e.id,
644
- label: /* @__PURE__ */ K("span", {
645
+ label: /* @__PURE__ */ G("span", {
645
646
  className: "flex flex-1 items-center gap-2",
646
- children: [/* @__PURE__ */ G("span", {
647
+ children: [/* @__PURE__ */ W("span", {
647
648
  className: "flex-1",
648
649
  children: e.label
649
- }), e.isSelected && /* @__PURE__ */ G(M, {
650
+ }), e.isSelected && /* @__PURE__ */ W(M, {
650
651
  size: c,
651
652
  style: F,
652
- className: Ke.selectedToolIcon,
653
- "aria-hidden": !0
653
+ className: Ue.selectedToolIcon,
654
+ "aria-hidden": !0,
655
+ stroke: f
654
656
  })]
655
657
  }),
656
- icon: /* @__PURE__ */ G("span", {
658
+ icon: /* @__PURE__ */ W("span", {
657
659
  style: F,
658
- className: o("flex items-center", Ke.toolIcon),
660
+ className: o("flex items-center", Ue.toolIcon),
659
661
  children: e.icon
660
662
  }),
661
- onClick: () => b?.(e.id)
663
+ onClick: () => x?.(e.id)
662
664
  })), [
663
- y,
664
665
  b,
666
+ x,
665
667
  F
666
- ]), L = V(() => [
668
+ ]), I = B(() => [
667
669
  ...e == null ? [] : [{
668
670
  key: "attach",
669
671
  label: t,
670
- icon: /* @__PURE__ */ G(ae, {
672
+ icon: /* @__PURE__ */ W(oe, {
671
673
  size: c,
672
- "aria-hidden": !0
674
+ "aria-hidden": !0,
675
+ stroke: f
673
676
  }),
674
677
  onClick: e
675
678
  }],
676
- ...v ?? [],
677
- ...I ? [{
679
+ ...y ?? [],
680
+ ...de ? [{
678
681
  key: "tools",
679
- label: x,
680
- icon: /* @__PURE__ */ G(le, {
682
+ label: S,
683
+ icon: /* @__PURE__ */ W(ue, {
681
684
  size: c,
682
- "aria-hidden": !0
685
+ "aria-hidden": !0,
686
+ stroke: f
683
687
  }),
684
- onClick: D ? () => {
685
- te(!0), k(!1);
688
+ onClick: O ? () => {
689
+ ne(!0), A(!1);
686
690
  } : () => void 0,
687
- ...D ? { iconAfter: /* @__PURE__ */ G(N, {
691
+ ...O ? { iconAfter: /* @__PURE__ */ W(N, {
688
692
  size: c,
689
- stroke: 1.5,
693
+ stroke: f,
690
694
  style: F,
691
- className: o("rtl:scale-x-[-1]", Ke.chevronIcon),
695
+ className: o("rtl:scale-x-[-1]", Ue.chevronIcon),
692
696
  "aria-hidden": !0
693
- }) } : { children: ue }
697
+ }) } : { children: fe }
694
698
  }] : [],
695
- ...C == null ? [] : [{
699
+ ...w == null ? [] : [{
696
700
  key: "prompts",
697
- label: w,
698
- icon: /* @__PURE__ */ G(se, {
701
+ label: T,
702
+ icon: /* @__PURE__ */ W(ce, {
699
703
  size: c,
700
- "aria-hidden": !0
704
+ "aria-hidden": !0,
705
+ stroke: f
701
706
  }),
702
- onClick: D ? () => {
703
- re(!0), k(!1);
707
+ onClick: O ? () => {
708
+ ie(!0), A(!1);
704
709
  } : () => void 0,
705
- ...D ? { iconAfter: /* @__PURE__ */ G(N, {
710
+ ...O ? { iconAfter: /* @__PURE__ */ W(N, {
706
711
  size: c,
707
- stroke: 1.5,
712
+ stroke: f,
708
713
  style: F,
709
- className: o("rtl:scale-x-[-1]", Ke.chevronIcon),
714
+ className: o("rtl:scale-x-[-1]", Ue.chevronIcon),
710
715
  "aria-hidden": !0
711
716
  }) } : {
712
717
  children: [{
713
718
  key: "prompts-panel",
714
719
  label: ""
715
720
  }],
716
- renderSubMenu: () => C(() => P(!1))
721
+ renderSubMenu: () => w(() => P(!1))
717
722
  }
718
723
  }],
719
- ...g == null ? [] : [{
724
+ ..._ == null ? [] : [{
720
725
  key: "chat-settings",
721
- label: g.menuItemLabel ?? "Chat settings",
722
- icon: /* @__PURE__ */ G(ce, {
726
+ label: _.menuItemLabel ?? "Chat settings",
727
+ icon: /* @__PURE__ */ W(le, {
723
728
  size: c,
724
- "aria-hidden": !0
729
+ "aria-hidden": !0,
730
+ stroke: f
725
731
  }),
726
- iconAfter: D ? /* @__PURE__ */ G(N, {
732
+ iconAfter: O ? /* @__PURE__ */ W(N, {
727
733
  size: c,
728
- stroke: 1.5,
734
+ stroke: f,
729
735
  style: F,
730
- className: o("rtl:scale-x-[-1]", Ke.chevronIcon),
736
+ className: o("rtl:scale-x-[-1]", Ue.chevronIcon),
731
737
  "aria-hidden": !0
732
738
  }) : null,
733
739
  onClick: () => j(!0)
@@ -735,228 +741,213 @@ var We = {
735
741
  ], [
736
742
  t,
737
743
  e,
738
- g,
739
- v,
740
- D,
741
- I,
742
- x,
743
- ue,
744
- C,
744
+ _,
745
+ y,
746
+ O,
747
+ de,
748
+ S,
749
+ fe,
745
750
  w,
751
+ T,
746
752
  F
747
753
  ]);
748
- if (L.length === 0) return null;
749
- let R = /* @__PURE__ */ G(m, {
754
+ if (I.length === 0) return null;
755
+ let L = /* @__PURE__ */ W(h, {
750
756
  matchReferenceWidth: !1,
751
757
  placement: "bottom-start",
752
- listClassName: f,
753
- items: L,
754
- open: C == null ? void 0 : ie,
755
- onOpenChange: C == null ? void 0 : P,
756
- children: /* @__PURE__ */ G(_, {
757
- icon: /* @__PURE__ */ G(oe, {
758
+ listClassName: p,
759
+ items: I,
760
+ open: w == null ? void 0 : ae,
761
+ onOpenChange: w == null ? void 0 : P,
762
+ children: /* @__PURE__ */ W(v, {
763
+ icon: /* @__PURE__ */ W(se, {
758
764
  size: d.LG,
759
- "aria-hidden": !0
765
+ "aria-hidden": !0,
766
+ stroke: f
760
767
  }),
761
768
  "aria-label": n,
762
769
  tooltipProps: { tooltip: n },
763
- disabled: p
770
+ disabled: m
764
771
  })
765
772
  });
766
- return /* @__PURE__ */ G(W, { children: D ? /* @__PURE__ */ K(W, { children: [
767
- /* @__PURE__ */ G(_, {
768
- icon: /* @__PURE__ */ G(oe, {
773
+ return /* @__PURE__ */ W(U, { children: O ? /* @__PURE__ */ G(U, { children: [
774
+ /* @__PURE__ */ W(v, {
775
+ icon: /* @__PURE__ */ W(se, {
769
776
  size: d.LG,
770
- "aria-hidden": !0
777
+ "aria-hidden": !0,
778
+ stroke: f
771
779
  }),
772
780
  "aria-label": n,
773
- size: h.Large,
781
+ size: g.Large,
774
782
  tooltipProps: { tooltip: n },
775
- disabled: p,
776
- onClick: () => k(!0)
783
+ disabled: m,
784
+ onClick: () => A(!0)
777
785
  }),
778
- /* @__PURE__ */ G(Le, {
779
- isOpen: O,
786
+ /* @__PURE__ */ W(Pe, {
787
+ isOpen: k,
780
788
  title: r,
781
789
  closeLabel: l,
782
- onClose: () => k(!1),
790
+ onClose: () => A(!1),
783
791
  style: u,
784
- items: L,
792
+ items: I,
785
793
  className: "pb-4",
786
794
  btnTextClassName: "flex-1"
787
795
  }),
788
- I && /* @__PURE__ */ G(Ge, {
789
- isOpen: ee,
796
+ de && /* @__PURE__ */ W(He, {
797
+ isOpen: te,
790
798
  onBack: () => {
791
- te(!1), k(!0);
799
+ ne(!1), A(!0);
792
800
  },
793
- backLabel: S,
794
- onClose: () => te(!1),
801
+ backLabel: C,
802
+ onClose: () => ne(!1),
795
803
  closeLabel: l,
796
804
  style: u,
797
- title: x,
798
- items: y,
799
- onToolToggle: b
805
+ title: S,
806
+ items: b,
807
+ onToolToggle: x
800
808
  }),
801
- C != null && /* @__PURE__ */ G(q, {
802
- isOpen: ne,
803
- title: w,
809
+ w != null && /* @__PURE__ */ W(K, {
810
+ isOpen: re,
811
+ title: T,
804
812
  closeLabel: l,
805
813
  onBack: () => {
806
- re(!1), k(!0);
814
+ ie(!1), A(!0);
807
815
  },
808
- backLabel: T,
809
- onClose: () => re(!1),
816
+ backLabel: E,
817
+ onClose: () => ie(!1),
810
818
  style: u,
811
- children: C(() => re(!1))
819
+ children: w(() => ie(!1))
812
820
  }),
813
- g != null && /* @__PURE__ */ G(Ve, {
814
- isOpen: A,
821
+ _ != null && /* @__PURE__ */ W(Re, {
822
+ isOpen: ee,
815
823
  onBack: () => {
816
- j(!1), k(!0);
824
+ j(!1), A(!0);
817
825
  },
818
- backLabel: g.backLabel ?? "Back",
826
+ backLabel: _.backLabel ?? "Back",
819
827
  onClose: () => j(!1),
820
828
  closeLabel: l,
821
829
  style: u,
822
- features: g.features,
823
- initialResponseFormat: g.responseFormat ?? i.Markdown,
824
- initialSystemPrompt: g.systemPrompt,
825
- initialTemperature: g.temperature,
826
- onSave: g.onSave,
827
- title: g.title,
828
- responseFormatLabel: g.responseFormatLabel,
829
- responseFormatHint: g.responseFormatHint,
830
- responseFormatMarkdownLabel: g.responseFormatMarkdownLabel,
831
- responseFormatPlainTextLabel: g.responseFormatPlainTextLabel,
832
- systemPromptLabel: g.systemPromptLabel,
833
- systemPromptTooltip: g.systemPromptTooltip,
834
- temperatureLabel: g.temperatureLabel,
835
- temperatureLabels: g.temperatureLabels,
836
- temperatureHint: g.temperatureHint,
837
- saveLabel: g.saveLabel,
838
- saveDisabledTooltip: g.saveDisabledTooltip
830
+ features: _.features,
831
+ initialResponseFormat: _.responseFormat ?? i.Markdown,
832
+ initialSystemPrompt: _.systemPrompt,
833
+ initialTemperature: _.temperature,
834
+ onSave: _.onSave,
835
+ title: _.title,
836
+ responseFormatLabel: _.responseFormatLabel,
837
+ responseFormatHint: _.responseFormatHint,
838
+ responseFormatMarkdownLabel: _.responseFormatMarkdownLabel,
839
+ responseFormatPlainTextLabel: _.responseFormatPlainTextLabel,
840
+ systemPromptLabel: _.systemPromptLabel,
841
+ systemPromptTooltip: _.systemPromptTooltip,
842
+ temperatureLabel: _.temperatureLabel,
843
+ temperatureLabels: _.temperatureLabels,
844
+ temperatureHint: _.temperatureHint,
845
+ saveLabel: _.saveLabel,
846
+ saveDisabledTooltip: _.saveDisabledTooltip
839
847
  })
840
- ] }) : /* @__PURE__ */ K(W, { children: [R, g != null && A && /* @__PURE__ */ G(Ue, {
841
- features: g.features,
842
- initialResponseFormat: g.responseFormat ?? i.Markdown,
843
- initialSystemPrompt: g.systemPrompt,
844
- initialTemperature: g.temperature,
845
- onSave: g.onSave,
848
+ ] }) : /* @__PURE__ */ G(U, { children: [L, _ != null && ee && /* @__PURE__ */ W(Be, {
849
+ features: _.features,
850
+ initialResponseFormat: _.responseFormat ?? i.Markdown,
851
+ initialSystemPrompt: _.systemPrompt,
852
+ initialTemperature: _.temperature,
853
+ onSave: _.onSave,
846
854
  onClose: () => j(!1),
847
- title: g.title,
848
- responseFormatLabel: g.responseFormatLabel,
849
- responseFormatHint: g.responseFormatHint,
850
- responseFormatMarkdownLabel: g.responseFormatMarkdownLabel,
851
- responseFormatPlainTextLabel: g.responseFormatPlainTextLabel,
852
- systemPromptLabel: g.systemPromptLabel,
853
- systemPromptTooltip: g.systemPromptTooltip,
854
- temperatureLabel: g.temperatureLabel,
855
- temperatureLabels: g.temperatureLabels,
856
- temperatureHint: g.temperatureHint,
857
- saveLabel: g.saveLabel,
858
- saveDisabledTooltip: g.saveDisabledTooltip
855
+ title: _.title,
856
+ responseFormatLabel: _.responseFormatLabel,
857
+ responseFormatHint: _.responseFormatHint,
858
+ responseFormatMarkdownLabel: _.responseFormatMarkdownLabel,
859
+ responseFormatPlainTextLabel: _.responseFormatPlainTextLabel,
860
+ systemPromptLabel: _.systemPromptLabel,
861
+ systemPromptTooltip: _.systemPromptTooltip,
862
+ temperatureLabel: _.temperatureLabel,
863
+ temperatureLabels: _.temperatureLabels,
864
+ temperatureHint: _.temperatureHint,
865
+ saveLabel: _.saveLabel,
866
+ saveDisabledTooltip: _.saveDisabledTooltip
859
867
  })] }) });
860
- }, J = {
861
- chip: "_chip_1gu87_1",
862
- chipIcon: "_chipIcon_1gu87_6",
863
- chipText: "_chipText_1gu87_10",
864
- chipClose: "_chipClose_1gu87_14"
865
- }, Je = (e) => `${e} tool${e === 1 ? "" : "s"}`, Ye = (e) => `Remove ${e}`, Xe = ({ items: e, onToolToggle: t, isMobile: n, countLabel: r = Je, removeLabel: i = Ye, typography: s, colors: l }) => {
866
- let u = e.filter((e) => e.isSelected);
867
- if (u.length === 0) return null;
868
- let d = a({
869
- "--ci-chip-bg": l?.chipBg,
870
- "--ci-chip-border": l?.chipBorder,
871
- "--ci-chip-icon": l?.chipIcon,
872
- "--ci-chip-text": l?.chipText,
873
- "--ci-chip-close": l?.chipClose,
874
- "--ci-chip-close-hover": l?.chipCloseHover
875
- });
876
- if (n) {
877
- let e = u.length === 1, t = e ? u[0].icon : /* @__PURE__ */ G(le, {
878
- size: c,
879
- "aria-hidden": !0
880
- }), n = e ? u[0].label : r(u.length);
881
- return /* @__PURE__ */ G("div", {
882
- className: "flex flex-wrap items-center gap-2",
883
- style: d,
884
- children: /* @__PURE__ */ K("div", {
885
- className: o(J.chip, "flex min-w-0 items-center gap-1.5 rounded-full border px-2 py-1"),
886
- children: [/* @__PURE__ */ G("span", {
887
- className: o(J.chipIcon, "shrink-0"),
888
- "aria-hidden": !0,
889
- children: t
890
- }), /* @__PURE__ */ G("span", {
891
- className: o(J.chipText, s?.fontClassName || "dial-small-paragraph-text", "truncate"),
892
- children: n
893
- })]
868
+ }, q = {
869
+ chip: "_chip_ydmd8_1",
870
+ chipSelected: "_chipSelected_ydmd8_9",
871
+ chipIcon: "_chipIcon_ydmd8_16",
872
+ chipText: "_chipText_ydmd8_19",
873
+ chipClose: "_chipClose_ydmd8_22"
874
+ }, Ge = (e) => `Remove ${e}`, Ke = ({ items: e, onToolToggle: t, onToolDismiss: n, removeLabel: r = Ge, typography: i, colors: s }) => e.length === 0 ? null : /* @__PURE__ */ W("div", {
875
+ className: "flex flex-wrap items-center gap-2",
876
+ style: a({
877
+ "--ci-chip-bg": s?.chipBg,
878
+ "--ci-chip-border": s?.chipBorder,
879
+ "--ci-chip-icon": s?.chipIcon,
880
+ "--ci-chip-text": s?.chipText,
881
+ "--ci-chip-hover-bg": s?.chipHoverBg,
882
+ "--ci-chip-selected-bg": s?.chipSelectedBg,
883
+ "--ci-chip-selected-border": s?.chipSelectedBorder,
884
+ "--ci-chip-selected-icon": s?.chipSelectedIcon,
885
+ "--ci-chip-selected-text": s?.chipSelectedText,
886
+ "--ci-chip-close": s?.chipClose,
887
+ "--ci-chip-close-hover": s?.chipCloseHover
888
+ }),
889
+ children: e.map((e) => /* @__PURE__ */ G("div", {
890
+ className: o(q.chip, e.isSelected && q.chipSelected, "flex min-w-0 items-center gap-1.5 rounded-full border py-1 pe-1 ps-2 transition-colors"),
891
+ children: [/* @__PURE__ */ G("button", {
892
+ type: "button",
893
+ onClick: () => t(e.id),
894
+ "aria-pressed": e.isSelected,
895
+ className: "flex min-w-0 items-center gap-1.5",
896
+ children: [/* @__PURE__ */ W("span", {
897
+ className: o(q.chipIcon, "shrink-0"),
898
+ "aria-hidden": !0,
899
+ children: e.icon
900
+ }), /* @__PURE__ */ W("span", {
901
+ className: o(q.chipText, i?.fontClassName || "dial-small-paragraph-text", "truncate"),
902
+ children: e.label
903
+ })]
904
+ }), /* @__PURE__ */ W("button", {
905
+ type: "button",
906
+ onClick: () => n(e.id),
907
+ "aria-label": r(e.label),
908
+ className: o(q.chipClose, "flex shrink-0 items-center rounded p-0.5 transition-colors"),
909
+ children: /* @__PURE__ */ W(de, {
910
+ size: 12,
911
+ "aria-hidden": !0,
912
+ stroke: f
894
913
  })
895
- });
896
- }
897
- return /* @__PURE__ */ G("div", {
898
- className: "flex flex-wrap items-center gap-2",
899
- style: d,
900
- children: u.map((e) => /* @__PURE__ */ K("div", {
901
- className: o(J.chip, "flex items-center gap-1.5 rounded-full border py-1 pe-1 ps-2"),
902
- children: [
903
- /* @__PURE__ */ G("span", {
904
- className: J.chipIcon,
905
- "aria-hidden": !0,
906
- children: e.icon
907
- }),
908
- /* @__PURE__ */ G("span", {
909
- className: o(J.chipText, s?.fontClassName || "dial-small-paragraph-text"),
910
- children: e.label
911
- }),
912
- /* @__PURE__ */ G("button", {
913
- type: "button",
914
- onClick: () => t(e.id),
915
- className: o(J.chipClose, "flex items-center rounded p-0.5 transition-colors"),
916
- "aria-label": i(e.label),
917
- children: /* @__PURE__ */ G(I, {
918
- size: 12,
919
- "aria-hidden": !0
920
- })
921
- })
922
- ]
923
- }, e.id))
924
- });
925
- }, Y = {
914
+ })]
915
+ }, e.id))
916
+ }), J = {
926
917
  wrapper: "_wrapper_15jsc_1",
927
918
  wrapperDisabled: "_wrapperDisabled_15jsc_8",
928
919
  textarea: "_textarea_15jsc_13",
929
920
  modelSelectorButton: "_modelSelectorButton_15jsc_24",
930
921
  modelSelectorCaret: "_modelSelectorCaret_15jsc_24",
931
922
  modelSelectorButtonDisabled: "_modelSelectorButtonDisabled_15jsc_33"
932
- }, X = {
923
+ }, qe = {
933
924
  wrapperError: "_wrapperError_129ri_1",
934
925
  waveformCanvas: "_waveformCanvas_129ri_5",
935
926
  recordingDot: "_recordingDot_129ri_19",
936
927
  "recording-pulse": "_recording-pulse_129ri_1"
937
- }, Ze = 3, Qe = 4, $e = 200, et = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, stopLabel: a = "Stop recording", discardLabel: s = "Discard recording", style: c, className: l }) => {
938
- let u = H(null), f = H(new Float32Array($e)), p = H(0), m = H(0), h = e === je.Recording, v = e === je.Error, y = z((e) => {
928
+ }, Je = 3, Ye = 4, Y = 200, Xe = ({ state: e, analyserNodeRef: t, errorMessage: n, onStop: r, onDiscard: i, stopLabel: a = "Stop recording", discardLabel: s = "Discard recording", style: c, className: l }) => {
929
+ let u = V(null), p = V(new Float32Array(Y)), m = V(0), h = V(0), g = e === Oe.Recording, y = e === Oe.Error, b = R((e) => {
939
930
  let t = e.getContext("2d");
940
931
  if (!t) return;
941
932
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
942
933
  let { width: n, height: r } = e;
943
934
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
944
- let i = Math.min(Math.max(1, Math.floor(n / Qe)), $e - 1), a = p.current, o = m.current;
935
+ let i = Math.min(Math.max(1, Math.floor(n / Ye)), Y - 1), a = m.current, o = h.current;
945
936
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
946
937
  for (let e = 0; e <= i; e++) {
947
- let n = ((a - i + e) % $e + $e) % $e, o = f.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
948
- t.fillRect(e * Qe, (r - c) / 2, Ze, c);
938
+ let n = ((a - i + e) % Y + Y) % Y, o = p.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
939
+ t.fillRect(e * Ye, (r - c) / 2, Je, c);
949
940
  }
950
941
  t.restore();
951
942
  }, []);
952
- B(() => {
953
- if (!h) return;
943
+ z(() => {
944
+ if (!g) return;
954
945
  let e = u.current;
955
946
  if (!e) return;
956
- f.current.fill(0), p.current = 0, m.current = 0;
947
+ p.current.fill(0), m.current = 0, h.current = 0;
957
948
  let n, r = () => {
958
- if (m.current += 1, m.current >= Qe) {
959
- m.current -= Qe;
949
+ if (h.current += 1, h.current >= Ye) {
950
+ h.current -= Ye;
960
951
  let e = t.current;
961
952
  if (e) {
962
953
  let t = new Uint8Array(e.frequencyBinCount);
@@ -966,37 +957,38 @@ var We = {
966
957
  let r = (t[e] - 128) / 128;
967
958
  n += r * r;
968
959
  }
969
- f.current[p.current % $e] = Math.sqrt(n / t.length), p.current++;
960
+ p.current[m.current % Y] = Math.sqrt(n / t.length), m.current++;
970
961
  }
971
962
  }
972
- y(e), n = requestAnimationFrame(r);
963
+ b(e), n = requestAnimationFrame(r);
973
964
  };
974
965
  return n = requestAnimationFrame(r), () => {
975
966
  cancelAnimationFrame(n);
976
967
  };
977
968
  }, [
978
- h,
969
+ g,
979
970
  t,
980
- y
981
- ]), B(() => {
971
+ b
972
+ ]), z(() => {
982
973
  let e = u.current;
983
974
  if (!e) return;
984
975
  let t = new ResizeObserver(() => {
985
- y(e);
976
+ b(e);
986
977
  });
987
978
  return t.observe(e), () => t.disconnect();
988
- }, [y]);
989
- let b = /* @__PURE__ */ K("div", {
979
+ }, [b]);
980
+ let x = /* @__PURE__ */ G("div", {
990
981
  className: "flex flex-shrink-0 items-center justify-end gap-1",
991
- children: [/* @__PURE__ */ G(_, {
992
- icon: /* @__PURE__ */ G(I, {
982
+ children: [/* @__PURE__ */ W(v, {
983
+ icon: /* @__PURE__ */ W(de, {
993
984
  size: d.LG,
994
- "aria-hidden": !0
985
+ "aria-hidden": !0,
986
+ stroke: f
995
987
  }),
996
988
  "aria-label": s,
997
989
  onClick: i
998
- }), h && /* @__PURE__ */ G(C, {
999
- icon: /* @__PURE__ */ G(P, {
990
+ }), g && /* @__PURE__ */ W(w, {
991
+ icon: /* @__PURE__ */ W(P, {
1000
992
  size: d.LG,
1001
993
  "aria-hidden": !0
1002
994
  }),
@@ -1004,92 +996,96 @@ var We = {
1004
996
  "aria-label": a
1005
997
  })]
1006
998
  });
1007
- return /* @__PURE__ */ K("div", {
999
+ return /* @__PURE__ */ G("div", {
1008
1000
  className: l,
1009
- children: [/* @__PURE__ */ K("div", {
1001
+ children: [/* @__PURE__ */ G("div", {
1010
1002
  style: c,
1011
- className: o(Y.wrapper, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 shadow-md desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", v && X.wrapperError),
1012
- children: [/* @__PURE__ */ K("div", {
1003
+ className: o(J.wrapper, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 shadow-md desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", y && qe.wrapperError),
1004
+ children: [/* @__PURE__ */ G("div", {
1013
1005
  className: "flex min-w-0 flex-1 items-center gap-3",
1014
- children: [h && /* @__PURE__ */ G("span", {
1015
- className: o(X.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1006
+ children: [g && /* @__PURE__ */ W("span", {
1007
+ className: o(qe.recordingDot, "pointer-events-none block size-[8px] rounded-3xl"),
1016
1008
  "aria-hidden": !0
1017
- }), /* @__PURE__ */ G("canvas", {
1009
+ }), /* @__PURE__ */ W("canvas", {
1018
1010
  ref: u,
1019
1011
  height: 32,
1020
- className: o(X.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
1012
+ className: o(qe.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
1021
1013
  })]
1022
- }), b]
1023
- }), v && n && /* @__PURE__ */ G(g, {
1014
+ }), x]
1015
+ }), y && n && /* @__PURE__ */ W(_, {
1024
1016
  text: n,
1025
1017
  className: "mt-1 px-1"
1026
1018
  })]
1027
1019
  });
1028
- }, tt = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ G(C, {
1020
+ }, Ze = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", isExiting: r = !1 }) => /* @__PURE__ */ W(w, {
1029
1021
  "aria-label": n,
1030
1022
  onClick: () => e?.(),
1031
1023
  disabled: t,
1032
1024
  "aria-hidden": r,
1033
- icon: /* @__PURE__ */ G(te, {
1025
+ icon: /* @__PURE__ */ W(ne, {
1034
1026
  size: d.LG,
1035
- className: "rtl:scale-x-[-1]"
1027
+ className: "rtl:scale-x-[-1]",
1028
+ stroke: f
1036
1029
  })
1037
- }), nt = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ G(k, {
1038
- icon: /* @__PURE__ */ G(F, { size: d.LG }),
1030
+ }), Qe = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ W(A, {
1031
+ icon: /* @__PURE__ */ W(F, {
1032
+ size: d.LG,
1033
+ stroke: f
1034
+ }),
1039
1035
  onClick: () => e?.(),
1040
1036
  "aria-label": t
1041
- }), Z = ({ size: e = 20 }) => /* @__PURE__ */ G(D, {
1042
- variant: O.Circular,
1037
+ }), $e = ({ size: e = 20 }) => /* @__PURE__ */ W(O, {
1038
+ variant: k.Circular,
1043
1039
  width: e,
1044
1040
  height: e,
1045
1041
  active: !0
1046
- }), rt = ({ loadingLabel: e }) => /* @__PURE__ */ K("span", {
1042
+ }), et = ({ loadingLabel: e }) => /* @__PURE__ */ G("span", {
1047
1043
  className: "flex min-w-0 flex-1 items-center",
1048
- children: [/* @__PURE__ */ G(D, {
1049
- variant: O.Text,
1044
+ children: [/* @__PURE__ */ W(O, {
1045
+ variant: k.Text,
1050
1046
  width: "100%",
1051
1047
  height: 16,
1052
1048
  active: !0
1053
- }), e && /* @__PURE__ */ G("span", {
1049
+ }), e && /* @__PURE__ */ W("span", {
1054
1050
  className: "sr-only",
1055
1051
  children: e
1056
1052
  })]
1057
- }), it = ({ loadingLabel: e }) => /* @__PURE__ */ G("div", {
1053
+ }), tt = ({ loadingLabel: e }) => /* @__PURE__ */ W("div", {
1058
1054
  role: "status",
1059
1055
  "aria-label": e,
1060
- children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ K("div", {
1056
+ children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ G("div", {
1061
1057
  className: "flex h-11 items-center gap-3 px-4",
1062
1058
  "aria-hidden": "true",
1063
- children: [/* @__PURE__ */ G(Z, {}), /* @__PURE__ */ G(rt, {})]
1059
+ children: [/* @__PURE__ */ W($e, {}), /* @__PURE__ */ W(et, {})]
1064
1060
  }, t))
1065
- }), at = (e) => e.displayName ?? e.id, ot = (e, t) => {
1061
+ }), X = (e) => e.displayName ?? e.id, Z = (e, t) => {
1066
1062
  let n = t.trim().toLowerCase();
1067
- return n ? e.filter((e) => at(e).toLowerCase().includes(n)) : e;
1068
- }, st = (e, t, r, i = 18, a) => /* @__PURE__ */ G(n, {
1063
+ return n ? e.filter((e) => X(e).toLowerCase().includes(n)) : e;
1064
+ }, nt = (e, t, r, i = 18, a) => /* @__PURE__ */ W(n, {
1069
1065
  src: e,
1070
1066
  size: i,
1071
1067
  labels: { tooltip: a },
1072
1068
  initialsName: r
1073
- }), ct = {
1069
+ }), rt = {
1074
1070
  searchHeader: "_searchHeader_1tt5t_1",
1075
1071
  selectedItem: "_selectedItem_1tt5t_5",
1076
1072
  selectedItemCheck: "_selectedItemCheck_1tt5t_9"
1077
- }, lt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = ct.searchHeader, selectedItemClassName: s = ct.selectedItem, selectedItemCheckClassName: c = ct.selectedItemCheck, colors: l }) => {
1078
- let [u, f] = U(""), p = V(() => e?.find((e) => e.id === t), [e, t]), m = r?.loading !== void 0, g = !m && !p && !!t, _ = V(() => m ? /* @__PURE__ */ G(Z, { size: d.LG }) : st(p?.iconUrl, p?.type, p?.displayName ?? p?.id ?? "", d.LG, g ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1073
+ }, it = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = rt.searchHeader, selectedItemClassName: s = rt.selectedItem, selectedItemCheckClassName: c = rt.selectedItemCheck, colors: l }) => {
1074
+ let [u, p] = H(""), m = B(() => e?.find((e) => e.id === t), [e, t]), h = r?.loading !== void 0, _ = !h && !m && !!t, v = B(() => h ? /* @__PURE__ */ W($e, { size: d.LG }) : nt(m?.iconUrl, m?.type, m?.displayName ?? m?.id ?? "", d.LG, _ ? r?.unavailableTooltip ?? "This deployment is no longer available" : void 0), [
1075
+ h,
1079
1076
  m,
1080
- p,
1081
- g,
1077
+ _,
1082
1078
  r?.unavailableTooltip
1083
- ]), y = p?.displayName ?? p?.id;
1079
+ ]), b = m?.displayName ?? m?.id;
1084
1080
  return {
1085
- selectorIcon: _,
1086
- selectorAriaLabel: y ? `${r?.ariaLabel ?? "Select model"}: ${y}` : r?.ariaLabel ?? "Select model",
1087
- selectedLabel: y,
1088
- menuItems: V(() => {
1089
- if (m) return Array.from({ length: 7 }, (e, t) => ({
1081
+ selectorIcon: v,
1082
+ selectorAriaLabel: b ? `${r?.ariaLabel ?? "Select model"}: ${b}` : r?.ariaLabel ?? "Select model",
1083
+ selectedLabel: b,
1084
+ menuItems: B(() => {
1085
+ if (h) return Array.from({ length: 7 }, (e, t) => ({
1090
1086
  key: `__loading-${t}`,
1091
- icon: /* @__PURE__ */ G(Z, {}),
1092
- label: /* @__PURE__ */ G(rt, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1087
+ icon: /* @__PURE__ */ W($e, {}),
1088
+ label: /* @__PURE__ */ W(et, { loadingLabel: t === 0 ? r?.loading : void 0 }),
1093
1089
  disabled: !0
1094
1090
  }));
1095
1091
  if (!e || e.length === 0) {
@@ -1100,32 +1096,32 @@ var We = {
1100
1096
  disabled: !0
1101
1097
  }] : [];
1102
1098
  }
1103
- return ot(e, u).map((e) => {
1099
+ return Z(e, u).map((e) => {
1104
1100
  let r = e.id === t;
1105
1101
  return {
1106
1102
  key: e.id,
1107
- label: /* @__PURE__ */ K("span", {
1103
+ label: /* @__PURE__ */ G("span", {
1108
1104
  className: "flex w-full items-center justify-between gap-2",
1109
1105
  style: a({ "--ms-selected-item-check": l?.selectedItemCheck }),
1110
- children: [/* @__PURE__ */ G(v, {
1111
- text: at(e),
1106
+ children: [/* @__PURE__ */ W(y, {
1107
+ text: X(e),
1112
1108
  query: u,
1113
1109
  maxLines: 1
1114
- }), r && /* @__PURE__ */ G(M, {
1110
+ }), r && /* @__PURE__ */ W(M, {
1115
1111
  size: d.SM,
1116
- stroke: 2,
1112
+ stroke: f,
1117
1113
  className: c,
1118
1114
  "aria-hidden": !0
1119
1115
  })]
1120
1116
  }),
1121
- icon: st(e.iconUrl, e.type, e.displayName ?? e.id),
1117
+ icon: nt(e.iconUrl, e.type, e.displayName ?? e.id),
1122
1118
  onClick: () => n?.(e.id),
1123
1119
  className: r ? s : void 0
1124
1120
  };
1125
1121
  });
1126
1122
  }, [
1127
1123
  e,
1128
- m,
1124
+ h,
1129
1125
  u,
1130
1126
  t,
1131
1127
  r,
@@ -1134,30 +1130,30 @@ var We = {
1134
1130
  c,
1135
1131
  l?.selectedItemCheck
1136
1132
  ]),
1137
- menuHeader: V(() => !m && e && e.length > 0 ? /* @__PURE__ */ G("div", {
1133
+ menuHeader: B(() => !h && e && e.length > 0 ? /* @__PURE__ */ W("div", {
1138
1134
  style: a({ "--ms-search-header-bg": l?.searchHeaderBackground }),
1139
1135
  className: o("sticky top-0 z-10 pb-1 pe-2 pt-2", i),
1140
- children: /* @__PURE__ */ G(E, {
1136
+ children: /* @__PURE__ */ W(D, {
1141
1137
  value: u,
1142
1138
  placeholder: r?.searchPlaceholder ?? "Search",
1143
- size: h.Small,
1139
+ size: g.Small,
1144
1140
  wrapperClassName: "border-0",
1145
- onChange: (e) => f(e ?? "")
1141
+ onChange: (e) => p(e ?? "")
1146
1142
  })
1147
1143
  }) : void 0, [
1148
1144
  e,
1149
- m,
1145
+ h,
1150
1146
  u,
1151
1147
  r,
1152
1148
  i,
1153
1149
  l?.searchHeaderBackground
1154
1150
  ]),
1155
1151
  onOpenChange: (e) => {
1156
- e || f("");
1152
+ e || p("");
1157
1153
  }
1158
1154
  };
1159
- }, ut = typeof window < "u" ? fe : B;
1160
- function dt(e) {
1155
+ }, Q = typeof window < "u" ? me : z;
1156
+ function at(e) {
1161
1157
  if (e !== void 0) switch (typeof e) {
1162
1158
  case "number": return e;
1163
1159
  case "string":
@@ -1165,15 +1161,15 @@ function dt(e) {
1165
1161
  break;
1166
1162
  }
1167
1163
  }
1168
- function ft({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1169
- let { styleHeight: s, styleWidth: c } = V(() => ({
1170
- styleHeight: dt(o?.height),
1171
- styleWidth: dt(o?.width)
1172
- }), [o?.height, o?.width]), [l, u] = U({
1164
+ function ot({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
1165
+ let { styleHeight: s, styleWidth: c } = B(() => ({
1166
+ styleHeight: at(o?.height),
1167
+ styleWidth: at(o?.width)
1168
+ }), [o?.height, o?.width]), [l, u] = H({
1173
1169
  height: t,
1174
1170
  width: n
1175
1171
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
1176
- return ut(() => {
1172
+ return Q(() => {
1177
1173
  if (i === null || d) return;
1178
1174
  let t = new ResizeObserver((e) => {
1179
1175
  for (let t of e) {
@@ -1193,7 +1189,7 @@ function ft({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1193
1189
  i,
1194
1190
  s,
1195
1191
  c
1196
- ]), V(() => ({
1192
+ ]), B(() => ({
1197
1193
  height: s ?? l.height,
1198
1194
  width: c ?? l.width
1199
1195
  }), [
@@ -1202,26 +1198,26 @@ function ft({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1202
1198
  c
1203
1199
  ]);
1204
1200
  }
1205
- function pt(e) {
1206
- let t = H(() => {
1201
+ function st(e) {
1202
+ let t = V(() => {
1207
1203
  throw Error("Cannot call during render.");
1208
1204
  });
1209
- return ut(() => {
1205
+ return Q(() => {
1210
1206
  t.current = e;
1211
- }, [e]), z((e) => t.current?.(e), [t]);
1207
+ }, [e]), R((e) => t.current?.(e), [t]);
1212
1208
  }
1213
- var mt = null;
1214
- function ht(e = !1) {
1215
- if (mt === null || e) {
1209
+ var ct = null;
1210
+ function lt(e = !1) {
1211
+ if (ct === null || e) {
1216
1212
  let e = document.createElement("div"), t = e.style;
1217
1213
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
1218
1214
  let n = document.createElement("div"), r = n.style;
1219
- return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? mt = "positive-descending" : (e.scrollLeft = 1, mt = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), mt;
1215
+ return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? ct = "positive-descending" : (e.scrollLeft = 1, ct = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), ct;
1220
1216
  }
1221
- return mt;
1217
+ return ct;
1222
1218
  }
1223
- function gt({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1224
- if (t === "horizontal" && n) switch (ht()) {
1219
+ function ut({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1220
+ if (t === "horizontal" && n) switch (lt()) {
1225
1221
  case "negative": return -r;
1226
1222
  case "positive-descending":
1227
1223
  if (e) {
@@ -1232,26 +1228,26 @@ function gt({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1232
1228
  }
1233
1229
  return r;
1234
1230
  }
1235
- function Q(e, t = "Assertion error") {
1231
+ function $(e, t = "Assertion error") {
1236
1232
  if (!e) throw console.error(t), Error(t);
1237
1233
  }
1238
- function _t(e, t) {
1234
+ function dt(e, t) {
1239
1235
  if (e === t) return !0;
1240
- if (!!e != !!t || (Q(e !== void 0), Q(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1236
+ if (!!e != !!t || ($(e !== void 0), $(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1241
1237
  for (let n in e) if (!Object.is(t[n], e[n])) return !1;
1242
1238
  return !0;
1243
1239
  }
1244
- function vt({ cachedBounds: e, itemCount: t, itemSize: n }) {
1240
+ function ft({ cachedBounds: e, itemCount: t, itemSize: n }) {
1245
1241
  if (t === 0) return 0;
1246
1242
  if (typeof n == "number") return t * n;
1247
1243
  {
1248
1244
  let n = e.get(e.size === 0 ? 0 : e.size - 1);
1249
- return Q(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1245
+ return $(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
1250
1246
  }
1251
1247
  }
1252
- function yt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1248
+ function pt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1253
1249
  if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
1254
- let s = vt({
1250
+ let s = ft({
1255
1251
  cachedBounds: t,
1256
1252
  itemCount: r,
1257
1253
  itemSize: i
@@ -1263,7 +1259,7 @@ function yt({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, co
1263
1259
  default: return a >= u && a <= l ? a : a < u ? u : l;
1264
1260
  }
1265
1261
  }
1266
- function bt({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1262
+ function mt({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
1267
1263
  let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
1268
1264
  for (; u < a;) {
1269
1265
  let n = e.get(u);
@@ -1282,11 +1278,11 @@ function bt({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemC
1282
1278
  stopIndexOverscan: l
1283
1279
  };
1284
1280
  }
1285
- function xt({ itemCount: e, itemProps: t, itemSize: n }) {
1281
+ function ht({ itemCount: e, itemProps: t, itemSize: n }) {
1286
1282
  let r = /* @__PURE__ */ new Map();
1287
1283
  return {
1288
1284
  get(i) {
1289
- for (Q(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1285
+ for ($(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
1290
1286
  let e = r.size, a;
1291
1287
  switch (typeof n) {
1292
1288
  case "function":
@@ -1302,14 +1298,14 @@ function xt({ itemCount: e, itemProps: t, itemSize: n }) {
1302
1298
  });
1303
1299
  else {
1304
1300
  let t = r.get(e - 1);
1305
- Q(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1301
+ $(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
1306
1302
  scrollOffset: t.scrollOffset + t.size,
1307
1303
  size: a
1308
1304
  });
1309
1305
  }
1310
1306
  }
1311
1307
  let a = r.get(i);
1312
- return Q(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1308
+ return $(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
1313
1309
  },
1314
1310
  set(e, t) {
1315
1311
  r.set(e, t);
@@ -1319,8 +1315,8 @@ function xt({ itemCount: e, itemProps: t, itemSize: n }) {
1319
1315
  }
1320
1316
  };
1321
1317
  }
1322
- function St({ itemCount: e, itemProps: t, itemSize: n }) {
1323
- return V(() => xt({
1318
+ function gt({ itemCount: e, itemProps: t, itemSize: n }) {
1319
+ return B(() => ht({
1324
1320
  itemCount: e,
1325
1321
  itemProps: t,
1326
1322
  itemSize: n
@@ -1330,11 +1326,11 @@ function St({ itemCount: e, itemProps: t, itemSize: n }) {
1330
1326
  n
1331
1327
  ]);
1332
1328
  }
1333
- function Ct({ containerSize: e, itemSize: t }) {
1329
+ function _t({ containerSize: e, itemSize: t }) {
1334
1330
  let n;
1335
1331
  switch (typeof t) {
1336
1332
  case "string":
1337
- 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;
1333
+ $(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;
1338
1334
  break;
1339
1335
  default:
1340
1336
  n = t;
@@ -1342,21 +1338,21 @@ function Ct({ containerSize: e, itemSize: t }) {
1342
1338
  }
1343
1339
  return n;
1344
1340
  }
1345
- function wt({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1346
- let { height: u = n, width: d = n } = ft({
1341
+ function vt({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1342
+ let { height: u = n, width: d = n } = ot({
1347
1343
  defaultHeight: r === "vertical" ? n : void 0,
1348
1344
  defaultWidth: r === "horizontal" ? n : void 0,
1349
1345
  element: e,
1350
1346
  mode: r === "vertical" ? "only-height" : "only-width",
1351
1347
  style: t
1352
- }), f = H({
1348
+ }), f = V({
1353
1349
  height: 0,
1354
1350
  width: 0
1355
- }), p = r === "vertical" ? u : d, m = Ct({
1351
+ }), p = r === "vertical" ? u : d, m = _t({
1356
1352
  containerSize: p,
1357
1353
  itemSize: s
1358
1354
  });
1359
- fe(() => {
1355
+ me(() => {
1360
1356
  if (typeof c == "function") {
1361
1357
  let e = f.current;
1362
1358
  (e.height !== u || e.width !== d) && (c({
@@ -1369,11 +1365,11 @@ function wt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1369
1365
  c,
1370
1366
  d
1371
1367
  ]);
1372
- let h = St({
1368
+ let h = gt({
1373
1369
  itemCount: a,
1374
1370
  itemProps: o,
1375
1371
  itemSize: m
1376
- }), g = z((e) => h.get(e), [h]), [_, v] = U(() => bt({
1372
+ }), g = R((e) => h.get(e), [h]), [_, v] = H(() => mt({
1377
1373
  cachedBounds: h,
1378
1374
  containerScrollOffset: 0,
1379
1375
  containerSize: p,
@@ -1384,7 +1380,7 @@ function wt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1384
1380
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
1385
1381
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
1386
1382
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
1387
- }, C = z(() => vt({
1383
+ }, C = R(() => ft({
1388
1384
  cachedBounds: h,
1389
1385
  itemCount: a,
1390
1386
  itemSize: m
@@ -1392,9 +1388,9 @@ function wt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1392
1388
  h,
1393
1389
  a,
1394
1390
  m
1395
- ]), w = z((t) => bt({
1391
+ ]), w = R((t) => mt({
1396
1392
  cachedBounds: h,
1397
- containerScrollOffset: gt({
1393
+ containerScrollOffset: ut({
1398
1394
  containerElement: e,
1399
1395
  direction: r,
1400
1396
  isRtl: i,
@@ -1412,19 +1408,19 @@ function wt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1412
1408
  a,
1413
1409
  l
1414
1410
  ]);
1415
- return ut(() => {
1411
+ return Q(() => {
1416
1412
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
1417
1413
  }, [
1418
1414
  e,
1419
1415
  r,
1420
1416
  w
1421
- ]), ut(() => {
1417
+ ]), Q(() => {
1422
1418
  if (!e) return;
1423
1419
  let t = () => {
1424
1420
  v((t) => {
1425
- let { scrollLeft: n, scrollTop: o } = e, s = bt({
1421
+ let { scrollLeft: n, scrollTop: o } = e, s = mt({
1426
1422
  cachedBounds: h,
1427
- containerScrollOffset: gt({
1423
+ containerScrollOffset: ut({
1428
1424
  containerElement: e,
1429
1425
  direction: r,
1430
1426
  isRtl: i,
@@ -1434,7 +1430,7 @@ function wt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1434
1430
  itemCount: a,
1435
1431
  overscanCount: l
1436
1432
  });
1437
- return _t(s, t) ? t : s;
1433
+ return dt(s, t) ? t : s;
1438
1434
  });
1439
1435
  };
1440
1436
  return e.addEventListener("scroll", t), () => {
@@ -1450,8 +1446,8 @@ function wt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1450
1446
  ]), {
1451
1447
  getCellBounds: g,
1452
1448
  getEstimatedSize: C,
1453
- scrollToIndex: pt(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1454
- let s = yt({
1449
+ scrollToIndex: st(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1450
+ let s = pt({
1455
1451
  align: t,
1456
1452
  cachedBounds: h,
1457
1453
  containerScrollOffset: n,
@@ -1461,14 +1457,14 @@ function wt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1461
1457
  itemSize: m
1462
1458
  });
1463
1459
  if (e) {
1464
- if (s = gt({
1460
+ if (s = ut({
1465
1461
  containerElement: e,
1466
1462
  direction: r,
1467
1463
  isRtl: i,
1468
1464
  scrollOffset: s
1469
1465
  }), typeof e.scrollTo != "function") {
1470
1466
  let e = w(s);
1471
- _t(_, e) || v(e);
1467
+ dt(_, e) || v(e);
1472
1468
  }
1473
1469
  return s;
1474
1470
  }
@@ -1479,30 +1475,30 @@ function wt({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1479
1475
  stopIndexVisible: x
1480
1476
  };
1481
1477
  }
1482
- function $(e) {
1483
- return V(() => e, Object.values(e));
1478
+ function yt(e) {
1479
+ return B(() => e, Object.values(e));
1484
1480
  }
1485
- function Tt(e, t) {
1481
+ function bt(e, t) {
1486
1482
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
1487
- return _t(n, a) && _t(r, o) && _t(i, s);
1483
+ return dt(n, a) && dt(r, o) && dt(i, s);
1488
1484
  }
1489
- function Et(e) {
1485
+ function xt(e) {
1490
1486
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
1491
1487
  }
1492
- var Dt = "data-react-window-index";
1493
- function Ot({ 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 }) {
1494
- let m = $(u), h = V(() => R(s, Tt), [s]), [g, _] = U(null), v = Et(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = wt({
1488
+ var St = "data-react-window-index";
1489
+ function Ct({ 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 }) {
1490
+ let m = yt(u), h = B(() => L(s, bt), [s]), [g, _] = H(null), v = xt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = vt({
1495
1491
  containerElement: g,
1496
1492
  containerStyle: f,
1497
1493
  defaultContainerSize: n,
1498
1494
  direction: "vertical",
1499
1495
  itemCount: c,
1500
1496
  itemProps: m,
1501
- itemSize: V(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1497
+ itemSize: B(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1502
1498
  onResize: i,
1503
1499
  overscanCount: o
1504
1500
  });
1505
- de(r, () => ({
1501
+ pe(r, () => ({
1506
1502
  get element() {
1507
1503
  return g;
1508
1504
  },
@@ -1517,12 +1513,12 @@ function Ot({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1517
1513
  top: r
1518
1514
  });
1519
1515
  }
1520
- }), [g, x]), ut(() => {
1516
+ }), [g, x]), Q(() => {
1521
1517
  if (!g) return;
1522
1518
  let e = Array.from(g.children).filter((e, t) => {
1523
1519
  if (e.hasAttribute("aria-hidden")) return !1;
1524
1520
  let n = `${S + t}`;
1525
- return e.setAttribute(Dt, n), !0;
1521
+ return e.setAttribute(St, n), !0;
1526
1522
  });
1527
1523
  if (v) return l.observeRowElements(e);
1528
1524
  }, [
@@ -1531,7 +1527,7 @@ function Ot({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1531
1527
  l,
1532
1528
  S,
1533
1529
  w
1534
- ]), B(() => {
1530
+ ]), z(() => {
1535
1531
  S >= 0 && w >= 0 && a && a({
1536
1532
  startIndex: C,
1537
1533
  stopIndex: T
@@ -1546,11 +1542,11 @@ function Ot({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1546
1542
  w,
1547
1543
  T
1548
1544
  ]);
1549
- let E = V(() => {
1545
+ let E = B(() => {
1550
1546
  let e = [];
1551
1547
  if (c > 0) for (let t = S; t <= w; t++) {
1552
1548
  let n = y(t);
1553
- e.push(/* @__PURE__ */ L(h, {
1549
+ e.push(/* @__PURE__ */ I(h, {
1554
1550
  ...m,
1555
1551
  ariaAttributes: {
1556
1552
  "aria-posinset": t + 1,
@@ -1577,7 +1573,7 @@ function Ot({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1577
1573
  m,
1578
1574
  S,
1579
1575
  w
1580
- ]), D = /* @__PURE__ */ G("div", {
1576
+ ]), D = /* @__PURE__ */ W("div", {
1581
1577
  "aria-hidden": !0,
1582
1578
  style: {
1583
1579
  height: b(),
@@ -1585,7 +1581,7 @@ function Ot({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1585
1581
  zIndex: -1
1586
1582
  }
1587
1583
  });
1588
- return L(d, {
1584
+ return I(d, {
1589
1585
  role: "list",
1590
1586
  ...p,
1591
1587
  className: t,
@@ -1599,46 +1595,47 @@ function Ot({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1599
1595
  }
1600
1596
  }, E, e, D);
1601
1597
  }
1602
- var kt = {
1598
+ var wt = {
1603
1599
  divider: "_divider_1tiyp_1",
1604
1600
  item: "_item_1tiyp_5",
1605
1601
  itemIcon: "_itemIcon_1tiyp_15",
1606
1602
  checkIcon: "_checkIcon_1tiyp_19",
1607
1603
  stateLabel: "_stateLabel_1tiyp_23"
1608
- }, At = 44, jt = 8, Mt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: s, onSelect: c }) => {
1609
- let u = r[e], f = st(u.iconUrl, u.type, u.displayName ?? u.id, d.SM), p = u.id === i;
1610
- return /* @__PURE__ */ G("div", {
1604
+ }, Tt = 44, Et = 8, Dt = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: s, onSelect: c }) => {
1605
+ let u = r[e], p = nt(u.iconUrl, u.type, u.displayName ?? u.id, d.SM), m = u.id === i;
1606
+ return /* @__PURE__ */ W("div", {
1611
1607
  style: t,
1612
1608
  ...n,
1613
- children: /* @__PURE__ */ G(l, {
1609
+ children: /* @__PURE__ */ W(l, {
1614
1610
  type: "button",
1615
- className: o(kt.item, "h-full w-full gap-3 px-4"),
1616
- iconBefore: /* @__PURE__ */ G("span", {
1617
- className: kt.itemIcon,
1618
- children: f
1611
+ className: o(wt.item, "h-full w-full gap-3 px-4"),
1612
+ iconBefore: /* @__PURE__ */ W("span", {
1613
+ className: wt.itemIcon,
1614
+ children: p
1619
1615
  }),
1620
- label: /* @__PURE__ */ K("span", {
1616
+ label: /* @__PURE__ */ G("span", {
1621
1617
  className: "flex flex-1 items-center justify-between gap-2",
1622
- children: [/* @__PURE__ */ G(v, {
1618
+ children: [/* @__PURE__ */ W(y, {
1623
1619
  text: u.displayName ?? u.id,
1624
1620
  query: s,
1625
1621
  maxLines: 1,
1626
1622
  className: o(a, "min-w-0 flex-1 text-start")
1627
- }), p && /* @__PURE__ */ G(M, {
1623
+ }), m && /* @__PURE__ */ W(M, {
1628
1624
  size: d.SM,
1629
- className: kt.checkIcon,
1630
- "aria-hidden": !0
1625
+ className: wt.checkIcon,
1626
+ "aria-hidden": !0,
1627
+ stroke: f
1631
1628
  })]
1632
1629
  }),
1633
1630
  onClick: () => c(u.id)
1634
1631
  })
1635
1632
  });
1636
- }, Nt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: s, selectedDeploymentId: c, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: g = "dial-small-text", colors: _ }) => {
1637
- let [v, y] = U("");
1638
- B(() => {
1633
+ }, Ot = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: s, selectedDeploymentId: c, onSelect: l, loadingLabel: u, errorLabel: d, emptyLabel: f, style: p, titleClassName: m = "dial-body-semi-text", labelClassName: h = "dial-small-text", colors: _ }) => {
1634
+ let [v, y] = H("");
1635
+ z(() => {
1639
1636
  e || y("");
1640
1637
  }, [e]);
1641
- let b = s && s.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? ot(s, v) : [], w = (e) => {
1638
+ let b = s && s.length > 0, x = u !== void 0, S = !b && !x ? d ?? f : void 0, C = b ? Z(s, v) : [], w = (e) => {
1642
1639
  l(e), i();
1643
1640
  }, T = a({
1644
1641
  "--ci-sheet-divider": _?.divider,
@@ -1648,7 +1645,7 @@ var kt = {
1648
1645
  "--ci-sheet-icon": _?.itemIcon,
1649
1646
  "--ci-check-icon": _?.checkIcon
1650
1647
  });
1651
- return /* @__PURE__ */ G(q, {
1648
+ return /* @__PURE__ */ W(K, {
1652
1649
  isOpen: e,
1653
1650
  title: t,
1654
1651
  closeLabel: n,
@@ -1657,77 +1654,78 @@ var kt = {
1657
1654
  titleClassName: m,
1658
1655
  className: "max-h-[80dvh]",
1659
1656
  colors: _?.shell,
1660
- children: /* @__PURE__ */ K("div", {
1657
+ children: /* @__PURE__ */ G("div", {
1661
1658
  className: "contents",
1662
1659
  style: T,
1663
- children: [b && !x && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("div", {
1660
+ children: [b && !x && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
1664
1661
  className: "flex-shrink-0 px-4 py-[10px]",
1665
- children: /* @__PURE__ */ G(E, {
1662
+ children: /* @__PURE__ */ W(D, {
1666
1663
  value: v,
1667
1664
  placeholder: r,
1668
- size: h.Standard,
1665
+ size: g.Standard,
1669
1666
  onChange: (e) => y(e ?? "")
1670
1667
  })
1671
- }), /* @__PURE__ */ G("div", { className: o(kt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ G(it, { loadingLabel: u }) : S ? /* @__PURE__ */ G("div", {
1668
+ }), /* @__PURE__ */ W("div", { className: o(wt.divider, "h-px flex-shrink-0") })] }), x ? /* @__PURE__ */ W(tt, { loadingLabel: u }) : S ? /* @__PURE__ */ W("div", {
1672
1669
  role: "list",
1673
- className: o(kt.stateLabel, g, "px-4 py-4"),
1670
+ className: o(wt.stateLabel, h, "px-4 py-4"),
1674
1671
  children: S
1675
- }) : /* @__PURE__ */ G(Ot, {
1672
+ }) : /* @__PURE__ */ W(Ct, {
1676
1673
  role: "list",
1677
1674
  className: "overflow-y-auto",
1678
- style: { height: Math.min(C.length, jt) * At },
1679
- rowComponent: Mt,
1675
+ style: { height: Math.min(C.length, Et) * Tt },
1676
+ rowComponent: Dt,
1680
1677
  rowCount: C.length,
1681
- rowHeight: At,
1678
+ rowHeight: Tt,
1682
1679
  rowProps: {
1683
1680
  items: C,
1684
1681
  selectedDeploymentId: c,
1685
- labelClassName: g,
1682
+ labelClassName: h,
1686
1683
  query: v,
1687
1684
  onSelect: w
1688
1685
  }
1689
1686
  })]
1690
1687
  })
1691
1688
  });
1692
- }, Pt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: c, modelPickerOverlay: l, isPickerOpen: u, onPickerToggle: p, onPickerOpenChange: g }) => {
1693
- let [v, y] = U(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, menuItems: C, menuHeader: w, onOpenChange: T } = lt({
1689
+ }, kt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isDisabled: s = !1, style: c, modelPickerOverlay: l, isPickerOpen: u, onPickerToggle: m, onPickerOpenChange: _ }) => {
1690
+ let [y, b] = H(!1), { selectorIcon: x, selectorAriaLabel: S, selectedLabel: C, menuItems: w, menuHeader: T, onOpenChange: E } = it({
1694
1691
  deployments: e,
1695
1692
  selectedDeploymentId: t,
1696
1693
  onDeploymentChange: n,
1697
1694
  modelSelectorLabels: r
1698
1695
  });
1699
1696
  if (!e) return null;
1700
- let E = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, D = /* @__PURE__ */ G(ne, {
1697
+ let D = i || s ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, O = /* @__PURE__ */ W(re, {
1701
1698
  size: d.SM,
1702
- className: Y.modelSelectorCaret,
1703
- "aria-hidden": !0
1699
+ className: J.modelSelectorCaret,
1700
+ "aria-hidden": !0,
1701
+ stroke: f
1704
1702
  });
1705
- return a ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(j, {
1706
- tooltip: S,
1707
- children: /* @__PURE__ */ G(_, {
1708
- icon: /* @__PURE__ */ K("div", {
1703
+ return a ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(j, {
1704
+ tooltip: C,
1705
+ children: /* @__PURE__ */ W(v, {
1706
+ icon: /* @__PURE__ */ G("div", {
1709
1707
  className: "flex items-center gap-1",
1710
- children: [b, D]
1708
+ children: [x, O]
1711
1709
  }),
1712
- "aria-label": x,
1710
+ "aria-label": S,
1713
1711
  onClick: () => {
1714
- s || y(!0);
1712
+ s || b(!0);
1715
1713
  },
1716
- className: o("w-[50px]", Y.modelSelectorButton, E)
1714
+ className: o("w-[50px]", J.modelSelectorButton, D)
1717
1715
  })
1718
- }), l ? /* @__PURE__ */ G(q, {
1719
- isOpen: v,
1716
+ }), l ? /* @__PURE__ */ W(K, {
1717
+ isOpen: y,
1720
1718
  title: r?.ariaLabel ?? "Select model",
1721
1719
  closeLabel: r?.closeLabel ?? "Close",
1722
- onClose: () => y(!1),
1720
+ onClose: () => b(!1),
1723
1721
  style: c,
1724
- children: l(() => y(!1))
1725
- }) : /* @__PURE__ */ G(Nt, {
1726
- isOpen: v,
1722
+ children: l(() => b(!1))
1723
+ }) : /* @__PURE__ */ W(Ot, {
1724
+ isOpen: y,
1727
1725
  title: r?.ariaLabel ?? "Select model",
1728
1726
  closeLabel: r?.closeLabel ?? "Close",
1729
1727
  searchPlaceholder: r?.searchPlaceholder ?? "Search",
1730
- onClose: () => y(!1),
1728
+ onClose: () => b(!1),
1731
1729
  deployments: e,
1732
1730
  selectedDeploymentId: t,
1733
1731
  onSelect: (e) => n?.(e),
@@ -1735,283 +1733,290 @@ var kt = {
1735
1733
  errorLabel: r?.error,
1736
1734
  emptyLabel: r?.empty,
1737
1735
  style: c
1738
- })] }) : l ? /* @__PURE__ */ G(m, {
1736
+ })] }) : l ? /* @__PURE__ */ W(h, {
1739
1737
  placement: "top-end",
1740
1738
  matchReferenceWidth: !1,
1741
1739
  open: u,
1742
- onOpenChange: g,
1740
+ onOpenChange: _,
1743
1741
  trigger: [],
1744
1742
  outsideClosable: !0,
1745
- renderOverlay: () => l(() => g?.(!1)),
1743
+ renderOverlay: () => l(() => _?.(!1)),
1746
1744
  listClassName: "!w-[368px] !bg-layer-raised",
1747
- children: /* @__PURE__ */ G(j, {
1748
- tooltip: S,
1749
- children: /* @__PURE__ */ K("button", {
1745
+ children: /* @__PURE__ */ W(j, {
1746
+ tooltip: C,
1747
+ children: /* @__PURE__ */ G("button", {
1750
1748
  type: "button",
1751
- "aria-label": x,
1749
+ "aria-label": S,
1752
1750
  "aria-disabled": s || void 0,
1753
- className: o("flex items-center justify-center gap-1 rounded-full p-2", Y.modelSelectorButton, E, s && Y.modelSelectorButtonDisabled),
1751
+ className: o("flex items-center justify-center gap-1 rounded-full p-2", J.modelSelectorButton, D, s && J.modelSelectorButtonDisabled),
1754
1752
  onClick: () => {
1755
- !i && !s && p?.();
1753
+ !i && !s && m?.();
1756
1754
  },
1757
- children: [b, D]
1755
+ children: [x, O]
1758
1756
  })
1759
1757
  })
1760
- }) : /* @__PURE__ */ G("div", {
1761
- className: o(s && E),
1758
+ }) : /* @__PURE__ */ W("div", {
1759
+ className: o(s && D),
1762
1760
  "aria-disabled": s || void 0,
1763
- children: /* @__PURE__ */ G(j, {
1764
- tooltip: S,
1765
- children: /* @__PURE__ */ G(f, {
1766
- icon: b,
1767
- ariaLabel: x,
1768
- items: C,
1769
- menuHeader: w,
1761
+ children: /* @__PURE__ */ W(j, {
1762
+ tooltip: C,
1763
+ children: /* @__PURE__ */ W(p, {
1764
+ icon: x,
1765
+ ariaLabel: S,
1766
+ items: w,
1767
+ menuHeader: T,
1770
1768
  placement: "bottom-end",
1771
1769
  matchReferenceWidth: !1,
1772
1770
  listClassName: "!w-[240px] !max-h-80",
1773
- onOpenChange: s ? void 0 : T,
1774
- size: h.Standard,
1775
- caretIcon: D,
1776
- iconClassName: s ? E : void 0,
1777
- buttonClassName: o("bg-transparent", Y.modelSelectorButton, s && Y.modelSelectorButtonDisabled)
1771
+ onOpenChange: s ? void 0 : E,
1772
+ size: g.Standard,
1773
+ caretIcon: O,
1774
+ iconClassName: s ? D : void 0,
1775
+ buttonClassName: o("bg-transparent", J.modelSelectorButton, s && J.modelSelectorButtonDisabled)
1778
1776
  })
1779
1777
  })
1780
1778
  });
1781
- }, Ft = 160, It = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: l = !1, onChange: u, onAttachmentsChange: f, placeholder: p = "Type a message...", ariaLabel: m, attachLabel: h = "Attach file", fileAccept: g, addMenuTitle: _ = "Add", menuTitle: v = "Menu", menuCloseLabel: y = "Close", removeLabel: b, retryLabel: x, sendLabel: S, stopLabel: C, micLabel: w = "Record voice message", stopRecordingLabel: T, discardRecordingLabel: E, colors: D, typography: O, className: A, pendingDropFiles: j = [], onDropFilesConsumed: ee, pendingAttachments: te = [], onPendingAttachmentsConsumed: M, pasteTextThreshold: ne = 4e3, maxMessageLength: N = 5e4, deployments: ae, selectedDeploymentId: P, onDeploymentChange: F, modelSelectorLabels: oe, initialAttachments: se = [], isStacked: ce = !1, hideAddButton: le = !1, hideAttachFile: I = !1, hideActionBar: ue = !1, renderFooterActions: L, isInputDisabled: R = !1, isModelSelectorDisabled: B = !1, isSendDisabled: de = !1, isAudioMessageSupported: fe = !1, sendOnEnter: pe = Fe.Enter, prefixAttachments: me = [], onRemovePrefixAttachment: he, chatSettings: _e, toolsMenuItems: ve, onToolToggle: ye, toolsMenuTitle: be, toolsBackLabel: Se, toolsChipLabels: Ce, promptsMenuOverlay: q, promptsMenuTitle: we, promptsBackLabel: De, autoFocus: Oe = !1, messageHistory: je, onDialFileSystemClick: Me, dialFileSystemLabel: Ne, validateAttachment: Ie, onAttachmentClick: Le, modelPickerOverlay: Re, maximumAttachmentsAmount: ze, onAttachmentsLimitExceeded: Be, isAttachmentsEnabled: Ve = !0, usageLimitsSlot: He, onMessageTooLong: Ue }) => {
1782
- let We = s(), [Ge, Ke] = U(!1), J = ke(je), Je = V(() => a({
1783
- "--ci-bg": D?.background,
1784
- "--ci-text": D?.text,
1785
- "--ci-border": D?.border,
1786
- "--ci-border-focus": D?.borderFocus,
1787
- "--ci-placeholder": D?.placeholder,
1788
- "--ci-text-disabled": D?.textDisabled,
1789
- "--ci-model-selector-caret-color": D?.modelSelectorCaret,
1790
- "--ci-model-selector-hover-bg": D?.modelSelectorHoverBg,
1791
- "--ci-model-selector-disabled-color": D?.modelSelectorDisabled,
1792
- "--ci-voice-error": D?.voiceError,
1793
- "--ci-voice-waveform": D?.voiceWaveform,
1794
- "--ci-voice-accent": D?.voiceAccent
1795
- }), [D]), Ye = V(() => Me ? [{
1779
+ }, At = 160, jt = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: l = !1, onChange: u, onAttachmentsChange: p, placeholder: m = "Type a message...", ariaLabel: h, attachLabel: g = "Attach file", fileAccept: _, addMenuTitle: y = "Add", menuTitle: b = "Menu", menuCloseLabel: x = "Close", removeLabel: S, retryLabel: C, sendLabel: w, stopLabel: T, micLabel: E = "Record voice message", stopRecordingLabel: D, discardRecordingLabel: O, colors: k, typography: A, className: ee, pendingDropFiles: j = [], onDropFilesConsumed: te, pendingAttachments: ne = [], onPendingAttachmentsConsumed: M, pasteTextThreshold: re = 4e3, maxMessageLength: N = 5e4, deployments: oe, selectedDeploymentId: P, onDeploymentChange: F, modelSelectorLabels: se, initialAttachments: ce = [], isStacked: le = !1, hideAddButton: ue = !1, hideAttachFile: de = !1, hideActionBar: fe = !1, renderFooterActions: I, isInputDisabled: L = !1, isModelSelectorDisabled: pe = !1, isSendDisabled: me = !1, isAudioMessageSupported: ge = !1, sendOnEnter: _e = Me.Enter, prefixAttachments: ye = [], onRemovePrefixAttachment: be, chatSettings: K, toolsMenuItems: xe, onToolToggle: we, toolsMenuTitle: Te, toolsBackLabel: Oe, toolsChipLabels: ke, promptsMenuOverlay: Ae, promptsMenuTitle: Ne, promptsBackLabel: Pe, autoFocus: Fe = !1, messageHistory: Ie, onDialFileSystemClick: Le, dialFileSystemLabel: Re, validateAttachment: ze, onAttachmentClick: Be, modelPickerOverlay: Ve, maximumAttachmentsAmount: He, onAttachmentsLimitExceeded: Ue, isAttachmentsEnabled: q = !0, usageLimitsSlot: Ge, onMessageTooLong: qe }) => {
1780
+ let Je = s(), [Ye, Y] = H(!1), $e = Ee(Ie), et = B(() => a({
1781
+ "--ci-bg": k?.background,
1782
+ "--ci-text": k?.text,
1783
+ "--ci-border": k?.border,
1784
+ "--ci-border-focus": k?.borderFocus,
1785
+ "--ci-placeholder": k?.placeholder,
1786
+ "--ci-text-disabled": k?.textDisabled,
1787
+ "--ci-model-selector-caret-color": k?.modelSelectorCaret,
1788
+ "--ci-model-selector-hover-bg": k?.modelSelectorHoverBg,
1789
+ "--ci-model-selector-disabled-color": k?.modelSelectorDisabled,
1790
+ "--ci-voice-error": k?.voiceError,
1791
+ "--ci-voice-waveform": k?.voiceWaveform,
1792
+ "--ci-voice-accent": k?.voiceAccent
1793
+ }), [k]), tt = B(() => Le ? [{
1796
1794
  key: "dial-fs",
1797
- label: Ne ?? "DIAL file system",
1798
- icon: /* @__PURE__ */ G(re, {
1795
+ label: Re ?? "DIAL file system",
1796
+ icon: /* @__PURE__ */ W(ie, {
1799
1797
  size: c,
1800
- "aria-hidden": !0
1798
+ "aria-hidden": !0,
1799
+ stroke: f
1801
1800
  }),
1802
- onClick: Me
1803
- }] : [], [Me, Ne]), { message: X, setMessage: Ze, textareaRef: Qe, isMultiLine: $e } = Ae({
1801
+ onClick: Le
1802
+ }] : [], [Le, Re]), { message: X, setMessage: Z, textareaRef: nt, isMultiLine: rt } = De({
1804
1803
  messageProp: e,
1805
1804
  messageRevision: t
1806
- }), { attachments: Z, buildAttachments: rt, addAttachments: it, resetAttachments: at, handleRemove: ot, handleRetry: st, handleExpand: ct, hasBlockedAttachments: lt } = Te({
1807
- initialAttachments: se,
1805
+ }), { attachments: it, buildAttachments: Q, addAttachments: at, resetAttachments: ot, handleRemove: st, handleRetry: ct, handleExpand: lt, hasBlockedAttachments: ut } = Se({
1806
+ initialAttachments: ce,
1808
1807
  onUploadAttachment: r,
1809
- onAttachmentsChange: f,
1810
- validateAttachment: Ie,
1808
+ onAttachmentsChange: p,
1809
+ validateAttachment: ze,
1811
1810
  pendingDropFiles: j,
1812
- onDropFilesConsumed: ee,
1813
- pendingAttachments: te,
1811
+ onDropFilesConsumed: te,
1812
+ pendingAttachments: ne,
1814
1813
  onPendingAttachmentsConsumed: M,
1815
- onExpandPastedText: z((e) => {
1816
- Ze((t) => t ? `${t}\n${e}` : e);
1817
- }, [Ze]),
1818
- maximumAttachmentsAmount: ze,
1819
- baseAttachmentsAmount: me.length,
1820
- onAttachmentsLimitExceeded: Be
1821
- }), { state: ut, analyserNodeRef: dt, errorMessage: ft, startRecording: pt, stopRecording: mt, discardRecording: ht } = Pe({ onAttachAudio: z((e) => {
1822
- it(rt([e]));
1823
- }, [it, rt]) }), gt = H(null), Q = H(null), { handlePaste: _t } = xe(it, Ve ? ne : Infinity), vt = z((e) => {
1824
- if (!Ve) {
1814
+ onExpandPastedText: R((e) => {
1815
+ Z((t) => t ? `${t}\n${e}` : e);
1816
+ }, [Z]),
1817
+ maximumAttachmentsAmount: He,
1818
+ baseAttachmentsAmount: ye.length,
1819
+ onAttachmentsLimitExceeded: Ue
1820
+ }), { state: $, analyserNodeRef: dt, errorMessage: ft, startRecording: pt, stopRecording: mt, discardRecording: ht } = je({ onAttachAudio: R((e) => {
1821
+ at(Q([e]));
1822
+ }, [at, Q]) }), gt = V(null), _t = V(null), { handlePaste: vt } = ve(at, q ? re : Infinity), yt = R((e) => {
1823
+ if (!q) {
1825
1824
  let t = e.clipboardData.getData("text/plain");
1826
- t.length >= N && Ue?.(t.length, N);
1825
+ t.length >= N && qe?.(t.length, N);
1827
1826
  }
1828
- _t(e);
1827
+ vt(e);
1829
1828
  }, [
1830
- Ve,
1829
+ q,
1831
1830
  N,
1832
- Ue,
1833
- _t
1834
- ]), yt = X.trim().length > 0 || Z.length > 0, bt = yt && !lt && !de, { shouldRender: xt, isExiting: St, instanceKey: Ct } = Ee(!l && yt, Ft), wt = (ve?.some((e) => e.isSelected) ?? !1) && ye != null, $ = ce || X.includes("\n") || $e || wt, Tt = ae === void 0 || P != null, Et = V(() => fe && !St && !l, [
1835
- fe,
1836
- St,
1831
+ qe,
1832
+ vt
1833
+ ]), bt = X.trim().length > 0 || it.length > 0, xt = bt && !ut && !me, { shouldRender: St, isExiting: Ct, instanceKey: wt } = Ce(!l && bt, At), [Tt, Et] = H([]);
1834
+ z(() => {
1835
+ Et([]);
1836
+ }, [(xe ?? []).map((e) => e.id).join("|")]);
1837
+ let Dt = B(() => (xe ?? []).filter((e) => e.isSelected || !Tt.includes(e.id)), [xe, Tt]), Ot = R((e) => {
1838
+ Et((t) => t.includes(e) ? t : [...t, e]), xe?.find((t) => t.id === e)?.isSelected && we?.(e);
1839
+ }, [xe, we]), jt = Dt.length > 0 && we != null, Mt = le || X.includes("\n") || rt || jt, Nt = oe === void 0 || P != null, Pt = B(() => ge && !Ct && !l, [
1840
+ ge,
1841
+ Ct,
1837
1842
  l
1838
- ]), Dt = async () => {
1839
- if (de) return;
1840
- if (!Ve && X.length >= N) {
1841
- Ue?.(X.length, N);
1843
+ ]), Ft = async () => {
1844
+ if (me) return;
1845
+ if (!q && X.length >= N) {
1846
+ qe?.(X.length, N);
1842
1847
  return;
1843
1848
  }
1844
- let e = X, t = Z;
1845
- Ze(""), J.reset();
1849
+ let e = X, t = it;
1850
+ Z(""), $e.reset();
1846
1851
  try {
1847
1852
  await n?.(e, t), t.forEach((e) => {
1848
1853
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
1849
- }), at([]);
1854
+ }), ot([]);
1850
1855
  } catch {
1851
- Ze(e), at(t);
1856
+ Z(e), ot(t);
1852
1857
  }
1853
- }, Ot = (e) => {
1854
- if (!e.nativeEvent.isComposing && !R && !l && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1855
- let t = e.currentTarget.selectionStart ?? 0, n = J.navigate(e.key === "ArrowUp" ? "up" : "down", X, t);
1858
+ }, It = (e) => {
1859
+ if (!e.nativeEvent.isComposing && !L && !l && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1860
+ let t = e.currentTarget.selectionStart ?? 0, n = $e.navigate(e.key === "ArrowUp" ? "up" : "down", X, t);
1856
1861
  if (n !== null) {
1857
- e.preventDefault(), Ze(n);
1862
+ e.preventDefault(), Z(n);
1858
1863
  return;
1859
1864
  }
1860
1865
  }
1861
- e.key === "Enter" && (pe === Fe.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && bt && Tt && !R && Dt());
1862
- }, kt = (e) => {
1866
+ e.key === "Enter" && (_e === Me.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && xt && Nt && !L && Ft());
1867
+ }, Lt = (e) => {
1863
1868
  let t = Array.from(e.target.files ?? []);
1864
1869
  if (t.length === 0) return;
1865
- let n = rt(t);
1866
- e.target.value = "", it(n);
1870
+ let n = Q(t);
1871
+ e.target.value = "", at(n);
1867
1872
  };
1868
- if (ut !== "idle") return /* @__PURE__ */ G(et, {
1869
- state: ut,
1873
+ if ($ !== "idle") return /* @__PURE__ */ W(Xe, {
1874
+ state: $,
1870
1875
  analyserNodeRef: dt,
1871
1876
  errorMessage: ft,
1872
1877
  onStop: mt,
1873
1878
  onDiscard: ht,
1874
- stopLabel: T,
1875
- discardLabel: E,
1876
- style: Je,
1877
- className: A
1879
+ stopLabel: D,
1880
+ discardLabel: O,
1881
+ style: et,
1882
+ className: ee
1878
1883
  });
1879
- let At = /* @__PURE__ */ G("textarea", {
1880
- className: o(Y.textarea, O?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1881
- ref: Qe,
1882
- autoFocus: Oe,
1884
+ let Rt = /* @__PURE__ */ W("textarea", {
1885
+ className: o(J.textarea, A?.fontClassName || "dial-body-paragraph-text", "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1886
+ ref: nt,
1887
+ autoFocus: Fe,
1883
1888
  value: X,
1884
1889
  onChange: (e) => {
1885
- Ze(e.target.value), J.notifyChange(), u?.(e.target.value);
1890
+ Z(e.target.value), $e.notifyChange(), u?.(e.target.value);
1886
1891
  },
1887
- onKeyDown: Ot,
1888
- onPaste: vt,
1889
- placeholder: p,
1890
- "aria-label": m,
1891
- disabled: R,
1892
+ onKeyDown: It,
1893
+ onPaste: yt,
1894
+ placeholder: m,
1895
+ "aria-label": h,
1896
+ disabled: L,
1892
1897
  rows: 1
1893
1898
  });
1894
- return /* @__PURE__ */ K("div", {
1895
- ref: Q,
1896
- style: Je,
1897
- className: o(Y.wrapper, R && Y.wrapperDisabled, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border shadow-md", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", Z.length > 6 ? "py-3 ps-3" : "p-3", A),
1898
- children: [(me.length > 0 || Z.length > 0) && /* @__PURE__ */ G(ge, {
1899
- attachments: [...me, ...Z],
1899
+ return /* @__PURE__ */ G("div", {
1900
+ ref: _t,
1901
+ style: et,
1902
+ className: o(J.wrapper, L && J.wrapperDisabled, "flex min-h-[64px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border shadow-md", "focus-within:outline focus-within:-outline-offset-1 active:outline active:-outline-offset-1", it.length > 6 ? "py-3 ps-3" : "p-3", ee),
1903
+ children: [(ye.length > 0 || it.length > 0) && /* @__PURE__ */ W(he, {
1904
+ attachments: [...ye, ...it],
1900
1905
  onRemove: (e) => {
1901
- me.some((t) => t.id === e) ? he?.(e) : ot(e);
1906
+ ye.some((t) => t.id === e) ? be?.(e) : st(e);
1902
1907
  },
1903
- onRetry: st,
1904
- onExpand: ct,
1908
+ onRetry: ct,
1909
+ onExpand: lt,
1905
1910
  labels: {
1906
- removeLabel: b,
1907
- retryLabel: x
1911
+ removeLabel: S,
1912
+ retryLabel: C
1908
1913
  },
1909
- onAttachmentClick: Le == null ? void 0 : (e) => {
1910
- let t = [...me, ...Z].find((t) => t.id === e);
1911
- t != null && Le(t);
1914
+ onAttachmentClick: Be == null ? void 0 : (e) => {
1915
+ let t = [...ye, ...it].find((t) => t.id === e);
1916
+ t != null && Be(t);
1912
1917
  }
1913
- }), ue ? $ && At : /* @__PURE__ */ K("div", {
1914
- className: o("flex items-center gap-2", $ ? "flex-wrap" : "flex-wrap desktop:flex-nowrap"),
1918
+ }), fe ? Mt && Rt : /* @__PURE__ */ G("div", {
1919
+ className: o("flex items-center gap-2", Mt ? "flex-wrap" : "flex-wrap desktop:flex-nowrap"),
1915
1920
  children: [
1916
- !le && /* @__PURE__ */ K("div", {
1917
- className: o("flex", "order-2", !$ && "desktop:order-1"),
1918
- children: [/* @__PURE__ */ G("input", {
1921
+ !ue && /* @__PURE__ */ G("div", {
1922
+ className: o("flex", "order-2", !Mt && "desktop:order-1"),
1923
+ children: [/* @__PURE__ */ W("input", {
1919
1924
  ref: gt,
1920
1925
  type: "file",
1921
1926
  multiple: !0,
1922
- accept: g,
1927
+ accept: _,
1923
1928
  className: "sr-only",
1924
1929
  "aria-hidden": !0,
1925
1930
  tabIndex: -1,
1926
- onChange: kt
1927
- }), /* @__PURE__ */ G(qe, {
1928
- onAttachClick: I ? void 0 : () => gt.current?.click(),
1929
- attachLabel: h,
1930
- addMenuTitle: _,
1931
- menuTitle: v,
1932
- menuCloseLabel: y,
1933
- style: Je,
1934
- isDisabled: R,
1935
- chatSettings: _e,
1936
- extraMenuItems: Ye,
1937
- toolsMenuItems: ve,
1938
- onToolToggle: ye,
1939
- toolsMenuTitle: be,
1940
- toolsBackLabel: Se,
1941
- promptsMenuOverlay: q,
1942
- promptsMenuTitle: we,
1943
- promptsBackLabel: De
1931
+ onChange: Lt
1932
+ }), /* @__PURE__ */ W(We, {
1933
+ onAttachClick: de ? void 0 : () => gt.current?.click(),
1934
+ attachLabel: g,
1935
+ addMenuTitle: y,
1936
+ menuTitle: b,
1937
+ menuCloseLabel: x,
1938
+ style: et,
1939
+ isDisabled: L,
1940
+ chatSettings: K,
1941
+ extraMenuItems: tt,
1942
+ toolsMenuItems: xe,
1943
+ onToolToggle: we,
1944
+ toolsMenuTitle: Te,
1945
+ toolsBackLabel: Oe,
1946
+ promptsMenuOverlay: Ae,
1947
+ promptsMenuTitle: Ne,
1948
+ promptsBackLabel: Pe
1944
1949
  })]
1945
1950
  }),
1946
- $ && wt && /* @__PURE__ */ G("div", {
1951
+ Mt && Dt.length > 0 && we != null && /* @__PURE__ */ W("div", {
1947
1952
  className: "order-3 min-w-0 flex-1",
1948
- children: /* @__PURE__ */ G(Xe, {
1949
- items: ve ?? [],
1950
- onToolToggle: ye,
1951
- isMobile: We,
1952
- countLabel: Ce?.countLabel,
1953
- removeLabel: Ce?.removeLabel
1953
+ children: /* @__PURE__ */ W(Ke, {
1954
+ items: Dt,
1955
+ onToolToggle: we,
1956
+ onToolDismiss: Ot,
1957
+ removeLabel: ke?.removeLabel
1954
1958
  })
1955
1959
  }),
1956
- /* @__PURE__ */ G("div", {
1957
- className: o("order-1 flex w-full min-w-0 items-center self-stretch", !$ && "desktop:order-2 desktop:w-auto desktop:flex-1"),
1958
- children: At
1960
+ /* @__PURE__ */ W("div", {
1961
+ className: o("order-1 flex w-full min-w-0 items-center self-stretch", !Mt && "desktop:order-2 desktop:w-auto desktop:flex-1"),
1962
+ children: Rt
1959
1963
  }),
1960
- /* @__PURE__ */ K("div", {
1961
- className: o("flex flex-shrink-0 items-center gap-2", $ && wt ? "order-4" : "order-3", "ms-auto", !$ && "desktop:ms-0"),
1962
- children: [L ? L({
1963
- canSend: bt,
1964
- onSend: Dt
1965
- }) : /* @__PURE__ */ K(W, { children: [
1966
- He,
1967
- /* @__PURE__ */ G(Pt, {
1968
- deployments: ae,
1964
+ /* @__PURE__ */ G("div", {
1965
+ className: o("flex flex-shrink-0 items-center gap-2", Mt && jt ? "order-4" : "order-3", "ms-auto", !Mt && "desktop:ms-0"),
1966
+ children: [I ? I({
1967
+ canSend: xt,
1968
+ onSend: Ft
1969
+ }) : /* @__PURE__ */ G(U, { children: [
1970
+ Ge,
1971
+ /* @__PURE__ */ W(kt, {
1972
+ deployments: oe,
1969
1973
  selectedDeploymentId: P,
1970
1974
  onDeploymentChange: F,
1971
- modelSelectorLabels: oe,
1975
+ modelSelectorLabels: se,
1972
1976
  isStreaming: l,
1973
- isMobile: We,
1974
- isDisabled: B,
1975
- style: Je,
1976
- modelPickerOverlay: Re,
1977
- isPickerOpen: Ge,
1978
- onPickerToggle: () => Ke((e) => !e),
1979
- onPickerOpenChange: Ke
1977
+ isMobile: Je,
1978
+ isDisabled: pe,
1979
+ style: et,
1980
+ modelPickerOverlay: Ve,
1981
+ isPickerOpen: Ye,
1982
+ onPickerToggle: () => Y((e) => !e),
1983
+ onPickerOpenChange: Y
1980
1984
  }),
1981
- l && i ? /* @__PURE__ */ G(nt, {
1985
+ l && i ? /* @__PURE__ */ W(Qe, {
1982
1986
  onStop: i,
1983
- ariaLabel: C
1984
- }) : !l && xt && /* @__PURE__ */ G(tt, {
1985
- onSend: Dt,
1986
- isDisabled: !Tt || lt || de,
1987
- ariaLabel: S,
1988
- isExiting: St
1989
- }, Ct)
1990
- ] }), Et && /* @__PURE__ */ G(k, {
1991
- icon: /* @__PURE__ */ G(ie, {
1987
+ ariaLabel: T
1988
+ }) : !l && St && /* @__PURE__ */ W(Ze, {
1989
+ onSend: Ft,
1990
+ isDisabled: !Nt || ut || me,
1991
+ ariaLabel: w,
1992
+ isExiting: Ct
1993
+ }, wt)
1994
+ ] }), Pt && /* @__PURE__ */ W(v, {
1995
+ icon: /* @__PURE__ */ W(ae, {
1992
1996
  size: d.LG,
1997
+ stroke: f,
1993
1998
  "aria-hidden": !0
1994
1999
  }),
1995
- "aria-label": w,
1996
- className: "size-8 flex-shrink-0",
2000
+ "aria-label": E,
2001
+ className: "size-[40px] flex-shrink-0",
1997
2002
  onClick: pt,
1998
- disabled: R || l
2003
+ disabled: L || l
1999
2004
  })]
2000
2005
  })
2001
2006
  ]
2002
2007
  })]
2003
2008
  });
2004
- }, Lt = { welcome: "_welcome_n2ph8_1" }, Rt = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, styles: r, className: i, inputClassName: s, isInputDisabled: c = !1, ...l }) => {
2009
+ }, Mt = { welcome: "_welcome_n2ph8_1" }, Nt = ({ isStreaming: e = !1, placeholder: t = "Type a prompt or use \"/\" to select one", welcomeText: n, styles: r, className: i, inputClassName: s, isInputDisabled: c = !1, ...l }) => {
2005
2010
  let { colors: u, typography: d } = r ?? {};
2006
- return /* @__PURE__ */ K("div", {
2011
+ return /* @__PURE__ */ G("div", {
2007
2012
  style: a({ "--ci-welcome-color": u?.welcomeText }),
2008
2013
  className: o("relative flex w-full flex-col items-center gap-6 px-4 py-5 desktop:p-5", i),
2009
- children: [n && /* @__PURE__ */ G("h1", {
2010
- className: o(Lt.welcome, "m-0 text-center", d?.welcomeClassName || "dial-display2-text"),
2014
+ children: [n && /* @__PURE__ */ W("h1", {
2015
+ className: o(Mt.welcome, "m-0 text-center", d?.welcomeClassName || "dial-display2-text"),
2011
2016
  children: n
2012
- }), /* @__PURE__ */ G("div", {
2017
+ }), /* @__PURE__ */ W("div", {
2013
2018
  className: "relative w-full max-w-[748px]",
2014
- children: /* @__PURE__ */ G(It, {
2019
+ children: /* @__PURE__ */ W(jt, {
2015
2020
  placeholder: t,
2016
2021
  isStreaming: e,
2017
2022
  isInputDisabled: c,
@@ -2022,97 +2027,98 @@ var kt = {
2022
2027
  })
2023
2028
  })]
2024
2029
  });
2025
- }, zt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: f, addMenuTitle: p = "Add", attachLabel: m = "Attach file", menuTitle: h = "Menu", menuCloseLabel: g = "Close", className: _, pendingDropFiles: v, onDropFilesConsumed: b, validateAttachment: x, isAttachmentsEnabled: C, hideAttachFile: w = !1, fileAccept: T, maximumAttachmentsAmount: E, onAttachmentsLimitExceeded: D, onDialFileSystemClick: O, dialFileSystemLabel: k, pendingAttachments: A, onPendingAttachmentsConsumed: j, onAttachmentClick: ee, pasteTextThreshold: te, maxMessageLength: M = 5e4, onMessageTooLong: ne }) => {
2026
- let N = H(null), [ie, ae] = U([]);
2027
- B(() => {
2028
- v?.length && (ae(v), b?.());
2029
- }, [v, b]);
2030
- let [P, F] = U(e ?? ""), [oe, se] = U([]), [ce, le] = U(t), I = oe.some((e) => e.status === r.Loading || e.status === r.Error), ue = (P.trim().length > 0 || oe.length > 0 || ce.length > 0) && !I, L = (e) => {
2031
- le((t) => t.filter((t) => t.id !== e));
2032
- }, R = z((e, t) => {
2033
- i(e, ce, t);
2034
- }, [ce, i]), de = () => {
2035
- if (ue) {
2036
- if (!C && P.length >= M) {
2037
- ne?.(P.length, M);
2030
+ }, Pt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: i, onUploadAttachment: a, cancelLabel: s = "Cancel", saveLabel: l = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: p, addMenuTitle: m = "Add", attachLabel: h = "Attach file", menuTitle: g = "Menu", menuCloseLabel: _ = "Close", className: v, pendingDropFiles: y, onDropFilesConsumed: x, validateAttachment: S, isAttachmentsEnabled: w, hideAttachFile: T = !1, fileAccept: E, maximumAttachmentsAmount: D, onAttachmentsLimitExceeded: O, onDialFileSystemClick: k, dialFileSystemLabel: A, pendingAttachments: ee, onPendingAttachmentsConsumed: j, onAttachmentClick: te, pasteTextThreshold: ne, maxMessageLength: M = 5e4, onMessageTooLong: re }) => {
2031
+ let N = V(null), [ae, oe] = H([]);
2032
+ z(() => {
2033
+ y?.length && (oe(y), x?.());
2034
+ }, [y, x]);
2035
+ let [P, F] = H(e ?? ""), [se, ce] = H([]), [le, ue] = H(t), de = se.some((e) => e.status === r.Loading || e.status === r.Error), fe = (P.trim().length > 0 || se.length > 0 || le.length > 0) && !de, I = (e) => {
2036
+ ue((t) => t.filter((t) => t.id !== e));
2037
+ }, L = R((e, t) => {
2038
+ i(e, le, t);
2039
+ }, [le, i]), pe = () => {
2040
+ if (fe) {
2041
+ if (!w && P.length >= M) {
2042
+ re?.(P.length, M);
2038
2043
  return;
2039
2044
  }
2040
- R(P, oe);
2045
+ L(P, se);
2041
2046
  }
2042
- }, fe = z(() => ae([]), []), pe = z((e) => {
2047
+ }, me = R(() => oe([]), []), he = R((e) => {
2043
2048
  let t = Array.from(e.target.files ?? []);
2044
- t.length !== 0 && (e.target.value = "", ae(t));
2045
- }, []), me = V(() => O ? [{
2049
+ t.length !== 0 && (e.target.value = "", oe(t));
2050
+ }, []), ge = B(() => k ? [{
2046
2051
  key: "dial-fs",
2047
- label: k ?? "DIAL file system",
2048
- icon: /* @__PURE__ */ G(re, {
2052
+ label: A ?? "DIAL file system",
2053
+ icon: /* @__PURE__ */ W(ie, {
2049
2054
  size: c,
2050
- "aria-hidden": !0
2055
+ "aria-hidden": !0,
2056
+ stroke: f
2051
2057
  }),
2052
- onClick: O
2053
- }] : [], [O, k]);
2054
- return /* @__PURE__ */ K("div", {
2055
- className: o("flex w-full flex-col gap-2", _),
2056
- children: [/* @__PURE__ */ G(It, {
2058
+ onClick: k
2059
+ }] : [], [k, A]);
2060
+ return /* @__PURE__ */ G("div", {
2061
+ className: o("flex w-full flex-col gap-2", v),
2062
+ children: [/* @__PURE__ */ W(jt, {
2057
2063
  message: e,
2058
2064
  ariaLabel: u,
2059
2065
  isStacked: !0,
2060
2066
  hideActionBar: !0,
2061
- pendingDropFiles: ie,
2062
- onDropFilesConsumed: fe,
2063
- onSend: R,
2067
+ pendingDropFiles: ae,
2068
+ onDropFilesConsumed: me,
2069
+ onSend: L,
2064
2070
  onUploadAttachment: a,
2065
2071
  onChange: F,
2066
- onAttachmentsChange: se,
2072
+ onAttachmentsChange: ce,
2067
2073
  removeLabel: d,
2068
- retryLabel: f,
2074
+ retryLabel: p,
2069
2075
  className: "max-w-full",
2070
- prefixAttachments: ce,
2071
- onRemovePrefixAttachment: L,
2072
- validateAttachment: x,
2073
- isAttachmentsEnabled: C,
2074
- maximumAttachmentsAmount: E,
2075
- onAttachmentsLimitExceeded: D,
2076
- pendingAttachments: A,
2076
+ prefixAttachments: le,
2077
+ onRemovePrefixAttachment: I,
2078
+ validateAttachment: S,
2079
+ isAttachmentsEnabled: w,
2080
+ maximumAttachmentsAmount: D,
2081
+ onAttachmentsLimitExceeded: O,
2082
+ pendingAttachments: ee,
2077
2083
  onPendingAttachmentsConsumed: j,
2078
- onAttachmentClick: ee,
2079
- pasteTextThreshold: te,
2084
+ onAttachmentClick: te,
2085
+ pasteTextThreshold: ne,
2080
2086
  maxMessageLength: M,
2081
- onMessageTooLong: ne
2082
- }), /* @__PURE__ */ K("div", {
2087
+ onMessageTooLong: re
2088
+ }), /* @__PURE__ */ G("div", {
2083
2089
  className: "flex items-center justify-between",
2084
- children: [/* @__PURE__ */ G("div", {
2090
+ children: [/* @__PURE__ */ W("div", {
2085
2091
  className: "flex",
2086
- children: !w && /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G("input", {
2092
+ children: !T && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("input", {
2087
2093
  ref: N,
2088
2094
  type: "file",
2089
2095
  multiple: !0,
2090
- accept: T,
2096
+ accept: E,
2091
2097
  className: "sr-only",
2092
2098
  "aria-hidden": !0,
2093
2099
  tabIndex: -1,
2094
- onChange: pe
2095
- }), /* @__PURE__ */ G(qe, {
2100
+ onChange: he
2101
+ }), /* @__PURE__ */ W(We, {
2096
2102
  onAttachClick: () => N.current?.click(),
2097
- attachLabel: m,
2098
- addMenuTitle: p,
2099
- menuTitle: h,
2100
- menuCloseLabel: g,
2101
- extraMenuItems: me
2103
+ attachLabel: h,
2104
+ addMenuTitle: m,
2105
+ menuTitle: g,
2106
+ menuCloseLabel: _,
2107
+ extraMenuItems: ge
2102
2108
  })] })
2103
- }), /* @__PURE__ */ K("div", {
2109
+ }), /* @__PURE__ */ G("div", {
2104
2110
  className: "flex gap-2",
2105
- children: [/* @__PURE__ */ G(y, {
2111
+ children: [/* @__PURE__ */ W(b, {
2106
2112
  label: s,
2107
2113
  onClick: n
2108
- }), /* @__PURE__ */ G(S, {
2114
+ }), /* @__PURE__ */ W(C, {
2109
2115
  label: l,
2110
- onClick: de,
2111
- disabled: !ue
2116
+ onClick: pe,
2117
+ disabled: !fe
2112
2118
  })]
2113
2119
  })]
2114
2120
  })]
2115
2121
  });
2116
2122
  };
2117
2123
  //#endregion
2118
- export { pe as AttachmentCard, me as AttachmentGroup, he as AttachmentTray, q as BottomSheetShell, Ue as ChatSettingsModal, Rt as ConversationInput, zt as EditMessageInput, _e as FileDndOverlay, It as Input, Fe as SendOnEnter, be as getAttachmentIcon };
2124
+ export { K as BottomSheetShell, Be as ChatSettingsModal, Nt as ConversationInput, Pt as EditMessageInput, jt as Input, Me as SendOnEnter };