@epam/ai-dial-conversation-input 1.1.0-dev.52 → 1.1.0-dev.55

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,47 +1,47 @@
1
- import { AttachmentErrorReason as e, AttachmentType as t, DeploymentIcon as n, Highlight as r, RequestStatus as i, ResponseFormat as a, buildCssVars as o, mergeClasses as s, useIsMobile as c } from "@epam/ai-dial-chat-shared";
2
- import { BASE_ICON_SIZE as l, ButtonAppearance as u, ButtonVariant as d, DIAL_ICON_SIZE as f, DialButton as p, DialCloseButton as m, DialDropdown as h, DialDropdownIcon as g, DialErrorText as _, DialGhostIconButton as v, DialInput as y, DialPopup as b, DialPrimaryButton as x, DialRadioGroup as S, DialSearch as C, DialSkeleton as w, DialSkeletonVariant as T, DialSlider as E, DialTag as D, DialTooltip as O, ElementSize as k, PopupSize as ee, RadioGroupOrientation as te } from "@epam/ai-dial-ui-kit";
3
- import { IconArrowLeft as A, IconArrowNarrowRight as ne, IconCheck as re, IconChevronDown as ie, IconChevronRight as ae, IconFile as oe, IconMicrophone as se, IconPaperclip as ce, IconPlayerStopFilled as le, IconPlaystationSquare as ue, IconPlus as de, IconSettings as fe, IconX as pe } from "@tabler/icons-react";
4
- import { createPortal as me } from "react-dom";
5
- import { createElement as he, memo as ge, useCallback as j, useEffect as M, useImperativeHandle as N, useLayoutEffect as _e, useMemo as P, useRef as F, useState as I } from "react";
6
- import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
7
- import { AttachmentCard as ve, AttachmentGroup as ye, AttachmentTray as be, AttachmentTray as xe, FileDndOverlay as B, MAX_UPLOADS_PER_MINUTE as Se, generateAttachmentId as Ce, getAttachmentIcon as we, useClipboardPaste as Te } from "@epam/ai-dial-attachment-input";
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, ButtonAppearance as l, ButtonVariant as u, DIAL_ICON_SIZE as d, DialButton as f, DialCloseButton as p, DialDropdown as m, DialDropdownIcon as h, DialErrorText as g, DialGhostIconButton as _, DialInput as v, DialPopup as y, DialPrimaryButton as b, DialRadioGroup as x, DialSearch as S, DialSkeleton as C, DialSkeletonVariant as w, DialSlider as T, DialTag as E, DialTooltip as D, ElementSize as O, Highlight as k, PopupSize as ee, RadioGroupOrientation as A } from "@epam/ai-dial-ui-kit";
3
+ import { IconArrowLeft as te, IconArrowNarrowRight as ne, IconCheck as re, IconChevronDown as ie, IconChevronRight as ae, IconFile as oe, IconMicrophone as se, IconPaperclip as j, IconPlayerStopFilled as ce, IconPlaystationSquare as le, IconPlus as ue, IconSettings as de, IconX as fe } from "@tabler/icons-react";
4
+ import { createPortal as pe } from "react-dom";
5
+ import { createElement as me, memo as he, useCallback as M, useEffect as N, useImperativeHandle as P, useLayoutEffect as ge, useMemo as F, useRef as I, useState as L } from "react";
6
+ import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
7
+ import { AttachmentCard as _e, AttachmentGroup as ve, AttachmentTray as ye, AttachmentTray as be, FileDndOverlay as V, MAX_UPLOADS_PER_MINUTE as xe, generateAttachmentId as Se, getAttachmentIcon as Ce, useClipboardPaste as we } from "@epam/ai-dial-attachment-input";
8
8
  //#region src/hooks/useBottomSheet.ts
9
- var Ee = (e, t) => {
10
- M(() => {
9
+ var Te = (e, t) => {
10
+ N(() => {
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]), M(() => {
16
+ }, [e, t]), N(() => {
17
17
  if (e) return document.body.style.overflow = "hidden", () => {
18
18
  document.body.style.overflow = "";
19
19
  };
20
20
  }, [e]);
21
- }, V = {
21
+ }, H = {
22
22
  backdrop: "_backdrop_3xrn0_9",
23
23
  sheet: "_sheet_3xrn0_13",
24
24
  "slide-up": "_slide-up_3xrn0_1",
25
25
  title: "_title_3xrn0_18",
26
26
  divider: "_divider_3xrn0_22"
27
- }, H = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": o, style: c, titleClassName: l = "dial-body-semi-text", className: u, children: d }) => (Ee(e, r), !e || typeof document > "u" ? null : me(/* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R("div", {
28
- className: s(V.backdrop, "fixed inset-0 z-[55]"),
27
+ }, U = ({ isOpen: e, title: t, closeLabel: n, onClose: r, onBack: i, backLabel: a, "aria-label": s, style: c, titleClassName: l = "dial-body-semi-text", className: u, children: f }) => (Te(e, r), !e || typeof document > "u" ? null : pe(/* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("div", {
28
+ className: o(H.backdrop, "fixed inset-0 z-[55]"),
29
29
  onPointerDown: r,
30
30
  "aria-hidden": !0
31
- }), /* @__PURE__ */ z("div", {
31
+ }), /* @__PURE__ */ B("div", {
32
32
  role: "dialog",
33
33
  "aria-modal": !0,
34
- "aria-label": t ?? o,
34
+ "aria-label": t ?? s,
35
35
  style: c,
36
- className: s(V.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col", u),
37
- children: [t != null && /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ z("div", {
36
+ className: o(H.sheet, "fixed inset-x-0 bottom-0 z-[60] flex max-h-[85dvh] flex-col", u),
37
+ children: [t != null && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B("div", {
38
38
  className: "relative flex h-[60px] flex-shrink-0 items-center justify-center px-4",
39
39
  children: [
40
- i && /* @__PURE__ */ R("div", {
40
+ i && /* @__PURE__ */ z("div", {
41
41
  className: "absolute start-4",
42
- children: /* @__PURE__ */ R(v, {
43
- icon: /* @__PURE__ */ R(A, {
44
- size: f.LG,
42
+ children: /* @__PURE__ */ z(_, {
43
+ icon: /* @__PURE__ */ z(te, {
44
+ size: d.LG,
45
45
  stroke: 1.5,
46
46
  className: "rtl:scale-x-[-1]"
47
47
  }),
@@ -49,99 +49,99 @@ var Ee = (e, t) => {
49
49
  onClick: i
50
50
  })
51
51
  }),
52
- /* @__PURE__ */ R("span", {
53
- className: s(V.title, l),
52
+ /* @__PURE__ */ z("span", {
53
+ className: o(H.title, l),
54
54
  children: t
55
55
  }),
56
- /* @__PURE__ */ R("div", {
56
+ /* @__PURE__ */ z("div", {
57
57
  className: "absolute end-4 m-2",
58
- children: /* @__PURE__ */ R(m, {
58
+ children: /* @__PURE__ */ z(p, {
59
59
  ariaLabel: n,
60
- size: f.LG,
60
+ size: d.LG,
61
61
  onClose: r
62
62
  })
63
63
  })
64
64
  ]
65
- }), /* @__PURE__ */ R("div", { className: "h-px flex-shrink-0" })] }), /* @__PURE__ */ R("div", {
65
+ }), /* @__PURE__ */ z("div", { className: "h-px flex-shrink-0" })] }), /* @__PURE__ */ z("div", {
66
66
  className: "overflow-y-auto",
67
- children: d
67
+ children: f
68
68
  })]
69
- })] }), document.body)), De = async (e, t, n) => {
69
+ })] }), document.body)), Ee = async (e, t, n) => {
70
70
  let r = 6e4 / t, i = [];
71
71
  for (let t = 0; t < e.length; t++) t > 0 && await new Promise((e) => setTimeout(e, r)), i.push(n(e[t]));
72
72
  await Promise.allSettled(i);
73
- }, Oe = ({ initialAttachments: n, onUploadAttachment: r, onAttachmentsChange: a, validateAttachment: o, pendingDropFiles: s, onDropFilesConsumed: c, pendingAttachments: l, onPendingAttachmentsConsumed: u, onExpandPastedText: d, maximumAttachmentsAmount: f, baseAttachmentsAmount: p = 0, onAttachmentsLimitExceeded: m }) => {
74
- let [h, g] = I(n), _ = F(h);
75
- M(() => {
73
+ }, De = ({ 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 }) => {
74
+ let [h, g] = L(n), _ = I(h);
75
+ N(() => {
76
76
  _.current = h;
77
- }, [h]), M(() => () => {
77
+ }, [h]), N(() => () => {
78
78
  _.current.forEach((e) => {
79
79
  e.previewUrl && URL.revokeObjectURL(e.previewUrl), e.playUrl && URL.revokeObjectURL(e.playUrl);
80
80
  });
81
81
  }, []);
82
- let v = j((e) => e.map((e) => {
83
- let n = e.type.startsWith("image/"), r = e.type.startsWith("audio/"), a = n ? URL.createObjectURL(e) : void 0, o = r ? URL.createObjectURL(e) : void 0;
82
+ let v = M((e) => e.map((e) => {
83
+ 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;
84
84
  return {
85
- id: Ce(),
85
+ id: Se(),
86
86
  name: e.name,
87
87
  contentType: e.type,
88
88
  file: e,
89
- type: n ? t.Image : r ? t.Audio : t.File,
90
- status: i.Idle,
89
+ type: n ? t.Image : i ? t.Audio : t.File,
90
+ status: r.Idle,
91
91
  previewUrl: a,
92
92
  playUrl: o
93
93
  };
94
- }), []), y = j((e) => {
94
+ }), []), y = M((e) => {
95
95
  g((t) => {
96
96
  let n = e(t);
97
97
  return n !== t && a?.(n), n;
98
98
  });
99
- }, [a]), b = j((e) => {
99
+ }, [a]), b = M((e) => {
100
100
  g(e), a?.(e);
101
- }, [a]), x = j(async (t) => {
102
- if (r) {
101
+ }, [a]), x = M(async (t) => {
102
+ if (i) {
103
103
  y((e) => e.map((e) => e.id === t.id ? {
104
104
  ...e,
105
- status: i.Loading
105
+ status: r.Loading
106
106
  } : e));
107
107
  try {
108
- let e = await r(t);
108
+ let e = await i(t);
109
109
  y((n) => n.map((n) => n.id === t.id ? {
110
110
  ...n,
111
- status: i.Idle,
111
+ status: r.Idle,
112
112
  url: e
113
113
  } : n));
114
114
  } catch (n) {
115
- let r = typeof n == "object" && n && "errorReason" in n && Object.values(e).includes(n.errorReason) ? n.errorReason : void 0;
115
+ let i = typeof n == "object" && n && "errorReason" in n && Object.values(e).includes(n.errorReason) ? n.errorReason : void 0;
116
116
  y((e) => e.map((e) => e.id === t.id ? {
117
117
  ...e,
118
- status: i.Error,
119
- ...r != null && { errorReason: r }
118
+ status: r.Error,
119
+ ...i != null && { errorReason: i }
120
120
  } : e));
121
121
  }
122
122
  }
123
- }, [r, y]), S = j((e, t = !0) => {
124
- let n = new Set(_.current.map((e) => e.id)), r = e.filter((e) => !n.has(e.id));
125
- if (r.length !== 0) {
123
+ }, [i, y]), S = M((e, t = !0) => {
124
+ let n = new Set(_.current.map((e) => e.id)), i = e.filter((e) => !n.has(e.id));
125
+ if (i.length !== 0) {
126
126
  if (f != null && f > 0 && Number.isFinite(f)) {
127
- let e = p + _.current.length + r.length;
127
+ let e = p + _.current.length + i.length;
128
128
  if (e > f) {
129
- r.forEach((e) => {
129
+ i.forEach((e) => {
130
130
  e.previewUrl && URL.revokeObjectURL(e.previewUrl);
131
131
  }), m?.(e, f);
132
132
  return;
133
133
  }
134
134
  }
135
- if (y((e) => [...e, ...r]), t) {
135
+ if (y((e) => [...e, ...i]), t) {
136
136
  let e = [];
137
- r.forEach((t) => {
137
+ i.forEach((t) => {
138
138
  let n = o?.(t);
139
139
  n == null ? e.push(t) : y((e) => e.map((e) => e.id === t.id ? {
140
140
  ...e,
141
- status: i.Error,
141
+ status: r.Error,
142
142
  errorReason: n
143
143
  } : e));
144
- }), De(e, Se, x);
144
+ }), Ee(e, xe, x);
145
145
  }
146
146
  }
147
147
  }, [
@@ -152,47 +152,47 @@ var Ee = (e, t) => {
152
152
  x,
153
153
  o
154
154
  ]);
155
- M(() => {
155
+ N(() => {
156
156
  s.length !== 0 && (S(v(s)), c?.());
157
157
  }, [
158
158
  S,
159
159
  v,
160
160
  c,
161
161
  s
162
- ]), M(() => {
162
+ ]), N(() => {
163
163
  l.length !== 0 && (S(l, !1), u?.());
164
164
  }, [
165
165
  S,
166
166
  u,
167
167
  l
168
- ]), M(() => {
168
+ ]), N(() => {
169
169
  if (!o) return;
170
- let t = !1, n = [], r = _.current.map((r) => {
171
- if (r.status === i.Loading) return r;
172
- let a = o(r);
173
- if (a != null) return r.status === i.Error && r.errorReason === a ? r : (t = !0, {
174
- ...r,
175
- status: i.Error,
170
+ let t = !1, n = [], i = _.current.map((i) => {
171
+ if (i.status === r.Loading) return i;
172
+ let a = o(i);
173
+ if (a != null) return i.status === r.Error && i.errorReason === a ? i : (t = !0, {
174
+ ...i,
175
+ status: r.Error,
176
176
  errorReason: a
177
177
  });
178
- if (r.errorReason === e.UnsupportedType) {
178
+ if (i.errorReason === e.UnsupportedType) {
179
179
  t = !0;
180
180
  let e = {
181
- ...r,
182
- status: i.Idle,
181
+ ...i,
182
+ status: r.Idle,
183
183
  errorReason: void 0
184
184
  };
185
185
  return e.url ?? n.push(e), e;
186
186
  }
187
- return r;
187
+ return i;
188
188
  });
189
- t && y(() => r), n.forEach((e) => void x(e));
189
+ t && y(() => i), n.forEach((e) => void x(e));
190
190
  }, [
191
191
  o,
192
192
  y,
193
193
  x
194
194
  ]);
195
- let C = j((e) => {
195
+ let C = M((e) => {
196
196
  y((t) => {
197
197
  let n = t.find((t) => t.id === e);
198
198
  return n?.previewUrl && URL.revokeObjectURL(n.previewUrl), n?.playUrl && URL.revokeObjectURL(n.playUrl), t.filter((t) => t.id !== e);
@@ -204,11 +204,11 @@ var Ee = (e, t) => {
204
204
  addAttachments: S,
205
205
  resetAttachments: b,
206
206
  handleRemove: C,
207
- handleRetry: j((e) => {
207
+ handleRetry: M((e) => {
208
208
  let t = h.find((t) => t.id === e);
209
209
  t && x(t);
210
210
  }, [h, x]),
211
- handleExpand: j(async (e) => {
211
+ handleExpand: M(async (e) => {
212
212
  let n = h.find((t) => t.id === e);
213
213
  if (!n || n.type !== t.Pasted) return;
214
214
  let r = await n.file.text();
@@ -218,11 +218,11 @@ var Ee = (e, t) => {
218
218
  C,
219
219
  d
220
220
  ]),
221
- hasBlockedAttachments: h.some((e) => e.status === i.Loading || e.status === i.Error)
221
+ hasBlockedAttachments: h.some((e) => e.status === r.Loading || e.status === r.Error)
222
222
  };
223
- }, ke = (e, t) => {
224
- let [n, r] = I(e), [i, a] = I(!1), [o, s] = I(0);
225
- return M(() => {
223
+ }, Oe = (e, t) => {
224
+ let [n, r] = L(e), [i, a] = L(!1), [o, s] = L(0);
225
+ return N(() => {
226
226
  if (e) {
227
227
  r(!0), a(!1), s((e) => e + 1);
228
228
  return;
@@ -238,18 +238,18 @@ var Ee = (e, t) => {
238
238
  isExiting: i,
239
239
  instanceKey: o
240
240
  };
241
- }, Ae = (e, t) => !e.slice(0, t).includes("\n"), je = (e, t) => !e.slice(t).includes("\n"), Me = (e) => {
242
- let t = F(e);
241
+ }, ke = (e, t) => !e.slice(0, t).includes("\n"), Ae = (e, t) => !e.slice(t).includes("\n"), je = (e) => {
242
+ let t = I(e);
243
243
  t.current = e;
244
- let n = F(-1), r = F(""), i = j((e, i, a) => {
244
+ let n = I(-1), r = I(""), i = M((e, i, a) => {
245
245
  let o = t.current;
246
- return !o || o.length === 0 ? null : e === "up" ? !Ae(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 || !je(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
247
- }, []), a = j(() => {
246
+ return !o || o.length === 0 ? null : e === "up" ? !ke(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 || !Ae(i, a) ? null : n.current < o.length - 1 ? (n.current += 1, o[n.current]) : (n.current = -1, r.current);
247
+ }, []), a = M(() => {
248
248
  n.current = -1, r.current = "";
249
- }, []), o = j(() => {
249
+ }, []), o = M(() => {
250
250
  n.current = -1, r.current = "";
251
251
  }, []);
252
- return P(() => ({
252
+ return F(() => ({
253
253
  navigate: i,
254
254
  notifyChange: a,
255
255
  reset: o
@@ -258,13 +258,13 @@ var Ee = (e, t) => {
258
258
  a,
259
259
  o
260
260
  ]);
261
- }, Ne = ({ messageProp: e, messageRevision: t }) => {
262
- let [n, r] = I(e), i = F(null), a = F(0), [o, s] = I(!1);
263
- return M(() => {
261
+ }, Me = ({ messageProp: e, messageRevision: t }) => {
262
+ let [n, r] = L(e), i = I(null), a = I(0), [o, s] = L(!1);
263
+ return N(() => {
264
264
  r(e);
265
- }, [e, t]), M(() => {
265
+ }, [e, t]), N(() => {
266
266
  i.current && (a.current = i.current.offsetHeight);
267
- }, []), _e(() => {
267
+ }, []), ge(() => {
268
268
  if (!i.current || a.current === 0) return;
269
269
  let e = i.current.offsetHeight > a.current;
270
270
  s((t) => e ? !0 : n === "" ? !1 : t);
@@ -274,20 +274,20 @@ var Ee = (e, t) => {
274
274
  textareaRef: i,
275
275
  isMultiLine: o
276
276
  };
277
- }, Pe = /* @__PURE__ */ function(e) {
277
+ }, Ne = /* @__PURE__ */ function(e) {
278
278
  return e.Idle = "idle", e.Recording = "recording", e.Error = "error", e;
279
- }({}), Fe = [
279
+ }({}), Pe = [
280
280
  "audio/webm;codecs=opus",
281
281
  "audio/ogg;codecs=opus",
282
282
  "audio/webm"
283
- ], Ie = () => Fe.find((e) => MediaRecorder.isTypeSupported(e)) ?? "", Le = ({ onAttachAudio: e }) => {
284
- let [t, n] = I("idle"), [r, i] = I(null), [a, o] = I(0), s = F(null), c = F(null), l = F(null), u = F(null), d = F([]), f = F(""), p = F(null), m = F(e);
283
+ ], Fe = () => Pe.find((e) => MediaRecorder.isTypeSupported(e)) ?? "", Ie = ({ onAttachAudio: e }) => {
284
+ let [t, n] = L("idle"), [r, i] = L(null), [a, o] = L(0), s = I(null), c = I(null), l = I(null), u = I(null), d = I([]), f = I(""), p = I(null), m = I(e);
285
285
  m.current = e;
286
- let h = j(() => {
286
+ let h = M(() => {
287
287
  p.current != null && (clearInterval(p.current), p.current = null);
288
- }, []), g = j(() => {
288
+ }, []), g = M(() => {
289
289
  h(), s.current &&= (s.current.getTracks().forEach((e) => e.stop()), null), c.current &&= (c.current.close(), null), l.current = null, u.current = null;
290
- }, [h]), _ = j(() => {
290
+ }, [h]), _ = M(() => {
291
291
  (async () => {
292
292
  try {
293
293
  let e = await navigator.mediaDevices.getUserMedia({ audio: !0 });
@@ -296,7 +296,7 @@ var Ee = (e, t) => {
296
296
  c.current = t;
297
297
  let r = t.createAnalyser();
298
298
  r.fftSize = 256, l.current = r, t.createMediaStreamSource(e).connect(r);
299
- let i = Ie();
299
+ let i = Fe();
300
300
  f.current = i, d.current = [];
301
301
  let a = new MediaRecorder(e, i ? { mimeType: i } : void 0);
302
302
  u.current = a, a.ondataavailable = (e) => {
@@ -308,17 +308,17 @@ var Ee = (e, t) => {
308
308
  i(e instanceof Error ? e.message : "Microphone access denied"), n("error");
309
309
  }
310
310
  })();
311
- }, []), v = j(() => {
311
+ }, []), v = M(() => {
312
312
  let e = u.current;
313
313
  !e || e.state !== "recording" || (h(), e.onstop = () => {
314
314
  let e = f.current || "audio/webm", t = new Blob(d.current, { type: e }), r = e.split(";")[0], a = r.split("/")[1] ?? "webm", s = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, -1), c = new File([t], `voice-${s}.${a}`, { type: r });
315
315
  m.current(c), g(), o(0), i(null), n("idle");
316
316
  }, e.stop());
317
- }, [h, g]), y = j(() => {
317
+ }, [h, g]), y = M(() => {
318
318
  let e = u.current;
319
319
  e && e.state === "recording" && (e.ondataavailable = null, e.onstop = null, e.stop()), g(), o(0), i(null), n("idle");
320
320
  }, [g]);
321
- return M(() => () => {
321
+ return N(() => () => {
322
322
  g();
323
323
  }, [g]), {
324
324
  state: t,
@@ -329,39 +329,39 @@ var Ee = (e, t) => {
329
329
  stopRecording: v,
330
330
  discardRecording: y
331
331
  };
332
- }, Re = /* @__PURE__ */ function(e) {
332
+ }, Le = /* @__PURE__ */ function(e) {
333
333
  return e.Enter = "enter", e.MetaEnter = "meta-enter", e;
334
- }({}), ze = {
334
+ }({}), Re = {
335
335
  item: "_item_vou13_1",
336
336
  itemIcon: "_itemIcon_vou13_11"
337
- }, Be = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: o, titleClassName: c = "dial-body-semi-text", itemLabelClassName: l = "dial-small-text", btnTextClassName: u = "" }) => {
337
+ }, ze = ({ isOpen: e, title: t, closeLabel: n, onClose: r, style: i, items: a, className: s, titleClassName: c = "dial-body-semi-text", itemLabelClassName: l = "dial-small-text", btnTextClassName: u = "" }) => {
338
338
  let d = (e) => {
339
339
  e(), r();
340
340
  };
341
- return /* @__PURE__ */ R(H, {
341
+ return /* @__PURE__ */ z(U, {
342
342
  isOpen: e,
343
343
  title: t,
344
344
  closeLabel: n,
345
345
  onClose: r,
346
346
  style: i,
347
- className: o,
347
+ className: s,
348
348
  titleClassName: c,
349
- children: /* @__PURE__ */ R("ul", {
349
+ children: /* @__PURE__ */ z("ul", {
350
350
  role: "list",
351
351
  className: "flex flex-col",
352
- children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ R("li", { children: /* @__PURE__ */ R(p, {
352
+ children: a.map(({ key: e, label: t, icon: n, iconAfter: r, onClick: i }) => /* @__PURE__ */ z("li", { children: /* @__PURE__ */ z(f, {
353
353
  type: "button",
354
- className: s(ze.item, "flex w-full items-center gap-3 px-4 py-[10px] text-start"),
355
- iconBefore: /* @__PURE__ */ R("span", {
356
- className: ze.itemIcon,
354
+ className: o(Re.item, "flex w-full items-center gap-3 px-4 py-[10px] text-start"),
355
+ iconBefore: /* @__PURE__ */ z("span", {
356
+ className: Re.itemIcon,
357
357
  children: n
358
358
  }),
359
- iconAfter: r ? /* @__PURE__ */ R("span", {
359
+ iconAfter: r ? /* @__PURE__ */ z("span", {
360
360
  className: "ms-auto",
361
361
  children: r
362
362
  }) : null,
363
363
  textClassName: u,
364
- label: /* @__PURE__ */ R("span", {
364
+ label: /* @__PURE__ */ z("span", {
365
365
  className: l,
366
366
  children: t
367
367
  }),
@@ -369,53 +369,53 @@ var Ee = (e, t) => {
369
369
  }) }, e))
370
370
  })
371
371
  });
372
- }, Ve = ({ gradientId: e = "gradient-check-icon" }) => /* @__PURE__ */ z("svg", {
373
- width: f.SM,
374
- height: f.SM,
372
+ }, Be = ({ gradientId: e = "gradient-check-icon" }) => /* @__PURE__ */ B("svg", {
373
+ width: d.SM,
374
+ height: d.SM,
375
375
  viewBox: "0 0 24 24",
376
376
  fill: "none",
377
377
  "aria-hidden": !0,
378
- children: [/* @__PURE__ */ R("defs", { children: /* @__PURE__ */ z("linearGradient", {
378
+ children: [/* @__PURE__ */ z("defs", { children: /* @__PURE__ */ B("linearGradient", {
379
379
  id: e,
380
380
  x1: "0",
381
381
  y1: "0",
382
382
  x2: "24",
383
383
  y2: "24",
384
384
  gradientUnits: "userSpaceOnUse",
385
- children: [/* @__PURE__ */ R("stop", {
385
+ children: [/* @__PURE__ */ z("stop", {
386
386
  offset: "0%",
387
387
  stopColor: "#4b7be6"
388
- }), /* @__PURE__ */ R("stop", {
388
+ }), /* @__PURE__ */ z("stop", {
389
389
  offset: "100%",
390
390
  stopColor: "#9355f4"
391
391
  })]
392
- }) }), /* @__PURE__ */ R("path", {
392
+ }) }), /* @__PURE__ */ z("path", {
393
393
  d: "M5 12l5 5L20 7",
394
394
  stroke: `url(#${e})`,
395
395
  strokeWidth: "2",
396
396
  strokeLinecap: "round",
397
397
  strokeLinejoin: "round"
398
398
  })]
399
- }), U = {
399
+ }), Ve = {
400
400
  tabContainer: "_tabContainer_rzv03_1",
401
401
  tabActive: "_tabActive_rzv03_13"
402
402
  };
403
- ge(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
403
+ he(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
404
404
  let { tabClassName: i = "dial-tiny-semi-text" } = r?.typography ?? {};
405
- return /* @__PURE__ */ R("div", {
405
+ return /* @__PURE__ */ z("div", {
406
406
  className: "flex flex-nowrap gap-1",
407
407
  role: "tablist",
408
408
  children: e.map((e) => {
409
409
  let r = t === e.id;
410
- return /* @__PURE__ */ R("div", {
410
+ return /* @__PURE__ */ z("div", {
411
411
  role: "tab",
412
412
  "aria-selected": r,
413
413
  className: "contents",
414
- children: /* @__PURE__ */ R(D, {
414
+ children: /* @__PURE__ */ z(E, {
415
415
  label: e.label,
416
416
  selected: r,
417
417
  onClick: () => n(e.id),
418
- className: s("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, U.tabContainer, r && U.tabActive)
418
+ className: o("box-border h-auto shrink-0 justify-center rounded-full p-2 text-center", i, Ve.tabContainer, r && Ve.tabActive)
419
419
  })
420
420
  }, e.id);
421
421
  })
@@ -423,13 +423,13 @@ ge(({ tabs: e, activeTabId: t, onTabChange: n, styles: r }) => {
423
423
  });
424
424
  //#endregion
425
425
  //#region ../ai-dial-kit/src/components/Button/Buttons.tsx
426
- var He = (e) => /* @__PURE__ */ R(x, { ...e }), W = (e) => /* @__PURE__ */ R(p, {
426
+ var W = (e) => /* @__PURE__ */ z(b, { ...e }), He = (e) => /* @__PURE__ */ z(f, {
427
427
  ...e,
428
- variant: d.Neutral,
429
- appearance: u.Outlined
428
+ variant: u.Neutral,
429
+ appearance: l.Outlined
430
430
  }), G = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, isOpen: o }) => {
431
- let [s, c] = I(t), [l, u] = I(n), [d, f] = I(r), p = F(o);
432
- M(() => {
431
+ let [s, c] = L(t), [l, u] = L(n), [d, f] = L(r), p = I(o);
432
+ N(() => {
433
433
  o && !p.current && (c(t), u(n), f(r)), p.current = o;
434
434
  }, [
435
435
  o,
@@ -446,7 +446,7 @@ var He = (e) => /* @__PURE__ */ R(x, { ...e }), W = (e) => /* @__PURE__ */ R(p,
446
446
  setResponseFormat: c,
447
447
  setSystemPrompt: u,
448
448
  setTemperature: f,
449
- handleSubmit: j(() => {
449
+ handleSubmit: M(() => {
450
450
  if (!m) return;
451
451
  let t = {};
452
452
  e.responseFormat && s != null && (t.responseFormat = s), e.systemPrompt && (t.systemPrompt = l), e.temperature && (t.temperature = d), i(t), a();
@@ -460,42 +460,42 @@ var He = (e) => /* @__PURE__ */ R(x, { ...e }), W = (e) => /* @__PURE__ */ R(p,
460
460
  a
461
461
  ])
462
462
  };
463
- }, Ue = "!dial-small-semi-text !text-primary gap-1", We = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: i, onSystemPromptChange: o, onTemperatureChange: s, responseFormatLabel: c = "Response format", responseFormatHint: l = "Applies to new and existing messages", responseFormatMarkdownLabel: u = "Markdown", responseFormatPlainTextLabel: d = "Plain text", systemPromptLabel: f = "System prompt", systemPromptTooltip: p = "Enter a prompt", temperatureLabel: m = "Temperature", temperatureLabels: h = [
463
+ }, K = "!dial-small-semi-text !text-primary gap-1", Ue = ({ features: e, responseFormat: t, systemPrompt: n, temperature: r, onResponseFormatChange: a, onSystemPromptChange: o, onTemperatureChange: s, responseFormatLabel: c = "Response format", responseFormatHint: l = "Applies to new and existing messages", responseFormatMarkdownLabel: u = "Markdown", responseFormatPlainTextLabel: d = "Plain text", systemPromptLabel: f = "System prompt", systemPromptTooltip: p = "Enter a prompt", temperatureLabel: m = "Temperature", temperatureLabels: h = [
464
464
  "Precise",
465
465
  "Neutral",
466
466
  "Creative"
467
- ], temperatureHint: g }) => /* @__PURE__ */ z("div", {
467
+ ], temperatureHint: g }) => /* @__PURE__ */ B("div", {
468
468
  className: "flex flex-col gap-4 px-6 py-3",
469
469
  children: [
470
- e.responseFormat && /* @__PURE__ */ R(S, {
470
+ e.responseFormat && /* @__PURE__ */ z(x, {
471
471
  fieldTitle: c,
472
- labelClassName: Ue,
472
+ labelClassName: K,
473
473
  elementId: "response-format",
474
- orientation: te.Column,
475
- activeRadioButton: t ?? a.Markdown,
474
+ orientation: A.Column,
475
+ activeRadioButton: t ?? i.Markdown,
476
476
  labelDescription: l,
477
477
  radioButtons: [{
478
- id: a.Markdown,
478
+ id: i.Markdown,
479
479
  name: u
480
480
  }, {
481
- id: a.PlainText,
481
+ id: i.PlainText,
482
482
  name: d
483
483
  }],
484
- onChange: (e) => i(e)
484
+ onChange: (e) => a(e)
485
485
  }),
486
- e.systemPrompt && /* @__PURE__ */ R(y, {
486
+ e.systemPrompt && /* @__PURE__ */ z(v, {
487
487
  value: n,
488
488
  placeholder: p,
489
489
  labelProps: {
490
- className: Ue,
490
+ className: K,
491
491
  label: f
492
492
  },
493
493
  onChange: (e) => o(e ?? "")
494
494
  }),
495
- e.temperature && /* @__PURE__ */ R(E, {
495
+ e.temperature && /* @__PURE__ */ z(T, {
496
496
  labelProps: {
497
497
  label: m,
498
- className: Ue,
498
+ className: K,
499
499
  caption: g
500
500
  },
501
501
  value: r,
@@ -506,17 +506,17 @@ var He = (e) => /* @__PURE__ */ R(x, { ...e }), W = (e) => /* @__PURE__ */ R(p,
506
506
  onChange: s
507
507
  })
508
508
  ]
509
- }), K = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: o, initialResponseFormat: c, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
510
- let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: D, setResponseFormat: k, setSystemPrompt: ee, setTemperature: te, handleSubmit: A } = G({
509
+ }), We = ({ isOpen: e, onBack: t, backLabel: n, onClose: r, closeLabel: i, style: a, features: s, initialResponseFormat: c, initialSystemPrompt: l, initialTemperature: u, onSave: d, title: f = "Chat settings", responseFormatLabel: p, responseFormatHint: m, responseFormatMarkdownLabel: h, responseFormatPlainTextLabel: g, systemPromptLabel: _, systemPromptTooltip: v, temperatureLabel: y, temperatureLabels: b, temperatureHint: x, saveLabel: S = "Apply changes", saveDisabledTooltip: C }) => {
510
+ let { responseFormat: w, systemPrompt: T, temperature: E, canSubmit: O, setResponseFormat: k, setSystemPrompt: ee, setTemperature: A, handleSubmit: te } = G({
511
511
  isOpen: e,
512
- features: o,
512
+ features: s,
513
513
  initialResponseFormat: c,
514
514
  initialSystemPrompt: l,
515
515
  initialTemperature: u,
516
516
  onSave: d,
517
517
  onClose: r
518
518
  });
519
- return /* @__PURE__ */ z(H, {
519
+ return /* @__PURE__ */ B(U, {
520
520
  isOpen: e,
521
521
  title: f,
522
522
  closeLabel: i,
@@ -524,14 +524,14 @@ var He = (e) => /* @__PURE__ */ R(x, { ...e }), W = (e) => /* @__PURE__ */ R(p,
524
524
  onBack: t,
525
525
  backLabel: n,
526
526
  style: a,
527
- children: [/* @__PURE__ */ R(We, {
528
- features: o,
527
+ children: [/* @__PURE__ */ z(Ue, {
528
+ features: s,
529
529
  responseFormat: w,
530
530
  systemPrompt: T,
531
531
  temperature: E,
532
532
  onResponseFormatChange: k,
533
533
  onSystemPromptChange: ee,
534
- onTemperatureChange: te,
534
+ onTemperatureChange: A,
535
535
  responseFormatLabel: p,
536
536
  responseFormatHint: m,
537
537
  responseFormatMarkdownLabel: h,
@@ -541,23 +541,23 @@ var He = (e) => /* @__PURE__ */ R(x, { ...e }), W = (e) => /* @__PURE__ */ R(p,
541
541
  temperatureLabel: y,
542
542
  temperatureLabels: b,
543
543
  temperatureHint: x
544
- }), /* @__PURE__ */ R("div", {
545
- className: s("px-6 py-4 mobile:pb-8"),
546
- children: /* @__PURE__ */ R(O, {
544
+ }), /* @__PURE__ */ z("div", {
545
+ className: o("px-6 py-4 mobile:pb-8"),
546
+ children: /* @__PURE__ */ z(D, {
547
547
  tooltip: C,
548
- hideTooltip: D || !C,
548
+ hideTooltip: O || !C,
549
549
  triggerClassName: "w-full",
550
- children: /* @__PURE__ */ R(He, {
550
+ children: /* @__PURE__ */ z(W, {
551
551
  label: S,
552
- onClick: A,
553
- disabled: !D,
552
+ onClick: te,
553
+ disabled: !O,
554
554
  className: "w-full"
555
555
  })
556
556
  })
557
557
  })]
558
558
  });
559
559
  }, q = ({ features: e, initialResponseFormat: t, initialSystemPrompt: n, initialTemperature: r, onSave: i, onClose: a, title: o = "Chat settings", responseFormatLabel: s, responseFormatHint: c, responseFormatMarkdownLabel: l, responseFormatPlainTextLabel: u, systemPromptLabel: d, systemPromptTooltip: f, temperatureLabel: p, temperatureLabels: m, temperatureHint: h, saveLabel: g = "Apply changes", saveDisabledTooltip: _ }) => {
560
- let { responseFormat: v, systemPrompt: y, temperature: x, canSubmit: S, setResponseFormat: C, setSystemPrompt: w, setTemperature: T, handleSubmit: E } = G({
560
+ let { responseFormat: v, systemPrompt: b, temperature: x, canSubmit: S, setResponseFormat: C, setSystemPrompt: w, setTemperature: T, handleSubmit: E } = G({
561
561
  features: e,
562
562
  initialResponseFormat: t,
563
563
  initialSystemPrompt: n,
@@ -565,28 +565,28 @@ var He = (e) => /* @__PURE__ */ R(x, { ...e }), W = (e) => /* @__PURE__ */ R(p,
565
565
  onSave: i,
566
566
  onClose: a
567
567
  });
568
- return /* @__PURE__ */ R(b, {
568
+ return /* @__PURE__ */ z(y, {
569
569
  open: !0,
570
570
  header: o,
571
571
  size: ee.Sm,
572
572
  onClose: a,
573
573
  className: "!bg-layer-2",
574
- footer: /* @__PURE__ */ R("div", {
574
+ footer: /* @__PURE__ */ z("div", {
575
575
  className: "flex justify-end px-6 py-4",
576
- children: /* @__PURE__ */ R(O, {
576
+ children: /* @__PURE__ */ z(D, {
577
577
  tooltip: _,
578
578
  hideTooltip: S || !_,
579
- children: /* @__PURE__ */ R(He, {
579
+ children: /* @__PURE__ */ z(W, {
580
580
  label: g,
581
581
  onClick: E,
582
582
  disabled: !S
583
583
  })
584
584
  })
585
585
  }),
586
- children: /* @__PURE__ */ R(We, {
586
+ children: /* @__PURE__ */ z(Ue, {
587
587
  features: e,
588
588
  responseFormat: v,
589
- systemPrompt: y,
589
+ systemPrompt: b,
590
590
  temperature: x,
591
591
  onResponseFormatChange: C,
592
592
  onSystemPromptChange: w,
@@ -603,30 +603,30 @@ var He = (e) => /* @__PURE__ */ R(x, { ...e }), W = (e) => /* @__PURE__ */ R(p,
603
603
  })
604
604
  });
605
605
  };
606
- ge(q);
606
+ he(q);
607
607
  //#endregion
608
608
  //#region src/components/AddAttachmentButton/AddAttachmentButton.tsx
609
- var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: i, style: o, listClassName: u = "cp-dropdown-overlay !w-[240px]", isDisabled: d = !1, chatSettings: p, extraMenuItems: m }) => {
610
- let g = c(), [_, y] = I(!1), [b, x] = I(!1), S = P(() => [
609
+ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, menuCloseLabel: a, style: l, listClassName: u = "cp-dropdown-overlay !w-[240px]", isDisabled: f = !1, chatSettings: p, extraMenuItems: h }) => {
610
+ let g = s(), [v, y] = L(!1), [b, x] = L(!1), S = F(() => [
611
611
  ...e == null ? [] : [{
612
612
  key: "attach",
613
613
  label: t,
614
- icon: /* @__PURE__ */ R(ce, {
615
- size: l,
614
+ icon: /* @__PURE__ */ z(j, {
615
+ size: c,
616
616
  "aria-hidden": !0
617
617
  }),
618
618
  onClick: e
619
619
  }],
620
- ...m ?? [],
620
+ ...h ?? [],
621
621
  ...p == null ? [] : [{
622
622
  key: "chat-settings",
623
623
  label: p.menuItemLabel ?? "Chat settings",
624
- icon: /* @__PURE__ */ R(fe, {
625
- size: l,
624
+ icon: /* @__PURE__ */ z(de, {
625
+ size: c,
626
626
  "aria-hidden": !0
627
627
  }),
628
- iconAfter: g ? /* @__PURE__ */ R(ae, {
629
- size: l,
628
+ iconAfter: g ? /* @__PURE__ */ z(ae, {
629
+ size: c,
630
630
  stroke: 1.5,
631
631
  className: "text-secondary rtl:scale-x-[-1]",
632
632
  "aria-hidden": !0
@@ -637,41 +637,41 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
637
637
  t,
638
638
  e,
639
639
  p,
640
- m,
640
+ h,
641
641
  g
642
642
  ]);
643
- return S.length === 0 ? null : /* @__PURE__ */ R(L, { children: g ? /* @__PURE__ */ z(L, { children: [
644
- /* @__PURE__ */ R(v, {
645
- icon: /* @__PURE__ */ R(de, {
646
- size: f.LG,
643
+ return S.length === 0 ? null : /* @__PURE__ */ z(R, { children: g ? /* @__PURE__ */ B(R, { children: [
644
+ /* @__PURE__ */ z(_, {
645
+ icon: /* @__PURE__ */ z(ue, {
646
+ size: d.LG,
647
647
  "aria-hidden": !0
648
648
  }),
649
649
  "aria-label": n,
650
650
  tooltipProps: { tooltip: n },
651
- className: s("size-10 flex-shrink-0", d && "pointer-events-none opacity-50"),
651
+ className: o("size-10 flex-shrink-0", f && "pointer-events-none opacity-50"),
652
652
  onClick: () => y(!0)
653
653
  }),
654
- /* @__PURE__ */ R(Be, {
655
- isOpen: _,
654
+ /* @__PURE__ */ z(ze, {
655
+ isOpen: v,
656
656
  title: r,
657
- closeLabel: i,
657
+ closeLabel: a,
658
658
  onClose: () => y(!1),
659
- style: o,
659
+ style: l,
660
660
  items: S,
661
661
  className: "pb-4",
662
662
  btnTextClassName: "flex-1"
663
663
  }),
664
- p != null && /* @__PURE__ */ R(K, {
664
+ p != null && /* @__PURE__ */ z(We, {
665
665
  isOpen: b,
666
666
  onBack: () => {
667
667
  x(!1), y(!0);
668
668
  },
669
669
  backLabel: p.backLabel ?? "Back",
670
670
  onClose: () => x(!1),
671
- closeLabel: i,
672
- style: o,
671
+ closeLabel: a,
672
+ style: l,
673
673
  features: p.features,
674
- initialResponseFormat: p.responseFormat ?? a.Markdown,
674
+ initialResponseFormat: p.responseFormat ?? i.Markdown,
675
675
  initialSystemPrompt: p.systemPrompt,
676
676
  initialTemperature: p.temperature,
677
677
  onSave: p.onSave,
@@ -688,24 +688,24 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
688
688
  saveLabel: p.saveLabel,
689
689
  saveDisabledTooltip: p.saveDisabledTooltip
690
690
  })
691
- ] }) : /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(h, {
691
+ ] }) : /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(m, {
692
692
  matchReferenceWidth: !1,
693
693
  placement: "bottom-start",
694
694
  listClassName: u,
695
695
  items: S,
696
- children: /* @__PURE__ */ R(v, {
697
- icon: /* @__PURE__ */ R(de, {
698
- size: f.LG,
696
+ children: /* @__PURE__ */ z(_, {
697
+ icon: /* @__PURE__ */ z(ue, {
698
+ size: d.LG,
699
699
  "aria-hidden": !0
700
700
  }),
701
701
  "aria-label": n,
702
702
  tooltipProps: { tooltip: n },
703
703
  className: "size-10 flex-shrink-0",
704
- disabled: d
704
+ disabled: f
705
705
  })
706
- }), p != null && b && /* @__PURE__ */ R(q, {
706
+ }), p != null && b && /* @__PURE__ */ z(q, {
707
707
  features: p.features,
708
- initialResponseFormat: p.responseFormat ?? a.Markdown,
708
+ initialResponseFormat: p.responseFormat ?? i.Markdown,
709
709
  initialSystemPrompt: p.systemPrompt,
710
710
  initialTemperature: p.temperature,
711
711
  onSave: p.onSave,
@@ -731,29 +731,29 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
731
731
  stopRecordingIcon: "_stopRecordingIcon_8j81i_28",
732
732
  recordingDot: "_recordingDot_8j81i_42",
733
733
  "recording-pulse": "_recording-pulse_8j81i_1"
734
- }, Ke = 3, qe = 4, Y = 200, Je = (e) => `${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`, Ye = ({ state: e, analyserNodeRef: t, elapsedSeconds: n, errorMessage: r, onStop: i, onDiscard: a, stopLabel: o = "Stop recording", discardLabel: c = "Discard recording", timerLabel: l = "Recording time", style: u, className: d }) => {
735
- let p = F(null), m = F(new Float32Array(Y)), h = F(0), g = F(0), y = e === Pe.Recording, b = e === Pe.Error, x = j((e) => {
734
+ }, Ke = 3, Y = 4, X = 200, qe = (e) => `${String(Math.floor(e / 60)).padStart(2, "0")}:${String(e % 60).padStart(2, "0")}`, Je = ({ state: e, analyserNodeRef: t, elapsedSeconds: n, errorMessage: r, onStop: i, onDiscard: a, stopLabel: s = "Stop recording", discardLabel: c = "Discard recording", timerLabel: l = "Recording time", style: u, className: f }) => {
735
+ let p = I(null), m = I(new Float32Array(X)), h = I(0), v = I(0), y = e === Ne.Recording, b = e === Ne.Error, x = M((e) => {
736
736
  let t = e.getContext("2d");
737
737
  if (!t) return;
738
738
  e.width = e.clientWidth || 200, e.height = e.clientHeight || 32;
739
739
  let { width: n, height: r } = e;
740
740
  t.clearRect(0, 0, n, r), t.fillStyle = getComputedStyle(e).color;
741
- let i = Math.min(Math.max(1, Math.floor(n / qe)), Y - 1), a = h.current, o = g.current;
741
+ let i = Math.min(Math.max(1, Math.floor(n / Y)), X - 1), a = h.current, o = v.current;
742
742
  t.save(), t.beginPath(), t.rect(0, 0, n, r), t.clip(), t.translate(-o, 0);
743
743
  for (let e = 0; e <= i; e++) {
744
- let n = ((a - i + e) % Y + Y) % Y, o = m.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
745
- t.fillRect(e * qe, (r - c) / 2, Ke, c);
744
+ let n = ((a - i + e) % X + X) % X, o = m.current[n] ?? 0, s = Math.min(1, o * 6), c = Math.max(3, s * r);
745
+ t.fillRect(e * Y, (r - c) / 2, Ke, c);
746
746
  }
747
747
  t.restore();
748
748
  }, []);
749
- M(() => {
749
+ N(() => {
750
750
  if (!y) return;
751
751
  let e = p.current;
752
752
  if (!e) return;
753
- m.current.fill(0), h.current = 0, g.current = 0;
753
+ m.current.fill(0), h.current = 0, v.current = 0;
754
754
  let n, r = () => {
755
- if (g.current += 1, g.current >= qe) {
756
- g.current -= qe;
755
+ if (v.current += 1, v.current >= Y) {
756
+ v.current -= Y;
757
757
  let e = t.current;
758
758
  if (e) {
759
759
  let t = new Uint8Array(e.frequencyBinCount);
@@ -763,7 +763,7 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
763
763
  let r = (t[e] - 128) / 128;
764
764
  n += r * r;
765
765
  }
766
- m.current[h.current % Y] = Math.sqrt(n / t.length), h.current++;
766
+ m.current[h.current % X] = Math.sqrt(n / t.length), h.current++;
767
767
  }
768
768
  }
769
769
  x(e), n = requestAnimationFrame(r);
@@ -775,7 +775,7 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
775
775
  y,
776
776
  t,
777
777
  x
778
- ]), M(() => {
778
+ ]), N(() => {
779
779
  let e = p.current;
780
780
  if (!e) return;
781
781
  let t = new ResizeObserver(() => {
@@ -783,53 +783,53 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
783
783
  });
784
784
  return t.observe(e), () => t.disconnect();
785
785
  }, [x]);
786
- let S = /* @__PURE__ */ z("div", {
786
+ let S = /* @__PURE__ */ B("div", {
787
787
  className: "flex flex-shrink-0 items-center justify-end gap-1",
788
- children: [/* @__PURE__ */ R(v, {
789
- icon: /* @__PURE__ */ R(pe, {
790
- size: f.LG,
788
+ children: [/* @__PURE__ */ z(_, {
789
+ icon: /* @__PURE__ */ z(fe, {
790
+ size: d.LG,
791
791
  "aria-hidden": !0
792
792
  }),
793
793
  "aria-label": c,
794
794
  className: "size-10 flex-shrink-0",
795
795
  onClick: a
796
- }), y && /* @__PURE__ */ R(v, {
797
- icon: /* @__PURE__ */ R(le, {
798
- size: f.LG,
796
+ }), y && /* @__PURE__ */ z(_, {
797
+ icon: /* @__PURE__ */ z(ce, {
798
+ size: d.LG,
799
799
  className: J.stopRecordingIcon,
800
800
  "aria-hidden": !0
801
801
  }),
802
- "aria-label": o,
802
+ "aria-label": s,
803
803
  className: "size-10 flex-shrink-0",
804
804
  onClick: i
805
805
  })]
806
806
  });
807
- return /* @__PURE__ */ z("div", {
808
- className: d,
809
- children: [/* @__PURE__ */ z("div", {
807
+ return /* @__PURE__ */ B("div", {
808
+ className: f,
809
+ children: [/* @__PURE__ */ B("div", {
810
810
  style: u,
811
- className: s(J.container, "flex min-h-[56px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", b && J.containerError),
812
- children: [/* @__PURE__ */ z("div", {
811
+ className: o(J.container, "flex min-h-[56px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border px-3 desktop:flex-row desktop:items-center desktop:gap-2 desktop:py-2", b && J.containerError),
812
+ children: [/* @__PURE__ */ B("div", {
813
813
  className: "flex min-w-0 flex-1 items-center gap-2",
814
- children: [y && /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R("span", {
814
+ children: [y && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("span", {
815
815
  className: J.recordingDot,
816
816
  "aria-hidden": !0
817
- }), /* @__PURE__ */ R("span", {
818
- className: s(J.timer, "flex-shrink-0"),
817
+ }), /* @__PURE__ */ z("span", {
818
+ className: o(J.timer, "flex-shrink-0"),
819
819
  "aria-label": l,
820
- children: Je(n)
821
- })] }), /* @__PURE__ */ R("canvas", {
820
+ children: qe(n)
821
+ })] }), /* @__PURE__ */ z("canvas", {
822
822
  ref: p,
823
823
  height: 32,
824
- className: s(J.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
824
+ className: o(J.waveformCanvas, "h-8 min-w-0 flex-1 desktop:h-6")
825
825
  })]
826
826
  }), S]
827
- }), b && r && /* @__PURE__ */ R(_, {
827
+ }), b && r && /* @__PURE__ */ z(g, {
828
828
  text: r,
829
829
  className: "mt-1 px-1"
830
830
  })]
831
831
  });
832
- }, X = {
832
+ }, Z = {
833
833
  wrapper: "_wrapper_1q2nu_2",
834
834
  wrapperDisabled: "_wrapperDisabled_1q2nu_15",
835
835
  textarea: "_textarea_1q2nu_20",
@@ -841,130 +841,130 @@ var Ge = ({ onAttachClick: e, attachLabel: t, addMenuTitle: n, menuTitle: r, men
841
841
  sendButtonEnter: "_sendButtonEnter_1q2nu_1",
842
842
  sendButtonExiting: "_sendButtonExiting_1q2nu_55",
843
843
  sendButtonExit: "_sendButtonExit_1q2nu_55"
844
- }, Xe = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", title: r, isExiting: i = !1 }) => /* @__PURE__ */ R(O, {
844
+ }, Ye = ({ onSend: e, isDisabled: t = !1, ariaLabel: n = "Send message", title: r, isExiting: i = !1 }) => /* @__PURE__ */ z(D, {
845
845
  tooltip: r,
846
846
  hideTooltip: !r,
847
- children: /* @__PURE__ */ R("button", {
848
- className: s("flex size-[32px] cursor-pointer items-center justify-center rounded-full disabled:cursor-not-allowed", X.sendButton, i && X.sendButtonExiting),
847
+ children: /* @__PURE__ */ z("button", {
848
+ className: o("flex size-[32px] cursor-pointer items-center justify-center rounded-full disabled:cursor-not-allowed", Z.sendButton, i && Z.sendButtonExiting),
849
849
  "aria-label": n,
850
850
  onClick: () => e?.(),
851
851
  type: "button",
852
852
  disabled: t,
853
853
  "aria-hidden": i,
854
- children: /* @__PURE__ */ R(ne, {
855
- size: f.LG,
854
+ children: /* @__PURE__ */ z(ne, {
855
+ size: d.LG,
856
856
  className: "rtl:scale-x-[-1]"
857
857
  })
858
858
  })
859
- }), Ze = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ R("button", {
860
- className: s("flex cursor-pointer items-center justify-center disabled:cursor-not-allowed"),
859
+ }), Xe = ({ onStop: e, ariaLabel: t = "Stop streaming" }) => /* @__PURE__ */ z("button", {
860
+ className: o("flex cursor-pointer items-center justify-center disabled:cursor-not-allowed"),
861
861
  "aria-label": t,
862
862
  onClick: () => e?.(),
863
863
  type: "button",
864
- children: /* @__PURE__ */ R(ue, {
865
- size: f.LG,
866
- className: X.stopIcon
864
+ children: /* @__PURE__ */ z(le, {
865
+ size: d.LG,
866
+ className: Z.stopIcon
867
867
  })
868
- }), Qe = ({ size: e = 20 }) => /* @__PURE__ */ R(w, {
869
- variant: T.Circular,
868
+ }), Ze = ({ size: e = 20 }) => /* @__PURE__ */ z(C, {
869
+ variant: w.Circular,
870
870
  width: e,
871
871
  height: e,
872
872
  active: !0
873
- }), $e = ({ loadingLabel: e }) => /* @__PURE__ */ z("span", {
873
+ }), Qe = ({ loadingLabel: e }) => /* @__PURE__ */ B("span", {
874
874
  className: "flex min-w-0 flex-1 items-center",
875
- children: [/* @__PURE__ */ R(w, {
876
- variant: T.Text,
875
+ children: [/* @__PURE__ */ z(C, {
876
+ variant: w.Text,
877
877
  width: "100%",
878
878
  height: 16,
879
879
  active: !0
880
- }), e && /* @__PURE__ */ R("span", {
880
+ }), e && /* @__PURE__ */ z("span", {
881
881
  className: "sr-only",
882
882
  children: e
883
883
  })]
884
- }), et = ({ loadingLabel: e }) => /* @__PURE__ */ R("div", {
884
+ }), $e = ({ loadingLabel: e }) => /* @__PURE__ */ z("div", {
885
885
  role: "status",
886
886
  "aria-label": e,
887
- children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ z("div", {
887
+ children: Array.from({ length: 7 }).map((e, t) => /* @__PURE__ */ B("div", {
888
888
  className: "flex h-11 items-center gap-3 px-4",
889
889
  "aria-hidden": "true",
890
- children: [/* @__PURE__ */ R(Qe, {}), /* @__PURE__ */ R($e, {})]
890
+ children: [/* @__PURE__ */ z(Ze, {}), /* @__PURE__ */ z(Qe, {})]
891
891
  }, t))
892
- }), tt = (e) => e.displayName ?? e.id, nt = (e, t) => {
892
+ }), et = (e) => e.displayName ?? e.id, tt = (e, t) => {
893
893
  let n = t.trim().toLowerCase();
894
- return n ? e.filter((e) => tt(e).toLowerCase().includes(n)) : e;
895
- }, rt = (e, t, r, i = 18, a) => /* @__PURE__ */ R(n, {
894
+ return n ? e.filter((e) => et(e).toLowerCase().includes(n)) : e;
895
+ }, nt = (e, t, r, i = 18, a) => /* @__PURE__ */ z(n, {
896
896
  src: e,
897
897
  size: i,
898
898
  labels: { tooltip: a },
899
899
  initialsName: r
900
- }), it = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: i, searchHeaderClassName: a = "bg-layer-0" }) => {
901
- let [o, c] = I(""), l = P(() => e?.find((e) => e.id === t), [e, t]), u = i?.loading !== void 0, d = P(() => u ? /* @__PURE__ */ R(Qe, { size: f.LG }) : rt(l?.iconUrl, l?.type, l?.displayName ?? l?.id ?? "", f.LG), [u, l]), p = l?.displayName ?? l?.id;
900
+ }), rt = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, searchHeaderClassName: i = "bg-layer-0" }) => {
901
+ let [a, s] = L(""), c = F(() => e?.find((e) => e.id === t), [e, t]), l = r?.loading !== void 0, u = F(() => l ? /* @__PURE__ */ z(Ze, { size: d.LG }) : nt(c?.iconUrl, c?.type, c?.displayName ?? c?.id ?? "", d.LG), [l, c]), f = c?.displayName ?? c?.id;
902
902
  return {
903
- selectorIcon: d,
904
- selectorAriaLabel: p ? `${i?.ariaLabel ?? "Select model"}: ${p}` : i?.ariaLabel ?? "Select model",
905
- selectedLabel: p,
906
- menuItems: P(() => {
907
- if (u) return Array.from({ length: 7 }, (e, t) => ({
903
+ selectorIcon: u,
904
+ selectorAriaLabel: f ? `${r?.ariaLabel ?? "Select model"}: ${f}` : r?.ariaLabel ?? "Select model",
905
+ selectedLabel: f,
906
+ menuItems: F(() => {
907
+ if (l) return Array.from({ length: 7 }, (e, t) => ({
908
908
  key: `__loading-${t}`,
909
- icon: /* @__PURE__ */ R(Qe, {}),
910
- label: /* @__PURE__ */ R($e, { loadingLabel: t === 0 ? i?.loading : void 0 }),
909
+ icon: /* @__PURE__ */ z(Ze, {}),
910
+ label: /* @__PURE__ */ z(Qe, { loadingLabel: t === 0 ? r?.loading : void 0 }),
911
911
  disabled: !0
912
912
  }));
913
913
  if (!e || e.length === 0) {
914
- let e = i?.error ?? i?.empty;
914
+ let e = r?.error ?? r?.empty;
915
915
  return e ? [{
916
916
  key: "__state",
917
917
  label: e,
918
918
  disabled: !0
919
919
  }] : [];
920
920
  }
921
- return nt(e, o).map((e) => {
922
- let i = e.id === t;
921
+ return tt(e, a).map((e) => {
922
+ let r = e.id === t;
923
923
  return {
924
924
  key: e.id,
925
- label: /* @__PURE__ */ z("span", {
925
+ label: /* @__PURE__ */ B("span", {
926
926
  className: "flex w-full items-center justify-between gap-2",
927
- children: [/* @__PURE__ */ R(r, {
928
- text: tt(e),
929
- query: o,
927
+ children: [/* @__PURE__ */ z(k, {
928
+ text: et(e),
929
+ query: a,
930
930
  maxLines: 1
931
- }), i && /* @__PURE__ */ R(Ve, { gradientId: "ms-check-grad" })]
931
+ }), r && /* @__PURE__ */ z(Be, { gradientId: "ms-check-grad" })]
932
932
  }),
933
- icon: rt(e.iconUrl, e.type, e.displayName ?? e.id),
933
+ icon: nt(e.iconUrl, e.type, e.displayName ?? e.id),
934
934
  onClick: () => n?.(e.id),
935
- className: i ? "bg-accent-primary-alpha" : void 0
935
+ className: r ? "bg-accent-primary-alpha" : void 0
936
936
  };
937
937
  });
938
938
  }, [
939
939
  e,
940
- u,
941
- o,
940
+ l,
941
+ a,
942
942
  t,
943
- i,
943
+ r,
944
944
  n
945
945
  ]),
946
- menuHeader: P(() => !u && e && e.length > 0 ? /* @__PURE__ */ R("div", {
947
- className: s("sticky top-0 z-10 pb-1 pe-2 pt-2", a),
948
- children: /* @__PURE__ */ R(C, {
949
- value: o,
950
- placeholder: i?.searchPlaceholder ?? "Search",
951
- size: k.Small,
946
+ menuHeader: F(() => !l && e && e.length > 0 ? /* @__PURE__ */ z("div", {
947
+ className: o("sticky top-0 z-10 pb-1 pe-2 pt-2", i),
948
+ children: /* @__PURE__ */ z(S, {
949
+ value: a,
950
+ placeholder: r?.searchPlaceholder ?? "Search",
951
+ size: O.Small,
952
952
  wrapperClassName: "border-0",
953
- onChange: c
953
+ onChange: s
954
954
  })
955
955
  }) : void 0, [
956
956
  e,
957
- u,
958
- o,
959
- i,
960
- a
957
+ l,
958
+ a,
959
+ r,
960
+ i
961
961
  ]),
962
962
  onOpenChange: (e) => {
963
- e || c("");
963
+ e || s("");
964
964
  }
965
965
  };
966
- }, at = typeof window < "u" ? _e : M;
967
- function ot(e) {
966
+ }, it = typeof window < "u" ? ge : N;
967
+ function at(e) {
968
968
  if (e !== void 0) switch (typeof e) {
969
969
  case "number": return e;
970
970
  case "string":
@@ -972,15 +972,15 @@ function ot(e) {
972
972
  break;
973
973
  }
974
974
  }
975
- function st({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
976
- let { styleHeight: s, styleWidth: c } = P(() => ({
977
- styleHeight: ot(o?.height),
978
- styleWidth: ot(o?.width)
979
- }), [o?.height, o?.width]), [l, u] = I({
975
+ function ot({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
976
+ let { styleHeight: s, styleWidth: c } = F(() => ({
977
+ styleHeight: at(o?.height),
978
+ styleWidth: at(o?.width)
979
+ }), [o?.height, o?.width]), [l, u] = L({
980
980
  height: t,
981
981
  width: n
982
982
  }), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
983
- return at(() => {
983
+ return it(() => {
984
984
  if (i === null || d) return;
985
985
  let t = new ResizeObserver((e) => {
986
986
  for (let t of e) {
@@ -1000,7 +1000,7 @@ function st({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1000
1000
  i,
1001
1001
  s,
1002
1002
  c
1003
- ]), P(() => ({
1003
+ ]), F(() => ({
1004
1004
  height: s ?? l.height,
1005
1005
  width: c ?? l.width
1006
1006
  }), [
@@ -1009,23 +1009,23 @@ function st({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i
1009
1009
  c
1010
1010
  ]);
1011
1011
  }
1012
- function ct(e) {
1013
- let t = F(() => {
1012
+ function st(e) {
1013
+ let t = I(() => {
1014
1014
  throw Error("Cannot call during render.");
1015
1015
  });
1016
- return at(() => {
1016
+ return it(() => {
1017
1017
  t.current = e;
1018
- }, [e]), j((e) => t.current?.(e), [t]);
1018
+ }, [e]), M((e) => t.current?.(e), [t]);
1019
1019
  }
1020
- var Z = null;
1020
+ var ct = null;
1021
1021
  function lt(e = !1) {
1022
- if (Z === null || e) {
1022
+ if (ct === null || e) {
1023
1023
  let e = document.createElement("div"), t = e.style;
1024
1024
  t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
1025
1025
  let n = document.createElement("div"), r = n.style;
1026
- return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? Z = "positive-descending" : (e.scrollLeft = 1, Z = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), Z;
1026
+ return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? ct = "positive-descending" : (e.scrollLeft = 1, ct = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), ct;
1027
1027
  }
1028
- return Z;
1028
+ return ct;
1029
1029
  }
1030
1030
  function ut({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1031
1031
  if (t === "horizontal" && n) switch (lt()) {
@@ -1042,13 +1042,13 @@ function ut({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
1042
1042
  function Q(e, t = "Assertion error") {
1043
1043
  if (!e) throw console.error(t), Error(t);
1044
1044
  }
1045
- function dt(e, t) {
1045
+ function $(e, t) {
1046
1046
  if (e === t) return !0;
1047
1047
  if (!!e != !!t || (Q(e !== void 0), Q(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
1048
1048
  for (let n in e) if (!Object.is(t[n], e[n])) return !1;
1049
1049
  return !0;
1050
1050
  }
1051
- function $({ cachedBounds: e, itemCount: t, itemSize: n }) {
1051
+ function dt({ cachedBounds: e, itemCount: t, itemSize: n }) {
1052
1052
  if (t === 0) return 0;
1053
1053
  if (typeof n == "number") return t * n;
1054
1054
  {
@@ -1058,7 +1058,7 @@ function $({ cachedBounds: e, itemCount: t, itemSize: n }) {
1058
1058
  }
1059
1059
  function ft({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
1060
1060
  if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
1061
- let s = $({
1061
+ let s = dt({
1062
1062
  cachedBounds: t,
1063
1063
  itemCount: r,
1064
1064
  itemSize: i
@@ -1127,7 +1127,7 @@ function mt({ itemCount: e, itemProps: t, itemSize: n }) {
1127
1127
  };
1128
1128
  }
1129
1129
  function ht({ itemCount: e, itemProps: t, itemSize: n }) {
1130
- return P(() => mt({
1130
+ return F(() => mt({
1131
1131
  itemCount: e,
1132
1132
  itemProps: t,
1133
1133
  itemSize: n
@@ -1150,20 +1150,20 @@ function gt({ containerSize: e, itemSize: t }) {
1150
1150
  return n;
1151
1151
  }
1152
1152
  function _t({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
1153
- let { height: u = n, width: d = n } = st({
1153
+ let { height: u = n, width: d = n } = ot({
1154
1154
  defaultHeight: r === "vertical" ? n : void 0,
1155
1155
  defaultWidth: r === "horizontal" ? n : void 0,
1156
1156
  element: e,
1157
1157
  mode: r === "vertical" ? "only-height" : "only-width",
1158
1158
  style: t
1159
- }), f = F({
1159
+ }), f = I({
1160
1160
  height: 0,
1161
1161
  width: 0
1162
1162
  }), p = r === "vertical" ? u : d, m = gt({
1163
1163
  containerSize: p,
1164
1164
  itemSize: s
1165
1165
  });
1166
- _e(() => {
1166
+ ge(() => {
1167
1167
  if (typeof c == "function") {
1168
1168
  let e = f.current;
1169
1169
  (e.height !== u || e.width !== d) && (c({
@@ -1180,7 +1180,7 @@ function _t({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1180
1180
  itemCount: a,
1181
1181
  itemProps: o,
1182
1182
  itemSize: m
1183
- }), g = j((e) => h.get(e), [h]), [_, v] = I(() => pt({
1183
+ }), g = M((e) => h.get(e), [h]), [_, v] = L(() => pt({
1184
1184
  cachedBounds: h,
1185
1185
  containerScrollOffset: 0,
1186
1186
  containerSize: p,
@@ -1191,7 +1191,7 @@ function _t({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1191
1191
  startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
1192
1192
  stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
1193
1193
  stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
1194
- }, C = j(() => $({
1194
+ }, C = M(() => dt({
1195
1195
  cachedBounds: h,
1196
1196
  itemCount: a,
1197
1197
  itemSize: m
@@ -1199,7 +1199,7 @@ function _t({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1199
1199
  h,
1200
1200
  a,
1201
1201
  m
1202
- ]), w = j((t) => pt({
1202
+ ]), w = M((t) => pt({
1203
1203
  cachedBounds: h,
1204
1204
  containerScrollOffset: ut({
1205
1205
  containerElement: e,
@@ -1219,13 +1219,13 @@ function _t({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1219
1219
  a,
1220
1220
  l
1221
1221
  ]);
1222
- return at(() => {
1222
+ return it(() => {
1223
1223
  v(w((r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0));
1224
1224
  }, [
1225
1225
  e,
1226
1226
  r,
1227
1227
  w
1228
- ]), at(() => {
1228
+ ]), it(() => {
1229
1229
  if (!e) return;
1230
1230
  let t = () => {
1231
1231
  v((t) => {
@@ -1241,7 +1241,7 @@ function _t({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1241
1241
  itemCount: a,
1242
1242
  overscanCount: l
1243
1243
  });
1244
- return dt(s, t) ? t : s;
1244
+ return $(s, t) ? t : s;
1245
1245
  });
1246
1246
  };
1247
1247
  return e.addEventListener("scroll", t), () => {
@@ -1257,7 +1257,7 @@ function _t({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1257
1257
  ]), {
1258
1258
  getCellBounds: g,
1259
1259
  getEstimatedSize: C,
1260
- scrollToIndex: ct(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1260
+ scrollToIndex: st(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
1261
1261
  let s = ft({
1262
1262
  align: t,
1263
1263
  cachedBounds: h,
@@ -1275,7 +1275,7 @@ function _t({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1275
1275
  scrollOffset: s
1276
1276
  }), typeof e.scrollTo != "function") {
1277
1277
  let e = w(s);
1278
- dt(_, e) || v(e);
1278
+ $(_, e) || v(e);
1279
1279
  }
1280
1280
  return s;
1281
1281
  }
@@ -1287,29 +1287,29 @@ function _t({ containerElement: e, containerStyle: t, defaultContainerSize: n =
1287
1287
  };
1288
1288
  }
1289
1289
  function vt(e) {
1290
- return P(() => e, Object.values(e));
1290
+ return F(() => e, Object.values(e));
1291
1291
  }
1292
1292
  function yt(e, t) {
1293
1293
  let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
1294
- return dt(n, a) && dt(r, o) && dt(i, s);
1294
+ return $(n, a) && $(r, o) && $(i, s);
1295
1295
  }
1296
1296
  function bt(e) {
1297
1297
  return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
1298
1298
  }
1299
1299
  var xt = "data-react-window-index";
1300
1300
  function St({ 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 }) {
1301
- let m = vt(u), h = P(() => ge(s, yt), [s]), [g, _] = I(null), v = bt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = _t({
1301
+ let m = vt(u), h = F(() => he(s, yt), [s]), [g, _] = L(null), v = bt(l), { getCellBounds: y, getEstimatedSize: b, scrollToIndex: x, startIndexOverscan: S, startIndexVisible: C, stopIndexOverscan: w, stopIndexVisible: T } = _t({
1302
1302
  containerElement: g,
1303
1303
  containerStyle: f,
1304
1304
  defaultContainerSize: n,
1305
1305
  direction: "vertical",
1306
1306
  itemCount: c,
1307
1307
  itemProps: m,
1308
- itemSize: P(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1308
+ itemSize: F(() => v ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [v, l]),
1309
1309
  onResize: i,
1310
1310
  overscanCount: o
1311
1311
  });
1312
- N(r, () => ({
1312
+ P(r, () => ({
1313
1313
  get element() {
1314
1314
  return g;
1315
1315
  },
@@ -1324,7 +1324,7 @@ function St({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1324
1324
  top: r
1325
1325
  });
1326
1326
  }
1327
- }), [g, x]), at(() => {
1327
+ }), [g, x]), it(() => {
1328
1328
  if (!g) return;
1329
1329
  let e = Array.from(g.children).filter((e, t) => {
1330
1330
  if (e.hasAttribute("aria-hidden")) return !1;
@@ -1338,7 +1338,7 @@ function St({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1338
1338
  l,
1339
1339
  S,
1340
1340
  w
1341
- ]), M(() => {
1341
+ ]), N(() => {
1342
1342
  S >= 0 && w >= 0 && a && a({
1343
1343
  startIndex: C,
1344
1344
  stopIndex: T
@@ -1353,11 +1353,11 @@ function St({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1353
1353
  w,
1354
1354
  T
1355
1355
  ]);
1356
- let E = P(() => {
1356
+ let E = F(() => {
1357
1357
  let e = [];
1358
1358
  if (c > 0) for (let t = S; t <= w; t++) {
1359
1359
  let n = y(t);
1360
- e.push(/* @__PURE__ */ he(h, {
1360
+ e.push(/* @__PURE__ */ me(h, {
1361
1361
  ...m,
1362
1362
  ariaAttributes: {
1363
1363
  "aria-posinset": t + 1,
@@ -1384,7 +1384,7 @@ function St({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1384
1384
  m,
1385
1385
  S,
1386
1386
  w
1387
- ]), D = /* @__PURE__ */ R("div", {
1387
+ ]), D = /* @__PURE__ */ z("div", {
1388
1388
  "aria-hidden": !0,
1389
1389
  style: {
1390
1390
  height: b(),
@@ -1392,7 +1392,7 @@ function St({ children: e, className: t, defaultHeight: n = 0, listRef: r, onRes
1392
1392
  zIndex: -1
1393
1393
  }
1394
1394
  });
1395
- return he(d, {
1395
+ return me(d, {
1396
1396
  role: "list",
1397
1397
  ...p,
1398
1398
  className: t,
@@ -1412,41 +1412,41 @@ var Ct = {
1412
1412
  itemIcon: "_itemIcon_3wv6u_15",
1413
1413
  checkIcon: "_checkIcon_3wv6u_19",
1414
1414
  stateLabel: "_stateLabel_3wv6u_23"
1415
- }, wt = 44, Tt = 8, Et = ({ index: e, style: t, ariaAttributes: n, items: i, selectedDeploymentId: a, labelClassName: o, query: c, onSelect: l }) => {
1416
- let u = i[e], d = rt(u.iconUrl, u.type, u.displayName ?? u.id, f.SM), m = u.id === a;
1417
- return /* @__PURE__ */ R("div", {
1415
+ }, wt = 44, Tt = 8, Et = ({ index: e, style: t, ariaAttributes: n, items: r, selectedDeploymentId: i, labelClassName: a, query: s, onSelect: c }) => {
1416
+ let l = r[e], u = nt(l.iconUrl, l.type, l.displayName ?? l.id, d.SM), p = l.id === i;
1417
+ return /* @__PURE__ */ z("div", {
1418
1418
  style: t,
1419
1419
  ...n,
1420
- children: /* @__PURE__ */ R(p, {
1420
+ children: /* @__PURE__ */ z(f, {
1421
1421
  type: "button",
1422
- className: s(Ct.item, "flex h-full w-full items-center gap-3 px-4"),
1423
- iconBefore: /* @__PURE__ */ R("span", {
1422
+ className: o(Ct.item, "flex h-full w-full items-center gap-3 px-4"),
1423
+ iconBefore: /* @__PURE__ */ z("span", {
1424
1424
  className: Ct.itemIcon,
1425
- children: d
1425
+ children: u
1426
1426
  }),
1427
- label: /* @__PURE__ */ z("span", {
1427
+ label: /* @__PURE__ */ B("span", {
1428
1428
  className: "flex flex-1 items-center justify-between gap-2",
1429
- children: [/* @__PURE__ */ R(r, {
1430
- text: u.displayName ?? u.id,
1431
- query: c,
1429
+ children: [/* @__PURE__ */ z(k, {
1430
+ text: l.displayName ?? l.id,
1431
+ query: s,
1432
1432
  maxLines: 1,
1433
- className: s(o, "min-w-0 flex-1 text-start")
1434
- }), m && /* @__PURE__ */ R(re, {
1435
- size: f.SM,
1433
+ className: o(a, "min-w-0 flex-1 text-start")
1434
+ }), p && /* @__PURE__ */ z(re, {
1435
+ size: d.SM,
1436
1436
  className: Ct.checkIcon,
1437
1437
  "aria-hidden": !0
1438
1438
  })]
1439
1439
  }),
1440
- onClick: () => l(u.id)
1440
+ onClick: () => c(l.id)
1441
1441
  })
1442
1442
  });
1443
- }, Dt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: o, onSelect: c, loadingLabel: l, errorLabel: u, emptyLabel: d, style: f, titleClassName: p = "dial-body-semi-text", labelClassName: m = "dial-small-text" }) => {
1444
- let [h, g] = I("");
1445
- M(() => {
1443
+ }, Dt = ({ isOpen: e, title: t, closeLabel: n, searchPlaceholder: r = "Search", onClose: i, deployments: a, selectedDeploymentId: s, onSelect: c, loadingLabel: l, errorLabel: u, emptyLabel: d, style: f, titleClassName: p = "dial-body-semi-text", labelClassName: m = "dial-small-text" }) => {
1444
+ let [h, g] = L("");
1445
+ N(() => {
1446
1446
  e || g("");
1447
1447
  }, [e]);
1448
- let _ = a && a.length > 0, v = l !== void 0, y = !_ && !v ? u ?? d : void 0, b = _ ? nt(a, h) : [];
1449
- return /* @__PURE__ */ z(H, {
1448
+ let _ = a && a.length > 0, v = l !== void 0, y = !_ && !v ? u ?? d : void 0, b = _ ? tt(a, h) : [];
1449
+ return /* @__PURE__ */ B(U, {
1450
1450
  isOpen: e,
1451
1451
  title: t,
1452
1452
  closeLabel: n,
@@ -1454,19 +1454,19 @@ var Ct = {
1454
1454
  style: f,
1455
1455
  titleClassName: p,
1456
1456
  className: "max-h-[80dvh]",
1457
- children: [_ && !v && /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R("div", {
1457
+ children: [_ && !v && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("div", {
1458
1458
  className: "flex-shrink-0 px-4 py-[10px]",
1459
- children: /* @__PURE__ */ R(C, {
1459
+ children: /* @__PURE__ */ z(S, {
1460
1460
  value: h,
1461
1461
  placeholder: r,
1462
- size: k.Standard,
1462
+ size: O.Standard,
1463
1463
  onChange: g
1464
1464
  })
1465
- }), /* @__PURE__ */ R("div", { className: s(Ct.divider, "h-px flex-shrink-0") })] }), v ? /* @__PURE__ */ R(et, { loadingLabel: l }) : y ? /* @__PURE__ */ R("div", {
1465
+ }), /* @__PURE__ */ z("div", { className: o(Ct.divider, "h-px flex-shrink-0") })] }), v ? /* @__PURE__ */ z($e, { loadingLabel: l }) : y ? /* @__PURE__ */ z("div", {
1466
1466
  role: "list",
1467
- className: s(Ct.stateLabel, m, "px-4 py-4"),
1467
+ className: o(Ct.stateLabel, m, "px-4 py-4"),
1468
1468
  children: y
1469
- }) : /* @__PURE__ */ R(St, {
1469
+ }) : /* @__PURE__ */ z(St, {
1470
1470
  role: "list",
1471
1471
  className: "overflow-y-auto",
1472
1472
  style: { height: Math.min(b.length, Tt) * wt },
@@ -1475,7 +1475,7 @@ var Ct = {
1475
1475
  rowHeight: wt,
1476
1476
  rowProps: {
1477
1477
  items: b,
1478
- selectedDeploymentId: o,
1478
+ selectedDeploymentId: s,
1479
1479
  labelClassName: m,
1480
1480
  query: h,
1481
1481
  onSelect: (e) => {
@@ -1484,41 +1484,41 @@ var Ct = {
1484
1484
  }
1485
1485
  })]
1486
1486
  });
1487
- }, Ot = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isInputDisabled: o = !1, isDisabled: c = !1, style: l, modelPickerOverlay: u, isPickerOpen: d, onPickerToggle: p, onPickerOpenChange: m }) => {
1488
- let [_, y] = I(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, menuItems: C, menuHeader: w, onOpenChange: T } = it({
1487
+ }, Ot = ({ deployments: e, selectedDeploymentId: t, onDeploymentChange: n, modelSelectorLabels: r, isStreaming: i, isMobile: a, isInputDisabled: s = !1, isDisabled: c = !1, style: l, modelPickerOverlay: u, isPickerOpen: f, onPickerToggle: p, onPickerOpenChange: g }) => {
1488
+ let [v, y] = L(!1), { selectorIcon: b, selectorAriaLabel: x, selectedLabel: S, menuItems: C, menuHeader: w, onOpenChange: T } = rt({
1489
1489
  deployments: e,
1490
1490
  selectedDeploymentId: t,
1491
1491
  onDeploymentChange: n,
1492
1492
  modelSelectorLabels: r
1493
1493
  });
1494
1494
  if (!e) return null;
1495
- let E = i || c ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, D = /* @__PURE__ */ R(ie, {
1496
- size: f.SM,
1497
- className: X.modelSelectorCaret,
1495
+ let E = i || c ? "pointer-events-none opacity-50 cursor-not-allowed" : void 0, k = /* @__PURE__ */ z(ie, {
1496
+ size: d.SM,
1497
+ className: Z.modelSelectorCaret,
1498
1498
  "aria-hidden": !0
1499
1499
  });
1500
- return a ? /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(O, {
1500
+ return a ? /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(D, {
1501
1501
  tooltip: S,
1502
- children: /* @__PURE__ */ R(v, {
1503
- icon: /* @__PURE__ */ z("div", {
1502
+ children: /* @__PURE__ */ z(_, {
1503
+ icon: /* @__PURE__ */ B("div", {
1504
1504
  className: "flex items-center gap-1",
1505
- children: [b, D]
1505
+ children: [b, k]
1506
1506
  }),
1507
1507
  "aria-label": x,
1508
1508
  onClick: () => {
1509
1509
  c || y(!0);
1510
1510
  },
1511
- className: s(X.modelSelectorButton, E)
1511
+ className: o(Z.modelSelectorButton, E)
1512
1512
  })
1513
- }), u ? /* @__PURE__ */ R(H, {
1514
- isOpen: _,
1513
+ }), u ? /* @__PURE__ */ z(U, {
1514
+ isOpen: v,
1515
1515
  title: r?.ariaLabel ?? "Select model",
1516
1516
  closeLabel: r?.closeLabel ?? "Close",
1517
1517
  onClose: () => y(!1),
1518
1518
  style: l,
1519
1519
  children: u(() => y(!1))
1520
- }) : /* @__PURE__ */ R(Dt, {
1521
- isOpen: _,
1520
+ }) : /* @__PURE__ */ z(Dt, {
1521
+ isOpen: v,
1522
1522
  title: r?.ariaLabel ?? "Select model",
1523
1523
  closeLabel: r?.closeLabel ?? "Close",
1524
1524
  searchPlaceholder: r?.searchPlaceholder ?? "Search",
@@ -1530,33 +1530,33 @@ var Ct = {
1530
1530
  errorLabel: r?.error,
1531
1531
  emptyLabel: r?.empty,
1532
1532
  style: l
1533
- })] }) : u ? /* @__PURE__ */ R(h, {
1533
+ })] }) : u ? /* @__PURE__ */ z(m, {
1534
1534
  placement: "top-end",
1535
1535
  matchReferenceWidth: !1,
1536
- open: d,
1537
- onOpenChange: m,
1536
+ open: f,
1537
+ onOpenChange: g,
1538
1538
  trigger: [],
1539
1539
  outsideClosable: !0,
1540
- renderOverlay: () => u(() => m?.(!1)),
1540
+ renderOverlay: () => u(() => g?.(!1)),
1541
1541
  listClassName: "cp-dropdown-overlay !w-[320px]",
1542
- children: /* @__PURE__ */ R(O, {
1542
+ children: /* @__PURE__ */ z(D, {
1543
1543
  tooltip: S,
1544
- children: /* @__PURE__ */ z("button", {
1544
+ children: /* @__PURE__ */ B("button", {
1545
1545
  type: "button",
1546
1546
  "aria-label": x,
1547
- className: s("flex items-center justify-center gap-1 rounded-md p-2", X.modelSelectorButton, o || i || c ? E : void 0, (o || c) && X.modelSelectorButtonDisabled),
1547
+ className: o("flex items-center justify-center gap-1 rounded-md p-2", Z.modelSelectorButton, s || i || c ? E : void 0, (s || c) && Z.modelSelectorButtonDisabled),
1548
1548
  onClick: () => {
1549
- !o && !i && !c && p?.();
1549
+ !s && !i && !c && p?.();
1550
1550
  },
1551
- children: [b, D]
1551
+ children: [b, k]
1552
1552
  })
1553
1553
  })
1554
- }) : /* @__PURE__ */ R("div", {
1555
- className: s(c && E),
1554
+ }) : /* @__PURE__ */ z("div", {
1555
+ className: o(c && E),
1556
1556
  "aria-disabled": c || void 0,
1557
- children: /* @__PURE__ */ R(O, {
1557
+ children: /* @__PURE__ */ z(D, {
1558
1558
  tooltip: S,
1559
- children: /* @__PURE__ */ R(g, {
1559
+ children: /* @__PURE__ */ z(h, {
1560
1560
  icon: b,
1561
1561
  ariaLabel: x,
1562
1562
  items: C,
@@ -1565,15 +1565,15 @@ var Ct = {
1565
1565
  matchReferenceWidth: !1,
1566
1566
  listClassName: "cp-dropdown-overlay !w-[240px] !max-h-80",
1567
1567
  onOpenChange: c ? void 0 : T,
1568
- size: k.Standard,
1569
- caretIcon: D,
1570
- iconClassName: o || c ? E : void 0,
1571
- buttonClassName: s("bg-transparent", X.modelSelectorButton, (o || c) && E && X.modelSelectorButtonDisabled)
1568
+ size: O.Standard,
1569
+ caretIcon: k,
1570
+ iconClassName: s || c ? E : void 0,
1571
+ buttonClassName: o("bg-transparent", Z.modelSelectorButton, (s || c) && E && Z.modelSelectorButtonDisabled)
1572
1572
  })
1573
1573
  })
1574
1574
  });
1575
- }, kt = 160, At = ({ message: e = "", messageRevision: t, onSend: n, onUploadAttachment: r, onStop: i, isStreaming: a = !1, onChange: u, onAttachmentsChange: d, placeholder: p = "Type a message...", ariaLabel: m, attachLabel: h = "Attach file", fileAccept: g, addMenuTitle: _ = "Add", menuTitle: y = "Menu", menuCloseLabel: b = "Close", removeLabel: x, retryLabel: S, sendLabel: C, stopLabel: w, micLabel: T = "Record voice message", stopRecordingLabel: E, discardRecordingLabel: D, timerAriaLabel: O, colors: k, typography: ee, className: te, pendingDropFiles: A = [], onDropFilesConsumed: ne, pendingAttachments: re = [], onPendingAttachmentsConsumed: ie, pasteTextThreshold: ae = 4e3, deployments: ce, selectedDeploymentId: le, onDeploymentChange: ue, modelSelectorLabels: de, initialAttachments: fe = [], isStacked: pe = !1, hideAddButton: me = !1, hideAttachFile: he = !1, hideActionBar: ge = !1, renderFooterActions: M, isInputDisabled: N = !1, isModelSelectorDisabled: _e = !1, isSendDisabled: ve = !1, isAudioMessageSupported: ye = !1, sendOnEnter: be = Re.Enter, prefixAttachments: B = [], onRemovePrefixAttachment: Se, chatSettings: Ce, autoFocus: we = !1, messageHistory: Ee, onDialFileSystemClick: V, dialFileSystemLabel: H, validateAttachment: De, onAttachmentClick: Ae, modelPickerOverlay: je, maximumAttachmentsAmount: Pe, onAttachmentsLimitExceeded: Fe }) => {
1576
- let Ie = c(), [ze, Be] = I(!1), Ve = Me(Ee), U = P(() => o({
1575
+ }, kt = 160, At = ({ 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: v = "Add", menuTitle: y = "Menu", menuCloseLabel: b = "Close", removeLabel: x, retryLabel: S, sendLabel: C, stopLabel: w, micLabel: T = "Record voice message", stopRecordingLabel: E, discardRecordingLabel: D, timerAriaLabel: O, colors: k, typography: ee, className: A, pendingDropFiles: te = [], onDropFilesConsumed: ne, pendingAttachments: re = [], onPendingAttachmentsConsumed: ie, pasteTextThreshold: ae = 4e3, deployments: j, selectedDeploymentId: ce, onDeploymentChange: le, modelSelectorLabels: ue, initialAttachments: de = [], isStacked: fe = !1, hideAddButton: pe = !1, hideAttachFile: me = !1, hideActionBar: he = !1, renderFooterActions: N, isInputDisabled: P = !1, isModelSelectorDisabled: ge = !1, isSendDisabled: _e = !1, isAudioMessageSupported: ve = !1, sendOnEnter: ye = Le.Enter, prefixAttachments: V = [], onRemovePrefixAttachment: xe, chatSettings: Se, autoFocus: Ce = !1, messageHistory: Te, onDialFileSystemClick: H, dialFileSystemLabel: U, validateAttachment: Ee, onAttachmentClick: ke, modelPickerOverlay: Ae, maximumAttachmentsAmount: Ne, onAttachmentsLimitExceeded: Pe, isAttachmentsEnabled: Fe = !0 }) => {
1576
+ let Re = s(), [ze, Be] = L(!1), Ve = je(Te), W = F(() => a({
1577
1577
  "--ci-bg": k?.background,
1578
1578
  "--ci-text": k?.text,
1579
1579
  "--ci-border": k?.border,
@@ -1585,61 +1585,61 @@ var Ct = {
1585
1585
  "--ci-send-bg": k?.sendBackground,
1586
1586
  "--ci-send-text": k?.sendText,
1587
1587
  "--ci-stop-color": k?.stopColor
1588
- }), [k]), He = P(() => V ? [{
1588
+ }), [k]), He = F(() => H ? [{
1589
1589
  key: "dial-fs",
1590
- label: H ?? "DIAL file system",
1591
- icon: /* @__PURE__ */ R(oe, {
1592
- size: l,
1590
+ label: U ?? "DIAL file system",
1591
+ icon: /* @__PURE__ */ z(oe, {
1592
+ size: c,
1593
1593
  "aria-hidden": !0
1594
1594
  }),
1595
- onClick: V
1596
- }] : [], [V, H]), { message: W, setMessage: G, textareaRef: Ue, isMultiLine: We } = Ne({
1595
+ onClick: H
1596
+ }] : [], [H, U]), { message: G, setMessage: K, textareaRef: Ue, isMultiLine: We } = Me({
1597
1597
  messageProp: e,
1598
1598
  messageRevision: t
1599
- }), { attachments: K, buildAttachments: q, addAttachments: J, resetAttachments: Ke, handleRemove: qe, handleRetry: Y, handleExpand: Je, hasBlockedAttachments: Qe } = Oe({
1600
- initialAttachments: fe,
1599
+ }), { attachments: q, buildAttachments: J, addAttachments: Ke, resetAttachments: Y, handleRemove: X, handleRetry: qe, handleExpand: Ze, hasBlockedAttachments: Qe } = De({
1600
+ initialAttachments: de,
1601
1601
  onUploadAttachment: r,
1602
- onAttachmentsChange: d,
1603
- validateAttachment: De,
1604
- pendingDropFiles: A,
1602
+ onAttachmentsChange: f,
1603
+ validateAttachment: Ee,
1604
+ pendingDropFiles: te,
1605
1605
  onDropFilesConsumed: ne,
1606
1606
  pendingAttachments: re,
1607
1607
  onPendingAttachmentsConsumed: ie,
1608
- onExpandPastedText: j((e) => {
1609
- G((t) => t ? `${t}\n${e}` : e);
1610
- }, [G]),
1611
- maximumAttachmentsAmount: Pe,
1612
- baseAttachmentsAmount: B.length,
1613
- onAttachmentsLimitExceeded: Fe
1614
- }), { state: $e, analyserNodeRef: et, elapsedSeconds: tt, errorMessage: nt, startRecording: rt, stopRecording: it, discardRecording: at } = Le({ onAttachAudio: j((e) => {
1615
- J(q([e]));
1616
- }, [J, q]) }), ot = F(null), st = F(null), { handlePaste: ct } = Te(J, ae), Z = W.trim().length > 0 || K.length > 0, lt = Z && !Qe && !ve, { shouldRender: ut, isExiting: Q, instanceKey: dt } = ke(!a && Z, kt), $ = pe || K.length > 0 || W.includes("\n") || We, ft = ce === void 0 || le != null, pt = async () => {
1617
- if (ve) return;
1618
- let e = W, t = K;
1619
- G(""), Ve.reset();
1608
+ onExpandPastedText: M((e) => {
1609
+ K((t) => t ? `${t}\n${e}` : e);
1610
+ }, [K]),
1611
+ maximumAttachmentsAmount: Ne,
1612
+ baseAttachmentsAmount: V.length,
1613
+ onAttachmentsLimitExceeded: Pe
1614
+ }), { state: $e, analyserNodeRef: et, elapsedSeconds: tt, errorMessage: nt, startRecording: rt, stopRecording: it, discardRecording: at } = Ie({ onAttachAudio: M((e) => {
1615
+ Ke(J([e]));
1616
+ }, [Ke, J]) }), ot = I(null), st = I(null), { handlePaste: ct } = we(Ke, Fe ? ae : Infinity), lt = G.trim().length > 0 || q.length > 0, ut = lt && !Qe && !_e, { shouldRender: Q, isExiting: $, instanceKey: dt } = Oe(!l && lt, kt), ft = fe || q.length > 0 || G.includes("\n") || We, pt = j === void 0 || ce != null, mt = async () => {
1617
+ if (_e) return;
1618
+ let e = G, t = q;
1619
+ K(""), Ve.reset();
1620
1620
  try {
1621
1621
  await n?.(e, t), t.forEach((e) => {
1622
1622
  e.previewUrl && URL.revokeObjectURL(e.previewUrl);
1623
- }), Ke([]);
1623
+ }), Y([]);
1624
1624
  } catch {
1625
- G(e), Ke(t);
1625
+ K(e), Y(t);
1626
1626
  }
1627
- }, mt = (e) => {
1628
- if (!e.nativeEvent.isComposing && !N && !a && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1629
- let t = e.currentTarget.selectionStart ?? 0, n = Ve.navigate(e.key === "ArrowUp" ? "up" : "down", W, t);
1627
+ }, ht = (e) => {
1628
+ if (!e.nativeEvent.isComposing && !P && !l && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
1629
+ let t = e.currentTarget.selectionStart ?? 0, n = Ve.navigate(e.key === "ArrowUp" ? "up" : "down", G, t);
1630
1630
  if (n !== null) {
1631
- e.preventDefault(), G(n);
1631
+ e.preventDefault(), K(n);
1632
1632
  return;
1633
1633
  }
1634
1634
  }
1635
- e.key === "Enter" && (be === Re.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !a && lt && ft && !N && pt());
1636
- }, ht = (e) => {
1635
+ e.key === "Enter" && (ye === Le.MetaEnter ? (e.metaKey || e.ctrlKey) && !e.shiftKey : !e.shiftKey && !e.metaKey && !e.ctrlKey) && (e.preventDefault(), !l && ut && pt && !P && mt());
1636
+ }, gt = (e) => {
1637
1637
  let t = Array.from(e.target.files ?? []);
1638
1638
  if (t.length === 0) return;
1639
- let n = q(t);
1640
- e.target.value = "", J(n);
1639
+ let n = J(t);
1640
+ e.target.value = "", Ke(n);
1641
1641
  };
1642
- if ($e !== "idle") return /* @__PURE__ */ R(Ye, {
1642
+ if ($e !== "idle") return /* @__PURE__ */ z(Je, {
1643
1643
  state: $e,
1644
1644
  analyserNodeRef: et,
1645
1645
  elapsedSeconds: tt,
@@ -1649,49 +1649,49 @@ var Ct = {
1649
1649
  stopLabel: E,
1650
1650
  discardLabel: D,
1651
1651
  timerLabel: O,
1652
- style: U,
1653
- className: te
1652
+ style: W,
1653
+ className: A
1654
1654
  });
1655
- let gt = /* @__PURE__ */ R("textarea", {
1656
- className: s(X.textarea, ee?.fontClassName, "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1655
+ let _t = /* @__PURE__ */ z("textarea", {
1656
+ className: o(Z.textarea, ee?.fontClassName, "max-h-[272px] w-full resize-none overflow-y-auto border-0 bg-transparent outline-none [field-sizing:content]"),
1657
1657
  ref: Ue,
1658
- autoFocus: we,
1659
- value: W,
1658
+ autoFocus: Ce,
1659
+ value: G,
1660
1660
  onChange: (e) => {
1661
- G(e.target.value), Ve.notifyChange(), u?.(e.target.value);
1661
+ K(e.target.value), Ve.notifyChange(), u?.(e.target.value);
1662
1662
  },
1663
- onKeyDown: mt,
1663
+ onKeyDown: ht,
1664
1664
  onPaste: ct,
1665
1665
  placeholder: p,
1666
1666
  "aria-label": m,
1667
- disabled: N,
1667
+ disabled: P,
1668
1668
  rows: 1
1669
1669
  });
1670
- return /* @__PURE__ */ z("div", {
1670
+ return /* @__PURE__ */ B("div", {
1671
1671
  ref: st,
1672
- style: U,
1673
- className: s(X.wrapper, N && X.wrapperDisabled, "flex min-h-[56px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", K.length > 6 ? "py-3 ps-3" : "p-3", te),
1674
- children: [(B.length > 0 || K.length > 0) && /* @__PURE__ */ R(xe, {
1675
- attachments: [...B, ...K],
1672
+ style: W,
1673
+ className: o(Z.wrapper, P && Z.wrapperDisabled, "flex min-h-[56px] w-full max-w-[748px] flex-col justify-center gap-3 rounded-xl border", q.length > 6 ? "py-3 ps-3" : "p-3", A),
1674
+ children: [(V.length > 0 || q.length > 0) && /* @__PURE__ */ z(be, {
1675
+ attachments: [...V, ...q],
1676
1676
  onRemove: (e) => {
1677
- B.some((t) => t.id === e) ? Se?.(e) : qe(e);
1677
+ V.some((t) => t.id === e) ? xe?.(e) : X(e);
1678
1678
  },
1679
- onRetry: Y,
1680
- onExpand: Je,
1679
+ onRetry: qe,
1680
+ onExpand: Ze,
1681
1681
  labels: {
1682
1682
  removeLabel: x,
1683
1683
  retryLabel: S
1684
1684
  },
1685
- onAttachmentClick: Ae == null ? void 0 : (e) => {
1686
- let t = [...B, ...K].find((t) => t.id === e);
1687
- t != null && Ae(t);
1685
+ onAttachmentClick: ke == null ? void 0 : (e) => {
1686
+ let t = [...V, ...q].find((t) => t.id === e);
1687
+ t != null && ke(t);
1688
1688
  }
1689
- }), ge ? $ && gt : /* @__PURE__ */ z("div", {
1690
- className: s("flex items-center gap-2", $ ? "flex-wrap" : "flex-wrap desktop:flex-nowrap"),
1689
+ }), he ? ft && _t : /* @__PURE__ */ B("div", {
1690
+ className: o("flex items-center gap-2", ft ? "flex-wrap" : "flex-wrap desktop:flex-nowrap"),
1691
1691
  children: [
1692
- !me && /* @__PURE__ */ z("div", {
1693
- className: s("order-2 flex", !$ && "desktop:order-1"),
1694
- children: [/* @__PURE__ */ R("input", {
1692
+ !pe && /* @__PURE__ */ B("div", {
1693
+ className: o("order-2 flex", !ft && "desktop:order-1"),
1694
+ children: [/* @__PURE__ */ z("input", {
1695
1695
  ref: ot,
1696
1696
  type: "file",
1697
1697
  multiple: !0,
@@ -1699,114 +1699,114 @@ var Ct = {
1699
1699
  className: "sr-only",
1700
1700
  "aria-hidden": !0,
1701
1701
  tabIndex: -1,
1702
- onChange: ht
1703
- }), /* @__PURE__ */ R(Ge, {
1704
- onAttachClick: he ? void 0 : () => ot.current?.click(),
1702
+ onChange: gt
1703
+ }), /* @__PURE__ */ z(Ge, {
1704
+ onAttachClick: me ? void 0 : () => ot.current?.click(),
1705
1705
  attachLabel: h,
1706
- addMenuTitle: _,
1706
+ addMenuTitle: v,
1707
1707
  menuTitle: y,
1708
1708
  menuCloseLabel: b,
1709
- style: U,
1710
- isDisabled: N,
1711
- chatSettings: Ce,
1709
+ style: W,
1710
+ isDisabled: P,
1711
+ chatSettings: Se,
1712
1712
  extraMenuItems: He
1713
1713
  })]
1714
1714
  }),
1715
- /* @__PURE__ */ R("div", {
1716
- className: s("order-1 flex w-full min-w-0 items-center self-stretch", !$ && "desktop:order-2 desktop:w-auto desktop:flex-1"),
1717
- children: gt
1718
- }),
1719
1715
  /* @__PURE__ */ z("div", {
1720
- className: s("flex flex-shrink-0 items-center gap-2", "order-3 ms-auto", !$ && "desktop:ms-0"),
1721
- children: [M ? M({
1722
- canSend: lt,
1723
- onSend: pt
1724
- }) : /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(Ot, {
1725
- deployments: ce,
1726
- selectedDeploymentId: le,
1727
- onDeploymentChange: ue,
1728
- modelSelectorLabels: de,
1729
- isStreaming: a,
1730
- isMobile: Ie,
1731
- isInputDisabled: N,
1732
- isDisabled: _e,
1733
- style: U,
1734
- modelPickerOverlay: je,
1716
+ className: o("order-1 flex w-full min-w-0 items-center self-stretch", !ft && "desktop:order-2 desktop:w-auto desktop:flex-1"),
1717
+ children: _t
1718
+ }),
1719
+ /* @__PURE__ */ B("div", {
1720
+ className: o("flex flex-shrink-0 items-center gap-2", "order-3 ms-auto", !ft && "desktop:ms-0"),
1721
+ children: [N ? N({
1722
+ canSend: ut,
1723
+ onSend: mt
1724
+ }) : /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(Ot, {
1725
+ deployments: j,
1726
+ selectedDeploymentId: ce,
1727
+ onDeploymentChange: le,
1728
+ modelSelectorLabels: ue,
1729
+ isStreaming: l,
1730
+ isMobile: Re,
1731
+ isInputDisabled: P,
1732
+ isDisabled: ge,
1733
+ style: W,
1734
+ modelPickerOverlay: Ae,
1735
1735
  isPickerOpen: ze,
1736
1736
  onPickerToggle: () => Be((e) => !e),
1737
1737
  onPickerOpenChange: Be
1738
- }), a && i ? /* @__PURE__ */ R(Ze, {
1738
+ }), l && i ? /* @__PURE__ */ z(Xe, {
1739
1739
  onStop: i,
1740
1740
  ariaLabel: w
1741
- }) : !a && ut && /* @__PURE__ */ R(Xe, {
1742
- onSend: pt,
1743
- isDisabled: !ft || Qe || ve,
1741
+ }) : !l && Q && /* @__PURE__ */ z(Ye, {
1742
+ onSend: mt,
1743
+ isDisabled: !pt || Qe || _e,
1744
1744
  ariaLabel: C,
1745
- isExiting: Q
1746
- }, dt)] }), ye && !Q && /* @__PURE__ */ R(v, {
1747
- icon: /* @__PURE__ */ R(se, {
1748
- size: f.LG,
1745
+ isExiting: $
1746
+ }, dt)] }), ve && !$ && /* @__PURE__ */ z(_, {
1747
+ icon: /* @__PURE__ */ z(se, {
1748
+ size: d.LG,
1749
1749
  "aria-hidden": !0
1750
1750
  }),
1751
1751
  "aria-label": T,
1752
1752
  className: "size-8 flex-shrink-0",
1753
1753
  onClick: rt,
1754
- disabled: N || a
1754
+ disabled: P || l
1755
1755
  })]
1756
1756
  })
1757
1757
  ]
1758
1758
  })]
1759
1759
  });
1760
- }, jt = { 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: a, isInputDisabled: c = !1, ...l }) => {
1760
+ }, jt = { 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 }) => {
1761
1761
  let { colors: u, typography: d } = r ?? {};
1762
- return /* @__PURE__ */ z("div", {
1763
- style: o({
1762
+ return /* @__PURE__ */ B("div", {
1763
+ style: a({
1764
1764
  "--ci-root-bg": u?.background,
1765
1765
  "--ci-welcome-color": u?.welcomeText
1766
1766
  }),
1767
- className: s("relative flex w-full flex-col items-center gap-6 px-4 py-5 desktop:p-5", i),
1768
- children: [n && /* @__PURE__ */ R("h1", {
1769
- className: s(jt.welcome, "m-0 text-center", d?.welcomeClassName),
1767
+ className: o("relative flex w-full flex-col items-center gap-6 px-4 py-5 desktop:p-5", i),
1768
+ children: [n && /* @__PURE__ */ z("h1", {
1769
+ className: o(jt.welcome, "m-0 text-center", d?.welcomeClassName),
1770
1770
  children: n
1771
- }), /* @__PURE__ */ R("div", {
1771
+ }), /* @__PURE__ */ z("div", {
1772
1772
  className: "relative w-full max-w-[748px]",
1773
- children: /* @__PURE__ */ R(At, {
1773
+ children: /* @__PURE__ */ z(At, {
1774
1774
  placeholder: t,
1775
1775
  isStreaming: e,
1776
1776
  isInputDisabled: c,
1777
1777
  ...l,
1778
- className: a,
1778
+ className: s,
1779
1779
  colors: u?.input,
1780
1780
  typography: d?.input
1781
1781
  })
1782
1782
  })]
1783
1783
  });
1784
- }, Nt = ({ message: e, initialAttachments: t = [], onCancel: n, onSave: r, onUploadAttachment: a, cancelLabel: o = "Cancel", saveLabel: c = "Save & Submit", ariaLabel: u, removeLabel: d, retryLabel: f, addMenuTitle: p = "Add", attachLabel: m = "Attach file", menuTitle: h = "Menu", menuCloseLabel: g = "Close", className: _, pendingDropFiles: v, onDropFilesConsumed: y, validateAttachment: b, hideAttachFile: x = !1, fileAccept: S, maximumAttachmentsAmount: C, onAttachmentsLimitExceeded: w, onDialFileSystemClick: T, dialFileSystemLabel: E, pendingAttachments: D, onPendingAttachmentsConsumed: O, onAttachmentClick: k }) => {
1785
- let ee = F(null), [te, A] = I([]);
1786
- M(() => {
1787
- v?.length && (A(v), y?.());
1784
+ }, 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: v, onDropFilesConsumed: y, validateAttachment: b, isAttachmentsEnabled: x, hideAttachFile: S = !1, fileAccept: C, maximumAttachmentsAmount: w, onAttachmentsLimitExceeded: T, onDialFileSystemClick: E, dialFileSystemLabel: D, pendingAttachments: O, onPendingAttachmentsConsumed: k, onAttachmentClick: ee }) => {
1785
+ let A = I(null), [te, ne] = L([]);
1786
+ N(() => {
1787
+ v?.length && (ne(v), y?.());
1788
1788
  }, [v, y]);
1789
- let [ne, re] = I(e ?? ""), [ie, ae] = I([]), [se, ce] = I(t), le = ie.some((e) => e.status === i.Loading || e.status === i.Error), ue = (ne.trim().length > 0 || ie.length > 0 || se.length > 0) && !le, de = (e) => {
1789
+ let [re, ie] = L(e ?? ""), [ae, se] = L([]), [j, ce] = L(t), le = ae.some((e) => e.status === r.Loading || e.status === r.Error), ue = (re.trim().length > 0 || ae.length > 0 || j.length > 0) && !le, de = (e) => {
1790
1790
  ce((t) => t.filter((t) => t.id !== e));
1791
- }, fe = j((e, t) => {
1792
- r(e, se, t);
1793
- }, [se, r]), pe = () => {
1794
- ue && fe(ne, ie);
1795
- }, me = j(() => A([]), []), he = j((e) => {
1791
+ }, fe = M((e, t) => {
1792
+ i(e, j, t);
1793
+ }, [j, i]), pe = () => {
1794
+ ue && fe(re, ae);
1795
+ }, me = M(() => ne([]), []), he = M((e) => {
1796
1796
  let t = Array.from(e.target.files ?? []);
1797
- t.length !== 0 && (e.target.value = "", A(t));
1798
- }, []), ge = P(() => T ? [{
1797
+ t.length !== 0 && (e.target.value = "", ne(t));
1798
+ }, []), P = F(() => E ? [{
1799
1799
  key: "dial-fs",
1800
- label: E ?? "DIAL file system",
1801
- icon: /* @__PURE__ */ R(oe, {
1802
- size: l,
1800
+ label: D ?? "DIAL file system",
1801
+ icon: /* @__PURE__ */ z(oe, {
1802
+ size: c,
1803
1803
  "aria-hidden": !0
1804
1804
  }),
1805
- onClick: T
1806
- }] : [], [T, E]);
1807
- return /* @__PURE__ */ z("div", {
1808
- className: s("flex w-full flex-col gap-2", _),
1809
- children: [/* @__PURE__ */ R(At, {
1805
+ onClick: E
1806
+ }] : [], [E, D]);
1807
+ return /* @__PURE__ */ B("div", {
1808
+ className: o("flex w-full flex-col gap-2", _),
1809
+ children: [/* @__PURE__ */ z(At, {
1810
1810
  message: e,
1811
1811
  ariaLabel: u,
1812
1812
  isStacked: !0,
@@ -1815,47 +1815,48 @@ var Ct = {
1815
1815
  onDropFilesConsumed: me,
1816
1816
  onSend: fe,
1817
1817
  onUploadAttachment: a,
1818
- onChange: re,
1819
- onAttachmentsChange: ae,
1818
+ onChange: ie,
1819
+ onAttachmentsChange: se,
1820
1820
  removeLabel: d,
1821
1821
  retryLabel: f,
1822
1822
  className: "max-w-full",
1823
- prefixAttachments: se,
1823
+ prefixAttachments: j,
1824
1824
  onRemovePrefixAttachment: de,
1825
1825
  validateAttachment: b,
1826
- maximumAttachmentsAmount: C,
1827
- onAttachmentsLimitExceeded: w,
1828
- pendingAttachments: D,
1829
- onPendingAttachmentsConsumed: O,
1830
- onAttachmentClick: k
1831
- }), /* @__PURE__ */ z("div", {
1826
+ isAttachmentsEnabled: x,
1827
+ maximumAttachmentsAmount: w,
1828
+ onAttachmentsLimitExceeded: T,
1829
+ pendingAttachments: O,
1830
+ onPendingAttachmentsConsumed: k,
1831
+ onAttachmentClick: ee
1832
+ }), /* @__PURE__ */ B("div", {
1832
1833
  className: "flex items-center justify-between",
1833
- children: [/* @__PURE__ */ R("div", {
1834
+ children: [/* @__PURE__ */ z("div", {
1834
1835
  className: "flex",
1835
- children: !x && /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R("input", {
1836
- ref: ee,
1836
+ children: !S && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z("input", {
1837
+ ref: A,
1837
1838
  type: "file",
1838
1839
  multiple: !0,
1839
- accept: S,
1840
+ accept: C,
1840
1841
  className: "sr-only",
1841
1842
  "aria-hidden": !0,
1842
1843
  tabIndex: -1,
1843
1844
  onChange: he
1844
- }), /* @__PURE__ */ R(Ge, {
1845
- onAttachClick: () => ee.current?.click(),
1845
+ }), /* @__PURE__ */ z(Ge, {
1846
+ onAttachClick: () => A.current?.click(),
1846
1847
  attachLabel: m,
1847
1848
  addMenuTitle: p,
1848
1849
  menuTitle: h,
1849
1850
  menuCloseLabel: g,
1850
- extraMenuItems: ge
1851
+ extraMenuItems: P
1851
1852
  })] })
1852
- }), /* @__PURE__ */ z("div", {
1853
+ }), /* @__PURE__ */ B("div", {
1853
1854
  className: "flex gap-2",
1854
- children: [/* @__PURE__ */ R(W, {
1855
- label: o,
1855
+ children: [/* @__PURE__ */ z(He, {
1856
+ label: s,
1856
1857
  onClick: n
1857
- }), /* @__PURE__ */ R(He, {
1858
- label: c,
1858
+ }), /* @__PURE__ */ z(W, {
1859
+ label: l,
1859
1860
  onClick: pe,
1860
1861
  disabled: !ue
1861
1862
  })]
@@ -1864,4 +1865,4 @@ var Ct = {
1864
1865
  });
1865
1866
  };
1866
1867
  //#endregion
1867
- export { ve as AttachmentCard, ye as AttachmentGroup, be as AttachmentTray, H as BottomSheetShell, q as ChatSettingsModal, Mt as ConversationInput, Nt as EditMessageInput, B as FileDndOverlay, At as Input, Re as SendOnEnter, we as getAttachmentIcon };
1868
+ export { _e as AttachmentCard, ve as AttachmentGroup, ye as AttachmentTray, U as BottomSheetShell, q as ChatSettingsModal, Mt as ConversationInput, Nt as EditMessageInput, V as FileDndOverlay, At as Input, Le as SendOnEnter, Ce as getAttachmentIcon };