@epam/ai-dial-conversation-stages 1.3.0-dev.28 → 1.3.0-dev.282

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,24 +1,24 @@
1
1
  import { AttachmentErrorReason as e, AttachmentType as t, MIME_TYPE_EXT_MAP as n, MarkdownCodeBlock as r, MarkdownRenderer as i, RequestStatus as a, StageStatus as o, buildCssVars as s, mergeClasses as c, messageAttachmentsToDisplayAttachments as l, normalizeMimeType as u } from "@epam/ai-dial-chat-shared";
2
- import { Accordion as d, DIAL_ICON_SIZE as f, DIAL_KIT_ICON_STROKE as p, ElementSize as m, EllipsisTooltip as h, Highlight as g, Skeleton as _, SkeletonVariant as v, Spinner as y, StaticIconButton as b } from "@epam/ai-dial-ui-kit";
3
- import { IconAlertCircle as x, IconCheck as S, IconClipboard as C, IconDownload as w, IconExternalLink as T, IconFile as E, IconFileTypeBmp as D, IconFileTypeCss as O, IconFileTypeCsv as k, IconFileTypeDoc as A, IconFileTypeDocx as j, IconFileTypeHtml as M, IconFileTypeJpg as N, IconFileTypeJs as P, IconFileTypeJsx as F, IconFileTypePdf as I, IconFileTypePhp as L, IconFileTypePng as R, IconFileTypePpt as z, IconFileTypeRs as ee, IconFileTypeSql as te, IconFileTypeSvg as ne, IconFileTypeTs as re, IconFileTypeTsx as B, IconFileTypeTxt as ie, IconFileTypeVue as ae, IconFileTypeXls as oe, IconFileTypeXml as se, IconFileTypeZip as ce, IconMusic as le, IconPhoto as V, IconReload as ue, IconTerminal2 as de, IconVideo as fe, IconX as pe } from "@tabler/icons-react";
4
- import { memo as me, useCallback as H, useEffect as U, useId as he, useMemo as W, useRef as ge, useState as G } from "react";
5
- import { Fragment as _e, jsx as K, jsxs as q } from "react/jsx-runtime";
2
+ import { Accordion as d, DIAL_ICON_SIZE as f, DIAL_KIT_ICON_STROKE as p, DialItemType as m, ElementSize as h, EllipsisTooltip as g, FileIcon as _, Highlight as v, LiveRegion as y, LiveRegionElement as b, Skeleton as x, SkeletonVariant as S, Spinner as C, StaticIconButton as w } from "@epam/ai-dial-ui-kit";
3
+ import { IconAlertCircle as T, IconCheck as E, IconClipboard as D, IconDownload as O, IconExternalLink as k, IconFile as A, IconFileTypeBmp as j, IconFileTypeCss as M, IconFileTypeCsv as N, IconFileTypeDoc as P, IconFileTypeDocx as F, IconFileTypeHtml as I, IconFileTypeJpg as L, IconFileTypeJs as R, IconFileTypeJsx as z, IconFileTypePdf as B, IconFileTypePhp as V, IconFileTypePng as H, IconFileTypePpt as U, IconFileTypeRs as ee, IconFileTypeSql as te, IconFileTypeSvg as ne, IconFileTypeTs as re, IconFileTypeTsx as ie, IconFileTypeTxt as W, IconFileTypeVue as G, IconFileTypeXls as ae, IconFileTypeXml as oe, IconFileTypeZip as se, IconMusic as ce, IconPhoto as le, IconReload as ue, IconTerminal2 as de, IconVideo as fe, IconX as pe } from "@tabler/icons-react";
4
+ import { memo as me, useCallback as K, useEffect as he, useId as ge, useMemo as q, useRef as _e, useState as ve } from "react";
5
+ import { Fragment as ye, jsx as J, jsxs as Y } from "react/jsx-runtime";
6
6
  //#region src/constants/public-class-names.ts
7
- var J = {
7
+ var be = {
8
8
  panel: "dial-conversation-stages-panel",
9
9
  group: "dial-conversation-stages-group",
10
10
  groupToggle: "dial-conversation-stages-group-toggle"
11
- }, ve = () => {
12
- let [e, t] = G(() => /* @__PURE__ */ new Set()), n = H((e, n) => {
11
+ }, xe = () => {
12
+ let [e, t] = ve(() => /* @__PURE__ */ new Set()), n = K((e, n) => {
13
13
  t((t) => {
14
14
  if (t.has(e) === n) return t;
15
15
  let r = new Set(t);
16
16
  return n ? r.add(e) : r.delete(e), r;
17
17
  });
18
- }, []), r = H(() => {
18
+ }, []), r = K(() => {
19
19
  t((e) => e.size ? /* @__PURE__ */ new Set() : e);
20
20
  }, []);
21
- return W(() => ({
21
+ return q(() => ({
22
22
  isExpanded: (t) => e.has(t),
23
23
  onToggle: n,
24
24
  reset: r
@@ -27,30 +27,30 @@ var J = {
27
27
  n,
28
28
  r
29
29
  ]);
30
- }, ye = /[([][^()[\]]*[)\]]/g, be = /(\d+(?:\.\d+)?)\s*s\b/, xe = (e) => {
30
+ }, Se = /[([][^()[\]]*[)\]]/g, Ce = /(\d+(?:\.\d+)?)\s*s\b/, we = (e) => {
31
31
  let t = e.trimEnd();
32
32
  return t.endsWith(":") ? t.slice(0, -1) : t;
33
- }, Se = (e) => {
34
- ye.lastIndex = 0;
33
+ }, Te = (e) => {
34
+ Se.lastIndex = 0;
35
35
  let t;
36
- for (; t = ye.exec(e);) {
37
- let e = t[0].slice(1, -1), n = be.exec(e);
36
+ for (; t = Se.exec(e);) {
37
+ let e = t[0].slice(1, -1), n = Ce.exec(e);
38
38
  if (n) return {
39
39
  durationLabel: `${n[1]}s`,
40
40
  groupIndex: t.index,
41
41
  groupLength: t[0].length
42
42
  };
43
43
  }
44
- }, Y = (e) => {
45
- let t = e ?? "", n = Se(t);
44
+ }, Ee = (e) => {
45
+ let t = e ?? "", n = Te(t);
46
46
  return {
47
- name: xe(n ? t.slice(0, n.groupIndex) + t.slice(n.groupIndex + n.groupLength) : t).trim().replace(/ {2,}/g, " "),
47
+ name: we(n ? t.slice(0, n.groupIndex) + t.slice(n.groupIndex + n.groupLength) : t).trim().replace(/ {2,}/g, " "),
48
48
  durationLabel: n?.durationLabel
49
49
  };
50
- }, Ce = (e) => e.length > 0 && !/\s/.test(e) && e.includes("_"), we = (e) => [...e].reverse().find((e) => e.status == null), Te = (e, t) => {
50
+ }, De = (e) => e.length > 0 && !/\s/.test(e) && e.includes("_"), Oe = (e) => [...e].reverse().find((e) => e.status == null), ke = (e, t) => {
51
51
  let n = e.parent_stage_index;
52
52
  if (!(n == null || !Number.isInteger(n) || n < 0 || n >= e.index)) return t.get(n);
53
- }, Ee = (e) => {
53
+ }, Ae = (e) => {
54
54
  let t = e.map((e) => ({
55
55
  stage: e,
56
56
  children: []
@@ -58,15 +58,15 @@ var J = {
58
58
  for (let e of t) n.has(e.stage.index) || n.set(e.stage.index, e);
59
59
  let r = [];
60
60
  for (let e of t) {
61
- let t = Te(e.stage, n);
61
+ let t = ke(e.stage, n);
62
62
  t ? t.children.push(e) : r.push(e);
63
63
  }
64
64
  return r;
65
- }, De = (e) => `stage:${e}`, Oe = (e) => `group:${e}`, ke = "min-w-0 overflow-visible py-0", Ae = "min-w-0 justify-start gap-2 rounded-lg px-2 py-1.5 text-start mobile:min-h-11", je = (e) => {
65
+ }, je = (e) => `stage:${e}`, Me = (e) => `group:${e}`, Ne = "min-w-0 overflow-visible py-0", Pe = "min-w-0 justify-start gap-2 rounded-lg px-2 py-1.5 text-start mobile:min-h-11", Fe = (e) => {
66
66
  let t = [], n = 0;
67
67
  for (; n < e.length;) {
68
- let r = e[n], i = Y(r.stage.name).name, a = n + 1;
69
- for (; a < e.length && Y(e[a].stage.name).name === i;) a += 1;
68
+ let r = e[n], i = Ee(r.stage.name).name, a = n + 1;
69
+ for (; a < e.length && Ee(e[a].stage.name).name === i;) a += 1;
70
70
  let o = e.slice(n, a);
71
71
  o.length > 1 ? t.push({
72
72
  key: r.stage.index,
@@ -79,117 +79,120 @@ var J = {
79
79
  }
80
80
  return t;
81
81
  }, X = {
82
- panel: "_panel_w65is_2",
83
- row: "_row_w65is_6",
84
- collapseButton: "_collapseButton_w65is_10",
85
- stageHeader: "_stageHeader_w65is_19",
86
- stageRegion: "_stageRegion_w65is_28",
87
- stageName: "_stageName_w65is_32",
88
- stageNameFailed: "_stageNameFailed_w65is_36",
89
- monoName: "_monoName_w65is_40",
90
- tag: "_tag_w65is_44",
91
- count: "_count_w65is_48",
92
- duration: "_duration_w65is_53",
93
- iconSecondary: "_iconSecondary_w65is_58",
94
- iconCompleted: "_iconCompleted_w65is_63",
95
- iconError: "_iconError_w65is_67",
96
- stageContent: "_stageContent_w65is_71",
97
- codeBlock: "_codeBlock_w65is_75",
98
- codeInline: "_codeInline_w65is_84",
99
- blockquote: "_blockquote_w65is_91",
100
- tableCell: "_tableCell_w65is_96"
101
- }, Me = ({ status: e, isLive: t, runningLabel: n = "Running", failedLabel: r = "Failed" }) => e === o.Failed ? /* @__PURE__ */ q(_e, { children: [/* @__PURE__ */ K(x, {
82
+ panel: "_panel_msss2_1",
83
+ row: "_row_msss2_5",
84
+ collapseButton: "_collapseButton_msss2_9",
85
+ stageHeader: "_stageHeader_msss2_18",
86
+ stageRegion: "_stageRegion_msss2_27",
87
+ stageName: "_stageName_msss2_31",
88
+ stageNameFailed: "_stageNameFailed_msss2_35",
89
+ tag: "_tag_msss2_39",
90
+ count: "_count_msss2_43",
91
+ duration: "_duration_msss2_48",
92
+ iconSecondary: "_iconSecondary_msss2_53",
93
+ iconCompleted: "_iconCompleted_msss2_58",
94
+ iconError: "_iconError_msss2_62",
95
+ stageContent: "_stageContent_msss2_66",
96
+ codeBlock: "_codeBlock_msss2_70",
97
+ codeInline: "_codeInline_msss2_76",
98
+ blockquote: "_blockquote_msss2_82",
99
+ tableCell: "_tableCell_msss2_87"
100
+ }, Ie = ({ status: e, isLive: t, runningLabel: n = "Running", failedLabel: r = "Failed" }) => e === o.Failed ? /* @__PURE__ */ Y(ye, { children: [/* @__PURE__ */ J(T, {
102
101
  size: f.MD,
103
102
  className: X.iconError,
104
103
  "aria-hidden": !0,
105
104
  stroke: p
106
- }), /* @__PURE__ */ K("span", {
105
+ }), /* @__PURE__ */ J("span", {
107
106
  className: "sr-only",
108
107
  children: r
109
- })] }) : e === o.Completed ? /* @__PURE__ */ K(S, {
108
+ })] }) : e === o.Completed ? /* @__PURE__ */ J(E, {
110
109
  size: f.SM,
111
110
  className: X.iconCompleted,
112
111
  "aria-hidden": !0,
113
112
  stroke: p
114
- }) : t ? /* @__PURE__ */ K(y, {
113
+ }) : t ? /* @__PURE__ */ J(C, {
115
114
  size: 16,
116
115
  ariaLabel: n
117
- }) : null, Ne = (e) => {
116
+ }) : null, Le = (e) => {
118
117
  if (e == null) return "";
119
118
  let t = e.lastIndexOf(".");
120
119
  return t > 0 ? e.slice(0, t) : e;
121
- }, Pe = (e) => {
122
- if (!e) return E;
120
+ }, Re = (e) => {
121
+ if (!e) return A;
123
122
  let t = u(e);
124
123
  if (t.startsWith("image/")) switch (t) {
125
- case "image/jpeg": return N;
126
- case "image/png": return R;
124
+ case "image/jpeg": return L;
125
+ case "image/png": return H;
127
126
  case "image/svg+xml": return ne;
128
- case "image/bmp": return D;
129
- default: return V;
127
+ case "image/bmp": return j;
128
+ default: return le;
130
129
  }
131
130
  if (t.startsWith("video/")) return fe;
132
- if (t.startsWith("audio/")) return le;
131
+ if (t.startsWith("audio/")) return ce;
133
132
  switch (t) {
134
- case "application/pdf": return I;
135
- case "application/msword": return A;
136
- case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return j;
137
- case "application/vnd.ms-powerpoint": return z;
138
- case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return z;
139
- case "application/vnd.ms-excel": return oe;
140
- case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return oe;
133
+ case "application/pdf": return B;
134
+ case "application/msword": return P;
135
+ case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return F;
136
+ case "application/vnd.ms-powerpoint": return U;
137
+ case "application/vnd.openxmlformats-officedocument.presentationml.presentation": return U;
138
+ case "application/vnd.ms-excel": return ae;
139
+ case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": return ae;
141
140
  case "application/zip":
142
141
  case "application/vnd.rar":
143
142
  case "application/x-7z-compressed":
144
143
  case "application/gzip":
145
- case "application/x-tar": return ce;
146
- case "text/csv": return k;
147
- case "text/plain": return ie;
144
+ case "application/x-tar": return se;
145
+ case "text/csv": return N;
146
+ case "text/plain": return W;
148
147
  case "text/html":
149
- case "application/xhtml+xml": return M;
150
- case "application/xml": return se;
148
+ case "application/xhtml+xml": return I;
149
+ case "application/xml": return oe;
151
150
  case "application/sql": return te;
152
- case "text/javascript": return P;
153
- case "text/jsx": return F;
151
+ case "text/javascript": return R;
152
+ case "text/jsx": return z;
154
153
  case "text/typescript": return re;
155
- case "text/tsx": return B;
156
- case "text/css": return O;
157
- case "text/x-php": return L;
154
+ case "text/tsx": return ie;
155
+ case "text/css": return M;
156
+ case "text/x-php": return V;
158
157
  case "text/x-rustsrc": return ee;
159
- case "text/x-vue": return ae;
160
- default: return E;
158
+ case "text/x-vue": return G;
159
+ default: return A;
161
160
  }
162
- }, Fe = (e) => {
161
+ }, ze = (e) => {
163
162
  let { type: n, contentType: r } = e;
164
- return n === t.Prompt ? de : n === t.Pasted ? C : n === t.Image ? V : Pe(r ?? "");
165
- }, Ie = (e) => {
163
+ return n === t.Prompt ? de : n === t.Pasted ? D : n === t.Image ? le : Re(r ?? "");
164
+ }, Be = (e) => {
166
165
  let t = u(e), r = n[t];
167
166
  if (r) return r;
168
167
  let i = t.split("/")[1];
169
168
  if (i && !i.startsWith("vnd.") && !i.includes("+")) return i;
170
- }, Le = (e, n) => {
171
- let { type: r, name: i, contentType: a } = e;
169
+ }, Ve = (e) => {
170
+ let { name: t, contentType: n } = e;
171
+ if (n) {
172
+ let e = Be(n);
173
+ if (e) return e;
174
+ }
175
+ if (t == null) return;
176
+ let r = t.lastIndexOf(".");
177
+ if (r > 0 && r < t.length - 1) return t.slice(r + 1).toLowerCase();
178
+ }, He = (e) => e.type !== t.Prompt && e.type !== t.Pasted, Ue = (e, n) => {
179
+ let { type: r, name: i } = e;
172
180
  if (r === t.Prompt) return n.promptLabel ?? "Prompt";
173
181
  if (r === t.Pasted) return n.pastedLabel ?? "Pasted";
174
182
  if (r === t.Image) return n.imageLabel ?? "Image";
175
- if (a) {
176
- let e = Ie(a);
177
- if (e) return `.${e}`;
178
- }
179
- if (i == null) return "";
180
- let o = i.lastIndexOf(".");
181
- return o > 0 && o < i.length - 1 ? `.${i.slice(o + 1).toLowerCase()}` : i;
182
- }, Re = (e, n = {}) => {
183
+ let a = Ve(e);
184
+ return a ? `.${a}` : i ?? "";
185
+ }, We = (e, n = {}) => {
183
186
  let { type: r, status: i, previewUrl: o, url: s } = e, c = i === a.Loading, l = i === a.Error, u = r === t.Image && !!(o ?? s) && !l, d = r === t.Link && !l;
184
187
  return {
185
188
  isLoading: c,
186
189
  isError: l,
187
190
  isImage: u,
188
191
  isLink: d,
189
- BottomIcon: d ? null : Fe(e),
190
- typeLabel: d ? null : Le(e, n)
192
+ BottomIcon: d ? null : ze(e),
193
+ typeLabel: d ? null : Ue(e, n)
191
194
  };
192
- }, ze = "flex size-[84px] items-center justify-center rounded-xl border", Z = {
195
+ }, Ge = "flex size-[100px] items-center justify-center rounded-xl border", Ke = "outline-offset-1 focus-visible:outline-1", Z = {
193
196
  tray: "dial-ai-attachment-tray",
194
197
  trayItem: "dial-ai-attachment-tray-item",
195
198
  tile: "dial-ai-attachment-tile",
@@ -198,156 +201,166 @@ var J = {
198
201
  tileType: "dial-ai-attachment-tile-type",
199
202
  tileAction: "dial-ai-attachment-tile-action"
200
203
  }, Q = {
201
- tile: "_tile_1tdbq_12",
202
- hovered: "_hovered_1tdbq_18",
203
- selected: "_selected_1tdbq_28",
204
- tileError: "_tileError_1tdbq_33",
205
- nameText: "_nameText_1tdbq_38",
206
- typeText: "_typeText_1tdbq_42",
207
- retryIcon: "_retryIcon_1tdbq_46",
208
- track: "_track_1tdbq_50",
209
- actionButton: "_actionButton_1tdbq_56",
210
- imageActionButton: "_imageActionButton_1tdbq_60"
211
- }, Be = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o }) => /* @__PURE__ */ K(b, {
204
+ tile: "_tile_hb2mo_12",
205
+ hovered: "_hovered_hb2mo_18",
206
+ selected: "_selected_hb2mo_28",
207
+ tileError: "_tileError_hb2mo_33",
208
+ nameText: "_nameText_hb2mo_38",
209
+ typeText: "_typeText_hb2mo_42",
210
+ placeholderIcon: "_placeholderIcon_hb2mo_46",
211
+ retryIcon: "_retryIcon_hb2mo_50",
212
+ track: "_track_hb2mo_54",
213
+ actionButton: "_actionButton_hb2mo_65",
214
+ loading: "_loading_hb2mo_86",
215
+ imageActionButton: "_imageActionButton_hb2mo_87",
216
+ tileAction: "_tileAction_hb2mo_99",
217
+ proxyFocus: "_proxyFocus_hb2mo_108"
218
+ }, qe = ({ ariaLabel: e, errorTitle: t, errorDescId: n, onClick: r, id: i, icon: a, className: o, isAlwaysVisible: s }) => /* @__PURE__ */ J(w, {
212
219
  icon: a,
213
- size: m.Small,
214
- className: c("opacity-0 focus-visible:opacity-100 group-focus-within/attachment-tile:opacity-100 group-hover/attachment-tile:opacity-100", Q.actionButton, o, Z.tileAction),
220
+ size: h.Small,
221
+ className: c(s ? "opacity-100" : "opacity-0 group-hover/attachment-tile:opacity-100 group-focus-visible/attachment-tile:opacity-100 group-has-focus-visible/attachment-tile:opacity-100", Q.actionButton, o, Z.tileAction),
215
222
  "aria-label": e,
216
223
  "aria-describedby": t ? n : void 0,
217
224
  onClick: (e) => {
218
225
  e.stopPropagation(), r(i);
219
226
  }
220
- }), Ve = ({ ...e }) => /* @__PURE__ */ K(Be, {
221
- icon: /* @__PURE__ */ K(ue, {
227
+ }), Je = ({ ...e }) => /* @__PURE__ */ J(qe, {
228
+ icon: /* @__PURE__ */ J(ue, {
222
229
  size: f.SM,
223
230
  "aria-hidden": !0,
224
231
  stroke: p
225
232
  }),
226
233
  className: Q.retryIcon,
227
234
  ...e
228
- }), He = ({ ...e }) => /* @__PURE__ */ K(Be, {
229
- icon: /* @__PURE__ */ K(w, {
235
+ }), Ye = ({ ...e }) => /* @__PURE__ */ J(qe, {
236
+ icon: /* @__PURE__ */ J(O, {
230
237
  size: f.SM,
231
238
  "aria-hidden": !0,
232
239
  stroke: p
233
240
  }),
234
241
  ...e
235
- }), Ue = ({ ...e }) => /* @__PURE__ */ K(Be, {
236
- icon: /* @__PURE__ */ K(T, {
242
+ }), Xe = ({ ...e }) => /* @__PURE__ */ J(qe, {
243
+ icon: /* @__PURE__ */ J(k, {
237
244
  size: f.SM,
238
245
  "aria-hidden": !0,
239
246
  stroke: p
240
247
  }),
241
248
  ...e
242
- }), We = ({ ...e }) => /* @__PURE__ */ K(Be, {
243
- icon: /* @__PURE__ */ K(pe, {
249
+ }), Ze = ({ className: e, ...t }) => /* @__PURE__ */ J(qe, {
250
+ icon: /* @__PURE__ */ J(pe, {
244
251
  size: f.SM,
245
252
  "aria-hidden": !0,
246
253
  stroke: p
247
254
  }),
248
- ...e
249
- }), Ge = {
255
+ className: c("mobile:opacity-100", e),
256
+ ...t
257
+ }), Qe = {
250
258
  [e.Network]: "Upload failed · network error",
251
259
  [e.UnsupportedType]: "Upload failed · unsupported file type",
252
260
  [e.FileTooLarge]: "Upload failed · file too large"
253
- }, Ke = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: o, styles: s, onDownload: l, isLink: u, cssVars: d, onExpand: f, isExpandable: p, onRemove: m, isSelected: h }) => {
254
- let { clickLabel: _ = "Download attachment", expandLabel: v = "Expand pasted text", downloadLabel: b = "Download attachment", retryLabel: x = "Retry upload", removeLabel: S = "Remove attachment", openInNewTabLabel: C = "Open in new tab", sizeLabel: w, uploadingLabel: T = "Uploading", errorReasonLabels: E, genericErrorLabel: D = "Upload failed" } = o ?? {}, { typography: O, className: k } = s ?? {}, { id: A, name: j, status: M, errorReason: N } = t, P = M === a.Loading, F = M === a.Error, I = he(), L = F ? N && (E?.[N] ?? Ge[N]) || D : "", { BottomIcon: R, typeLabel: z } = Re(t), ee = !F && !P && l && !u, te = F && !!i && N !== e.UnsupportedType && N !== e.FileTooLarge, ne = Number(!!ee) + Number(!!te) + Number(!!u) + Number(!!m), re = ne > 1 ? "pe-11" : ne === 1 ? "pe-5" : void 0, B = !!p && f !== void 0, ie = B || r !== void 0, ae = () => {
255
- B ? f(A) : r?.(A);
256
- }, oe = (e) => {
257
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), ae());
258
- }, se = W(() => Ne(j), [j]), ce = H(() => {
261
+ }, $e = ({ attachment: t, searchQuery: n = "", onClick: r, onRetry: i, labels: o, styles: s, onDownload: l, isLink: u, cssVars: d, onExpand: h, isExpandable: g, onRemove: x, isSelected: S }) => {
262
+ let { clickLabel: w = "Download attachment", expandLabel: T = "Expand pasted text", downloadLabel: E = "Download attachment", retryLabel: D = "Retry upload", removeLabel: O = "Remove attachment", openInNewTabLabel: k = "Open in new tab", sizeLabel: A, uploadingLabel: j = "Uploading", errorReasonLabels: M, genericErrorLabel: N = "Upload failed" } = o ?? {}, { typography: P, className: F } = s ?? {}, { id: I, name: L, status: R, errorReason: z } = t, B = R === a.Loading, V = R === a.Error, H = ge(), U = V ? z && (M?.[z] ?? Qe[z]) || N : "", { BottomIcon: ee, typeLabel: te } = We(t), ne = He(t), re = !V && !B && l && !u, ie = V && !!i && z !== e.UnsupportedType && z !== e.FileTooLarge, W = !!g && h !== void 0, G = W || r !== void 0, ae = Number(!!re) + Number(!!ie) + Number(!!u) + Number(!!x), oe = !G && ae === 1, se = () => {
263
+ W ? h(I) : r?.(I);
264
+ }, ce = q(() => Le(L), [L]), le = K(() => {
259
265
  window.open(t.referenceUrl, "_blank", "noopener,noreferrer");
260
- }, [t]), le = c(ze, "group/attachment-tile relative flex-col justify-between items-start gap-1 overflow-hidden p-1.5", Q.tile, !F && Q.hovered, h && Q.selected, F && Q.tileError, Z.tile, h && Z.tileSelected), V = /* @__PURE__ */ K("div", {
261
- title: se,
262
- className: c(O?.nameClassName ?? "dial-caption-text", "line-clamp-2 w-full min-w-0 break-words", Q.nameText, !F && re, Z.tileName),
263
- children: n ? /* @__PURE__ */ K(g, {
264
- text: se,
266
+ }, [t]), ue = c(Ge, "group/attachment-tile relative flex-col justify-between items-start gap-2 overflow-hidden p-3", Q.tile, G && !V && !B && Q.hovered, B && Q.loading, S && Q.selected, V && Q.tileError, oe && Q.proxyFocus, Z.tile, S && Z.tileSelected), de = /* @__PURE__ */ J("div", {
267
+ title: ce,
268
+ className: c(P?.nameClassName ?? "dial-tiny-text", "line-clamp-2 w-full min-w-0 wrap-break-word", Q.nameText, Z.tileName),
269
+ children: n ? /* @__PURE__ */ J(v, {
270
+ text: ce,
265
271
  query: n,
266
272
  maxLines: 2
267
- }) : se
268
- }), ue = R && /* @__PURE__ */ q("div", {
269
- className: c("flex w-full items-center gap-1", F && re, Z.tileType),
270
- children: [/* @__PURE__ */ K(R, {
271
- size: 16,
273
+ }) : ce
274
+ }), fe = ee && /* @__PURE__ */ Y("div", {
275
+ className: c("flex w-full items-end gap-1", Z.tileType),
276
+ children: [ne ? /* @__PURE__ */ J(_, {
277
+ type: m.File,
278
+ name: L ?? "",
279
+ fileExtension: Ve(t),
280
+ size: f.MD,
281
+ decorative: !0
282
+ }) : /* @__PURE__ */ J(ee, {
283
+ size: f.MD,
272
284
  className: Q.typeText,
285
+ stroke: p,
273
286
  "aria-hidden": !0
274
- }), /* @__PURE__ */ K("span", {
275
- className: c(O?.metaClassName ?? "dial-caption-text", "min-w-0 flex-1 truncate", Q.typeText),
276
- children: w ? `${z} · ${w}` : z
287
+ }), /* @__PURE__ */ J("span", {
288
+ className: c(P?.metaClassName ?? "dial-tiny-text", "min-w-0 flex-1 truncate", Q.typeText),
289
+ children: A ? `${te} · ${A}` : te
277
290
  })]
278
- }), de = ie ? {
279
- role: "button",
280
- tabIndex: 0,
281
- "aria-label": B ? v : _,
282
- onClick: ae,
283
- onKeyDown: oe
284
- } : {}, fe = /* @__PURE__ */ q(_e, { children: [
285
- V,
286
- ue,
287
- P && /* @__PURE__ */ K("div", {
291
+ }), pe = /* @__PURE__ */ Y(ye, { children: [
292
+ de,
293
+ fe,
294
+ G && /* @__PURE__ */ J("button", {
295
+ type: "button",
296
+ "aria-label": W ? T : w,
297
+ "aria-pressed": !W && r !== void 0 ? S : void 0,
298
+ onClick: se,
299
+ className: c("absolute inset-0 cursor-pointer rounded-[11px]", Q.tileAction)
300
+ }),
301
+ B && /* @__PURE__ */ J("div", {
288
302
  role: "progressbar",
289
- "aria-label": T,
290
- className: c("absolute start-[-1px] top-[-1px] flex size-full items-center justify-center rounded", Q.track),
291
- children: /* @__PURE__ */ K(y, { size: 32 })
303
+ "aria-label": j,
304
+ className: c("absolute inset-0 flex items-center justify-center rounded-[11px]", Q.track),
305
+ children: /* @__PURE__ */ J(C, { size: 32 })
292
306
  }),
293
- /* @__PURE__ */ q("div", {
294
- className: "absolute end-1 top-1 flex gap-1",
307
+ /* @__PURE__ */ Y("div", {
308
+ className: "absolute inset-e-1 top-1 flex",
295
309
  children: [
296
- ee && /* @__PURE__ */ K(He, {
297
- ariaLabel: b,
298
- errorTitle: L,
299
- errorDescId: I,
310
+ re && /* @__PURE__ */ J(Ye, {
311
+ ariaLabel: E,
312
+ errorTitle: U,
313
+ errorDescId: H,
300
314
  onClick: l,
301
- id: A
315
+ id: I
302
316
  }),
303
- te && /* @__PURE__ */ K(Ve, {
304
- ariaLabel: x,
305
- errorTitle: L,
306
- errorDescId: I,
317
+ ie && /* @__PURE__ */ J(Je, {
318
+ ariaLabel: D,
319
+ errorTitle: U,
320
+ errorDescId: H,
307
321
  onClick: i,
308
- id: A
322
+ id: I
309
323
  }),
310
- u && /* @__PURE__ */ K(Ue, {
311
- ariaLabel: C,
312
- errorTitle: L,
313
- errorDescId: I,
314
- onClick: ce
324
+ u && /* @__PURE__ */ J(Xe, {
325
+ ariaLabel: k,
326
+ errorTitle: U,
327
+ errorDescId: H,
328
+ onClick: le
315
329
  }),
316
- m && /* @__PURE__ */ K(We, {
317
- ariaLabel: S,
318
- errorTitle: L,
319
- errorDescId: I,
320
- onClick: m,
321
- id: A
330
+ x && /* @__PURE__ */ J(Ze, {
331
+ ariaLabel: O,
332
+ errorTitle: U,
333
+ errorDescId: H,
334
+ onClick: x,
335
+ id: I,
336
+ isAlwaysVisible: B
322
337
  })
323
338
  ]
324
339
  }),
325
- F && /* @__PURE__ */ K("span", {
326
- id: I,
327
- role: "status",
328
- "aria-live": "polite",
329
- className: "sr-only",
330
- children: L
340
+ /* @__PURE__ */ J(y, {
341
+ id: H,
342
+ visuallyHidden: !0,
343
+ as: b.Span,
344
+ children: V ? U : ""
331
345
  })
332
346
  ] });
333
- return /* @__PURE__ */ K("div", {
347
+ return /* @__PURE__ */ J("div", {
334
348
  style: d,
335
- className: c("inline-flex", k),
336
- children: /* @__PURE__ */ K("div", {
337
- ...de,
338
- "aria-busy": P,
349
+ className: c("inline-flex", F),
350
+ children: /* @__PURE__ */ J("div", {
351
+ "aria-busy": B,
339
352
  style: d,
340
- className: c(le, ie && "cursor-pointer", "focus-within:outline focus-within:outline-1 focus-within:outline-offset-1"),
341
- children: fe
353
+ className: c(ue, G && "cursor-pointer", Ke),
354
+ children: pe
342
355
  })
343
356
  });
344
- }, qe = /* @__PURE__ */ function(e) {
357
+ }, et = /* @__PURE__ */ function(e) {
345
358
  return e.Idle = "idle", e.Loading = "loading", e.Loaded = "loaded", e.Error = "error", e;
346
- }({}), Je = ({ enabled: e, src: t }) => {
347
- let n = ge(null), [r, i] = G("idle");
348
- return U(() => {
359
+ }({}), tt = ({ enabled: e, src: t }) => {
360
+ let n = _e(null), [r, i] = ve("idle");
361
+ return he(() => {
349
362
  i(e && t ? "loading" : "idle");
350
- }, [e, t]), U(() => {
363
+ }, [e, t]), he(() => {
351
364
  let r = n.current;
352
365
  if (!r || !e || !t) return;
353
366
  let a = () => i("loaded"), o = () => i("error");
@@ -358,67 +371,73 @@ var J = {
358
371
  imageRef: n,
359
372
  imageLoadStatus: r
360
373
  };
361
- }, Ye = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: l, isSelected: u }) => {
362
- let { clickLabel: d = "Open attachment", expandLabel: m = "Expand pasted text", removeLabel: h = "Remove attachment", downloadLabel: g = "Download attachment" } = i ?? {}, { className: y } = l ?? {}, { id: b, name: x } = e, S = e.previewUrl ?? e.url, C = e.type === t.Pasted && n !== void 0, { isLoading: w, isError: T, isImage: E } = W(() => Re(e), [e]), D = r !== void 0 && !C && !w && !T, O = C || D, { imageRef: k, imageLoadStatus: A } = Je({
363
- enabled: E,
364
- src: S
365
- }), j = () => {
366
- C && n ? n(b) : D && r && r(b);
367
- }, M = O ? {
368
- role: "button",
369
- tabIndex: 0,
370
- "aria-label": C ? m : d,
371
- onClick: j,
372
- onKeyDown: (e) => {
373
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), j());
374
- }
375
- } : {};
376
- return /* @__PURE__ */ K("div", {
377
- className: c(ze, "group/attachment-tile", O && "cursor-pointer", Q.tile, u && Q.selected, y, Z.tile, u && Z.tileSelected),
378
- ...M,
374
+ }, nt = ({ attachment: e, onExpand: n, onClick: r, labels: i, onRemove: a, cssVars: o, onDownload: s, styles: l, isSelected: u }) => {
375
+ let { clickLabel: d = "Open attachment", expandLabel: m = "Expand pasted text", removeLabel: h = "Remove attachment", downloadLabel: g = "Download attachment", uploadingLabel: _ = "Uploading" } = i ?? {}, { className: v } = l ?? {}, { id: y, name: b } = e, w = e.previewUrl ?? e.url, T = e.type === t.Pasted && n !== void 0, { isLoading: E, isError: D, isImage: O } = q(() => We(e), [e]), k = r !== void 0 && !T && !E && !D, A = T || k, j = !!s && !E, M = !A && Number(!!a) + Number(j) === 1, { imageRef: N, imageLoadStatus: P } = tt({
376
+ enabled: O,
377
+ src: w
378
+ }), F = () => {
379
+ T && n ? n(y) : k && r && r(y);
380
+ }, I = c(Ge, "group/attachment-tile", A && "cursor-pointer", Q.tile, u && Q.selected, E && Q.loading, M && Q.proxyFocus, Ke, v, Z.tile, u && Z.tileSelected);
381
+ return /* @__PURE__ */ J("div", {
382
+ className: I,
383
+ "aria-busy": E,
379
384
  style: o,
380
- children: /* @__PURE__ */ q("div", {
385
+ children: /* @__PURE__ */ Y("div", {
381
386
  className: "relative h-full w-full overflow-hidden",
382
387
  children: [
383
- /* @__PURE__ */ q("div", {
384
- className: "absolute end-1 top-1 z-10 flex gap-1",
385
- children: [a && /* @__PURE__ */ K(We, {
388
+ /* @__PURE__ */ Y("div", {
389
+ className: "absolute inset-e-1 top-1 z-10 flex",
390
+ children: [a && /* @__PURE__ */ J(Ze, {
386
391
  ariaLabel: h,
387
392
  onClick: a,
388
- id: b,
389
- className: Q.imageActionButton
390
- }), s && /* @__PURE__ */ K(He, {
393
+ id: y,
394
+ className: Q.imageActionButton,
395
+ isAlwaysVisible: E
396
+ }), j && /* @__PURE__ */ J(Ye, {
391
397
  ariaLabel: g,
392
398
  onClick: s,
393
- id: b,
399
+ id: y,
394
400
  className: Q.imageActionButton
395
401
  })]
396
402
  }),
397
- A !== qe.Loaded && /* @__PURE__ */ K(_, {
398
- variant: v.Rectangular,
403
+ P !== et.Loaded && /* @__PURE__ */ J(x, {
404
+ variant: S.Rectangular,
399
405
  width: "100%",
400
406
  height: "100%",
401
- active: A === qe.Loading,
402
- overlay: /* @__PURE__ */ K(V, {
407
+ active: P === et.Loading,
408
+ overlay: /* @__PURE__ */ J(le, {
403
409
  size: f.LG,
404
- className: Q.typeText,
410
+ className: Q.placeholderIcon,
405
411
  "aria-hidden": !0,
406
412
  stroke: p
407
413
  }),
408
414
  className: "absolute inset-0 rounded-xl"
409
415
  }),
410
- /* @__PURE__ */ K("img", {
411
- ref: k,
412
- src: S,
413
- alt: x,
416
+ /* @__PURE__ */ J("img", {
417
+ ref: N,
418
+ src: w,
419
+ alt: b,
414
420
  loading: "lazy",
415
421
  decoding: "async",
416
- className: c("h-full w-full rounded-xl object-cover transition-opacity duration-200", A === qe.Loaded ? "opacity-100" : "opacity-0")
422
+ className: c("h-full w-full rounded-xl object-cover transition-opacity duration-200", P === et.Loaded ? "opacity-100" : "opacity-0")
423
+ }),
424
+ A && /* @__PURE__ */ J("button", {
425
+ type: "button",
426
+ "aria-label": T ? m : d,
427
+ "aria-pressed": k ? u : void 0,
428
+ onClick: F,
429
+ className: c("absolute inset-0 cursor-pointer rounded-xl", Q.tileAction)
430
+ }),
431
+ E && /* @__PURE__ */ J("div", {
432
+ role: "progressbar",
433
+ "aria-label": _,
434
+ className: c("absolute inset-0 flex items-center justify-center rounded-xl", Q.track),
435
+ children: /* @__PURE__ */ J(C, { size: 32 })
417
436
  })
418
437
  ]
419
438
  })
420
439
  });
421
- }, Xe = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: c, labels: l, styles: u, isSelected: d }) => {
440
+ }, rt = ({ attachment: e, searchQuery: n = "", onRemove: r, onRetry: i, onExpand: a, onClick: o, onDownload: c, labels: l, styles: u, isSelected: d }) => {
422
441
  let { colors: f } = u ?? {}, p = e.type === t.Pasted && a !== void 0, m = s({
423
442
  "--ai-tile-bg": f?.background,
424
443
  "--ai-tile-border": f?.border,
@@ -432,11 +451,12 @@ var J = {
432
451
  "--ai-tile-error-text": f?.errorText,
433
452
  "--ai-tile-name-text": f?.nameText,
434
453
  "--ai-tile-type-text": f?.typeText,
454
+ "--ai-tile-placeholder-icon": f?.placeholderIcon,
435
455
  "--ai-tile-hover-icon-bg": f?.hoverIconBackground,
436
456
  "--ai-tile-hover-icon-color": f?.hoverIconColor,
437
457
  "--ai-tile-progress-track": f?.trackBackground
438
- }), { isImage: h, isLink: g } = W(() => Re(e), [e]);
439
- return h ? /* @__PURE__ */ K(Ye, {
458
+ }), { isImage: h, isLink: g } = q(() => We(e), [e]);
459
+ return h ? /* @__PURE__ */ J(nt, {
440
460
  attachment: e,
441
461
  labels: l,
442
462
  onClick: o,
@@ -446,7 +466,7 @@ var J = {
446
466
  cssVars: m,
447
467
  onDownload: c,
448
468
  isSelected: d
449
- }) : /* @__PURE__ */ K(Ke, {
469
+ }) : /* @__PURE__ */ J($e, {
450
470
  attachment: e,
451
471
  searchQuery: n,
452
472
  onClick: o,
@@ -461,261 +481,282 @@ var J = {
461
481
  isExpandable: p,
462
482
  isSelected: d
463
483
  });
464
- }, Ze = (e) => {
465
- let t = l(e);
466
- if (!e?.length) return t;
467
- let n = /* @__PURE__ */ new Map();
484
+ }, it = (e, t) => {
485
+ let n = l(e, t);
486
+ if (!e?.length) return n;
487
+ let r = /* @__PURE__ */ new Map();
468
488
  for (let t of e) {
469
489
  let e = t.url ?? t.data ?? t.title;
470
- n.has(e) || n.set(e, t.type);
490
+ r.has(e) || r.set(e, t.type);
471
491
  }
472
- return t.map((e) => {
473
- let t = n.get(e.id);
492
+ return n.map((e) => {
493
+ let t = r.get(e.id);
474
494
  return t ? {
475
495
  ...e,
476
496
  contentType: t
477
497
  } : e;
478
498
  });
479
- }, Qe = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: i, copiedLabel: a }) => /* @__PURE__ */ K(r, {
480
- language: t?.replace(/^language-/, "") ?? "",
481
- value: typeof e == "string" ? e : String(e ?? ""),
482
- codeClassName: n,
483
- containerClassName: c(X.codeBlock, n),
484
- copyLabel: i,
485
- copiedLabel: a,
486
- hideDownload: !0
487
- }), $e = me(({ content: e, typography: t, copyAriaLabel: n = "Copy", copiedLabel: r, tableScrollRegionAriaLabel: a, mathScrollRegionAriaLabel: o }) => {
488
- let s = "mb-1.5 last:mb-0", l = c(t?.headingClassName ?? "dial-small-semi-text", X.stageContent, s);
489
- return /* @__PURE__ */ K(i, {
499
+ }, at = ({ children: e, codeClassName: t, blockClassName: n = "dial-code-text", copyAriaLabel: i, copiedLabel: a }) => {
500
+ let o = t?.replace(/^language-/, "") ?? "";
501
+ return /* @__PURE__ */ J(r, {
502
+ language: o,
503
+ value: typeof e == "string" ? e : String(e ?? ""),
504
+ codeClassName: n,
505
+ containerClassName: c(X.codeBlock, n),
506
+ copyLabel: i,
507
+ copiedLabel: a,
508
+ hideDownload: !0
509
+ });
510
+ }, ot = me(({ content: e, typography: t, copyAriaLabel: n = "Copy", copiedLabel: r, tableScrollRegionAriaLabel: a, mathScrollRegionAriaLabel: o, renderCitation: s }) => {
511
+ let l = "mb-1.5 last:mb-0", u = c(t?.headingClassName ?? "dial-small-semi-text", X.stageContent, l), d = q(() => ({
512
+ code: ({ children: e, className: i }) => i?.includes("language-") ? /* @__PURE__ */ J(at, {
513
+ codeClassName: i,
514
+ blockClassName: t?.codeBlockClassName,
515
+ copyAriaLabel: n,
516
+ copiedLabel: r,
517
+ children: e
518
+ }) : /* @__PURE__ */ J("code", {
519
+ className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-code-text rounded-md", X.codeInline),
520
+ children: e
521
+ }),
522
+ ...s != null && { cit: (e) => s(e["data-id"], e.children) }
523
+ }), [
524
+ t?.codeClassName,
525
+ t?.codeBlockClassName,
526
+ n,
527
+ r,
528
+ s
529
+ ]);
530
+ return /* @__PURE__ */ J(i, {
490
531
  content: e,
491
532
  tableScrollRegionAriaLabel: a,
492
533
  mathScrollRegionAriaLabel: o,
493
534
  classNames: {
494
- h1: l,
495
- h2: l,
496
- h3: l,
497
- h4: l,
498
- h5: l,
499
- h6: l,
535
+ h1: u,
536
+ h2: u,
537
+ h3: u,
538
+ h4: u,
539
+ h5: u,
540
+ h6: u,
500
541
  p: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, "mb-1.5"),
501
- ul: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, s),
502
- ol: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, s),
542
+ ul: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, l),
543
+ ol: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent, l),
503
544
  strong: c(t?.strongClassName ?? t?.contentClassName ?? "dial-tiny-text", X.stageContent),
504
545
  codeInline: X.codeInline,
505
- blockquote: c(t?.contentClassName ?? "dial-tiny-text", X.blockquote, s),
546
+ blockquote: c(t?.contentClassName ?? "dial-tiny-text", X.blockquote, l),
506
547
  link: c(t?.contentClassName ?? "dial-tiny-text", X.stageContent),
507
548
  tableCell: c(t?.contentClassName ?? "dial-tiny-text", X.tableCell)
508
549
  },
509
- components: { code: ({ children: e, className: i }) => i?.includes("language-") ? /* @__PURE__ */ K(Qe, {
510
- codeClassName: i,
511
- blockClassName: t?.codeBlockClassName,
512
- copyAriaLabel: n,
513
- copiedLabel: r,
514
- children: e
515
- }) : /* @__PURE__ */ K("code", {
516
- className: c("px-1 py-0.5", t?.codeClassName ?? "dial-tiny-text rounded-md", X.codeInline),
517
- children: e
518
- }) }
550
+ components: d
519
551
  });
520
- }), et = ({ attachments: e, clickLabel: t, onAttachmentClick: n }) => {
521
- let r = H((t) => {
552
+ }), st = ({ attachments: e, clickLabel: t, onAttachmentClick: n }) => {
553
+ let r = K((t) => {
522
554
  let r = e.find((e) => e.id === t);
523
555
  r && n?.(r);
524
556
  }, [e, n]);
525
- return /* @__PURE__ */ K("div", {
557
+ return /* @__PURE__ */ J("div", {
526
558
  role: "list",
527
- className: "flex flex-wrap gap-3",
528
- children: e.map((e) => /* @__PURE__ */ K("div", {
559
+ className: "flex flex-wrap gap-2",
560
+ children: e.map((e) => /* @__PURE__ */ J("div", {
529
561
  role: "listitem",
530
- children: /* @__PURE__ */ K(Xe, {
562
+ children: /* @__PURE__ */ J(rt, {
531
563
  attachment: e,
532
564
  onClick: n && r,
533
565
  labels: { clickLabel: t }
534
566
  })
535
567
  }, e.id))
536
568
  });
537
- }, tt = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a, childList: s, isExpanded: l, onToggle: u }) => {
538
- let [f, p] = G(!1), m = l ?? f, g = H((e) => {
539
- l === void 0 && p(e), u?.(e);
540
- }, [l, u]), { copyAriaLabel: _ = "Copy stage content", codeBlockCopiedLabel: v, tableScrollRegionAriaLabel: y, mathScrollRegionAriaLabel: b, runningAriaLabel: x, failedAriaLabel: S, attachmentClickLabel: C = "Preview search result" } = r ?? {}, w = W(() => Ze(e.attachments), [e.attachments]), { name: T, durationLabel: E } = Y(e.name), D = i ?? T, O = !i && Ce(T), k = e.status === o.Failed, A = !!e.content || !!e.attachments?.length, j = A || s != null, M = /* @__PURE__ */ q(_e, { children: [
541
- /* @__PURE__ */ K("span", {
569
+ }, ct = ({ stage: e, isLive: t, typography: n, labels: r, nameOverride: i, onAttachmentClick: a, attachmentDisplayResolvers: s, renderCitation: l, childList: u, isExpanded: f, onToggle: p }) => {
570
+ let [m, h] = ve(!1), _ = f ?? m, v = K((e) => {
571
+ f === void 0 && h(e), p?.(e);
572
+ }, [f, p]), { copyAriaLabel: y = "Copy stage content", codeBlockCopiedLabel: b, tableScrollRegionAriaLabel: x, mathScrollRegionAriaLabel: S, runningAriaLabel: C, failedAriaLabel: w, attachmentClickLabel: T = "Preview search result" } = r ?? {}, E = q(() => it(e.attachments, s), [e.attachments, s]), { name: D, durationLabel: O } = Ee(e.name), k = i ?? D, A = !i && De(D), j = e.status === o.Failed, M = !!e.content || !!e.attachments?.length, N = M || u != null, P = /* @__PURE__ */ Y(ye, { children: [
573
+ /* @__PURE__ */ J("span", {
542
574
  className: "flex flex-none items-center",
543
- children: /* @__PURE__ */ K(Me, {
575
+ children: /* @__PURE__ */ J(Ie, {
544
576
  status: e.status,
545
577
  isLive: t,
546
- runningLabel: x,
547
- failedLabel: S
578
+ runningLabel: C,
579
+ failedLabel: w
548
580
  })
549
581
  }),
550
- /* @__PURE__ */ K("span", {
551
- className: c("min-w-0 max-w-[22rem] truncate", n?.fontClassName ?? "dial-small-text", X.stageName, k && X.stageNameFailed, O && X.monoName),
552
- children: /* @__PURE__ */ K(h, { text: D || e.status || "" })
582
+ /* @__PURE__ */ J("span", {
583
+ className: c("max-w-88 min-w-0 truncate", A ? n?.monoFontClassName ?? "dial-code-text" : n?.fontClassName ?? "dial-small-text", X.stageName, j && X.stageNameFailed),
584
+ children: /* @__PURE__ */ J(g, { text: k || e.status || "" })
553
585
  }),
554
- e.tag && /* @__PURE__ */ K("span", {
586
+ e.tag && /* @__PURE__ */ J("span", {
555
587
  className: c("flex-none", n?.tagClassName ?? "dial-tiny-lead-text", X.tag),
556
588
  children: e.tag
557
589
  }),
558
- E && /* @__PURE__ */ K("span", {
590
+ O && /* @__PURE__ */ J("span", {
559
591
  className: c("flex-none", n?.countFontClassName ?? "dial-tiny-text", X.duration),
560
- children: E
592
+ children: O
561
593
  })
562
594
  ] });
563
- return j ? /* @__PURE__ */ q(d, {
564
- expanded: m,
565
- onToggle: g,
566
- title: /* @__PURE__ */ K("span", {
595
+ return N ? /* @__PURE__ */ Y(d, {
596
+ expanded: _,
597
+ onToggle: v,
598
+ title: /* @__PURE__ */ J("span", {
567
599
  className: "flex min-w-0 items-center gap-2",
568
- children: M
600
+ children: P
569
601
  }),
570
- className: ke,
571
- headerClassName: c(Ae, X.row, X.stageHeader),
602
+ className: Ne,
603
+ headerClassName: c(Pe, X.row, X.stageHeader),
572
604
  contentClassName: c("-mt-1 flex min-w-0 flex-col gap-3 px-0 py-1", X.stageRegion),
573
- children: [m && A && /* @__PURE__ */ q("div", {
605
+ children: [_ && M && /* @__PURE__ */ Y("div", {
574
606
  className: "flex min-w-0 flex-col gap-3 ps-8",
575
- children: [e.content && /* @__PURE__ */ K("div", {
607
+ children: [e.content && /* @__PURE__ */ J("div", {
576
608
  className: "max-h-[300px] min-w-0 overflow-y-auto",
577
- children: /* @__PURE__ */ K($e, {
609
+ children: /* @__PURE__ */ J(ot, {
578
610
  content: e.content,
579
611
  typography: n,
580
- copyAriaLabel: _,
581
- copiedLabel: v,
582
- tableScrollRegionAriaLabel: y,
583
- mathScrollRegionAriaLabel: b
612
+ copyAriaLabel: y,
613
+ copiedLabel: b,
614
+ tableScrollRegionAriaLabel: x,
615
+ mathScrollRegionAriaLabel: S,
616
+ renderCitation: l
584
617
  })
585
- }), w.length > 0 && /* @__PURE__ */ K(et, {
586
- attachments: w,
587
- clickLabel: C,
618
+ }), E.length > 0 && /* @__PURE__ */ J(st, {
619
+ attachments: E,
620
+ clickLabel: T,
588
621
  onAttachmentClick: a
589
622
  })]
590
- }), m && s]
591
- }) : /* @__PURE__ */ K("div", {
623
+ }), _ && u]
624
+ }) : /* @__PURE__ */ J("div", {
592
625
  className: c("flex w-full items-center gap-2 px-2 py-1.5", X.row),
593
- children: M
626
+ children: P
594
627
  });
595
- }, nt = (e) => e <= 3 ? "ps-4" : "ps-0", rt = (e) => e <= 3 ? "ps-6" : "ps-0", it = ({ node: e, depth: t, nameOverride: n, isStreaming: r, expansion: i, typography: a, labels: o, onAttachmentClick: s }) => {
596
- let c = De(e.stage.index), l = t + 1;
597
- return /* @__PURE__ */ K(tt, {
628
+ }, lt = (e) => e <= 3 ? "ps-4" : "ps-0", ut = (e) => e <= 3 ? "ps-6" : "ps-0", dt = ({ node: e, depth: t, nameOverride: n, isStreaming: r, expansion: i, typography: a, labels: o, onAttachmentClick: s, attachmentDisplayResolvers: c, renderCitation: l }) => {
629
+ let u = je(e.stage.index), d = t + 1;
630
+ return /* @__PURE__ */ J(ct, {
598
631
  stage: e.stage,
599
632
  nameOverride: n,
600
633
  isLive: r && e.stage.status == null,
601
634
  typography: a,
602
635
  labels: o,
603
636
  onAttachmentClick: s,
604
- isExpanded: i.isExpanded(c),
605
- onToggle: (e) => i.onToggle(c, e),
606
- childList: e.children.length > 0 ? /* @__PURE__ */ K(ot, {
637
+ attachmentDisplayResolvers: c,
638
+ renderCitation: l,
639
+ isExpanded: i.isExpanded(u),
640
+ onToggle: (e) => i.onToggle(u, e),
641
+ childList: e.children.length > 0 ? /* @__PURE__ */ J(pt, {
607
642
  nodes: e.children,
608
- depth: l,
609
- className: nt(l),
643
+ depth: d,
644
+ className: lt(d),
610
645
  isStreaming: r,
611
646
  expansion: i,
612
647
  typography: a,
613
648
  labels: o,
614
- onAttachmentClick: s
649
+ onAttachmentClick: s,
650
+ attachmentDisplayResolvers: c,
651
+ renderCitation: l
615
652
  }) : void 0
616
653
  });
617
- }, at = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s }) => {
618
- let { runningAriaLabel: l, failedAriaLabel: u, attemptLabel: f = (e) => `Attempt ${e}` } = a ?? {}, p = e.attempts ?? [], m = p.some((e) => e.stage.status == null), g = p.some((e) => e.stage.status === o.Failed), _ = o.Completed;
619
- m ? _ = null : g && (_ = o.Failed);
620
- let v = Oe(e.key), y = r.isExpanded(v), b = t + 1;
621
- return /* @__PURE__ */ K(d, {
622
- title: /* @__PURE__ */ q("span", {
623
- className: "flex min-w-0 items-center gap-2",
624
- children: [
625
- /* @__PURE__ */ K("span", {
626
- className: "flex flex-none items-center",
627
- children: /* @__PURE__ */ K(Me, {
628
- status: _,
629
- isLive: n && m,
630
- runningLabel: l,
631
- failedLabel: u
632
- })
633
- }),
634
- /* @__PURE__ */ K("span", {
635
- className: c("min-w-0 max-w-[22rem] truncate", i?.fontClassName ?? "dial-small-text", X.stageName, g && X.stageNameFailed),
636
- children: /* @__PURE__ */ K(h, { text: e.name })
637
- }),
638
- /* @__PURE__ */ q("span", {
639
- className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", X.count),
640
- children: ["×", p.length]
654
+ }, ft = ({ row: e, depth: t, isStreaming: n, expansion: r, typography: i, labels: a, onAttachmentClick: s, attachmentDisplayResolvers: l, renderCitation: u }) => {
655
+ let { runningAriaLabel: f, failedAriaLabel: p, attemptLabel: m = (e) => `Attempt ${e}` } = a ?? {}, h = e.attempts ?? [], _ = h.some((e) => e.stage.status == null), v = h.some((e) => e.stage.status === o.Failed), y = o.Completed;
656
+ _ ? y = null : v && (y = o.Failed);
657
+ let b = Me(e.key), x = r.isExpanded(b), S = t + 1, C = /* @__PURE__ */ Y("span", {
658
+ className: "flex min-w-0 items-center gap-2",
659
+ children: [
660
+ /* @__PURE__ */ J("span", {
661
+ className: "flex flex-none items-center",
662
+ children: /* @__PURE__ */ J(Ie, {
663
+ status: y,
664
+ isLive: n && _,
665
+ runningLabel: f,
666
+ failedLabel: p
641
667
  })
642
- ]
643
- }),
644
- expanded: y,
645
- onToggle: (e) => r.onToggle(v, e),
646
- className: ke,
647
- headerClassName: c(Ae, X.collapseButton, X.row, X.stageHeader),
648
- contentClassName: c("-mt-2 min-w-0 px-0", rt(b), X.stageRegion),
649
- children: /* @__PURE__ */ K("ul", {
668
+ }),
669
+ /* @__PURE__ */ J("span", {
670
+ className: c("max-w-88 min-w-0 truncate", i?.fontClassName ?? "dial-small-text", X.stageName, v && X.stageNameFailed),
671
+ children: /* @__PURE__ */ J(g, { text: e.name })
672
+ }),
673
+ /* @__PURE__ */ Y("span", {
674
+ className: c("flex-none", i?.countFontClassName ?? "dial-tiny-text", X.count),
675
+ children: ["×", h.length]
676
+ })
677
+ ]
678
+ });
679
+ return /* @__PURE__ */ J(d, {
680
+ title: C,
681
+ expanded: x,
682
+ onToggle: (e) => r.onToggle(b, e),
683
+ className: Ne,
684
+ headerClassName: c(Pe, X.collapseButton, X.row, X.stageHeader),
685
+ contentClassName: c("-mt-2 min-w-0 px-0", ut(S), X.stageRegion),
686
+ children: /* @__PURE__ */ J("ul", {
650
687
  role: "list",
651
688
  className: "flex min-w-0 flex-col gap-0.5",
652
- children: y && p.map((e, t) => /* @__PURE__ */ K("li", {
689
+ children: x && h.map((e, t) => /* @__PURE__ */ J("li", {
653
690
  role: "listitem",
654
691
  className: "min-w-0",
655
- children: /* @__PURE__ */ K(it, {
692
+ children: /* @__PURE__ */ J(dt, {
656
693
  node: e,
657
- depth: b,
658
- nameOverride: f(t + 1),
694
+ depth: S,
695
+ nameOverride: m(t + 1),
659
696
  isStreaming: n,
660
697
  expansion: r,
661
698
  typography: i,
662
699
  labels: a,
663
- onAttachmentClick: s
700
+ onAttachmentClick: s,
701
+ attachmentDisplayResolvers: l,
702
+ renderCitation: u
664
703
  })
665
704
  }, e.stage.index))
666
705
  })
667
706
  });
668
- }, ot = ({ nodes: e, depth: t, className: n, ...r }) => /* @__PURE__ */ K("ul", {
707
+ }, pt = ({ nodes: e, depth: t, className: n, ...r }) => /* @__PURE__ */ J("ul", {
669
708
  role: "list",
670
709
  className: c("flex min-w-0 flex-col gap-0.5", n),
671
- children: je(e).map((e) => /* @__PURE__ */ K("li", {
710
+ children: Fe(e).map((e) => /* @__PURE__ */ J("li", {
672
711
  role: "listitem",
673
712
  className: "min-w-0",
674
- children: e.node ? /* @__PURE__ */ K(it, {
713
+ children: e.node ? /* @__PURE__ */ J(dt, {
675
714
  node: e.node,
676
715
  depth: t,
677
716
  ...r
678
- }) : /* @__PURE__ */ K(at, {
717
+ }) : /* @__PURE__ */ J(ft, {
679
718
  row: e,
680
719
  depth: t,
681
720
  ...r
682
721
  })
683
722
  }, e.key))
684
- }), st = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a, expansion: o }) => {
685
- let { colors: l, typography: u } = r ?? {}, d = s({
686
- "--cs-text": l?.text,
687
- "--cs-row-hover": l?.rowHoverColor,
688
- "--cs-button-bg": l?.collapsedButtonBg,
689
- "--cs-stage-text": l?.stageTextColor,
690
- "--cs-failed-text": l?.failedColor,
691
- "--cs-tag-text": l?.tagTextColor,
692
- "--cs-count-text": l?.countTextColor,
693
- "--cs-duration-text": l?.durationTextColor,
694
- "--cs-icon-secondary": l?.iconSecondaryColor,
695
- "--cs-icon-completed": l?.iconCompletedColor,
696
- "--cs-icon-error": l?.iconErrorColor,
697
- "--cs-code-bg": l?.codeBg,
698
- "--cs-code-border": l?.codeBorderColor,
699
- "--cs-code-text": l?.codeTextColor,
700
- "--cs-border": l?.borderColor
701
- }), f = W(() => Ee(e), [e]);
702
- return /* @__PURE__ */ K("div", {
703
- style: d,
704
- className: c("w-full min-w-0", X.panel, n, J.panel),
705
- children: /* @__PURE__ */ K(ot, {
706
- nodes: f,
723
+ }), mt = ({ stages: e, isStreaming: t, className: n, styles: r, labels: i, onAttachmentClick: a, attachmentDisplayResolvers: o, renderCitation: l, expansion: u }) => {
724
+ let { colors: d, typography: f } = r ?? {}, p = s({
725
+ "--cs-text": d?.text,
726
+ "--cs-row-hover": d?.rowHoverColor,
727
+ "--cs-button-bg": d?.collapsedButtonBg,
728
+ "--cs-stage-text": d?.stageTextColor,
729
+ "--cs-failed-text": d?.failedColor,
730
+ "--cs-tag-text": d?.tagTextColor,
731
+ "--cs-count-text": d?.countTextColor,
732
+ "--cs-duration-text": d?.durationTextColor,
733
+ "--cs-icon-secondary": d?.iconSecondaryColor,
734
+ "--cs-icon-completed": d?.iconCompletedColor,
735
+ "--cs-icon-error": d?.iconErrorColor,
736
+ "--cs-code-bg": d?.codeBg,
737
+ "--cs-code-border": d?.codeBorderColor,
738
+ "--cs-code-text": d?.codeTextColor,
739
+ "--cs-border": d?.borderColor
740
+ }), m = q(() => Ae(e), [e]);
741
+ return /* @__PURE__ */ J("div", {
742
+ style: p,
743
+ className: c("w-full min-w-0", X.panel, n, be.panel),
744
+ children: /* @__PURE__ */ J(pt, {
745
+ nodes: m,
707
746
  depth: 0,
708
747
  className: "w-full ps-5",
709
748
  isStreaming: t,
710
- expansion: o,
711
- typography: u,
749
+ expansion: u,
750
+ typography: f,
712
751
  labels: i,
713
- onAttachmentClick: a
752
+ onAttachmentClick: a,
753
+ attachmentDisplayResolvers: o,
754
+ renderCitation: l
714
755
  })
715
756
  });
716
- }, ct = (e) => {
717
- let t = ve();
718
- return /* @__PURE__ */ K(st, {
757
+ }, ht = (e) => {
758
+ let t = xe();
759
+ return /* @__PURE__ */ J(mt, {
719
760
  ...e,
720
761
  expansion: t
721
762
  });
@@ -726,141 +767,145 @@ var J = {
726
767
  doneIcon: "_doneIcon_16fae_36",
727
768
  failedText: "_failedText_16fae_40",
728
769
  liveName: "_liveName_16fae_44"
729
- }, lt = ({ stages: e, isStreaming: t, labels: n, className: r, styles: i, onAttachmentClick: a }) => {
730
- let { executedLabel: l = "Executed", stepsLabel: u = () => "steps", failedCountLabel: m = (e) => `${e} failed`, runningAriaLabel: g = "Running", copyAriaLabel: _, codeBlockCopiedLabel: v, tableScrollRegionAriaLabel: b, mathScrollRegionAriaLabel: x, failedAriaLabel: C, attemptLabel: w, attachmentClickLabel: T } = n ?? {}, [E, D] = G(t), O = ve(), { reset: k } = O, A = e.length > 1;
731
- U(() => {
732
- A && !E && k();
770
+ }, gt = ({ stages: e, isStreaming: t, labels: n, className: r, styles: i, onAttachmentClick: a, attachmentDisplayResolvers: l, renderCitation: u }) => {
771
+ let { executedLabel: m = "Executed", stepsLabel: h = () => "steps", failedCountLabel: _ = (e) => `${e} failed`, runningAriaLabel: v = "Running", copyAriaLabel: y, codeBlockCopiedLabel: b, tableScrollRegionAriaLabel: x, mathScrollRegionAriaLabel: S, failedAriaLabel: w, attemptLabel: T, attachmentClickLabel: D } = n ?? {}, [O, k] = ve(t), A = xe(), { reset: j } = A, M = e.length > 1;
772
+ he(() => {
773
+ M && !O && j();
733
774
  }, [
734
- A,
735
- E,
736
- k
775
+ M,
776
+ O,
777
+ j
737
778
  ]);
738
- let j = ge(t);
739
- U(() => {
740
- j.current && !t && D(!1), j.current = t;
779
+ let N = _e(t);
780
+ he(() => {
781
+ N.current && !t && k(!1), N.current = t;
741
782
  }, [t]);
742
- let { colors: M, panel: N } = i ?? {}, P = i?.typography ?? { fontClassName: "dial-small-text" }, F = s({
743
- "--cs-cg-label": M?.labelColor,
744
- "--cs-cg-label-hover": M?.labelHoverColor,
745
- "--cs-cg-done": M?.doneColor,
746
- "--cs-cg-failed": M?.failedColor,
747
- "--cs-text": N?.text,
748
- "--cs-row-hover": N?.rowHoverColor,
749
- "--cs-button-bg": N?.collapsedButtonBg,
750
- "--cs-stage-text": N?.stageTextColor,
751
- "--cs-failed-text": N?.failedColor,
752
- "--cs-tag-text": N?.tagTextColor,
753
- "--cs-count-text": N?.countTextColor,
754
- "--cs-duration-text": N?.durationTextColor,
755
- "--cs-icon-secondary": N?.iconSecondaryColor,
756
- "--cs-icon-completed": N?.iconCompletedColor,
757
- "--cs-icon-error": N?.iconErrorColor,
758
- "--cs-code-bg": N?.codeBg,
759
- "--cs-code-border": N?.codeBorderColor,
760
- "--cs-code-text": N?.codeTextColor,
761
- "--cs-border": N?.borderColor
783
+ let { colors: P, panel: F } = i ?? {}, I = i?.typography ?? { fontClassName: "dial-small-text" }, L = s({
784
+ "--cs-cg-label": P?.labelColor,
785
+ "--cs-cg-label-hover": P?.labelHoverColor,
786
+ "--cs-cg-done": P?.doneColor,
787
+ "--cs-cg-failed": P?.failedColor,
788
+ "--cs-text": F?.text,
789
+ "--cs-row-hover": F?.rowHoverColor,
790
+ "--cs-button-bg": F?.collapsedButtonBg,
791
+ "--cs-stage-text": F?.stageTextColor,
792
+ "--cs-failed-text": F?.failedColor,
793
+ "--cs-tag-text": F?.tagTextColor,
794
+ "--cs-count-text": F?.countTextColor,
795
+ "--cs-duration-text": F?.durationTextColor,
796
+ "--cs-icon-secondary": F?.iconSecondaryColor,
797
+ "--cs-icon-completed": F?.iconCompletedColor,
798
+ "--cs-icon-error": F?.iconErrorColor,
799
+ "--cs-code-bg": F?.codeBg,
800
+ "--cs-code-border": F?.codeBorderColor,
801
+ "--cs-code-text": F?.codeTextColor,
802
+ "--cs-border": F?.borderColor
762
803
  });
763
804
  if (e.length === 0) return null;
764
- let I = {
765
- copyAriaLabel: _,
766
- codeBlockCopiedLabel: v,
767
- tableScrollRegionAriaLabel: b,
768
- mathScrollRegionAriaLabel: x,
769
- runningAriaLabel: g,
770
- failedAriaLabel: C,
771
- attemptLabel: w,
772
- attachmentClickLabel: T
805
+ let R = {
806
+ copyAriaLabel: y,
807
+ codeBlockCopiedLabel: b,
808
+ tableScrollRegionAriaLabel: x,
809
+ mathScrollRegionAriaLabel: S,
810
+ runningAriaLabel: v,
811
+ failedAriaLabel: w,
812
+ attemptLabel: T,
813
+ attachmentClickLabel: D
773
814
  };
774
- if (e.length === 1) return /* @__PURE__ */ K(st, {
815
+ if (e.length === 1) return /* @__PURE__ */ J(mt, {
775
816
  stages: e,
776
817
  isStreaming: t,
777
- expansion: O,
818
+ expansion: A,
778
819
  className: r,
779
820
  styles: {
780
- colors: N,
821
+ colors: F,
781
822
  typography: i?.typography
782
823
  },
783
- labels: I,
784
- onAttachmentClick: a
824
+ labels: R,
825
+ onAttachmentClick: a,
826
+ attachmentDisplayResolvers: l,
827
+ renderCitation: u
785
828
  });
786
- let L = e.some((e) => e.status === o.Failed), R;
829
+ let z = e.some((e) => e.status === o.Failed), B;
787
830
  if (t) {
788
- let t = Y((we(e) ?? e[e.length - 1]).name).name;
789
- R = /* @__PURE__ */ q("span", {
831
+ let t = Ee((Oe(e) ?? e[e.length - 1]).name).name;
832
+ B = /* @__PURE__ */ Y("span", {
790
833
  role: "status",
791
834
  "aria-live": "polite",
792
835
  className: "flex min-w-0 items-center gap-2",
793
- children: [/* @__PURE__ */ K("span", {
836
+ children: [/* @__PURE__ */ J("span", {
794
837
  className: "flex flex-none items-center",
795
- children: /* @__PURE__ */ K(y, {
838
+ children: /* @__PURE__ */ J(C, {
796
839
  size: 14,
797
- ariaLabel: g
840
+ ariaLabel: v
798
841
  })
799
- }), t && /* @__PURE__ */ K("span", {
800
- className: c("min-w-0 max-w-[22rem] truncate", P.fontClassName, $.liveName),
801
- children: /* @__PURE__ */ K(h, { text: t })
842
+ }), t && /* @__PURE__ */ J("span", {
843
+ className: c("max-w-88 min-w-0 truncate", I.fontClassName, $.liveName),
844
+ children: /* @__PURE__ */ J(g, { text: t })
802
845
  })]
803
846
  });
804
- } else if (L) {
847
+ } else if (z) {
805
848
  let t = e.filter((e) => e.status === o.Failed).length;
806
- R = /* @__PURE__ */ q("span", {
849
+ B = /* @__PURE__ */ Y("span", {
807
850
  className: "inline-flex items-center gap-1",
808
- children: [/* @__PURE__ */ q("span", {
809
- className: c(P.fontClassName, $.executedLabel),
851
+ children: [/* @__PURE__ */ Y("span", {
852
+ className: c(I.fontClassName, $.executedLabel),
810
853
  children: [
811
- l,
854
+ m,
812
855
  " ",
813
856
  e.length,
814
857
  " ",
815
- u(e.length)
858
+ h(e.length)
816
859
  ]
817
- }), /* @__PURE__ */ K("span", {
818
- className: c(P.fontClassName, $.failedText),
819
- children: m(t)
860
+ }), /* @__PURE__ */ J("span", {
861
+ className: c(I.fontClassName, $.failedText),
862
+ children: _(t)
820
863
  })]
821
864
  });
822
- } else R = /* @__PURE__ */ q("span", {
865
+ } else B = /* @__PURE__ */ Y("span", {
823
866
  className: "inline-flex items-center gap-1",
824
- children: [/* @__PURE__ */ K(S, {
867
+ children: [/* @__PURE__ */ J(E, {
825
868
  size: f.SM,
826
869
  className: $.doneIcon,
827
870
  "aria-hidden": !0,
828
871
  stroke: p
829
- }), /* @__PURE__ */ q("span", {
830
- className: c(P.fontClassName, $.executedLabel),
872
+ }), /* @__PURE__ */ Y("span", {
873
+ className: c(I.fontClassName, $.executedLabel),
831
874
  children: [
832
- l,
875
+ m,
833
876
  " ",
834
877
  e.length,
835
878
  " ",
836
- u(e.length)
879
+ h(e.length)
837
880
  ]
838
881
  })]
839
882
  });
840
- return /* @__PURE__ */ K("div", {
841
- style: F,
842
- className: c("flex w-full flex-col gap-1", r, J.group),
843
- children: /* @__PURE__ */ K(d, {
844
- title: R,
845
- expanded: E,
846
- onToggle: D,
883
+ return /* @__PURE__ */ J("div", {
884
+ style: L,
885
+ className: c("flex w-full flex-col gap-1", r, be.group),
886
+ children: /* @__PURE__ */ J(d, {
887
+ title: B,
888
+ expanded: O,
889
+ onToggle: k,
847
890
  className: "overflow-visible py-0",
848
- headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton, J.groupToggle),
891
+ headerClassName: c("justify-start gap-1 rounded-none px-0", $.toggleButton, be.groupToggle),
849
892
  contentClassName: c("-mt-2 px-0", $.groupRegion),
850
- children: E && /* @__PURE__ */ K(st, {
893
+ children: O && /* @__PURE__ */ J(mt, {
851
894
  stages: e,
852
895
  isStreaming: t,
853
- expansion: O,
896
+ expansion: A,
854
897
  styles: {
855
- colors: N,
898
+ colors: F,
856
899
  typography: i?.typography
857
900
  },
858
- labels: I,
901
+ labels: R,
859
902
  className: "pt-1",
860
- onAttachmentClick: a
903
+ onAttachmentClick: a,
904
+ attachmentDisplayResolvers: l,
905
+ renderCitation: u
861
906
  })
862
907
  })
863
908
  });
864
909
  };
865
910
  //#endregion
866
- export { J as CONVERSATION_STAGES_CLASS, lt as CollapsedGroup, ct as StagesPanel };
911
+ export { be as CONVERSATION_STAGES_CLASS, gt as CollapsedGroup, ht as StagesPanel };