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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -5,24 +5,24 @@ import { SidebarOrientation as b, SidebarPanel as x } from "@epam/ai-dial-sideba
5
5
  import { DIAL_ICON_SIZE as S, DIAL_KIT_ICON_STROKE as C, ElementSize as w, GhostIconButton as T, LinkButton as E, Spinner as D } from "@epam/ai-dial-ui-kit";
6
6
  import { IconAlertTriangle as O, IconArrowsMaximize as k, IconCheck as A, IconCode as j, IconCopy as ee, IconDownload as te, IconEye as M, IconLock as ne, IconMarkdown as re, IconRefresh as ie } from "@tabler/icons-react";
7
7
  import { createContext as N, lazy as P, memo as F, useCallback as I, useContext as ae, useEffect as L, useMemo as R, useRef as z, useState as B } from "react";
8
- import { JsonView as V, defaultStyles as oe } from "react-json-view-lite";
8
+ import { JsonView as oe, defaultStyles as V } from "react-json-view-lite";
9
9
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
10
- import { AppBridge as G, AppFrame as se } from "@mcp-ui/client";
11
- import { McpUiHostContextChangedNotificationSchema as ce } from "@modelcontextprotocol/ext-apps/app-bridge";
12
- import { VisualizerConnectorRequests as le } from "@epam/ai-dial-shared";
10
+ import { AppBridge as G, AppFrame as K } from "@mcp-ui/client";
11
+ import { McpUiHostContextChangedNotificationSchema as se } from "@modelcontextprotocol/ext-apps/app-bridge";
12
+ import { VisualizerConnectorEvents as ce, VisualizerConnectorRequests as le } from "@epam/ai-dial-shared";
13
13
  import { VisualizerConnector as ue } from "@epam/ai-dial-visualizer-connector";
14
14
  //#region src/constants/public-class-names.ts
15
15
  var de = { panel: "dial-attachment-canvas-panel" }, fe = {
16
16
  container: "_container_1nhig_1",
17
17
  containerLight: "_containerLight_1nhig_5"
18
- }, K = {
18
+ }, q = {
19
19
  [l.Dark]: v,
20
20
  [l.Light]: v
21
21
  }, pe = () => P(async () => {
22
22
  let { Prism: e } = await import("react-syntax-highlighter");
23
23
  return { default: e };
24
24
  }), me = F(({ content: e, codeBlockTheme: t = l.Light, labels: n }) => {
25
- let { text: r, language: i } = e, a = R(() => g(r), [r]), o = i == null || i === "plaintext" || !a, c = K[t], u = t === l.Light, [d, f] = B(0), p = R(pe, [d]), m = I(() => {
25
+ let { text: r, language: i } = e, a = R(() => g(r), [r]), o = i == null || i === "plaintext" || !a, c = q[t], u = t === l.Light, [d, f] = B(0), p = R(pe, [d]), m = I(() => {
26
26
  f((e) => e + 1);
27
27
  }, []), h = /* @__PURE__ */ U("pre", {
28
28
  className: "whitespace-pre-wrap break-words p-4",
@@ -198,7 +198,7 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
198
198
  }, e.onrequestdisplaymode = async ({ mode: e }) => {
199
199
  let t = r.current.onRequestDisplayMode, n = r.current.hostContext?.displayMode ?? "inline";
200
200
  return { mode: t?.(e) ?? n };
201
- }, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(ce, ({ params: e }) => {
201
+ }, e.oncalltool = (e) => r.current.onToolCall(e.name, e.arguments), e.setNotificationHandler(se, ({ params: e }) => {
202
202
  let n = t.current?.querySelector("iframe");
203
203
  n != null && xe(n, e.containerDimensions, r.current.hostContext?.displayMode === "fullscreen");
204
204
  }), a(e);
@@ -214,7 +214,7 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
214
214
  appBridge: i,
215
215
  hasFailed: o
216
216
  };
217
- }, q = {
217
+ }, J = {
218
218
  loadingOverlay: "_loadingOverlay_iea4a_2",
219
219
  fullscreenFrame: "_fullscreenFrame_iea4a_21",
220
220
  loadingFrame: "_loadingFrame_iea4a_29",
@@ -242,9 +242,9 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
242
242
  }, [d, h])), b = y || r === "error";
243
243
  return /* @__PURE__ */ W("div", {
244
244
  ref: m,
245
- className: _("relative h-full min-h-[200px] w-full", p && q.fullscreenFrame, !p && r === "loading" && q.loadingFrame),
245
+ className: _("relative h-full min-h-[200px] w-full", p && J.fullscreenFrame, !p && r === "loading" && J.loadingFrame),
246
246
  children: [
247
- v != null && !b && /* @__PURE__ */ U(se, {
247
+ v != null && !b && /* @__PURE__ */ U(K, {
248
248
  html: s,
249
249
  sandbox: f,
250
250
  appBridge: v,
@@ -259,7 +259,7 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
259
259
  }
260
260
  }),
261
261
  !b && r === "loading" && /* @__PURE__ */ U("div", {
262
- className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", q.loadingOverlay),
262
+ className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", J.loadingOverlay),
263
263
  children: /* @__PURE__ */ U(D, {})
264
264
  }),
265
265
  b && /* @__PURE__ */ W("div", {
@@ -268,19 +268,19 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
268
268
  size: 60,
269
269
  stroke: C,
270
270
  "aria-hidden": !0,
271
- className: q.errorIcon
271
+ className: J.errorIcon
272
272
  }), /* @__PURE__ */ W("p", {
273
273
  role: "alert",
274
- className: _("text-center", q.statusLabel),
274
+ className: _("text-center", J.statusLabel),
275
275
  children: [t, a && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U("br", {}), /* @__PURE__ */ U("span", {
276
- className: q.statusDetail,
276
+ className: J.statusDetail,
277
277
  children: a
278
278
  })] })]
279
279
  })]
280
280
  })
281
281
  ]
282
282
  });
283
- }, J = {
283
+ }, Y = {
284
284
  viewer: "_viewer_1w97n_2",
285
285
  spreadsheetCanvas: "_spreadsheetCanvas_1w97n_6",
286
286
  formulaPanel: "_formulaPanel_1w97n_12",
@@ -316,7 +316,7 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
316
316
  }
317
317
  case r.Csv: {
318
318
  let { XlsxSheetViewer: t } = await import("@silurus/ooxml/xlsx"), r = document.createElement("canvas");
319
- r.className = J.spreadsheetCanvas, e.replaceChildren(r);
319
+ r.className = Y.spreadsheetCanvas, e.replaceChildren(r);
320
320
  let i = new t(r, {
321
321
  showScrollbars: !0,
322
322
  onError: n
@@ -498,7 +498,7 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
498
498
  t.format === r.Xlsx && /* @__PURE__ */ W("div", {
499
499
  role: "region",
500
500
  "aria-label": a,
501
- className: _("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", J.formulaPanel),
501
+ className: _("flex min-w-0 shrink-0 items-center gap-2 border-b px-3 py-2", Y.formulaPanel),
502
502
  children: [/* @__PURE__ */ U("span", {
503
503
  "aria-hidden": "true",
504
504
  className: _("shrink-0", o),
@@ -507,7 +507,7 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
507
507
  dir: "ltr",
508
508
  tabIndex: 0,
509
509
  "aria-live": "polite",
510
- className: _("h-8 min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded border px-2 py-1 text-sm focus-visible:outline focus-visible:outline-focus", J.formulaValue),
510
+ className: _("h-8 min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded border px-2 py-1 text-sm focus-visible:outline focus-visible:outline-focus", Y.formulaValue),
511
511
  children: m
512
512
  })]
513
513
  }),
@@ -518,7 +518,7 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
518
518
  role: "document",
519
519
  "aria-label": n,
520
520
  "aria-busy": u,
521
- className: _("h-full w-full overflow-hidden", J.viewer)
521
+ className: _("h-full w-full overflow-hidden", Y.viewer)
522
522
  }), g.length > 0 && /* @__PURE__ */ U("div", {
523
523
  role: "region",
524
524
  "aria-label": s,
@@ -533,7 +533,7 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
533
533
  },
534
534
  "data-selected": e.highlightId === S,
535
535
  "data-clipped": e.isClippedAtEnd === !0,
536
- className: _("absolute", J.highlight)
536
+ className: _("absolute", Y.highlight)
537
537
  }, `${e.highlightId}-${t}`))
538
538
  })]
539
539
  }),
@@ -546,14 +546,14 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
546
546
  (u || f) && /* @__PURE__ */ U("div", {
547
547
  role: f ? "alert" : void 0,
548
548
  "aria-live": "polite",
549
- className: _("absolute inset-0 flex items-center justify-center", J.statusOverlay),
549
+ className: _("absolute inset-0 flex items-center justify-center", Y.statusOverlay),
550
550
  children: u ? /* @__PURE__ */ U(D, { size: 48 }) : /* @__PURE__ */ W("div", {
551
551
  className: "flex flex-col items-center gap-2",
552
552
  children: [/* @__PURE__ */ U(O, {
553
553
  "aria-hidden": "true",
554
554
  size: 60,
555
555
  stroke: C,
556
- className: J.errorIcon
556
+ className: Y.errorIcon
557
557
  }), /* @__PURE__ */ U("p", {
558
558
  className: "text-center",
559
559
  children: i
@@ -562,25 +562,51 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
562
562
  })
563
563
  ]
564
564
  });
565
- }, ke = {
565
+ }, ke = (e, t) => {
566
+ let n = e.toLowerCase();
567
+ return t.find((e) => e.contentType.split(",").some((e) => e.trim().toLowerCase() === n && e.trim() !== ""));
568
+ }, Ae = (e, t) => {
569
+ if (!(e == null || e === "")) return Object.prototype.hasOwnProperty.call(t, e) ? t[e] : void 0;
570
+ }, je = (e) => `${e}:grouped-visualizer`, Me = (e, t) => {
571
+ let n = (t.contentType ?? "").split(",").map((e) => e.trim().toLowerCase()).filter((e) => e !== ""), r = [], i = [];
572
+ return e.forEach((e) => {
573
+ if (e.url != null && e.url !== "" && (n.length === 0 || n.includes(e.contentType.toLowerCase()))) {
574
+ r.push(e);
575
+ return;
576
+ }
577
+ i.push(e);
578
+ }), {
579
+ claimed: r,
580
+ unclaimed: i
581
+ };
582
+ }, Ne = (e) => {
583
+ if (typeof e != "object" || !e || !Object.prototype.hasOwnProperty.call(e, "message")) return;
584
+ let { message: t } = e;
585
+ return typeof t == "string" && t.trim() !== "" ? t : void 0;
586
+ }, Pe = {
566
587
  loadingOverlay: "_loadingOverlay_12637_1",
567
588
  statusLabel: "_statusLabel_12637_5",
568
589
  errorIcon: "_errorIcon_12637_9"
569
- }, Ae = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a }) => {
570
- let o = z(null), [s, c] = B("loading"), { url: l, visualizerName: u, requestTimeout: d } = e, f = z(e);
571
- return f.current = e, L(() => {
572
- let e = o.current;
590
+ }, Fe = ({ content: e, loadingLabel: t, errorLabel: n = "Failed to load visualizer", frameTitle: r, colors: a, onSendMessage: o }) => {
591
+ let s = z(null), [c, l] = B("loading"), { url: u, visualizerName: d, requestTimeout: f } = e, p = z(e);
592
+ p.current = e;
593
+ let h = z(o);
594
+ return h.current = o, L(() => {
595
+ let e = s.current;
573
596
  if (!e) return;
574
- c("loading");
597
+ l("loading");
575
598
  let t = new ue(e, {
576
- domain: l,
599
+ domain: u,
577
600
  hostDomain: window.location.origin,
578
- visualizerName: u,
579
- requestTimeout: d
580
- }), n = !0;
601
+ visualizerName: d,
602
+ requestTimeout: f
603
+ }), n = !0, r = t.subscribe(`${d}/${ce.sendMessage}`, (e) => {
604
+ let t = Ne(e);
605
+ t != null && h.current?.(t);
606
+ });
581
607
  return (async () => {
582
608
  if (await t.ready(), !n) return;
583
- let e = f.current;
609
+ let e = p.current;
584
610
  if (e.type === i.GroupedVisualizer) await t.send(le.sendGroupedVisualizeData, {
585
611
  attachments: e.attachments,
586
612
  layout: e.layout
@@ -595,24 +621,24 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
595
621
  visualizerData: a
596
622
  });
597
623
  }
598
- n && c("ready");
624
+ n && l("ready");
599
625
  })().catch(() => {
600
- n && c("error");
626
+ n && l("error");
601
627
  }), () => {
602
- n = !1, t.destroy();
628
+ n = !1, r(), t.destroy();
603
629
  };
604
630
  }, [
605
- l,
606
631
  u,
607
- d
632
+ d,
633
+ f
608
634
  ]), L(() => {
609
- let e = r ?? u.trim();
610
- e !== "" && o.current?.querySelector("iframe")?.setAttribute("title", e);
635
+ let e = r ?? d.trim();
636
+ e !== "" && s.current?.querySelector("iframe")?.setAttribute("title", e);
611
637
  }, [
612
638
  r,
639
+ d,
613
640
  u,
614
- l,
615
- d
641
+ f
616
642
  ]), /* @__PURE__ */ W("div", {
617
643
  className: "relative h-full w-full",
618
644
  style: m({
@@ -622,32 +648,32 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
622
648
  }),
623
649
  children: [
624
650
  /* @__PURE__ */ U("div", {
625
- ref: o,
651
+ ref: s,
626
652
  className: "h-full w-full"
627
653
  }),
628
- s === "loading" && /* @__PURE__ */ W("div", {
629
- className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", ke.loadingOverlay),
654
+ c === "loading" && /* @__PURE__ */ W("div", {
655
+ className: _("absolute inset-0 flex flex-col items-center justify-center gap-2", Pe.loadingOverlay),
630
656
  children: [/* @__PURE__ */ U(D, {}), t && /* @__PURE__ */ U("p", {
631
- className: _("text-center", ke.statusLabel),
657
+ className: _("text-center", Pe.statusLabel),
632
658
  children: t
633
659
  })]
634
660
  }),
635
- s === "error" && /* @__PURE__ */ W("div", {
661
+ c === "error" && /* @__PURE__ */ W("div", {
636
662
  className: "absolute inset-0 flex flex-col items-center justify-center gap-2",
637
663
  children: [/* @__PURE__ */ U(O, {
638
664
  size: 60,
639
665
  stroke: C,
640
666
  "aria-hidden": !0,
641
- className: ke.errorIcon
667
+ className: Pe.errorIcon
642
668
  }), /* @__PURE__ */ U("p", {
643
669
  role: "alert",
644
- className: _("text-center", ke.statusLabel),
670
+ className: _("text-center", Pe.statusLabel),
645
671
  children: n
646
672
  })]
647
673
  })
648
674
  ]
649
675
  });
650
- }, Y = {
676
+ }, X = {
651
677
  body: "_body_13ogb_4",
652
678
  statusLabel: "_statusLabel_13ogb_13",
653
679
  errorIcon: "_errorIcon_13ogb_17",
@@ -662,7 +688,7 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
662
688
  jsonExpandIcon: "_jsonExpandIcon_13ogb_54",
663
689
  jsonCollapseIcon: "_jsonCollapseIcon_13ogb_67",
664
690
  jsonCollapsedContent: "_jsonCollapsedContent_13ogb_84"
665
- }, je = () => P(async () => ({ default: (await import("./PdfContent-BoAtghsO.js")).PdfContent })), Me = ({ url: e, fileName: t, loadErrorLabel: n }) => {
691
+ }, Ie = () => P(async () => ({ default: (await import("./PdfContent-BoAtghsO.js")).PdfContent })), Le = ({ url: e, fileName: t, loadErrorLabel: n }) => {
666
692
  let [r, i] = B(!1);
667
693
  return L(() => {
668
694
  i(!1);
@@ -671,9 +697,9 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
671
697
  children: [/* @__PURE__ */ U(O, {
672
698
  size: 60,
673
699
  stroke: C,
674
- className: Y.errorIcon
700
+ className: X.errorIcon
675
701
  }), /* @__PURE__ */ U("p", {
676
- className: _("text-center", Y.statusLabel),
702
+ className: _("text-center", X.statusLabel),
677
703
  children: n
678
704
  })]
679
705
  }) : /* @__PURE__ */ U("img", {
@@ -682,43 +708,43 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
682
708
  className: "max-h-full max-w-full object-contain",
683
709
  onError: () => i(!0)
684
710
  });
685
- }, Ne = new Set([
711
+ }, Re = new Set([
686
712
  i.PlainText,
687
713
  i.Code,
688
714
  i.Ooxml
689
- ]), Pe = F(({ content: e, isLoading: t = !1, fileName: r, isHtmlSourceView: a = !1, labels: { unsupportedLabel: o = "Preview is not supported for this file", loadErrorLabel: c = "Failed to load file", forbiddenErrorLabel: l = "You don't have permission to access this file", visualizerErrorLabel: d, htmlFrameBlockedLabel: f = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: h = "Open in new tab", pdfThumbnailsLabel: g, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: S, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: E, codeContentErrorLabel: k, codeContentRetryLabel: A, tableCopyLabel: j, tableCopiedLabel: ee, tableDownloadCsvLabel: te, ooxmlHighlightsLabel: M, ooxmlHighlightNavigatedLabel: re } = {}, styles: ie, codeBlockTheme: N, tableDownloadFilename: P, loadPdf: F, hidePdfToolbar: ae = !1, configurePdfWorker: L, onAppInfo: z }) => {
690
- let { colors: H, typography: G, bodyClassName: se, cssVars: ce } = ie ?? {}, [le, ue] = B(0), de = R(je, [le]), fe = I(() => {
715
+ ]), ze = F(({ content: e, isLoading: t = !1, fileName: r, isHtmlSourceView: a = !1, labels: { unsupportedLabel: o = "Preview is not supported for this file", loadErrorLabel: c = "Failed to load file", forbiddenErrorLabel: l = "You don't have permission to access this file", visualizerErrorLabel: d, htmlFrameBlockedLabel: f = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: h = "Open in new tab", pdfThumbnailsLabel: g, pdfShowThumbnailsLabel: v, pdfHideThumbnailsLabel: y, pdfPageNumberLabel: b, pdfContentLoadingLabel: x, pdfContentErrorLabel: S, pdfContentRetryLabel: w, xlsxFormulaLabel: T = "Formula", codeContentLoadingLabel: E, codeContentErrorLabel: k, codeContentRetryLabel: A, tableCopyLabel: j, tableCopiedLabel: ee, tableDownloadCsvLabel: te, ooxmlHighlightsLabel: M, ooxmlHighlightNavigatedLabel: re } = {}, styles: ie, codeBlockTheme: N, tableDownloadFilename: P, loadPdf: F, hidePdfToolbar: ae = !1, configurePdfWorker: L, onAppInfo: z, onVisualizerSendMessage: H }) => {
716
+ let { colors: G, typography: K, bodyClassName: se, cssVars: ce } = ie ?? {}, [le, ue] = B(0), de = R(Ie, [le]), fe = I(() => {
691
717
  ue((e) => e + 1);
692
- }, []), K = G?.fontClassName != null, pe = R(() => ({
718
+ }, []), q = K?.fontClassName != null, pe = R(() => ({
693
719
  ...m({
694
- "--ac-text": H?.text,
695
- "--ac-status-text": H?.statusText,
696
- "--ac-error-icon": H?.errorIcon,
697
- "--ac-open-in-new-tab-text": H?.openInNewTabText,
698
- "--ac-json-border": H?.jsonBorder,
699
- "--ac-json-bg": H?.jsonBackground,
700
- "--ac-json-label": H?.jsonLabel,
701
- "--ac-json-clickable-label": H?.jsonClickableLabel,
702
- "--ac-json-punctuation": H?.jsonPunctuation,
703
- "--ac-json-string": H?.jsonString,
704
- "--ac-json-number": H?.jsonNumber,
705
- "--ac-json-boolean": H?.jsonBoolean,
706
- "--ac-json-null": H?.jsonNull,
707
- "--ac-json-toggle-icon": H?.jsonToggleIcon,
708
- "--ac-json-toggle-icon-hover": H?.jsonToggleIconHover,
709
- "--ac-ooxml-bg": H?.ooxmlBackground,
710
- "--ac-ooxml-formula-border": H?.ooxmlFormulaBorder,
711
- "--ac-ooxml-formula-bg": H?.ooxmlFormulaBackground,
712
- "--ac-ooxml-formula-text": H?.ooxmlFormulaText,
713
- "--ac-ooxml-highlight-border": H?.ooxmlHighlightBorder,
714
- "--ac-ooxml-highlight-bg": H?.ooxmlHighlightBackground,
715
- "--ac-json-collapsed-text": H?.jsonCollapsedText,
716
- "--ac-json-collapsed-bg": H?.jsonCollapsedBackground,
717
- "--ac-font-family": K ? void 0 : G?.fontFamily,
718
- "--ac-font-size": K ? void 0 : G?.fontSize,
719
- "--ac-font-weight": K ? void 0 : G?.fontWeight,
720
- "--ac-line-height": K ? void 0 : G?.lineHeight,
721
- "--ac-letter-spacing": K ? void 0 : G?.letterSpacing
720
+ "--ac-text": G?.text,
721
+ "--ac-status-text": G?.statusText,
722
+ "--ac-error-icon": G?.errorIcon,
723
+ "--ac-open-in-new-tab-text": G?.openInNewTabText,
724
+ "--ac-json-border": G?.jsonBorder,
725
+ "--ac-json-bg": G?.jsonBackground,
726
+ "--ac-json-label": G?.jsonLabel,
727
+ "--ac-json-clickable-label": G?.jsonClickableLabel,
728
+ "--ac-json-punctuation": G?.jsonPunctuation,
729
+ "--ac-json-string": G?.jsonString,
730
+ "--ac-json-number": G?.jsonNumber,
731
+ "--ac-json-boolean": G?.jsonBoolean,
732
+ "--ac-json-null": G?.jsonNull,
733
+ "--ac-json-toggle-icon": G?.jsonToggleIcon,
734
+ "--ac-json-toggle-icon-hover": G?.jsonToggleIconHover,
735
+ "--ac-ooxml-bg": G?.ooxmlBackground,
736
+ "--ac-ooxml-formula-border": G?.ooxmlFormulaBorder,
737
+ "--ac-ooxml-formula-bg": G?.ooxmlFormulaBackground,
738
+ "--ac-ooxml-formula-text": G?.ooxmlFormulaText,
739
+ "--ac-ooxml-highlight-border": G?.ooxmlHighlightBorder,
740
+ "--ac-ooxml-highlight-bg": G?.ooxmlHighlightBackground,
741
+ "--ac-json-collapsed-text": G?.jsonCollapsedText,
742
+ "--ac-json-collapsed-bg": G?.jsonCollapsedBackground,
743
+ "--ac-font-family": q ? void 0 : K?.fontFamily,
744
+ "--ac-font-size": q ? void 0 : K?.fontSize,
745
+ "--ac-font-weight": q ? void 0 : K?.fontWeight,
746
+ "--ac-line-height": q ? void 0 : K?.lineHeight,
747
+ "--ac-letter-spacing": q ? void 0 : K?.letterSpacing
722
748
  }),
723
749
  ...ce
724
750
  }), [ie]), he = R(() => {
@@ -742,10 +768,10 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
742
768
  }, [e.type]), ge = R(() => {
743
769
  switch (e.type) {
744
770
  case i.PlainText: return /* @__PURE__ */ U("pre", {
745
- className: _("whitespace-pre-wrap break-words", Y.body, G?.fontClassName),
771
+ className: _("whitespace-pre-wrap break-words", X.body, K?.fontClassName),
746
772
  children: e.text
747
773
  });
748
- case i.Image: return /* @__PURE__ */ U(Me, {
774
+ case i.Image: return /* @__PURE__ */ U(Le, {
749
775
  url: e.url,
750
776
  fileName: r,
751
777
  loadErrorLabel: c
@@ -789,25 +815,25 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
789
815
  dir: "ltr",
790
816
  className: "h-full overflow-auto",
791
817
  children: /* @__PURE__ */ U("div", {
792
- className: _("m-3 overflow-auto rounded-md border", Y.jsonWrapper),
793
- children: /* @__PURE__ */ U(V, {
818
+ className: _("m-3 overflow-auto rounded-md border", X.jsonWrapper),
819
+ children: /* @__PURE__ */ U(oe, {
794
820
  data: e.value,
795
821
  style: {
796
- container: _("whitespace-pre-wrap break-words p-2", G?.jsonClassName ?? "dial-code-text"),
797
- basicChildStyle: oe.basicChildStyle,
822
+ container: _("whitespace-pre-wrap break-words p-2", K?.jsonClassName ?? "dial-code-text"),
823
+ basicChildStyle: V.basicChildStyle,
798
824
  childFieldsContainer: "m-0 ps-3",
799
- label: _("me-1 font-semibold", Y.jsonLabel),
800
- clickableLabel: _("me-1 cursor-pointer font-semibold hover:underline", Y.jsonClickableLabel),
801
- nullValue: _("italic", Y.jsonNullValue),
802
- undefinedValue: _("italic", Y.jsonNullValue),
803
- stringValue: Y.jsonStringValue,
804
- booleanValue: Y.jsonBooleanValue,
805
- numberValue: Y.jsonNumberValue,
806
- otherValue: _("italic", Y.jsonNullValue),
807
- punctuation: _("me-1", Y.jsonPunctuation),
808
- collapseIcon: _("me-1 cursor-pointer select-none transition-colors", Y.jsonCollapseIcon),
809
- expandIcon: _("me-1 cursor-pointer select-none transition-colors", Y.jsonExpandIcon),
810
- collapsedContent: _("me-1 cursor-pointer rounded px-1", Y.jsonCollapsedContent)
825
+ label: _("me-1 font-semibold", X.jsonLabel),
826
+ clickableLabel: _("me-1 cursor-pointer font-semibold hover:underline", X.jsonClickableLabel),
827
+ nullValue: _("italic", X.jsonNullValue),
828
+ undefinedValue: _("italic", X.jsonNullValue),
829
+ stringValue: X.jsonStringValue,
830
+ booleanValue: X.jsonBooleanValue,
831
+ numberValue: X.jsonNumberValue,
832
+ otherValue: _("italic", X.jsonNullValue),
833
+ punctuation: _("me-1", X.jsonPunctuation),
834
+ collapseIcon: _("me-1 cursor-pointer select-none transition-colors", X.jsonCollapseIcon),
835
+ expandIcon: _("me-1 cursor-pointer select-none transition-colors", X.jsonExpandIcon),
836
+ collapsedContent: _("me-1 cursor-pointer rounded px-1", X.jsonCollapsedContent)
811
837
  }
812
838
  })
813
839
  })
@@ -864,21 +890,22 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
864
890
  fileName: r,
865
891
  loadErrorLabel: c,
866
892
  formulaLabel: T,
867
- formulaLabelClassName: G?.xlsxFormulaLabelClassName ?? "dial-italic-text",
893
+ formulaLabelClassName: K?.xlsxFormulaLabelClassName ?? "dial-italic-text",
868
894
  highlightsLabel: M,
869
895
  highlightNavigatedLabel: re
870
896
  });
871
897
  case i.Visualizer:
872
- case i.GroupedVisualizer: return /* @__PURE__ */ U(Ae, {
898
+ case i.GroupedVisualizer: return /* @__PURE__ */ U(Fe, {
873
899
  content: e,
874
- errorLabel: d
900
+ errorLabel: d,
901
+ onSendMessage: H
875
902
  });
876
903
  case i.McpApp: return /* @__PURE__ */ U(Ce, {
877
904
  content: e,
878
905
  onAppInfo: z
879
906
  });
880
907
  case i.Unsupported: return /* @__PURE__ */ U("p", {
881
- className: _("text-center", Y.statusLabel),
908
+ className: _("text-center", X.statusLabel),
882
909
  children: o
883
910
  });
884
911
  case i.Error: {
@@ -888,9 +915,9 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
888
915
  children: [U(t ? ne : O, {
889
916
  size: 60,
890
917
  stroke: C,
891
- className: Y.errorIcon
918
+ className: X.errorIcon
892
919
  }), /* @__PURE__ */ U("p", {
893
- className: _("text-center", Y.statusLabel),
920
+ className: _("text-center", X.statusLabel),
894
921
  children: t ? l : c
895
922
  })]
896
923
  });
@@ -898,15 +925,16 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
898
925
  }
899
926
  }, [
900
927
  e,
901
- G?.fontClassName,
902
- G?.jsonClassName,
903
- G?.xlsxFormulaLabelClassName,
928
+ K?.fontClassName,
929
+ K?.jsonClassName,
930
+ K?.xlsxFormulaLabelClassName,
904
931
  r,
905
932
  N,
906
933
  o,
907
934
  c,
908
935
  l,
909
936
  d,
937
+ H,
910
938
  f,
911
939
  h,
912
940
  a,
@@ -936,72 +964,72 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
936
964
  re
937
965
  ]);
938
966
  return /* @__PURE__ */ U("div", {
939
- style: !t && Ne.has(e.type) ? pe : void 0,
967
+ style: !t && Re.has(e.type) ? pe : void 0,
940
968
  className: _(t ? "flex h-full items-center justify-center" : he, se),
941
969
  children: t ? /* @__PURE__ */ U(D, {}) : ge
942
970
  });
943
- }), Fe = {
971
+ }), Be = {
944
972
  mcpAppDivider: "_mcpAppDivider_1jh5p_1",
945
973
  mcpAppVersion: "_mcpAppVersion_1jh5p_5"
946
- }, Ie = 2e3, Le = F(({ isOpen: e, isLoading: t = !1, onClose: n, content: r, fileName: a, leftActions: s, labels: { ariaLabel: c, closeLabel: l = "Close", resizeLabel: u = "Resize panel", downloadLabel: d = "Download", copyTextLabel: f = "Copy text", copiedTextLabel: p = "Copied!", copyMarkdownLabel: h = "Copy as Markdown", copiedMarkdownLabel: g = "Copied!", copyJsonLabel: v = "Copy as JSON", copiedJsonLabel: y = "Copied!", visualizerErrorLabel: w, unsupportedLabel: E = "Preview is not supported for this file", loadErrorLabel: D = "Failed to load file", forbiddenErrorLabel: O = "You don't have permission to access this file", htmlFrameBlockedLabel: k = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: ne = "Open in new tab", htmlViewSourceLabel: N = "View source", htmlViewRenderedLabel: P = "View rendered", mcpAppReloadLabel: F = "Reload", pdfThumbnailsLabel: ae, pdfShowThumbnailsLabel: V, pdfHideThumbnailsLabel: oe, pdfPageNumberLabel: G, pdfContentLoadingLabel: se, pdfContentErrorLabel: ce, pdfContentRetryLabel: le, xlsxFormulaLabel: ue, codeContentLoadingLabel: fe, codeContentErrorLabel: K, codeContentRetryLabel: pe, tableCopyLabel: me, tableCopiedLabel: he, tableDownloadCsvLabel: ge, ooxmlHighlightsLabel: _e, ooxmlHighlightNavigatedLabel: ve }, onDownload: ye, onCopyText: be, onCopyMarkdown: xe, onCopyJson: Se, tableDownloadFilename: q, isMobile: Ce = !1, defaultWidth: J, minWidth: we = 600, maxWidth: Te = 1500, onResizeStop: Ee, styles: De, codeBlockTheme: Oe, loadPdf: ke, configurePdfWorker: Ae }) => {
947
- let [Y, je] = B(!1), [Me, Ne] = B(!1), [Le, Re] = B(!1), [X, ze] = B(!1), [Be, Ve] = B(void 0), He = z(null), Z = z(null), Q = z(null), Ue = I(() => {
948
- be?.(), He.current != null && clearTimeout(He.current), je(!0), He.current = setTimeout(() => je(!1), Ie);
949
- }, [be]), We = I(() => {
950
- xe?.(), Z.current != null && clearTimeout(Z.current), Ne(!0), Z.current = setTimeout(() => Ne(!1), Ie);
951
- }, [xe]), Ge = I(() => {
952
- Se?.(), Q.current != null && clearTimeout(Q.current), Re(!0), Q.current = setTimeout(() => Re(!1), Ie);
953
- }, [Se]);
974
+ }, Ve = 2e3, He = F(({ isOpen: e, isLoading: t = !1, onClose: n, content: r, fileName: a, leftActions: s, labels: { ariaLabel: c, closeLabel: l = "Close", resizeLabel: u = "Resize panel", downloadLabel: d = "Download", copyTextLabel: f = "Copy text", copiedTextLabel: p = "Copied!", copyMarkdownLabel: h = "Copy as Markdown", copiedMarkdownLabel: g = "Copied!", copyJsonLabel: v = "Copy as JSON", copiedJsonLabel: y = "Copied!", visualizerErrorLabel: w, unsupportedLabel: E = "Preview is not supported for this file", loadErrorLabel: D = "Failed to load file", forbiddenErrorLabel: O = "You don't have permission to access this file", htmlFrameBlockedLabel: k = "This page cannot be displayed in preview", htmlOpenInNewTabLabel: ne = "Open in new tab", htmlViewSourceLabel: N = "View source", htmlViewRenderedLabel: P = "View rendered", mcpAppReloadLabel: F = "Reload", pdfThumbnailsLabel: ae, pdfShowThumbnailsLabel: oe, pdfHideThumbnailsLabel: V, pdfPageNumberLabel: G, pdfContentLoadingLabel: K, pdfContentErrorLabel: se, pdfContentRetryLabel: ce, xlsxFormulaLabel: le, codeContentLoadingLabel: ue, codeContentErrorLabel: fe, codeContentRetryLabel: q, tableCopyLabel: pe, tableCopiedLabel: me, tableDownloadCsvLabel: he, ooxmlHighlightsLabel: ge, ooxmlHighlightNavigatedLabel: _e }, onDownload: ve, onCopyText: ye, onCopyMarkdown: be, onCopyJson: xe, tableDownloadFilename: Se, isMobile: J = !1, defaultWidth: Ce, minWidth: Y = 600, maxWidth: we = 1500, onResizeStop: Te, styles: Ee, codeBlockTheme: De, loadPdf: Oe, configurePdfWorker: ke, onVisualizerSendMessage: Ae }) => {
975
+ let [je, Me] = B(!1), [Ne, Pe] = B(!1), [Fe, X] = B(!1), [Ie, Le] = B(!1), [Re, He] = B(void 0), Ue = z(null), Z = z(null), We = z(null), Ge = I(() => {
976
+ ye?.(), Ue.current != null && clearTimeout(Ue.current), Me(!0), Ue.current = setTimeout(() => Me(!1), Ve);
977
+ }, [ye]), Ke = I(() => {
978
+ be?.(), Z.current != null && clearTimeout(Z.current), Pe(!0), Z.current = setTimeout(() => Pe(!1), Ve);
979
+ }, [be]), qe = I(() => {
980
+ xe?.(), We.current != null && clearTimeout(We.current), X(!0), We.current = setTimeout(() => X(!1), Ve);
981
+ }, [xe]);
954
982
  L(() => () => {
955
- He.current != null && clearTimeout(He.current), Z.current != null && clearTimeout(Z.current), Q.current != null && clearTimeout(Q.current);
983
+ Ue.current != null && clearTimeout(Ue.current), Z.current != null && clearTimeout(Z.current), We.current != null && clearTimeout(We.current);
956
984
  }, []);
957
- let Ke = I(() => {
958
- ze((e) => !e);
985
+ let Je = I(() => {
986
+ Le((e) => !e);
959
987
  }, []);
960
988
  L(() => {
961
- ze(!1), Ve(void 0);
989
+ Le(!1), He(void 0);
962
990
  }, [r]);
963
- let { className: qe, panelStyles: $, ...Je } = De ?? {}, { colors: Ye, typography: Xe } = Je, Ze = R(() => m({
964
- "--ac-mcp-app-divider": Ye?.mcpAppDividerColor,
965
- "--ac-mcp-app-version": Ye?.mcpAppVersionColor
966
- }), [Ye?.mcpAppDividerColor, Ye?.mcpAppVersionColor]), Qe = r.type === i.McpApp && Be != null ? /* @__PURE__ */ W("span", {
967
- style: Ze,
991
+ let { className: Ye, panelStyles: Xe, ...Ze } = Ee ?? {}, { colors: Q, typography: Qe } = Ze, $e = R(() => m({
992
+ "--ac-mcp-app-divider": Q?.mcpAppDividerColor,
993
+ "--ac-mcp-app-version": Q?.mcpAppVersionColor
994
+ }), [Q?.mcpAppDividerColor, Q?.mcpAppVersionColor]), $ = r.type === i.McpApp && Re != null ? /* @__PURE__ */ W("span", {
995
+ style: $e,
968
996
  children: [
969
997
  /* @__PURE__ */ U("span", { children: a }),
970
998
  /* @__PURE__ */ U("span", {
971
999
  "aria-hidden": !0,
972
- className: _("mx-1.5 inline-block h-3 w-0 border-s align-middle", Fe.mcpAppDivider)
1000
+ className: _("mx-1.5 inline-block h-3 w-0 border-s align-middle", Be.mcpAppDivider)
973
1001
  }),
974
- /* @__PURE__ */ U("span", { children: Be.name }),
975
- Be.version && /* @__PURE__ */ U("span", {
976
- className: _("ms-2", Xe?.mcpAppVersionClassName ?? "dial-caption-text", Fe.mcpAppVersion),
977
- children: Be.version
1002
+ /* @__PURE__ */ U("span", { children: Re.name }),
1003
+ Re.version && /* @__PURE__ */ U("span", {
1004
+ className: _("ms-2", Qe?.mcpAppVersionClassName ?? "dial-caption-text", Be.mcpAppVersion),
1005
+ children: Re.version
978
1006
  })
979
1007
  ]
980
- }) : a, $e = !t && r.type === i.Html && (r.srcdoc != null || r.resolveSourceText != null), et = !t && be != null && (r.type === i.PlainText || r.type === i.Code), tt = !t && xe != null && r.type === i.Markdown, nt = !t && Se != null && r.type === i.Json, rt = !t && ye != null && o(r), it = !t && r.type === i.McpApp && r.onReload != null;
1008
+ }) : a, et = !t && r.type === i.Html && (r.srcdoc != null || r.resolveSourceText != null), tt = !t && ye != null && (r.type === i.PlainText || r.type === i.Code), nt = !t && be != null && r.type === i.Markdown, rt = !t && xe != null && r.type === i.Json, it = !t && ve != null && o(r), at = !t && r.type === i.McpApp && r.onReload != null;
981
1009
  return /* @__PURE__ */ U(x, {
982
1010
  isOpen: e,
983
1011
  orientation: b.Right,
984
- title: Qe,
1012
+ title: $,
985
1013
  labels: {
986
1014
  ariaLabel: c,
987
1015
  closeLabel: l,
988
1016
  resizeLabel: u
989
1017
  },
990
1018
  onClose: n,
991
- resizable: !Ce,
992
- defaultWidth: J,
993
- minWidth: we,
994
- maxWidth: Te,
995
- onResizeStop: Ee,
1019
+ resizable: !J,
1020
+ defaultWidth: Ce,
1021
+ minWidth: Y,
1022
+ maxWidth: we,
1023
+ onResizeStop: Te,
996
1024
  styles: {
997
- ...$,
998
- titleClassName: $?.titleClassName ?? "dial-h3-text",
999
- headerClassName: _("border-b border-tertiary", $?.headerClassName),
1000
- className: _(e ? "mobile:w-full mobile:max-w-full" : "w-0", qe, $?.className, de.panel)
1025
+ ...Xe,
1026
+ titleClassName: Xe?.titleClassName ?? "dial-h3-text",
1027
+ headerClassName: _("border-b border-tertiary", Xe?.headerClassName),
1028
+ className: _(e ? "mobile:w-full mobile:max-w-full" : "w-0", Ye, Xe?.className, de.panel)
1001
1029
  },
1002
1030
  leftActions: s,
1003
- rightActions: $e || et || tt || nt || rt || it ? /* @__PURE__ */ W(H, { children: [
1004
- it && /* @__PURE__ */ U(T, {
1031
+ rightActions: et || tt || nt || rt || it || at ? /* @__PURE__ */ W(H, { children: [
1032
+ at && /* @__PURE__ */ U(T, {
1005
1033
  icon: /* @__PURE__ */ U(ie, {
1006
1034
  size: S.LG,
1007
1035
  stroke: C,
@@ -1011,63 +1039,63 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
1011
1039
  tooltipProps: { tooltip: F },
1012
1040
  onClick: r.type === i.McpApp ? r.onReload : void 0
1013
1041
  }),
1014
- $e && /* @__PURE__ */ U(T, {
1015
- icon: U(X ? M : j, {
1042
+ et && /* @__PURE__ */ U(T, {
1043
+ icon: U(Ie ? M : j, {
1016
1044
  size: S.LG,
1017
1045
  stroke: C,
1018
1046
  "aria-hidden": !0
1019
1047
  }),
1020
- "aria-label": X ? P : N,
1021
- "aria-pressed": X,
1022
- tooltipProps: { tooltip: X ? P : N },
1023
- onClick: Ke
1048
+ "aria-label": Ie ? P : N,
1049
+ "aria-pressed": Ie,
1050
+ tooltipProps: { tooltip: Ie ? P : N },
1051
+ onClick: Je
1024
1052
  }),
1025
- et && /* @__PURE__ */ U(T, {
1026
- icon: U(Y ? A : ee, {
1053
+ tt && /* @__PURE__ */ U(T, {
1054
+ icon: U(je ? A : ee, {
1027
1055
  size: S.LG,
1028
1056
  stroke: C,
1029
1057
  "aria-hidden": !0
1030
1058
  }),
1031
- "aria-label": Y ? p : f,
1032
- tooltipProps: { tooltip: Y ? p : f },
1033
- onClick: Ue
1059
+ "aria-label": je ? p : f,
1060
+ tooltipProps: { tooltip: je ? p : f },
1061
+ onClick: Ge
1034
1062
  }),
1035
- tt && /* @__PURE__ */ U(T, {
1036
- icon: U(Me ? A : re, {
1063
+ nt && /* @__PURE__ */ U(T, {
1064
+ icon: U(Ne ? A : re, {
1037
1065
  size: S.LG,
1038
1066
  stroke: C,
1039
1067
  "aria-hidden": !0
1040
1068
  }),
1041
- "aria-label": Me ? g : h,
1042
- tooltipProps: { tooltip: Me ? g : h },
1043
- onClick: We
1069
+ "aria-label": Ne ? g : h,
1070
+ tooltipProps: { tooltip: Ne ? g : h },
1071
+ onClick: Ke
1044
1072
  }),
1045
- nt && /* @__PURE__ */ U(T, {
1046
- icon: U(Le ? A : ee, {
1073
+ rt && /* @__PURE__ */ U(T, {
1074
+ icon: U(Fe ? A : ee, {
1047
1075
  size: S.LG,
1048
1076
  stroke: C,
1049
1077
  "aria-hidden": !0
1050
1078
  }),
1051
- "aria-label": Le ? y : v,
1052
- tooltipProps: { tooltip: Le ? y : v },
1053
- onClick: Ge
1079
+ "aria-label": Fe ? y : v,
1080
+ tooltipProps: { tooltip: Fe ? y : v },
1081
+ onClick: qe
1054
1082
  }),
1055
- rt && /* @__PURE__ */ U(T, {
1083
+ it && /* @__PURE__ */ U(T, {
1056
1084
  icon: /* @__PURE__ */ U(te, {
1057
1085
  size: S.LG,
1058
1086
  stroke: C
1059
1087
  }),
1060
1088
  "aria-label": d,
1061
1089
  tooltipProps: { tooltip: d },
1062
- onClick: ye
1090
+ onClick: ve
1063
1091
  })
1064
1092
  ] }) : null,
1065
- children: /* @__PURE__ */ U(Pe, {
1093
+ children: /* @__PURE__ */ U(ze, {
1066
1094
  content: r,
1067
1095
  isLoading: t,
1068
1096
  fileName: a,
1069
- isHtmlSourceView: X,
1070
- onAppInfo: r.type === i.McpApp ? Ve : void 0,
1097
+ isHtmlSourceView: Ie,
1098
+ onAppInfo: r.type === i.McpApp ? He : void 0,
1071
1099
  labels: {
1072
1100
  unsupportedLabel: E,
1073
1101
  loadErrorLabel: D,
@@ -1076,66 +1104,67 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
1076
1104
  htmlFrameBlockedLabel: k,
1077
1105
  htmlOpenInNewTabLabel: ne,
1078
1106
  pdfThumbnailsLabel: ae,
1079
- pdfShowThumbnailsLabel: V,
1080
- pdfHideThumbnailsLabel: oe,
1107
+ pdfShowThumbnailsLabel: oe,
1108
+ pdfHideThumbnailsLabel: V,
1081
1109
  pdfPageNumberLabel: G,
1082
- pdfContentLoadingLabel: se,
1083
- pdfContentErrorLabel: ce,
1084
- pdfContentRetryLabel: le,
1085
- xlsxFormulaLabel: ue,
1086
- codeContentLoadingLabel: fe,
1087
- codeContentErrorLabel: K,
1088
- codeContentRetryLabel: pe,
1089
- tableCopyLabel: me,
1090
- tableCopiedLabel: he,
1091
- tableDownloadCsvLabel: ge,
1092
- ooxmlHighlightsLabel: _e,
1093
- ooxmlHighlightNavigatedLabel: ve
1110
+ pdfContentLoadingLabel: K,
1111
+ pdfContentErrorLabel: se,
1112
+ pdfContentRetryLabel: ce,
1113
+ xlsxFormulaLabel: le,
1114
+ codeContentLoadingLabel: ue,
1115
+ codeContentErrorLabel: fe,
1116
+ codeContentRetryLabel: q,
1117
+ tableCopyLabel: pe,
1118
+ tableCopiedLabel: me,
1119
+ tableDownloadCsvLabel: he,
1120
+ ooxmlHighlightsLabel: ge,
1121
+ ooxmlHighlightNavigatedLabel: _e
1094
1122
  },
1095
- styles: Je,
1096
- codeBlockTheme: Oe,
1097
- tableDownloadFilename: q,
1098
- loadPdf: ke,
1099
- configurePdfWorker: Ae
1123
+ styles: Ze,
1124
+ codeBlockTheme: De,
1125
+ tableDownloadFilename: Se,
1126
+ loadPdf: Oe,
1127
+ configurePdfWorker: ke,
1128
+ onVisualizerSendMessage: Ae
1100
1129
  })
1101
1130
  });
1102
- }), Re = new Set(["html", "htm"]), X = {
1131
+ }), Ue = new Set(["html", "htm"]), Z = {
1103
1132
  docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
1104
1133
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1105
1134
  pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
1106
- }, ze = 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(".")), Be = {
1135
+ }, We = new Set(/* @__PURE__ */ "txt.md.markdown.json.jsonl.ndjson.xml.csv.tsv.yaml.yml.toml.ini.conf.cfg.css.scss.sass.less.js.jsx.ts.tsx.mjs.cjs.mts.cts.py.rb.go.rs.java.kt.swift.c.h.cpp.cs.sh.bash.zsh.fish.ps1.log.env.gitignore.dockerfile.makefile.sql".split(".")), Ge = {
1107
1136
  docx: r.Docx,
1108
1137
  xlsx: r.Xlsx,
1109
1138
  pptx: r.Pptx,
1110
1139
  csv: r.Csv
1111
- }, Ve = {
1112
- [X.docx]: r.Docx,
1113
- [X.xlsx]: r.Xlsx,
1114
- [X.pptx]: r.Pptx,
1140
+ }, Ke = {
1141
+ [Z.docx]: r.Docx,
1142
+ [Z.xlsx]: r.Xlsx,
1143
+ [Z.pptx]: r.Pptx,
1115
1144
  [f.CSV]: r.Csv
1116
- }, He = {
1117
- [r.Docx]: X.docx,
1118
- [r.Xlsx]: X.xlsx,
1119
- [r.Pptx]: X.pptx,
1145
+ }, qe = {
1146
+ [r.Docx]: Z.docx,
1147
+ [r.Xlsx]: Z.xlsx,
1148
+ [r.Pptx]: Z.pptx,
1120
1149
  [r.Csv]: f.CSV
1121
- }, Z = (e, t) => {
1150
+ }, Je = (e, t) => {
1122
1151
  let n = t?.split(";", 1)[0].trim().toLowerCase();
1123
1152
  if (n != null) {
1124
- let e = Ve[n];
1153
+ let e = Ke[n];
1125
1154
  if (e != null) return e;
1126
1155
  }
1127
1156
  let r = e.lastIndexOf(".");
1128
- if (r !== -1) return Be[e.slice(r + 1).toLowerCase()];
1129
- }, Q = (e, t) => Z(e, t) != null, Ue = (e, t) => {
1130
- let n = Z(e, t);
1131
- return n == null ? void 0 : He[n];
1132
- }, We = (e) => {
1157
+ if (r !== -1) return Ge[e.slice(r + 1).toLowerCase()];
1158
+ }, Ye = (e, t) => Je(e, t) != null, Xe = (e, t) => {
1159
+ let n = Je(e, t);
1160
+ return n == null ? void 0 : qe[n];
1161
+ }, Ze = (e) => {
1133
1162
  let t = e.lastIndexOf(".");
1134
- return t === -1 ? !1 : ze.has(e.slice(t + 1).toLowerCase());
1135
- }, Ge = (e) => {
1163
+ return t === -1 ? !1 : We.has(e.slice(t + 1).toLowerCase());
1164
+ }, Q = (e) => {
1136
1165
  let t = e.lastIndexOf(".");
1137
- return t === -1 ? !1 : Re.has(e.slice(t + 1).toLowerCase());
1138
- }, Ke = {
1166
+ return t === -1 ? !1 : Ue.has(e.slice(t + 1).toLowerCase());
1167
+ }, Qe = {
1139
1168
  xml: "xml",
1140
1169
  csv: "plaintext",
1141
1170
  tsv: "plaintext",
@@ -1183,39 +1212,39 @@ var de = { panel: "dial-attachment-canvas-panel" }, fe = {
1183
1212
  gitignore: "plaintext",
1184
1213
  dockerfile: "plaintext",
1185
1214
  makefile: "plaintext"
1186
- }, qe = (e) => Ke[e], $ = (e) => ({
1215
+ }, $e = (e) => Qe[e], $ = (e) => ({
1187
1216
  type: i.Unsupported,
1188
1217
  ...e != null && { url: e }
1189
- }), Je = (e) => ({
1218
+ }), et = (e) => ({
1190
1219
  type: i.Error,
1191
1220
  errorType: n.LoadFailed,
1192
1221
  ...e != null && { url: e }
1193
- }), Ye = (e) => ({
1222
+ }), tt = (e) => ({
1194
1223
  type: i.Error,
1195
1224
  errorType: n.Forbidden,
1196
1225
  ...e != null && { url: e }
1197
- }), Xe = (e) => {
1226
+ }), nt = (e) => {
1198
1227
  if (!(e.type !== i.Image && e.type !== i.Audio && e.type !== i.Pdf && e.type !== i.Ooxml)) return e.url.startsWith("blob:") ? e.url : void 0;
1199
- }, Ze = (e) => {
1200
- let t = Xe(e);
1228
+ }, rt = (e) => {
1229
+ let t = nt(e);
1201
1230
  t != null && URL.revokeObjectURL(t);
1202
- }, Qe = {
1231
+ }, it = {
1203
1232
  type: i.PlainText,
1204
1233
  text: ""
1205
- }, $e = N(void 0);
1206
- $e.displayName = "AttachmentCanvasContext";
1207
- var et = ({ children: e }) => {
1208
- let [t, n] = B(!1), [r, i] = B(!1), [a, o] = B(Qe), [s, c] = B(void 0), [l, u] = B(void 0), d = I((e, t) => {
1234
+ }, at = N(void 0);
1235
+ at.displayName = "AttachmentCanvasContext";
1236
+ var ot = ({ children: e }) => {
1237
+ let [t, n] = B(!1), [r, i] = B(!1), [a, o] = B(it), [s, c] = B(void 0), [l, u] = B(void 0), d = I((e, t) => {
1209
1238
  c(e), u(t), i(!0), n(!0);
1210
1239
  }, []), f = I((e, t, r) => {
1211
1240
  o(e), c(t), u(r), i(!1), n(!0);
1212
1241
  }, []), p = I(() => {
1213
- o(Qe), n(!1), i(!1), u(void 0);
1242
+ o(it), n(!1), i(!1), u(void 0);
1214
1243
  }, []);
1215
1244
  return L(() => () => {
1216
- let e = Xe(a);
1245
+ let e = nt(a);
1217
1246
  e != null && URL.revokeObjectURL(e);
1218
- }, [a]), /* @__PURE__ */ U($e.Provider, {
1247
+ }, [a]), /* @__PURE__ */ U(at.Provider, {
1219
1248
  value: R(() => ({
1220
1249
  isOpen: t,
1221
1250
  isLoading: r,
@@ -1237,63 +1266,63 @@ var et = ({ children: e }) => {
1237
1266
  ]),
1238
1267
  children: e
1239
1268
  });
1240
- }, tt = () => {
1241
- let e = ae($e);
1269
+ }, st = () => {
1270
+ let e = ae(at);
1242
1271
  if (!e) throw Error("useAttachmentCanvas must be used within an AttachmentCanvasProvider");
1243
1272
  return e;
1244
- }, nt = F(({ labels: e, leftActions: t, isMobile: n = !1, defaultWidth: r, maxWidth: o, codeBlockTheme: s, tableDownloadFilename: c, loadPdf: l, configurePdfWorker: u }) => {
1245
- let { ariaLabel: d = "Attachment preview", closeLabel: f = "Close", downloadLabel: p = "Download", unsupportedLabel: m = "Preview is not supported for this file", loadErrorLabel: g = "Failed to load file", forbiddenErrorLabel: _ = "You don't have permission to access this file", copyTextLabel: v, copiedTextLabel: y, copyMarkdownLabel: b, copiedMarkdownLabel: x, copyJsonLabel: S, copiedJsonLabel: C, htmlFrameBlockedLabel: w, htmlOpenInNewTabLabel: T, htmlViewSourceLabel: E, htmlViewRenderedLabel: D, pdfThumbnailsLabel: O, pdfShowThumbnailsLabel: k, pdfHideThumbnailsLabel: A, pdfPageNumberLabel: j, pdfContentLoadingLabel: ee, pdfContentErrorLabel: te, pdfContentRetryLabel: M, xlsxFormulaLabel: ne, codeContentLoadingLabel: re, codeContentErrorLabel: ie, codeContentRetryLabel: N, tableCopyLabel: P, tableCopiedLabel: F, tableDownloadCsvLabel: ae, ooxmlHighlightsLabel: L, ooxmlHighlightNavigatedLabel: R } = e ?? {}, { isOpen: z, isLoading: B, content: V, fileName: oe, closeCanvas: H } = tt(), W = I(() => {
1246
- a(V, oe);
1247
- }, [V, oe]), G = I(() => {
1273
+ }, ct = F(({ labels: e, leftActions: t, isMobile: n = !1, defaultWidth: r, maxWidth: o, codeBlockTheme: s, tableDownloadFilename: c, loadPdf: l, configurePdfWorker: u, onVisualizerSendMessage: d }) => {
1274
+ let { ariaLabel: f = "Attachment preview", closeLabel: p = "Close", downloadLabel: m = "Download", unsupportedLabel: g = "Preview is not supported for this file", loadErrorLabel: _ = "Failed to load file", forbiddenErrorLabel: v = "You don't have permission to access this file", copyTextLabel: y, copiedTextLabel: b, copyMarkdownLabel: x, copiedMarkdownLabel: S, copyJsonLabel: C, copiedJsonLabel: w, htmlFrameBlockedLabel: T, htmlOpenInNewTabLabel: E, htmlViewSourceLabel: D, htmlViewRenderedLabel: O, pdfThumbnailsLabel: k, pdfShowThumbnailsLabel: A, pdfHideThumbnailsLabel: j, pdfPageNumberLabel: ee, pdfContentLoadingLabel: te, pdfContentErrorLabel: M, pdfContentRetryLabel: ne, xlsxFormulaLabel: re, codeContentLoadingLabel: ie, codeContentErrorLabel: N, codeContentRetryLabel: P, tableCopyLabel: F, tableCopiedLabel: ae, tableDownloadCsvLabel: L, ooxmlHighlightsLabel: R, ooxmlHighlightNavigatedLabel: z } = e ?? {}, { isOpen: B, isLoading: oe, content: V, fileName: H, closeCanvas: W } = st(), G = I(() => {
1275
+ a(V, H);
1276
+ }, [V, H]), K = I(() => {
1248
1277
  (V.type === i.PlainText || V.type === i.Code) && h(V.text);
1249
1278
  }, [V]), se = I(() => {
1250
1279
  V.type === i.Markdown && h(V.text);
1251
1280
  }, [V]), ce = I(() => {
1252
1281
  V.type === i.Json && h(JSON.stringify(V.value, null, 2));
1253
1282
  }, [V]);
1254
- return /* @__PURE__ */ U(Le, {
1255
- isOpen: z,
1256
- isLoading: B,
1257
- onClose: H,
1283
+ return /* @__PURE__ */ U(He, {
1284
+ isOpen: B,
1285
+ isLoading: oe,
1286
+ onClose: W,
1258
1287
  content: V,
1259
- fileName: oe,
1288
+ fileName: H,
1260
1289
  leftActions: t,
1261
1290
  labels: {
1262
- ariaLabel: d,
1263
- closeLabel: f,
1264
- downloadLabel: p,
1265
- copyTextLabel: v,
1266
- copiedTextLabel: y,
1267
- copyMarkdownLabel: b,
1268
- copiedMarkdownLabel: x,
1269
- copyJsonLabel: S,
1270
- copiedJsonLabel: C,
1271
- unsupportedLabel: m,
1272
- loadErrorLabel: g,
1273
- forbiddenErrorLabel: _,
1274
- htmlFrameBlockedLabel: w,
1275
- htmlOpenInNewTabLabel: T,
1276
- htmlViewSourceLabel: E,
1277
- htmlViewRenderedLabel: D,
1278
- pdfThumbnailsLabel: O,
1279
- pdfShowThumbnailsLabel: k,
1280
- pdfHideThumbnailsLabel: A,
1281
- pdfPageNumberLabel: j,
1282
- pdfContentLoadingLabel: ee,
1283
- pdfContentErrorLabel: te,
1284
- pdfContentRetryLabel: M,
1285
- xlsxFormulaLabel: ne,
1286
- codeContentLoadingLabel: re,
1287
- codeContentErrorLabel: ie,
1288
- codeContentRetryLabel: N,
1289
- tableCopyLabel: P,
1290
- tableCopiedLabel: F,
1291
- tableDownloadCsvLabel: ae,
1292
- ooxmlHighlightsLabel: L,
1293
- ooxmlHighlightNavigatedLabel: R
1291
+ ariaLabel: f,
1292
+ closeLabel: p,
1293
+ downloadLabel: m,
1294
+ copyTextLabel: y,
1295
+ copiedTextLabel: b,
1296
+ copyMarkdownLabel: x,
1297
+ copiedMarkdownLabel: S,
1298
+ copyJsonLabel: C,
1299
+ copiedJsonLabel: w,
1300
+ unsupportedLabel: g,
1301
+ loadErrorLabel: _,
1302
+ forbiddenErrorLabel: v,
1303
+ htmlFrameBlockedLabel: T,
1304
+ htmlOpenInNewTabLabel: E,
1305
+ htmlViewSourceLabel: D,
1306
+ htmlViewRenderedLabel: O,
1307
+ pdfThumbnailsLabel: k,
1308
+ pdfShowThumbnailsLabel: A,
1309
+ pdfHideThumbnailsLabel: j,
1310
+ pdfPageNumberLabel: ee,
1311
+ pdfContentLoadingLabel: te,
1312
+ pdfContentErrorLabel: M,
1313
+ pdfContentRetryLabel: ne,
1314
+ xlsxFormulaLabel: re,
1315
+ codeContentLoadingLabel: ie,
1316
+ codeContentErrorLabel: N,
1317
+ codeContentRetryLabel: P,
1318
+ tableCopyLabel: F,
1319
+ tableCopiedLabel: ae,
1320
+ tableDownloadCsvLabel: L,
1321
+ ooxmlHighlightsLabel: R,
1322
+ ooxmlHighlightNavigatedLabel: z
1294
1323
  },
1295
- onDownload: W,
1296
- onCopyText: V.type === i.PlainText || V.type === i.Code ? G : void 0,
1324
+ onDownload: G,
1325
+ onCopyText: V.type === i.PlainText || V.type === i.Code ? K : void 0,
1297
1326
  onCopyMarkdown: V.type === i.Markdown ? se : void 0,
1298
1327
  onCopyJson: V.type === i.Json ? ce : void 0,
1299
1328
  tableDownloadFilename: c,
@@ -1302,26 +1331,27 @@ var et = ({ children: e }) => {
1302
1331
  maxWidth: o,
1303
1332
  codeBlockTheme: s,
1304
1333
  configurePdfWorker: u,
1305
- loadPdf: l
1334
+ loadPdf: l,
1335
+ onVisualizerSendMessage: d
1306
1336
  });
1307
- }), rt = {
1337
+ }), lt = {
1308
1338
  frame: "_frame_g47g7_1",
1309
1339
  header: "_header_g47g7_6",
1310
1340
  title: "_title_g47g7_10"
1311
- }, it = 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 }) => {
1312
- let f = e.visualizerName.trim(), p = !u && f !== "";
1341
+ }, ut = F(({ content: e, height: t, onExpand: n, expandAriaLabel: r, actionsGroupAriaLabel: i = "Visualizer actions", frameTitle: a, loadingLabel: o, errorLabel: s, titleClassName: c = "dial-small-semi-text", isBorderless: l = !1, isTitleHidden: u = !1, colors: d, onVisualizerSendMessage: f }) => {
1342
+ let p = e.visualizerName.trim(), h = !u && p !== "";
1313
1343
  return /* @__PURE__ */ W("div", {
1314
- className: _("flex w-full min-w-0 flex-col overflow-hidden", !l && ["rounded-xl border", rt.frame]),
1344
+ className: _("flex w-full min-w-0 flex-col overflow-hidden", !l && ["rounded-xl border", lt.frame]),
1315
1345
  style: m({
1316
1346
  "--igv-bg": d?.background,
1317
1347
  "--igv-border": d?.border,
1318
1348
  "--igv-title-text": d?.titleText
1319
1349
  }),
1320
1350
  children: [/* @__PURE__ */ W("div", {
1321
- className: _("flex min-h-10 items-center gap-2 py-2", p ? "justify-between" : "justify-end", !l && ["border-b px-4", rt.header]),
1322
- children: [p && /* @__PURE__ */ U("span", {
1323
- className: _("min-w-0 truncate", c, rt.title),
1324
- children: f
1351
+ className: _("flex min-h-10 items-center gap-2 py-2", h ? "justify-between" : "justify-end", !l && ["border-b px-4", lt.header]),
1352
+ children: [h && /* @__PURE__ */ U("span", {
1353
+ className: _("min-w-0 truncate", c, lt.title),
1354
+ children: p
1325
1355
  }), /* @__PURE__ */ U("div", {
1326
1356
  role: "toolbar",
1327
1357
  "aria-label": i,
@@ -1340,32 +1370,16 @@ var et = ({ children: e }) => {
1340
1370
  }), /* @__PURE__ */ U("div", {
1341
1371
  className: "w-full",
1342
1372
  style: { height: `${t}px` },
1343
- children: /* @__PURE__ */ U(Ae, {
1373
+ children: /* @__PURE__ */ U(Fe, {
1344
1374
  content: e,
1345
1375
  loadingLabel: o,
1346
1376
  errorLabel: s,
1347
- frameTitle: a
1377
+ frameTitle: a,
1378
+ onSendMessage: f
1348
1379
  })
1349
1380
  })]
1350
1381
  });
1351
- }), at = (e, t) => {
1352
- let n = e.toLowerCase();
1353
- return t.find((e) => e.contentType.split(",").some((e) => e.trim().toLowerCase() === n && e.trim() !== ""));
1354
- }, ot = (e, t) => {
1355
- if (!(e == null || e === "")) return Object.prototype.hasOwnProperty.call(t, e) ? t[e] : void 0;
1356
- }, st = (e) => `${e}:grouped-visualizer`, ct = (e, t) => {
1357
- let n = (t.contentType ?? "").split(",").map((e) => e.trim().toLowerCase()).filter((e) => e !== ""), r = [], i = [];
1358
- return e.forEach((e) => {
1359
- if (e.url != null && e.url !== "" && (n.length === 0 || n.includes(e.contentType.toLowerCase()))) {
1360
- r.push(e);
1361
- return;
1362
- }
1363
- i.push(e);
1364
- }), {
1365
- claimed: r,
1366
- unclaimed: i
1367
- };
1368
- }, lt = (e) => {
1382
+ }), dt = (e) => {
1369
1383
  let t;
1370
1384
  try {
1371
1385
  t = new URL(e).pathname;
@@ -1378,13 +1392,13 @@ var et = ({ children: e }) => {
1378
1392
  } catch {
1379
1393
  return n;
1380
1394
  }
1381
- }, ut = (e, t) => {
1382
- let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = tt(), { customVisualizers: o, themeId: s, onBeforeOpen: l } = t, u = I(async (t, n, r) => {
1395
+ }, ft = (e, t) => {
1396
+ let { openCanvas: n, openCanvasLoading: r, closeCanvas: a } = st(), { customVisualizers: o, themeId: s, onBeforeOpen: l } = t, u = I(async (t, n, r) => {
1383
1397
  if (t.url == null && t.referenceUrl != null) {
1384
1398
  let i = e.resolveReferencePdfContent(t);
1385
1399
  if (i != null) return r(i, t.name, n);
1386
1400
  }
1387
- let a = t.contentType.toLowerCase(), c = at(a, o);
1401
+ let a = t.contentType.toLowerCase(), c = ke(a, o);
1388
1402
  if (c != null) {
1389
1403
  let i = await e.resolveVisualizerContent(t, c, s);
1390
1404
  if (i != null) return r(i, t.name, n);
@@ -1393,14 +1407,14 @@ var et = ({ children: e }) => {
1393
1407
  let i = await e.resolveTextContent(t);
1394
1408
  if (i != null) return r(i, t.name, n);
1395
1409
  }
1396
- let l = Z("", a);
1410
+ let l = Je("", a);
1397
1411
  if (l != null) return r(await e.resolveOoxmlContent(t, l) ?? $(e.resolveContentUrl(t)), t.name, n);
1398
1412
  switch (a) {
1399
1413
  case f.PDF: return r(await e.resolvePdfContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
1400
1414
  case f.Markdown: return r(await e.resolveMarkdownContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
1401
1415
  case f.JSON: return r(await e.resolveJsonContent(t) ?? $(e.resolveContentUrl(t)), t.name, n);
1402
1416
  }
1403
- let u = t.name ?? "", p = u.lastIndexOf("."), m = p === -1 ? "" : u.slice(p + 1).toLowerCase(), h = Z(u);
1417
+ let u = t.name ?? "", p = u.lastIndexOf("."), m = p === -1 ? "" : u.slice(p + 1).toLowerCase(), h = Je(u);
1404
1418
  if (h != null) return r(await e.resolveOoxmlContent(t, h) ?? $(e.resolveContentUrl(t)), t.name, n);
1405
1419
  switch (m) {
1406
1420
  case d.Markdown:
@@ -1417,8 +1431,8 @@ var et = ({ children: e }) => {
1417
1431
  return i == null ? !1 : r(i, t.name, n);
1418
1432
  }
1419
1433
  }
1420
- let g = t.name != null && Ge(t.name) || t.url != null && Ge(lt(t.url));
1421
- if (t.name != null && !We(t.name) && !g) return r($(e.resolveContentUrl(t)), t.name, n);
1434
+ let g = t.name != null && Q(t.name) || t.url != null && Q(dt(t.url));
1435
+ if (t.name != null && !Ze(t.name) && !g) return r($(e.resolveContentUrl(t)), t.name, n);
1422
1436
  if (g) {
1423
1437
  let a = await e.resolveHtmlContent(t);
1424
1438
  return a == null ? e.hasTextSource(t) ? r($(e.resolveContentUrl(t)), t.name, n) : t.url == null ? !1 : r({
@@ -1426,7 +1440,7 @@ var et = ({ children: e }) => {
1426
1440
  url: t.url
1427
1441
  }, t.name, n) : r(a, t.name, n);
1428
1442
  }
1429
- let _ = await e.resolveCodeContent(t, qe(m));
1443
+ let _ = await e.resolveCodeContent(t, $e(m));
1430
1444
  return _ == null ? !1 : r(_, t.name, n);
1431
1445
  }, [
1432
1446
  o,
@@ -1434,7 +1448,7 @@ var et = ({ children: e }) => {
1434
1448
  e
1435
1449
  ]);
1436
1450
  return { openAttachmentCanvas: I(async (t, o = t.id, s) => {
1437
- let d = () => s == null || s(), f = (e, t, r) => d() ? (n(e, t, r), !0) : (Ze(e), !1);
1451
+ let d = () => s == null || s(), f = (e, t, r) => d() ? (n(e, t, r), !0) : (rt(e), !1);
1438
1452
  switch (t.type) {
1439
1453
  case c.Image: {
1440
1454
  let r = e.resolveImageContent(t);
@@ -1471,4 +1485,4 @@ var et = ({ children: e }) => {
1471
1485
  ]) };
1472
1486
  };
1473
1487
  //#endregion
1474
- export { de as ATTACHMENT_CANVAS_CLASS, Le as AttachmentCanvas, Pe as AttachmentCanvasBody, nt as AttachmentCanvasContainer, et as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, me as CodeContent, he as HTML_PREVIEW_FRAME_RENDER_MESSAGE, it as InlineGroupedVisualizer, Ce as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, Ye as createForbiddenCanvasContent, Je as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, a as downloadAttachmentContent, qe as extensionToLanguage, ot as findVisualizerForApplication, at as findVisualizerForMime, Z as getOoxmlFileType, Ue as getOoxmlMimeType, st as groupedVisualizerCanvasKey, o as isDownloadable, Ge as isHtmlPreviewable, Q as isOoxmlPreviewable, We as isTextPreviewable, ct as partitionAttachmentsForApplicationVisualizer, tt as useAttachmentCanvas, ut as useOpenAttachmentCanvas };
1488
+ export { de as ATTACHMENT_CANVAS_CLASS, He as AttachmentCanvas, ze as AttachmentCanvasBody, ct as AttachmentCanvasContainer, ot as AttachmentCanvasProvider, i as AttachmentContentType, n as AttachmentErrorType, me as CodeContent, he as HTML_PREVIEW_FRAME_RENDER_MESSAGE, ut as InlineGroupedVisualizer, Ce as McpAppCanvasRenderer, r as OoxmlFileType, t as OoxmlHighlightKind, tt as createForbiddenCanvasContent, et as createLoadErrorCanvasContent, $ as createUnsupportedCanvasContent, a as downloadAttachmentContent, $e as extensionToLanguage, Ae as findVisualizerForApplication, ke as findVisualizerForMime, Je as getOoxmlFileType, Xe as getOoxmlMimeType, je as groupedVisualizerCanvasKey, o as isDownloadable, Q as isHtmlPreviewable, Ye as isOoxmlPreviewable, Ze as isTextPreviewable, Me as partitionAttachmentsForApplicationVisualizer, st as useAttachmentCanvas, ft as useOpenAttachmentCanvas };