@arbidocs/blocks 0.5.124 → 0.5.125

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.
Files changed (109) hide show
  1. package/dist/ConnectedCallDock-XJOYVVAH.cjs +6 -6
  2. package/dist/ConnectedCallRoom-CUDYAPQK.cjs +6 -6
  3. package/dist/{ConnectedNativeDocxComparison-QKHCYD6W.cjs → ConnectedNativeDocxComparison-7QQ55JIO.cjs} +12 -12
  4. package/dist/{ConnectedStreamedWordArtifact-AG62232A.cjs.map → ConnectedNativeDocxComparison-7QQ55JIO.cjs.map} +1 -1
  5. package/dist/{ConnectedPresentation-OV2KBOLK.cjs → ConnectedPresentation-L32JPRFI.cjs} +9 -9
  6. package/dist/{ConnectedPresentation-OV2KBOLK.cjs.map → ConnectedPresentation-L32JPRFI.cjs.map} +1 -1
  7. package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs → ConnectedProductionSetDialog-4EAY6KAZ.cjs} +3 -3
  8. package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs.map → ConnectedProductionSetDialog-4EAY6KAZ.cjs.map} +1 -1
  9. package/dist/{ConnectedSlidesTab-LUAGZ6FD.cjs → ConnectedSlidesTab-P7GGNUTO.cjs} +9 -9
  10. package/dist/{ConnectedSlidesTab-LUAGZ6FD.cjs.map → ConnectedSlidesTab-P7GGNUTO.cjs.map} +1 -1
  11. package/dist/{ConnectedStreamedWordArtifact-AG62232A.cjs → ConnectedStreamedWordArtifact-7NJ3N52V.cjs} +12 -12
  12. package/dist/{ConnectedNativeDocxComparison-QKHCYD6W.cjs.map → ConnectedStreamedWordArtifact-7NJ3N52V.cjs.map} +1 -1
  13. package/dist/{DocumentReviewCard-M53XFLI2.cjs → DocumentReviewCard-BFPOFQXI.cjs} +16 -16
  14. package/dist/{DocumentReviewCard-M53XFLI2.cjs.map → DocumentReviewCard-BFPOFQXI.cjs.map} +1 -1
  15. package/dist/{FilesViewerDialog-JWKNJLWG.cjs → FilesViewerDialog-MHUVEZ7M.cjs} +29 -29
  16. package/dist/{FilesViewerDialog-JWKNJLWG.cjs.map → FilesViewerDialog-MHUVEZ7M.cjs.map} +1 -1
  17. package/dist/{NativeDocxEditor-2LQY2CTV.cjs → NativeDocxEditor-SIRYPMBN.cjs} +6 -6
  18. package/dist/{NativeDocxEditor-2LQY2CTV.cjs.map → NativeDocxEditor-SIRYPMBN.cjs.map} +1 -1
  19. package/dist/{WorkspaceTableView-3XYAV4BV.cjs → WorkspaceTableView-MIFYXV3G.cjs} +8 -8
  20. package/dist/{WorkspaceTableView-3XYAV4BV.cjs.map → WorkspaceTableView-MIFYXV3G.cjs.map} +1 -1
  21. package/dist/agents/index.cjs +215 -215
  22. package/dist/ai-IEIR7SC2.cjs +3 -3
  23. package/dist/auth/index.cjs +1 -1
  24. package/dist/calls/index.cjs +2 -2
  25. package/dist/chat/index.cjs +6 -6
  26. package/dist/{chunk-GNZAH6UI.cjs → chunk-2K6IMIVL.cjs} +3 -3
  27. package/dist/{chunk-GNZAH6UI.cjs.map → chunk-2K6IMIVL.cjs.map} +1 -1
  28. package/dist/{chunk-CQQQIZU4.cjs → chunk-3UP32FM3.cjs} +5 -5
  29. package/dist/{chunk-CQQQIZU4.cjs.map → chunk-3UP32FM3.cjs.map} +1 -1
  30. package/dist/{chunk-QG2U2JGX.cjs → chunk-4LP5MJGQ.cjs} +4 -4
  31. package/dist/{chunk-QG2U2JGX.cjs.map → chunk-4LP5MJGQ.cjs.map} +1 -1
  32. package/dist/{chunk-BX6G2ZCI.cjs → chunk-6JMW3IJ2.cjs} +112 -87
  33. package/dist/chunk-6JMW3IJ2.cjs.map +1 -0
  34. package/dist/{chunk-XGM4VVNV.cjs → chunk-7RJZIPLE.cjs} +33 -33
  35. package/dist/{chunk-XGM4VVNV.cjs.map → chunk-7RJZIPLE.cjs.map} +1 -1
  36. package/dist/{chunk-7NLO7ASW.cjs → chunk-AISYXX4M.cjs} +4 -4
  37. package/dist/{chunk-7NLO7ASW.cjs.map → chunk-AISYXX4M.cjs.map} +1 -1
  38. package/dist/{chunk-5QERK4PK.cjs → chunk-AS6QZETU.cjs} +35 -35
  39. package/dist/{chunk-5QERK4PK.cjs.map → chunk-AS6QZETU.cjs.map} +1 -1
  40. package/dist/{chunk-V6MW7B4B.cjs → chunk-B3R62764.cjs} +6 -6
  41. package/dist/{chunk-V6MW7B4B.cjs.map → chunk-B3R62764.cjs.map} +1 -1
  42. package/dist/{chunk-VKH3BEZE.cjs → chunk-BLIO3B7Z.cjs} +3 -3
  43. package/dist/{chunk-VKH3BEZE.cjs.map → chunk-BLIO3B7Z.cjs.map} +1 -1
  44. package/dist/{chunk-3IH55CDE.cjs → chunk-CQ2RJYE2.cjs} +3 -3
  45. package/dist/{chunk-3IH55CDE.cjs.map → chunk-CQ2RJYE2.cjs.map} +1 -1
  46. package/dist/{chunk-MXBXZXXQ.cjs → chunk-ENOPKX7E.cjs} +3 -3
  47. package/dist/{chunk-MXBXZXXQ.cjs.map → chunk-ENOPKX7E.cjs.map} +1 -1
  48. package/dist/{chunk-2CSLFAGF.cjs → chunk-GAMRVB3I.cjs} +4 -3
  49. package/dist/chunk-GAMRVB3I.cjs.map +1 -0
  50. package/dist/chunk-IRGRMJPP.cjs +18 -0
  51. package/dist/{chunk-SDRYSLOX.cjs.map → chunk-IRGRMJPP.cjs.map} +1 -1
  52. package/dist/{chunk-ADDQKZ5I.cjs → chunk-J3FFSEKO.cjs} +4 -4
  53. package/dist/{chunk-ADDQKZ5I.cjs.map → chunk-J3FFSEKO.cjs.map} +1 -1
  54. package/dist/{chunk-ALK3PUUB.cjs → chunk-L6HTZIBD.cjs} +3 -3
  55. package/dist/{chunk-ALK3PUUB.cjs.map → chunk-L6HTZIBD.cjs.map} +1 -1
  56. package/dist/{chunk-OHHKBURG.cjs → chunk-OGK377NL.cjs} +33 -33
  57. package/dist/{chunk-OHHKBURG.cjs.map → chunk-OGK377NL.cjs.map} +1 -1
  58. package/dist/{chunk-T73BHNQX.cjs → chunk-OHWHYVKG.cjs} +3 -3
  59. package/dist/{chunk-T73BHNQX.cjs.map → chunk-OHWHYVKG.cjs.map} +1 -1
  60. package/dist/{chunk-MLA2BJ2Y.cjs → chunk-PSB64T43.cjs} +28 -28
  61. package/dist/{chunk-MLA2BJ2Y.cjs.map → chunk-PSB64T43.cjs.map} +1 -1
  62. package/dist/{chunk-COD5ENHK.cjs → chunk-PVJ5ODDB.cjs} +4 -4
  63. package/dist/{chunk-COD5ENHK.cjs.map → chunk-PVJ5ODDB.cjs.map} +1 -1
  64. package/dist/{chunk-7557LDAN.cjs → chunk-PWBRE7JA.cjs} +5 -5
  65. package/dist/{chunk-7557LDAN.cjs.map → chunk-PWBRE7JA.cjs.map} +1 -1
  66. package/dist/{chunk-7PN3YENO.cjs → chunk-QIK7E6VF.cjs} +4 -4
  67. package/dist/{chunk-7PN3YENO.cjs.map → chunk-QIK7E6VF.cjs.map} +1 -1
  68. package/dist/{chunk-H236SNEV.cjs → chunk-TSFNLY3K.cjs} +4 -4
  69. package/dist/{chunk-H236SNEV.cjs.map → chunk-TSFNLY3K.cjs.map} +1 -1
  70. package/dist/{chunk-YGBHY67W.cjs → chunk-UA7HOLAZ.cjs} +5 -5
  71. package/dist/{chunk-YGBHY67W.cjs.map → chunk-UA7HOLAZ.cjs.map} +1 -1
  72. package/dist/{chunk-KXIRVKCJ.cjs → chunk-UUENH4BJ.cjs} +3 -3
  73. package/dist/{chunk-KXIRVKCJ.cjs.map → chunk-UUENH4BJ.cjs.map} +1 -1
  74. package/dist/{chunk-E3L5DB5F.cjs → chunk-YOEP3I4V.cjs} +5 -5
  75. package/dist/{chunk-E3L5DB5F.cjs.map → chunk-YOEP3I4V.cjs.map} +1 -1
  76. package/dist/{chunk-EMRY62HS.cjs → chunk-YVO6Z5BS.cjs} +10 -10
  77. package/dist/{chunk-EMRY62HS.cjs.map → chunk-YVO6Z5BS.cjs.map} +1 -1
  78. package/dist/connect/docx.cjs +16 -16
  79. package/dist/connect/index.cjs +979 -979
  80. package/dist/connect/viewer.cjs +22 -22
  81. package/dist/connection/viewer/VersionDropdown.js +1 -1
  82. package/dist/connection/viewer/VersionDropdown.js.map +1 -1
  83. package/dist/connection/viewer/ViewerPdfPane.js +2 -0
  84. package/dist/connection/viewer/ViewerPdfPane.js.map +2 -2
  85. package/dist/connection/viewer/pdf/usePassageTextFallback.d.ts +12 -0
  86. package/dist/connection/viewer/pdf/usePassageTextFallback.js +30 -0
  87. package/dist/connection/viewer/pdf/usePassageTextFallback.js.map +7 -0
  88. package/dist/connection/viewer/pdf/usePdfPassageHighlights.js +2 -11
  89. package/dist/connection/viewer/pdf/usePdfPassageHighlights.js.map +2 -2
  90. package/dist/connection/viewer/useViewerTabs.js +13 -1
  91. package/dist/connection/viewer/useViewerTabs.js.map +2 -2
  92. package/dist/document-tools/index.cjs +20 -20
  93. package/dist/docx/DocxCommandMenu.js +2 -1
  94. package/dist/docx/DocxCommandMenu.js.map +2 -2
  95. package/dist/docx/index.cjs +38 -38
  96. package/dist/embed/index.cjs +19 -19
  97. package/dist/facts/index.cjs +64 -64
  98. package/dist/files/index.cjs +223 -223
  99. package/dist/index.cjs +521 -521
  100. package/dist/settings/index.cjs +146 -146
  101. package/dist/site/index.cjs +6 -6
  102. package/dist/studio/index.cjs +9 -9
  103. package/dist/styles.css +1 -1
  104. package/dist/workflow-canvas/index.cjs +34 -34
  105. package/node_modules/@arbidocs/coedit/package.json +1 -1
  106. package/package.json +5 -5
  107. package/dist/chunk-2CSLFAGF.cjs.map +0 -1
  108. package/dist/chunk-BX6G2ZCI.cjs.map +0 -1
  109. package/dist/chunk-SDRYSLOX.cjs +0 -18
@@ -9,18 +9,16 @@ var chunkORNLCBNE_cjs = require('./chunk-ORNLCBNE.cjs');
9
9
  var chunk4CIVQWAX_cjs = require('./chunk-4CIVQWAX.cjs');
10
10
  var chunkPL7HUTM3_cjs = require('./chunk-PL7HUTM3.cjs');
11
11
  var chunkGFUOCGY6_cjs = require('./chunk-GFUOCGY6.cjs');
12
- var chunkADDQKZ5I_cjs = require('./chunk-ADDQKZ5I.cjs');
13
- var chunkKXIRVKCJ_cjs = require('./chunk-KXIRVKCJ.cjs');
14
- var chunk5QERK4PK_cjs = require('./chunk-5QERK4PK.cjs');
15
- var chunkALK3PUUB_cjs = require('./chunk-ALK3PUUB.cjs');
16
- var chunk7557LDAN_cjs = require('./chunk-7557LDAN.cjs');
17
- var chunk3IH55CDE_cjs = require('./chunk-3IH55CDE.cjs');
18
- var chunkGNZAH6UI_cjs = require('./chunk-GNZAH6UI.cjs');
12
+ var chunkJ3FFSEKO_cjs = require('./chunk-J3FFSEKO.cjs');
13
+ var chunkPWBRE7JA_cjs = require('./chunk-PWBRE7JA.cjs');
14
+ var chunkCQ2RJYE2_cjs = require('./chunk-CQ2RJYE2.cjs');
15
+ var chunk2K6IMIVL_cjs = require('./chunk-2K6IMIVL.cjs');
19
16
  var chunkJH6JTI76_cjs = require('./chunk-JH6JTI76.cjs');
17
+ var chunkUUENH4BJ_cjs = require('./chunk-UUENH4BJ.cjs');
18
+ var chunkAS6QZETU_cjs = require('./chunk-AS6QZETU.cjs');
19
+ var chunkL6HTZIBD_cjs = require('./chunk-L6HTZIBD.cjs');
20
20
  var chunkDTMBAFIL_cjs = require('./chunk-DTMBAFIL.cjs');
21
21
  var chunkMZZ3SBQL_cjs = require('./chunk-MZZ3SBQL.cjs');
22
- var chunkMNIQDXM6_cjs = require('./chunk-MNIQDXM6.cjs');
23
- var chunkE3Y7RI3J_cjs = require('./chunk-E3Y7RI3J.cjs');
24
22
  var chunkTG2GM7WJ_cjs = require('./chunk-TG2GM7WJ.cjs');
25
23
  var chunkEG7EJFUE_cjs = require('./chunk-EG7EJFUE.cjs');
26
24
  var chunkHQDR43JC_cjs = require('./chunk-HQDR43JC.cjs');
@@ -29,8 +27,10 @@ var chunkSJSGSHIT_cjs = require('./chunk-SJSGSHIT.cjs');
29
27
  var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
30
28
  var chunkFX3K6LNZ_cjs = require('./chunk-FX3K6LNZ.cjs');
31
29
  var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
32
- var chunkTKHCIHE2_cjs = require('./chunk-TKHCIHE2.cjs');
33
30
  var chunkLJJJ6CYH_cjs = require('./chunk-LJJJ6CYH.cjs');
31
+ var chunkMNIQDXM6_cjs = require('./chunk-MNIQDXM6.cjs');
32
+ var chunkE3Y7RI3J_cjs = require('./chunk-E3Y7RI3J.cjs');
33
+ var chunkTKHCIHE2_cjs = require('./chunk-TKHCIHE2.cjs');
34
34
  var React = require('react');
35
35
  var lucideReact = require('lucide-react');
36
36
  var react = require('@arbidocs/react');
@@ -203,13 +203,13 @@ function ViewerRelatedDocuments({ document: document2 }) {
203
203
  );
204
204
  if (!related) return null;
205
205
  return /* @__PURE__ */ jsxRuntime.jsx(
206
- chunk5QERK4PK_cjs.RelatedDocumentsCell,
206
+ chunkAS6QZETU_cjs.RelatedDocumentsCell,
207
207
  {
208
208
  currentDoc: document2,
209
209
  related,
210
210
  viewingDocumentId: viewerOpen ? viewingId : null,
211
211
  onDocumentClick: (id) => session.setViewingDocument({ id, page: null }),
212
- onDelete: (doc) => chunkADDQKZ5I_cjs.useFilesDialogs.getState().requestDelete(doc),
212
+ onDelete: (doc) => chunkJ3FFSEKO_cjs.useFilesDialogs.getState().requestDelete(doc),
213
213
  onCompare
214
214
  }
215
215
  );
@@ -258,7 +258,7 @@ function useViewerClipping(clippable, compact) {
258
258
  const stop = React.useCallback(() => setOn(false), [setOn]);
259
259
  const button = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
260
260
  /* @__PURE__ */ jsxRuntime.jsx(PresentationPill, { compact }),
261
- clippable && /* @__PURE__ */ jsxRuntime.jsx(chunk3IH55CDE_cjs.ClipButton, { active: on, compact, onClick: () => setOn(!on) })
261
+ clippable && /* @__PURE__ */ jsxRuntime.jsx(chunkCQ2RJYE2_cjs.ClipButton, { active: on, compact, onClick: () => setOn(!on) })
262
262
  ] });
263
263
  const layer = /* @__PURE__ */ jsxRuntime.jsx(SpotlightLayer, {});
264
264
  return { clipping: on && clippable, stop, button, layer };
@@ -520,7 +520,7 @@ function useViewedDocument(documentId) {
520
520
  const documentData = record?.external_id === documentId ? record : void 0;
521
521
  const { data: tags } = chunkHQDR43JC_cjs.useConnectedTags();
522
522
  const labelSummaries = React.useMemo(
523
- () => chunkALK3PUUB_cjs.summariseDocTags(documentData?.doctags ?? [], tags.filter(chunkALK3PUUB_cjs.isDocumentLabel)),
523
+ () => chunkL6HTZIBD_cjs.summariseDocTags(documentData?.doctags ?? [], tags.filter(chunkL6HTZIBD_cjs.isDocumentLabel)),
524
524
  [documentData, tags]
525
525
  );
526
526
  const fileName = documentData?.file_name;
@@ -666,6 +666,7 @@ function useViewerTabs(doc, isCompact, hasHistory = false) {
666
666
  phonePdfChosen
667
667
  } = react.useArbiSessionState((s) => s.documentViewer);
668
668
  const setActiveTab = (tab) => session.setDocumentViewer({ tab });
669
+ const passageId = react.useArbiSessionState((s) => s.viewingDocument?.passageId ?? null);
669
670
  const isTextFile = ui.friendlyFileType(documentData?.file_type, documentData?.file_name) === "Text";
670
671
  const isPhone = chunkFX3K6LNZ_cjs.useIsPhone();
671
672
  const phoneDefaultDecidedFor = React.useRef(null);
@@ -676,6 +677,8 @@ function useViewerTabs(doc, isCompact, hasHistory = false) {
676
677
  setActiveTab("slides");
677
678
  } else if (!isPresentation && documentData && activeTab === "slides") {
678
679
  setActiveTab(isDocx ? "docx" : isXlsx ? "xlsx" : "pdf");
680
+ } else if (passageId && activeTab === "pdf" && (isArtifact || isDocx)) {
681
+ setActiveTab("html");
679
682
  } else if (isArtifact && (activeTab === "pdf" || !liveKind && activeTab === "docx")) {
680
683
  setActiveTab(liveKind ? "preview" : "edit");
681
684
  } else if (isDocx && activeTab === "pdf") {
@@ -687,7 +690,16 @@ function useViewerTabs(doc, isCompact, hasHistory = false) {
687
690
  } else if (!isArtifact && !isDocx && !isXlsx && documentData && (activeTab === "docx" || activeTab === "xlsx")) {
688
691
  setActiveTab("pdf");
689
692
  }
690
- }, [hasDocumentData, documentKey, isArtifact, isDocx, isXlsx, liveKind, isPresentation]);
693
+ }, [
694
+ hasDocumentData,
695
+ documentKey,
696
+ isArtifact,
697
+ isDocx,
698
+ isXlsx,
699
+ liveKind,
700
+ isPresentation,
701
+ passageId
702
+ ]);
691
703
  React.useEffect(() => {
692
704
  if (!tabRequest || !documentKey || tabRequest.documentId !== documentKey) return;
693
705
  phoneDefaultDecidedFor.current = documentKey;
@@ -850,7 +862,7 @@ function VersionDropdown({
850
862
  {
851
863
  "aria-label": "Active document version",
852
864
  "data-testid": "document-version-dropdown",
853
- className: "max-w-44 rounded border border-input bg-background px-2 py-1 text-sm",
865
+ className: "max-w-44 rounded border border-input bg-background px-2 py-1 text-sm pointer-coarse:min-h-11",
854
866
  value: active?.id ?? "",
855
867
  onChange: (event) => {
856
868
  const id = event.currentTarget.value;
@@ -1090,7 +1102,7 @@ function PassageTagPanel({
1090
1102
  [workspaceTags]
1091
1103
  );
1092
1104
  return /* @__PURE__ */ jsxRuntime.jsx(
1093
- chunkALK3PUUB_cjs.TagPassagePanel,
1105
+ chunkL6HTZIBD_cjs.TagPassagePanel,
1094
1106
  {
1095
1107
  pageNumber,
1096
1108
  preview,
@@ -1215,7 +1227,7 @@ var ParsedPassage = React.memo(function ParsedPassage2({
1215
1227
  ];
1216
1228
  }) : [];
1217
1229
  return /* @__PURE__ */ jsxRuntime.jsx(
1218
- chunkALK3PUUB_cjs.HtmlPassage,
1230
+ chunkL6HTZIBD_cjs.HtmlPassage,
1219
1231
  {
1220
1232
  chunkId,
1221
1233
  highlight: isStrong ? "strong" : isLight ? "light" : void 0,
@@ -1255,7 +1267,7 @@ var ParsedPassage = React.memo(function ParsedPassage2({
1255
1267
  items: passageItems
1256
1268
  }
1257
1269
  ) : void 0,
1258
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ConnectedMarkdown, { children: chunk.content })
1270
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkUUENH4BJ_cjs.ConnectedMarkdown, { children: chunk.content })
1259
1271
  }
1260
1272
  );
1261
1273
  });
@@ -1391,11 +1403,11 @@ function useDocumentLabels(documentId, doctags, orderedChunkIds) {
1391
1403
  const workspaceTags = React.useMemo(() => allTags.filter(isDocumentTag), [allTags]);
1392
1404
  const documentDoctags = React.useMemo(() => doctags ?? [], [doctags]);
1393
1405
  const tagSummaries = React.useMemo(
1394
- () => chunkALK3PUUB_cjs.summariseDocTags(documentDoctags, workspaceTags),
1406
+ () => chunkL6HTZIBD_cjs.summariseDocTags(documentDoctags, workspaceTags),
1395
1407
  [documentDoctags, workspaceTags]
1396
1408
  );
1397
1409
  const labelSummaries = React.useMemo(
1398
- () => chunkALK3PUUB_cjs.summariseDocTags(documentDoctags, workspaceTags.filter(chunkALK3PUUB_cjs.isDocumentLabel)),
1410
+ () => chunkL6HTZIBD_cjs.summariseDocTags(documentDoctags, workspaceTags.filter(chunkL6HTZIBD_cjs.isDocumentLabel)),
1399
1411
  [documentDoctags, workspaceTags]
1400
1412
  );
1401
1413
  const labelsByChunk = React.useMemo(() => {
@@ -1903,14 +1915,14 @@ function ParsedTextView({
1903
1915
  }
1904
1916
  }
1905
1917
  }, [maxPageNumber, onLoadSuccess]);
1906
- if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading parsed document..." });
1918
+ if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading parsed document..." });
1907
1919
  if (error) {
1908
- return /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-text", children: "Failed to load parsed document" }) });
1920
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-red-text", children: "Failed to load parsed document" }) });
1909
1921
  }
1910
1922
  const taggingChunk = labels.taggingChunkId ? processedChunks.flatMap((page) => page.chunks).find((c) => c.chunkExtId === labels.taggingChunkId) : void 0;
1911
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkALK3PUUB_cjs.HtmlViewerRoot, { children: [
1923
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkL6HTZIBD_cjs.HtmlViewerRoot, { children: [
1912
1924
  /* @__PURE__ */ jsxRuntime.jsx(
1913
- chunkALK3PUUB_cjs.DocumentLabelBar,
1925
+ chunkL6HTZIBD_cjs.DocumentLabelBar,
1914
1926
  {
1915
1927
  summaries: labels.labelSummaries,
1916
1928
  activeTagExtId: labels.activeTagExtId,
@@ -1935,15 +1947,15 @@ function ParsedTextView({
1935
1947
  }
1936
1948
  ),
1937
1949
  !citation.factCitationActive && citation.runStartIds.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
1938
- chunkALK3PUUB_cjs.CitedRunNav,
1950
+ chunkL6HTZIBD_cjs.CitedRunNav,
1939
1951
  {
1940
1952
  position: citation.runCursor + 1,
1941
1953
  total: citation.runStartIds.length,
1942
1954
  onStep: citation.gotoRun
1943
1955
  }
1944
1956
  ),
1945
- /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.HtmlViewerSurface, { surfaceRef: containerRef, onMouseUp: citation.handleSelectionEnd, children: processedChunks.length > 0 ? processedChunks.map((page, pageIndex) => /* @__PURE__ */ jsxRuntime.jsx(
1946
- chunkALK3PUUB_cjs.HtmlPage,
1957
+ /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.HtmlViewerSurface, { surfaceRef: containerRef, onMouseUp: citation.handleSelectionEnd, children: processedChunks.length > 0 ? processedChunks.map((page, pageIndex) => /* @__PURE__ */ jsxRuntime.jsx(
1958
+ chunkL6HTZIBD_cjs.HtmlPage,
1947
1959
  {
1948
1960
  pageNumber: page.pageNumber,
1949
1961
  totalPages,
@@ -1984,7 +1996,7 @@ function ParsedTextView({
1984
1996
  })
1985
1997
  },
1986
1998
  pageIndex
1987
- )) : /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.HtmlViewerEmpty, {}) })
1999
+ )) : /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.HtmlViewerEmpty, {}) })
1988
2000
  ] });
1989
2001
  }
1990
2002
  function PdfClipOutlines({ outlines, onShow }) {
@@ -2111,15 +2123,6 @@ function usePdfPassageHighlights(documentId) {
2111
2123
  () => chunkJITYC4OS_cjs.passageBoxesByPage(processedChunks, { cited, active }),
2112
2124
  [processedChunks, cited, active]
2113
2125
  );
2114
- const session = react.useArbiSessionStore();
2115
- const fellBackFor = React.useRef(null);
2116
- React.useEffect(() => {
2117
- if (!active || !parsed || !documentId) return;
2118
- const key = `${documentId}:${active}`;
2119
- if (fellBackFor.current === key || chunkJITYC4OS_cjs.passagePlaced(processedChunks, active)) return;
2120
- fellBackFor.current = key;
2121
- session.setDocumentViewer({ tab: "html" });
2122
- }, [active, parsed, processedChunks, documentId, session]);
2123
2126
  const centredFor = React.useRef(null);
2124
2127
  const activeKey = active ? `${documentId}:${active}` : null;
2125
2128
  React.useEffect(() => {
@@ -2141,6 +2144,27 @@ function usePdfPassageHighlights(documentId) {
2141
2144
  [boxesByPage, active, centre]
2142
2145
  );
2143
2146
  }
2147
+ var NO_FOOTNOTES2 = {};
2148
+ var fellBackFor = /* @__PURE__ */ new WeakMap();
2149
+ function usePassageTextFallback(pdfFailed) {
2150
+ const session = react.useArbiSessionStore();
2151
+ const documentId = react.useArbiSessionState((s) => s.viewingDocument?.id);
2152
+ const onPdf = react.useArbiSessionState((s) => s.documentViewer.tab === "pdf");
2153
+ const active = react.useArbiSessionState((s) => s.viewingDocument?.passageId ?? null);
2154
+ const { data: parsed } = react.useParsedDocument(documentId, "final", {
2155
+ enabled: onPdf && !!active
2156
+ });
2157
+ const { processedChunks } = viewers.useProcessedChunks(parsed?.chunks, NO_FOOTNOTES2);
2158
+ React.useEffect(() => {
2159
+ if (!onPdf || !active || !documentId) return;
2160
+ const key = `${documentId}:${active}`;
2161
+ if (fellBackFor.get(session) === key) return;
2162
+ const unplaced = !!parsed && !chunkJITYC4OS_cjs.passagePlaced(processedChunks, active);
2163
+ if (!pdfFailed && !unplaced) return;
2164
+ fellBackFor.set(session, key);
2165
+ session.setDocumentViewer({ tab: "html" });
2166
+ }, [onPdf, pdfFailed, active, parsed, processedChunks, documentId, session]);
2167
+ }
2144
2168
  function PresentationFileCard({ documentId, fileName }) {
2145
2169
  const session = react.useArbiSessionStore();
2146
2170
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center p-6", "data-testid": "presentation-file", children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -2234,13 +2258,14 @@ function ViewerPdfPane({
2234
2258
  placeMark = null
2235
2259
  }) {
2236
2260
  const { documentData, isDownloadOnly, isVideo, isAudio, isImage, isDocx } = doc;
2261
+ usePassageTextFallback(!!pdfError);
2237
2262
  const showMarkup = markup.hasMarkup && !markup.showOriginal;
2238
2263
  if (chunkGFUOCGY6_cjs.isLegacyPresentationFile(documentData?.file_name)) {
2239
2264
  return /* @__PURE__ */ jsxRuntime.jsx(PresentationFileCard, { documentId, fileName: documentData?.file_name ?? "" });
2240
2265
  }
2241
2266
  if (isDownloadOnly) {
2242
2267
  return /* @__PURE__ */ jsxRuntime.jsx(
2243
- chunkALK3PUUB_cjs.ViewerPreviewUnavailable,
2268
+ chunkL6HTZIBD_cjs.ViewerPreviewUnavailable,
2244
2269
  {
2245
2270
  extension: fileExtension(documentData?.file_name),
2246
2271
  onDownload
@@ -2250,24 +2275,24 @@ function ViewerPdfPane({
2250
2275
  const loadingLabel = isVideo ? "Loading video..." : isAudio ? "Loading audio..." : isImage ? "Loading image..." : !documentData ? "Loading document..." : ui.friendlyFileType(documentData.file_type, documentData.file_name) === "Text" ? "Loading text..." : "Loading PDF...";
2251
2276
  const errorLabel = isVideo ? "Failed to load video" : isAudio ? "Failed to load audio" : isImage ? "Failed to load image" : "Failed to load PDF";
2252
2277
  if (isDocx && !pdfSnapshotNumber && documentData && !["completed", "low-content", "failed"].includes(documentData.status || "")) {
2253
- return /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "PDF and search indexing are processing. Open the DOCX tab to edit now." });
2278
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "PDF and search indexing are processing. Open the DOCX tab to edit now." });
2254
2279
  }
2255
2280
  if (isDocx && !pdfSnapshotNumber && documentData?.status === "failed") {
2256
- return /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "PDF conversion failed. Open the Word editor or download the document." });
2281
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "PDF conversion failed. Open the Word editor or download the document." });
2257
2282
  }
2258
- if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: loadingLabel });
2283
+ if (isPdfLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: loadingLabel });
2259
2284
  if (pdfError) {
2260
2285
  return /* @__PURE__ */ jsxRuntime.jsx(
2261
- chunkALK3PUUB_cjs.ViewerLoadError,
2286
+ chunkL6HTZIBD_cjs.ViewerLoadError,
2262
2287
  {
2263
2288
  message: isVideo || isAudio || isImage ? `${errorLabel} \u2014 download it instead.` : "Couldn't display the PDF \u2014 download it instead.",
2264
2289
  onDownload
2265
2290
  }
2266
2291
  );
2267
2292
  }
2268
- if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: loadingLabel });
2293
+ if (!pdfBlob) return /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: loadingLabel });
2269
2294
  if (clipping && (isImage || isVideo)) {
2270
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2295
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2271
2296
  ClippingMediaViewer,
2272
2297
  {
2273
2298
  file: pdfBlob,
@@ -2283,7 +2308,7 @@ function ViewerPdfPane({
2283
2308
  return /* @__PURE__ */ jsxRuntime.jsx(viewers.ImageViewer, { blob: pdfBlob, alt: documentData?.file_name || "Document image" });
2284
2309
  }
2285
2310
  if (signatureFlow?.kind === "prepare") {
2286
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2311
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2287
2312
  SignatureRequestEditor,
2288
2313
  {
2289
2314
  ...viewerProps,
@@ -2301,7 +2326,7 @@ function ViewerPdfPane({
2301
2326
  }
2302
2327
  if (signatureFlow?.kind === "sign" && currentUserId) {
2303
2328
  const { currentPage: _page, scrollTrigger: _trigger, ...guidedProps } = viewerProps;
2304
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2329
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2305
2330
  GuidedSigningViewer,
2306
2331
  {
2307
2332
  ...guidedProps,
@@ -2315,7 +2340,7 @@ function ViewerPdfPane({
2315
2340
  ) });
2316
2341
  }
2317
2342
  if (placingSignature) {
2318
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2343
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2319
2344
  SignaturePlacementViewer,
2320
2345
  {
2321
2346
  ...viewerProps,
@@ -2328,7 +2353,7 @@ function ViewerPdfPane({
2328
2353
  ) });
2329
2354
  }
2330
2355
  if (clipping) {
2331
- return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2356
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
2332
2357
  ClippingPdfViewer,
2333
2358
  {
2334
2359
  ...viewerProps,
@@ -2345,7 +2370,7 @@ function ViewerPdfPane({
2345
2370
  return /* @__PURE__ */ jsxRuntime.jsx(
2346
2371
  React.Suspense,
2347
2372
  {
2348
- fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: annotating ? "Loading annotation tools\u2026" : "Loading markup\u2026" }),
2373
+ fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: annotating ? "Loading annotation tools\u2026" : "Loading markup\u2026" }),
2349
2374
  children: /* @__PURE__ */ jsxRuntime.jsx(
2350
2375
  AnnotatedPdfViewer,
2351
2376
  {
@@ -2371,15 +2396,15 @@ function ViewerPdfPane({
2371
2396
  return /* @__PURE__ */ jsxRuntime.jsx(SessionPdfViewer, { ...viewerProps, file: pdfBlob });
2372
2397
  }
2373
2398
  var SlidesTab = React.lazy(
2374
- () => import('./ConnectedSlidesTab-LUAGZ6FD.cjs').then((m) => ({ default: m.ConnectedSlidesTab }))
2399
+ () => import('./ConnectedSlidesTab-P7GGNUTO.cjs').then((m) => ({ default: m.ConnectedSlidesTab }))
2375
2400
  );
2376
2401
  var StreamedWordArtifact = React.lazy(
2377
- () => import('./ConnectedStreamedWordArtifact-AG62232A.cjs').then((m) => ({
2402
+ () => import('./ConnectedStreamedWordArtifact-7NJ3N52V.cjs').then((m) => ({
2378
2403
  default: m.ConnectedStreamedWordArtifact
2379
2404
  }))
2380
2405
  );
2381
2406
  var NativeDocxComparison = React.lazy(
2382
- () => import('./ConnectedNativeDocxComparison-QKHCYD6W.cjs').then((m) => ({
2407
+ () => import('./ConnectedNativeDocxComparison-7QQ55JIO.cjs').then((m) => ({
2383
2408
  default: m.ConnectedNativeDocxComparison
2384
2409
  }))
2385
2410
  );
@@ -2601,15 +2626,15 @@ function DocumentViewerContent({
2601
2626
  };
2602
2627
  const documentTitle = streamingDoc?.title || draftDoc?.title || documentData?.doc_metadata?.title || documentData?.file_name || "Document";
2603
2628
  const pageNav = totalPages > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2604
- /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerZoomControl, { zoom, onCycle: () => setZoom(viewers.cycleZoom(zoom)) }),
2629
+ /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerZoomControl, { zoom, onCycle: () => setZoom(viewers.cycleZoom(zoom)) }),
2605
2630
  /* @__PURE__ */ jsxRuntime.jsx(
2606
- chunkALK3PUUB_cjs.PdfPageNav,
2631
+ chunkL6HTZIBD_cjs.PdfPageNav,
2607
2632
  {
2608
2633
  canPrev: (viewingDocumentPage || 1) > 1,
2609
2634
  canNext: (viewingDocumentPage || 1) < totalPages,
2610
2635
  onPrev: () => stepPage(-1),
2611
2636
  onNext: () => stepPage(1),
2612
- counter: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerPageCounter, { page: viewingDocumentPage || 1, total: totalPages, onGoTo: goToPage })
2637
+ counter: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerPageCounter, { page: viewingDocumentPage || 1, total: totalPages, onGoTo: goToPage })
2613
2638
  }
2614
2639
  )
2615
2640
  ] });
@@ -2633,7 +2658,7 @@ function DocumentViewerContent({
2633
2658
  );
2634
2659
  const titleBlock = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2635
2660
  isDraft ? /* @__PURE__ */ jsxRuntime.jsx(ViewerDraftTitle, { documentId }) : /* @__PURE__ */ jsxRuntime.jsx(
2636
- chunkALK3PUUB_cjs.ViewerTitle,
2661
+ chunkL6HTZIBD_cjs.ViewerTitle,
2637
2662
  {
2638
2663
  title: documentTitle,
2639
2664
  versionLabel: currentVersionLabel,
@@ -2642,7 +2667,7 @@ function DocumentViewerContent({
2642
2667
  ),
2643
2668
  isCompact && !isDraft && documentData?.shared && /* @__PURE__ */ jsxRuntime.jsx(ui.SharingEntity, { shared: true, variant: "icon", "data-testid": "document-shared-status" }),
2644
2669
  isCompact && activeTab === "pdf" && pdfBlob && markup.hasMarkup && !annotating && !placingSignature && /* @__PURE__ */ jsxRuntime.jsx(
2645
- chunk3IH55CDE_cjs.MarkupViewNote,
2670
+ chunkCQ2RJYE2_cjs.MarkupViewNote,
2646
2671
  {
2647
2672
  showOriginal: markup.showOriginal,
2648
2673
  onToggle: () => markup.setShowOriginal((on) => !on)
@@ -2651,7 +2676,7 @@ function DocumentViewerContent({
2651
2676
  !isComparing && !liveKind && documentData && /* @__PURE__ */ jsxRuntime.jsx(ViewerRelatedDocuments, { document: documentData }),
2652
2677
  isStreaming && /* @__PURE__ */ jsxRuntime.jsx(chunkDTMBAFIL_cjs.ViewerStatusNote, { pulse: true, children: "streaming..." }),
2653
2678
  isDraft && /* @__PURE__ */ jsxRuntime.jsx(chunkDTMBAFIL_cjs.ViewerStatusNote, { testId: "draft-unsaved-indicator", children: "Draft \u2014 not saved" }),
2654
- signatureStatus?.signed && /* @__PURE__ */ jsxRuntime.jsx(chunkGNZAH6UI_cjs.SignatureStatus, { status: signatureStatus, formatDate })
2679
+ signatureStatus?.signed && /* @__PURE__ */ jsxRuntime.jsx(chunk2K6IMIVL_cjs.SignatureStatus, { status: signatureStatus, formatDate })
2655
2680
  ] });
2656
2681
  const leftContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkDTMBAFIL_cjs.ViewerHeaderStart, { children: [
2657
2682
  isDraft ? (
@@ -2660,7 +2685,7 @@ function DocumentViewerContent({
2660
2685
  /* @__PURE__ */ jsxRuntime.jsx(ViewerDraftKind, { documentId })
2661
2686
  ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2662
2687
  /* @__PURE__ */ jsxRuntime.jsx(
2663
- chunkALK3PUUB_cjs.ViewerTabBar,
2688
+ chunkL6HTZIBD_cjs.ViewerTabBar,
2664
2689
  {
2665
2690
  tabs: viewerTabs.filter((tab) => tab.id !== "versions"),
2666
2691
  activeId: activeTab,
@@ -2701,7 +2726,7 @@ function DocumentViewerContent({
2701
2726
  const clip = useViewerClipping(annotatable || !!pdfBlob && (isImage || isVideo), isCompact);
2702
2727
  const clean = useCleanView(clip.layer);
2703
2728
  const signatureBanner = !isDraft && !liveKind && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(
2704
- chunk3IH55CDE_cjs.SignatureRequestBanner,
2729
+ chunkCQ2RJYE2_cjs.SignatureRequestBanner,
2705
2730
  {
2706
2731
  documentId,
2707
2732
  hidden: !!signatureFlow,
@@ -2732,7 +2757,7 @@ function DocumentViewerContent({
2732
2757
  const shownRef = snapshotDocumentId || documentId;
2733
2758
  const rightContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkDTMBAFIL_cjs.ViewerHeaderEnd, { isCompact, children: [
2734
2759
  annotatable && /* @__PURE__ */ jsxRuntime.jsx(
2735
- chunk3IH55CDE_cjs.AnnotateButton,
2760
+ chunkCQ2RJYE2_cjs.AnnotateButton,
2736
2761
  {
2737
2762
  active: annotating,
2738
2763
  compact: isCompact,
@@ -2746,7 +2771,7 @@ function DocumentViewerContent({
2746
2771
  ),
2747
2772
  clip.button,
2748
2773
  activeTab === "pdf" && pdfBlob && !placingSignature && (markup.hasMarkup || annotating) && /* @__PURE__ */ jsxRuntime.jsx(
2749
- chunk3IH55CDE_cjs.ShowOriginalButton,
2774
+ chunkCQ2RJYE2_cjs.ShowOriginalButton,
2750
2775
  {
2751
2776
  active: markup.showOriginal,
2752
2777
  compact: isCompact,
@@ -2757,14 +2782,14 @@ function DocumentViewerContent({
2757
2782
  }
2758
2783
  ),
2759
2784
  activeTab === "pdf" && markup.hasMarkup && !annotating && /* @__PURE__ */ jsxRuntime.jsx(
2760
- chunk3IH55CDE_cjs.DownloadMarkupButton,
2785
+ chunkCQ2RJYE2_cjs.DownloadMarkupButton,
2761
2786
  {
2762
2787
  onClick: () => void markup.downloadMarkup(),
2763
2788
  disabledReason: isSigned ? documentTools.SIGNED_LOCKED_REASON : void 0
2764
2789
  }
2765
2790
  ),
2766
2791
  activeTab === "pdf" && isImage && pdfBlob && /* @__PURE__ */ jsxRuntime.jsx(
2767
- chunkALK3PUUB_cjs.ViewerImageActions,
2792
+ chunkL6HTZIBD_cjs.ViewerImageActions,
2768
2793
  {
2769
2794
  compact: isCompact,
2770
2795
  onUseAsReference: support.useImageAsReference ? () => support.useImageAsReference(documentId) : void 0,
@@ -2790,7 +2815,7 @@ function DocumentViewerContent({
2790
2815
  }
2791
2816
  ),
2792
2817
  documentId && documentData && !isDraft && !isStreaming && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
2793
- chunk3IH55CDE_cjs.FileShareDialog,
2818
+ chunkCQ2RJYE2_cjs.FileShareDialog,
2794
2819
  {
2795
2820
  open: sharingFile,
2796
2821
  onOpenChange: setSharingFile,
@@ -2820,7 +2845,7 @@ function DocumentViewerContent({
2820
2845
  {
2821
2846
  state: documentData?.shared ? "shared" : "private",
2822
2847
  onToggle: share,
2823
- disabled: !chunkALK3PUUB_cjs.canChangeVisibility(documentData, currentUserId),
2848
+ disabled: !chunkL6HTZIBD_cjs.canChangeVisibility(documentData, currentUserId),
2824
2849
  disabledTooltip: "Only the owner can change visibility",
2825
2850
  tooltip: documentData?.shared ? "Shared with the workspace \u2014 click to share with specific people" : "Share with the workspace, then optionally notify specific people by email",
2826
2851
  variant: "outline",
@@ -2877,7 +2902,7 @@ function DocumentViewerContent({
2877
2902
  ),
2878
2903
  !isSigned && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2879
2904
  /* @__PURE__ */ jsxRuntime.jsx(
2880
- chunk3IH55CDE_cjs.PlaceMySignatureMenuItems,
2905
+ chunkCQ2RJYE2_cjs.PlaceMySignatureMenuItems,
2881
2906
  {
2882
2907
  onPlace: (mark) => {
2883
2908
  setPlacingSignature(false);
@@ -2965,7 +2990,7 @@ function DocumentViewerContent({
2965
2990
  onZoomChange: setZoom
2966
2991
  };
2967
2992
  return /* @__PURE__ */ jsxRuntime.jsxs(
2968
- chunkALK3PUUB_cjs.ViewerFrame,
2993
+ chunkL6HTZIBD_cjs.ViewerFrame,
2969
2994
  {
2970
2995
  frameRef: containerRef,
2971
2996
  contentId: documentId,
@@ -2983,7 +3008,7 @@ function DocumentViewerContent({
2983
3008
  ),
2984
3009
  isCompact && !isCoEditing && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "viewer-title-row", className: "flex min-w-0 items-center gap-2 px-3 pb-2", children: titleBlock }),
2985
3010
  snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(
2986
- chunk3IH55CDE_cjs.VersionSnapshotBar,
3011
+ chunkCQ2RJYE2_cjs.VersionSnapshotBar,
2987
3012
  {
2988
3013
  versionNumber: snapshotNumber,
2989
3014
  live: isDocx || isArtifact,
@@ -2996,7 +3021,7 @@ function DocumentViewerContent({
2996
3021
  ...clean.frame,
2997
3022
  footer: /* @__PURE__ */ jsxRuntime.jsx(ViewerCropModal, { crop }),
2998
3023
  children: [
2999
- isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading comparison\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
3024
+ isComparing && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading comparison\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
3000
3025
  NativeDocxComparison,
3001
3026
  {
3002
3027
  baseId: compareDocumentId,
@@ -3006,22 +3031,22 @@ function DocumentViewerContent({
3006
3031
  ) }),
3007
3032
  isCaptureDraft && /* @__PURE__ */ jsxRuntime.jsx(ViewerCaptureDraft, { documentId }),
3008
3033
  !isCaptureDraft && (activeTab === "pdf" || isMedia && activeTab === "html") && (!isArtifact || isDocx && !isDraft && !isStreaming && !liveKind) && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(chunkDTMBAFIL_cjs.ViewerPane, { hidden: activeTab !== "pdf", children: [
3009
- !clean.on && /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.DocumentLabelBar, { summaries: labelSummaries }),
3034
+ !clean.on && /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.DocumentLabelBar, { summaries: labelSummaries }),
3010
3035
  !clean.on && !isMedia && !isImage && signatureBanner,
3011
- !clean.on && activeTab === "pdf" && pdfBlob && !pdfVerified && /* @__PURE__ */ jsxRuntime.jsxs(chunkALK3PUUB_cjs.ViewerMessage, { children: [
3036
+ !clean.on && activeTab === "pdf" && pdfBlob && !pdfVerified && /* @__PURE__ */ jsxRuntime.jsxs(chunkL6HTZIBD_cjs.ViewerMessage, { children: [
3012
3037
  "Offline copy: its version cannot be verified. Reconnect before signing.",
3013
3038
  " ",
3014
3039
  /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void blobs.retryPdf(), className: "underline", children: "Retry loading the current PDF" })
3015
3040
  ] }),
3016
3041
  !clean.on && activeTab === "pdf" && !isMedia && !isImage && /* @__PURE__ */ jsxRuntime.jsx(
3017
- chunk3IH55CDE_cjs.MarkupNotices,
3042
+ chunkCQ2RJYE2_cjs.MarkupNotices,
3018
3043
  {
3019
3044
  legacyPrompt: markup.legacyPrompt,
3020
3045
  olderNote: markup.olderNote,
3021
3046
  onOpenVersion: (n) => setSnapshotDocumentId(`${documentId}@v${n}`)
3022
3047
  }
3023
3048
  ),
3024
- /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerControlBar, { controls: !clean.on && activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
3049
+ /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerControlBar, { controls: !clean.on && activeTab === "pdf" && pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
3025
3050
  ViewerPdfPane,
3026
3051
  {
3027
3052
  documentId,
@@ -3061,10 +3086,10 @@ function DocumentViewerContent({
3061
3086
  }
3062
3087
  ),
3063
3088
  activeTab === "edit" && isArtifact && liveKind && /* @__PURE__ */ jsxRuntime.jsx(chunkEG7EJFUE_cjs.ArtifactCodeView, { source: liveSource, fileName: documentData?.file_name ?? void 0 }),
3064
- activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
3065
- isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunk3IH55CDE_cjs.SignedEditNote, {}),
3089
+ activeTab === "edit" && isArtifact && !liveKind && !isStreaming && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
3090
+ isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkCQ2RJYE2_cjs.SignedEditNote, {}),
3066
3091
  /* @__PURE__ */ jsxRuntime.jsx(
3067
- chunk7557LDAN_cjs.ConnectedNativeDocxEditor,
3092
+ chunkPWBRE7JA_cjs.ConnectedNativeDocxEditor,
3068
3093
  {
3069
3094
  documentId: snapshotDocumentId || documentId,
3070
3095
  title: documentTitle,
@@ -3105,8 +3130,8 @@ function DocumentViewerContent({
3105
3130
  onOpenTranslation: (id) => setViewingDocumentId(id)
3106
3131
  }
3107
3132
  ),
3108
- activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: xlsxError ? "Failed to load spreadsheet" : "Loading spreadsheet..." })),
3109
- activeTab === "slides" && isPresentation && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading slides\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
3133
+ activeTab === "xlsx" && isXlsx && (xlsxBlob ? /* @__PURE__ */ jsxRuntime.jsx(viewers.XlsxViewer, { blob: xlsxBlob }) : /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: xlsxError ? "Failed to load spreadsheet" : "Loading spreadsheet..." })),
3134
+ activeTab === "slides" && isPresentation && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading slides\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
3110
3135
  SlidesTab,
3111
3136
  {
3112
3137
  documentId,
@@ -3115,11 +3140,11 @@ function DocumentViewerContent({
3115
3140
  draftTitle: isDraft ? draftDoc?.title ?? "" : void 0
3116
3141
  }
3117
3142
  ) }),
3118
- activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
3143
+ activeTab === "docx" && isDocx && !isComparing && /* @__PURE__ */ jsxRuntime.jsxs(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Loading editor\u2026" }), children: [
3119
3144
  signatureBanner,
3120
- isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunk3IH55CDE_cjs.SignedEditNote, {}),
3145
+ isSigned && !snapshotDocumentId && /* @__PURE__ */ jsxRuntime.jsx(chunkCQ2RJYE2_cjs.SignedEditNote, {}),
3121
3146
  /* @__PURE__ */ jsxRuntime.jsx(
3122
- chunk7557LDAN_cjs.ConnectedNativeDocxEditor,
3147
+ chunkPWBRE7JA_cjs.ConnectedNativeDocxEditor,
3123
3148
  {
3124
3149
  documentId: snapshotDocumentId || documentId,
3125
3150
  title: documentTitle,
@@ -3129,7 +3154,7 @@ function DocumentViewerContent({
3129
3154
  `${snapshotDocumentId || documentId}-${snapshotDocumentId ? "snapshot" : "live"}`
3130
3155
  )
3131
3156
  ] }),
3132
- streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerMessage, { children: "Opening draft\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
3157
+ streamingDoc && isStreaming && isArtifact && !liveKind && !isComparing && (activeTab === "html" || activeTab === "edit") && /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerMessage, { children: "Opening draft\u2026" }), children: /* @__PURE__ */ jsxRuntime.jsx(
3133
3158
  StreamedWordArtifact,
3134
3159
  {
3135
3160
  documentId: documentId.startsWith("doc-") ? documentId : void 0,
@@ -3139,7 +3164,7 @@ function DocumentViewerContent({
3139
3164
  },
3140
3165
  documentId
3141
3166
  ) }),
3142
- !isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkDTMBAFIL_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkALK3PUUB_cjs.ViewerControlBar, { controls: pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
3167
+ !isCaptureDraft && !isComparing && activeTab === "html" && !(isStreaming && isArtifact && !liveKind) && /* @__PURE__ */ jsxRuntime.jsx(chunkDTMBAFIL_cjs.ViewerPane, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkL6HTZIBD_cjs.ViewerControlBar, { controls: pageNav, children: /* @__PURE__ */ jsxRuntime.jsx(
3143
3168
  ParsedTextView,
3144
3169
  {
3145
3170
  documentId: pdfSnapshotId || documentId,
@@ -3155,5 +3180,5 @@ function DocumentViewerContent({
3155
3180
  }
3156
3181
 
3157
3182
  exports.ConnectedDocumentViewer = ConnectedDocumentViewer;
3158
- //# sourceMappingURL=chunk-BX6G2ZCI.cjs.map
3159
- //# sourceMappingURL=chunk-BX6G2ZCI.cjs.map
3183
+ //# sourceMappingURL=chunk-6JMW3IJ2.cjs.map
3184
+ //# sourceMappingURL=chunk-6JMW3IJ2.cjs.map