@epam/ai-dial-attachment-canvas 1.3.0-dev.305 → 1.3.0-dev.310

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-rT6s5wBc.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, GhostButton as ee, GhostIconButton as T, LinkButton as E, LiveRegion as D, Spinner as O } from "@epam/ai-dial-ui-kit";
6
- import { IconAlertTriangle as k, IconArrowsMaximize as A, IconCheck as j, IconCode as te, IconCopy as ne, IconDownload as re, IconEye as ie, IconLock as ae, IconMarkdown as oe, IconRefresh as se } from "@tabler/icons-react";
7
- import { createContext as M, lazy as N, memo as P, useCallback as F, useContext as ce, useEffect as I, useMemo as L, useRef as R, useState as z } from "react";
8
- import { JsonView as le, defaultStyles as ue } from "react-json-view-lite";
9
- import { Fragment as de, jsx as B, jsxs as V } from "react/jsx-runtime";
10
- import { AppBridge as H, AppFrame as fe } from "@mcp-ui/client";
11
- import { McpUiHostContextChangedNotificationSchema as U } from "@modelcontextprotocol/ext-apps/app-bridge";
12
- import { VisualizerConnector as W, VisualizerConnectorEvents as pe, VisualizerConnectorRequests as me } from "@epam/ai-dial-visualizer-connector";
6
+ import { IconAlertTriangle as k, IconArrowsMaximize as A, IconCheck as j, IconCode as te, IconCopy as ne, IconDownload as M, IconEye as re, IconLock as ie, IconMarkdown as ae, IconRefresh as oe } from "@tabler/icons-react";
7
+ import { createContext as N, lazy as P, memo as F, useCallback as I, useContext as L, useEffect as R, useMemo as z, useRef as B, useState as V } from "react";
8
+ import { JsonView as se, defaultStyles as ce } from "react-json-view-lite";
9
+ import { Fragment as le, jsx as H, jsxs as U } from "react/jsx-runtime";
10
+ import { AppBridge as W, AppFrame as ue } from "@mcp-ui/client";
11
+ import { McpUiHostContextChangedNotificationSchema as de } from "@modelcontextprotocol/ext-apps/app-bridge";
12
+ import { VisualizerConnector as G, VisualizerConnectorEvents as fe, VisualizerConnectorRequests as pe } from "@epam/ai-dial-visualizer-connector";
13
13
  //#region src/constants/public-class-names.ts
14
- var he = { panel: "dial-attachment-canvas-panel" }, ge = {
14
+ var me = { panel: "dial-attachment-canvas-panel" }, he = {
15
15
  container: "_container_k7ib4_1",
16
16
  containerLight: "_containerLight_k7ib4_5"
17
- }, G = {
17
+ }, K = {
18
18
  [l.Dark]: v,
19
19
  [l.Light]: v
20
- }, K = () => N(async () => {
20
+ }, q = () => P(async () => {
21
21
  let { Prism: e } = await import("react-syntax-highlighter");
22
22
  return { default: e };
23
- }), _e = P(({ content: e, codeBlockTheme: t = l.Light, labels: n, codeClassName: r = "dial-code-text", errorLabelClassName: i }) => {
24
- let { text: a, language: o } = e, c = L(() => g(a), [a]), u = o == null || o === "plaintext" || !c, d = G[t], f = t === l.Light, [p, m] = z(0), h = L(K, [p]), v = F(() => {
23
+ }), ge = F(({ content: e, codeBlockTheme: t = l.Light, labels: n, codeClassName: r = "dial-code-text", errorLabelClassName: i }) => {
24
+ let { text: a, language: o } = e, c = z(() => g(a), [a]), u = o == null || o === "plaintext" || !c, d = K[t], f = t === l.Light, [p, m] = V(0), h = z(q, [p]), v = I(() => {
25
25
  m((e) => e + 1);
26
- }, []), y = /* @__PURE__ */ B("pre", {
26
+ }, []), y = /* @__PURE__ */ H("pre", {
27
27
  className: _(r, "p-4 wrap-break-word whitespace-pre-wrap"),
28
28
  children: a
29
29
  });
30
- return /* @__PURE__ */ B("div", {
30
+ return /* @__PURE__ */ H("div", {
31
31
  dir: "ltr",
32
- className: _("h-full overflow-auto", ge.container, f && ge.containerLight),
33
- children: u ? y : /* @__PURE__ */ B(s, {
32
+ className: _("h-full overflow-auto", he.container, f && he.containerLight),
33
+ children: u ? y : /* @__PURE__ */ H(s, {
34
34
  retryKey: p,
35
35
  onRetry: v,
36
36
  pendingContent: y,
37
37
  errorContent: y,
38
38
  labels: n,
39
39
  errorLabelClassName: i,
40
- children: /* @__PURE__ */ B(h, {
40
+ children: /* @__PURE__ */ H(h, {
41
41
  language: o,
42
42
  style: d,
43
43
  customStyle: {
@@ -53,8 +53,8 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
53
53
  })
54
54
  })
55
55
  });
56
- }), ve = "dial-html-preview:render", ye = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, be = P(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text", codeClassName: s }) => {
57
- let { htmlFrameBlockedLabel: c = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: l = "Open in new tab" } = t, [u, d] = z(!0), [f, p] = z(!1), [m, h] = z(void 0), [g, v] = z(!1), [y, b] = z(!1), x = R(null), S = R(null), C = R(!1), w = R({
56
+ }), _e = "dial-html-preview:render", ve = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, ye = F(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text", codeClassName: s }) => {
57
+ let { htmlFrameBlockedLabel: c = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: l = "Open in new tab" } = t, [u, d] = V(!0), [f, p] = V(!1), [m, h] = V(void 0), [g, v] = V(!1), [y, b] = V(!1), x = B(null), S = B(null), C = B(!1), w = B({
58
58
  content: e,
59
59
  generation: 0
60
60
  });
@@ -63,11 +63,11 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
63
63
  generation: w.current.generation + 1
64
64
  });
65
65
  let ee = w.current.generation;
66
- I(() => {
66
+ R(() => {
67
67
  d(!0), p(!1), h(void 0), v(!1), b(!1);
68
68
  }, [e]);
69
- let T = R(n);
70
- T.current !== n && (T.current = n, n && y && b(!1), !n && C.current && (C.current = !1, d(!0))), I(() => {
69
+ let T = B(n);
70
+ T.current !== n && (T.current = n, n && y && b(!1), !n && C.current && (C.current = !1, d(!0))), R(() => {
71
71
  if (!n || e.srcdoc != null || e.resolveSourceText == null || m != null) return;
72
72
  let t = !1, r = e.resolveSourceText;
73
73
  return (async () => {
@@ -88,11 +88,11 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
88
88
  e,
89
89
  m
90
90
  ]);
91
- let D = e.isSameOriginUrl === !0 && e.url != null, k = !D && e.srcdoc != null, A = k ? e.srcdocHostUrl : void 0, j = e.srcdoc, te = F((e) => {
91
+ let D = e.isSameOriginUrl === !0 && e.url != null, k = !D && e.srcdoc != null, A = k ? e.srcdocHostUrl : void 0, j = e.srcdoc, te = I((e) => {
92
92
  if (d(!1), A != null) {
93
93
  let e = x.current?.contentWindow;
94
94
  e != null && e !== S.current && j != null && (S.current = e, e.postMessage({
95
- type: ve,
95
+ type: _e,
96
96
  html: j
97
97
  }, "*"));
98
98
  } else if (!(k || D)) try {
@@ -105,55 +105,55 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
105
105
  D,
106
106
  A,
107
107
  j
108
- ]), ne = F(() => {
108
+ ]), ne = I(() => {
109
109
  d(!1), p(!0);
110
- }, []), re = e.srcdoc ?? m, ie = e.srcdoc != null || e.resolveSourceText != null, ae = e.srcdoc == null && e.resolveSourceText != null && m == null && !y;
111
- if (n && ie && (re != null || g || ae)) return C.current = !0, re == null ? /* @__PURE__ */ B("div", {
110
+ }, []), M = e.srcdoc ?? m, re = e.srcdoc != null || e.resolveSourceText != null, ie = e.srcdoc == null && e.resolveSourceText != null && m == null && !y;
111
+ if (n && re && (M != null || g || ie)) return C.current = !0, M == null ? /* @__PURE__ */ H("div", {
112
112
  className: "flex h-full items-center justify-center",
113
- children: /* @__PURE__ */ B(O, {})
114
- }) : /* @__PURE__ */ B(_e, {
113
+ children: /* @__PURE__ */ H(O, {})
114
+ }) : /* @__PURE__ */ H(ge, {
115
115
  content: {
116
116
  type: i.Code,
117
- text: re,
117
+ text: M,
118
118
  language: "html"
119
119
  },
120
120
  codeBlockTheme: a,
121
121
  codeClassName: s
122
122
  });
123
- if (f) return /* @__PURE__ */ V("div", {
123
+ if (f) return /* @__PURE__ */ U("div", {
124
124
  className: "flex h-full flex-col items-center justify-center gap-3 p-4",
125
- children: [/* @__PURE__ */ B("p", {
125
+ children: [/* @__PURE__ */ H("p", {
126
126
  className: "text-center",
127
127
  children: c
128
- }), e.url != null && /* @__PURE__ */ B(E, {
128
+ }), e.url != null && /* @__PURE__ */ H(E, {
129
129
  href: e.url,
130
130
  target: "_blank",
131
131
  label: l,
132
- className: ye.openInNewTabButton,
132
+ className: ve.openInNewTabButton,
133
133
  textClassName: o
134
134
  })]
135
135
  });
136
- let oe = k ? A : e.url, se = k && A == null ? e.srcdoc : void 0;
137
- return /* @__PURE__ */ V("div", {
136
+ let ae = k ? A : e.url, oe = k && A == null ? e.srcdoc : void 0;
137
+ return /* @__PURE__ */ U("div", {
138
138
  className: "relative h-full",
139
- children: [u && /* @__PURE__ */ B("div", {
139
+ children: [u && /* @__PURE__ */ H("div", {
140
140
  className: "absolute inset-0 flex items-center justify-center",
141
- children: /* @__PURE__ */ B(O, {})
142
- }), /* @__PURE__ */ B("iframe", {
141
+ children: /* @__PURE__ */ H(O, {})
142
+ }), /* @__PURE__ */ H("iframe", {
143
143
  ref: x,
144
144
  title: r,
145
- src: oe,
146
- srcDoc: se,
145
+ src: ae,
146
+ srcDoc: oe,
147
147
  sandbox: k || D ? "allow-scripts" : "allow-scripts allow-same-origin",
148
148
  className: _("h-full w-full border-none", u ? "invisible" : ""),
149
149
  onLoad: te,
150
150
  onError: ne
151
151
  }, ee)]
152
152
  });
153
- }), xe = {
153
+ }), be = {
154
154
  name: "MCP-UI Host",
155
155
  version: "1.0.0"
156
- }, Se = { openLinks: {} }, Ce = (e) => {
156
+ }, xe = { openLinks: {} }, Se = (e) => {
157
157
  let t;
158
158
  try {
159
159
  t = new URL(e);
@@ -167,20 +167,20 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
167
167
  return !1;
168
168
  }
169
169
  return !0;
170
- }, we = (e, t, n) => {
170
+ }, Ce = (e, t, n) => {
171
171
  if (n) {
172
172
  e.style.maxWidth = "", e.style.maxHeight = "";
173
173
  return;
174
174
  }
175
175
  let r = t;
176
176
  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`));
177
- }, Te = (e, t, n) => {
178
- let r = R(e);
179
- I(() => {
177
+ }, we = (e, t, n) => {
178
+ let r = B(e);
179
+ R(() => {
180
180
  r.current = e;
181
181
  });
182
- let [i, a] = z(null), [o, s] = z(!1);
183
- return I(() => {
182
+ let [i, a] = V(null), [o, s] = V(!1);
183
+ return R(() => {
184
184
  let e = null;
185
185
  try {
186
186
  let n = t.current?.getBoundingClientRect(), i = n != null && n.width > 0 && n.height > 0 ? {
@@ -190,15 +190,15 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
190
190
  height: Math.round(n.height)
191
191
  }
192
192
  } : r.current.hostContext;
193
- e = new H(null, r.current.hostInfo ?? xe, Se, { hostContext: i }), e.onopenlink = async ({ url: e }) => {
193
+ e = new W(null, r.current.hostInfo ?? be, xe, { hostContext: i }), e.onopenlink = async ({ url: e }) => {
194
194
  let t = r.current.onOpenLink;
195
- return (t == null ? Ce(e) : t(e)) === !1 ? { isError: !0 } : {};
195
+ return (t == null ? Se(e) : t(e)) === !1 ? { isError: !0 } : {};
196
196
  }, e.onrequestdisplaymode = async ({ mode: e }) => {
197
197
  let t = r.current.onRequestDisplayMode, n = r.current.hostContext?.displayMode ?? "inline";
198
198
  return { mode: t?.(e) ?? n };
199
- }, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(U, ({ params: e }) => {
199
+ }, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(de, ({ params: e }) => {
200
200
  let n = t.current?.querySelector("iframe");
201
- n != null && we(n, e.containerDimensions, r.current.hostContext?.displayMode === "fullscreen");
201
+ n != null && Ce(n, e.containerDimensions, r.current.hostContext?.displayMode === "fullscreen");
202
202
  }), a(e);
203
203
  } catch (e) {
204
204
  console.error("[useMcpAppBridge] Error creating AppBridge:", e), s(!0);
@@ -206,22 +206,22 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
206
206
  return () => {
207
207
  e?.close().catch((e) => console.error("[useMcpAppBridge] Error closing AppBridge:", e));
208
208
  };
209
- }, [t]), I(() => {
209
+ }, [t]), R(() => {
210
210
  i != null && i.transport != null && n != null && i.setHostContext(n);
211
211
  }, [i, n]), {
212
212
  appBridge: i,
213
213
  hasFailed: o
214
214
  };
215
- }, q = {
215
+ }, J = {
216
216
  loadingOverlay: "_loadingOverlay_1kink_2",
217
217
  fullscreenFrame: "_fullscreenFrame_1kink_21",
218
218
  loadingFrame: "_loadingFrame_1kink_29",
219
219
  statusLabel: "_statusLabel_1kink_33",
220
220
  statusDetail: "_statusDetail_1kink_38",
221
221
  errorIcon: "_errorIcon_1kink_42"
222
- }, Ee = ({ content: e, errorLabel: t = "Failed to load app", onAppInfo: n }) => {
223
- let [r, i] = z("loading"), [a, o] = z(), { html: s, sandboxUrl: c, toolInput: l, toolResult: u, hostContext: d } = e, f = L(() => ({ url: new URL(c) }), [c]), p = d?.displayMode === "fullscreen", m = R(null), [h, g] = z();
224
- I(() => {
222
+ }, Te = ({ content: e, errorLabel: t = "Failed to load app", onAppInfo: n }) => {
223
+ let [r, i] = V("loading"), [a, o] = V(), { html: s, sandboxUrl: c, toolInput: l, toolResult: u, hostContext: d } = e, f = z(() => ({ url: new URL(c) }), [c]), p = d?.displayMode === "fullscreen", m = B(null), [h, g] = V();
224
+ R(() => {
225
225
  let e = m.current;
226
226
  if (!e) return;
227
227
  let t = new ResizeObserver(([e]) => {
@@ -234,15 +234,15 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
234
234
  });
235
235
  return t.observe(e), () => t.disconnect();
236
236
  }, []);
237
- let { appBridge: v, hasFailed: y } = Te(e, m, L(() => d == null || h == null ? d : {
237
+ let { appBridge: v, hasFailed: y } = we(e, m, z(() => d == null || h == null ? d : {
238
238
  ...d,
239
239
  containerDimensions: h
240
240
  }, [d, h])), b = y || r === "error";
241
- return /* @__PURE__ */ V("div", {
241
+ return /* @__PURE__ */ U("div", {
242
242
  ref: m,
243
- className: _("relative h-full w-full", b ? "min-h-[160px]" : "min-h-[100px]", p && q.fullscreenFrame, !p && r === "loading" && q.loadingFrame),
243
+ className: _("relative h-full w-full", b ? "min-h-[160px]" : "min-h-[100px]", p && J.fullscreenFrame, !p && r === "loading" && J.loadingFrame),
244
244
  children: [
245
- v != null && !b && /* @__PURE__ */ B(fe, {
245
+ v != null && !b && /* @__PURE__ */ H(ue, {
246
246
  html: s,
247
247
  sandbox: f,
248
248
  appBridge: v,
@@ -256,29 +256,29 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
256
256
  o(e.message), i("error");
257
257
  }
258
258
  }),
259
- !b && r === "loading" && /* @__PURE__ */ B("div", {
260
- className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", q.loadingOverlay),
261
- children: /* @__PURE__ */ B(O, {})
259
+ !b && r === "loading" && /* @__PURE__ */ H("div", {
260
+ className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", J.loadingOverlay),
261
+ children: /* @__PURE__ */ H(O, {})
262
262
  }),
263
- b && /* @__PURE__ */ V("div", {
263
+ b && /* @__PURE__ */ U("div", {
264
264
  className: "absolute inset-0 flex flex-col items-center justify-center gap-2 p-4",
265
- children: [/* @__PURE__ */ B(k, {
265
+ children: [/* @__PURE__ */ H(k, {
266
266
  size: 60,
267
267
  stroke: C,
268
268
  "aria-hidden": !0,
269
- className: q.errorIcon
270
- }), /* @__PURE__ */ V("p", {
269
+ className: J.errorIcon
270
+ }), /* @__PURE__ */ U("p", {
271
271
  role: "status",
272
- className: _("text-center", q.statusLabel),
273
- children: [t, a && /* @__PURE__ */ V(de, { children: [/* @__PURE__ */ B("br", {}), /* @__PURE__ */ B("span", {
274
- className: q.statusDetail,
272
+ className: _("text-center", J.statusLabel),
273
+ children: [t, a && /* @__PURE__ */ U(le, { children: [/* @__PURE__ */ H("br", {}), /* @__PURE__ */ H("span", {
274
+ className: J.statusDetail,
275
275
  children: a
276
276
  })] })]
277
277
  })]
278
278
  })
279
279
  ]
280
280
  });
281
- }, J = {
281
+ }, Y = {
282
282
  viewer: "_viewer_gdafg_2",
283
283
  spreadsheetCanvas: "_spreadsheetCanvas_gdafg_6",
284
284
  formulaPanel: "_formulaPanel_gdafg_12",
@@ -286,13 +286,13 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
286
286
  statusOverlay: "_statusOverlay_gdafg_27",
287
287
  errorIcon: "_errorIcon_gdafg_32",
288
288
  highlight: "_highlight_gdafg_40"
289
- }, De = (e) => {
289
+ }, Ee = (e) => {
290
290
  if (e?.kind !== "range") return "";
291
291
  let { activeCell: t } = e.selection, n = e.cells.find(({ address: e }) => e.row === t.row && e.col === t.col);
292
292
  if (n == null) return "";
293
293
  let r = n.formula;
294
294
  return r == null || r.trim().length === 0 ? n.displayText : r.startsWith("=") ? r : `=${r}`;
295
- }, Y = async (e, t, { onError: n, onXlsxSelectionContextChange: i }) => {
295
+ }, X = async (e, t, { onError: n, onXlsxSelectionContextChange: i }) => {
296
296
  switch (t) {
297
297
  case r.Docx: {
298
298
  let [{ DocxScrollViewer: t }, { chartEx: r }] = await Promise.all([import("@silurus/ooxml/docx"), import("@silurus/ooxml/chart-ex")]);
@@ -314,7 +314,7 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
314
314
  }
315
315
  case r.Csv: {
316
316
  let { XlsxSheetViewer: t } = await import("@silurus/ooxml/xlsx"), r = document.createElement("canvas");
317
- r.className = J.spreadsheetCanvas, e.replaceChildren(r);
317
+ r.className = Y.spreadsheetCanvas, e.replaceChildren(r);
318
318
  let i = new t(r, {
319
319
  showScrollbars: !0,
320
320
  onError: n
@@ -338,7 +338,7 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
338
338
  });
339
339
  }
340
340
  }
341
- }, Oe = async (e, t, n, i) => {
341
+ }, De = async (e, t, n, i) => {
342
342
  let { onError: a, onXlsxSelectionContextChange: o, onGeometryInvalidated: s } = n;
343
343
  switch (t.format) {
344
344
  case r.Docx: {
@@ -347,7 +347,7 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
347
347
  import("@silurus/ooxml/chart-ex"),
348
348
  import("./ooxml-highlight-surfaces-C18JJb0P.js")
349
349
  ]), l = await n.load(t.url, { chartEx: o });
350
- if (i()) throw l.destroy(), new ke();
350
+ if (i()) throw l.destroy(), new Oe();
351
351
  let u = r.fromDocument(e, l, {
352
352
  enableTextSelection: !0,
353
353
  refitOnResize: !0,
@@ -367,7 +367,7 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
367
367
  import("@silurus/ooxml/chart-ex"),
368
368
  import("./ooxml-highlight-surfaces-C18JJb0P.js")
369
369
  ]), l = await n.load(t.url, { chartEx: o });
370
- if (i()) throw l.destroy(), new ke();
370
+ if (i()) throw l.destroy(), new Oe();
371
371
  let u = r.fromPresentation(e, l, {
372
372
  enableTextSelection: !0,
373
373
  refitOnResize: !0,
@@ -401,15 +401,15 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
401
401
  };
402
402
  }
403
403
  case r.Csv: {
404
- let r = await Y(e, t.format, n);
404
+ let r = await X(e, t.format, n);
405
405
  return await r.load(t.url), { viewer: r };
406
406
  }
407
407
  }
408
- }, ke = class extends Error {}, Ae = ({ content: t, fileName: n, loadErrorLabel: i, formulaLabel: a, formulaLabelClassName: o, formulaValueClassName: s, highlightsLabel: c = "Cited locations", highlightNavigatedLabel: l = "Scrolled to the cited location" }) => {
409
- let u = R(null), [d, f] = z(!0), [p, m] = z(!1), [h, g] = z(""), [v, y] = z([]), [b, x] = z(!1), { highlights: S, selectedHighlightId: w } = t, ee = S != null && S.length > 0, T = R(void 0), E = R(S);
408
+ }, Oe = class extends Error {}, ke = ({ content: t, fileName: n, loadErrorLabel: i, formulaLabel: a, formulaLabelClassName: o, formulaValueClassName: s, highlightsLabel: c = "Cited locations", highlightNavigatedLabel: l = "Scrolled to the cited location" }) => {
409
+ let u = B(null), [d, f] = V(!0), [p, m] = V(!1), [h, g] = V(""), [v, y] = V([]), [b, x] = V(!1), { highlights: S, selectedHighlightId: w } = t, ee = S != null && S.length > 0, T = B(void 0), E = B(S);
410
410
  E.current = S;
411
- let A = R(void 0);
412
- return I(() => {
411
+ let A = B(void 0);
412
+ return R(() => {
413
413
  let e = u.current;
414
414
  if (e == null) return;
415
415
  let n, r, i = !1, a, o = () => i;
@@ -431,7 +431,7 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
431
431
  i || (f(!1), m(!0));
432
432
  },
433
433
  onXlsxSelectionContextChange: (e) => {
434
- i || g(De(e));
434
+ i || g(Ee(e));
435
435
  },
436
436
  onGeometryInvalidated: s
437
437
  }, d = () => {
@@ -442,14 +442,14 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
442
442
  return e.addEventListener("scroll", s, !0), A.current = s, (async () => {
443
443
  try {
444
444
  if (ee) {
445
- let r = await Oe(e, t, l, o);
445
+ let r = await De(e, t, l, o);
446
446
  if (i) {
447
447
  r.viewer.destroy(), r.engine?.destroy();
448
448
  return;
449
449
  }
450
450
  n = r, T.current = r.highlights, d();
451
451
  } else {
452
- let r = await Y(e, t.format, l);
452
+ let r = await X(e, t.format, l);
453
453
  if (i) {
454
454
  r.destroy();
455
455
  return;
@@ -460,7 +460,7 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
460
460
  if (i) return;
461
461
  f(!1), await c();
462
462
  } catch (t) {
463
- if (t instanceof ke || i) return;
463
+ if (t instanceof Oe || i) return;
464
464
  n?.viewer.destroy(), n?.engine?.destroy(), n = void 0, T.current = void 0, e.replaceChildren(), f(!1), m(!0);
465
465
  }
466
466
  })(), () => {
@@ -470,9 +470,9 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
470
470
  t.format,
471
471
  t.url,
472
472
  ee
473
- ]), I(() => {
473
+ ]), R(() => {
474
474
  A.current?.();
475
- }, [S]), I(() => {
475
+ }, [S]), R(() => {
476
476
  x(!1);
477
477
  let t = T.current;
478
478
  if (t == null || d) return;
@@ -490,38 +490,38 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
490
490
  })(), () => {
491
491
  r = !0;
492
492
  };
493
- }, [w, d]), /* @__PURE__ */ V("div", {
493
+ }, [w, d]), /* @__PURE__ */ U("div", {
494
494
  className: "relative flex h-full w-full min-w-0 flex-col overflow-hidden",
495
495
  children: [
496
- t.format === r.Xlsx && /* @__PURE__ */ V("div", {
496
+ t.format === r.Xlsx && /* @__PURE__ */ U("div", {
497
497
  role: "region",
498
498
  "aria-label": a,
499
- className: _("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", J.formulaPanel),
500
- children: [/* @__PURE__ */ B("span", {
499
+ className: _("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", Y.formulaPanel),
500
+ children: [/* @__PURE__ */ H("span", {
501
501
  "aria-hidden": "true",
502
502
  className: _("shrink-0", o),
503
503
  children: "fx"
504
- }), /* @__PURE__ */ B("code", {
504
+ }), /* @__PURE__ */ H("code", {
505
505
  dir: "ltr",
506
506
  tabIndex: 0,
507
507
  "aria-live": "polite",
508
- className: _("h-8 min-w-0 flex-1 overflow-x-auto rounded border px-2 py-1 whitespace-nowrap focus-visible:outline", J.formulaValue, s),
508
+ className: _("h-8 min-w-0 flex-1 overflow-x-auto rounded border px-2 py-1 whitespace-nowrap focus-visible:outline", Y.formulaValue, s),
509
509
  children: h
510
510
  })]
511
511
  }),
512
- /* @__PURE__ */ V("div", {
512
+ /* @__PURE__ */ U("div", {
513
513
  className: "relative min-h-0 w-full flex-1",
514
- children: [/* @__PURE__ */ B("div", {
514
+ children: [/* @__PURE__ */ H("div", {
515
515
  ref: u,
516
516
  role: "document",
517
517
  "aria-label": n,
518
518
  "aria-busy": d,
519
- className: _("h-full w-full overflow-hidden", J.viewer)
520
- }), v.length > 0 && /* @__PURE__ */ B("div", {
519
+ className: _("h-full w-full overflow-hidden", Y.viewer)
520
+ }), v.length > 0 && /* @__PURE__ */ H("div", {
521
521
  role: "region",
522
522
  "aria-label": c,
523
523
  className: "pointer-events-none absolute inset-0 overflow-hidden",
524
- children: v.map((e, t) => /* @__PURE__ */ B("div", {
524
+ children: v.map((e, t) => /* @__PURE__ */ H("div", {
525
525
  "aria-hidden": "true",
526
526
  style: {
527
527
  left: `${e.left}px`,
@@ -531,26 +531,26 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
531
531
  },
532
532
  "data-selected": e.highlightId === w,
533
533
  "data-clipped": e.isClippedAtEnd === !0,
534
- className: _("absolute", J.highlight)
534
+ className: _("absolute", Y.highlight)
535
535
  }, `${e.highlightId}-${t}`))
536
536
  })]
537
537
  }),
538
- /* @__PURE__ */ B(D, {
538
+ /* @__PURE__ */ H(D, {
539
539
  visuallyHidden: !0,
540
540
  children: b ? l : ""
541
541
  }),
542
- (d || p) && /* @__PURE__ */ B("div", {
542
+ (d || p) && /* @__PURE__ */ H("div", {
543
543
  role: p ? "alert" : void 0,
544
544
  "aria-live": "polite",
545
- className: _("absolute inset-0 flex items-center justify-center", J.statusOverlay),
546
- children: d ? /* @__PURE__ */ B(O, { size: 48 }) : /* @__PURE__ */ V("div", {
545
+ className: _("absolute inset-0 flex items-center justify-center", Y.statusOverlay),
546
+ children: d ? /* @__PURE__ */ H(O, { size: 48 }) : /* @__PURE__ */ U("div", {
547
547
  className: "flex flex-col items-center gap-2",
548
- children: [/* @__PURE__ */ B(k, {
548
+ children: [/* @__PURE__ */ H(k, {
549
549
  "aria-hidden": "true",
550
550
  size: 60,
551
551
  stroke: C,
552
- className: J.errorIcon
553
- }), /* @__PURE__ */ B("p", {
552
+ className: Y.errorIcon
553
+ }), /* @__PURE__ */ H("p", {
554
554
  className: "text-center",
555
555
  children: i
556
556
  })]
@@ -558,12 +558,12 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
558
558
  })
559
559
  ]
560
560
  });
561
- }, je = (e, t) => {
561
+ }, Ae = (e, t) => {
562
562
  let n = e.toLowerCase();
563
563
  return t.find((e) => e.contentType.split(",").some((e) => e.trim().toLowerCase() === n && e.trim() !== ""));
564
- }, Me = (e, t) => {
564
+ }, je = (e, t) => {
565
565
  if (e != null && e !== "") return Object.prototype.hasOwnProperty.call(t, e) ? t[e] : void 0;
566
- }, Ne = (e) => `${e}:grouped-visualizer`, Pe = (e, t) => {
566
+ }, Me = (e) => `${e}:grouped-visualizer`, Ne = (e, t) => {
567
567
  let n = (t.contentType ?? "").split(",").map((e) => e.trim().toLowerCase()).filter((e) => e !== ""), r = [], i = [];
568
568
  return e.forEach((e) => {
569
569
  e.url != null && e.url !== "" && (n.length === 0 || n.includes(e.contentType.toLowerCase())) ? r.push(e) : i.push(e);
@@ -571,34 +571,34 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
571
571
  claimed: r,
572
572
  unclaimed: i
573
573
  };
574
- }, Fe = (e) => {
574
+ }, Pe = (e) => {
575
575
  if (typeof e != "object" || !e || !Object.prototype.hasOwnProperty.call(e, "message")) return;
576
576
  let { message: t } = e;
577
577
  return typeof t == "string" && t.trim() !== "" ? t : void 0;
578
- }, Ie = {
578
+ }, Fe = {
579
579
  loadingOverlay: "_loadingOverlay_12637_1",
580
580
  statusLabel: "_statusLabel_12637_5",
581
581
  errorIcon: "_errorIcon_12637_9"
582
- }, Le = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a, onSendMessage: o }) => {
583
- let s = R(null), [c, l] = z("loading"), { url: u, visualizerName: d, requestTimeout: f } = e, p = R(e);
582
+ }, Ie = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a, onSendMessage: o }) => {
583
+ let s = B(null), [c, l] = V("loading"), { url: u, visualizerName: d, requestTimeout: f } = e, p = B(e);
584
584
  p.current = e;
585
- let h = R(o);
586
- return h.current = o, I(() => {
585
+ let h = B(o);
586
+ return h.current = o, R(() => {
587
587
  let e = s.current;
588
588
  if (!e) return;
589
589
  l("loading");
590
- let t = new W(e, {
590
+ let t = new G(e, {
591
591
  domain: u,
592
592
  visualizerName: d,
593
593
  requestTimeout: f
594
- }), n = !0, r = t.subscribe(`${d}/${pe.SendMessage}`, (e) => {
595
- let t = Fe(e);
594
+ }), n = !0, r = t.subscribe(`${d}/${fe.SendMessage}`, (e) => {
595
+ let t = Pe(e);
596
596
  t != null && h.current?.(t);
597
597
  });
598
598
  return (async () => {
599
599
  if (await t.ready(), !n) return;
600
600
  let e = p.current;
601
- if (e.type === i.GroupedVisualizer) await t.send(me.SendGroupedVisualizeData, {
601
+ if (e.type === i.GroupedVisualizer) await t.send(pe.SendGroupedVisualizeData, {
602
602
  attachments: e.attachments,
603
603
  layout: e.layout
604
604
  });
@@ -607,7 +607,7 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
607
607
  layout: r,
608
608
  ...typeof i == "object" && i ? i : {}
609
609
  };
610
- await t.send(me.SendVisualizeData, {
610
+ await t.send(pe.SendVisualizeData, {
611
611
  mimeType: n,
612
612
  visualizerData: a
613
613
  });
@@ -622,7 +622,7 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
622
622
  u,
623
623
  d,
624
624
  f
625
- ]), I(() => {
625
+ ]), R(() => {
626
626
  let e = r ?? d.trim();
627
627
  e !== "" && s.current?.querySelector("iframe")?.setAttribute("title", e);
628
628
  }, [
@@ -630,7 +630,7 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
630
630
  d,
631
631
  u,
632
632
  f
633
- ]), /* @__PURE__ */ V("div", {
633
+ ]), /* @__PURE__ */ U("div", {
634
634
  className: "relative h-full w-full",
635
635
  style: m({
636
636
  "--vs-loading-bg": a?.loadingBackground,
@@ -638,33 +638,33 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
638
638
  "--vs-error-icon": a?.errorIcon
639
639
  }),
640
640
  children: [
641
- /* @__PURE__ */ B("div", {
641
+ /* @__PURE__ */ H("div", {
642
642
  ref: s,
643
643
  className: "h-full w-full"
644
644
  }),
645
- c === "loading" && /* @__PURE__ */ V("div", {
646
- className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", Ie.loadingOverlay),
647
- children: [/* @__PURE__ */ B(O, {}), t && /* @__PURE__ */ B("p", {
648
- className: _("text-center", Ie.statusLabel),
645
+ c === "loading" && /* @__PURE__ */ U("div", {
646
+ className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", Fe.loadingOverlay),
647
+ children: [/* @__PURE__ */ H(O, {}), t && /* @__PURE__ */ H("p", {
648
+ className: _("text-center", Fe.statusLabel),
649
649
  children: t
650
650
  })]
651
651
  }),
652
- c === "error" && /* @__PURE__ */ V("div", {
652
+ c === "error" && /* @__PURE__ */ U("div", {
653
653
  className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
654
- children: [/* @__PURE__ */ B(k, {
654
+ children: [/* @__PURE__ */ H(k, {
655
655
  size: 60,
656
656
  stroke: C,
657
657
  "aria-hidden": !0,
658
- className: Ie.errorIcon
659
- }), /* @__PURE__ */ B("p", {
658
+ className: Fe.errorIcon
659
+ }), /* @__PURE__ */ H("p", {
660
660
  role: "status",
661
- className: _("text-center", Ie.statusLabel),
661
+ className: _("text-center", Fe.statusLabel),
662
662
  children: n
663
663
  })]
664
664
  })
665
665
  ]
666
666
  });
667
- }, X = {
667
+ }, Z = {
668
668
  body: "_body_fvnln_4",
669
669
  statusLabel: "_statusLabel_fvnln_13",
670
670
  errorIcon: "_errorIcon_fvnln_17",
@@ -679,73 +679,73 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
679
679
  jsonExpandIcon: "_jsonExpandIcon_fvnln_54",
680
680
  jsonCollapseIcon: "_jsonCollapseIcon_fvnln_67",
681
681
  jsonCollapsedContent: "_jsonCollapsedContent_fvnln_84"
682
- }, Re = () => N(async () => ({ default: (await import("./PdfContent-CyCIPzRp.js")).PdfContent })), ze = ({ url: e, fileName: t, loadErrorLabel: n }) => {
683
- let [r, i] = z(!1);
684
- return I(() => {
682
+ }, Le = () => P(async () => ({ default: (await import("./PdfContent-CyCIPzRp.js")).PdfContent })), Re = ({ url: e, fileName: t, loadErrorLabel: n }) => {
683
+ let [r, i] = V(!1);
684
+ return R(() => {
685
685
  i(!1);
686
- }, [e]), r ? /* @__PURE__ */ V("div", {
686
+ }, [e]), r ? /* @__PURE__ */ U("div", {
687
687
  className: "flex flex-col items-center gap-2",
688
- children: [/* @__PURE__ */ B(k, {
688
+ children: [/* @__PURE__ */ H(k, {
689
689
  size: 60,
690
690
  stroke: C,
691
- className: X.errorIcon
692
- }), /* @__PURE__ */ B("p", {
693
- className: _("text-center", X.statusLabel),
691
+ className: Z.errorIcon
692
+ }), /* @__PURE__ */ H("p", {
693
+ className: _("text-center", Z.statusLabel),
694
694
  children: n
695
695
  })]
696
- }) : /* @__PURE__ */ B("img", {
696
+ }) : /* @__PURE__ */ H("img", {
697
697
  src: e,
698
698
  alt: t ?? "",
699
699
  className: "max-h-full max-w-full object-contain",
700
700
  onError: () => i(!0)
701
701
  });
702
- }, Be = P(({ 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", loadErrorRetryLabel: l = "Retry", forbiddenErrorLabel: d = "You don't have permission to access this file", visualizerErrorLabel: f, htmlFrameBlockedLabel: h = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: g = "Open in new tab", pdfThumbnailsLabel: v, pdfShowThumbnailsLabel: y, pdfHideThumbnailsLabel: b, pdfPageNumberLabel: x, pdfContentLoadingLabel: S, pdfContentErrorLabel: w, pdfContentRetryLabel: T, xlsxFormulaLabel: E = "Formula", codeContentLoadingLabel: D, codeContentErrorLabel: A, codeContentRetryLabel: j, tableCopyLabel: te, tableCopiedLabel: ne, tableDownloadCsvLabel: re, codeBlockCopyLabel: ie, codeBlockCopiedLabel: oe, codeBlockDownloadLabel: se, tableScrollRegionAriaLabel: M, mathScrollRegionAriaLabel: N, ooxmlHighlightsLabel: P, ooxmlHighlightNavigatedLabel: ce } = {}, styles: de, codeBlockTheme: H, tableDownloadFilename: fe, loadPdf: U, hidePdfToolbar: W = !1, configurePdfWorker: pe, onAppInfo: me, onRetry: he, onVisualizerSendMessage: ge }) => {
703
- let { colors: G, typography: K, bodyClassName: ve, cssVars: ye } = de ?? {}, [xe, Se] = z(0), Ce = L(Re, [xe]), we = F(() => {
704
- Se((e) => e + 1);
705
- }, []), Te = R(void 0), [q, J] = z(0), De = F((e) => {
706
- Te.current = e;
702
+ }, 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", loadErrorRetryLabel: l = "Retry", forbiddenErrorLabel: d = "You don't have permission to access this file", visualizerErrorLabel: f, htmlFrameBlockedLabel: h = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: g = "Open in new tab", pdfThumbnailsLabel: v, pdfShowThumbnailsLabel: y, pdfHideThumbnailsLabel: b, pdfPageNumberLabel: x, pdfContentLoadingLabel: S, pdfContentErrorLabel: w, pdfContentRetryLabel: T, xlsxFormulaLabel: E = "Formula", codeContentLoadingLabel: D, codeContentErrorLabel: A, codeContentRetryLabel: j, tableCopyLabel: te, tableCopiedLabel: ne, tableDownloadCsvLabel: M, codeBlockCopyLabel: re, codeBlockCopiedLabel: ae, codeBlockDownloadLabel: oe, tableScrollRegionAriaLabel: N, mathScrollRegionAriaLabel: P, ooxmlHighlightsLabel: F, ooxmlHighlightNavigatedLabel: L } = {}, styles: le, codeBlockTheme: W, tableDownloadFilename: ue, loadPdf: de, hidePdfToolbar: G = !1, configurePdfWorker: fe, onAppInfo: pe, onRetry: me, onVisualizerSendMessage: he }) => {
703
+ let { colors: K, typography: q, bodyClassName: _e, cssVars: ve } = le ?? {}, [be, xe] = V(0), Se = z(Le, [be]), Ce = I(() => {
704
+ xe((e) => e + 1);
705
+ }, []), we = B(void 0), [J, Y] = V(0), Ee = I((e) => {
706
+ we.current = e;
707
707
  }, []);
708
- I(() => {
709
- let t = Te.current;
710
- t != null && (Te.current = void 0, e.type === i.Pdf && e.url === t && J((e) => e + 1));
708
+ R(() => {
709
+ let t = we.current;
710
+ t != null && (we.current = void 0, e.type === i.Pdf && e.url === t && Y((e) => e + 1));
711
711
  }, [e]);
712
- let Y = K?.fontClassName != null, Oe = L(() => ({
712
+ let X = q?.fontClassName != null, De = z(() => ({
713
713
  ...m({
714
- "--ac-text": G?.text,
715
- "--ac-status-text": G?.statusText,
716
- "--ac-error-icon": G?.errorIcon,
717
- "--ac-open-in-new-tab-text": G?.openInNewTabText,
718
- "--ac-json-border": G?.jsonBorder,
719
- "--ac-json-bg": G?.jsonBackground,
720
- "--ac-json-label": G?.jsonLabel,
721
- "--ac-json-clickable-label": G?.jsonClickableLabel,
722
- "--ac-json-punctuation": G?.jsonPunctuation,
723
- "--ac-json-string": G?.jsonString,
724
- "--ac-json-number": G?.jsonNumber,
725
- "--ac-json-boolean": G?.jsonBoolean,
726
- "--ac-json-null": G?.jsonNull,
727
- "--ac-json-toggle-icon": G?.jsonToggleIcon,
728
- "--ac-json-toggle-icon-hover": G?.jsonToggleIconHover,
729
- "--ac-ooxml-bg": G?.ooxmlBackground,
730
- "--ac-ooxml-formula-border": G?.ooxmlFormulaBorder,
731
- "--ac-ooxml-formula-bg": G?.ooxmlFormulaBackground,
732
- "--ac-ooxml-formula-text": G?.ooxmlFormulaText,
733
- "--ac-ooxml-highlight-border": G?.ooxmlHighlightBorder,
734
- "--ac-ooxml-highlight-bg": G?.ooxmlHighlightBackground,
735
- "--ac-json-collapsed-text": G?.jsonCollapsedText,
736
- "--ac-json-collapsed-bg": G?.jsonCollapsedBackground,
737
- "--ac-focus-outline": G?.focusOutline,
738
- "--ac-code-bg": G?.codeBackground,
739
- "--ac-mcp-app-loading-bg": G?.mcpAppLoadingBackground,
740
- "--ac-mcp-app-status-text": G?.mcpAppStatusText,
741
- "--ac-font-family": Y ? void 0 : K?.fontFamily,
742
- "--ac-font-size": Y ? void 0 : K?.fontSize,
743
- "--ac-font-weight": Y ? void 0 : K?.fontWeight,
744
- "--ac-line-height": Y ? void 0 : K?.lineHeight,
745
- "--ac-letter-spacing": Y ? void 0 : K?.letterSpacing
714
+ "--ac-text": K?.text,
715
+ "--ac-status-text": K?.statusText,
716
+ "--ac-error-icon": K?.errorIcon,
717
+ "--ac-open-in-new-tab-text": K?.openInNewTabText,
718
+ "--ac-json-border": K?.jsonBorder,
719
+ "--ac-json-bg": K?.jsonBackground,
720
+ "--ac-json-label": K?.jsonLabel,
721
+ "--ac-json-clickable-label": K?.jsonClickableLabel,
722
+ "--ac-json-punctuation": K?.jsonPunctuation,
723
+ "--ac-json-string": K?.jsonString,
724
+ "--ac-json-number": K?.jsonNumber,
725
+ "--ac-json-boolean": K?.jsonBoolean,
726
+ "--ac-json-null": K?.jsonNull,
727
+ "--ac-json-toggle-icon": K?.jsonToggleIcon,
728
+ "--ac-json-toggle-icon-hover": K?.jsonToggleIconHover,
729
+ "--ac-ooxml-bg": K?.ooxmlBackground,
730
+ "--ac-ooxml-formula-border": K?.ooxmlFormulaBorder,
731
+ "--ac-ooxml-formula-bg": K?.ooxmlFormulaBackground,
732
+ "--ac-ooxml-formula-text": K?.ooxmlFormulaText,
733
+ "--ac-ooxml-highlight-border": K?.ooxmlHighlightBorder,
734
+ "--ac-ooxml-highlight-bg": K?.ooxmlHighlightBackground,
735
+ "--ac-json-collapsed-text": K?.jsonCollapsedText,
736
+ "--ac-json-collapsed-bg": K?.jsonCollapsedBackground,
737
+ "--ac-focus-outline": K?.focusOutline,
738
+ "--ac-code-bg": K?.codeBackground,
739
+ "--ac-mcp-app-loading-bg": K?.mcpAppLoadingBackground,
740
+ "--ac-mcp-app-status-text": K?.mcpAppStatusText,
741
+ "--ac-font-family": X ? void 0 : q?.fontFamily,
742
+ "--ac-font-size": X ? void 0 : q?.fontSize,
743
+ "--ac-font-weight": X ? void 0 : q?.fontWeight,
744
+ "--ac-line-height": X ? void 0 : q?.lineHeight,
745
+ "--ac-letter-spacing": X ? void 0 : q?.letterSpacing
746
746
  }),
747
- ...ye
748
- }), [de]), ke = L(() => {
747
+ ...ve
748
+ }), [le]), Oe = z(() => {
749
749
  switch (e.type) {
750
750
  case i.Image:
751
751
  case i.Audio:
@@ -763,52 +763,52 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
763
763
  case i.MarkdownTable: return "flex h-full min-h-0 flex-col overflow-hidden p-4";
764
764
  default: return "h-full overflow-auto p-4";
765
765
  }
766
- }, [e.type]), je = L(() => {
766
+ }, [e.type]), Ae = z(() => {
767
767
  switch (e.type) {
768
- case i.PlainText: return /* @__PURE__ */ B("pre", {
769
- className: _("wrap-break-word whitespace-pre-wrap", X.body, K?.fontClassName),
768
+ case i.PlainText: return /* @__PURE__ */ H("pre", {
769
+ className: _("wrap-break-word whitespace-pre-wrap", Z.body, q?.fontClassName),
770
770
  children: e.text
771
771
  });
772
- case i.Image: return /* @__PURE__ */ B(ze, {
772
+ case i.Image: return /* @__PURE__ */ H(Re, {
773
773
  url: e.url,
774
774
  fileName: r,
775
775
  loadErrorLabel: c
776
776
  });
777
- case i.Audio: return /* @__PURE__ */ B("audio", {
777
+ case i.Audio: return /* @__PURE__ */ H("audio", {
778
778
  controls: !0,
779
779
  controlsList: "nodownload",
780
780
  src: e.url,
781
781
  "aria-label": r ?? "Audio attachment",
782
782
  className: "w-full max-w-sm",
783
783
  preload: "metadata",
784
- children: e.mimeType && /* @__PURE__ */ B("source", {
784
+ children: e.mimeType && /* @__PURE__ */ H("source", {
785
785
  src: e.url,
786
786
  type: e.mimeType
787
787
  })
788
788
  });
789
- case i.Markdown: return /* @__PURE__ */ B("div", {
789
+ case i.Markdown: return /* @__PURE__ */ H("div", {
790
790
  className: "p-4",
791
- children: /* @__PURE__ */ B(p, {
791
+ children: /* @__PURE__ */ H(p, {
792
792
  content: e.text,
793
793
  isStreaming: !1,
794
- codeBlockTheme: H,
795
- codeBlockCopyLabel: ie,
796
- codeBlockCopiedLabel: oe,
797
- codeBlockDownloadLabel: se,
798
- tableScrollRegionAriaLabel: M,
799
- mathScrollRegionAriaLabel: N,
794
+ codeBlockTheme: W,
795
+ codeBlockCopyLabel: re,
796
+ codeBlockCopiedLabel: ae,
797
+ codeBlockDownloadLabel: oe,
798
+ tableScrollRegionAriaLabel: N,
799
+ mathScrollRegionAriaLabel: P,
800
800
  classNames: u
801
801
  })
802
802
  });
803
- case i.MarkdownTable: return /* @__PURE__ */ B(p, {
803
+ case i.MarkdownTable: return /* @__PURE__ */ H(p, {
804
804
  content: e.text,
805
805
  isStreaming: !1,
806
- codeBlockTheme: H,
807
- codeBlockCopyLabel: ie,
808
- codeBlockCopiedLabel: oe,
809
- codeBlockDownloadLabel: se,
810
- tableScrollRegionAriaLabel: M,
811
- mathScrollRegionAriaLabel: N,
806
+ codeBlockTheme: W,
807
+ codeBlockCopyLabel: re,
808
+ codeBlockCopiedLabel: ae,
809
+ codeBlockDownloadLabel: oe,
810
+ tableScrollRegionAriaLabel: N,
811
+ mathScrollRegionAriaLabel: P,
812
812
  containerClassName: "flex h-full min-h-0 flex-col",
813
813
  classNames: {
814
814
  ...u,
@@ -818,52 +818,52 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
818
818
  tableActionLabels: {
819
819
  copyLabel: te,
820
820
  copiedLabel: ne,
821
- downloadCsvLabel: re
821
+ downloadCsvLabel: M
822
822
  },
823
- tableDownloadFilename: fe
823
+ tableDownloadFilename: ue
824
824
  });
825
825
  case i.Json: {
826
- let t = K?.jsonLabelClassName ?? (K?.jsonClassName ? void 0 : "dial-code-semi-text");
827
- return /* @__PURE__ */ B("div", {
826
+ let t = q?.jsonLabelClassName ?? (q?.jsonClassName ? void 0 : "dial-code-semi-text");
827
+ return /* @__PURE__ */ H("div", {
828
828
  dir: "ltr",
829
829
  className: "h-full overflow-auto",
830
- children: /* @__PURE__ */ B("div", {
831
- className: _("m-3 overflow-auto rounded-md border", X.jsonWrapper),
832
- children: /* @__PURE__ */ B(le, {
830
+ children: /* @__PURE__ */ H("div", {
831
+ className: _("m-3 overflow-auto rounded-md border", Z.jsonWrapper),
832
+ children: /* @__PURE__ */ H(se, {
833
833
  data: e.value,
834
834
  style: {
835
- container: _("whitespace-pre-wrap wrap-break-word p-2", K?.jsonClassName ?? "dial-code-text"),
836
- basicChildStyle: ue.basicChildStyle,
835
+ container: _("whitespace-pre-wrap wrap-break-word p-2", q?.jsonClassName ?? "dial-code-text"),
836
+ basicChildStyle: ce.basicChildStyle,
837
837
  childFieldsContainer: "m-0 ps-3",
838
- label: _("me-1", t, X.jsonLabel),
839
- clickableLabel: _("me-1 cursor-pointer hover:underline", t, X.jsonClickableLabel),
840
- nullValue: _("italic", X.jsonNullValue),
841
- undefinedValue: _("italic", X.jsonNullValue),
842
- stringValue: X.jsonStringValue,
843
- booleanValue: X.jsonBooleanValue,
844
- numberValue: X.jsonNumberValue,
845
- otherValue: _("italic", X.jsonNullValue),
846
- punctuation: _("me-1", X.jsonPunctuation),
847
- collapseIcon: _("me-1 cursor-pointer select-none transition-colors", X.jsonCollapseIcon),
848
- expandIcon: _("me-1 cursor-pointer select-none transition-colors", X.jsonExpandIcon),
849
- collapsedContent: _(K?.jsonCollapsedClassName ?? "dial-caption-text", "me-1 cursor-pointer rounded px-1", X.jsonCollapsedContent)
838
+ label: _("me-1", t, Z.jsonLabel),
839
+ clickableLabel: _("me-1 cursor-pointer hover:underline", t, Z.jsonClickableLabel),
840
+ nullValue: _("italic", Z.jsonNullValue),
841
+ undefinedValue: _("italic", Z.jsonNullValue),
842
+ stringValue: Z.jsonStringValue,
843
+ booleanValue: Z.jsonBooleanValue,
844
+ numberValue: Z.jsonNumberValue,
845
+ otherValue: _("italic", Z.jsonNullValue),
846
+ punctuation: _("me-1", Z.jsonPunctuation),
847
+ collapseIcon: _("me-1 cursor-pointer select-none transition-colors", Z.jsonCollapseIcon),
848
+ expandIcon: _("me-1 cursor-pointer select-none transition-colors", Z.jsonExpandIcon),
849
+ collapsedContent: _(q?.jsonCollapsedClassName ?? "dial-caption-text", "me-1 cursor-pointer rounded px-1", Z.jsonCollapsedContent)
850
850
  }
851
851
  })
852
852
  })
853
853
  });
854
854
  }
855
- case i.Code: return /* @__PURE__ */ B(_e, {
855
+ case i.Code: return /* @__PURE__ */ H(ge, {
856
856
  content: e,
857
- codeBlockTheme: H,
858
- codeClassName: K?.codeClassName,
859
- errorLabelClassName: K?.errorMessageClassName,
857
+ codeBlockTheme: W,
858
+ codeClassName: q?.codeClassName,
859
+ errorLabelClassName: q?.errorMessageClassName,
860
860
  labels: {
861
861
  loadingLabel: D,
862
862
  errorLabel: A,
863
863
  retryLabel: j
864
864
  }
865
865
  });
866
- case i.Html: return /* @__PURE__ */ B(be, {
866
+ case i.Html: return /* @__PURE__ */ H(ye, {
867
867
  content: e,
868
868
  labels: {
869
869
  htmlFrameBlockedLabel: h,
@@ -871,29 +871,29 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
871
871
  },
872
872
  isSourceView: a,
873
873
  title: r,
874
- codeBlockTheme: H,
875
- codeClassName: K?.codeClassName
874
+ codeBlockTheme: W,
875
+ codeClassName: q?.codeClassName
876
876
  });
877
- case i.Pdf: return /* @__PURE__ */ B(s, {
878
- retryKey: xe,
879
- onRetry: we,
880
- errorLabelClassName: K?.errorMessageClassName,
877
+ case i.Pdf: return /* @__PURE__ */ H(s, {
878
+ retryKey: be,
879
+ onRetry: Ce,
880
+ errorLabelClassName: q?.errorMessageClassName,
881
881
  labels: {
882
882
  loadingLabel: S,
883
883
  errorLabel: w,
884
884
  retryLabel: T
885
885
  },
886
- children: /* @__PURE__ */ B(Ce, {
886
+ children: /* @__PURE__ */ H(Se, {
887
887
  fileName: r,
888
888
  url: e.url,
889
889
  highlights: e.highlights ?? [],
890
890
  selectedHighlightId: e.selectedHighlightId,
891
891
  selectedPageNumber: e.page,
892
- loadPdf: U,
893
- onLoadError: De,
894
- hideHeader: W,
895
- configurePdfWorker: pe,
896
- errorLabelClassName: K?.errorMessageClassName,
892
+ loadPdf: de,
893
+ onLoadError: Ee,
894
+ hideHeader: G,
895
+ configurePdfWorker: fe,
896
+ errorLabelClassName: q?.errorMessageClassName,
897
897
  labels: {
898
898
  thumbnailsLabel: v,
899
899
  showThumbnailsLabel: y,
@@ -904,48 +904,48 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
904
904
  retryLabel: T
905
905
  }
906
906
  })
907
- }, `${e.url}#${q}`);
908
- case i.Ooxml: return /* @__PURE__ */ B(Ae, {
907
+ }, `${e.url}#${J}`);
908
+ case i.Ooxml: return /* @__PURE__ */ H(ke, {
909
909
  content: e,
910
910
  fileName: r,
911
911
  loadErrorLabel: c,
912
912
  formulaLabel: E,
913
- formulaLabelClassName: K?.xlsxFormulaLabelClassName ?? "dial-italic-text",
914
- formulaValueClassName: K?.xlsxFormulaValueClassName ?? "dial-code-text",
915
- highlightsLabel: P,
916
- highlightNavigatedLabel: ce
913
+ formulaLabelClassName: q?.xlsxFormulaLabelClassName ?? "dial-italic-text",
914
+ formulaValueClassName: q?.xlsxFormulaValueClassName ?? "dial-code-text",
915
+ highlightsLabel: F,
916
+ highlightNavigatedLabel: L
917
917
  });
918
918
  case i.Visualizer:
919
- case i.GroupedVisualizer: return /* @__PURE__ */ B(Le, {
919
+ case i.GroupedVisualizer: return /* @__PURE__ */ H(Ie, {
920
920
  content: e,
921
921
  errorLabel: f,
922
- onSendMessage: ge
922
+ onSendMessage: he
923
923
  });
924
- case i.McpApp: return /* @__PURE__ */ B(Ee, {
924
+ case i.McpApp: return /* @__PURE__ */ H(Te, {
925
925
  content: e,
926
- onAppInfo: me
926
+ onAppInfo: pe
927
927
  });
928
- case i.Unsupported: return /* @__PURE__ */ B("p", {
929
- className: _("text-center", X.statusLabel),
928
+ case i.Unsupported: return /* @__PURE__ */ H("p", {
929
+ className: _("text-center", Z.statusLabel),
930
930
  children: o
931
931
  });
932
932
  case i.Error: {
933
933
  let t = e.errorType === n.Forbidden;
934
- return /* @__PURE__ */ V("div", {
934
+ return /* @__PURE__ */ U("div", {
935
935
  className: "flex flex-col items-center gap-2",
936
936
  children: [
937
- B(t ? ae : k, {
937
+ H(t ? ie : k, {
938
938
  size: 60,
939
939
  stroke: C,
940
- className: X.errorIcon
940
+ className: Z.errorIcon
941
941
  }),
942
- /* @__PURE__ */ B("p", {
943
- className: _("text-center", X.statusLabel),
942
+ /* @__PURE__ */ H("p", {
943
+ className: _("text-center", Z.statusLabel),
944
944
  children: t ? d : c
945
945
  }),
946
- !t && he != null && /* @__PURE__ */ B(ee, {
946
+ !t && me != null && /* @__PURE__ */ H(ee, {
947
947
  label: l,
948
- onClick: he
948
+ onClick: me
949
949
  })
950
950
  ]
951
951
  });
@@ -953,31 +953,31 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
953
953
  }
954
954
  }, [
955
955
  e,
956
- K?.fontClassName,
957
- K?.jsonClassName,
958
- K?.jsonLabelClassName,
959
- K?.xlsxFormulaLabelClassName,
960
- K?.xlsxFormulaValueClassName,
961
- K?.codeClassName,
962
- K?.jsonCollapsedClassName,
963
- K?.errorMessageClassName,
956
+ q?.fontClassName,
957
+ q?.jsonClassName,
958
+ q?.jsonLabelClassName,
959
+ q?.xlsxFormulaLabelClassName,
960
+ q?.xlsxFormulaValueClassName,
961
+ q?.codeClassName,
962
+ q?.jsonCollapsedClassName,
963
+ q?.errorMessageClassName,
964
964
  r,
965
- H,
965
+ W,
966
966
  o,
967
967
  c,
968
968
  l,
969
969
  d,
970
970
  f,
971
- ge,
971
+ he,
972
972
  h,
973
973
  g,
974
974
  a,
975
+ ue,
976
+ de,
977
+ G,
975
978
  fe,
976
- U,
977
- W,
978
979
  pe,
979
980
  me,
980
- he,
981
981
  v,
982
982
  y,
983
983
  b,
@@ -989,155 +989,156 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
989
989
  D,
990
990
  A,
991
991
  j,
992
+ Se,
993
+ be,
992
994
  Ce,
993
- xe,
994
- we,
995
- q,
996
- De,
995
+ J,
996
+ Ee,
997
997
  te,
998
998
  ne,
999
+ M,
999
1000
  re,
1000
- ie,
1001
+ ae,
1001
1002
  oe,
1002
- se,
1003
- M,
1004
1003
  N,
1005
1004
  P,
1006
- ce
1005
+ F,
1006
+ L
1007
1007
  ]);
1008
- return /* @__PURE__ */ B("div", {
1009
- style: t ? void 0 : Oe,
1010
- className: _(t ? "flex h-full items-center justify-center" : ke, ve),
1011
- children: t ? /* @__PURE__ */ B(O, {}) : je
1008
+ return /* @__PURE__ */ H("div", {
1009
+ style: t ? void 0 : De,
1010
+ className: _(t ? "flex h-full items-center justify-center" : Oe, _e),
1011
+ children: t ? /* @__PURE__ */ H(O, {}) : Ae
1012
1012
  });
1013
- }), Ve = {
1013
+ }), Be = {
1014
1014
  mcpAppDivider: "_mcpAppDivider_1gxed_1",
1015
1015
  mcpAppVersion: "_mcpAppVersion_1gxed_5",
1016
1016
  panelHeader: "_panelHeader_1gxed_9"
1017
- }, He = 2e3, Ue = P(({ isOpen: e, isLoading: t = !1, onClose: n, onRetry: r, content: a, fileName: s, leftActions: c, labels: { ariaLabel: l, closeLabel: u = "Close", resizeLabel: d = "Resize panel", downloadLabel: f = "Download", copyTextLabel: p = "Copy text", copiedTextLabel: h = "Copied!", copyMarkdownLabel: g = "Copy as Markdown", copiedMarkdownLabel: v = "Copied!", copyJsonLabel: y = "Copy as JSON", copiedJsonLabel: w = "Copied!", visualizerErrorLabel: ee, unsupportedLabel: E = "Preview is not supported for this file", loadErrorLabel: D = "Failed to load file", loadErrorRetryLabel: O = "Retry", forbiddenErrorLabel: k = "You don't have permission to access this file", htmlFrameBlockedLabel: A = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: ae = "Open in new tab", htmlViewSourceLabel: M = "View source", htmlViewRenderedLabel: N = "View rendered", mcpAppReloadLabel: P = "Reload", pdfThumbnailsLabel: ce, pdfShowThumbnailsLabel: le, pdfHideThumbnailsLabel: ue, pdfPageNumberLabel: H, pdfContentLoadingLabel: fe, pdfContentErrorLabel: U, pdfContentRetryLabel: W, xlsxFormulaLabel: pe, codeContentLoadingLabel: me, codeContentErrorLabel: ge, codeContentRetryLabel: G, tableCopyLabel: K, tableCopiedLabel: _e, tableDownloadCsvLabel: ve, codeBlockCopyLabel: ye, codeBlockCopiedLabel: be, codeBlockDownloadLabel: xe, tableScrollRegionAriaLabel: Se, mathScrollRegionAriaLabel: Ce, ooxmlHighlightsLabel: we, ooxmlHighlightNavigatedLabel: Te }, onDownload: q, onCopyText: Ee, onCopyMarkdown: J, onCopyJson: De, tableDownloadFilename: Y, isMobile: Oe = !1, defaultWidth: ke, minWidth: Ae = 600, maxWidth: je = 1500, onResizeStop: Me, styles: Ne, codeBlockTheme: Pe, loadPdf: Fe, configurePdfWorker: Ie, onVisualizerSendMessage: Le }) => {
1018
- let [X, Re] = z(!1), [ze, Ue] = z(!1), [We, Z] = z(!1), [Ge, Ke] = z(!1), [qe, Je] = z(void 0), Q = R(null), Ye = R(null), Xe = R(null), Ze = F(() => {
1019
- Ee?.(), Q.current != null && clearTimeout(Q.current), Re(!0), Q.current = setTimeout(() => Re(!1), He);
1020
- }, [Ee]), Qe = F(() => {
1021
- J?.(), Ye.current != null && clearTimeout(Ye.current), Ue(!0), Ye.current = setTimeout(() => Ue(!1), He);
1022
- }, [J]), $e = F(() => {
1023
- De?.(), Xe.current != null && clearTimeout(Xe.current), Z(!0), Xe.current = setTimeout(() => Z(!1), He);
1024
- }, [De]);
1025
- I(() => () => {
1026
- Q.current != null && clearTimeout(Q.current), Ye.current != null && clearTimeout(Ye.current), Xe.current != null && clearTimeout(Xe.current);
1017
+ }, Ve = 2e3, He = F(({ isOpen: e, isLoading: t = !1, onClose: n, onRetry: r, content: a, fileName: s, leftActions: c, labels: { ariaLabel: l, closeLabel: u = "Close", resizeLabel: d = "Resize panel", downloadLabel: f = "Download", copyTextLabel: p = "Copy text", copiedTextLabel: h = "Copied!", copyMarkdownLabel: g = "Copy as Markdown", copiedMarkdownLabel: v = "Copied!", copyJsonLabel: y = "Copy as JSON", copiedJsonLabel: w = "Copied!", visualizerErrorLabel: ee, unsupportedLabel: E = "Preview is not supported for this file", loadErrorLabel: D = "Failed to load file", loadErrorRetryLabel: O = "Retry", forbiddenErrorLabel: k = "You don't have permission to access this file", htmlFrameBlockedLabel: A = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: ie = "Open in new tab", htmlViewSourceLabel: N = "View source", htmlViewRenderedLabel: P = "View rendered", mcpAppReloadLabel: F = "Reload", pdfThumbnailsLabel: L, pdfShowThumbnailsLabel: se, pdfHideThumbnailsLabel: ce, pdfPageNumberLabel: W, pdfContentLoadingLabel: ue, pdfContentErrorLabel: de, pdfContentRetryLabel: G, xlsxFormulaLabel: fe, codeContentLoadingLabel: pe, codeContentErrorLabel: he, codeContentRetryLabel: K, tableCopyLabel: q, tableCopiedLabel: ge, tableDownloadCsvLabel: _e, codeBlockCopyLabel: ve, codeBlockCopiedLabel: ye, codeBlockDownloadLabel: be, tableScrollRegionAriaLabel: xe, mathScrollRegionAriaLabel: Se, ooxmlHighlightsLabel: Ce, ooxmlHighlightNavigatedLabel: we }, onDownload: J, onCopyText: Te, onCopyMarkdown: Y, onCopyJson: Ee, tableDownloadFilename: X, isMobile: De = !1, isBoundedOverlay: Oe = !1, defaultWidth: ke, minWidth: Ae = 600, maxWidth: je = 1500, onResizeStop: Me, styles: Ne, codeBlockTheme: Pe, loadPdf: Fe, configurePdfWorker: Ie, onVisualizerSendMessage: Z }) => {
1018
+ let [Le, Re] = V(!1), [He, Ue] = V(!1), [Q, We] = V(!1), [Ge, Ke] = V(!1), [qe, Je] = V(void 0), Ye = B(null), Xe = B(null), Ze = B(null), Qe = I(() => {
1019
+ Te?.(), Ye.current != null && clearTimeout(Ye.current), Re(!0), Ye.current = setTimeout(() => Re(!1), Ve);
1020
+ }, [Te]), $e = I(() => {
1021
+ Y?.(), Xe.current != null && clearTimeout(Xe.current), Ue(!0), Xe.current = setTimeout(() => Ue(!1), Ve);
1022
+ }, [Y]), et = I(() => {
1023
+ Ee?.(), Ze.current != null && clearTimeout(Ze.current), We(!0), Ze.current = setTimeout(() => We(!1), Ve);
1024
+ }, [Ee]);
1025
+ R(() => () => {
1026
+ Ye.current != null && clearTimeout(Ye.current), Xe.current != null && clearTimeout(Xe.current), Ze.current != null && clearTimeout(Ze.current);
1027
1027
  }, []);
1028
- let et = F(() => {
1028
+ let $ = I(() => {
1029
1029
  Ke((e) => !e);
1030
1030
  }, []);
1031
- I(() => {
1031
+ R(() => {
1032
1032
  Ke(!1), Je(void 0);
1033
1033
  }, [a]);
1034
- let { className: $, panelStyles: tt, ...nt } = Ne ?? {}, { colors: rt, typography: it } = nt, at = L(() => m({
1035
- "--ac-mcp-app-divider": rt?.mcpAppDividerColor,
1036
- "--ac-mcp-app-version": rt?.mcpAppVersionColor
1037
- }), [rt?.mcpAppDividerColor, rt?.mcpAppVersionColor]), ot = a.type === i.McpApp && qe != null ? /* @__PURE__ */ V("span", {
1038
- style: at,
1034
+ let { className: tt, panelStyles: nt, ...rt } = Ne ?? {}, { colors: it, typography: at } = rt, ot = z(() => m({
1035
+ "--ac-mcp-app-divider": it?.mcpAppDividerColor,
1036
+ "--ac-mcp-app-version": it?.mcpAppVersionColor
1037
+ }), [it?.mcpAppDividerColor, it?.mcpAppVersionColor]), st = a.type === i.McpApp && qe != null ? /* @__PURE__ */ U("span", {
1038
+ style: ot,
1039
1039
  children: [
1040
- /* @__PURE__ */ B("span", { children: s }),
1041
- /* @__PURE__ */ B("span", {
1040
+ /* @__PURE__ */ H("span", { children: s }),
1041
+ /* @__PURE__ */ H("span", {
1042
1042
  "aria-hidden": !0,
1043
- className: _("mx-1.5 inline-block h-3 w-0 border-s align-middle", Ve.mcpAppDivider)
1043
+ className: _("mx-1.5 inline-block h-3 w-0 border-s align-middle", Be.mcpAppDivider)
1044
1044
  }),
1045
- /* @__PURE__ */ B("span", { children: qe.name }),
1046
- qe.version && /* @__PURE__ */ B("span", {
1047
- className: _("ms-2", it?.mcpAppVersionClassName ?? "dial-caption-text", Ve.mcpAppVersion),
1045
+ /* @__PURE__ */ H("span", { children: qe.name }),
1046
+ qe.version && /* @__PURE__ */ H("span", {
1047
+ className: _("ms-2", at?.mcpAppVersionClassName ?? "dial-caption-text", Be.mcpAppVersion),
1048
1048
  children: qe.version
1049
1049
  })
1050
1050
  ]
1051
- }) : s, st = !t && a.type === i.Html && (a.srcdoc != null || a.resolveSourceText != null), ct = !t && Ee != null && (a.type === i.PlainText || a.type === i.Code), lt = !t && J != null && a.type === i.Markdown, ut = !t && De != null && a.type === i.Json, dt = !t && q != null && o(a), ft = !t && a.type === i.McpApp && a.onReload != null;
1052
- return /* @__PURE__ */ B(x, {
1051
+ }) : s, ct = !t && a.type === i.Html && (a.srcdoc != null || a.resolveSourceText != null), lt = !t && Te != null && (a.type === i.PlainText || a.type === i.Code), ut = !t && Y != null && a.type === i.Markdown, dt = !t && Ee != null && a.type === i.Json, ft = !t && J != null && o(a), pt = !t && a.type === i.McpApp && a.onReload != null;
1052
+ return /* @__PURE__ */ H(x, {
1053
1053
  isOpen: e,
1054
+ isBoundedOverlay: Oe,
1054
1055
  orientation: b.Right,
1055
- title: ot,
1056
+ title: st,
1056
1057
  labels: {
1057
1058
  ariaLabel: l,
1058
1059
  closeLabel: u,
1059
1060
  resizeLabel: d
1060
1061
  },
1061
1062
  onClose: n,
1062
- resizable: !Oe,
1063
+ resizable: !De || Oe,
1063
1064
  defaultWidth: ke,
1064
1065
  minWidth: Ae,
1065
1066
  maxWidth: je,
1066
1067
  onResizeStop: Me,
1067
1068
  styles: {
1068
- ...tt,
1069
+ ...nt,
1069
1070
  cssVars: {
1070
- ...m({ "--ac-header-border": rt?.headerBorder }),
1071
- ...tt?.cssVars
1071
+ ...m({ "--ac-header-border": it?.headerBorder }),
1072
+ ...nt?.cssVars
1072
1073
  },
1073
- titleClassName: tt?.titleClassName ?? "dial-h3-text",
1074
- headerClassName: _("border-b", Ve.panelHeader, tt?.headerClassName),
1075
- className: _(e ? "mobile:w-full mobile:max-w-full" : "w-0", $, tt?.className, he.panel)
1074
+ titleClassName: nt?.titleClassName ?? "dial-h3-text",
1075
+ headerClassName: _("border-b", Be.panelHeader, nt?.headerClassName),
1076
+ className: _(!Oe && (e ? "mobile:w-full mobile:max-w-full" : "w-0"), tt, nt?.className, me.panel)
1076
1077
  },
1077
1078
  leftActions: c,
1078
- rightActions: st || ct || lt || ut || dt || ft ? /* @__PURE__ */ V(de, { children: [
1079
- ft && /* @__PURE__ */ B(T, {
1080
- icon: /* @__PURE__ */ B(se, {
1079
+ rightActions: ct || lt || ut || dt || ft || pt ? /* @__PURE__ */ U(le, { children: [
1080
+ pt && /* @__PURE__ */ H(T, {
1081
+ icon: /* @__PURE__ */ H(oe, {
1081
1082
  size: S.LG,
1082
1083
  stroke: C,
1083
1084
  "aria-hidden": !0
1084
1085
  }),
1085
- "aria-label": P,
1086
- tooltipProps: { tooltip: P },
1086
+ "aria-label": F,
1087
+ tooltipProps: { tooltip: F },
1087
1088
  onClick: a.type === i.McpApp ? a.onReload : void 0
1088
1089
  }),
1089
- st && /* @__PURE__ */ B(T, {
1090
- icon: B(Ge ? ie : te, {
1090
+ ct && /* @__PURE__ */ H(T, {
1091
+ icon: H(Ge ? re : te, {
1091
1092
  size: S.LG,
1092
1093
  stroke: C,
1093
1094
  "aria-hidden": !0
1094
1095
  }),
1095
- "aria-label": Ge ? N : M,
1096
+ "aria-label": Ge ? P : N,
1096
1097
  "aria-pressed": Ge,
1097
- tooltipProps: { tooltip: Ge ? N : M },
1098
- onClick: et
1098
+ tooltipProps: { tooltip: Ge ? P : N },
1099
+ onClick: $
1099
1100
  }),
1100
- ct && /* @__PURE__ */ B(T, {
1101
- icon: B(X ? j : ne, {
1101
+ lt && /* @__PURE__ */ H(T, {
1102
+ icon: H(Le ? j : ne, {
1102
1103
  size: S.LG,
1103
1104
  stroke: C,
1104
1105
  "aria-hidden": !0
1105
1106
  }),
1106
- "aria-label": X ? h : p,
1107
- tooltipProps: { tooltip: X ? h : p },
1108
- onClick: Ze
1107
+ "aria-label": Le ? h : p,
1108
+ tooltipProps: { tooltip: Le ? h : p },
1109
+ onClick: Qe
1109
1110
  }),
1110
- lt && /* @__PURE__ */ B(T, {
1111
- icon: B(ze ? j : oe, {
1111
+ ut && /* @__PURE__ */ H(T, {
1112
+ icon: H(He ? j : ae, {
1112
1113
  size: S.LG,
1113
1114
  stroke: C,
1114
1115
  "aria-hidden": !0
1115
1116
  }),
1116
- "aria-label": ze ? v : g,
1117
- tooltipProps: { tooltip: ze ? v : g },
1118
- onClick: Qe
1117
+ "aria-label": He ? v : g,
1118
+ tooltipProps: { tooltip: He ? v : g },
1119
+ onClick: $e
1119
1120
  }),
1120
- ut && /* @__PURE__ */ B(T, {
1121
- icon: B(We ? j : ne, {
1121
+ dt && /* @__PURE__ */ H(T, {
1122
+ icon: H(Q ? j : ne, {
1122
1123
  size: S.LG,
1123
1124
  stroke: C,
1124
1125
  "aria-hidden": !0
1125
1126
  }),
1126
- "aria-label": We ? w : y,
1127
- tooltipProps: { tooltip: We ? w : y },
1128
- onClick: $e
1127
+ "aria-label": Q ? w : y,
1128
+ tooltipProps: { tooltip: Q ? w : y },
1129
+ onClick: et
1129
1130
  }),
1130
- dt && /* @__PURE__ */ B(T, {
1131
- icon: /* @__PURE__ */ B(re, {
1131
+ ft && /* @__PURE__ */ H(T, {
1132
+ icon: /* @__PURE__ */ H(M, {
1132
1133
  size: S.LG,
1133
1134
  stroke: C
1134
1135
  }),
1135
1136
  "aria-label": f,
1136
1137
  tooltipProps: { tooltip: f },
1137
- onClick: q
1138
+ onClick: J
1138
1139
  })
1139
1140
  ] }) : null,
1140
- children: /* @__PURE__ */ B(Be, {
1141
+ children: /* @__PURE__ */ H(ze, {
1141
1142
  content: a,
1142
1143
  isLoading: t,
1143
1144
  fileName: s,
@@ -1151,73 +1152,73 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
1151
1152
  forbiddenErrorLabel: k,
1152
1153
  visualizerErrorLabel: ee,
1153
1154
  htmlFrameBlockedLabel: A,
1154
- htmlOpenInNewTabLabel: ae,
1155
- pdfThumbnailsLabel: ce,
1156
- pdfShowThumbnailsLabel: le,
1157
- pdfHideThumbnailsLabel: ue,
1158
- pdfPageNumberLabel: H,
1159
- pdfContentLoadingLabel: fe,
1160
- pdfContentErrorLabel: U,
1161
- pdfContentRetryLabel: W,
1162
- xlsxFormulaLabel: pe,
1163
- codeContentLoadingLabel: me,
1164
- codeContentErrorLabel: ge,
1165
- codeContentRetryLabel: G,
1166
- tableCopyLabel: K,
1167
- tableCopiedLabel: _e,
1168
- tableDownloadCsvLabel: ve,
1169
- codeBlockCopyLabel: ye,
1170
- codeBlockCopiedLabel: be,
1171
- codeBlockDownloadLabel: xe,
1172
- tableScrollRegionAriaLabel: Se,
1173
- mathScrollRegionAriaLabel: Ce,
1174
- ooxmlHighlightsLabel: we,
1175
- ooxmlHighlightNavigatedLabel: Te
1155
+ htmlOpenInNewTabLabel: ie,
1156
+ pdfThumbnailsLabel: L,
1157
+ pdfShowThumbnailsLabel: se,
1158
+ pdfHideThumbnailsLabel: ce,
1159
+ pdfPageNumberLabel: W,
1160
+ pdfContentLoadingLabel: ue,
1161
+ pdfContentErrorLabel: de,
1162
+ pdfContentRetryLabel: G,
1163
+ xlsxFormulaLabel: fe,
1164
+ codeContentLoadingLabel: pe,
1165
+ codeContentErrorLabel: he,
1166
+ codeContentRetryLabel: K,
1167
+ tableCopyLabel: q,
1168
+ tableCopiedLabel: ge,
1169
+ tableDownloadCsvLabel: _e,
1170
+ codeBlockCopyLabel: ve,
1171
+ codeBlockCopiedLabel: ye,
1172
+ codeBlockDownloadLabel: be,
1173
+ tableScrollRegionAriaLabel: xe,
1174
+ mathScrollRegionAriaLabel: Se,
1175
+ ooxmlHighlightsLabel: Ce,
1176
+ ooxmlHighlightNavigatedLabel: we
1176
1177
  },
1177
- styles: nt,
1178
+ styles: rt,
1178
1179
  codeBlockTheme: Pe,
1179
- tableDownloadFilename: Y,
1180
+ tableDownloadFilename: X,
1180
1181
  loadPdf: Fe,
1181
1182
  configurePdfWorker: Ie,
1182
- onVisualizerSendMessage: Le
1183
+ onVisualizerSendMessage: Z
1183
1184
  })
1184
1185
  });
1185
- }), We = /* @__PURE__ */ new Set(["html", "htm"]), Z = {
1186
+ }), Ue = /* @__PURE__ */ new Set(["html", "htm"]), Q = {
1186
1187
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1187
1188
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1188
1189
  pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
1189
- }, Ge = /* @__PURE__ */ 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(".")), Ke = {
1190
+ }, We = /* @__PURE__ */ 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 = {
1190
1191
  docx: r.Docx,
1191
1192
  xlsx: r.Xlsx,
1192
1193
  pptx: r.Pptx,
1193
1194
  csv: r.Csv
1194
- }, qe = {
1195
- [Z.docx]: r.Docx,
1196
- [Z.xlsx]: r.Xlsx,
1197
- [Z.pptx]: r.Pptx,
1195
+ }, Ke = {
1196
+ [Q.docx]: r.Docx,
1197
+ [Q.xlsx]: r.Xlsx,
1198
+ [Q.pptx]: r.Pptx,
1198
1199
  [f.CSV]: r.Csv
1199
- }, Je = {
1200
- [r.Docx]: Z.docx,
1201
- [r.Xlsx]: Z.xlsx,
1202
- [r.Pptx]: Z.pptx,
1200
+ }, qe = {
1201
+ [r.Docx]: Q.docx,
1202
+ [r.Xlsx]: Q.xlsx,
1203
+ [r.Pptx]: Q.pptx,
1203
1204
  [r.Csv]: f.CSV
1204
- }, Q = (e, t) => {
1205
+ }, Je = (e, t) => {
1205
1206
  let n = t?.split(";", 1)[0].trim().toLowerCase();
1206
1207
  if (n != null) {
1207
- let e = qe[n];
1208
+ let e = Ke[n];
1208
1209
  if (e != null) return e;
1209
1210
  }
1210
1211
  let r = e.lastIndexOf(".");
1211
- if (r !== -1) return Ke[e.slice(r + 1).toLowerCase()];
1212
- }, Ye = (e, t) => Q(e, t) != null, Xe = (e, t) => {
1213
- let n = Q(e, t);
1214
- return n == null ? void 0 : Je[n];
1212
+ if (r !== -1) return Ge[e.slice(r + 1).toLowerCase()];
1213
+ }, Ye = (e, t) => Je(e, t) != null, Xe = (e, t) => {
1214
+ let n = Je(e, t);
1215
+ return n == null ? void 0 : qe[n];
1215
1216
  }, Ze = (e) => {
1216
1217
  let t = e.lastIndexOf(".");
1217
- return t !== -1 && Ge.has(e.slice(t + 1).toLowerCase());
1218
+ return t !== -1 && We.has(e.slice(t + 1).toLowerCase());
1218
1219
  }, Qe = (e) => {
1219
1220
  let t = e.lastIndexOf(".");
1220
- return t !== -1 && We.has(e.slice(t + 1).toLowerCase());
1221
+ return t !== -1 && Ue.has(e.slice(t + 1).toLowerCase());
1221
1222
  }, $e = {
1222
1223
  xml: "xml",
1223
1224
  csv: "plaintext",
@@ -1285,28 +1286,28 @@ var he = { panel: "dial-attachment-canvas-panel" }, ge = {
1285
1286
  }, at = {
1286
1287
  type: i.PlainText,
1287
1288
  text: ""
1288
- }, ot = M(void 0);
1289
+ }, ot = N(void 0);
1289
1290
  ot.displayName = "AttachmentCanvasContext";
1290
- var st = M(void 0), ct = ({ children: e }) => {
1291
- let t = R(0), n = F(() => {
1291
+ var st = N(void 0), ct = ({ children: e }) => {
1292
+ let t = B(0), n = I(() => {
1292
1293
  let e = ++t.current;
1293
1294
  return () => e === t.current;
1294
1295
  }, []);
1295
- I(() => () => {
1296
+ R(() => () => {
1296
1297
  t.current += 1;
1297
1298
  }, []);
1298
- let [r, i] = z(!1), [a, o] = z(!1), [s, c] = z(at), [l, u] = z(void 0), [d, f] = z(void 0), [p, m] = z(void 0), h = F((e, t) => {
1299
+ let [r, i] = V(!1), [a, o] = V(!1), [s, c] = V(at), [l, u] = V(void 0), [d, f] = V(void 0), [p, m] = V(void 0), h = I((e, t) => {
1299
1300
  u(e), f(t), m(void 0), o(!0), i(!0);
1300
- }, []), g = F((e, t, n, r) => {
1301
+ }, []), g = I((e, t, n, r) => {
1301
1302
  c(e), u(t), f(n), m(r == null ? void 0 : () => r), o(!1), i(!0);
1302
- }, []), _ = F(() => {
1303
+ }, []), _ = I(() => {
1303
1304
  c(at), i(!1), o(!1), f(void 0), m(void 0);
1304
1305
  }, []);
1305
- return I(() => () => {
1306
+ return R(() => () => {
1306
1307
  let e = rt(s);
1307
1308
  e != null && URL.revokeObjectURL(e);
1308
- }, [s]), /* @__PURE__ */ B(ot.Provider, {
1309
- value: L(() => ({
1309
+ }, [s]), /* @__PURE__ */ H(ot.Provider, {
1310
+ value: z(() => ({
1310
1311
  isOpen: r,
1311
1312
  isLoading: a,
1312
1313
  content: s,
@@ -1327,121 +1328,122 @@ var st = M(void 0), ct = ({ children: e }) => {
1327
1328
  _,
1328
1329
  p
1329
1330
  ]),
1330
- children: /* @__PURE__ */ B(st.Provider, {
1331
+ children: /* @__PURE__ */ H(st.Provider, {
1331
1332
  value: n,
1332
1333
  children: e
1333
1334
  })
1334
1335
  });
1335
1336
  }, lt = () => {
1336
- let e = ce(ot);
1337
+ let e = L(ot);
1337
1338
  if (!e) throw Error("useAttachmentCanvas must be used within an AttachmentCanvasProvider");
1338
1339
  return e;
1339
- }, ut = () => ce(st), dt = () => {
1340
- let e = ce(st);
1340
+ }, ut = () => L(st), dt = () => {
1341
+ let e = L(st);
1341
1342
  if (!e) throw Error("useLatestCanvasRequest must be used within an AttachmentCanvasProvider");
1342
- let t = R(void 0);
1343
- return I(() => (t.current = {}, () => {
1343
+ let t = B(void 0);
1344
+ return R(() => (t.current = {}, () => {
1344
1345
  t.current = void 0;
1345
- }), []), F(() => {
1346
+ }), []), I(() => {
1346
1347
  let n = t.current, r = e();
1347
1348
  return () => n !== void 0 && t.current === n && r();
1348
1349
  }, [e]);
1349
- }, ft = P(({ labels: e, leftActions: t, isMobile: n = !1, defaultWidth: r, minWidth: o, maxWidth: s, codeBlockTheme: c, tableDownloadFilename: l, loadPdf: u, configurePdfWorker: d, onVisualizerSendMessage: f }) => {
1350
- let { ariaLabel: p = "Attachment preview", closeLabel: m = "Close", downloadLabel: g = "Download", unsupportedLabel: _ = "Preview is not supported for this file", loadErrorLabel: v = "Failed to load file", loadErrorRetryLabel: y, forbiddenErrorLabel: b = "You don't have permission to access this file", copyTextLabel: x, copiedTextLabel: S, copyMarkdownLabel: C, copiedMarkdownLabel: w, copyJsonLabel: ee, copiedJsonLabel: T, htmlFrameBlockedLabel: E, htmlOpenInNewTabLabel: D, htmlViewSourceLabel: O, htmlViewRenderedLabel: k, pdfThumbnailsLabel: A, pdfShowThumbnailsLabel: j, pdfHideThumbnailsLabel: te, pdfPageNumberLabel: ne, pdfContentLoadingLabel: re, pdfContentErrorLabel: ie, pdfContentRetryLabel: ae, xlsxFormulaLabel: oe, codeContentLoadingLabel: se, codeContentErrorLabel: M, codeContentRetryLabel: N, tableCopyLabel: P, tableCopiedLabel: ce, tableDownloadCsvLabel: I, codeBlockCopyLabel: L, codeBlockCopiedLabel: R, codeBlockDownloadLabel: z, tableScrollRegionAriaLabel: le, mathScrollRegionAriaLabel: ue, ooxmlHighlightsLabel: de, ooxmlHighlightNavigatedLabel: V } = e ?? {}, { isOpen: H, isLoading: fe, content: U, fileName: W, closeCanvas: pe, retryCanvas: me } = lt(), he = F(() => {
1351
- a(U, W);
1352
- }, [U, W]), ge = F(() => {
1353
- (U.type === i.PlainText || U.type === i.Code) && h(U.text);
1354
- }, [U]), G = F(() => {
1355
- U.type === i.Markdown && h(U.text);
1356
- }, [U]), K = F(() => {
1357
- U.type === i.Json && h(JSON.stringify(U.value, null, 2));
1358
- }, [U]);
1359
- return /* @__PURE__ */ B(Ue, {
1360
- isOpen: H,
1361
- isLoading: fe,
1350
+ }, ft = F(({ labels: e, leftActions: t, isMobile: n = !1, isBoundedOverlay: r = !1, defaultWidth: o, minWidth: s, maxWidth: c, codeBlockTheme: l, tableDownloadFilename: u, loadPdf: d, configurePdfWorker: f, onVisualizerSendMessage: p }) => {
1351
+ let { ariaLabel: m = "Attachment preview", closeLabel: g = "Close", downloadLabel: _ = "Download", unsupportedLabel: v = "Preview is not supported for this file", loadErrorLabel: y = "Failed to load file", loadErrorRetryLabel: b, forbiddenErrorLabel: x = "You don't have permission to access this file", copyTextLabel: S, copiedTextLabel: C, copyMarkdownLabel: w, copiedMarkdownLabel: ee, copyJsonLabel: T, copiedJsonLabel: E, htmlFrameBlockedLabel: D, htmlOpenInNewTabLabel: O, htmlViewSourceLabel: k, htmlViewRenderedLabel: A, pdfThumbnailsLabel: j, pdfShowThumbnailsLabel: te, pdfHideThumbnailsLabel: ne, pdfPageNumberLabel: M, pdfContentLoadingLabel: re, pdfContentErrorLabel: ie, pdfContentRetryLabel: ae, xlsxFormulaLabel: oe, codeContentLoadingLabel: N, codeContentErrorLabel: P, codeContentRetryLabel: F, tableCopyLabel: L, tableCopiedLabel: R, tableDownloadCsvLabel: z, codeBlockCopyLabel: B, codeBlockCopiedLabel: V, codeBlockDownloadLabel: se, tableScrollRegionAriaLabel: ce, mathScrollRegionAriaLabel: le, ooxmlHighlightsLabel: U, ooxmlHighlightNavigatedLabel: W } = e ?? {}, { isOpen: ue, isLoading: de, content: G, fileName: fe, closeCanvas: pe, retryCanvas: me } = lt(), he = I(() => {
1352
+ a(G, fe);
1353
+ }, [G, fe]), K = I(() => {
1354
+ (G.type === i.PlainText || G.type === i.Code) && h(G.text);
1355
+ }, [G]), q = I(() => {
1356
+ G.type === i.Markdown && h(G.text);
1357
+ }, [G]), ge = I(() => {
1358
+ G.type === i.Json && h(JSON.stringify(G.value, null, 2));
1359
+ }, [G]);
1360
+ return /* @__PURE__ */ H(He, {
1361
+ isOpen: ue,
1362
+ isLoading: de,
1362
1363
  onClose: pe,
1363
1364
  onRetry: me,
1364
- content: U,
1365
- fileName: W,
1365
+ content: G,
1366
+ fileName: fe,
1366
1367
  leftActions: t,
1367
1368
  labels: {
1368
- ariaLabel: p,
1369
- closeLabel: m,
1370
- downloadLabel: g,
1371
- copyTextLabel: x,
1372
- copiedTextLabel: S,
1373
- copyMarkdownLabel: C,
1374
- copiedMarkdownLabel: w,
1375
- copyJsonLabel: ee,
1376
- copiedJsonLabel: T,
1377
- unsupportedLabel: _,
1378
- loadErrorLabel: v,
1379
- loadErrorRetryLabel: y,
1380
- forbiddenErrorLabel: b,
1381
- htmlFrameBlockedLabel: E,
1382
- htmlOpenInNewTabLabel: D,
1383
- htmlViewSourceLabel: O,
1384
- htmlViewRenderedLabel: k,
1385
- pdfThumbnailsLabel: A,
1386
- pdfShowThumbnailsLabel: j,
1387
- pdfHideThumbnailsLabel: te,
1388
- pdfPageNumberLabel: ne,
1369
+ ariaLabel: m,
1370
+ closeLabel: g,
1371
+ downloadLabel: _,
1372
+ copyTextLabel: S,
1373
+ copiedTextLabel: C,
1374
+ copyMarkdownLabel: w,
1375
+ copiedMarkdownLabel: ee,
1376
+ copyJsonLabel: T,
1377
+ copiedJsonLabel: E,
1378
+ unsupportedLabel: v,
1379
+ loadErrorLabel: y,
1380
+ loadErrorRetryLabel: b,
1381
+ forbiddenErrorLabel: x,
1382
+ htmlFrameBlockedLabel: D,
1383
+ htmlOpenInNewTabLabel: O,
1384
+ htmlViewSourceLabel: k,
1385
+ htmlViewRenderedLabel: A,
1386
+ pdfThumbnailsLabel: j,
1387
+ pdfShowThumbnailsLabel: te,
1388
+ pdfHideThumbnailsLabel: ne,
1389
+ pdfPageNumberLabel: M,
1389
1390
  pdfContentLoadingLabel: re,
1390
1391
  pdfContentErrorLabel: ie,
1391
1392
  pdfContentRetryLabel: ae,
1392
1393
  xlsxFormulaLabel: oe,
1393
- codeContentLoadingLabel: se,
1394
- codeContentErrorLabel: M,
1395
- codeContentRetryLabel: N,
1396
- tableCopyLabel: P,
1397
- tableCopiedLabel: ce,
1398
- tableDownloadCsvLabel: I,
1399
- codeBlockCopyLabel: L,
1400
- codeBlockCopiedLabel: R,
1401
- codeBlockDownloadLabel: z,
1402
- tableScrollRegionAriaLabel: le,
1403
- mathScrollRegionAriaLabel: ue,
1404
- ooxmlHighlightsLabel: de,
1405
- ooxmlHighlightNavigatedLabel: V
1394
+ codeContentLoadingLabel: N,
1395
+ codeContentErrorLabel: P,
1396
+ codeContentRetryLabel: F,
1397
+ tableCopyLabel: L,
1398
+ tableCopiedLabel: R,
1399
+ tableDownloadCsvLabel: z,
1400
+ codeBlockCopyLabel: B,
1401
+ codeBlockCopiedLabel: V,
1402
+ codeBlockDownloadLabel: se,
1403
+ tableScrollRegionAriaLabel: ce,
1404
+ mathScrollRegionAriaLabel: le,
1405
+ ooxmlHighlightsLabel: U,
1406
+ ooxmlHighlightNavigatedLabel: W
1406
1407
  },
1407
1408
  onDownload: he,
1408
- onCopyText: U.type === i.PlainText || U.type === i.Code ? ge : void 0,
1409
- onCopyMarkdown: U.type === i.Markdown ? G : void 0,
1410
- onCopyJson: U.type === i.Json ? K : void 0,
1411
- tableDownloadFilename: l,
1409
+ onCopyText: G.type === i.PlainText || G.type === i.Code ? K : void 0,
1410
+ onCopyMarkdown: G.type === i.Markdown ? q : void 0,
1411
+ onCopyJson: G.type === i.Json ? ge : void 0,
1412
+ tableDownloadFilename: u,
1412
1413
  isMobile: n,
1413
- defaultWidth: r,
1414
- minWidth: o,
1415
- maxWidth: s,
1416
- codeBlockTheme: c,
1417
- configurePdfWorker: d,
1418
- loadPdf: u,
1419
- onVisualizerSendMessage: f
1414
+ isBoundedOverlay: r,
1415
+ defaultWidth: o,
1416
+ minWidth: s,
1417
+ maxWidth: c,
1418
+ codeBlockTheme: l,
1419
+ configurePdfWorker: f,
1420
+ loadPdf: d,
1421
+ onVisualizerSendMessage: p
1420
1422
  });
1421
1423
  }), pt = {
1422
1424
  frame: "_frame_1ys0b_1",
1423
1425
  header: "_header_1ys0b_6",
1424
1426
  title: "_title_1ys0b_10"
1425
- }, mt = P(({ 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 }) => {
1427
+ }, mt = 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 }) => {
1426
1428
  let p = e.visualizerName.trim(), h = !u && p !== "";
1427
- return /* @__PURE__ */ V("div", {
1429
+ return /* @__PURE__ */ U("div", {
1428
1430
  className: _("flex w-full min-w-0 flex-col overflow-hidden", !l && ["rounded-xl border", pt.frame]),
1429
1431
  style: m({
1430
1432
  "--igv-bg": d?.background,
1431
1433
  "--igv-border": d?.border,
1432
1434
  "--igv-title-text": d?.titleText
1433
1435
  }),
1434
- children: [/* @__PURE__ */ V("div", {
1436
+ children: [/* @__PURE__ */ U("div", {
1435
1437
  className: _("flex min-h-10 items-center gap-2 py-2", h ? "justify-between" : "justify-end", !l && ["border-b px-4", pt.header]),
1436
- children: [h && /* @__PURE__ */ B("span", {
1438
+ children: [h && /* @__PURE__ */ H("span", {
1437
1439
  className: _("min-w-0 truncate", c, pt.title),
1438
1440
  children: p
1439
- }), /* @__PURE__ */ B("div", {
1441
+ }), /* @__PURE__ */ H("div", {
1440
1442
  role: "toolbar",
1441
1443
  "aria-label": i,
1442
1444
  className: "flex items-center gap-1",
1443
- children: /* @__PURE__ */ B(T, {
1444
- icon: /* @__PURE__ */ B(A, {
1445
+ children: /* @__PURE__ */ H(T, {
1446
+ icon: /* @__PURE__ */ H(A, {
1445
1447
  size: S.SM,
1446
1448
  stroke: C,
1447
1449
  "aria-hidden": !0
@@ -1451,10 +1453,10 @@ var st = M(void 0), ct = ({ children: e }) => {
1451
1453
  onClick: n
1452
1454
  })
1453
1455
  })]
1454
- }), /* @__PURE__ */ B("div", {
1456
+ }), /* @__PURE__ */ H("div", {
1455
1457
  className: "w-full",
1456
1458
  style: { height: `${t}px` },
1457
- children: /* @__PURE__ */ B(Le, {
1459
+ children: /* @__PURE__ */ H(Ie, {
1458
1460
  content: e,
1459
1461
  loadingLabel: o,
1460
1462
  errorLabel: s,
@@ -1477,12 +1479,12 @@ var st = M(void 0), ct = ({ children: e }) => {
1477
1479
  return n;
1478
1480
  }
1479
1481
  }, gt = (e, t) => {
1480
- let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = lt(), o = ut(), { customVisualizers: s, themeId: l, onBeforeOpen: u } = t, p = R(null), m = F(async (t, n, r) => {
1482
+ let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = lt(), o = ut(), { customVisualizers: s, themeId: l, onBeforeOpen: u } = t, p = B(null), m = I(async (t, n, r) => {
1481
1483
  if (t.url == null && t.referenceUrl != null) {
1482
1484
  let i = e.resolveReferencePdfContent(t);
1483
1485
  if (i != null) return r(i, t.name, n);
1484
1486
  }
1485
- let a = t.contentType.toLowerCase(), o = je(a, s);
1487
+ let a = t.contentType.toLowerCase(), o = Ae(a, s);
1486
1488
  if (o != null) {
1487
1489
  let i = await e.resolveVisualizerContent(t, o, l);
1488
1490
  if (i != null) return r(i, t.name, n);
@@ -1491,14 +1493,14 @@ var st = M(void 0), ct = ({ children: e }) => {
1491
1493
  let i = await e.resolveTextContent(t);
1492
1494
  if (i != null) return r(i, t.name, n);
1493
1495
  }
1494
- let c = Q("", a);
1496
+ let c = Je("", a);
1495
1497
  if (c != null) return r(await e.resolveOoxmlContent(t, c) ?? $(e.resolveContentUrl(t)), t.name, n);
1496
1498
  switch (a) {
1497
1499
  case f.PDF: return r(await e.resolvePdfContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
1498
1500
  case f.Markdown: return r(await e.resolveMarkdownContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
1499
1501
  case f.JSON: return r(await e.resolveJsonContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
1500
1502
  }
1501
- let u = t.name ?? "", p = u.lastIndexOf("."), m = p === -1 ? "" : u.slice(p + 1).toLowerCase(), h = Q(u);
1503
+ let u = t.name ?? "", p = u.lastIndexOf("."), m = p === -1 ? "" : u.slice(p + 1).toLowerCase(), h = Je(u);
1502
1504
  if (h != null) return r(await e.resolveOoxmlContent(t, h) ?? $(e.resolveContentUrl(t)), t.name, n);
1503
1505
  switch (m) {
1504
1506
  case d.Markdown:
@@ -1530,7 +1532,7 @@ var st = M(void 0), ct = ({ children: e }) => {
1530
1532
  s,
1531
1533
  l,
1532
1534
  e
1533
- ]), h = F(async (t, s = t.id, l) => {
1535
+ ]), h = I(async (t, s = t.id, l) => {
1534
1536
  let d = () => l == null || l(), f = (e, t, r) => d() ? (n(e, t, r), !0) : (it(e), !1);
1535
1537
  switch (t.type) {
1536
1538
  case c.Image: {
@@ -1570,9 +1572,9 @@ var st = M(void 0), ct = ({ children: e }) => {
1570
1572
  e,
1571
1573
  o
1572
1574
  ]);
1573
- return I(() => {
1575
+ return R(() => {
1574
1576
  p.current = h;
1575
1577
  }, [h]), { openAttachmentCanvas: h };
1576
1578
  };
1577
1579
  //#endregion
1578
- export { he as ATTACHMENT_CANVAS_CLASS, Ue as AttachmentCanvas, Be as AttachmentCanvasBody, ft as AttachmentCanvasContainer, ct as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, _e as CodeContent, ve as HTML_PREVIEW_FRAME_RENDER_MESSAGE, mt as InlineGroupedVisualizer, Ee as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, nt as createForbiddenCanvasContent, tt as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, a as downloadAttachmentContent, et as extensionToLanguage, Me as findVisualizerForApplication, je as findVisualizerForMime, Q as getOoxmlFileType, Xe as getOoxmlMimeType, Ne as groupedVisualizerCanvasKey, o as isDownloadable, Qe as isHtmlPreviewable, Ye as isOoxmlPreviewable, Ze as isTextPreviewable, Pe as partitionAttachmentsForApplicationVisualizer, lt as useAttachmentCanvas, dt as useLatestCanvasRequest, gt as useOpenAttachmentCanvas };
1580
+ export { me as ATTACHMENT_CANVAS_CLASS, He as AttachmentCanvas, ze as AttachmentCanvasBody, ft as AttachmentCanvasContainer, ct as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, ge as CodeContent, _e as HTML_PREVIEW_FRAME_RENDER_MESSAGE, mt as InlineGroupedVisualizer, Te as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, nt as createForbiddenCanvasContent, tt as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, a as downloadAttachmentContent, et as extensionToLanguage, je as findVisualizerForApplication, Ae as findVisualizerForMime, Je as getOoxmlFileType, Xe as getOoxmlMimeType, Me as groupedVisualizerCanvasKey, o as isDownloadable, Qe as isHtmlPreviewable, Ye as isOoxmlPreviewable, Ze as isTextPreviewable, Ne as partitionAttachmentsForApplicationVisualizer, lt as useAttachmentCanvas, dt as useLatestCanvasRequest, gt as useOpenAttachmentCanvas };