@epam/ai-dial-conversation-input 1.1.0-dev.297 → 1.1.0-dev.299

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