@epam/ai-dial-attachment-canvas 1.2.0-dev.253 → 1.2.0-dev.258

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
@@ -3,41 +3,41 @@ import { i as a, o, t as s } from "./LazyContentBoundary-tNE1ExbI.js";
3
3
  import { AttachmentType as c, CodeBlockTheme as l, DEFAULT_MARKDOWN_CLASS_NAMES as u, FileExtension as d, MIMEType as f, MarkdownRenderer as p, buildCssVars as m, copyToClipboard as h, isSyntaxHighlightingAllowed as g, mergeClasses as _, restrainedSyntaxTheme as v, stripUrlQueryAndFragment as y } from "@epam/ai-dial-chat-shared";
4
4
  import { SidebarOrientation as b, SidebarPanel as x } from "@epam/ai-dial-sidebar";
5
5
  import { DIAL_ICON_SIZE as S, DIAL_KIT_ICON_STROKE as C, ElementSize as w, GhostIconButton as T, LinkButton as E, Spinner as D } from "@epam/ai-dial-ui-kit";
6
- import { IconAlertTriangle as O, IconArrowsMaximize as k, IconCheck as A, IconCode as ee, IconCopy as te, IconDownload as ne, IconEye as re, IconLock as ie, IconMarkdown as ae, IconRefresh as oe } from "@tabler/icons-react";
7
- import { createContext as j, lazy as M, memo as N, useCallback as P, useContext as se, useEffect as F, useMemo as I, useRef as L, useState as R } from "react";
8
- import { JsonView as z, defaultStyles as ce } from "react-json-view-lite";
9
- import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
10
- import { AppBridge as U, AppFrame as le } from "@mcp-ui/client";
11
- import { McpUiHostContextChangedNotificationSchema as ue } from "@modelcontextprotocol/ext-apps/app-bridge";
12
- import { VisualizerConnectorRequests as W } from "@epam/ai-dial-shared";
13
- import { VisualizerConnector as de } from "@epam/ai-dial-visualizer-connector";
6
+ import { IconAlertTriangle as O, IconArrowsMaximize as k, IconCheck as A, IconCode as j, IconCopy as ee, IconDownload as te, IconEye as M, IconLock as ne, IconMarkdown as re, IconRefresh as ie } from "@tabler/icons-react";
7
+ import { createContext as N, lazy as P, memo as F, useCallback as I, useContext as ae, useEffect as L, useMemo as R, useRef as z, useState as B } from "react";
8
+ import { JsonView as oe, defaultStyles as V } from "react-json-view-lite";
9
+ import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
10
+ import { AppBridge as G, AppFrame as K } from "@mcp-ui/client";
11
+ import { McpUiHostContextChangedNotificationSchema as se } from "@modelcontextprotocol/ext-apps/app-bridge";
12
+ import { VisualizerConnectorEvents as ce, VisualizerConnectorRequests as le } from "@epam/ai-dial-shared";
13
+ import { VisualizerConnector as ue } from "@epam/ai-dial-visualizer-connector";
14
14
  //#region src/constants/public-class-names.ts
15
- var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
15
+ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
16
16
  container: "_container_1nhig_1",
17
17
  containerLight: "_containerLight_1nhig_5"
18
- }, G = {
18
+ }, q = {
19
19
  [l.Dark]: v,
20
20
  [l.Light]: v
21
- }, me = () => M(async () => {
21
+ }, pe = () => P(async () => {
22
22
  let { Prism: e } = await import("react-syntax-highlighter");
23
23
  return { default: e };
24
- }), he = N(({ content: e, codeBlockTheme: t = l.Light, labels: n }) => {
25
- let { text: r, language: i } = e, a = I(() => g(r), [r]), o = i == null || i === "plaintext" || !a, c = G[t], u = t === l.Light, [d, f] = R(0), p = I(me, [d]), m = P(() => {
24
+ }), me = F(({ content: e, codeBlockTheme: t = l.Light, labels: n }) => {
25
+ let { text: r, language: i } = e, a = R(() => g(r), [r]), o = i == null || i === "plaintext" || !a, c = q[t], u = t === l.Light, [d, f] = B(0), p = R(pe, [d]), m = I(() => {
26
26
  f((e) => e + 1);
27
- }, []), h = /* @__PURE__ */ V("pre", {
27
+ }, []), h = /* @__PURE__ */ U("pre", {
28
28
  className: "whitespace-pre-wrap break-words p-4",
29
29
  children: r
30
30
  });
31
- return /* @__PURE__ */ V("div", {
31
+ return /* @__PURE__ */ U("div", {
32
32
  dir: "ltr",
33
- className: _("h-full overflow-auto", pe.container, u && pe.containerLight),
34
- children: o ? h : /* @__PURE__ */ V(s, {
33
+ className: _("h-full overflow-auto", fe.container, u && fe.containerLight),
34
+ children: o ? h : /* @__PURE__ */ U(s, {
35
35
  retryKey: d,
36
36
  onRetry: m,
37
37
  pendingContent: h,
38
38
  errorContent: h,
39
39
  labels: n,
40
- children: /* @__PURE__ */ V(p, {
40
+ children: /* @__PURE__ */ U(p, {
41
41
  language: i,
42
42
  style: c,
43
43
  customStyle: {
@@ -54,13 +54,21 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
54
54
  })
55
55
  })
56
56
  });
57
- }), ge = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, _e = N(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text" }) => {
58
- let { htmlFrameBlockedLabel: s = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: c = "Open in new tab" } = t, [l, u] = R(!0), [d, f] = R(!1), [p, m] = R(void 0), [h, g] = R(!1), [v, y] = R(!1), b = L(null);
59
- F(() => {
57
+ }), he = "dial-html-preview:render", ge = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, _e = F(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text" }) => {
58
+ let { htmlFrameBlockedLabel: s = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: c = "Open in new tab" } = t, [l, u] = B(!0), [d, f] = B(!1), [p, m] = B(void 0), [h, g] = B(!1), [v, y] = B(!1), b = z(null), x = z(null), S = z(!1), C = z({
59
+ content: e,
60
+ generation: 0
61
+ });
62
+ C.current.content !== e && (C.current = {
63
+ content: e,
64
+ generation: C.current.generation + 1
65
+ });
66
+ let w = C.current.generation;
67
+ L(() => {
60
68
  u(!0), f(!1), m(void 0), g(!1), y(!1);
61
69
  }, [e]);
62
- let x = L(n);
63
- x.current !== n && (x.current = n, n && v && y(!1)), F(() => {
70
+ let T = z(n);
71
+ T.current !== n && (T.current = n, n && v && y(!1), !n && S.current && (S.current = !1, u(!0))), L(() => {
64
72
  if (!n || e.srcdoc != null || e.resolveSourceText == null || p != null) return;
65
73
  let t = !1, r = e.resolveSourceText;
66
74
  return (async () => {
@@ -81,32 +89,45 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
81
89
  e,
82
90
  p
83
91
  ]);
84
- let S = e.isSameOriginUrl === !0 && e.url != null, C = !S && e.srcdoc != null, w = P((e) => {
85
- if (u(!1), !(C || S)) try {
92
+ let O = e.isSameOriginUrl === !0 && e.url != null, k = !O && e.srcdoc != null, A = k ? e.srcdocHostUrl : void 0, j = e.srcdoc, ee = I((e) => {
93
+ if (u(!1), A != null) {
94
+ let e = b.current?.contentWindow;
95
+ e != null && e !== x.current && j != null && (x.current = e, e.postMessage({
96
+ type: he,
97
+ html: j
98
+ }, "*"));
99
+ return;
100
+ }
101
+ if (!(k || O)) try {
86
102
  b.current?.contentDocument ?? f(!0);
87
103
  } catch {
88
104
  f(!0);
89
105
  }
90
- }, [C, S]), T = P(() => {
106
+ }, [
107
+ k,
108
+ O,
109
+ A,
110
+ j
111
+ ]), te = I(() => {
91
112
  u(!1), f(!0);
92
- }, []), O = e.srcdoc ?? p, k = e.srcdoc != null || e.resolveSourceText != null, A = e.srcdoc == null && e.resolveSourceText != null && p == null && !v;
93
- if (n && k && (O != null || h || A)) return O == null ? /* @__PURE__ */ V("div", {
113
+ }, []), M = e.srcdoc ?? p, ne = e.srcdoc != null || e.resolveSourceText != null, re = e.srcdoc == null && e.resolveSourceText != null && p == null && !v;
114
+ if (n && ne && (M != null || h || re)) return S.current = !0, M == null ? /* @__PURE__ */ U("div", {
94
115
  className: "flex h-full items-center justify-center",
95
- children: /* @__PURE__ */ V(D, {})
96
- }) : /* @__PURE__ */ V(he, {
116
+ children: /* @__PURE__ */ U(D, {})
117
+ }) : /* @__PURE__ */ U(me, {
97
118
  content: {
98
119
  type: i.Code,
99
- text: O,
120
+ text: M,
100
121
  language: "html"
101
122
  },
102
123
  codeBlockTheme: a
103
124
  });
104
- if (d) return /* @__PURE__ */ H("div", {
125
+ if (d) return /* @__PURE__ */ W("div", {
105
126
  className: "flex h-full flex-col items-center justify-center gap-3 p-4",
106
- children: [/* @__PURE__ */ V("p", {
127
+ children: [/* @__PURE__ */ U("p", {
107
128
  className: "text-center",
108
129
  children: s
109
- }), e.url != null && /* @__PURE__ */ V(E, {
130
+ }), e.url != null && /* @__PURE__ */ U(E, {
110
131
  href: e.url,
111
132
  target: "_blank",
112
133
  label: c,
@@ -114,22 +135,22 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
114
135
  textClassName: o
115
136
  })]
116
137
  });
117
- let ee = C ? void 0 : e.url, te = C ? e.srcdoc : void 0;
118
- return /* @__PURE__ */ H("div", {
138
+ let ie = k ? A : e.url, N = k && A == null ? e.srcdoc : void 0;
139
+ return /* @__PURE__ */ W("div", {
119
140
  className: "relative h-full",
120
- children: [l && /* @__PURE__ */ V("div", {
141
+ children: [l && /* @__PURE__ */ U("div", {
121
142
  className: "absolute inset-0 flex items-center justify-center",
122
- children: /* @__PURE__ */ V(D, {})
123
- }), /* @__PURE__ */ V("iframe", {
143
+ children: /* @__PURE__ */ U(D, {})
144
+ }), /* @__PURE__ */ U("iframe", {
124
145
  ref: b,
125
146
  title: r,
126
- src: ee,
127
- srcDoc: te,
128
- sandbox: C || S ? "allow-scripts" : "allow-scripts allow-same-origin",
147
+ src: ie,
148
+ srcDoc: N,
149
+ sandbox: k || O ? "allow-scripts" : "allow-scripts allow-same-origin",
129
150
  className: _("h-full w-full border-none", l ? "invisible" : ""),
130
- onLoad: w,
131
- onError: T
132
- })]
151
+ onLoad: ee,
152
+ onError: te
153
+ }, w)]
133
154
  });
134
155
  }), ve = {
135
156
  name: "MCP-UI Host",
@@ -156,12 +177,12 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
156
177
  let r = t;
157
178
  r != null && (r.width != null && (e.style.width = `${r.width}px`), r.maxWidth != null && (e.style.maxWidth = `${r.maxWidth}px`), r.height != null && (e.style.height = `${r.height}px`), r.maxHeight != null && (e.style.maxHeight = `${r.maxHeight}px`));
158
179
  }, Se = (e, t, n) => {
159
- let r = L(e);
160
- F(() => {
180
+ let r = z(e);
181
+ L(() => {
161
182
  r.current = e;
162
183
  });
163
- let [i, a] = R(null), [o, s] = R(!1);
164
- return F(() => {
184
+ let [i, a] = B(null), [o, s] = B(!1);
185
+ return L(() => {
165
186
  let e = null;
166
187
  try {
167
188
  let n = t.current?.getBoundingClientRect(), i = n != null && n.width > 0 && n.height > 0 ? {
@@ -171,13 +192,13 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
171
192
  height: Math.round(n.height)
172
193
  }
173
194
  } : r.current.hostContext;
174
- e = new U(null, r.current.hostInfo ?? ve, ye, { hostContext: i }), e.onopenlink = async ({ url: e }) => {
195
+ e = new G(null, r.current.hostInfo ?? ve, ye, { hostContext: i }), e.onopenlink = async ({ url: e }) => {
175
196
  let t = r.current.onOpenLink;
176
197
  return (t == null ? be(e) : t(e)) === !1 ? { isError: !0 } : {};
177
198
  }, e.onrequestdisplaymode = async ({ mode: e }) => {
178
199
  let t = r.current.onRequestDisplayMode, n = r.current.hostContext?.displayMode ?? "inline";
179
200
  return { mode: t?.(e) ?? n };
180
- }, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(ue, ({ params: e }) => {
201
+ }, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(se, ({ params: e }) => {
181
202
  let n = t.current?.querySelector("iframe");
182
203
  n != null && xe(n, e.containerDimensions, r.current.hostContext?.displayMode === "fullscreen");
183
204
  }), a(e);
@@ -187,13 +208,13 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
187
208
  return () => {
188
209
  e?.close().catch((e) => console.error("[useMcpAppBridge] Error closing AppBridge:", e));
189
210
  };
190
- }, [t]), F(() => {
211
+ }, [t]), L(() => {
191
212
  i != null && i.transport != null && n != null && i.setHostContext(n);
192
213
  }, [i, n]), {
193
214
  appBridge: i,
194
215
  hasFailed: o
195
216
  };
196
- }, K = {
217
+ }, J = {
197
218
  loadingOverlay: "_loadingOverlay_iea4a_2",
198
219
  fullscreenFrame: "_fullscreenFrame_iea4a_21",
199
220
  loadingFrame: "_loadingFrame_iea4a_29",
@@ -201,8 +222,8 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
201
222
  statusDetail: "_statusDetail_iea4a_38",
202
223
  errorIcon: "_errorIcon_iea4a_42"
203
224
  }, Ce = ({ content: e, errorLabel: t = "Failed to load app", onAppInfo: n }) => {
204
- let [r, i] = R("loading"), [a, o] = R(), { html: s, sandboxUrl: c, toolInput: l, toolResult: u, hostContext: d } = e, f = I(() => ({ url: new URL(c) }), [c]), p = d?.displayMode === "fullscreen", m = L(null), [h, g] = R();
205
- F(() => {
225
+ let [r, i] = B("loading"), [a, o] = B(), { html: s, sandboxUrl: c, toolInput: l, toolResult: u, hostContext: d } = e, f = R(() => ({ url: new URL(c) }), [c]), p = d?.displayMode === "fullscreen", m = z(null), [h, g] = B();
226
+ L(() => {
206
227
  let e = m.current;
207
228
  if (!e) return;
208
229
  let t = new ResizeObserver(([e]) => {
@@ -215,15 +236,15 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
215
236
  });
216
237
  return t.observe(e), () => t.disconnect();
217
238
  }, []);
218
- let { appBridge: v, hasFailed: y } = Se(e, m, I(() => d == null || h == null ? d : {
239
+ let { appBridge: v, hasFailed: y } = Se(e, m, R(() => d == null || h == null ? d : {
219
240
  ...d,
220
241
  containerDimensions: h
221
242
  }, [d, h])), b = y || r === "error";
222
- return /* @__PURE__ */ H("div", {
243
+ return /* @__PURE__ */ W("div", {
223
244
  ref: m,
224
- className: _("relative h-full min-h-[200px] w-full", p && K.fullscreenFrame, !p && r === "loading" && K.loadingFrame),
245
+ className: _("relative h-full min-h-[200px] w-full", p && J.fullscreenFrame, !p && r === "loading" && J.loadingFrame),
225
246
  children: [
226
- v != null && !b && /* @__PURE__ */ V(le, {
247
+ v != null && !b && /* @__PURE__ */ U(K, {
227
248
  html: s,
228
249
  sandbox: f,
229
250
  appBridge: v,
@@ -237,29 +258,29 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
237
258
  o(e.message), i("error");
238
259
  }
239
260
  }),
240
- !b && r === "loading" && /* @__PURE__ */ V("div", {
241
- className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", K.loadingOverlay),
242
- children: /* @__PURE__ */ V(D, {})
261
+ !b && r === "loading" && /* @__PURE__ */ U("div", {
262
+ className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", J.loadingOverlay),
263
+ children: /* @__PURE__ */ U(D, {})
243
264
  }),
244
- b && /* @__PURE__ */ H("div", {
265
+ b && /* @__PURE__ */ W("div", {
245
266
  className: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4",
246
- children: [/* @__PURE__ */ V(O, {
267
+ children: [/* @__PURE__ */ U(O, {
247
268
  size: 60,
248
269
  stroke: C,
249
270
  "aria-hidden": !0,
250
- className: K.errorIcon
251
- }), /* @__PURE__ */ H("p", {
271
+ className: J.errorIcon
272
+ }), /* @__PURE__ */ W("p", {
252
273
  role: "alert",
253
- className: _("text-center", K.statusLabel),
254
- children: [t, a && /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ V("br", {}), /* @__PURE__ */ V("span", {
255
- className: K.statusDetail,
274
+ className: _("text-center", J.statusLabel),
275
+ children: [t, a && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("br", {}), /* @__PURE__ */ U("span", {
276
+ className: J.statusDetail,
256
277
  children: a
257
278
  })] })]
258
279
  })]
259
280
  })
260
281
  ]
261
282
  });
262
- }, q = {
283
+ }, Y = {
263
284
  viewer: "_viewer_1w97n_2",
264
285
  spreadsheetCanvas: "_spreadsheetCanvas_1w97n_6",
265
286
  formulaPanel: "_formulaPanel_1w97n_12",
@@ -295,7 +316,7 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
295
316
  }
296
317
  case r.Csv: {
297
318
  let { XlsxSheetViewer: t } = await import("@silurus/ooxml/xlsx"), r = document.createElement("canvas");
298
- r.className = q.spreadsheetCanvas, e.replaceChildren(r);
319
+ r.className = Y.spreadsheetCanvas, e.replaceChildren(r);
299
320
  let i = new t(r, {
300
321
  showScrollbars: !0,
301
322
  onError: n
@@ -387,10 +408,10 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
387
408
  }
388
409
  }
389
410
  }, De = class extends Error {}, Oe = ({ content: t, fileName: n, loadErrorLabel: i, formulaLabel: a, formulaLabelClassName: o, highlightsLabel: s = "Cited locations", highlightNavigatedLabel: c = "Scrolled to the cited location" }) => {
390
- let l = L(null), [u, d] = R(!0), [f, p] = R(!1), [m, h] = R(""), [g, v] = R([]), [y, b] = R(!1), { highlights: x, selectedHighlightId: S } = t, w = x != null && x.length > 0, T = L(void 0), E = L(x);
411
+ let l = z(null), [u, d] = B(!0), [f, p] = B(!1), [m, h] = B(""), [g, v] = B([]), [y, b] = B(!1), { highlights: x, selectedHighlightId: S } = t, w = x != null && x.length > 0, T = z(void 0), E = z(x);
391
412
  E.current = x;
392
- let k = L(void 0);
393
- return F(() => {
413
+ let k = z(void 0);
414
+ return L(() => {
394
415
  let e = l.current;
395
416
  if (e == null) return;
396
417
  let n, r, i = !1, a, o = () => i;
@@ -451,9 +472,9 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
451
472
  t.format,
452
473
  t.url,
453
474
  w
454
- ]), F(() => {
475
+ ]), L(() => {
455
476
  k.current?.();
456
- }, [x]), F(() => {
477
+ }, [x]), L(() => {
457
478
  b(!1);
458
479
  let t = T.current;
459
480
  if (t == null || u) return;
@@ -471,38 +492,38 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
471
492
  })(), () => {
472
493
  r = !0;
473
494
  };
474
- }, [S, u]), /* @__PURE__ */ H("div", {
495
+ }, [S, u]), /* @__PURE__ */ W("div", {
475
496
  className: "relative flex h-full w-full min-w-0 flex-col overflow-hidden",
476
497
  children: [
477
- t.format === r.Xlsx && /* @__PURE__ */ H("div", {
498
+ t.format === r.Xlsx && /* @__PURE__ */ W("div", {
478
499
  role: "region",
479
500
  "aria-label": a,
480
- className: _("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", q.formulaPanel),
481
- children: [/* @__PURE__ */ V("span", {
501
+ className: _("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", Y.formulaPanel),
502
+ children: [/* @__PURE__ */ U("span", {
482
503
  "aria-hidden": "true",
483
504
  className: _("shrink-0", o),
484
505
  children: "fx"
485
- }), /* @__PURE__ */ V("code", {
506
+ }), /* @__PURE__ */ U("code", {
486
507
  dir: "ltr",
487
508
  tabIndex: 0,
488
509
  "aria-live": "polite",
489
- className: _("h-8 min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded border px-2 py-1 text-sm focus-visible:outline focus-visible:outline-focus", q.formulaValue),
510
+ className: _("h-8 min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded border px-2 py-1 text-sm focus-visible:outline focus-visible:outline-focus", Y.formulaValue),
490
511
  children: m
491
512
  })]
492
513
  }),
493
- /* @__PURE__ */ H("div", {
514
+ /* @__PURE__ */ W("div", {
494
515
  className: "relative min-h-0 w-full flex-1",
495
- children: [/* @__PURE__ */ V("div", {
516
+ children: [/* @__PURE__ */ U("div", {
496
517
  ref: l,
497
518
  role: "document",
498
519
  "aria-label": n,
499
520
  "aria-busy": u,
500
- className: _("h-full w-full overflow-hidden", q.viewer)
501
- }), g.length > 0 && /* @__PURE__ */ V("div", {
521
+ className: _("h-full w-full overflow-hidden", Y.viewer)
522
+ }), g.length > 0 && /* @__PURE__ */ U("div", {
502
523
  role: "region",
503
524
  "aria-label": s,
504
525
  className: "pointer-events-none absolute inset-0 overflow-hidden",
505
- children: g.map((e, t) => /* @__PURE__ */ V("div", {
526
+ children: g.map((e, t) => /* @__PURE__ */ U("div", {
506
527
  "aria-hidden": "true",
507
528
  style: {
508
529
  left: `${e.left}px`,
@@ -512,28 +533,28 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
512
533
  },
513
534
  "data-selected": e.highlightId === S,
514
535
  "data-clipped": e.isClippedAtEnd === !0,
515
- className: _("absolute", q.highlight)
536
+ className: _("absolute", Y.highlight)
516
537
  }, `${e.highlightId}-${t}`))
517
538
  })]
518
539
  }),
519
- /* @__PURE__ */ V("div", {
540
+ /* @__PURE__ */ U("div", {
520
541
  role: "status",
521
542
  "aria-live": "polite",
522
543
  className: "sr-only",
523
544
  children: y ? c : ""
524
545
  }),
525
- (u || f) && /* @__PURE__ */ V("div", {
546
+ (u || f) && /* @__PURE__ */ U("div", {
526
547
  role: f ? "alert" : void 0,
527
548
  "aria-live": "polite",
528
- className: _("absolute inset-0 flex items-center justify-center", q.statusOverlay),
529
- children: u ? /* @__PURE__ */ V(D, { size: 48 }) : /* @__PURE__ */ H("div", {
549
+ className: _("absolute inset-0 flex items-center justify-center", Y.statusOverlay),
550
+ children: u ? /* @__PURE__ */ U(D, { size: 48 }) : /* @__PURE__ */ W("div", {
530
551
  className: "flex flex-col items-center gap-2",
531
- children: [/* @__PURE__ */ V(O, {
552
+ children: [/* @__PURE__ */ U(O, {
532
553
  "aria-hidden": "true",
533
554
  size: 60,
534
555
  stroke: C,
535
- className: q.errorIcon
536
- }), /* @__PURE__ */ V("p", {
556
+ className: Y.errorIcon
557
+ }), /* @__PURE__ */ U("p", {
537
558
  className: "text-center",
538
559
  children: i
539
560
  })]
@@ -541,26 +562,52 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
541
562
  })
542
563
  ]
543
564
  });
544
- }, ke = {
565
+ }, ke = (e, t) => {
566
+ let n = e.toLowerCase();
567
+ return t.find((e) => e.contentType.split(",").some((e) => e.trim().toLowerCase() === n && e.trim() !== ""));
568
+ }, Ae = (e, t) => {
569
+ if (!(e == null || e === "")) return Object.prototype.hasOwnProperty.call(t, e) ? t[e] : void 0;
570
+ }, je = (e) => `${e}:grouped-visualizer`, Me = (e, t) => {
571
+ let n = (t.contentType ?? "").split(",").map((e) => e.trim().toLowerCase()).filter((e) => e !== ""), r = [], i = [];
572
+ return e.forEach((e) => {
573
+ if (e.url != null && e.url !== "" && (n.length === 0 || n.includes(e.contentType.toLowerCase()))) {
574
+ r.push(e);
575
+ return;
576
+ }
577
+ i.push(e);
578
+ }), {
579
+ claimed: r,
580
+ unclaimed: i
581
+ };
582
+ }, Ne = (e) => {
583
+ if (typeof e != "object" || !e || !Object.prototype.hasOwnProperty.call(e, "message")) return;
584
+ let { message: t } = e;
585
+ return typeof t == "string" && t.trim() !== "" ? t : void 0;
586
+ }, Pe = {
545
587
  loadingOverlay: "_loadingOverlay_12637_1",
546
588
  statusLabel: "_statusLabel_12637_5",
547
589
  errorIcon: "_errorIcon_12637_9"
548
- }, Ae = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a }) => {
549
- let o = L(null), [s, c] = R("loading"), { url: l, visualizerName: u, requestTimeout: d } = e, f = L(e);
550
- return f.current = e, F(() => {
551
- let e = o.current;
590
+ }, Fe = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a, onSendMessage: o }) => {
591
+ let s = z(null), [c, l] = B("loading"), { url: u, visualizerName: d, requestTimeout: f } = e, p = z(e);
592
+ p.current = e;
593
+ let h = z(o);
594
+ return h.current = o, L(() => {
595
+ let e = s.current;
552
596
  if (!e) return;
553
- c("loading");
554
- let t = new de(e, {
555
- domain: l,
597
+ l("loading");
598
+ let t = new ue(e, {
599
+ domain: u,
556
600
  hostDomain: window.location.origin,
557
- visualizerName: u,
558
- requestTimeout: d
559
- }), n = !0;
601
+ visualizerName: d,
602
+ requestTimeout: f
603
+ }), n = !0, r = t.subscribe(`${d}/${ce.sendMessage}`, (e) => {
604
+ let t = Ne(e);
605
+ t != null && h.current?.(t);
606
+ });
560
607
  return (async () => {
561
608
  if (await t.ready(), !n) return;
562
- let e = f.current;
563
- if (e.type === i.GroupedVisualizer) await t.send(W.sendGroupedVisualizeData, {
609
+ let e = p.current;
610
+ if (e.type === i.GroupedVisualizer) await t.send(le.sendGroupedVisualizeData, {
564
611
  attachments: e.attachments,
565
612
  layout: e.layout
566
613
  });
@@ -569,30 +616,30 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
569
616
  layout: r,
570
617
  ...typeof i == "object" && i ? i : {}
571
618
  };
572
- await t.send(W.sendVisualizeData, {
619
+ await t.send(le.sendVisualizeData, {
573
620
  mimeType: n,
574
621
  visualizerData: a
575
622
  });
576
623
  }
577
- n && c("ready");
624
+ n && l("ready");
578
625
  })().catch(() => {
579
- n && c("error");
626
+ n && l("error");
580
627
  }), () => {
581
- n = !1, t.destroy();
628
+ n = !1, r(), t.destroy();
582
629
  };
583
630
  }, [
584
- l,
585
631
  u,
586
- d
587
- ]), F(() => {
588
- let e = r ?? u.trim();
589
- e !== "" && o.current?.querySelector("iframe")?.setAttribute("title", e);
632
+ d,
633
+ f
634
+ ]), L(() => {
635
+ let e = r ?? d.trim();
636
+ e !== "" && s.current?.querySelector("iframe")?.setAttribute("title", e);
590
637
  }, [
591
638
  r,
639
+ d,
592
640
  u,
593
- l,
594
- d
595
- ]), /* @__PURE__ */ H("div", {
641
+ f
642
+ ]), /* @__PURE__ */ W("div", {
596
643
  className: "relative h-full w-full",
597
644
  style: m({
598
645
  "--vs-loading-bg": a?.loadingBackground,
@@ -600,33 +647,33 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
600
647
  "--vs-error-icon": a?.errorIcon
601
648
  }),
602
649
  children: [
603
- /* @__PURE__ */ V("div", {
604
- ref: o,
650
+ /* @__PURE__ */ U("div", {
651
+ ref: s,
605
652
  className: "h-full w-full"
606
653
  }),
607
- s === "loading" && /* @__PURE__ */ H("div", {
608
- className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", ke.loadingOverlay),
609
- children: [/* @__PURE__ */ V(D, {}), t && /* @__PURE__ */ V("p", {
610
- className: _("text-center", ke.statusLabel),
654
+ c === "loading" && /* @__PURE__ */ W("div", {
655
+ className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", Pe.loadingOverlay),
656
+ children: [/* @__PURE__ */ U(D, {}), t && /* @__PURE__ */ U("p", {
657
+ className: _("text-center", Pe.statusLabel),
611
658
  children: t
612
659
  })]
613
660
  }),
614
- s === "error" && /* @__PURE__ */ H("div", {
661
+ c === "error" && /* @__PURE__ */ W("div", {
615
662
  className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
616
- children: [/* @__PURE__ */ V(O, {
663
+ children: [/* @__PURE__ */ U(O, {
617
664
  size: 60,
618
665
  stroke: C,
619
666
  "aria-hidden": !0,
620
- className: ke.errorIcon
621
- }), /* @__PURE__ */ V("p", {
667
+ className: Pe.errorIcon
668
+ }), /* @__PURE__ */ U("p", {
622
669
  role: "alert",
623
- className: _("text-center", ke.statusLabel),
670
+ className: _("text-center", Pe.statusLabel),
624
671
  children: n
625
672
  })]
626
673
  })
627
674
  ]
628
675
  });
629
- }, J = {
676
+ }, X = {
630
677
  body: "_body_13ogb_4",
631
678
  statusLabel: "_statusLabel_13ogb_13",
632
679
  errorIcon: "_errorIcon_13ogb_17",
@@ -641,66 +688,66 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
641
688
  jsonExpandIcon: "_jsonExpandIcon_13ogb_54",
642
689
  jsonCollapseIcon: "_jsonCollapseIcon_13ogb_67",
643
690
  jsonCollapsedContent: "_jsonCollapsedContent_13ogb_84"
644
- }, je = () => M(async () => ({ default: (await import("./PdfContent-BoAtghsO.js")).PdfContent })), Me = ({ url: e, fileName: t, loadErrorLabel: n }) => {
645
- let [r, i] = R(!1);
646
- return F(() => {
691
+ }, Ie = () => P(async () => ({ default: (await import("./PdfContent-BoAtghsO.js")).PdfContent })), Le = ({ url: e, fileName: t, loadErrorLabel: n }) => {
692
+ let [r, i] = B(!1);
693
+ return L(() => {
647
694
  i(!1);
648
- }, [e]), r ? /* @__PURE__ */ H("div", {
695
+ }, [e]), r ? /* @__PURE__ */ W("div", {
649
696
  className: "flex flex-col items-center gap-2",
650
- children: [/* @__PURE__ */ V(O, {
697
+ children: [/* @__PURE__ */ U(O, {
651
698
  size: 60,
652
699
  stroke: C,
653
- className: J.errorIcon
654
- }), /* @__PURE__ */ V("p", {
655
- className: _("text-center", J.statusLabel),
700
+ className: X.errorIcon
701
+ }), /* @__PURE__ */ U("p", {
702
+ className: _("text-center", X.statusLabel),
656
703
  children: n
657
704
  })]
658
- }) : /* @__PURE__ */ V("img", {
705
+ }) : /* @__PURE__ */ U("img", {
659
706
  src: e,
660
707
  alt: t ?? "",
661
708
  className: "max-h-full max-w-full object-contain",
662
709
  onError: () => i(!0)
663
710
  });
664
- }, Ne = new Set([
711
+ }, Re = new Set([
665
712
  i.PlainText,
666
713
  i.Code,
667
714
  i.Ooxml
668
- ]), Pe = N(({ content: e, isLoading: t = !1, fileName: r, isHtmlSourceView: a = !1, labels: { unsupportedLabel: o = "Preview is not supported for this file", loadErrorLabel: c = "Failed to load file", forbiddenErrorLabel: l = "You don't have permission to access this file", visualizerErrorLabel: d, htmlFrameBlockedLabel: f = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: h = "Open in new tab", pdfThumbnailsLabel: g, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: S, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: E, codeContentErrorLabel: k, codeContentRetryLabel: A, tableCopyLabel: ee, tableCopiedLabel: te, tableDownloadCsvLabel: ne, ooxmlHighlightsLabel: re, ooxmlHighlightNavigatedLabel: ae } = {}, styles: oe, codeBlockTheme: j, tableDownloadFilename: M, loadPdf: N, hidePdfToolbar: se = !1, configurePdfWorker: F, onAppInfo: L }) => {
669
- let { colors: B, typography: U, bodyClassName: le, cssVars: ue } = oe ?? {}, [W, de] = R(0), fe = I(je, [W]), pe = P(() => {
670
- de((e) => e + 1);
671
- }, []), G = U?.fontClassName != null, me = I(() => ({
715
+ ]), ze = F(({ content: e, isLoading: t = !1, fileName: r, isHtmlSourceView: a = !1, labels: { unsupportedLabel: o = "Preview is not supported for this file", loadErrorLabel: c = "Failed to load file", forbiddenErrorLabel: l = "You don't have permission to access this file", visualizerErrorLabel: d, htmlFrameBlockedLabel: f = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: h = "Open in new tab", pdfThumbnailsLabel: g, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: S, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: E, codeContentErrorLabel: k, codeContentRetryLabel: A, tableCopyLabel: j, tableCopiedLabel: ee, tableDownloadCsvLabel: te, ooxmlHighlightsLabel: M, ooxmlHighlightNavigatedLabel: re } = {}, styles: ie, codeBlockTheme: N, tableDownloadFilename: P, loadPdf: F, hidePdfToolbar: ae = !1, configurePdfWorker: L, onAppInfo: z, onVisualizerSendMessage: H }) => {
716
+ let { colors: G, typography: K, bodyClassName: se, cssVars: ce } = ie ?? {}, [le, ue] = B(0), de = R(Ie, [le]), fe = I(() => {
717
+ ue((e) => e + 1);
718
+ }, []), q = K?.fontClassName != null, pe = R(() => ({
672
719
  ...m({
673
- "--ac-text": B?.text,
674
- "--ac-status-text": B?.statusText,
675
- "--ac-error-icon": B?.errorIcon,
676
- "--ac-open-in-new-tab-text": B?.openInNewTabText,
677
- "--ac-json-border": B?.jsonBorder,
678
- "--ac-json-bg": B?.jsonBackground,
679
- "--ac-json-label": B?.jsonLabel,
680
- "--ac-json-clickable-label": B?.jsonClickableLabel,
681
- "--ac-json-punctuation": B?.jsonPunctuation,
682
- "--ac-json-string": B?.jsonString,
683
- "--ac-json-number": B?.jsonNumber,
684
- "--ac-json-boolean": B?.jsonBoolean,
685
- "--ac-json-null": B?.jsonNull,
686
- "--ac-json-toggle-icon": B?.jsonToggleIcon,
687
- "--ac-json-toggle-icon-hover": B?.jsonToggleIconHover,
688
- "--ac-ooxml-bg": B?.ooxmlBackground,
689
- "--ac-ooxml-formula-border": B?.ooxmlFormulaBorder,
690
- "--ac-ooxml-formula-bg": B?.ooxmlFormulaBackground,
691
- "--ac-ooxml-formula-text": B?.ooxmlFormulaText,
692
- "--ac-ooxml-highlight-border": B?.ooxmlHighlightBorder,
693
- "--ac-ooxml-highlight-bg": B?.ooxmlHighlightBackground,
694
- "--ac-json-collapsed-text": B?.jsonCollapsedText,
695
- "--ac-json-collapsed-bg": B?.jsonCollapsedBackground,
696
- "--ac-font-family": G ? void 0 : U?.fontFamily,
697
- "--ac-font-size": G ? void 0 : U?.fontSize,
698
- "--ac-font-weight": G ? void 0 : U?.fontWeight,
699
- "--ac-line-height": G ? void 0 : U?.lineHeight,
700
- "--ac-letter-spacing": G ? void 0 : U?.letterSpacing
720
+ "--ac-text": G?.text,
721
+ "--ac-status-text": G?.statusText,
722
+ "--ac-error-icon": G?.errorIcon,
723
+ "--ac-open-in-new-tab-text": G?.openInNewTabText,
724
+ "--ac-json-border": G?.jsonBorder,
725
+ "--ac-json-bg": G?.jsonBackground,
726
+ "--ac-json-label": G?.jsonLabel,
727
+ "--ac-json-clickable-label": G?.jsonClickableLabel,
728
+ "--ac-json-punctuation": G?.jsonPunctuation,
729
+ "--ac-json-string": G?.jsonString,
730
+ "--ac-json-number": G?.jsonNumber,
731
+ "--ac-json-boolean": G?.jsonBoolean,
732
+ "--ac-json-null": G?.jsonNull,
733
+ "--ac-json-toggle-icon": G?.jsonToggleIcon,
734
+ "--ac-json-toggle-icon-hover": G?.jsonToggleIconHover,
735
+ "--ac-ooxml-bg": G?.ooxmlBackground,
736
+ "--ac-ooxml-formula-border": G?.ooxmlFormulaBorder,
737
+ "--ac-ooxml-formula-bg": G?.ooxmlFormulaBackground,
738
+ "--ac-ooxml-formula-text": G?.ooxmlFormulaText,
739
+ "--ac-ooxml-highlight-border": G?.ooxmlHighlightBorder,
740
+ "--ac-ooxml-highlight-bg": G?.ooxmlHighlightBackground,
741
+ "--ac-json-collapsed-text": G?.jsonCollapsedText,
742
+ "--ac-json-collapsed-bg": G?.jsonCollapsedBackground,
743
+ "--ac-font-family": q ? void 0 : K?.fontFamily,
744
+ "--ac-font-size": q ? void 0 : K?.fontSize,
745
+ "--ac-font-weight": q ? void 0 : K?.fontWeight,
746
+ "--ac-line-height": q ? void 0 : K?.lineHeight,
747
+ "--ac-letter-spacing": q ? void 0 : K?.letterSpacing
701
748
  }),
702
- ...ue
703
- }), [oe]), ge = I(() => {
749
+ ...ce
750
+ }), [ie]), he = R(() => {
704
751
  switch (e.type) {
705
752
  case i.Image:
706
753
  case i.Audio:
@@ -718,39 +765,39 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
718
765
  case i.MarkdownTable: return "flex h-full min-h-0 flex-col overflow-hidden p-4";
719
766
  default: return "h-full overflow-auto p-4";
720
767
  }
721
- }, [e.type]), ve = I(() => {
768
+ }, [e.type]), ge = R(() => {
722
769
  switch (e.type) {
723
- case i.PlainText: return /* @__PURE__ */ V("pre", {
724
- className: _("whitespace-pre-wrap break-words", J.body, U?.fontClassName),
770
+ case i.PlainText: return /* @__PURE__ */ U("pre", {
771
+ className: _("whitespace-pre-wrap break-words", X.body, K?.fontClassName),
725
772
  children: e.text
726
773
  });
727
- case i.Image: return /* @__PURE__ */ V(Me, {
774
+ case i.Image: return /* @__PURE__ */ U(Le, {
728
775
  url: e.url,
729
776
  fileName: r,
730
777
  loadErrorLabel: c
731
778
  });
732
- case i.Audio: return /* @__PURE__ */ V("audio", {
779
+ case i.Audio: return /* @__PURE__ */ U("audio", {
733
780
  controls: !0,
734
781
  controlsList: "nodownload",
735
782
  src: e.url,
736
783
  "aria-label": r ?? "Audio attachment",
737
784
  className: "w-full max-w-sm",
738
785
  preload: "metadata",
739
- children: e.mimeType && /* @__PURE__ */ V("source", {
786
+ children: e.mimeType && /* @__PURE__ */ U("source", {
740
787
  src: e.url,
741
788
  type: e.mimeType
742
789
  })
743
790
  });
744
- case i.Markdown: return /* @__PURE__ */ V(p, {
791
+ case i.Markdown: return /* @__PURE__ */ U(p, {
745
792
  content: e.text,
746
793
  isStreaming: !1,
747
- codeBlockTheme: j,
794
+ codeBlockTheme: N,
748
795
  classNames: u
749
796
  });
750
- case i.MarkdownTable: return /* @__PURE__ */ V(p, {
797
+ case i.MarkdownTable: return /* @__PURE__ */ U(p, {
751
798
  content: e.text,
752
799
  isStreaming: !1,
753
- codeBlockTheme: j,
800
+ codeBlockTheme: N,
754
801
  containerClassName: "flex h-full min-h-0 flex-col",
755
802
  classNames: {
756
803
  ...u,
@@ -758,49 +805,49 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
758
805
  tableScrollContainer: "max-h-full"
759
806
  },
760
807
  tableActionLabels: {
761
- copyLabel: ee,
762
- copiedLabel: te,
763
- downloadCsvLabel: ne
808
+ copyLabel: j,
809
+ copiedLabel: ee,
810
+ downloadCsvLabel: te
764
811
  },
765
- tableDownloadFilename: M
812
+ tableDownloadFilename: P
766
813
  });
767
- case i.Json: return /* @__PURE__ */ V("div", {
814
+ case i.Json: return /* @__PURE__ */ U("div", {
768
815
  dir: "ltr",
769
816
  className: "h-full overflow-auto",
770
- children: /* @__PURE__ */ V("div", {
771
- className: _("m-3 overflow-auto rounded-md border", J.jsonWrapper),
772
- children: /* @__PURE__ */ V(z, {
817
+ children: /* @__PURE__ */ U("div", {
818
+ className: _("m-3 overflow-auto rounded-md border", X.jsonWrapper),
819
+ children: /* @__PURE__ */ U(oe, {
773
820
  data: e.value,
774
821
  style: {
775
- container: _("whitespace-pre-wrap break-words p-2", U?.jsonClassName ?? "dial-code-text"),
776
- basicChildStyle: ce.basicChildStyle,
822
+ container: _("whitespace-pre-wrap break-words p-2", K?.jsonClassName ?? "dial-code-text"),
823
+ basicChildStyle: V.basicChildStyle,
777
824
  childFieldsContainer: "m-0 ps-3",
778
- label: _("me-1 font-semibold", J.jsonLabel),
779
- clickableLabel: _("me-1 cursor-pointer font-semibold hover:underline", J.jsonClickableLabel),
780
- nullValue: _("italic", J.jsonNullValue),
781
- undefinedValue: _("italic", J.jsonNullValue),
782
- stringValue: J.jsonStringValue,
783
- booleanValue: J.jsonBooleanValue,
784
- numberValue: J.jsonNumberValue,
785
- otherValue: _("italic", J.jsonNullValue),
786
- punctuation: _("me-1", J.jsonPunctuation),
787
- collapseIcon: _("me-1 cursor-pointer select-none transition-colors", J.jsonCollapseIcon),
788
- expandIcon: _("me-1 cursor-pointer select-none transition-colors", J.jsonExpandIcon),
789
- collapsedContent: _("me-1 cursor-pointer rounded px-1", J.jsonCollapsedContent)
825
+ label: _("me-1 font-semibold", X.jsonLabel),
826
+ clickableLabel: _("me-1 cursor-pointer font-semibold hover:underline", X.jsonClickableLabel),
827
+ nullValue: _("italic", X.jsonNullValue),
828
+ undefinedValue: _("italic", X.jsonNullValue),
829
+ stringValue: X.jsonStringValue,
830
+ booleanValue: X.jsonBooleanValue,
831
+ numberValue: X.jsonNumberValue,
832
+ otherValue: _("italic", X.jsonNullValue),
833
+ punctuation: _("me-1", X.jsonPunctuation),
834
+ collapseIcon: _("me-1 cursor-pointer select-none transition-colors", X.jsonCollapseIcon),
835
+ expandIcon: _("me-1 cursor-pointer select-none transition-colors", X.jsonExpandIcon),
836
+ collapsedContent: _("me-1 cursor-pointer rounded px-1", X.jsonCollapsedContent)
790
837
  }
791
838
  })
792
839
  })
793
840
  });
794
- case i.Code: return /* @__PURE__ */ V(he, {
841
+ case i.Code: return /* @__PURE__ */ U(me, {
795
842
  content: e,
796
- codeBlockTheme: j,
843
+ codeBlockTheme: N,
797
844
  labels: {
798
845
  loadingLabel: E,
799
846
  errorLabel: k,
800
847
  retryLabel: A
801
848
  }
802
849
  });
803
- case i.Html: return /* @__PURE__ */ V(_e, {
850
+ case i.Html: return /* @__PURE__ */ U(_e, {
804
851
  content: e,
805
852
  labels: {
806
853
  htmlFrameBlockedLabel: f,
@@ -808,25 +855,25 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
808
855
  },
809
856
  isSourceView: a,
810
857
  title: r,
811
- codeBlockTheme: j
858
+ codeBlockTheme: N
812
859
  });
813
- case i.Pdf: return /* @__PURE__ */ V(s, {
814
- retryKey: W,
815
- onRetry: pe,
860
+ case i.Pdf: return /* @__PURE__ */ U(s, {
861
+ retryKey: le,
862
+ onRetry: fe,
816
863
  labels: {
817
864
  loadingLabel: x,
818
865
  errorLabel: S,
819
866
  retryLabel: w
820
867
  },
821
- children: /* @__PURE__ */ V(fe, {
868
+ children: /* @__PURE__ */ U(de, {
822
869
  fileName: r,
823
870
  url: e.url,
824
871
  highlights: e.highlights ?? [],
825
872
  selectedHighlightId: e.selectedHighlightId,
826
873
  selectedPageNumber: e.page,
827
- loadPdf: N,
828
- hideHeader: se,
829
- configurePdfWorker: F,
874
+ loadPdf: F,
875
+ hideHeader: ae,
876
+ configurePdfWorker: L,
830
877
  labels: {
831
878
  thumbnailsLabel: g,
832
879
  showThumbnailsLabel: v,
@@ -838,38 +885,39 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
838
885
  }
839
886
  })
840
887
  }, e.url);
841
- case i.Ooxml: return /* @__PURE__ */ V(Oe, {
888
+ case i.Ooxml: return /* @__PURE__ */ U(Oe, {
842
889
  content: e,
843
890
  fileName: r,
844
891
  loadErrorLabel: c,
845
892
  formulaLabel: T,
846
- formulaLabelClassName: U?.xlsxFormulaLabelClassName ?? "dial-italic-text",
847
- highlightsLabel: re,
848
- highlightNavigatedLabel: ae
893
+ formulaLabelClassName: K?.xlsxFormulaLabelClassName ?? "dial-italic-text",
894
+ highlightsLabel: M,
895
+ highlightNavigatedLabel: re
849
896
  });
850
897
  case i.Visualizer:
851
- case i.GroupedVisualizer: return /* @__PURE__ */ V(Ae, {
898
+ case i.GroupedVisualizer: return /* @__PURE__ */ U(Fe, {
852
899
  content: e,
853
- errorLabel: d
900
+ errorLabel: d,
901
+ onSendMessage: H
854
902
  });
855
- case i.McpApp: return /* @__PURE__ */ V(Ce, {
903
+ case i.McpApp: return /* @__PURE__ */ U(Ce, {
856
904
  content: e,
857
- onAppInfo: L
905
+ onAppInfo: z
858
906
  });
859
- case i.Unsupported: return /* @__PURE__ */ V("p", {
860
- className: _("text-center", J.statusLabel),
907
+ case i.Unsupported: return /* @__PURE__ */ U("p", {
908
+ className: _("text-center", X.statusLabel),
861
909
  children: o
862
910
  });
863
911
  case i.Error: {
864
912
  let t = e.errorType === n.Forbidden;
865
- return /* @__PURE__ */ H("div", {
913
+ return /* @__PURE__ */ W("div", {
866
914
  className: "flex flex-col items-center gap-2",
867
- children: [V(t ? ie : O, {
915
+ children: [U(t ? ne : O, {
868
916
  size: 60,
869
917
  stroke: C,
870
- className: J.errorIcon
871
- }), /* @__PURE__ */ V("p", {
872
- className: _("text-center", J.statusLabel),
918
+ className: X.errorIcon
919
+ }), /* @__PURE__ */ U("p", {
920
+ className: _("text-center", X.statusLabel),
873
921
  children: t ? l : c
874
922
  })]
875
923
  });
@@ -877,23 +925,24 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
877
925
  }
878
926
  }, [
879
927
  e,
880
- U?.fontClassName,
881
- U?.jsonClassName,
882
- U?.xlsxFormulaLabelClassName,
928
+ K?.fontClassName,
929
+ K?.jsonClassName,
930
+ K?.xlsxFormulaLabelClassName,
883
931
  r,
884
- j,
932
+ N,
885
933
  o,
886
934
  c,
887
935
  l,
888
936
  d,
937
+ H,
889
938
  f,
890
939
  h,
891
940
  a,
892
- M,
893
- N,
894
- se,
941
+ P,
895
942
  F,
943
+ ae,
896
944
  L,
945
+ z,
897
946
  g,
898
947
  v,
899
948
  y,
@@ -905,216 +954,217 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
905
954
  E,
906
955
  k,
907
956
  A,
957
+ de,
958
+ le,
908
959
  fe,
909
- W,
910
- pe,
960
+ j,
911
961
  ee,
912
962
  te,
913
- ne,
914
- re,
915
- ae
963
+ M,
964
+ re
916
965
  ]);
917
- return /* @__PURE__ */ V("div", {
918
- style: !t && Ne.has(e.type) ? me : void 0,
919
- className: _(t ? "flex h-full items-center justify-center" : ge, le),
920
- children: t ? /* @__PURE__ */ V(D, {}) : ve
966
+ return /* @__PURE__ */ U("div", {
967
+ style: !t && Re.has(e.type) ? pe : void 0,
968
+ className: _(t ? "flex h-full items-center justify-center" : he, se),
969
+ children: t ? /* @__PURE__ */ U(D, {}) : ge
921
970
  });
922
- }), Fe = {
971
+ }), Be = {
923
972
  mcpAppDivider: "_mcpAppDivider_1jh5p_1",
924
973
  mcpAppVersion: "_mcpAppVersion_1jh5p_5"
925
- }, Ie = 2e3, Le = N(({ isOpen: e, isLoading: t = !1, onClose: n, content: r, fileName: a, leftActions: s, labels: { ariaLabel: c, closeLabel: l = "Close", resizeLabel: u = "Resize panel", downloadLabel: d = "Download", copyTextLabel: f = "Copy text", copiedTextLabel: p = "Copied!", copyMarkdownLabel: h = "Copy as Markdown", copiedMarkdownLabel: g = "Copied!", copyJsonLabel: v = "Copy as JSON", copiedJsonLabel: y = "Copied!", visualizerErrorLabel: w, unsupportedLabel: E = "Preview is not supported for this file", loadErrorLabel: D = "Failed to load file", forbiddenErrorLabel: O = "You don't have permission to access this file", htmlFrameBlockedLabel: k = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: ie = "Open in new tab", htmlViewSourceLabel: j = "View source", htmlViewRenderedLabel: M = "View rendered", mcpAppReloadLabel: N = "Reload", pdfThumbnailsLabel: se, pdfShowThumbnailsLabel: z, pdfHideThumbnailsLabel: ce, pdfPageNumberLabel: U, pdfContentLoadingLabel: le, pdfContentErrorLabel: ue, pdfContentRetryLabel: W, xlsxFormulaLabel: de, codeContentLoadingLabel: pe, codeContentErrorLabel: G, codeContentRetryLabel: me, tableCopyLabel: he, tableCopiedLabel: ge, tableDownloadCsvLabel: _e, ooxmlHighlightsLabel: ve, ooxmlHighlightNavigatedLabel: ye }, onDownload: be, onCopyText: xe, onCopyMarkdown: Se, onCopyJson: K, tableDownloadFilename: Ce, isMobile: q = !1, defaultWidth: we, minWidth: Te = 600, maxWidth: Ee = 1500, onResizeStop: De, styles: Oe, codeBlockTheme: ke, loadPdf: Ae, configurePdfWorker: J }) => {
926
- let [je, Me] = R(!1), [Ne, Le] = R(!1), [Re, Y] = R(!1), [X, ze] = R(!1), [Be, Ve] = R(void 0), Z = L(null), He = L(null), Ue = L(null), We = P(() => {
927
- xe?.(), Z.current != null && clearTimeout(Z.current), Me(!0), Z.current = setTimeout(() => Me(!1), Ie);
928
- }, [xe]), Ge = P(() => {
929
- Se?.(), He.current != null && clearTimeout(He.current), Le(!0), He.current = setTimeout(() => Le(!1), Ie);
930
- }, [Se]), Ke = P(() => {
931
- K?.(), Ue.current != null && clearTimeout(Ue.current), Y(!0), Ue.current = setTimeout(() => Y(!1), Ie);
932
- }, [K]);
933
- F(() => () => {
934
- Z.current != null && clearTimeout(Z.current), He.current != null && clearTimeout(He.current), Ue.current != null && clearTimeout(Ue.current);
974
+ }, Ve = 2e3, He = F(({ isOpen: e, isLoading: t = !1, onClose: n, content: r, fileName: a, leftActions: s, labels: { ariaLabel: c, closeLabel: l = "Close", resizeLabel: u = "Resize panel", downloadLabel: d = "Download", copyTextLabel: f = "Copy text", copiedTextLabel: p = "Copied!", copyMarkdownLabel: h = "Copy as Markdown", copiedMarkdownLabel: g = "Copied!", copyJsonLabel: v = "Copy as JSON", copiedJsonLabel: y = "Copied!", visualizerErrorLabel: w, unsupportedLabel: E = "Preview is not supported for this file", loadErrorLabel: D = "Failed to load file", forbiddenErrorLabel: O = "You don't have permission to access this file", htmlFrameBlockedLabel: k = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: ne = "Open in new tab", htmlViewSourceLabel: N = "View source", htmlViewRenderedLabel: P = "View rendered", mcpAppReloadLabel: F = "Reload", pdfThumbnailsLabel: ae, pdfShowThumbnailsLabel: oe, pdfHideThumbnailsLabel: V, pdfPageNumberLabel: G, pdfContentLoadingLabel: K, pdfContentErrorLabel: se, pdfContentRetryLabel: ce, xlsxFormulaLabel: le, codeContentLoadingLabel: ue, codeContentErrorLabel: fe, codeContentRetryLabel: q, tableCopyLabel: pe, tableCopiedLabel: me, tableDownloadCsvLabel: he, ooxmlHighlightsLabel: ge, ooxmlHighlightNavigatedLabel: _e }, onDownload: ve, onCopyText: ye, onCopyMarkdown: be, onCopyJson: xe, tableDownloadFilename: Se, isMobile: J = !1, defaultWidth: Ce, minWidth: Y = 600, maxWidth: we = 1500, onResizeStop: Te, styles: Ee, codeBlockTheme: De, loadPdf: Oe, configurePdfWorker: ke, onVisualizerSendMessage: Ae }) => {
975
+ let [je, Me] = B(!1), [Ne, Pe] = B(!1), [Fe, X] = B(!1), [Ie, Le] = B(!1), [Re, He] = B(void 0), Ue = z(null), Z = z(null), We = z(null), Ge = I(() => {
976
+ ye?.(), Ue.current != null && clearTimeout(Ue.current), Me(!0), Ue.current = setTimeout(() => Me(!1), Ve);
977
+ }, [ye]), Ke = I(() => {
978
+ be?.(), Z.current != null && clearTimeout(Z.current), Pe(!0), Z.current = setTimeout(() => Pe(!1), Ve);
979
+ }, [be]), qe = I(() => {
980
+ xe?.(), We.current != null && clearTimeout(We.current), X(!0), We.current = setTimeout(() => X(!1), Ve);
981
+ }, [xe]);
982
+ L(() => () => {
983
+ Ue.current != null && clearTimeout(Ue.current), Z.current != null && clearTimeout(Z.current), We.current != null && clearTimeout(We.current);
935
984
  }, []);
936
- let qe = P(() => {
937
- ze((e) => !e);
985
+ let Je = I(() => {
986
+ Le((e) => !e);
938
987
  }, []);
939
- F(() => {
940
- ze(!1), Ve(void 0);
988
+ L(() => {
989
+ Le(!1), He(void 0);
941
990
  }, [r]);
942
- let { className: Q, panelStyles: Je, ...Ye } = Oe ?? {}, { colors: $, typography: Xe } = Ye, Ze = I(() => m({
943
- "--ac-mcp-app-divider": $?.mcpAppDividerColor,
944
- "--ac-mcp-app-version": $?.mcpAppVersionColor
945
- }), [$?.mcpAppDividerColor, $?.mcpAppVersionColor]), Qe = r.type === i.McpApp && Be != null ? /* @__PURE__ */ H("span", {
946
- style: Ze,
991
+ let { className: Ye, panelStyles: Xe, ...Ze } = Ee ?? {}, { colors: Q, typography: Qe } = Ze, $e = R(() => m({
992
+ "--ac-mcp-app-divider": Q?.mcpAppDividerColor,
993
+ "--ac-mcp-app-version": Q?.mcpAppVersionColor
994
+ }), [Q?.mcpAppDividerColor, Q?.mcpAppVersionColor]), $ = r.type === i.McpApp && Re != null ? /* @__PURE__ */ W("span", {
995
+ style: $e,
947
996
  children: [
948
- /* @__PURE__ */ V("span", { children: a }),
949
- /* @__PURE__ */ V("span", {
997
+ /* @__PURE__ */ U("span", { children: a }),
998
+ /* @__PURE__ */ U("span", {
950
999
  "aria-hidden": !0,
951
- className: _("mx-1.5 inline-block h-3 w-0 border-s align-middle", Fe.mcpAppDivider)
1000
+ className: _("mx-1.5 inline-block h-3 w-0 border-s align-middle", Be.mcpAppDivider)
952
1001
  }),
953
- /* @__PURE__ */ V("span", { children: Be.name }),
954
- Be.version && /* @__PURE__ */ V("span", {
955
- className: _("ms-2", Xe?.mcpAppVersionClassName ?? "dial-caption-text", Fe.mcpAppVersion),
956
- children: Be.version
1002
+ /* @__PURE__ */ U("span", { children: Re.name }),
1003
+ Re.version && /* @__PURE__ */ U("span", {
1004
+ className: _("ms-2", Qe?.mcpAppVersionClassName ?? "dial-caption-text", Be.mcpAppVersion),
1005
+ children: Re.version
957
1006
  })
958
1007
  ]
959
- }) : a, $e = !t && r.type === i.Html && (r.srcdoc != null || r.resolveSourceText != null), et = !t && xe != null && (r.type === i.PlainText || r.type === i.Code), tt = !t && Se != null && r.type === i.Markdown, nt = !t && K != null && r.type === i.Json, rt = !t && be != null && o(r), it = !t && r.type === i.McpApp && r.onReload != null;
960
- return /* @__PURE__ */ V(x, {
1008
+ }) : a, et = !t && r.type === i.Html && (r.srcdoc != null || r.resolveSourceText != null), tt = !t && ye != null && (r.type === i.PlainText || r.type === i.Code), nt = !t && be != null && r.type === i.Markdown, rt = !t && xe != null && r.type === i.Json, it = !t && ve != null && o(r), at = !t && r.type === i.McpApp && r.onReload != null;
1009
+ return /* @__PURE__ */ U(x, {
961
1010
  isOpen: e,
962
1011
  orientation: b.Right,
963
- title: Qe,
1012
+ title: $,
964
1013
  labels: {
965
1014
  ariaLabel: c,
966
1015
  closeLabel: l,
967
1016
  resizeLabel: u
968
1017
  },
969
1018
  onClose: n,
970
- resizable: !q,
971
- defaultWidth: we,
972
- minWidth: Te,
973
- maxWidth: Ee,
974
- onResizeStop: De,
1019
+ resizable: !J,
1020
+ defaultWidth: Ce,
1021
+ minWidth: Y,
1022
+ maxWidth: we,
1023
+ onResizeStop: Te,
975
1024
  styles: {
976
- ...Je,
977
- titleClassName: Je?.titleClassName ?? "dial-h3-text",
978
- headerClassName: _("border-b border-tertiary", Je?.headerClassName),
979
- className: _(e ? "mobile:w-full mobile:max-w-full" : "w-0", Q, Je?.className, fe.panel)
1025
+ ...Xe,
1026
+ titleClassName: Xe?.titleClassName ?? "dial-h3-text",
1027
+ headerClassName: _("border-b border-tertiary", Xe?.headerClassName),
1028
+ className: _(e ? "mobile:w-full mobile:max-w-full" : "w-0", Ye, Xe?.className, de.panel)
980
1029
  },
981
1030
  leftActions: s,
982
- rightActions: $e || et || tt || nt || rt || it ? /* @__PURE__ */ H(B, { children: [
983
- it && /* @__PURE__ */ V(T, {
984
- icon: /* @__PURE__ */ V(oe, {
1031
+ rightActions: et || tt || nt || rt || it || at ? /* @__PURE__ */ W(H, { children: [
1032
+ at && /* @__PURE__ */ U(T, {
1033
+ icon: /* @__PURE__ */ U(ie, {
985
1034
  size: S.LG,
986
1035
  stroke: C,
987
1036
  "aria-hidden": !0
988
1037
  }),
989
- "aria-label": N,
990
- tooltipProps: { tooltip: N },
1038
+ "aria-label": F,
1039
+ tooltipProps: { tooltip: F },
991
1040
  onClick: r.type === i.McpApp ? r.onReload : void 0
992
1041
  }),
993
- $e && /* @__PURE__ */ V(T, {
994
- icon: V(X ? re : ee, {
1042
+ et && /* @__PURE__ */ U(T, {
1043
+ icon: U(Ie ? M : j, {
995
1044
  size: S.LG,
996
1045
  stroke: C,
997
1046
  "aria-hidden": !0
998
1047
  }),
999
- "aria-label": X ? M : j,
1000
- "aria-pressed": X,
1001
- tooltipProps: { tooltip: X ? M : j },
1002
- onClick: qe
1048
+ "aria-label": Ie ? P : N,
1049
+ "aria-pressed": Ie,
1050
+ tooltipProps: { tooltip: Ie ? P : N },
1051
+ onClick: Je
1003
1052
  }),
1004
- et && /* @__PURE__ */ V(T, {
1005
- icon: V(je ? A : te, {
1053
+ tt && /* @__PURE__ */ U(T, {
1054
+ icon: U(je ? A : ee, {
1006
1055
  size: S.LG,
1007
1056
  stroke: C,
1008
1057
  "aria-hidden": !0
1009
1058
  }),
1010
1059
  "aria-label": je ? p : f,
1011
1060
  tooltipProps: { tooltip: je ? p : f },
1012
- onClick: We
1061
+ onClick: Ge
1013
1062
  }),
1014
- tt && /* @__PURE__ */ V(T, {
1015
- icon: V(Ne ? A : ae, {
1063
+ nt && /* @__PURE__ */ U(T, {
1064
+ icon: U(Ne ? A : re, {
1016
1065
  size: S.LG,
1017
1066
  stroke: C,
1018
1067
  "aria-hidden": !0
1019
1068
  }),
1020
1069
  "aria-label": Ne ? g : h,
1021
1070
  tooltipProps: { tooltip: Ne ? g : h },
1022
- onClick: Ge
1071
+ onClick: Ke
1023
1072
  }),
1024
- nt && /* @__PURE__ */ V(T, {
1025
- icon: V(Re ? A : te, {
1073
+ rt && /* @__PURE__ */ U(T, {
1074
+ icon: U(Fe ? A : ee, {
1026
1075
  size: S.LG,
1027
1076
  stroke: C,
1028
1077
  "aria-hidden": !0
1029
1078
  }),
1030
- "aria-label": Re ? y : v,
1031
- tooltipProps: { tooltip: Re ? y : v },
1032
- onClick: Ke
1079
+ "aria-label": Fe ? y : v,
1080
+ tooltipProps: { tooltip: Fe ? y : v },
1081
+ onClick: qe
1033
1082
  }),
1034
- rt && /* @__PURE__ */ V(T, {
1035
- icon: /* @__PURE__ */ V(ne, {
1083
+ it && /* @__PURE__ */ U(T, {
1084
+ icon: /* @__PURE__ */ U(te, {
1036
1085
  size: S.LG,
1037
1086
  stroke: C
1038
1087
  }),
1039
1088
  "aria-label": d,
1040
1089
  tooltipProps: { tooltip: d },
1041
- onClick: be
1090
+ onClick: ve
1042
1091
  })
1043
1092
  ] }) : null,
1044
- children: /* @__PURE__ */ V(Pe, {
1093
+ children: /* @__PURE__ */ U(ze, {
1045
1094
  content: r,
1046
1095
  isLoading: t,
1047
1096
  fileName: a,
1048
- isHtmlSourceView: X,
1049
- onAppInfo: r.type === i.McpApp ? Ve : void 0,
1097
+ isHtmlSourceView: Ie,
1098
+ onAppInfo: r.type === i.McpApp ? He : void 0,
1050
1099
  labels: {
1051
1100
  unsupportedLabel: E,
1052
1101
  loadErrorLabel: D,
1053
1102
  forbiddenErrorLabel: O,
1054
1103
  visualizerErrorLabel: w,
1055
1104
  htmlFrameBlockedLabel: k,
1056
- htmlOpenInNewTabLabel: ie,
1057
- pdfThumbnailsLabel: se,
1058
- pdfShowThumbnailsLabel: z,
1059
- pdfHideThumbnailsLabel: ce,
1060
- pdfPageNumberLabel: U,
1061
- pdfContentLoadingLabel: le,
1062
- pdfContentErrorLabel: ue,
1063
- pdfContentRetryLabel: W,
1064
- xlsxFormulaLabel: de,
1065
- codeContentLoadingLabel: pe,
1066
- codeContentErrorLabel: G,
1067
- codeContentRetryLabel: me,
1068
- tableCopyLabel: he,
1069
- tableCopiedLabel: ge,
1070
- tableDownloadCsvLabel: _e,
1071
- ooxmlHighlightsLabel: ve,
1072
- ooxmlHighlightNavigatedLabel: ye
1105
+ htmlOpenInNewTabLabel: ne,
1106
+ pdfThumbnailsLabel: ae,
1107
+ pdfShowThumbnailsLabel: oe,
1108
+ pdfHideThumbnailsLabel: V,
1109
+ pdfPageNumberLabel: G,
1110
+ pdfContentLoadingLabel: K,
1111
+ pdfContentErrorLabel: se,
1112
+ pdfContentRetryLabel: ce,
1113
+ xlsxFormulaLabel: le,
1114
+ codeContentLoadingLabel: ue,
1115
+ codeContentErrorLabel: fe,
1116
+ codeContentRetryLabel: q,
1117
+ tableCopyLabel: pe,
1118
+ tableCopiedLabel: me,
1119
+ tableDownloadCsvLabel: he,
1120
+ ooxmlHighlightsLabel: ge,
1121
+ ooxmlHighlightNavigatedLabel: _e
1073
1122
  },
1074
- styles: Ye,
1075
- codeBlockTheme: ke,
1076
- tableDownloadFilename: Ce,
1077
- loadPdf: Ae,
1078
- configurePdfWorker: J
1123
+ styles: Ze,
1124
+ codeBlockTheme: De,
1125
+ tableDownloadFilename: Se,
1126
+ loadPdf: Oe,
1127
+ configurePdfWorker: ke,
1128
+ onVisualizerSendMessage: Ae
1079
1129
  })
1080
1130
  });
1081
- }), Re = new Set(["html", "htm"]), Y = {
1131
+ }), Ue = new Set(["html", "htm"]), Z = {
1082
1132
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1083
1133
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1084
1134
  pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
1085
- }, X = new Set(/* @__PURE__ */ "txt.md.markdown.json.jsonl.ndjson.xml.csv.tsv.yaml.yml.toml.ini.conf.cfg.css.scss.sass.less.js.jsx.ts.tsx.mjs.cjs.mts.cts.py.rb.go.rs.java.kt.swift.c.h.cpp.cs.sh.bash.zsh.fish.ps1.log.env.gitignore.dockerfile.makefile.sql".split(".")), ze = {
1135
+ }, We = new Set(/* @__PURE__ */ "txt.md.markdown.json.jsonl.ndjson.xml.csv.tsv.yaml.yml.toml.ini.conf.cfg.css.scss.sass.less.js.jsx.ts.tsx.mjs.cjs.mts.cts.py.rb.go.rs.java.kt.swift.c.h.cpp.cs.sh.bash.zsh.fish.ps1.log.env.gitignore.dockerfile.makefile.sql".split(".")), Ge = {
1086
1136
  docx: r.Docx,
1087
1137
  xlsx: r.Xlsx,
1088
1138
  pptx: r.Pptx,
1089
1139
  csv: r.Csv
1090
- }, Be = {
1091
- [Y.docx]: r.Docx,
1092
- [Y.xlsx]: r.Xlsx,
1093
- [Y.pptx]: r.Pptx,
1140
+ }, Ke = {
1141
+ [Z.docx]: r.Docx,
1142
+ [Z.xlsx]: r.Xlsx,
1143
+ [Z.pptx]: r.Pptx,
1094
1144
  [f.CSV]: r.Csv
1095
- }, Ve = {
1096
- [r.Docx]: Y.docx,
1097
- [r.Xlsx]: Y.xlsx,
1098
- [r.Pptx]: Y.pptx,
1145
+ }, qe = {
1146
+ [r.Docx]: Z.docx,
1147
+ [r.Xlsx]: Z.xlsx,
1148
+ [r.Pptx]: Z.pptx,
1099
1149
  [r.Csv]: f.CSV
1100
- }, Z = (e, t) => {
1150
+ }, Je = (e, t) => {
1101
1151
  let n = t?.split(";", 1)[0].trim().toLowerCase();
1102
1152
  if (n != null) {
1103
- let e = Be[n];
1153
+ let e = Ke[n];
1104
1154
  if (e != null) return e;
1105
1155
  }
1106
1156
  let r = e.lastIndexOf(".");
1107
- if (r !== -1) return ze[e.slice(r + 1).toLowerCase()];
1108
- }, He = (e, t) => Z(e, t) != null, Ue = (e, t) => {
1109
- let n = Z(e, t);
1110
- return n == null ? void 0 : Ve[n];
1111
- }, We = (e) => {
1157
+ if (r !== -1) return Ge[e.slice(r + 1).toLowerCase()];
1158
+ }, Ye = (e, t) => Je(e, t) != null, Xe = (e, t) => {
1159
+ let n = Je(e, t);
1160
+ return n == null ? void 0 : qe[n];
1161
+ }, Ze = (e) => {
1112
1162
  let t = e.lastIndexOf(".");
1113
- return t === -1 ? !1 : X.has(e.slice(t + 1).toLowerCase());
1114
- }, Ge = (e) => {
1163
+ return t === -1 ? !1 : We.has(e.slice(t + 1).toLowerCase());
1164
+ }, Q = (e) => {
1115
1165
  let t = e.lastIndexOf(".");
1116
- return t === -1 ? !1 : Re.has(e.slice(t + 1).toLowerCase());
1117
- }, Ke = {
1166
+ return t === -1 ? !1 : Ue.has(e.slice(t + 1).toLowerCase());
1167
+ }, Qe = {
1118
1168
  xml: "xml",
1119
1169
  csv: "plaintext",
1120
1170
  tsv: "plaintext",
@@ -1162,40 +1212,40 @@ var fe = { panel: "dial-attachment-canvas-panel" }, pe = {
1162
1212
  gitignore: "plaintext",
1163
1213
  dockerfile: "plaintext",
1164
1214
  makefile: "plaintext"
1165
- }, qe = (e) => Ke[e], Q = (e) => ({
1215
+ }, $e = (e) => Qe[e], $ = (e) => ({
1166
1216
  type: i.Unsupported,
1167
1217
  ...e != null && { url: e }
1168
- }), Je = (e) => ({
1218
+ }), et = (e) => ({
1169
1219
  type: i.Error,
1170
1220
  errorType: n.LoadFailed,
1171
1221
  ...e != null && { url: e }
1172
- }), Ye = (e) => ({
1222
+ }), tt = (e) => ({
1173
1223
  type: i.Error,
1174
1224
  errorType: n.Forbidden,
1175
1225
  ...e != null && { url: e }
1176
- }), $ = (e) => {
1226
+ }), nt = (e) => {
1177
1227
  if (!(e.type !== i.Image && e.type !== i.Audio && e.type !== i.Pdf && e.type !== i.Ooxml)) return e.url.startsWith("blob:") ? e.url : void 0;
1178
- }, Xe = (e) => {
1179
- let t = $(e);
1228
+ }, rt = (e) => {
1229
+ let t = nt(e);
1180
1230
  t != null && URL.revokeObjectURL(t);
1181
- }, Ze = {
1231
+ }, it = {
1182
1232
  type: i.PlainText,
1183
1233
  text: ""
1184
- }, Qe = j(void 0);
1185
- Qe.displayName = "AttachmentCanvasContext";
1186
- var $e = ({ children: e }) => {
1187
- let [t, n] = R(!1), [r, i] = R(!1), [a, o] = R(Ze), [s, c] = R(void 0), [l, u] = R(void 0), d = P((e, t) => {
1234
+ }, at = N(void 0);
1235
+ at.displayName = "AttachmentCanvasContext";
1236
+ var ot = ({ children: e }) => {
1237
+ let [t, n] = B(!1), [r, i] = B(!1), [a, o] = B(it), [s, c] = B(void 0), [l, u] = B(void 0), d = I((e, t) => {
1188
1238
  c(e), u(t), i(!0), n(!0);
1189
- }, []), f = P((e, t, r) => {
1239
+ }, []), f = I((e, t, r) => {
1190
1240
  o(e), c(t), u(r), i(!1), n(!0);
1191
- }, []), p = P(() => {
1192
- o(Ze), n(!1), i(!1), u(void 0);
1241
+ }, []), p = I(() => {
1242
+ o(it), n(!1), i(!1), u(void 0);
1193
1243
  }, []);
1194
- return F(() => () => {
1195
- let e = $(a);
1244
+ return L(() => () => {
1245
+ let e = nt(a);
1196
1246
  e != null && URL.revokeObjectURL(e);
1197
- }, [a]), /* @__PURE__ */ V(Qe.Provider, {
1198
- value: I(() => ({
1247
+ }, [a]), /* @__PURE__ */ U(at.Provider, {
1248
+ value: R(() => ({
1199
1249
  isOpen: t,
1200
1250
  isLoading: r,
1201
1251
  content: a,
@@ -1216,97 +1266,98 @@ var $e = ({ children: e }) => {
1216
1266
  ]),
1217
1267
  children: e
1218
1268
  });
1219
- }, et = () => {
1220
- let e = se(Qe);
1269
+ }, st = () => {
1270
+ let e = ae(at);
1221
1271
  if (!e) throw Error("useAttachmentCanvas must be used within an AttachmentCanvasProvider");
1222
1272
  return e;
1223
- }, tt = N(({ labels: e, leftActions: t, isMobile: n = !1, defaultWidth: r, maxWidth: o, codeBlockTheme: s, tableDownloadFilename: c, loadPdf: l, configurePdfWorker: u }) => {
1224
- let { ariaLabel: d = "Attachment preview", closeLabel: f = "Close", downloadLabel: p = "Download", unsupportedLabel: m = "Preview is not supported for this file", loadErrorLabel: g = "Failed to load file", forbiddenErrorLabel: _ = "You don't have permission to access this file", copyTextLabel: v, copiedTextLabel: y, copyMarkdownLabel: b, copiedMarkdownLabel: x, copyJsonLabel: S, copiedJsonLabel: C, htmlFrameBlockedLabel: w, htmlOpenInNewTabLabel: T, htmlViewSourceLabel: E, htmlViewRenderedLabel: D, pdfThumbnailsLabel: O, pdfShowThumbnailsLabel: k, pdfHideThumbnailsLabel: A, pdfPageNumberLabel: ee, pdfContentLoadingLabel: te, pdfContentErrorLabel: ne, pdfContentRetryLabel: re, xlsxFormulaLabel: ie, codeContentLoadingLabel: ae, codeContentErrorLabel: oe, codeContentRetryLabel: j, tableCopyLabel: M, tableCopiedLabel: N, tableDownloadCsvLabel: se, ooxmlHighlightsLabel: F, ooxmlHighlightNavigatedLabel: I } = e ?? {}, { isOpen: L, isLoading: R, content: z, fileName: ce, closeCanvas: B } = et(), H = P(() => {
1225
- a(z, ce);
1226
- }, [z, ce]), U = P(() => {
1227
- (z.type === i.PlainText || z.type === i.Code) && h(z.text);
1228
- }, [z]), le = P(() => {
1229
- z.type === i.Markdown && h(z.text);
1230
- }, [z]), ue = P(() => {
1231
- z.type === i.Json && h(JSON.stringify(z.value, null, 2));
1232
- }, [z]);
1233
- return /* @__PURE__ */ V(Le, {
1234
- isOpen: L,
1235
- isLoading: R,
1236
- onClose: B,
1237
- content: z,
1238
- fileName: ce,
1273
+ }, ct = F(({ labels: e, leftActions: t, isMobile: n = !1, defaultWidth: r, maxWidth: o, codeBlockTheme: s, tableDownloadFilename: c, loadPdf: l, configurePdfWorker: u, onVisualizerSendMessage: d }) => {
1274
+ let { ariaLabel: f = "Attachment preview", closeLabel: p = "Close", downloadLabel: m = "Download", unsupportedLabel: g = "Preview is not supported for this file", loadErrorLabel: _ = "Failed to load file", forbiddenErrorLabel: v = "You don't have permission to access this file", copyTextLabel: y, copiedTextLabel: b, copyMarkdownLabel: x, copiedMarkdownLabel: S, copyJsonLabel: C, copiedJsonLabel: w, htmlFrameBlockedLabel: T, htmlOpenInNewTabLabel: E, htmlViewSourceLabel: D, htmlViewRenderedLabel: O, pdfThumbnailsLabel: k, pdfShowThumbnailsLabel: A, pdfHideThumbnailsLabel: j, pdfPageNumberLabel: ee, pdfContentLoadingLabel: te, pdfContentErrorLabel: M, pdfContentRetryLabel: ne, xlsxFormulaLabel: re, codeContentLoadingLabel: ie, codeContentErrorLabel: N, codeContentRetryLabel: P, tableCopyLabel: F, tableCopiedLabel: ae, tableDownloadCsvLabel: L, ooxmlHighlightsLabel: R, ooxmlHighlightNavigatedLabel: z } = e ?? {}, { isOpen: B, isLoading: oe, content: V, fileName: H, closeCanvas: W } = st(), G = I(() => {
1275
+ a(V, H);
1276
+ }, [V, H]), K = I(() => {
1277
+ (V.type === i.PlainText || V.type === i.Code) && h(V.text);
1278
+ }, [V]), se = I(() => {
1279
+ V.type === i.Markdown && h(V.text);
1280
+ }, [V]), ce = I(() => {
1281
+ V.type === i.Json && h(JSON.stringify(V.value, null, 2));
1282
+ }, [V]);
1283
+ return /* @__PURE__ */ U(He, {
1284
+ isOpen: B,
1285
+ isLoading: oe,
1286
+ onClose: W,
1287
+ content: V,
1288
+ fileName: H,
1239
1289
  leftActions: t,
1240
1290
  labels: {
1241
- ariaLabel: d,
1242
- closeLabel: f,
1243
- downloadLabel: p,
1244
- copyTextLabel: v,
1245
- copiedTextLabel: y,
1246
- copyMarkdownLabel: b,
1247
- copiedMarkdownLabel: x,
1248
- copyJsonLabel: S,
1249
- copiedJsonLabel: C,
1250
- unsupportedLabel: m,
1251
- loadErrorLabel: g,
1252
- forbiddenErrorLabel: _,
1253
- htmlFrameBlockedLabel: w,
1254
- htmlOpenInNewTabLabel: T,
1255
- htmlViewSourceLabel: E,
1256
- htmlViewRenderedLabel: D,
1257
- pdfThumbnailsLabel: O,
1258
- pdfShowThumbnailsLabel: k,
1259
- pdfHideThumbnailsLabel: A,
1291
+ ariaLabel: f,
1292
+ closeLabel: p,
1293
+ downloadLabel: m,
1294
+ copyTextLabel: y,
1295
+ copiedTextLabel: b,
1296
+ copyMarkdownLabel: x,
1297
+ copiedMarkdownLabel: S,
1298
+ copyJsonLabel: C,
1299
+ copiedJsonLabel: w,
1300
+ unsupportedLabel: g,
1301
+ loadErrorLabel: _,
1302
+ forbiddenErrorLabel: v,
1303
+ htmlFrameBlockedLabel: T,
1304
+ htmlOpenInNewTabLabel: E,
1305
+ htmlViewSourceLabel: D,
1306
+ htmlViewRenderedLabel: O,
1307
+ pdfThumbnailsLabel: k,
1308
+ pdfShowThumbnailsLabel: A,
1309
+ pdfHideThumbnailsLabel: j,
1260
1310
  pdfPageNumberLabel: ee,
1261
1311
  pdfContentLoadingLabel: te,
1262
- pdfContentErrorLabel: ne,
1263
- pdfContentRetryLabel: re,
1264
- xlsxFormulaLabel: ie,
1265
- codeContentLoadingLabel: ae,
1266
- codeContentErrorLabel: oe,
1267
- codeContentRetryLabel: j,
1268
- tableCopyLabel: M,
1269
- tableCopiedLabel: N,
1270
- tableDownloadCsvLabel: se,
1271
- ooxmlHighlightsLabel: F,
1272
- ooxmlHighlightNavigatedLabel: I
1312
+ pdfContentErrorLabel: M,
1313
+ pdfContentRetryLabel: ne,
1314
+ xlsxFormulaLabel: re,
1315
+ codeContentLoadingLabel: ie,
1316
+ codeContentErrorLabel: N,
1317
+ codeContentRetryLabel: P,
1318
+ tableCopyLabel: F,
1319
+ tableCopiedLabel: ae,
1320
+ tableDownloadCsvLabel: L,
1321
+ ooxmlHighlightsLabel: R,
1322
+ ooxmlHighlightNavigatedLabel: z
1273
1323
  },
1274
- onDownload: H,
1275
- onCopyText: z.type === i.PlainText || z.type === i.Code ? U : void 0,
1276
- onCopyMarkdown: z.type === i.Markdown ? le : void 0,
1277
- onCopyJson: z.type === i.Json ? ue : void 0,
1324
+ onDownload: G,
1325
+ onCopyText: V.type === i.PlainText || V.type === i.Code ? K : void 0,
1326
+ onCopyMarkdown: V.type === i.Markdown ? se : void 0,
1327
+ onCopyJson: V.type === i.Json ? ce : void 0,
1278
1328
  tableDownloadFilename: c,
1279
1329
  isMobile: n,
1280
1330
  defaultWidth: r,
1281
1331
  maxWidth: o,
1282
1332
  codeBlockTheme: s,
1283
1333
  configurePdfWorker: u,
1284
- loadPdf: l
1334
+ loadPdf: l,
1335
+ onVisualizerSendMessage: d
1285
1336
  });
1286
- }), nt = {
1337
+ }), lt = {
1287
1338
  frame: "_frame_g47g7_1",
1288
1339
  header: "_header_g47g7_6",
1289
1340
  title: "_title_g47g7_10"
1290
- }, rt = N(({ content: e, height: t, onExpand: n, expandAriaLabel: r, actionsGroupAriaLabel: i = "Visualizer actions", frameTitle: a, loadingLabel: o, errorLabel: s, titleClassName: c = "dial-small-semi-text", isBorderless: l = !1, isTitleHidden: u = !1, colors: d }) => {
1291
- let f = e.visualizerName.trim(), p = !u && f !== "";
1292
- return /* @__PURE__ */ H("div", {
1293
- className: _("flex w-full min-w-0 flex-col overflow-hidden", !l && ["rounded-xl border", nt.frame]),
1341
+ }, ut = F(({ content: e, height: t, onExpand: n, expandAriaLabel: r, actionsGroupAriaLabel: i = "Visualizer actions", frameTitle: a, loadingLabel: o, errorLabel: s, titleClassName: c = "dial-small-semi-text", isBorderless: l = !1, isTitleHidden: u = !1, colors: d, onVisualizerSendMessage: f }) => {
1342
+ let p = e.visualizerName.trim(), h = !u && p !== "";
1343
+ return /* @__PURE__ */ W("div", {
1344
+ className: _("flex w-full min-w-0 flex-col overflow-hidden", !l && ["rounded-xl border", lt.frame]),
1294
1345
  style: m({
1295
1346
  "--igv-bg": d?.background,
1296
1347
  "--igv-border": d?.border,
1297
1348
  "--igv-title-text": d?.titleText
1298
1349
  }),
1299
- children: [/* @__PURE__ */ H("div", {
1300
- className: _("flex min-h-10 items-center gap-2 py-2", p ? "justify-between" : "justify-end", !l && ["border-b px-4", nt.header]),
1301
- children: [p && /* @__PURE__ */ V("span", {
1302
- className: _("min-w-0 truncate", c, nt.title),
1303
- children: f
1304
- }), /* @__PURE__ */ V("div", {
1350
+ children: [/* @__PURE__ */ W("div", {
1351
+ className: _("flex min-h-10 items-center gap-2 py-2", h ? "justify-between" : "justify-end", !l && ["border-b px-4", lt.header]),
1352
+ children: [h && /* @__PURE__ */ U("span", {
1353
+ className: _("min-w-0 truncate", c, lt.title),
1354
+ children: p
1355
+ }), /* @__PURE__ */ U("div", {
1305
1356
  role: "toolbar",
1306
1357
  "aria-label": i,
1307
1358
  className: "flex items-center gap-1",
1308
- children: /* @__PURE__ */ V(T, {
1309
- icon: /* @__PURE__ */ V(k, {
1359
+ children: /* @__PURE__ */ U(T, {
1360
+ icon: /* @__PURE__ */ U(k, {
1310
1361
  size: S.SM,
1311
1362
  stroke: C,
1312
1363
  "aria-hidden": !0
@@ -1316,35 +1367,19 @@ var $e = ({ children: e }) => {
1316
1367
  onClick: n
1317
1368
  })
1318
1369
  })]
1319
- }), /* @__PURE__ */ V("div", {
1370
+ }), /* @__PURE__ */ U("div", {
1320
1371
  className: "w-full",
1321
1372
  style: { height: `${t}px` },
1322
- children: /* @__PURE__ */ V(Ae, {
1373
+ children: /* @__PURE__ */ U(Fe, {
1323
1374
  content: e,
1324
1375
  loadingLabel: o,
1325
1376
  errorLabel: s,
1326
- frameTitle: a
1377
+ frameTitle: a,
1378
+ onSendMessage: f
1327
1379
  })
1328
1380
  })]
1329
1381
  });
1330
- }), it = (e, t) => {
1331
- let n = e.toLowerCase();
1332
- return t.find((e) => e.contentType.split(",").some((e) => e.trim().toLowerCase() === n && e.trim() !== ""));
1333
- }, at = (e, t) => {
1334
- if (!(e == null || e === "")) return Object.prototype.hasOwnProperty.call(t, e) ? t[e] : void 0;
1335
- }, ot = (e) => `${e}:grouped-visualizer`, st = (e, t) => {
1336
- let n = (t.contentType ?? "").split(",").map((e) => e.trim().toLowerCase()).filter((e) => e !== ""), r = [], i = [];
1337
- return e.forEach((e) => {
1338
- if (e.url != null && e.url !== "" && (n.length === 0 || n.includes(e.contentType.toLowerCase()))) {
1339
- r.push(e);
1340
- return;
1341
- }
1342
- i.push(e);
1343
- }), {
1344
- claimed: r,
1345
- unclaimed: i
1346
- };
1347
- }, ct = (e) => {
1382
+ }), dt = (e) => {
1348
1383
  let t;
1349
1384
  try {
1350
1385
  t = new URL(e).pathname;
@@ -1357,13 +1392,13 @@ var $e = ({ children: e }) => {
1357
1392
  } catch {
1358
1393
  return n;
1359
1394
  }
1360
- }, lt = (e, t) => {
1361
- let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = et(), { customVisualizers: o, themeId: s, onBeforeOpen: l } = t, u = P(async (t, n, r) => {
1395
+ }, ft = (e, t) => {
1396
+ let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = st(), { customVisualizers: o, themeId: s, onBeforeOpen: l } = t, u = I(async (t, n, r) => {
1362
1397
  if (t.url == null && t.referenceUrl != null) {
1363
1398
  let i = e.resolveReferencePdfContent(t);
1364
1399
  if (i != null) return r(i, t.name, n);
1365
1400
  }
1366
- let a = t.contentType.toLowerCase(), c = it(a, o);
1401
+ let a = t.contentType.toLowerCase(), c = ke(a, o);
1367
1402
  if (c != null) {
1368
1403
  let i = await e.resolveVisualizerContent(t, c, s);
1369
1404
  if (i != null) return r(i, t.name, n);
@@ -1372,15 +1407,15 @@ var $e = ({ children: e }) => {
1372
1407
  let i = await e.resolveTextContent(t);
1373
1408
  if (i != null) return r(i, t.name, n);
1374
1409
  }
1375
- let l = Z("", a);
1376
- if (l != null) return r(await e.resolveOoxmlContent(t, l) ?? Q(e.resolveContentUrl(t)), t.name, n);
1410
+ let l = Je("", a);
1411
+ if (l != null) return r(await e.resolveOoxmlContent(t, l) ?? $(e.resolveContentUrl(t)), t.name, n);
1377
1412
  switch (a) {
1378
- case f.PDF: return r(await e.resolvePdfContent(t) ?? Q(e.resolveContentUrl(t)), t.name, n);
1379
- case f.Markdown: return r(await e.resolveMarkdownContent(t) ?? Q(e.resolveContentUrl(t)), t.name, n);
1380
- case f.JSON: return r(await e.resolveJsonContent(t) ?? Q(e.resolveContentUrl(t)), t.name, n);
1413
+ case f.PDF: return r(await e.resolvePdfContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
1414
+ case f.Markdown: return r(await e.resolveMarkdownContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
1415
+ case f.JSON: return r(await e.resolveJsonContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
1381
1416
  }
1382
- let u = t.name ?? "", p = u.lastIndexOf("."), m = p === -1 ? "" : u.slice(p + 1).toLowerCase(), h = Z(u);
1383
- if (h != null) return r(await e.resolveOoxmlContent(t, h) ?? Q(e.resolveContentUrl(t)), t.name, n);
1417
+ let u = t.name ?? "", p = u.lastIndexOf("."), m = p === -1 ? "" : u.slice(p + 1).toLowerCase(), h = Je(u);
1418
+ if (h != null) return r(await e.resolveOoxmlContent(t, h) ?? $(e.resolveContentUrl(t)), t.name, n);
1384
1419
  switch (m) {
1385
1420
  case d.Markdown:
1386
1421
  case d.MarkdownAlt: {
@@ -1396,24 +1431,24 @@ var $e = ({ children: e }) => {
1396
1431
  return i == null ? !1 : r(i, t.name, n);
1397
1432
  }
1398
1433
  }
1399
- let g = t.name != null && Ge(t.name) || t.url != null && Ge(ct(t.url));
1400
- if (t.name != null && !We(t.name) && !g) return r(Q(e.resolveContentUrl(t)), t.name, n);
1434
+ let g = t.name != null && Q(t.name) || t.url != null && Q(dt(t.url));
1435
+ if (t.name != null && !Ze(t.name) && !g) return r($(e.resolveContentUrl(t)), t.name, n);
1401
1436
  if (g) {
1402
1437
  let a = await e.resolveHtmlContent(t);
1403
- return a == null ? e.hasTextSource(t) ? r(Q(e.resolveContentUrl(t)), t.name, n) : t.url == null ? !1 : r({
1438
+ return a == null ? e.hasTextSource(t) ? r($(e.resolveContentUrl(t)), t.name, n) : t.url == null ? !1 : r({
1404
1439
  type: i.Html,
1405
1440
  url: t.url
1406
1441
  }, t.name, n) : r(a, t.name, n);
1407
1442
  }
1408
- let _ = await e.resolveCodeContent(t, qe(m));
1443
+ let _ = await e.resolveCodeContent(t, $e(m));
1409
1444
  return _ == null ? !1 : r(_, t.name, n);
1410
1445
  }, [
1411
1446
  o,
1412
1447
  s,
1413
1448
  e
1414
1449
  ]);
1415
- return { openAttachmentCanvas: P(async (t, o = t.id, s) => {
1416
- let d = () => s == null || s(), f = (e, t, r) => d() ? (n(e, t, r), !0) : (Xe(e), !1);
1450
+ return { openAttachmentCanvas: I(async (t, o = t.id, s) => {
1451
+ let d = () => s == null || s(), f = (e, t, r) => d() ? (n(e, t, r), !0) : (rt(e), !1);
1417
1452
  switch (t.type) {
1418
1453
  case c.Image: {
1419
1454
  let r = e.resolveImageContent(t);
@@ -1450,4 +1485,4 @@ var $e = ({ children: e }) => {
1450
1485
  ]) };
1451
1486
  };
1452
1487
  //#endregion
1453
- export { fe as ATTACHMENT_CANVAS_CLASS, Le as AttachmentCanvas, Pe as AttachmentCanvasBody, tt as AttachmentCanvasContainer, $e as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, he as CodeContent, rt as InlineGroupedVisualizer, Ce as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, Ye as createForbiddenCanvasContent, Je as createLoadErrorCanvasContent, Q as createUnsupportedCanvasContent, a as downloadAttachmentContent, qe as extensionToLanguage, at as findVisualizerForApplication, it as findVisualizerForMime, Z as getOoxmlFileType, Ue as getOoxmlMimeType, ot as groupedVisualizerCanvasKey, o as isDownloadable, Ge as isHtmlPreviewable, He as isOoxmlPreviewable, We as isTextPreviewable, st as partitionAttachmentsForApplicationVisualizer, et as useAttachmentCanvas, lt as useOpenAttachmentCanvas };
1488
+ export { de as ATTACHMENT_CANVAS_CLASS, He as AttachmentCanvas, ze as AttachmentCanvasBody, ct as AttachmentCanvasContainer, ot as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, me as CodeContent, he as HTML_PREVIEW_FRAME_RENDER_MESSAGE, ut as InlineGroupedVisualizer, Ce as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, tt as createForbiddenCanvasContent, et as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, a as downloadAttachmentContent, $e as extensionToLanguage, Ae as findVisualizerForApplication, ke as findVisualizerForMime, Je as getOoxmlFileType, Xe as getOoxmlMimeType, je as groupedVisualizerCanvasKey, o as isDownloadable, Q as isHtmlPreviewable, Ye as isOoxmlPreviewable, Ze as isTextPreviewable, Me as partitionAttachmentsForApplicationVisualizer, st as useAttachmentCanvas, ft as useOpenAttachmentCanvas };