@epam/ai-dial-attachment-canvas 1.1.3 → 1.1.5

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
@@ -5,38 +5,38 @@ import { SidebarOrientation as y, SidebarPanel as b } from "@epam/ai-dial-sideba
5
5
  import { DIAL_ICON_SIZE as x, DIAL_KIT_ICON_STROKE as S, ElementSize as C, GhostIconButton as w, LinkButton as T, Spinner as E } from "@epam/ai-dial-ui-kit";
6
6
  import { IconAlertTriangle as D, IconArrowsMaximize as O, IconCheck as k, 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
7
  import { createContext as A, lazy as j, memo as M, useCallback as N, useContext as P, useEffect as F, useMemo as I, useRef as L, useState as R } from "react";
8
- import { JsonView as se, defaultStyles as z } from "react-json-view-lite";
9
- import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
10
- import { AppBridge as ce, AppFrame as U } from "@mcp-ui/client";
11
- import { McpUiHostContextChangedNotificationSchema as W } from "@modelcontextprotocol/ext-apps/app-bridge";
12
- import { VisualizerConnectorRequests as le } from "@epam/ai-dial-shared";
13
- import { VisualizerConnector as ue } from "@epam/ai-dial-visualizer-connector";
14
- var G = {
8
+ import { JsonView as se, defaultStyles as ce } from "react-json-view-lite";
9
+ import { Fragment as le, jsx as z, jsxs as B } from "react/jsx-runtime";
10
+ import { AppBridge as V, AppFrame as H } from "@mcp-ui/client";
11
+ import { McpUiHostContextChangedNotificationSchema as U } from "@modelcontextprotocol/ext-apps/app-bridge";
12
+ import { VisualizerConnectorRequests as ue } from "@epam/ai-dial-shared";
13
+ import { VisualizerConnector as de } from "@epam/ai-dial-visualizer-connector";
14
+ var W = {
15
15
  container: "_container_1nhig_1",
16
16
  containerLight: "_containerLight_1nhig_5"
17
- }, de = {
17
+ }, fe = {
18
18
  [l.Dark]: _,
19
19
  [l.Light]: _
20
- }, fe = () => j(async () => {
20
+ }, pe = () => j(async () => {
21
21
  let { Prism: e } = await import("react-syntax-highlighter");
22
22
  return { default: e };
23
- }), pe = M(({ content: e, codeBlockTheme: t = l.Light, labels: n }) => {
24
- let { text: r, language: i } = e, a = i == null || i === "plaintext", o = de[t], c = t === l.Light, [u, d] = R(0), f = I(fe, [u]), p = N(() => {
23
+ }), me = M(({ content: e, codeBlockTheme: t = l.Light, labels: n }) => {
24
+ let { text: r, language: i } = e, a = i == null || i === "plaintext", o = fe[t], c = t === l.Light, [u, d] = R(0), f = I(pe, [u]), p = N(() => {
25
25
  d((e) => e + 1);
26
- }, []), m = /* @__PURE__ */ V("pre", {
26
+ }, []), m = /* @__PURE__ */ z("pre", {
27
27
  className: "whitespace-pre-wrap break-words p-4",
28
28
  children: r
29
29
  });
30
- return /* @__PURE__ */ V("div", {
30
+ return /* @__PURE__ */ z("div", {
31
31
  dir: "ltr",
32
- className: g("h-full overflow-auto", G.container, c && G.containerLight),
33
- children: a ? m : /* @__PURE__ */ V(s, {
32
+ className: g("h-full overflow-auto", W.container, c && W.containerLight),
33
+ children: a ? m : /* @__PURE__ */ z(s, {
34
34
  retryKey: u,
35
35
  onRetry: p,
36
36
  pendingContent: m,
37
37
  errorContent: m,
38
38
  labels: n,
39
- children: /* @__PURE__ */ V(f, {
39
+ children: /* @__PURE__ */ z(f, {
40
40
  language: i,
41
41
  style: o,
42
42
  customStyle: {
@@ -53,7 +53,7 @@ var G = {
53
53
  })
54
54
  })
55
55
  });
56
- }), me = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, he = M(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text" }) => {
56
+ }), he = { openInNewTabButton: "_openInNewTabButton_c1arc_1" }, ge = M(({ content: e, labels: t, isSourceView: n, title: r, codeBlockTheme: a, openInNewTabButtonTypographyClassName: o = "dial-body-semi-text" }) => {
57
57
  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 = L(null);
58
58
  F(() => {
59
59
  u(!0), f(!1);
@@ -67,7 +67,7 @@ var G = {
67
67
  }, [e.srcdoc]), h = N(() => {
68
68
  u(!1), f(!0);
69
69
  }, []);
70
- if (n && e.srcdoc != null) return /* @__PURE__ */ V(pe, {
70
+ if (n && e.srcdoc != null) return /* @__PURE__ */ z(me, {
71
71
  content: {
72
72
  type: i.Code,
73
73
  text: e.srcdoc,
@@ -75,26 +75,26 @@ var G = {
75
75
  },
76
76
  codeBlockTheme: a
77
77
  });
78
- if (d) return /* @__PURE__ */ H("div", {
78
+ if (d) return /* @__PURE__ */ B("div", {
79
79
  className: "flex h-full flex-col items-center justify-center gap-3 p-4",
80
- children: [/* @__PURE__ */ V("p", {
80
+ children: [/* @__PURE__ */ z("p", {
81
81
  className: "text-center",
82
82
  children: s
83
- }), e.url != null && /* @__PURE__ */ V(T, {
83
+ }), e.url != null && /* @__PURE__ */ z(T, {
84
84
  href: e.url,
85
85
  target: "_blank",
86
86
  label: c,
87
- className: me.openInNewTabButton,
87
+ className: he.openInNewTabButton,
88
88
  textClassName: o
89
89
  })]
90
90
  });
91
91
  let _ = e.srcdoc != null, v = _ ? void 0 : e.url, y = _ ? e.srcdoc : void 0;
92
- return /* @__PURE__ */ H("div", {
92
+ return /* @__PURE__ */ B("div", {
93
93
  className: "relative h-full",
94
- children: [l && /* @__PURE__ */ V("div", {
94
+ children: [l && /* @__PURE__ */ z("div", {
95
95
  className: "absolute inset-0 flex items-center justify-center",
96
- children: /* @__PURE__ */ V(E, {})
97
- }), /* @__PURE__ */ V("iframe", {
96
+ children: /* @__PURE__ */ z(E, {})
97
+ }), /* @__PURE__ */ z("iframe", {
98
98
  ref: p,
99
99
  title: r,
100
100
  src: v,
@@ -105,10 +105,10 @@ var G = {
105
105
  onError: h
106
106
  })]
107
107
  });
108
- }), K = {
108
+ }), G = {
109
109
  name: "MCP-UI Host",
110
110
  version: "1.0.0"
111
- }, ge = { openLinks: {} }, _e = (e) => {
111
+ }, _e = { openLinks: {} }, ve = (e) => {
112
112
  let t;
113
113
  try {
114
114
  t = new URL(e);
@@ -122,14 +122,14 @@ var G = {
122
122
  return !1;
123
123
  }
124
124
  return !0;
125
- }, ve = (e, t, n) => {
125
+ }, ye = (e, t, n) => {
126
126
  if (n) {
127
127
  e.style.maxWidth = "", e.style.maxHeight = "";
128
128
  return;
129
129
  }
130
130
  let r = t;
131
131
  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`));
132
- }, ye = (e, t, n) => {
132
+ }, be = (e, t, n) => {
133
133
  let r = L(e);
134
134
  F(() => {
135
135
  r.current = e;
@@ -138,15 +138,15 @@ var G = {
138
138
  return F(() => {
139
139
  let e = null;
140
140
  try {
141
- e = new ce(null, K, ge, { hostContext: r.current.hostContext }), e.onopenlink = async ({ url: e }) => {
141
+ e = new V(null, G, _e, { hostContext: r.current.hostContext }), e.onopenlink = async ({ url: e }) => {
142
142
  let t = r.current.onOpenLink;
143
- return (t == null ? _e(e) : t(e)) === !1 ? { isError: !0 } : {};
143
+ return (t == null ? ve(e) : t(e)) === !1 ? { isError: !0 } : {};
144
144
  }, e.onrequestdisplaymode = async ({ mode: e }) => {
145
145
  let t = r.current.onRequestDisplayMode, n = r.current.hostContext?.displayMode ?? "inline";
146
146
  return { mode: t?.(e) ?? n };
147
- }, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(W, ({ params: e }) => {
147
+ }, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(U, ({ params: e }) => {
148
148
  let n = t.current?.querySelector("iframe");
149
- n != null && ve(n, e.containerDimensions, r.current.hostContext?.displayMode === "fullscreen");
149
+ n != null && ye(n, e.containerDimensions, r.current.hostContext?.displayMode === "fullscreen");
150
150
  }), a(e);
151
151
  } catch (e) {
152
152
  console.error("[useMcpAppBridge] Error creating AppBridge:", e), s(!0);
@@ -160,12 +160,12 @@ var G = {
160
160
  appBridge: i,
161
161
  hasFailed: o
162
162
  };
163
- }, q = {
163
+ }, K = {
164
164
  loadingOverlay: "_loadingOverlay_1aric_1",
165
165
  fullscreenFrame: "_fullscreenFrame_1aric_20",
166
166
  statusLabel: "_statusLabel_1aric_27",
167
167
  errorIcon: "_errorIcon_1aric_31"
168
- }, be = ({ content: e, errorLabel: t = "Failed to load app" }) => {
168
+ }, xe = ({ content: e, errorLabel: t = "Failed to load app" }) => {
169
169
  let [n, r] = R("loading"), { html: i, sandboxUrl: a, toolInput: o, toolResult: s, hostContext: c } = e, l = I(() => ({ url: new URL(a) }), [a]), u = c?.displayMode === "fullscreen", d = L(null), [f, p] = R();
170
170
  F(() => {
171
171
  let e = d.current;
@@ -180,15 +180,15 @@ var G = {
180
180
  });
181
181
  return t.observe(e), () => t.disconnect();
182
182
  }, []);
183
- let { appBridge: m, hasFailed: h } = ye(e, d, I(() => c == null || f == null ? c : {
183
+ let { appBridge: m, hasFailed: h } = be(e, d, I(() => c == null || f == null ? c : {
184
184
  ...c,
185
185
  containerDimensions: f
186
186
  }, [c, f])), _ = h || n === "error";
187
- return /* @__PURE__ */ H("div", {
187
+ return /* @__PURE__ */ B("div", {
188
188
  ref: d,
189
- className: g("relative h-full w-full", u && q.fullscreenFrame),
189
+ className: g("relative h-full w-full", u && K.fullscreenFrame),
190
190
  children: [
191
- m != null && /* @__PURE__ */ V(U, {
191
+ m != null && /* @__PURE__ */ z(H, {
192
192
  html: i,
193
193
  sandbox: l,
194
194
  appBridge: m,
@@ -198,26 +198,26 @@ var G = {
198
198
  onInitialized: () => r("ready"),
199
199
  onError: () => r("error")
200
200
  }),
201
- !_ && n === "loading" && /* @__PURE__ */ V("div", {
202
- className: g("absolute inset-0 flex flex-col items-center justify-center gap-2", q.loadingOverlay),
203
- children: /* @__PURE__ */ V(E, {})
201
+ !_ && n === "loading" && /* @__PURE__ */ z("div", {
202
+ className: g("absolute inset-0 flex flex-col items-center justify-center gap-2", K.loadingOverlay),
203
+ children: /* @__PURE__ */ z(E, {})
204
204
  }),
205
- _ && /* @__PURE__ */ H("div", {
205
+ _ && /* @__PURE__ */ B("div", {
206
206
  className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
207
- children: [/* @__PURE__ */ V(D, {
207
+ children: [/* @__PURE__ */ z(D, {
208
208
  size: 60,
209
209
  stroke: S,
210
210
  "aria-hidden": !0,
211
- className: q.errorIcon
212
- }), /* @__PURE__ */ V("p", {
211
+ className: K.errorIcon
212
+ }), /* @__PURE__ */ z("p", {
213
213
  role: "alert",
214
- className: g("text-center", q.statusLabel),
214
+ className: g("text-center", K.statusLabel),
215
215
  children: t
216
216
  })]
217
217
  })
218
218
  ]
219
219
  });
220
- }, J = {
220
+ }, q = {
221
221
  viewer: "_viewer_1w97n_2",
222
222
  spreadsheetCanvas: "_spreadsheetCanvas_1w97n_6",
223
223
  formulaPanel: "_formulaPanel_1w97n_12",
@@ -225,13 +225,13 @@ var G = {
225
225
  statusOverlay: "_statusOverlay_1w97n_24",
226
226
  errorIcon: "_errorIcon_1w97n_29",
227
227
  highlight: "_highlight_1w97n_37"
228
- }, xe = (e) => {
228
+ }, Se = (e) => {
229
229
  if (e?.kind !== "range") return "";
230
230
  let { activeCell: t } = e.selection, n = e.cells.find(({ address: e }) => e.row === t.row && e.col === t.col);
231
231
  if (n == null) return "";
232
232
  let r = n.formula;
233
233
  return r == null || r.trim().length === 0 ? n.displayText : r.startsWith("=") ? r : `=${r}`;
234
- }, Se = async (e, t, { onError: n, onXlsxSelectionContextChange: i }) => {
234
+ }, Ce = async (e, t, { onError: n, onXlsxSelectionContextChange: i }) => {
235
235
  switch (t) {
236
236
  case r.Docx: {
237
237
  let [{ DocxScrollViewer: t }, { chartEx: r }] = await Promise.all([import("@silurus/ooxml/docx"), import("@silurus/ooxml/chart-ex")]);
@@ -253,7 +253,7 @@ var G = {
253
253
  }
254
254
  case r.Csv: {
255
255
  let { XlsxSheetViewer: t } = await import("@silurus/ooxml/xlsx"), r = document.createElement("canvas");
256
- r.className = J.spreadsheetCanvas, e.replaceChildren(r);
256
+ r.className = q.spreadsheetCanvas, e.replaceChildren(r);
257
257
  let i = new t(r, {
258
258
  showScrollbars: !0,
259
259
  onError: n
@@ -277,7 +277,7 @@ var G = {
277
277
  });
278
278
  }
279
279
  }
280
- }, Ce = async (e, t, n, i) => {
280
+ }, we = async (e, t, n, i) => {
281
281
  let { onError: a, onXlsxSelectionContextChange: o, onGeometryInvalidated: s } = n;
282
282
  switch (t.format) {
283
283
  case r.Docx: {
@@ -286,7 +286,7 @@ var G = {
286
286
  import("@silurus/ooxml/chart-ex"),
287
287
  import("./ooxml-highlight-surfaces-BzgOKpBV.js")
288
288
  ]), l = await n.load(t.url, { chartEx: o });
289
- if (i()) throw l.destroy(), new we();
289
+ if (i()) throw l.destroy(), new Te();
290
290
  let u = r.fromDocument(e, l, {
291
291
  enableTextSelection: !0,
292
292
  refitOnResize: !0,
@@ -306,7 +306,7 @@ var G = {
306
306
  import("@silurus/ooxml/chart-ex"),
307
307
  import("./ooxml-highlight-surfaces-BzgOKpBV.js")
308
308
  ]), l = await n.load(t.url, { chartEx: o });
309
- if (i()) throw l.destroy(), new we();
309
+ if (i()) throw l.destroy(), new Te();
310
310
  let u = r.fromPresentation(e, l, {
311
311
  enableTextSelection: !0,
312
312
  refitOnResize: !0,
@@ -340,11 +340,11 @@ var G = {
340
340
  };
341
341
  }
342
342
  case r.Csv: {
343
- let r = await Se(e, t.format, n);
343
+ let r = await Ce(e, t.format, n);
344
344
  return await r.load(t.url), { viewer: r };
345
345
  }
346
346
  }
347
- }, we = class extends Error {}, Te = ({ content: t, fileName: n, loadErrorLabel: i, formulaLabel: a, formulaLabelClassName: o, highlightsLabel: s = "Cited locations", highlightNavigatedLabel: c = "Scrolled to the cited location" }) => {
347
+ }, Te = class extends Error {}, Ee = ({ content: t, fileName: n, loadErrorLabel: i, formulaLabel: a, formulaLabelClassName: o, highlightsLabel: s = "Cited locations", highlightNavigatedLabel: c = "Scrolled to the cited location" }) => {
348
348
  let l = L(null), [u, d] = R(!0), [f, p] = R(!1), [m, h] = R(""), [_, v] = R([]), [y, b] = R(!1), { highlights: x, selectedHighlightId: C } = t, w = x != null && x.length > 0, T = L(void 0), O = L(x);
349
349
  O.current = x;
350
350
  let k = L(void 0);
@@ -370,7 +370,7 @@ var G = {
370
370
  i || (d(!1), p(!0));
371
371
  },
372
372
  onXlsxSelectionContextChange: (e) => {
373
- i || h(xe(e));
373
+ i || h(Se(e));
374
374
  },
375
375
  onGeometryInvalidated: s
376
376
  }, f = () => {
@@ -381,14 +381,14 @@ var G = {
381
381
  return e.addEventListener("scroll", s, !0), k.current = s, (async () => {
382
382
  try {
383
383
  if (w) {
384
- let r = await Ce(e, t, u, o);
384
+ let r = await we(e, t, u, o);
385
385
  if (i) {
386
386
  r.viewer.destroy(), r.engine?.destroy();
387
387
  return;
388
388
  }
389
389
  n = r, T.current = r.highlights, f();
390
390
  } else {
391
- let r = await Se(e, t.format, u);
391
+ let r = await Ce(e, t.format, u);
392
392
  if (i) {
393
393
  r.destroy();
394
394
  return;
@@ -399,7 +399,7 @@ var G = {
399
399
  if (i) return;
400
400
  d(!1), await c();
401
401
  } catch (t) {
402
- if (t instanceof we || i) return;
402
+ if (t instanceof Te || i) return;
403
403
  n?.viewer.destroy(), n?.engine?.destroy(), n = void 0, T.current = void 0, e.replaceChildren(), d(!1), p(!0);
404
404
  }
405
405
  })(), () => {
@@ -429,38 +429,38 @@ var G = {
429
429
  })(), () => {
430
430
  r = !0;
431
431
  };
432
- }, [C, u]), /* @__PURE__ */ H("div", {
432
+ }, [C, u]), /* @__PURE__ */ B("div", {
433
433
  className: "relative flex h-full w-full min-w-0 flex-col overflow-hidden",
434
434
  children: [
435
- t.format === r.Xlsx && /* @__PURE__ */ H("div", {
435
+ t.format === r.Xlsx && /* @__PURE__ */ B("div", {
436
436
  role: "region",
437
437
  "aria-label": a,
438
- className: g("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", J.formulaPanel),
439
- children: [/* @__PURE__ */ V("span", {
438
+ className: g("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", q.formulaPanel),
439
+ children: [/* @__PURE__ */ z("span", {
440
440
  "aria-hidden": "true",
441
441
  className: g("shrink-0", o),
442
442
  children: "fx"
443
- }), /* @__PURE__ */ V("code", {
443
+ }), /* @__PURE__ */ z("code", {
444
444
  dir: "ltr",
445
445
  tabIndex: 0,
446
446
  "aria-live": "polite",
447
- className: g("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", J.formulaValue),
447
+ className: g("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),
448
448
  children: m
449
449
  })]
450
450
  }),
451
- /* @__PURE__ */ H("div", {
451
+ /* @__PURE__ */ B("div", {
452
452
  className: "relative min-h-0 w-full flex-1",
453
- children: [/* @__PURE__ */ V("div", {
453
+ children: [/* @__PURE__ */ z("div", {
454
454
  ref: l,
455
455
  role: "document",
456
456
  "aria-label": n,
457
457
  "aria-busy": u,
458
- className: g("h-full w-full overflow-hidden", J.viewer)
459
- }), _.length > 0 && /* @__PURE__ */ V("div", {
458
+ className: g("h-full w-full overflow-hidden", q.viewer)
459
+ }), _.length > 0 && /* @__PURE__ */ z("div", {
460
460
  role: "region",
461
461
  "aria-label": s,
462
462
  className: "pointer-events-none absolute inset-0 overflow-hidden",
463
- children: _.map((e, t) => /* @__PURE__ */ V("div", {
463
+ children: _.map((e, t) => /* @__PURE__ */ z("div", {
464
464
  "aria-hidden": "true",
465
465
  style: {
466
466
  left: `${e.left}px`,
@@ -470,28 +470,28 @@ var G = {
470
470
  },
471
471
  "data-selected": e.highlightId === C,
472
472
  "data-clipped": e.isClippedAtEnd === !0,
473
- className: g("absolute", J.highlight)
473
+ className: g("absolute", q.highlight)
474
474
  }, `${e.highlightId}-${t}`))
475
475
  })]
476
476
  }),
477
- /* @__PURE__ */ V("div", {
477
+ /* @__PURE__ */ z("div", {
478
478
  role: "status",
479
479
  "aria-live": "polite",
480
480
  className: "sr-only",
481
481
  children: y ? c : ""
482
482
  }),
483
- (u || f) && /* @__PURE__ */ V("div", {
483
+ (u || f) && /* @__PURE__ */ z("div", {
484
484
  role: f ? "alert" : void 0,
485
485
  "aria-live": "polite",
486
- className: g("absolute inset-0 flex items-center justify-center", J.statusOverlay),
487
- children: u ? /* @__PURE__ */ V(E, { size: 48 }) : /* @__PURE__ */ H("div", {
486
+ className: g("absolute inset-0 flex items-center justify-center", q.statusOverlay),
487
+ children: u ? /* @__PURE__ */ z(E, { size: 48 }) : /* @__PURE__ */ B("div", {
488
488
  className: "flex flex-col items-center gap-2",
489
- children: [/* @__PURE__ */ V(D, {
489
+ children: [/* @__PURE__ */ z(D, {
490
490
  "aria-hidden": "true",
491
491
  size: 60,
492
492
  stroke: S,
493
- className: J.errorIcon
494
- }), /* @__PURE__ */ V("p", {
493
+ className: q.errorIcon
494
+ }), /* @__PURE__ */ z("p", {
495
495
  className: "text-center",
496
496
  children: i
497
497
  })]
@@ -499,17 +499,17 @@ var G = {
499
499
  })
500
500
  ]
501
501
  });
502
- }, Ee = {
502
+ }, De = {
503
503
  loadingOverlay: "_loadingOverlay_12637_1",
504
504
  statusLabel: "_statusLabel_12637_5",
505
505
  errorIcon: "_errorIcon_12637_9"
506
- }, De = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a }) => {
506
+ }, Oe = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a }) => {
507
507
  let o = L(null), [s, c] = R("loading"), { url: l, visualizerName: u, requestTimeout: d } = e, f = L(e);
508
508
  return f.current = e, F(() => {
509
509
  let e = o.current;
510
510
  if (!e) return;
511
511
  c("loading");
512
- let t = new ue(e, {
512
+ let t = new de(e, {
513
513
  domain: l,
514
514
  hostDomain: window.location.origin,
515
515
  visualizerName: u,
@@ -518,7 +518,7 @@ var G = {
518
518
  return (async () => {
519
519
  if (await t.ready(), !n) return;
520
520
  let e = f.current;
521
- if (e.type === i.GroupedVisualizer) await t.send(le.sendGroupedVisualizeData, {
521
+ if (e.type === i.GroupedVisualizer) await t.send(ue.sendGroupedVisualizeData, {
522
522
  attachments: e.attachments,
523
523
  layout: e.layout
524
524
  });
@@ -527,7 +527,7 @@ var G = {
527
527
  layout: r,
528
528
  ...typeof i == "object" && i ? i : {}
529
529
  };
530
- await t.send(le.sendVisualizeData, {
530
+ await t.send(ue.sendVisualizeData, {
531
531
  mimeType: n,
532
532
  visualizerData: a
533
533
  });
@@ -550,7 +550,7 @@ var G = {
550
550
  u,
551
551
  l,
552
552
  d
553
- ]), /* @__PURE__ */ H("div", {
553
+ ]), /* @__PURE__ */ B("div", {
554
554
  className: "relative h-full w-full",
555
555
  style: m({
556
556
  "--vs-loading-bg": a?.loadingBackground,
@@ -558,33 +558,33 @@ var G = {
558
558
  "--vs-error-icon": a?.errorIcon
559
559
  }),
560
560
  children: [
561
- /* @__PURE__ */ V("div", {
561
+ /* @__PURE__ */ z("div", {
562
562
  ref: o,
563
563
  className: "h-full w-full"
564
564
  }),
565
- s === "loading" && /* @__PURE__ */ H("div", {
566
- className: g("absolute inset-0 flex flex-col items-center justify-center gap-2", Ee.loadingOverlay),
567
- children: [/* @__PURE__ */ V(E, {}), t && /* @__PURE__ */ V("p", {
568
- className: g("text-center", Ee.statusLabel),
565
+ s === "loading" && /* @__PURE__ */ B("div", {
566
+ className: g("absolute inset-0 flex flex-col items-center justify-center gap-2", De.loadingOverlay),
567
+ children: [/* @__PURE__ */ z(E, {}), t && /* @__PURE__ */ z("p", {
568
+ className: g("text-center", De.statusLabel),
569
569
  children: t
570
570
  })]
571
571
  }),
572
- s === "error" && /* @__PURE__ */ H("div", {
572
+ s === "error" && /* @__PURE__ */ B("div", {
573
573
  className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
574
- children: [/* @__PURE__ */ V(D, {
574
+ children: [/* @__PURE__ */ z(D, {
575
575
  size: 60,
576
576
  stroke: S,
577
577
  "aria-hidden": !0,
578
- className: Ee.errorIcon
579
- }), /* @__PURE__ */ V("p", {
578
+ className: De.errorIcon
579
+ }), /* @__PURE__ */ z("p", {
580
580
  role: "alert",
581
- className: g("text-center", Ee.statusLabel),
581
+ className: g("text-center", De.statusLabel),
582
582
  children: n
583
583
  })]
584
584
  })
585
585
  ]
586
586
  });
587
- }, Y = {
587
+ }, J = {
588
588
  body: "_body_13ogb_4",
589
589
  statusLabel: "_statusLabel_13ogb_13",
590
590
  errorIcon: "_errorIcon_13ogb_17",
@@ -599,66 +599,66 @@ var G = {
599
599
  jsonExpandIcon: "_jsonExpandIcon_13ogb_54",
600
600
  jsonCollapseIcon: "_jsonCollapseIcon_13ogb_67",
601
601
  jsonCollapsedContent: "_jsonCollapsedContent_13ogb_84"
602
- }, Oe = () => j(async () => ({ default: (await import("./PdfContent-BoAtghsO.js")).PdfContent })), ke = ({ url: e, fileName: t, loadErrorLabel: n }) => {
602
+ }, ke = () => j(async () => ({ default: (await import("./PdfContent-BoAtghsO.js")).PdfContent })), Ae = ({ url: e, fileName: t, loadErrorLabel: n }) => {
603
603
  let [r, i] = R(!1);
604
604
  return F(() => {
605
605
  i(!1);
606
- }, [e]), r ? /* @__PURE__ */ H("div", {
606
+ }, [e]), r ? /* @__PURE__ */ B("div", {
607
607
  className: "flex flex-col items-center gap-2",
608
- children: [/* @__PURE__ */ V(D, {
608
+ children: [/* @__PURE__ */ z(D, {
609
609
  size: 60,
610
610
  stroke: S,
611
- className: Y.errorIcon
612
- }), /* @__PURE__ */ V("p", {
613
- className: g("text-center", Y.statusLabel),
611
+ className: J.errorIcon
612
+ }), /* @__PURE__ */ z("p", {
613
+ className: g("text-center", J.statusLabel),
614
614
  children: n
615
615
  })]
616
- }) : /* @__PURE__ */ V("img", {
616
+ }) : /* @__PURE__ */ z("img", {
617
617
  src: e,
618
618
  alt: t ?? "",
619
619
  className: "max-h-full max-w-full object-contain",
620
620
  onError: () => i(!0)
621
621
  });
622
- }, Ae = new Set([
622
+ }, je = new Set([
623
623
  i.PlainText,
624
624
  i.Code,
625
625
  i.Ooxml
626
- ]), je = M(({ 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: _, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: C, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: O, codeContentErrorLabel: k, codeContentRetryLabel: ee, tableCopyCsvLabel: te, tableCopyTxtLabel: ne, tableCopyMarkdownLabel: re, tableCopiedLabel: ae, tableDownloadCsvLabel: oe, ooxmlHighlightsLabel: A, ooxmlHighlightNavigatedLabel: j } = {}, styles: M, codeBlockTheme: P, tableDownloadFilename: F, loadPdf: L, hidePdfToolbar: B = !1, configurePdfWorker: ce }) => {
627
- let { colors: U, typography: W, bodyClassName: le, cssVars: ue } = M ?? {}, [G, de] = R(0), fe = I(Oe, [G]), me = N(() => {
628
- de((e) => e + 1);
629
- }, []), K = W?.fontClassName != null, ge = I(() => ({
626
+ ]), Me = M(({ 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: _, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: C, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: O, codeContentErrorLabel: k, codeContentRetryLabel: ee, tableCopyCsvLabel: te, tableCopyTxtLabel: ne, tableCopyMarkdownLabel: re, tableCopiedLabel: ae, tableDownloadCsvLabel: oe, ooxmlHighlightsLabel: A, ooxmlHighlightNavigatedLabel: j } = {}, styles: M, codeBlockTheme: P, tableDownloadFilename: F, loadPdf: L, hidePdfToolbar: le = !1, configurePdfWorker: V }) => {
627
+ let { colors: H, typography: U, bodyClassName: ue, cssVars: de } = M ?? {}, [W, fe] = R(0), pe = I(ke, [W]), he = N(() => {
628
+ fe((e) => e + 1);
629
+ }, []), G = U?.fontClassName != null, _e = I(() => ({
630
630
  ...m({
631
- "--ac-text": U?.text,
632
- "--ac-status-text": U?.statusText,
633
- "--ac-error-icon": U?.errorIcon,
634
- "--ac-open-in-new-tab-text": U?.openInNewTabText,
635
- "--ac-json-border": U?.jsonBorder,
636
- "--ac-json-bg": U?.jsonBackground,
637
- "--ac-json-label": U?.jsonLabel,
638
- "--ac-json-clickable-label": U?.jsonClickableLabel,
639
- "--ac-json-punctuation": U?.jsonPunctuation,
640
- "--ac-json-string": U?.jsonString,
641
- "--ac-json-number": U?.jsonNumber,
642
- "--ac-json-boolean": U?.jsonBoolean,
643
- "--ac-json-null": U?.jsonNull,
644
- "--ac-json-toggle-icon": U?.jsonToggleIcon,
645
- "--ac-json-toggle-icon-hover": U?.jsonToggleIconHover,
646
- "--ac-ooxml-bg": U?.ooxmlBackground,
647
- "--ac-ooxml-formula-border": U?.ooxmlFormulaBorder,
648
- "--ac-ooxml-formula-bg": U?.ooxmlFormulaBackground,
649
- "--ac-ooxml-formula-text": U?.ooxmlFormulaText,
650
- "--ac-ooxml-highlight-border": U?.ooxmlHighlightBorder,
651
- "--ac-ooxml-highlight-bg": U?.ooxmlHighlightBackground,
652
- "--ac-json-collapsed-text": U?.jsonCollapsedText,
653
- "--ac-json-collapsed-bg": U?.jsonCollapsedBackground,
654
- "--ac-font-family": K ? void 0 : W?.fontFamily,
655
- "--ac-font-size": K ? void 0 : W?.fontSize,
656
- "--ac-font-weight": K ? void 0 : W?.fontWeight,
657
- "--ac-line-height": K ? void 0 : W?.lineHeight,
658
- "--ac-letter-spacing": K ? void 0 : W?.letterSpacing
631
+ "--ac-text": H?.text,
632
+ "--ac-status-text": H?.statusText,
633
+ "--ac-error-icon": H?.errorIcon,
634
+ "--ac-open-in-new-tab-text": H?.openInNewTabText,
635
+ "--ac-json-border": H?.jsonBorder,
636
+ "--ac-json-bg": H?.jsonBackground,
637
+ "--ac-json-label": H?.jsonLabel,
638
+ "--ac-json-clickable-label": H?.jsonClickableLabel,
639
+ "--ac-json-punctuation": H?.jsonPunctuation,
640
+ "--ac-json-string": H?.jsonString,
641
+ "--ac-json-number": H?.jsonNumber,
642
+ "--ac-json-boolean": H?.jsonBoolean,
643
+ "--ac-json-null": H?.jsonNull,
644
+ "--ac-json-toggle-icon": H?.jsonToggleIcon,
645
+ "--ac-json-toggle-icon-hover": H?.jsonToggleIconHover,
646
+ "--ac-ooxml-bg": H?.ooxmlBackground,
647
+ "--ac-ooxml-formula-border": H?.ooxmlFormulaBorder,
648
+ "--ac-ooxml-formula-bg": H?.ooxmlFormulaBackground,
649
+ "--ac-ooxml-formula-text": H?.ooxmlFormulaText,
650
+ "--ac-ooxml-highlight-border": H?.ooxmlHighlightBorder,
651
+ "--ac-ooxml-highlight-bg": H?.ooxmlHighlightBackground,
652
+ "--ac-json-collapsed-text": H?.jsonCollapsedText,
653
+ "--ac-json-collapsed-bg": H?.jsonCollapsedBackground,
654
+ "--ac-font-family": G ? void 0 : U?.fontFamily,
655
+ "--ac-font-size": G ? void 0 : U?.fontSize,
656
+ "--ac-font-weight": G ? void 0 : U?.fontWeight,
657
+ "--ac-line-height": G ? void 0 : U?.lineHeight,
658
+ "--ac-letter-spacing": G ? void 0 : U?.letterSpacing
659
659
  }),
660
- ...ue
661
- }), [M]), _e = I(() => {
660
+ ...de
661
+ }), [M]), ve = I(() => {
662
662
  switch (e.type) {
663
663
  case i.Image:
664
664
  case i.Audio:
@@ -676,35 +676,35 @@ var G = {
676
676
  case i.MarkdownTable: return "flex h-full min-h-0 flex-col overflow-hidden p-4";
677
677
  default: return "h-full overflow-auto p-4";
678
678
  }
679
- }, [e.type]), ve = I(() => {
679
+ }, [e.type]), ye = I(() => {
680
680
  switch (e.type) {
681
- case i.PlainText: return /* @__PURE__ */ V("pre", {
682
- className: g("whitespace-pre-wrap break-words", Y.body, W?.fontClassName),
681
+ case i.PlainText: return /* @__PURE__ */ z("pre", {
682
+ className: g("whitespace-pre-wrap break-words", J.body, U?.fontClassName),
683
683
  children: e.text
684
684
  });
685
- case i.Image: return /* @__PURE__ */ V(ke, {
685
+ case i.Image: return /* @__PURE__ */ z(Ae, {
686
686
  url: e.url,
687
687
  fileName: r,
688
688
  loadErrorLabel: c
689
689
  });
690
- case i.Audio: return /* @__PURE__ */ V("audio", {
690
+ case i.Audio: return /* @__PURE__ */ z("audio", {
691
691
  controls: !0,
692
692
  src: e.url,
693
693
  "aria-label": r ?? "Audio attachment",
694
694
  className: "w-full max-w-sm",
695
695
  preload: "metadata",
696
- children: e.mimeType && /* @__PURE__ */ V("source", {
696
+ children: e.mimeType && /* @__PURE__ */ z("source", {
697
697
  src: e.url,
698
698
  type: e.mimeType
699
699
  })
700
700
  });
701
- case i.Markdown: return /* @__PURE__ */ V(p, {
701
+ case i.Markdown: return /* @__PURE__ */ z(p, {
702
702
  content: e.text,
703
703
  isStreaming: !1,
704
704
  codeBlockTheme: P,
705
705
  classNames: u
706
706
  });
707
- case i.MarkdownTable: return /* @__PURE__ */ V(p, {
707
+ case i.MarkdownTable: return /* @__PURE__ */ z(p, {
708
708
  content: e.text,
709
709
  isStreaming: !1,
710
710
  codeBlockTheme: P,
@@ -723,34 +723,34 @@ var G = {
723
723
  },
724
724
  tableDownloadFilename: F
725
725
  });
726
- case i.Json: return /* @__PURE__ */ V("div", {
726
+ case i.Json: return /* @__PURE__ */ z("div", {
727
727
  dir: "ltr",
728
728
  className: "h-full overflow-auto",
729
- children: /* @__PURE__ */ V("div", {
730
- className: g("m-3 overflow-auto rounded-md border", Y.jsonWrapper),
731
- children: /* @__PURE__ */ V(se, {
729
+ children: /* @__PURE__ */ z("div", {
730
+ className: g("m-3 overflow-auto rounded-md border", J.jsonWrapper),
731
+ children: /* @__PURE__ */ z(se, {
732
732
  data: e.value,
733
733
  style: {
734
- container: g("whitespace-pre-wrap break-words p-2", W?.jsonClassName ?? "dial-code-text"),
735
- basicChildStyle: z.basicChildStyle,
734
+ container: g("whitespace-pre-wrap break-words p-2", U?.jsonClassName ?? "dial-code-text"),
735
+ basicChildStyle: ce.basicChildStyle,
736
736
  childFieldsContainer: "m-0 ps-3",
737
- label: g("me-1 font-semibold", Y.jsonLabel),
738
- clickableLabel: g("me-1 cursor-pointer font-semibold hover:underline", Y.jsonClickableLabel),
739
- nullValue: g("italic", Y.jsonNullValue),
740
- undefinedValue: g("italic", Y.jsonNullValue),
741
- stringValue: Y.jsonStringValue,
742
- booleanValue: Y.jsonBooleanValue,
743
- numberValue: Y.jsonNumberValue,
744
- otherValue: g("italic", Y.jsonNullValue),
745
- punctuation: g("me-1", Y.jsonPunctuation),
746
- collapseIcon: g("me-1 cursor-pointer select-none transition-colors", Y.jsonCollapseIcon),
747
- expandIcon: g("me-1 cursor-pointer select-none transition-colors", Y.jsonExpandIcon),
748
- collapsedContent: g("me-1 cursor-pointer rounded px-1", Y.jsonCollapsedContent)
737
+ label: g("me-1 font-semibold", J.jsonLabel),
738
+ clickableLabel: g("me-1 cursor-pointer font-semibold hover:underline", J.jsonClickableLabel),
739
+ nullValue: g("italic", J.jsonNullValue),
740
+ undefinedValue: g("italic", J.jsonNullValue),
741
+ stringValue: J.jsonStringValue,
742
+ booleanValue: J.jsonBooleanValue,
743
+ numberValue: J.jsonNumberValue,
744
+ otherValue: g("italic", J.jsonNullValue),
745
+ punctuation: g("me-1", J.jsonPunctuation),
746
+ collapseIcon: g("me-1 cursor-pointer select-none transition-colors", J.jsonCollapseIcon),
747
+ expandIcon: g("me-1 cursor-pointer select-none transition-colors", J.jsonExpandIcon),
748
+ collapsedContent: g("me-1 cursor-pointer rounded px-1", J.jsonCollapsedContent)
749
749
  }
750
750
  })
751
751
  })
752
752
  });
753
- case i.Code: return /* @__PURE__ */ V(pe, {
753
+ case i.Code: return /* @__PURE__ */ z(me, {
754
754
  content: e,
755
755
  codeBlockTheme: P,
756
756
  labels: {
@@ -759,7 +759,7 @@ var G = {
759
759
  retryLabel: ee
760
760
  }
761
761
  });
762
- case i.Html: return /* @__PURE__ */ V(he, {
762
+ case i.Html: return /* @__PURE__ */ z(ge, {
763
763
  content: e,
764
764
  labels: {
765
765
  htmlFrameBlockedLabel: f,
@@ -769,23 +769,23 @@ var G = {
769
769
  title: r,
770
770
  codeBlockTheme: P
771
771
  });
772
- case i.Pdf: return /* @__PURE__ */ V(s, {
773
- retryKey: G,
774
- onRetry: me,
772
+ case i.Pdf: return /* @__PURE__ */ z(s, {
773
+ retryKey: W,
774
+ onRetry: he,
775
775
  labels: {
776
776
  loadingLabel: x,
777
777
  errorLabel: C,
778
778
  retryLabel: w
779
779
  },
780
- children: /* @__PURE__ */ V(fe, {
780
+ children: /* @__PURE__ */ z(pe, {
781
781
  fileName: r,
782
782
  url: e.url,
783
783
  highlights: e.highlights ?? [],
784
784
  selectedHighlightId: e.selectedHighlightId,
785
785
  selectedPageNumber: e.page,
786
786
  loadPdf: L,
787
- hideHeader: B,
788
- configurePdfWorker: ce,
787
+ hideHeader: le,
788
+ configurePdfWorker: V,
789
789
  labels: {
790
790
  thumbnailsLabel: _,
791
791
  showThumbnailsLabel: v,
@@ -797,35 +797,35 @@ var G = {
797
797
  }
798
798
  })
799
799
  }, e.url);
800
- case i.Ooxml: return /* @__PURE__ */ V(Te, {
800
+ case i.Ooxml: return /* @__PURE__ */ z(Ee, {
801
801
  content: e,
802
802
  fileName: r,
803
803
  loadErrorLabel: c,
804
804
  formulaLabel: T,
805
- formulaLabelClassName: W?.xlsxFormulaLabelClassName ?? "dial-italic-text",
805
+ formulaLabelClassName: U?.xlsxFormulaLabelClassName ?? "dial-italic-text",
806
806
  highlightsLabel: A,
807
807
  highlightNavigatedLabel: j
808
808
  });
809
809
  case i.Visualizer:
810
- case i.GroupedVisualizer: return /* @__PURE__ */ V(De, {
810
+ case i.GroupedVisualizer: return /* @__PURE__ */ z(Oe, {
811
811
  content: e,
812
812
  errorLabel: d
813
813
  });
814
- case i.McpApp: return /* @__PURE__ */ V(be, { content: e });
815
- case i.Unsupported: return /* @__PURE__ */ V("p", {
816
- className: g("text-center", Y.statusLabel),
814
+ case i.McpApp: return /* @__PURE__ */ z(xe, { content: e });
815
+ case i.Unsupported: return /* @__PURE__ */ z("p", {
816
+ className: g("text-center", J.statusLabel),
817
817
  children: o
818
818
  });
819
819
  case i.Error: {
820
820
  let t = e.errorType === n.Forbidden;
821
- return /* @__PURE__ */ H("div", {
821
+ return /* @__PURE__ */ B("div", {
822
822
  className: "flex flex-col items-center gap-2",
823
- children: [V(t ? ie : D, {
823
+ children: [z(t ? ie : D, {
824
824
  size: 60,
825
825
  stroke: S,
826
- className: Y.errorIcon
827
- }), /* @__PURE__ */ V("p", {
828
- className: g("text-center", Y.statusLabel),
826
+ className: J.errorIcon
827
+ }), /* @__PURE__ */ z("p", {
828
+ className: g("text-center", J.statusLabel),
829
829
  children: t ? l : c
830
830
  })]
831
831
  });
@@ -833,9 +833,9 @@ var G = {
833
833
  }
834
834
  }, [
835
835
  e,
836
- W?.fontClassName,
837
- W?.jsonClassName,
838
- W?.xlsxFormulaLabelClassName,
836
+ U?.fontClassName,
837
+ U?.jsonClassName,
838
+ U?.xlsxFormulaLabelClassName,
839
839
  r,
840
840
  P,
841
841
  o,
@@ -847,8 +847,8 @@ var G = {
847
847
  a,
848
848
  F,
849
849
  L,
850
- B,
851
- ce,
850
+ le,
851
+ V,
852
852
  _,
853
853
  v,
854
854
  y,
@@ -860,9 +860,9 @@ var G = {
860
860
  O,
861
861
  k,
862
862
  ee,
863
- fe,
864
- G,
865
- me,
863
+ pe,
864
+ W,
865
+ he,
866
866
  te,
867
867
  ne,
868
868
  re,
@@ -871,186 +871,187 @@ var G = {
871
871
  A,
872
872
  j
873
873
  ]);
874
- return /* @__PURE__ */ V("div", {
875
- style: !t && Ae.has(e.type) ? ge : void 0,
876
- className: g(t ? "flex h-full items-center justify-center" : _e, le),
877
- children: t ? /* @__PURE__ */ V(E, {}) : ve
874
+ return /* @__PURE__ */ z("div", {
875
+ style: !t && je.has(e.type) ? _e : void 0,
876
+ className: g(t ? "flex h-full items-center justify-center" : ve, ue),
877
+ children: t ? /* @__PURE__ */ z(E, {}) : ye
878
878
  });
879
- }), Me = 2e3, Ne = M(({ isOpen: e, isLoading: t = !1, onClose: n, content: r, fileName: a, labels: { ariaLabel: s, closeLabel: c = "Close", resizeLabel: l = "Resize panel", downloadLabel: u = "Download", copyTextLabel: d = "Copy text", copiedTextLabel: f = "Copied!", copyMarkdownLabel: p = "Copy as Markdown", copiedMarkdownLabel: m = "Copied!", copyJsonLabel: h = "Copy as JSON", copiedJsonLabel: _ = "Copied!", visualizerErrorLabel: v, unsupportedLabel: C = "Preview is not supported for this file", loadErrorLabel: T = "Failed to load file", forbiddenErrorLabel: E = "You don't have permission to access this file", htmlFrameBlockedLabel: D = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: O = "Open in new tab", htmlViewSourceLabel: ie = "View source", htmlViewRenderedLabel: A = "View rendered", mcpAppReloadLabel: j = "Reload", pdfThumbnailsLabel: M, pdfShowThumbnailsLabel: P, pdfHideThumbnailsLabel: I, pdfPageNumberLabel: se, pdfContentLoadingLabel: z, pdfContentErrorLabel: ce, pdfContentRetryLabel: U, xlsxFormulaLabel: W, codeContentLoadingLabel: le, codeContentErrorLabel: ue, codeContentRetryLabel: G, tableCopyCsvLabel: de, tableCopyTxtLabel: fe, tableCopyMarkdownLabel: pe, tableCopiedLabel: me, tableDownloadCsvLabel: he, ooxmlHighlightsLabel: K, ooxmlHighlightNavigatedLabel: ge }, onDownload: _e, onCopyText: ve, onCopyMarkdown: ye, onCopyJson: q, tableDownloadFilename: be, isMobile: J = !1, defaultWidth: xe, minWidth: Se = 600, maxWidth: Ce = 1500, onResizeStop: we, styles: Te, codeBlockTheme: Ee, loadPdf: De, configurePdfWorker: Y }) => {
880
- let [Oe, ke] = R(!1), [Ae, Ne] = R(!1), [Pe, X] = R(!1), [Z, Fe] = R(!1), Ie = L(null), Le = L(null), Q = L(null), Re = N(() => {
881
- ve?.(), Ie.current != null && clearTimeout(Ie.current), ke(!0), Ie.current = setTimeout(() => ke(!1), Me);
882
- }, [ve]), ze = N(() => {
883
- ye?.(), Le.current != null && clearTimeout(Le.current), Ne(!0), Le.current = setTimeout(() => Ne(!1), Me);
884
- }, [ye]), Be = N(() => {
885
- q?.(), Q.current != null && clearTimeout(Q.current), X(!0), Q.current = setTimeout(() => X(!1), Me);
886
- }, [q]);
879
+ }), Ne = 2e3, Pe = M(({ 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: m = "Copy as Markdown", copiedMarkdownLabel: h = "Copied!", copyJsonLabel: _ = "Copy as JSON", copiedJsonLabel: v = "Copied!", visualizerErrorLabel: C, unsupportedLabel: T = "Preview is not supported for this file", loadErrorLabel: E = "Failed to load file", forbiddenErrorLabel: D = "You don't have permission to access this file", htmlFrameBlockedLabel: O = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: ie = "Open in new tab", htmlViewSourceLabel: A = "View source", htmlViewRenderedLabel: j = "View rendered", mcpAppReloadLabel: M = "Reload", pdfThumbnailsLabel: P, pdfShowThumbnailsLabel: I, pdfHideThumbnailsLabel: se, pdfPageNumberLabel: ce, pdfContentLoadingLabel: V, pdfContentErrorLabel: H, pdfContentRetryLabel: U, xlsxFormulaLabel: ue, codeContentLoadingLabel: de, codeContentErrorLabel: W, codeContentRetryLabel: fe, tableCopyCsvLabel: pe, tableCopyTxtLabel: me, tableCopyMarkdownLabel: he, tableCopiedLabel: ge, tableDownloadCsvLabel: G, ooxmlHighlightsLabel: _e, ooxmlHighlightNavigatedLabel: ve }, onDownload: ye, onCopyText: be, onCopyMarkdown: K, onCopyJson: xe, tableDownloadFilename: q, isMobile: Se = !1, defaultWidth: Ce, minWidth: we = 600, maxWidth: Te = 1500, onResizeStop: Ee, styles: De, codeBlockTheme: Oe, loadPdf: J, configurePdfWorker: ke }) => {
880
+ let [Ae, je] = R(!1), [Pe, Fe] = R(!1), [Y, Ie] = R(!1), [X, Le] = R(!1), Z = L(null), Q = L(null), Re = L(null), ze = N(() => {
881
+ be?.(), Z.current != null && clearTimeout(Z.current), je(!0), Z.current = setTimeout(() => je(!1), Ne);
882
+ }, [be]), Be = N(() => {
883
+ K?.(), Q.current != null && clearTimeout(Q.current), Fe(!0), Q.current = setTimeout(() => Fe(!1), Ne);
884
+ }, [K]), Ve = N(() => {
885
+ xe?.(), Re.current != null && clearTimeout(Re.current), Ie(!0), Re.current = setTimeout(() => Ie(!1), Ne);
886
+ }, [xe]);
887
887
  F(() => () => {
888
- Ie.current != null && clearTimeout(Ie.current), Le.current != null && clearTimeout(Le.current), Q.current != null && clearTimeout(Q.current);
888
+ Z.current != null && clearTimeout(Z.current), Q.current != null && clearTimeout(Q.current), Re.current != null && clearTimeout(Re.current);
889
889
  }, []);
890
- let Ve = N(() => {
891
- Fe((e) => !e);
890
+ let He = N(() => {
891
+ Le((e) => !e);
892
892
  }, []);
893
893
  F(() => {
894
- Fe(!1);
894
+ Le(!1);
895
895
  }, [r]);
896
- let { className: He, panelStyles: Ue, ...$ } = Te ?? {}, We = !t && r.type === i.Html && r.srcdoc != null, Ge = !t && ve != null && (r.type === i.PlainText || r.type === i.Code), Ke = !t && ye != null && r.type === i.Markdown, qe = !t && q != null && r.type === i.Json, Je = !t && _e != null && o(r), Ye = !t && r.type === i.McpApp && r.onReload != null;
897
- return /* @__PURE__ */ V(b, {
896
+ let { className: Ue, panelStyles: $, ...We } = De ?? {}, Ge = !t && r.type === i.Html && r.srcdoc != null, Ke = !t && be != null && (r.type === i.PlainText || r.type === i.Code), qe = !t && K != null && r.type === i.Markdown, Je = !t && xe != null && r.type === i.Json, Ye = !t && ye != null && o(r), Xe = !t && r.type === i.McpApp && r.onReload != null;
897
+ return /* @__PURE__ */ z(b, {
898
898
  isOpen: e,
899
899
  orientation: y.Right,
900
900
  title: a,
901
901
  labels: {
902
- ariaLabel: s,
903
- closeLabel: c,
904
- resizeLabel: l
902
+ ariaLabel: c,
903
+ closeLabel: l,
904
+ resizeLabel: u
905
905
  },
906
906
  onClose: n,
907
- resizable: !J,
908
- defaultWidth: xe,
909
- minWidth: Se,
910
- maxWidth: Ce,
911
- onResizeStop: we,
907
+ resizable: !Se,
908
+ defaultWidth: Ce,
909
+ minWidth: we,
910
+ maxWidth: Te,
911
+ onResizeStop: Ee,
912
912
  styles: {
913
- ...Ue,
914
- titleClassName: Ue?.titleClassName ?? "dial-h3-text",
915
- headerClassName: g("border-b border-tertiary", Ue?.headerClassName),
916
- className: g(e ? "mobile:w-full mobile:max-w-full" : "w-0", He, Ue?.className)
913
+ ...$,
914
+ titleClassName: $?.titleClassName ?? "dial-h3-text",
915
+ headerClassName: g("border-b border-tertiary", $?.headerClassName),
916
+ className: g(e ? "mobile:w-full mobile:max-w-full" : "w-0", Ue, $?.className)
917
917
  },
918
- rightActions: We || Ge || Ke || qe || Je || Ye ? /* @__PURE__ */ H(B, { children: [
919
- Ye && /* @__PURE__ */ V(w, {
920
- icon: /* @__PURE__ */ V(oe, {
918
+ leftActions: s,
919
+ rightActions: Ge || Ke || qe || Je || Ye || Xe ? /* @__PURE__ */ B(le, { children: [
920
+ Xe && /* @__PURE__ */ z(w, {
921
+ icon: /* @__PURE__ */ z(oe, {
921
922
  size: x.LG,
922
923
  stroke: S,
923
924
  "aria-hidden": !0
924
925
  }),
925
- "aria-label": j,
926
- tooltipProps: { tooltip: j },
926
+ "aria-label": M,
927
+ tooltipProps: { tooltip: M },
927
928
  onClick: r.type === i.McpApp ? r.onReload : void 0
928
929
  }),
929
- We && /* @__PURE__ */ V(w, {
930
- icon: V(Z ? re : ee, {
930
+ Ge && /* @__PURE__ */ z(w, {
931
+ icon: z(X ? re : ee, {
931
932
  size: x.LG,
932
933
  stroke: S,
933
934
  "aria-hidden": !0
934
935
  }),
935
- "aria-label": Z ? A : ie,
936
- "aria-pressed": Z,
937
- tooltipProps: { tooltip: Z ? A : ie },
938
- onClick: Ve
936
+ "aria-label": X ? j : A,
937
+ "aria-pressed": X,
938
+ tooltipProps: { tooltip: X ? j : A },
939
+ onClick: He
939
940
  }),
940
- Ge && /* @__PURE__ */ V(w, {
941
- icon: V(Oe ? k : te, {
941
+ Ke && /* @__PURE__ */ z(w, {
942
+ icon: z(Ae ? k : te, {
942
943
  size: x.LG,
943
944
  stroke: S,
944
945
  "aria-hidden": !0
945
946
  }),
946
- "aria-label": Oe ? f : d,
947
- tooltipProps: { tooltip: Oe ? f : d },
948
- onClick: Re
947
+ "aria-label": Ae ? p : f,
948
+ tooltipProps: { tooltip: Ae ? p : f },
949
+ onClick: ze
949
950
  }),
950
- Ke && /* @__PURE__ */ V(w, {
951
- icon: V(Ae ? k : ae, {
951
+ qe && /* @__PURE__ */ z(w, {
952
+ icon: z(Pe ? k : ae, {
952
953
  size: x.LG,
953
954
  stroke: S,
954
955
  "aria-hidden": !0
955
956
  }),
956
- "aria-label": Ae ? m : p,
957
- tooltipProps: { tooltip: Ae ? m : p },
958
- onClick: ze
957
+ "aria-label": Pe ? h : m,
958
+ tooltipProps: { tooltip: Pe ? h : m },
959
+ onClick: Be
959
960
  }),
960
- qe && /* @__PURE__ */ V(w, {
961
- icon: V(Pe ? k : te, {
961
+ Je && /* @__PURE__ */ z(w, {
962
+ icon: z(Y ? k : te, {
962
963
  size: x.LG,
963
964
  stroke: S,
964
965
  "aria-hidden": !0
965
966
  }),
966
- "aria-label": Pe ? _ : h,
967
- tooltipProps: { tooltip: Pe ? _ : h },
968
- onClick: Be
967
+ "aria-label": Y ? v : _,
968
+ tooltipProps: { tooltip: Y ? v : _ },
969
+ onClick: Ve
969
970
  }),
970
- Je && /* @__PURE__ */ V(w, {
971
- icon: /* @__PURE__ */ V(ne, {
971
+ Ye && /* @__PURE__ */ z(w, {
972
+ icon: /* @__PURE__ */ z(ne, {
972
973
  size: x.LG,
973
974
  stroke: S
974
975
  }),
975
- "aria-label": u,
976
- tooltipProps: { tooltip: u },
977
- onClick: _e
976
+ "aria-label": d,
977
+ tooltipProps: { tooltip: d },
978
+ onClick: ye
978
979
  })
979
980
  ] }) : null,
980
- children: /* @__PURE__ */ V(je, {
981
+ children: /* @__PURE__ */ z(Me, {
981
982
  content: r,
982
983
  isLoading: t,
983
984
  fileName: a,
984
- isHtmlSourceView: Z,
985
+ isHtmlSourceView: X,
985
986
  labels: {
986
- unsupportedLabel: C,
987
- loadErrorLabel: T,
988
- forbiddenErrorLabel: E,
989
- visualizerErrorLabel: v,
990
- htmlFrameBlockedLabel: D,
991
- htmlOpenInNewTabLabel: O,
992
- pdfThumbnailsLabel: M,
993
- pdfShowThumbnailsLabel: P,
994
- pdfHideThumbnailsLabel: I,
995
- pdfPageNumberLabel: se,
996
- pdfContentLoadingLabel: z,
997
- pdfContentErrorLabel: ce,
987
+ unsupportedLabel: T,
988
+ loadErrorLabel: E,
989
+ forbiddenErrorLabel: D,
990
+ visualizerErrorLabel: C,
991
+ htmlFrameBlockedLabel: O,
992
+ htmlOpenInNewTabLabel: ie,
993
+ pdfThumbnailsLabel: P,
994
+ pdfShowThumbnailsLabel: I,
995
+ pdfHideThumbnailsLabel: se,
996
+ pdfPageNumberLabel: ce,
997
+ pdfContentLoadingLabel: V,
998
+ pdfContentErrorLabel: H,
998
999
  pdfContentRetryLabel: U,
999
- xlsxFormulaLabel: W,
1000
- codeContentLoadingLabel: le,
1001
- codeContentErrorLabel: ue,
1002
- codeContentRetryLabel: G,
1003
- tableCopyCsvLabel: de,
1004
- tableCopyTxtLabel: fe,
1005
- tableCopyMarkdownLabel: pe,
1006
- tableCopiedLabel: me,
1007
- tableDownloadCsvLabel: he,
1008
- ooxmlHighlightsLabel: K,
1009
- ooxmlHighlightNavigatedLabel: ge
1000
+ xlsxFormulaLabel: ue,
1001
+ codeContentLoadingLabel: de,
1002
+ codeContentErrorLabel: W,
1003
+ codeContentRetryLabel: fe,
1004
+ tableCopyCsvLabel: pe,
1005
+ tableCopyTxtLabel: me,
1006
+ tableCopyMarkdownLabel: he,
1007
+ tableCopiedLabel: ge,
1008
+ tableDownloadCsvLabel: G,
1009
+ ooxmlHighlightsLabel: _e,
1010
+ ooxmlHighlightNavigatedLabel: ve
1010
1011
  },
1011
- styles: $,
1012
- codeBlockTheme: Ee,
1013
- tableDownloadFilename: be,
1014
- loadPdf: De,
1015
- configurePdfWorker: Y
1012
+ styles: We,
1013
+ codeBlockTheme: Oe,
1014
+ tableDownloadFilename: q,
1015
+ loadPdf: J,
1016
+ configurePdfWorker: ke
1016
1017
  })
1017
1018
  });
1018
- }), Pe = new Set(["html", "htm"]), X = {
1019
+ }), Fe = new Set(["html", "htm"]), Y = {
1019
1020
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1020
1021
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1021
1022
  pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
1022
- }, Z = 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(".")), Fe = {
1023
+ }, Ie = 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(".")), X = {
1023
1024
  docx: r.Docx,
1024
1025
  xlsx: r.Xlsx,
1025
1026
  pptx: r.Pptx,
1026
1027
  csv: r.Csv
1027
- }, Ie = {
1028
- [X.docx]: r.Docx,
1029
- [X.xlsx]: r.Xlsx,
1030
- [X.pptx]: r.Pptx,
1031
- [f.CSV]: r.Csv
1032
1028
  }, Le = {
1033
- [r.Docx]: X.docx,
1034
- [r.Xlsx]: X.xlsx,
1035
- [r.Pptx]: X.pptx,
1029
+ [Y.docx]: r.Docx,
1030
+ [Y.xlsx]: r.Xlsx,
1031
+ [Y.pptx]: r.Pptx,
1032
+ [f.CSV]: r.Csv
1033
+ }, Z = {
1034
+ [r.Docx]: Y.docx,
1035
+ [r.Xlsx]: Y.xlsx,
1036
+ [r.Pptx]: Y.pptx,
1036
1037
  [r.Csv]: f.CSV
1037
1038
  }, Q = (e, t) => {
1038
1039
  let n = t?.split(";", 1)[0].trim().toLowerCase();
1039
1040
  if (n != null) {
1040
- let e = Ie[n];
1041
+ let e = Le[n];
1041
1042
  if (e != null) return e;
1042
1043
  }
1043
1044
  let r = e.lastIndexOf(".");
1044
- if (r !== -1) return Fe[e.slice(r + 1).toLowerCase()];
1045
+ if (r !== -1) return X[e.slice(r + 1).toLowerCase()];
1045
1046
  }, Re = (e, t) => Q(e, t) != null, ze = (e, t) => {
1046
1047
  let n = Q(e, t);
1047
- return n == null ? void 0 : Le[n];
1048
+ return n == null ? void 0 : Z[n];
1048
1049
  }, Be = (e) => {
1049
1050
  let t = e.lastIndexOf(".");
1050
- return t === -1 ? !1 : Z.has(e.slice(t + 1).toLowerCase());
1051
+ return t === -1 ? !1 : Ie.has(e.slice(t + 1).toLowerCase());
1051
1052
  }, Ve = (e) => {
1052
1053
  let t = e.lastIndexOf(".");
1053
- return t === -1 ? !1 : Pe.has(e.slice(t + 1).toLowerCase());
1054
+ return t === -1 ? !1 : Fe.has(e.slice(t + 1).toLowerCase());
1054
1055
  }, He = {
1055
1056
  xml: "xml",
1056
1057
  csv: "plaintext",
@@ -1131,7 +1132,7 @@ var Xe = ({ children: e }) => {
1131
1132
  return F(() => () => {
1132
1133
  let e = Ke(a);
1133
1134
  e != null && URL.revokeObjectURL(e);
1134
- }, [a]), /* @__PURE__ */ V(Ye.Provider, {
1135
+ }, [a]), /* @__PURE__ */ z(Ye.Provider, {
1135
1136
  value: I(() => ({
1136
1137
  isOpen: t,
1137
1138
  isLoading: r,
@@ -1157,68 +1158,70 @@ var Xe = ({ children: e }) => {
1157
1158
  let e = P(Ye);
1158
1159
  if (!e) throw Error("useAttachmentCanvas must be used within an AttachmentCanvasProvider");
1159
1160
  return e;
1160
- }, Qe = M(({ labels: e, isMobile: t = !1, defaultWidth: n, maxWidth: r, codeBlockTheme: o, tableDownloadFilename: s, configurePdfWorker: c }) => {
1161
- let { ariaLabel: l = "Attachment preview", closeLabel: u = "Close", downloadLabel: d = "Download", unsupportedLabel: f = "Preview is not supported for this file", loadErrorLabel: p = "Failed to load file", forbiddenErrorLabel: m = "You don't have permission to access this file", copyTextLabel: g, copiedTextLabel: _, copyMarkdownLabel: v, copiedMarkdownLabel: y, copyJsonLabel: b, copiedJsonLabel: x, htmlFrameBlockedLabel: S, htmlOpenInNewTabLabel: C, htmlViewSourceLabel: w, htmlViewRenderedLabel: T, pdfThumbnailsLabel: E, pdfShowThumbnailsLabel: D, pdfHideThumbnailsLabel: O, pdfPageNumberLabel: k, pdfContentLoadingLabel: ee, pdfContentErrorLabel: te, pdfContentRetryLabel: ne, xlsxFormulaLabel: re, codeContentLoadingLabel: ie, codeContentErrorLabel: ae, codeContentRetryLabel: oe, tableCopyCsvLabel: A, tableCopyTxtLabel: j, tableCopyMarkdownLabel: M, tableCopiedLabel: P, tableDownloadCsvLabel: F, ooxmlHighlightsLabel: I, ooxmlHighlightNavigatedLabel: L } = e ?? {}, { isOpen: R, isLoading: se, content: z, fileName: B, closeCanvas: H } = Ze(), ce = N(() => {
1162
- a(z, B);
1163
- }, [z, B]), U = N(() => {
1164
- (z.type === i.PlainText || z.type === i.Code) && h(z.text);
1165
- }, [z]), W = N(() => {
1166
- z.type === i.Markdown && h(z.text);
1167
- }, [z]), le = N(() => {
1168
- z.type === i.Json && h(JSON.stringify(z.value, null, 2));
1169
- }, [z]);
1170
- return /* @__PURE__ */ V(Ne, {
1171
- isOpen: R,
1172
- isLoading: se,
1161
+ }, Qe = M(({ labels: e, leftActions: t, isMobile: n = !1, defaultWidth: r, maxWidth: o, codeBlockTheme: s, tableDownloadFilename: c, loadPdf: l, configurePdfWorker: u }) => {
1162
+ 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: ee, pdfPageNumberLabel: te, pdfContentLoadingLabel: ne, pdfContentErrorLabel: re, pdfContentRetryLabel: ie, xlsxFormulaLabel: ae, codeContentLoadingLabel: oe, codeContentErrorLabel: A, codeContentRetryLabel: j, tableCopyCsvLabel: M, tableCopyTxtLabel: P, tableCopyMarkdownLabel: F, tableCopiedLabel: I, tableDownloadCsvLabel: L, ooxmlHighlightsLabel: R, ooxmlHighlightNavigatedLabel: se } = e ?? {}, { isOpen: ce, isLoading: le, content: B, fileName: V, closeCanvas: H } = Ze(), U = N(() => {
1163
+ a(B, V);
1164
+ }, [B, V]), ue = N(() => {
1165
+ (B.type === i.PlainText || B.type === i.Code) && h(B.text);
1166
+ }, [B]), de = N(() => {
1167
+ B.type === i.Markdown && h(B.text);
1168
+ }, [B]), W = N(() => {
1169
+ B.type === i.Json && h(JSON.stringify(B.value, null, 2));
1170
+ }, [B]);
1171
+ return /* @__PURE__ */ z(Pe, {
1172
+ isOpen: ce,
1173
+ isLoading: le,
1173
1174
  onClose: H,
1174
- content: z,
1175
- fileName: B,
1175
+ content: B,
1176
+ fileName: V,
1177
+ leftActions: t,
1176
1178
  labels: {
1177
- ariaLabel: l,
1178
- closeLabel: u,
1179
- downloadLabel: d,
1180
- copyTextLabel: g,
1181
- copiedTextLabel: _,
1182
- copyMarkdownLabel: v,
1183
- copiedMarkdownLabel: y,
1184
- copyJsonLabel: b,
1185
- copiedJsonLabel: x,
1186
- unsupportedLabel: f,
1187
- loadErrorLabel: p,
1188
- forbiddenErrorLabel: m,
1189
- htmlFrameBlockedLabel: S,
1190
- htmlOpenInNewTabLabel: C,
1191
- htmlViewSourceLabel: w,
1192
- htmlViewRenderedLabel: T,
1193
- pdfThumbnailsLabel: E,
1194
- pdfShowThumbnailsLabel: D,
1195
- pdfHideThumbnailsLabel: O,
1196
- pdfPageNumberLabel: k,
1197
- pdfContentLoadingLabel: ee,
1198
- pdfContentErrorLabel: te,
1199
- pdfContentRetryLabel: ne,
1200
- xlsxFormulaLabel: re,
1201
- codeContentLoadingLabel: ie,
1202
- codeContentErrorLabel: ae,
1203
- codeContentRetryLabel: oe,
1204
- tableCopyCsvLabel: A,
1205
- tableCopyTxtLabel: j,
1206
- tableCopyMarkdownLabel: M,
1207
- tableCopiedLabel: P,
1208
- tableDownloadCsvLabel: F,
1209
- ooxmlHighlightsLabel: I,
1210
- ooxmlHighlightNavigatedLabel: L
1179
+ ariaLabel: d,
1180
+ closeLabel: f,
1181
+ downloadLabel: p,
1182
+ copyTextLabel: v,
1183
+ copiedTextLabel: y,
1184
+ copyMarkdownLabel: b,
1185
+ copiedMarkdownLabel: x,
1186
+ copyJsonLabel: S,
1187
+ copiedJsonLabel: C,
1188
+ unsupportedLabel: m,
1189
+ loadErrorLabel: g,
1190
+ forbiddenErrorLabel: _,
1191
+ htmlFrameBlockedLabel: w,
1192
+ htmlOpenInNewTabLabel: T,
1193
+ htmlViewSourceLabel: E,
1194
+ htmlViewRenderedLabel: D,
1195
+ pdfThumbnailsLabel: O,
1196
+ pdfShowThumbnailsLabel: k,
1197
+ pdfHideThumbnailsLabel: ee,
1198
+ pdfPageNumberLabel: te,
1199
+ pdfContentLoadingLabel: ne,
1200
+ pdfContentErrorLabel: re,
1201
+ pdfContentRetryLabel: ie,
1202
+ xlsxFormulaLabel: ae,
1203
+ codeContentLoadingLabel: oe,
1204
+ codeContentErrorLabel: A,
1205
+ codeContentRetryLabel: j,
1206
+ tableCopyCsvLabel: M,
1207
+ tableCopyTxtLabel: P,
1208
+ tableCopyMarkdownLabel: F,
1209
+ tableCopiedLabel: I,
1210
+ tableDownloadCsvLabel: L,
1211
+ ooxmlHighlightsLabel: R,
1212
+ ooxmlHighlightNavigatedLabel: se
1211
1213
  },
1212
- onDownload: ce,
1213
- onCopyText: z.type === i.PlainText || z.type === i.Code ? U : void 0,
1214
- onCopyMarkdown: z.type === i.Markdown ? W : void 0,
1215
- onCopyJson: z.type === i.Json ? le : void 0,
1216
- tableDownloadFilename: s,
1217
- isMobile: t,
1218
- defaultWidth: n,
1219
- maxWidth: r,
1220
- codeBlockTheme: o,
1221
- configurePdfWorker: c
1214
+ onDownload: U,
1215
+ onCopyText: B.type === i.PlainText || B.type === i.Code ? ue : void 0,
1216
+ onCopyMarkdown: B.type === i.Markdown ? de : void 0,
1217
+ onCopyJson: B.type === i.Json ? W : void 0,
1218
+ tableDownloadFilename: c,
1219
+ isMobile: n,
1220
+ defaultWidth: r,
1221
+ maxWidth: o,
1222
+ codeBlockTheme: s,
1223
+ configurePdfWorker: u,
1224
+ loadPdf: l
1222
1225
  });
1223
1226
  }), $e = {
1224
1227
  frame: "_frame_g47g7_1",
@@ -1226,24 +1229,24 @@ var Xe = ({ children: e }) => {
1226
1229
  title: "_title_g47g7_10"
1227
1230
  }, et = M(({ content: e, height: t, onExpand: n, expandAriaLabel: r, actionsGroupAriaLabel: i = "Visualizer actions", frameTitle: a, loadingLabel: o, errorLabel: s, titleClassName: c = "dial-small-semi-text", colors: l }) => {
1228
1231
  let u = e.visualizerName.trim();
1229
- return /* @__PURE__ */ H("div", {
1232
+ return /* @__PURE__ */ B("div", {
1230
1233
  className: g("flex w-full min-w-0 flex-col overflow-hidden rounded-xl border", $e.frame),
1231
1234
  style: m({
1232
1235
  "--igv-bg": l?.background,
1233
1236
  "--igv-border": l?.border,
1234
1237
  "--igv-title-text": l?.titleText
1235
1238
  }),
1236
- children: [/* @__PURE__ */ H("div", {
1239
+ children: [/* @__PURE__ */ B("div", {
1237
1240
  className: g("flex min-h-10 items-center justify-between gap-2 border-b px-4 py-2", $e.header),
1238
- children: [/* @__PURE__ */ V("span", {
1241
+ children: [/* @__PURE__ */ z("span", {
1239
1242
  className: g("min-w-0 truncate", c, $e.title),
1240
1243
  children: u
1241
- }), /* @__PURE__ */ V("div", {
1244
+ }), /* @__PURE__ */ z("div", {
1242
1245
  role: "toolbar",
1243
1246
  "aria-label": i,
1244
1247
  className: "flex items-center gap-1",
1245
- children: /* @__PURE__ */ V(w, {
1246
- icon: /* @__PURE__ */ V(O, {
1248
+ children: /* @__PURE__ */ z(w, {
1249
+ icon: /* @__PURE__ */ z(O, {
1247
1250
  size: x.SM,
1248
1251
  stroke: S,
1249
1252
  "aria-hidden": !0
@@ -1253,10 +1256,10 @@ var Xe = ({ children: e }) => {
1253
1256
  onClick: n
1254
1257
  })
1255
1258
  })]
1256
- }), /* @__PURE__ */ V("div", {
1259
+ }), /* @__PURE__ */ z("div", {
1257
1260
  className: "w-full",
1258
1261
  style: { height: `${t}px` },
1259
- children: /* @__PURE__ */ V(De, {
1262
+ children: /* @__PURE__ */ z(Oe, {
1260
1263
  content: e,
1261
1264
  loadingLabel: o,
1262
1265
  errorLabel: s,
@@ -1387,4 +1390,4 @@ var Xe = ({ children: e }) => {
1387
1390
  ]) };
1388
1391
  };
1389
1392
  //#endregion
1390
- export { Ne as AttachmentCanvas, je as AttachmentCanvasBody, Qe as AttachmentCanvasContainer, Xe as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, pe as CodeContent, et as InlineGroupedVisualizer, be as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, Ge as createForbiddenCanvasContent, We as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, a as downloadAttachmentContent, Ue as extensionToLanguage, nt as findVisualizerForApplication, tt as findVisualizerForMime, Q as getOoxmlFileType, ze as getOoxmlMimeType, rt as groupedVisualizerCanvasKey, o as isDownloadable, Ve as isHtmlPreviewable, Re as isOoxmlPreviewable, Be as isTextPreviewable, it as partitionAttachmentsForApplicationVisualizer, Ze as useAttachmentCanvas, ot as useOpenAttachmentCanvas };
1393
+ export { Pe as AttachmentCanvas, Me as AttachmentCanvasBody, Qe as AttachmentCanvasContainer, Xe as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, me as CodeContent, et as InlineGroupedVisualizer, xe as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, Ge as createForbiddenCanvasContent, We as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, a as downloadAttachmentContent, Ue as extensionToLanguage, nt as findVisualizerForApplication, tt as findVisualizerForMime, Q as getOoxmlFileType, ze as getOoxmlMimeType, rt as groupedVisualizerCanvasKey, o as isDownloadable, Ve as isHtmlPreviewable, Re as isOoxmlPreviewable, Be as isTextPreviewable, it as partitionAttachmentsForApplicationVisualizer, Ze as useAttachmentCanvas, ot as useOpenAttachmentCanvas };