@arbidocs/react 0.5.120 → 0.5.121

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 (88) hide show
  1. package/dist/PdfViewerImpl-ZVJZ4KNW.cjs +22 -0
  2. package/dist/PdfViewerImpl-ZVJZ4KNW.cjs.map +1 -0
  3. package/dist/{PdfViewerImpl.d-B28hLEuj.d.ts → PdfViewerImpl.d-CqnEzQO7.d.ts} +9 -1
  4. package/dist/annotations/freeze/index.d.ts +1 -1
  5. package/dist/artifacts/artifact-kind.js +1 -0
  6. package/dist/artifacts/artifact-kind.js.map +2 -2
  7. package/dist/artifacts/index.cjs +3 -2
  8. package/dist/artifacts/index.cjs.map +1 -1
  9. package/dist/artifacts/index.d.ts +3 -2
  10. package/dist/calls/livekit/index.cjs +41 -41
  11. package/dist/chat/turn-flush.js +16 -0
  12. package/dist/chat/turn-flush.js.map +7 -0
  13. package/dist/chat/useConversationActions.js +3 -0
  14. package/dist/chat/useConversationActions.js.map +2 -2
  15. package/dist/{chunk-QP3WQSAA.cjs → chunk-4B2GW3AY.cjs} +3 -3
  16. package/dist/{chunk-QP3WQSAA.cjs.map → chunk-4B2GW3AY.cjs.map} +1 -1
  17. package/dist/{chunk-YMB6XUR2.cjs → chunk-7L7QRIQ2.cjs} +11 -7
  18. package/dist/chunk-7L7QRIQ2.cjs.map +1 -0
  19. package/dist/{chunk-KDYYAZXP.cjs → chunk-DLEHM4IA.cjs} +227 -155
  20. package/dist/chunk-DLEHM4IA.cjs.map +1 -0
  21. package/dist/{PdfViewerImpl-QUSDLNNM.cjs → chunk-ICBT2XGF.cjs} +5 -2
  22. package/dist/chunk-ICBT2XGF.cjs.map +1 -0
  23. package/dist/{chunk-AJRYZ3IC.cjs → chunk-K6ELFSG6.cjs} +3 -3
  24. package/dist/{chunk-AJRYZ3IC.cjs.map → chunk-K6ELFSG6.cjs.map} +1 -1
  25. package/dist/chunk-MAOGK7IC.cjs +61 -0
  26. package/dist/chunk-MAOGK7IC.cjs.map +1 -0
  27. package/dist/{chunk-5TRUFWKT.cjs → chunk-X5OZRLFZ.cjs} +5 -5
  28. package/dist/{chunk-5TRUFWKT.cjs.map → chunk-X5OZRLFZ.cjs.map} +1 -1
  29. package/dist/{chunk-C72FSQUE.cjs → chunk-Z3W4XFWB.cjs} +3 -3
  30. package/dist/{chunk-C72FSQUE.cjs.map → chunk-Z3W4XFWB.cjs.map} +1 -1
  31. package/dist/datasets/sources/documents.js +1 -1
  32. package/dist/datasets/sources/documents.js.map +2 -2
  33. package/dist/document-tools/core.cjs +80 -80
  34. package/dist/document-tools/images-to-pdf.js +43 -0
  35. package/dist/document-tools/images-to-pdf.js.map +7 -0
  36. package/dist/document-tools/index.cjs +184 -80
  37. package/dist/document-tools/index.cjs.map +1 -1
  38. package/dist/document-tools/index.d.ts +41 -1
  39. package/dist/document-tools/index.js +6 -1
  40. package/dist/document-tools/index.js.map +2 -2
  41. package/dist/document-tools/pdf-attachments.js +63 -0
  42. package/dist/document-tools/pdf-attachments.js.map +7 -0
  43. package/dist/entities/DocumentEntity.js +7 -2
  44. package/dist/entities/DocumentEntity.js.map +2 -2
  45. package/dist/entities/file-type.js +14 -2
  46. package/dist/entities/file-type.js.map +2 -2
  47. package/dist/entities/index.js +9 -1
  48. package/dist/entities/index.js.map +2 -2
  49. package/dist/icons/PresIcon.js +53 -0
  50. package/dist/icons/PresIcon.js.map +7 -0
  51. package/dist/icons/colors.js +2 -0
  52. package/dist/icons/colors.js.map +2 -2
  53. package/dist/icons/file-type.js +3 -0
  54. package/dist/icons/file-type.js.map +2 -2
  55. package/dist/icons/index.js +2 -0
  56. package/dist/icons/index.js.map +2 -2
  57. package/dist/index.cjs +898 -865
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/{index.d-DYlUprG9.d.ts → index.d-D2puqWeN.d.ts} +17 -3
  60. package/dist/index.d.ts +41 -8
  61. package/dist/index.js +1 -0
  62. package/dist/index.js.map +2 -2
  63. package/dist/pdf-region-impl-ZG5G2OX2.cjs +98 -0
  64. package/dist/pdf-region-impl-ZG5G2OX2.cjs.map +1 -0
  65. package/dist/session/documents.js +9 -5
  66. package/dist/session/documents.js.map +2 -2
  67. package/dist/shell/index.cjs +37 -37
  68. package/dist/ui/index.cjs +182 -170
  69. package/dist/ui/index.d.ts +1 -1
  70. package/dist/ui/slider.js +7 -1
  71. package/dist/ui/slider.js.map +2 -2
  72. package/dist/viewers/PdfViewer.cjs +3 -3
  73. package/dist/viewers/PdfViewer.d.ts +2 -2
  74. package/dist/viewers/PdfViewerImpl.js +4 -1
  75. package/dist/viewers/PdfViewerImpl.js.map +2 -2
  76. package/dist/viewers/index.cjs +28 -3
  77. package/dist/viewers/index.cjs.map +1 -1
  78. package/dist/viewers/index.d.ts +68 -2
  79. package/dist/viewers/index.js +14 -0
  80. package/dist/viewers/index.js.map +2 -2
  81. package/dist/viewers/pdf-region-impl.js +96 -0
  82. package/dist/viewers/pdf-region-impl.js.map +7 -0
  83. package/dist/viewers/pdf-region.js +57 -0
  84. package/dist/viewers/pdf-region.js.map +7 -0
  85. package/package.json +3 -3
  86. package/dist/PdfViewerImpl-QUSDLNNM.cjs.map +0 -1
  87. package/dist/chunk-KDYYAZXP.cjs.map +0 -1
  88. package/dist/chunk-YMB6XUR2.cjs.map +0 -1
@@ -5,7 +5,8 @@ const VIEWER_TABS = [
5
5
  "docx",
6
6
  "xlsx",
7
7
  "versions",
8
- "preview"
8
+ "preview",
9
+ "slides"
9
10
  ];
10
11
  const DEFAULT_DOCUMENT_VIEWER_STATE = {
11
12
  tab: "pdf",
@@ -15,7 +16,8 @@ const DEFAULT_DOCUMENT_VIEWER_STATE = {
15
16
  phonePdfChosen: false,
16
17
  commentTarget: null,
17
18
  unsavedChanges: false,
18
- detached: false
19
+ detached: false,
20
+ presenting: false
19
21
  };
20
22
  const NO_PASSAGE_CITATION = {
21
23
  active: null,
@@ -37,7 +39,8 @@ const DRAFT_TITLES = {
37
39
  text: "New Doc",
38
40
  audio: "New Audio",
39
41
  photo: "New Photo",
40
- video: "New Video"
42
+ video: "New Video",
43
+ presentation: "New Presentation"
41
44
  };
42
45
  function nextViewingDocument(current, input) {
43
46
  if (!input) return null;
@@ -140,7 +143,7 @@ function createArbiDocumentSessionStore({
140
143
  draftDocuments: { ...state.draftDocuments, [id]: draft },
141
144
  viewingDocument: { id, page: null, passageId: null },
142
145
  // A text draft is written in the editor; a capture's recorder replaces the tabs.
143
- documentViewer: kind === "text" ? { ...state.documentViewer, tab: "edit" } : state.documentViewer
146
+ documentViewer: kind === "text" ? { ...state.documentViewer, tab: "edit" } : kind === "presentation" ? { ...state.documentViewer, tab: "slides" } : state.documentViewer
144
147
  });
145
148
  showViewer?.();
146
149
  return id;
@@ -171,7 +174,8 @@ function createArbiDocumentSessionStore({
171
174
  tabRequest: null,
172
175
  commentTarget: null,
173
176
  unsavedChanges: false,
174
- detached: false
177
+ detached: false,
178
+ presenting: false
175
179
  }
176
180
  }),
177
181
  reset: () => update({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/session/documents.ts"],
4
- "sourcesContent": ["/**\n * The documents part of the session: the document being viewed and the viewer's own state, the\n * documents selected in lists, the document pinned to the chat, the drafts the user started on the\n * client (no backend record until saved), the citation picking passages in the viewer, and the\n * documents related to each one (near duplicates).\n *\n * {@link createArbiDocumentSessionStore} keeps it in memory; given a `persist`, the place in the\n * documents (the viewed document and its page, the pinned one, the viewer's tab and text size) is\n * read back synchronously when the store is made, so a reload shows the document at once.\n */\n\nimport type { RelatedDocsMap } from '../documents/related-documents'\n\n/** The document being viewed. */\nexport interface ArbiViewingDocument {\n /** The document (`doc-\u2026`), or a version reference (`doc-\u2026@v2`) while an earlier version shows. */\n id: string\n /** The page being read, when known. */\n page: number | null\n /** The passage being read, when one is. */\n passageId: string | null\n}\n\n/** What to view: page and passage are left unchanged when omitted. */\nexport interface ArbiViewingDocumentInput {\n id: string\n page?: number | null\n passageId?: string | null\n}\n\n/** A tab of the document viewer. */\nexport type ArbiViewerTab = 'pdf' | 'edit' | 'html' | 'docx' | 'xlsx' | 'versions' | 'preview'\n\nconst VIEWER_TABS: readonly ArbiViewerTab[] = [\n 'pdf',\n 'edit',\n 'html',\n 'docx',\n 'xlsx',\n 'versions',\n 'preview',\n]\n\n/** A comment of a Word document to open when it shows (a notification, a link). */\nexport interface ArbiDocumentCommentTarget {\n documentId: string\n commentId: string\n}\n\n/**\n * The document viewer's own state, shared with whatever opens documents (a citation opens the text\n * view, Compare from a documents list opens the redline): the open tab, the document compared with\n * the one viewed, and a tab asked for when a document was opened (applied once it has loaded).\n */\nexport interface ArbiDocumentViewerState {\n tab: ArbiViewerTab\n /** The document (or version reference) compared with the viewed one, or null. */\n compareId: string | null\n /** A tab to show once `documentId` has loaded (a signature request opens on the PDF). */\n tabRequest: { documentId: string; tab: ArbiViewerTab } | null\n /** The text view's size, a multiplier of the normal size: a reading preference. */\n textScale: number\n /** A phone user picked the PDF by hand: documents stop opening on the text view. */\n phonePdfChosen: boolean\n /** The Word comment to open in the viewed document, or null. */\n commentTarget: ArbiDocumentCommentTarget | null\n /** The open document has edits not saved yet: closing the viewer asks first. */\n unsavedChanges: boolean\n /** The viewer shows in a window of its own (popped out). */\n detached: boolean\n}\n\n/** What a draft is: a text document, or a capture (a voice note, a photo, a video). */\nexport type ArbiDraftKind = 'text' | 'audio' | 'photo' | 'video'\n\n/**\n * A document the user started on the client (a blank document, a capture), with no backend record\n * until it is saved. Its id is minted here (`draft-\u2026`), never sent to the server.\n */\nexport interface ArbiDraftDocument {\n id: string\n title: string\n kind: ArbiDraftKind\n /** A text draft's Markdown. Empty for captures. */\n content: string\n /** A capture's recording or picture, once taken; null before (and after a kind switch). */\n mediaBlob: Blob | null\n createdAt: string\n}\n\n/** A passage picked for a citation: its chunk and, when known, its page. */\nexport interface ArbiPickedPassage {\n chunk_id: string\n page?: number\n}\n\n/**\n * A citation picking passages in the viewer (a fact's sources, a field's), handed between the\n * viewer and the page that edits the citation.\n */\nexport interface ArbiPassageCitationState {\n /** The citation picking now: the document it picks in and its key (null while unsaved). */\n active: { documentId: string; key: string | null } | null\n /** Passages to light (a fact's cited passages while its sources are open). */\n highlighted: readonly string[]\n /** Passages picked in the viewer, not yet taken by the citation. */\n picked: readonly ArbiPickedPassage[]\n /** Passages unpicked in the viewer, not yet taken off the citation. */\n unpicked: readonly string[]\n}\n\n/** The documents being viewed and selected. */\nexport interface ArbiDocumentSessionState {\n viewingDocument: ArbiViewingDocument | null\n documentViewer: ArbiDocumentViewerState\n /** The documents selected in document lists. */\n selectedDocumentIds: readonly string[]\n /** Documents to select in the documents list once they are listed (a thread's sources). */\n documentsToSelect: readonly string[] | null\n /** The document read in full with each turn (one at a time). */\n pinnedDocumentId: string | null\n /** The documents related to each listed one (near duplicates), from the documents list. */\n relatedDocuments: RelatedDocsMap\n /** The drafts started on the client, by id. */\n draftDocuments: Readonly<Record<string, ArbiDraftDocument>>\n passageCitation: ArbiPassageCitationState\n}\n\n/** The documents' changes (the session store has them). */\nexport interface ArbiDocumentSessionActions {\n /**\n * View a document, or none. Viewing another document resets the page; `page` and `passageId`\n * set them when given.\n */\n setViewingDocument(document: ArbiViewingDocumentInput | null): void\n /** Change the document viewer's state; fields not given stay. */\n setDocumentViewer(change: Partial<ArbiDocumentViewerState>): void\n setSelectedDocumentIds(ids: string[]): void\n /** Ask the documents list to select these once they are listed (null: done). */\n setDocumentsToSelect(ids: string[] | null): void\n setPinnedDocumentId(id: string | null): void\n setRelatedDocuments(related: RelatedDocsMap): void\n /** Change the passage citation; fields not given stay. */\n setPassageCitation(change: Partial<ArbiPassageCitationState>): void\n /** Show a document the session just got (a chat writing one), on `tab`, in the viewer. */\n showNewDocument(documentId: string, tab?: ArbiViewerTab): void\n /** Start a draft of `kind`, view it and show the viewer. Returns its id. */\n startDraftDocument(kind: ArbiDraftKind): string\n /** Change a draft's content, capture or title. */\n updateDraftDocument(\n id: string,\n change: Partial<Pick<ArbiDraftDocument, 'content' | 'mediaBlob' | 'title'>>\n ): void\n /**\n * Switch a draft's kind. The capture is dropped (it belonged to the other kind), and a default\n * title follows the kind; a title the user typed stays.\n */\n setDraftDocumentKind(id: string, kind: ArbiDraftKind): void\n /** Forget a draft (saved or discarded). */\n clearDraftDocument(id: string): void\n}\n\n/** The documents part of a session store. */\nexport interface ArbiDocumentSessionStore extends ArbiDocumentSessionActions {\n /** The current state. The same object until something in it changes. */\n getState(): ArbiDocumentSessionState\n subscribe(listener: () => void): () => void\n /** The workspace is being left: nothing is viewed, selected, pinned or picked. */\n leave(): void\n /** Start over (sign-in, sign-out): only the reading preference (the text size) stays. */\n reset(): void\n}\n\n/** What the documents part keeps across reloads. */\nexport interface ArbiSavedDocuments {\n version: 1\n viewingDocument: { id: string; page: number | null } | null\n pinnedDocumentId: string | null\n tab: ArbiViewerTab\n textScale: number\n}\n\n/**\n * Where the documents part keeps what it saves. `load` is synchronous (localStorage), so the store\n * starts from it and nothing waits; `save` may write later (the latest value wins).\n */\nexport interface ArbiDocumentsPersist {\n /** What was saved (any shape: it is checked), or null. Never throws. */\n load(): unknown\n save(saved: ArbiSavedDocuments): void\n}\n\nexport interface ArbiDocumentSessionStoreOptions {\n initial?: Partial<ArbiDocumentSessionState>\n /** Keep the place in the documents across reloads. */\n persist?: ArbiDocumentsPersist\n /** Show the viewer for a document the session just got (a new draft, a chat's document). */\n showViewer?: () => void\n}\n\nexport const DEFAULT_DOCUMENT_VIEWER_STATE: ArbiDocumentViewerState = {\n tab: 'pdf',\n compareId: null,\n tabRequest: null,\n textScale: 1,\n phonePdfChosen: false,\n commentTarget: null,\n unsavedChanges: false,\n detached: false,\n}\n\nconst NO_PASSAGE_CITATION: ArbiPassageCitationState = {\n active: null,\n highlighted: [],\n picked: [],\n unpicked: [],\n}\n\nexport const EMPTY_DOCUMENT_STATE: ArbiDocumentSessionState = {\n viewingDocument: null,\n documentViewer: DEFAULT_DOCUMENT_VIEWER_STATE,\n selectedDocumentIds: [],\n documentsToSelect: null,\n pinnedDocumentId: null,\n relatedDocuments: new Map(),\n draftDocuments: {},\n passageCitation: NO_PASSAGE_CITATION,\n}\n\n/** A draft's default title, by kind; a title still at one of these follows a kind switch. */\nconst DRAFT_TITLES: Record<ArbiDraftKind, string> = {\n text: 'New Doc',\n audio: 'New Audio',\n photo: 'New Photo',\n video: 'New Video',\n}\n\n/** The next viewing document, given the current one (shared by every store implementation). */\nexport function nextViewingDocument(\n current: ArbiViewingDocument | null,\n input: ArbiViewingDocumentInput | null\n): ArbiViewingDocument | null {\n if (!input) return null\n const same = current?.id === input.id\n return {\n id: input.id,\n page: input.page !== undefined ? input.page : same ? (current?.page ?? null) : null,\n passageId: input.passageId !== undefined ? input.passageId : (current?.passageId ?? null),\n }\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\nconst isPage = (value: unknown): value is number =>\n typeof value === 'number' && Number.isInteger(value) && value >= 1\n\n/**\n * Read a saved place in the documents. Each field is checked on its own: an unreadable one keeps\n * its default. Null when there is nothing readable at all.\n */\nexport function parseSavedDocuments(saved: unknown): ArbiSavedDocuments | null {\n if (!isRecord(saved) || saved.version !== 1) return null\n const viewing = isRecord(saved.viewingDocument) ? saved.viewingDocument : null\n return {\n version: 1,\n viewingDocument:\n viewing && typeof viewing.id === 'string' && viewing.id\n ? { id: viewing.id, page: isPage(viewing.page) ? viewing.page : null }\n : null,\n pinnedDocumentId: typeof saved.pinnedDocumentId === 'string' ? saved.pinnedDocumentId : null,\n tab: VIEWER_TABS.includes(saved.tab as ArbiViewerTab)\n ? (saved.tab as ArbiViewerTab)\n : DEFAULT_DOCUMENT_VIEWER_STATE.tab,\n textScale:\n typeof saved.textScale === 'number' && Number.isFinite(saved.textScale) && saved.textScale > 0\n ? saved.textScale\n : DEFAULT_DOCUMENT_VIEWER_STATE.textScale,\n }\n}\n\n/** What of `state` is kept across reloads. */\nexport function savedDocumentsOf(state: ArbiDocumentSessionState): ArbiSavedDocuments {\n return {\n version: 1,\n viewingDocument: state.viewingDocument\n ? { id: state.viewingDocument.id, page: state.viewingDocument.page }\n : null,\n pinnedDocumentId: state.pinnedDocumentId,\n tab: state.documentViewer.tab,\n textScale: state.documentViewer.textScale,\n }\n}\n\n/** The state a saved place puts back (over `base`). */\nexport function restoreSavedDocuments(\n base: ArbiDocumentSessionState,\n saved: ArbiSavedDocuments\n): ArbiDocumentSessionState {\n return {\n ...base,\n viewingDocument: saved.viewingDocument\n ? { id: saved.viewingDocument.id, page: saved.viewingDocument.page, passageId: null }\n : null,\n pinnedDocumentId: saved.pinnedDocumentId,\n documentViewer: { ...base.documentViewer, tab: saved.tab, textScale: saved.textScale },\n }\n}\n\n/** The documents part, in memory (and, given a `persist`, kept across reloads). */\nexport function createArbiDocumentSessionStore({\n initial = {},\n persist,\n showViewer,\n}: ArbiDocumentSessionStoreOptions = {}): ArbiDocumentSessionStore {\n let state: ArbiDocumentSessionState = { ...EMPTY_DOCUMENT_STATE, ...initial }\n if (persist) {\n const saved = parseSavedDocuments(persist.load())\n if (saved) state = restoreSavedDocuments(state, saved)\n }\n const listeners = new Set<() => void>()\n const update = (patch: Partial<ArbiDocumentSessionState>) => {\n const previous = state\n state = { ...state, ...patch }\n if (\n persist &&\n (state.viewingDocument !== previous.viewingDocument ||\n state.pinnedDocumentId !== previous.pinnedDocumentId ||\n state.documentViewer.tab !== previous.documentViewer.tab ||\n state.documentViewer.textScale !== previous.documentViewer.textScale)\n )\n persist.save(savedDocumentsOf(state))\n listeners.forEach((listener) => listener())\n }\n const setDocumentViewer = (change: Partial<ArbiDocumentViewerState>) => {\n const next = { ...state.documentViewer, ...change }\n const keys = Object.keys(change) as (keyof ArbiDocumentViewerState)[]\n if (keys.some((key) => next[key] !== state.documentViewer[key]))\n update({ documentViewer: next })\n }\n const updateDraft = (id: string, change: (draft: ArbiDraftDocument) => ArbiDraftDocument) => {\n const draft = state.draftDocuments[id]\n if (draft) update({ draftDocuments: { ...state.draftDocuments, [id]: change(draft) } })\n }\n return {\n getState: () => state,\n subscribe: (listener) => {\n listeners.add(listener)\n return () => listeners.delete(listener)\n },\n setViewingDocument: (input) =>\n update({ viewingDocument: nextViewingDocument(state.viewingDocument, input) }),\n setDocumentViewer,\n setSelectedDocumentIds: (ids) => update({ selectedDocumentIds: ids }),\n setDocumentsToSelect: (ids) => update({ documentsToSelect: ids }),\n setPinnedDocumentId: (pinnedDocumentId) => update({ pinnedDocumentId }),\n setRelatedDocuments: (relatedDocuments) => update({ relatedDocuments }),\n setPassageCitation: (change) =>\n update({ passageCitation: { ...state.passageCitation, ...change } }),\n showNewDocument: (documentId, tab) => {\n update({\n viewingDocument: { id: documentId, page: null, passageId: null },\n documentViewer: tab ? { ...state.documentViewer, tab } : state.documentViewer,\n })\n showViewer?.()\n },\n startDraftDocument: (kind) => {\n const id = `draft-${crypto.randomUUID()}`\n const draft: ArbiDraftDocument = {\n id,\n title: DRAFT_TITLES[kind],\n kind,\n content: '',\n mediaBlob: null,\n createdAt: new Date().toISOString(),\n }\n update({\n draftDocuments: { ...state.draftDocuments, [id]: draft },\n viewingDocument: { id, page: null, passageId: null },\n // A text draft is written in the editor; a capture's recorder replaces the tabs.\n documentViewer:\n kind === 'text' ? { ...state.documentViewer, tab: 'edit' } : state.documentViewer,\n })\n showViewer?.()\n return id\n },\n updateDraftDocument: (id, change) => updateDraft(id, (draft) => ({ ...draft, ...change })),\n setDraftDocumentKind: (id, kind) =>\n updateDraft(id, (draft) => ({\n ...draft,\n kind,\n mediaBlob: null,\n title: Object.values(DRAFT_TITLES).includes(draft.title) ? DRAFT_TITLES[kind] : draft.title,\n })),\n clearDraftDocument: (id) => {\n if (!(id in state.draftDocuments)) return\n const rest = { ...state.draftDocuments }\n delete rest[id]\n update({ draftDocuments: rest })\n },\n leave: () =>\n update({\n viewingDocument: null,\n selectedDocumentIds: [],\n documentsToSelect: null,\n pinnedDocumentId: null,\n relatedDocuments: new Map(),\n passageCitation: NO_PASSAGE_CITATION,\n documentViewer: {\n ...state.documentViewer,\n compareId: null,\n tabRequest: null,\n commentTarget: null,\n unsavedChanges: false,\n detached: false,\n },\n }),\n reset: () =>\n update({\n ...EMPTY_DOCUMENT_STATE,\n relatedDocuments: new Map(),\n documentViewer: {\n ...DEFAULT_DOCUMENT_VIEWER_STATE,\n textScale: state.documentViewer.textScale,\n },\n }),\n }\n}\n"],
5
- "mappings": "AAiCA,MAAM,cAAwC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA+JO,MAAM,gCAAyD;AAAA,EACpE,KAAK;AAAA,EACL,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,UAAU;AACZ;AAEA,MAAM,sBAAgD;AAAA,EACpD,QAAQ;AAAA,EACR,aAAa,CAAC;AAAA,EACd,QAAQ,CAAC;AAAA,EACT,UAAU,CAAC;AACb;AAEO,MAAM,uBAAiD;AAAA,EAC5D,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,qBAAqB,CAAC;AAAA,EACtB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,kBAAkB,oBAAI,IAAI;AAAA,EAC1B,gBAAgB,CAAC;AAAA,EACjB,iBAAiB;AACnB;AAGA,MAAM,eAA8C;AAAA,EAClD,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACT;AAGO,SAAS,oBACd,SACA,OAC4B;AAC5B,MAAI,CAAC,MAAO,QAAO;AACnB,QAAM,OAAO,SAAS,OAAO,MAAM;AACnC,SAAO;AAAA,IACL,IAAI,MAAM;AAAA,IACV,MAAM,MAAM,SAAS,SAAY,MAAM,OAAO,OAAQ,SAAS,QAAQ,OAAQ;AAAA,IAC/E,WAAW,MAAM,cAAc,SAAY,MAAM,YAAa,SAAS,aAAa;AAAA,EACtF;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D,mBAAa;AACb,aAAO;AAAA,IACT;AAAA,IACA,qBAAqB,CAAC,IAAI,WAAW,YAAY,IAAI,CAAC,WAAW,EAAE,GAAG,OAAO,GAAG,OAAO,EAAE;AAAA,IACzF,sBAAsB,CAAC,IAAI,SACzB,YAAY,IAAI,CAAC,WAAW;AAAA,MAC1B,GAAG;AAAA,MACH;AAAA,MACA,WAAW;AAAA,MACX,OAAO,OAAO,OAAO,YAAY,EAAE,SAAS,MAAM,KAAK,IAAI,aAAa,IAAI,IAAI,MAAM;AAAA,IACxF,EAAE;AAAA,IACJ,oBAAoB,CAAC,OAAO;AAC1B,UAAI,EAAE,MAAM,MAAM,gBAAiB;AACnC,YAAM,OAAO,EAAE,GAAG,MAAM,eAAe;AACvC,aAAO,KAAK,EAAE;AACd,aAAO,EAAE,gBAAgB,KAAK,CAAC;AAAA,IACjC;AAAA,IACA,OAAO,MACL,OAAO;AAAA,MACL,iBAAiB;AAAA,MACjB,qBAAqB,CAAC;AAAA,MACtB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,kBAAkB,oBAAI,IAAI;AAAA,MAC1B,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,QACd,GAAG,MAAM;AAAA,QACT,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,eAAe;AAAA,QACf,gBAAgB;AAAA,QAChB,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,IACH,OAAO,MACL,OAAO;AAAA,MACL,GAAG;AAAA,MACH,kBAAkB,oBAAI,IAAI;AAAA,MAC1B,gBAAgB;AAAA,QACd,GAAG;AAAA,QACH,WAAW,MAAM,eAAe;AAAA,MAClC;AAAA,IACF,CAAC;AAAA,EACL;AACF;",
4
+ "sourcesContent": ["/**\n * The documents part of the session: the document being viewed and the viewer's own state, the\n * documents selected in lists, the document pinned to the chat, the drafts the user started on the\n * client (no backend record until saved), the citation picking passages in the viewer, and the\n * documents related to each one (near duplicates).\n *\n * {@link createArbiDocumentSessionStore} keeps it in memory; given a `persist`, the place in the\n * documents (the viewed document and its page, the pinned one, the viewer's tab and text size) is\n * read back synchronously when the store is made, so a reload shows the document at once.\n */\n\nimport type { RelatedDocsMap } from '../documents/related-documents'\n\n/** The document being viewed. */\nexport interface ArbiViewingDocument {\n /** The document (`doc-\u2026`), or a version reference (`doc-\u2026@v2`) while an earlier version shows. */\n id: string\n /** The page being read, when known. */\n page: number | null\n /** The passage being read, when one is. */\n passageId: string | null\n}\n\n/** What to view: page and passage are left unchanged when omitted. */\nexport interface ArbiViewingDocumentInput {\n id: string\n page?: number | null\n passageId?: string | null\n}\n\n/** A tab of the document viewer. */\nexport type ArbiViewerTab =\n | 'pdf'\n | 'edit'\n | 'html'\n | 'docx'\n | 'xlsx'\n | 'versions'\n | 'preview'\n /** A presentation's slides, edited. */\n | 'slides'\n\nconst VIEWER_TABS: readonly ArbiViewerTab[] = [\n 'pdf',\n 'edit',\n 'html',\n 'docx',\n 'xlsx',\n 'versions',\n 'preview',\n 'slides',\n]\n\n/** A comment of a Word document to open when it shows (a notification, a link). */\nexport interface ArbiDocumentCommentTarget {\n documentId: string\n commentId: string\n}\n\n/**\n * The document viewer's own state, shared with whatever opens documents (a citation opens the text\n * view, Compare from a documents list opens the redline): the open tab, the document compared with\n * the one viewed, and a tab asked for when a document was opened (applied once it has loaded).\n */\nexport interface ArbiDocumentViewerState {\n tab: ArbiViewerTab\n /** The document (or version reference) compared with the viewed one, or null. */\n compareId: string | null\n /** A tab to show once `documentId` has loaded (a signature request opens on the PDF). */\n tabRequest: { documentId: string; tab: ArbiViewerTab } | null\n /** The text view's size, a multiplier of the normal size: a reading preference. */\n textScale: number\n /** A phone user picked the PDF by hand: documents stop opening on the text view. */\n phonePdfChosen: boolean\n /** The Word comment to open in the viewed document, or null. */\n commentTarget: ArbiDocumentCommentTarget | null\n /** The open document has edits not saved yet: closing the viewer asks first. */\n unsavedChanges: boolean\n /** The viewer shows in a window of its own (popped out). */\n detached: boolean\n /**\n * Popped out, the viewer shows only the document (no header, bars or controls): a clean view to\n * share in a call or put full screen. Applies while `detached`.\n */\n presenting: boolean\n}\n\n/** What a draft is: a text document, a capture (a voice note, a photo, a video), or a presentation. */\nexport type ArbiDraftKind = 'text' | 'audio' | 'photo' | 'video' | 'presentation'\n\n/**\n * A document the user started on the client (a blank document, a capture), with no backend record\n * until it is saved. Its id is minted here (`draft-\u2026`), never sent to the server.\n */\nexport interface ArbiDraftDocument {\n id: string\n title: string\n kind: ArbiDraftKind\n /** A text draft's Markdown. Empty for captures. */\n content: string\n /** A capture's recording or picture, once taken; null before (and after a kind switch). */\n mediaBlob: Blob | null\n createdAt: string\n}\n\n/** A passage picked for a citation: its chunk and, when known, its page. */\nexport interface ArbiPickedPassage {\n chunk_id: string\n page?: number\n}\n\n/**\n * A citation picking passages in the viewer (a fact's sources, a field's), handed between the\n * viewer and the page that edits the citation.\n */\nexport interface ArbiPassageCitationState {\n /** The citation picking now: the document it picks in and its key (null while unsaved). */\n active: { documentId: string; key: string | null } | null\n /** Passages to light (a fact's cited passages while its sources are open). */\n highlighted: readonly string[]\n /** Passages picked in the viewer, not yet taken by the citation. */\n picked: readonly ArbiPickedPassage[]\n /** Passages unpicked in the viewer, not yet taken off the citation. */\n unpicked: readonly string[]\n}\n\n/** The documents being viewed and selected. */\nexport interface ArbiDocumentSessionState {\n viewingDocument: ArbiViewingDocument | null\n documentViewer: ArbiDocumentViewerState\n /** The documents selected in document lists. */\n selectedDocumentIds: readonly string[]\n /** Documents to select in the documents list once they are listed (a thread's sources). */\n documentsToSelect: readonly string[] | null\n /** The document read in full with each turn (one at a time). */\n pinnedDocumentId: string | null\n /** The documents related to each listed one (near duplicates), from the documents list. */\n relatedDocuments: RelatedDocsMap\n /** The drafts started on the client, by id. */\n draftDocuments: Readonly<Record<string, ArbiDraftDocument>>\n passageCitation: ArbiPassageCitationState\n}\n\n/** The documents' changes (the session store has them). */\nexport interface ArbiDocumentSessionActions {\n /**\n * View a document, or none. Viewing another document resets the page; `page` and `passageId`\n * set them when given.\n */\n setViewingDocument(document: ArbiViewingDocumentInput | null): void\n /** Change the document viewer's state; fields not given stay. */\n setDocumentViewer(change: Partial<ArbiDocumentViewerState>): void\n setSelectedDocumentIds(ids: string[]): void\n /** Ask the documents list to select these once they are listed (null: done). */\n setDocumentsToSelect(ids: string[] | null): void\n setPinnedDocumentId(id: string | null): void\n setRelatedDocuments(related: RelatedDocsMap): void\n /** Change the passage citation; fields not given stay. */\n setPassageCitation(change: Partial<ArbiPassageCitationState>): void\n /** Show a document the session just got (a chat writing one), on `tab`, in the viewer. */\n showNewDocument(documentId: string, tab?: ArbiViewerTab): void\n /** Start a draft of `kind`, view it and show the viewer. Returns its id. */\n startDraftDocument(kind: ArbiDraftKind): string\n /** Change a draft's content, capture or title. */\n updateDraftDocument(\n id: string,\n change: Partial<Pick<ArbiDraftDocument, 'content' | 'mediaBlob' | 'title'>>\n ): void\n /**\n * Switch a draft's kind. The capture is dropped (it belonged to the other kind), and a default\n * title follows the kind; a title the user typed stays.\n */\n setDraftDocumentKind(id: string, kind: ArbiDraftKind): void\n /** Forget a draft (saved or discarded). */\n clearDraftDocument(id: string): void\n}\n\n/** The documents part of a session store. */\nexport interface ArbiDocumentSessionStore extends ArbiDocumentSessionActions {\n /** The current state. The same object until something in it changes. */\n getState(): ArbiDocumentSessionState\n subscribe(listener: () => void): () => void\n /** The workspace is being left: nothing is viewed, selected, pinned or picked. */\n leave(): void\n /** Start over (sign-in, sign-out): only the reading preference (the text size) stays. */\n reset(): void\n}\n\n/** What the documents part keeps across reloads. */\nexport interface ArbiSavedDocuments {\n version: 1\n viewingDocument: { id: string; page: number | null } | null\n pinnedDocumentId: string | null\n tab: ArbiViewerTab\n textScale: number\n}\n\n/**\n * Where the documents part keeps what it saves. `load` is synchronous (localStorage), so the store\n * starts from it and nothing waits; `save` may write later (the latest value wins).\n */\nexport interface ArbiDocumentsPersist {\n /** What was saved (any shape: it is checked), or null. Never throws. */\n load(): unknown\n save(saved: ArbiSavedDocuments): void\n}\n\nexport interface ArbiDocumentSessionStoreOptions {\n initial?: Partial<ArbiDocumentSessionState>\n /** Keep the place in the documents across reloads. */\n persist?: ArbiDocumentsPersist\n /** Show the viewer for a document the session just got (a new draft, a chat's document). */\n showViewer?: () => void\n}\n\nexport const DEFAULT_DOCUMENT_VIEWER_STATE: ArbiDocumentViewerState = {\n tab: 'pdf',\n compareId: null,\n tabRequest: null,\n textScale: 1,\n phonePdfChosen: false,\n commentTarget: null,\n unsavedChanges: false,\n detached: false,\n presenting: false,\n}\n\nconst NO_PASSAGE_CITATION: ArbiPassageCitationState = {\n active: null,\n highlighted: [],\n picked: [],\n unpicked: [],\n}\n\nexport const EMPTY_DOCUMENT_STATE: ArbiDocumentSessionState = {\n viewingDocument: null,\n documentViewer: DEFAULT_DOCUMENT_VIEWER_STATE,\n selectedDocumentIds: [],\n documentsToSelect: null,\n pinnedDocumentId: null,\n relatedDocuments: new Map(),\n draftDocuments: {},\n passageCitation: NO_PASSAGE_CITATION,\n}\n\n/** A draft's default title, by kind; a title still at one of these follows a kind switch. */\nconst DRAFT_TITLES: Record<ArbiDraftKind, string> = {\n text: 'New Doc',\n audio: 'New Audio',\n photo: 'New Photo',\n video: 'New Video',\n presentation: 'New Presentation',\n}\n\n/** The next viewing document, given the current one (shared by every store implementation). */\nexport function nextViewingDocument(\n current: ArbiViewingDocument | null,\n input: ArbiViewingDocumentInput | null\n): ArbiViewingDocument | null {\n if (!input) return null\n const same = current?.id === input.id\n return {\n id: input.id,\n page: input.page !== undefined ? input.page : same ? (current?.page ?? null) : null,\n passageId: input.passageId !== undefined ? input.passageId : (current?.passageId ?? null),\n }\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value)\nconst isPage = (value: unknown): value is number =>\n typeof value === 'number' && Number.isInteger(value) && value >= 1\n\n/**\n * Read a saved place in the documents. Each field is checked on its own: an unreadable one keeps\n * its default. Null when there is nothing readable at all.\n */\nexport function parseSavedDocuments(saved: unknown): ArbiSavedDocuments | null {\n if (!isRecord(saved) || saved.version !== 1) return null\n const viewing = isRecord(saved.viewingDocument) ? saved.viewingDocument : null\n return {\n version: 1,\n viewingDocument:\n viewing && typeof viewing.id === 'string' && viewing.id\n ? { id: viewing.id, page: isPage(viewing.page) ? viewing.page : null }\n : null,\n pinnedDocumentId: typeof saved.pinnedDocumentId === 'string' ? saved.pinnedDocumentId : null,\n tab: VIEWER_TABS.includes(saved.tab as ArbiViewerTab)\n ? (saved.tab as ArbiViewerTab)\n : DEFAULT_DOCUMENT_VIEWER_STATE.tab,\n textScale:\n typeof saved.textScale === 'number' && Number.isFinite(saved.textScale) && saved.textScale > 0\n ? saved.textScale\n : DEFAULT_DOCUMENT_VIEWER_STATE.textScale,\n }\n}\n\n/** What of `state` is kept across reloads. */\nexport function savedDocumentsOf(state: ArbiDocumentSessionState): ArbiSavedDocuments {\n return {\n version: 1,\n viewingDocument: state.viewingDocument\n ? { id: state.viewingDocument.id, page: state.viewingDocument.page }\n : null,\n pinnedDocumentId: state.pinnedDocumentId,\n tab: state.documentViewer.tab,\n textScale: state.documentViewer.textScale,\n }\n}\n\n/** The state a saved place puts back (over `base`). */\nexport function restoreSavedDocuments(\n base: ArbiDocumentSessionState,\n saved: ArbiSavedDocuments\n): ArbiDocumentSessionState {\n return {\n ...base,\n viewingDocument: saved.viewingDocument\n ? { id: saved.viewingDocument.id, page: saved.viewingDocument.page, passageId: null }\n : null,\n pinnedDocumentId: saved.pinnedDocumentId,\n documentViewer: { ...base.documentViewer, tab: saved.tab, textScale: saved.textScale },\n }\n}\n\n/** The documents part, in memory (and, given a `persist`, kept across reloads). */\nexport function createArbiDocumentSessionStore({\n initial = {},\n persist,\n showViewer,\n}: ArbiDocumentSessionStoreOptions = {}): ArbiDocumentSessionStore {\n let state: ArbiDocumentSessionState = { ...EMPTY_DOCUMENT_STATE, ...initial }\n if (persist) {\n const saved = parseSavedDocuments(persist.load())\n if (saved) state = restoreSavedDocuments(state, saved)\n }\n const listeners = new Set<() => void>()\n const update = (patch: Partial<ArbiDocumentSessionState>) => {\n const previous = state\n state = { ...state, ...patch }\n if (\n persist &&\n (state.viewingDocument !== previous.viewingDocument ||\n state.pinnedDocumentId !== previous.pinnedDocumentId ||\n state.documentViewer.tab !== previous.documentViewer.tab ||\n state.documentViewer.textScale !== previous.documentViewer.textScale)\n )\n persist.save(savedDocumentsOf(state))\n listeners.forEach((listener) => listener())\n }\n const setDocumentViewer = (change: Partial<ArbiDocumentViewerState>) => {\n const next = { ...state.documentViewer, ...change }\n const keys = Object.keys(change) as (keyof ArbiDocumentViewerState)[]\n if (keys.some((key) => next[key] !== state.documentViewer[key]))\n update({ documentViewer: next })\n }\n const updateDraft = (id: string, change: (draft: ArbiDraftDocument) => ArbiDraftDocument) => {\n const draft = state.draftDocuments[id]\n if (draft) update({ draftDocuments: { ...state.draftDocuments, [id]: change(draft) } })\n }\n return {\n getState: () => state,\n subscribe: (listener) => {\n listeners.add(listener)\n return () => listeners.delete(listener)\n },\n setViewingDocument: (input) =>\n update({ viewingDocument: nextViewingDocument(state.viewingDocument, input) }),\n setDocumentViewer,\n setSelectedDocumentIds: (ids) => update({ selectedDocumentIds: ids }),\n setDocumentsToSelect: (ids) => update({ documentsToSelect: ids }),\n setPinnedDocumentId: (pinnedDocumentId) => update({ pinnedDocumentId }),\n setRelatedDocuments: (relatedDocuments) => update({ relatedDocuments }),\n setPassageCitation: (change) =>\n update({ passageCitation: { ...state.passageCitation, ...change } }),\n showNewDocument: (documentId, tab) => {\n update({\n viewingDocument: { id: documentId, page: null, passageId: null },\n documentViewer: tab ? { ...state.documentViewer, tab } : state.documentViewer,\n })\n showViewer?.()\n },\n startDraftDocument: (kind) => {\n const id = `draft-${crypto.randomUUID()}`\n const draft: ArbiDraftDocument = {\n id,\n title: DRAFT_TITLES[kind],\n kind,\n content: '',\n mediaBlob: null,\n createdAt: new Date().toISOString(),\n }\n update({\n draftDocuments: { ...state.draftDocuments, [id]: draft },\n viewingDocument: { id, page: null, passageId: null },\n // A text draft is written in the editor; a capture's recorder replaces the tabs.\n documentViewer:\n kind === 'text'\n ? { ...state.documentViewer, tab: 'edit' }\n : kind === 'presentation'\n ? { ...state.documentViewer, tab: 'slides' }\n : state.documentViewer,\n })\n showViewer?.()\n return id\n },\n updateDraftDocument: (id, change) => updateDraft(id, (draft) => ({ ...draft, ...change })),\n setDraftDocumentKind: (id, kind) =>\n updateDraft(id, (draft) => ({\n ...draft,\n kind,\n mediaBlob: null,\n title: Object.values(DRAFT_TITLES).includes(draft.title) ? DRAFT_TITLES[kind] : draft.title,\n })),\n clearDraftDocument: (id) => {\n if (!(id in state.draftDocuments)) return\n const rest = { ...state.draftDocuments }\n delete rest[id]\n update({ draftDocuments: rest })\n },\n leave: () =>\n update({\n viewingDocument: null,\n selectedDocumentIds: [],\n documentsToSelect: null,\n pinnedDocumentId: null,\n relatedDocuments: new Map(),\n passageCitation: NO_PASSAGE_CITATION,\n documentViewer: {\n ...state.documentViewer,\n compareId: null,\n tabRequest: null,\n commentTarget: null,\n unsavedChanges: false,\n detached: false,\n presenting: false,\n },\n }),\n reset: () =>\n update({\n ...EMPTY_DOCUMENT_STATE,\n relatedDocuments: new Map(),\n documentViewer: {\n ...DEFAULT_DOCUMENT_VIEWER_STATE,\n textScale: state.documentViewer.textScale,\n },\n }),\n }\n}\n"],
5
+ "mappings": "AA0CA,MAAM,cAAwC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAoKO,MAAM,gCAAyD;AAAA,EACpE,KAAK;AAAA,EACL,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,YAAY;AACd;AAEA,MAAM,sBAAgD;AAAA,EACpD,QAAQ;AAAA,EACR,aAAa,CAAC;AAAA,EACd,QA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jC;AAAA,IACA,OAAO,MACL,OAAO;AAAA,MACL,iBAAiB;AAAA,MACjB,qBAAqB,CAAC;AAAA,MACtB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,kBAAkB,oBAAI,IAAI;AAAA,MAC1B,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,QACd,GAAG,MAAM;AAAA,QACT,WAAW;AAAA,QACX,YAAY;AAAA,QACZ,eAAe;AAAA,QACf,gBAAgB;AAAA,QAChB,UAAU;AAAA,QACV,YAAY;AAAA,MACd;AAAA,IACF,CAAC;AAAA,IACH,OAAO,MACL,OAAO;AAAA,MACL,GAAG;AAAA,MACH,kBAAkB,oBAAI,IAAI;AAAA,MAC1B,gBAAgB;AAAA,QACd,GAAG;AAAA,QACH,WAAW,MAAM,eAAe;AAAA,MAClC;AAAA,IACF,CAAC;AAAA,EACL;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,156 +1,156 @@
1
1
  'use strict';
2
2
 
3
- var chunkC72FSQUE_cjs = require('../chunk-C72FSQUE.cjs');
3
+ var chunkZ3W4XFWB_cjs = require('../chunk-Z3W4XFWB.cjs');
4
4
  var chunkRLSBRZ6Z_cjs = require('../chunk-RLSBRZ6Z.cjs');
5
5
  require('../chunk-N73IMVFF.cjs');
6
6
  require('../chunk-NDIKMOBJ.cjs');
7
7
  require('../chunk-VOFNX4P6.cjs');
8
8
  require('../chunk-KC474WVG.cjs');
9
- var chunk5NOZDH3F_cjs = require('../chunk-5NOZDH3F.cjs');
10
9
  require('../chunk-HJDR5HEO.cjs');
10
+ var chunk5NOZDH3F_cjs = require('../chunk-5NOZDH3F.cjs');
11
11
  require('../chunk-S6A6FSG7.cjs');
12
12
 
13
13
 
14
14
 
15
15
  Object.defineProperty(exports, "ArbiHost", {
16
16
  enumerable: true,
17
- get: function () { return chunkC72FSQUE_cjs.ArbiHost; }
17
+ get: function () { return chunkZ3W4XFWB_cjs.ArbiHost; }
18
18
  });
19
19
  Object.defineProperty(exports, "DEFAULT_ASSISTANT_NAME", {
20
20
  enumerable: true,
21
- get: function () { return chunkC72FSQUE_cjs.DEFAULT_ASSISTANT_NAME; }
21
+ get: function () { return chunkZ3W4XFWB_cjs.DEFAULT_ASSISTANT_NAME; }
22
22
  });
23
23
  Object.defineProperty(exports, "LEGACY_THREAD_DOCUMENTS_KEY", {
24
24
  enumerable: true,
25
- get: function () { return chunkC72FSQUE_cjs.LEGACY_THREAD_DOCUMENTS_KEY; }
25
+ get: function () { return chunkZ3W4XFWB_cjs.LEGACY_THREAD_DOCUMENTS_KEY; }
26
26
  });
27
27
  Object.defineProperty(exports, "MENTION_HREF_PREFIX", {
28
28
  enumerable: true,
29
- get: function () { return chunkC72FSQUE_cjs.MENTION_HREF_PREFIX; }
29
+ get: function () { return chunkZ3W4XFWB_cjs.MENTION_HREF_PREFIX; }
30
30
  });
31
31
  Object.defineProperty(exports, "NotificationBell", {
32
32
  enumerable: true,
33
- get: function () { return chunkC72FSQUE_cjs.NotificationBell; }
33
+ get: function () { return chunkZ3W4XFWB_cjs.NotificationBell; }
34
34
  });
35
35
  Object.defineProperty(exports, "Toaster", {
36
36
  enumerable: true,
37
- get: function () { return chunkC72FSQUE_cjs.Toaster; }
37
+ get: function () { return chunkZ3W4XFWB_cjs.Toaster; }
38
38
  });
39
39
  Object.defineProperty(exports, "UNBOUND", {
40
40
  enumerable: true,
41
- get: function () { return chunkC72FSQUE_cjs.UNBOUND; }
41
+ get: function () { return chunkZ3W4XFWB_cjs.UNBOUND; }
42
42
  });
43
43
  Object.defineProperty(exports, "assistantCopy", {
44
44
  enumerable: true,
45
- get: function () { return chunkC72FSQUE_cjs.assistantCopy; }
45
+ get: function () { return chunkZ3W4XFWB_cjs.assistantCopy; }
46
46
  });
47
47
  Object.defineProperty(exports, "bindingOfRow", {
48
48
  enumerable: true,
49
- get: function () { return chunkC72FSQUE_cjs.bindingOfRow; }
49
+ get: function () { return chunkZ3W4XFWB_cjs.bindingOfRow; }
50
50
  });
51
51
  Object.defineProperty(exports, "clearSearchSession", {
52
52
  enumerable: true,
53
- get: function () { return chunkC72FSQUE_cjs.clearSearchSession; }
53
+ get: function () { return chunkZ3W4XFWB_cjs.clearSearchSession; }
54
54
  });
55
55
  Object.defineProperty(exports, "createSearchSession", {
56
56
  enumerable: true,
57
- get: function () { return chunkC72FSQUE_cjs.createSearchSession; }
57
+ get: function () { return chunkZ3W4XFWB_cjs.createSearchSession; }
58
58
  });
59
59
  Object.defineProperty(exports, "extractMentions", {
60
60
  enumerable: true,
61
- get: function () { return chunkC72FSQUE_cjs.extractMentions; }
61
+ get: function () { return chunkZ3W4XFWB_cjs.extractMentions; }
62
62
  });
63
63
  Object.defineProperty(exports, "filterMentionCandidates", {
64
64
  enumerable: true,
65
- get: function () { return chunkC72FSQUE_cjs.filterMentionCandidates; }
65
+ get: function () { return chunkZ3W4XFWB_cjs.filterMentionCandidates; }
66
66
  });
67
67
  Object.defineProperty(exports, "findMentionQuery", {
68
68
  enumerable: true,
69
- get: function () { return chunkC72FSQUE_cjs.findMentionQuery; }
69
+ get: function () { return chunkZ3W4XFWB_cjs.findMentionQuery; }
70
70
  });
71
71
  Object.defineProperty(exports, "forgetLegacyThreadDocuments", {
72
72
  enumerable: true,
73
- get: function () { return chunkC72FSQUE_cjs.forgetLegacyThreadDocuments; }
73
+ get: function () { return chunkZ3W4XFWB_cjs.forgetLegacyThreadDocuments; }
74
74
  });
75
75
  Object.defineProperty(exports, "hasMessageBody", {
76
76
  enumerable: true,
77
- get: function () { return chunkC72FSQUE_cjs.hasMessageBody; }
77
+ get: function () { return chunkZ3W4XFWB_cjs.hasMessageBody; }
78
78
  });
79
79
  Object.defineProperty(exports, "insertMention", {
80
80
  enumerable: true,
81
- get: function () { return chunkC72FSQUE_cjs.insertMention; }
81
+ get: function () { return chunkZ3W4XFWB_cjs.insertMention; }
82
82
  });
83
83
  Object.defineProperty(exports, "latestThreadOfDocument", {
84
84
  enumerable: true,
85
- get: function () { return chunkC72FSQUE_cjs.latestThreadOfDocument; }
85
+ get: function () { return chunkZ3W4XFWB_cjs.latestThreadOfDocument; }
86
86
  });
87
87
  Object.defineProperty(exports, "linkMentions", {
88
88
  enumerable: true,
89
- get: function () { return chunkC72FSQUE_cjs.linkMentions; }
89
+ get: function () { return chunkZ3W4XFWB_cjs.linkMentions; }
90
90
  });
91
91
  Object.defineProperty(exports, "mentionFromHref", {
92
92
  enumerable: true,
93
- get: function () { return chunkC72FSQUE_cjs.mentionFromHref; }
93
+ get: function () { return chunkZ3W4XFWB_cjs.mentionFromHref; }
94
94
  });
95
95
  Object.defineProperty(exports, "openDocumentId", {
96
96
  enumerable: true,
97
- get: function () { return chunkC72FSQUE_cjs.openDocumentId; }
97
+ get: function () { return chunkZ3W4XFWB_cjs.openDocumentId; }
98
98
  });
99
99
  Object.defineProperty(exports, "opensInWord", {
100
100
  enumerable: true,
101
- get: function () { return chunkC72FSQUE_cjs.opensInWord; }
101
+ get: function () { return chunkZ3W4XFWB_cjs.opensInWord; }
102
102
  });
103
103
  Object.defineProperty(exports, "persistSearchSession", {
104
104
  enumerable: true,
105
- get: function () { return chunkC72FSQUE_cjs.persistSearchSession; }
105
+ get: function () { return chunkZ3W4XFWB_cjs.persistSearchSession; }
106
106
  });
107
107
  Object.defineProperty(exports, "readLegacyThreadDocuments", {
108
108
  enumerable: true,
109
- get: function () { return chunkC72FSQUE_cjs.readLegacyThreadDocuments; }
109
+ get: function () { return chunkZ3W4XFWB_cjs.readLegacyThreadDocuments; }
110
110
  });
111
111
  Object.defineProperty(exports, "requestSearch", {
112
112
  enumerable: true,
113
- get: function () { return chunkC72FSQUE_cjs.requestSearch; }
113
+ get: function () { return chunkZ3W4XFWB_cjs.requestSearch; }
114
114
  });
115
115
  Object.defineProperty(exports, "savedDocumentIdFor", {
116
116
  enumerable: true,
117
- get: function () { return chunkC72FSQUE_cjs.savedDocumentIdFor; }
117
+ get: function () { return chunkZ3W4XFWB_cjs.savedDocumentIdFor; }
118
118
  });
119
119
  Object.defineProperty(exports, "sharedSearchSession", {
120
120
  enumerable: true,
121
- get: function () { return chunkC72FSQUE_cjs.sharedSearchSession; }
121
+ get: function () { return chunkZ3W4XFWB_cjs.sharedSearchSession; }
122
122
  });
123
123
  Object.defineProperty(exports, "takeDocumentForTurn", {
124
124
  enumerable: true,
125
- get: function () { return chunkC72FSQUE_cjs.takeDocumentForTurn; }
125
+ get: function () { return chunkZ3W4XFWB_cjs.takeDocumentForTurn; }
126
126
  });
127
127
  Object.defineProperty(exports, "takePendingSearch", {
128
128
  enumerable: true,
129
- get: function () { return chunkC72FSQUE_cjs.takePendingSearch; }
129
+ get: function () { return chunkZ3W4XFWB_cjs.takePendingSearch; }
130
130
  });
131
131
  Object.defineProperty(exports, "toMessageMentions", {
132
132
  enumerable: true,
133
- get: function () { return chunkC72FSQUE_cjs.toMessageMentions; }
133
+ get: function () { return chunkZ3W4XFWB_cjs.toMessageMentions; }
134
134
  });
135
135
  Object.defineProperty(exports, "useAssistantCopy", {
136
136
  enumerable: true,
137
- get: function () { return chunkC72FSQUE_cjs.useAssistantCopy; }
137
+ get: function () { return chunkZ3W4XFWB_cjs.useAssistantCopy; }
138
138
  });
139
139
  Object.defineProperty(exports, "useAssistantName", {
140
140
  enumerable: true,
141
- get: function () { return chunkC72FSQUE_cjs.useAssistantName; }
141
+ get: function () { return chunkZ3W4XFWB_cjs.useAssistantName; }
142
142
  });
143
143
  Object.defineProperty(exports, "useOpenDocumentId", {
144
144
  enumerable: true,
145
- get: function () { return chunkC72FSQUE_cjs.useOpenDocumentId; }
145
+ get: function () { return chunkZ3W4XFWB_cjs.useOpenDocumentId; }
146
146
  });
147
147
  Object.defineProperty(exports, "useRegisterOpenDocument", {
148
148
  enumerable: true,
149
- get: function () { return chunkC72FSQUE_cjs.useRegisterOpenDocument; }
149
+ get: function () { return chunkZ3W4XFWB_cjs.useRegisterOpenDocument; }
150
150
  });
151
151
  Object.defineProperty(exports, "useTurnDocumentId", {
152
152
  enumerable: true,
153
- get: function () { return chunkC72FSQUE_cjs.useTurnDocumentId; }
153
+ get: function () { return chunkZ3W4XFWB_cjs.useTurnDocumentId; }
154
154
  });
155
155
  Object.defineProperty(exports, "clearChatArtifacts", {
156
156
  enumerable: true,