@arbidocs/react 0.4.156 → 0.4.157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- import { downloadBlob, fetchDocumentFile } from './chunk-2HNEVAXO.js';
2
1
  import { arbiMutationKeys, replayableTagMutations, patchDocuments, setCachedDocument, adjustTagCounts, arbiQueryKeys, patchCachedDocument, useDocuments, useConversations, useAssistantQuery, useConversationThreads, refreshDocuments, FINISHED_DOCUMENT_STATUSES, useWorkspaces, forgetDocuments, getCachedDocuments, useActivity, useTags, useThumbnails, useParsedDocument } from './chunk-HKIR456G.js';
3
2
  export { DOCUMENTS_FIRST_PAGE_MEASURE, DOCUMENTS_FIRST_PAGE_SIZE, DOCUMENTS_PAGE_SIZE, FINISHED_DOCUMENT_STATUSES, PROJECT_CREATION_DENIED_REASON, SIMILARITY_THRESHOLD, adjustTagCounts, arbiMutationKeys, arbiQueryKeys, forgetDocuments, getCachedDocuments, invalidateTagData, invalidateTagTables, isDocumentsLoading, isUsageMetered, patchCachedDocument, patchDocuments, patchWorkspaceTags, refreshDocuments, setCachedDocument, stopDocumentsLoading, subscribeDocumentRows, upsertDocuments, useActivity, useAgents, useAssistantQuery, useAvailableModels, useCanCreateProjects, useConfigs, useConversationThreads, useConversations, useCreateTag, useCurrentUser, useDeleteAgents, useDeleteTag, useDocument, useDocumentVersionList, useDocuments, useDocumentsById, useDocumentsLoading, useExtractEntities, useFirmPool, useHealth, useInvalidateTagData, useParsedDocument, useProjectInvoices, useProjectUsage, useProjects, useProjectsUsage, useSetTagValues, useSimilarDocuments, useTagKindSchema, useTags, useThumbnails, useTopUpFirmPool, useUpdateTag, useUpdateTagKindSchema, useUserUsageToday, useWorkspaceActivity, useWorkspaces } from './chunk-HKIR456G.js';
3
+ import { downloadBlob, fetchDocumentFile } from './chunk-2HNEVAXO.js';
4
4
  import { parseVersionRef } from './chunk-NNWMHMEC.js';
5
5
  export { cleanDraftMarkdown, cleanDraftWithReport, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks } from './chunk-NNWMHMEC.js';
6
6
  import './chunk-WUTL62MC.js';
7
7
  import { createSearchSession, clearSearchSession, formatRelativeTime, notify } from './chunk-3XYIQZTH.js';
8
8
  export { DEFAULT_NOTIFY_TONE, MAX_SESSION_NOTIFICATIONS, NotificationBell, Toaster, clearSearchSession, configureNotify, createSearchSession, formatRelativeTime, notify, persistNotifyHistory, persistSearchSession, requestSearch, seedNotifications, selectUnread, sharedSearchSession, takePendingSearch, toast, useNotify } from './chunk-3XYIQZTH.js';
9
- import { returnFocusToMark, MarkMenu, AiMarkdown, Card, Badge, Input, FILE_TYPE_COLORS, getEntityIcon, UserEntity, getEntityColorStyles, AgentBadge, Textarea, Label, Slider, getDocumentTitle, DocumentEntity, TagEntity, DocumentCard, useAudioRecorder, MicWaveformIndicator, IconToggle, classifyMediaError, formatElapsed } from './chunk-6FGO7SCY.js';
10
- export { AUDIO_MIME_PREFERENCE, AgentBadge, AiMarkdown, ArbiBotHeadIcon, ArbiIcon, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_SEGMENTER_CONFIG, DebouncedInput, DictateProvider, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, INITIAL_SEGMENTER_STATE, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShieldIcon, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, ThreadVisibilityIcon, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, UserEntity, UserMenu, VIDEO_MIME_PREFERENCE, VISIBILITY_ICONS, VerifiedBadge, VerifiedToggle, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, agentAvatarColors, badgeVariants, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, createChunkedRecorder, createUserAvatarIcon, extensionFromMime, flushSegmenter, formatElapsed, formatFriendlyDate, friendlyFileType, getDocIcon, getDocumentTitle, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getFileExtension, getFileTypeIcon, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getUserAvatarColor, getUserDisplayName, getUserInitials, getWorkspaceColor, isAgent, isAudioFile, isDownloadOnlyFile, isImageDocument, isImageFile, isMediaFile, isVideoFile, levelFromRms, pickRecorderMimeType, stepSegmenter, tagKindNouns, tagKindTitle, toggleVariants, useAudioRecorder, useDictateContext, usesOriginalBytesForViewer } from './chunk-6FGO7SCY.js';
11
- import { Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-YNNAJJ5Z.js';
12
- export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from './chunk-YNNAJJ5Z.js';
9
+ import { returnFocusToMark, MarkMenu, AiMarkdown, Card, Badge, Input, FILE_TYPE_COLORS, getEntityIcon, UserEntity, getEntityColorStyles, AgentBadge, Textarea, Label, Slider, getDocumentTitle, DocumentEntity, TagEntity, DocumentCard, useAudioRecorder, MicWaveformIndicator, IconToggle, classifyMediaError, formatElapsed } from './chunk-CNGWJDMG.js';
10
+ export { AUDIO_MIME_PREFERENCE, AgentBadge, AiMarkdown, ArbiBotHeadIcon, ArbiIcon, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_SEGMENTER_CONFIG, DebouncedInput, DictateProvider, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, INITIAL_SEGMENTER_STATE, IconToggle, ImgIcon, InlineMicButton, Input, Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, ShieldIcon, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, ThreadVisibilityIcon, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, UserEntity, UserMenu, VIDEO_MIME_PREFERENCE, VISIBILITY_ICONS, VerifiedBadge, VerifiedToggle, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, agentAvatarColors, badgeVariants, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, createChunkedRecorder, createUserAvatarIcon, extensionFromMime, flushSegmenter, formatElapsed, formatFriendlyDate, friendlyFileType, getDocIcon, getDocumentTitle, getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getFileExtension, getFileTypeIcon, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getUserAvatarColor, getUserDisplayName, getUserInitials, getWorkspaceColor, isAgent, isAudioFile, isDownloadOnlyFile, isImageDocument, isImageFile, isMediaFile, isVideoFile, levelFromRms, pickRecorderMimeType, stepSegmenter, tagKindNouns, tagKindTitle, toggleVariants, useAudioRecorder, useDictateContext, usesOriginalBytesForViewer } from './chunk-CNGWJDMG.js';
13
11
  import { MarkdownRenderer } from './chunk-C44GO33B.js';
14
12
  export { MarkdownCode, MarkdownLink, MarkdownRenderer, MarkdownStreamingContext, markdownBaseComponents, markdownSanitizeSchema, splitMarkdownBlocks } from './chunk-C44GO33B.js';
13
+ import { Button, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from './chunk-YNNAJJ5Z.js';
14
+ export { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, buttonVariants } from './chunk-YNNAJJ5Z.js';
15
15
  import { normalizeCitationMarkup } from './chunk-QRCMKEE6.js';
16
16
  export { closeOpenEmphasis, normalizeCitationMarkup, trimOpenCitation } from './chunk-QRCMKEE6.js';
17
17
  import { ScrollArea } from './chunk-W4H6XAIU.js';
@@ -690,7 +690,7 @@ function useArbiChat(options = {}) {
690
690
  () => (agentId ? [] : docs).map((d) => d.external_id).filter((id) => !!id && !deselected.has(id)),
691
691
  [docs, deselected, agentId]
692
692
  );
693
- const documents = useMemo(
693
+ const documents2 = useMemo(
694
694
  () => agentId ? stagedFiles.map((file) => ({ ...file, isSelected: !deselected.has(file.id) })) : docs.filter((d) => !!d.external_id).map((d) => ({
695
695
  id: d.external_id,
696
696
  name: d.file_name ?? d.external_id,
@@ -1133,7 +1133,7 @@ function useArbiChat(options = {}) {
1133
1133
  isLoadingThread: needsLoad && !historyError,
1134
1134
  isLoadingThreads,
1135
1135
  historyError,
1136
- documents,
1136
+ documents: documents2,
1137
1137
  isLoadingDocuments,
1138
1138
  isUploading,
1139
1139
  uploadError,
@@ -1888,8 +1888,8 @@ function useUpdateDocuments() {
1888
1888
  return resolvingOffline(
1889
1889
  useMutation({
1890
1890
  mutationKey: arbiMutationKeys.updateDocuments(),
1891
- mutationFn: ({ documents }) => arbi.documents.update(documents),
1892
- onMutate: ({ documents }) => onlineManager.isOnline() || !documents.length ? void 0 : applyOptimisticDocumentEdit(qc, documents),
1891
+ mutationFn: ({ documents: documents2 }) => arbi.documents.update(documents2),
1892
+ onMutate: ({ documents: documents2 }) => onlineManager.isOnline() || !documents2.length ? void 0 : applyOptimisticDocumentEdit(qc, documents2),
1893
1893
  onError: (_error, _input, context) => rollbackOptimisticDocumentEdit(qc, context),
1894
1894
  onSuccess: (updated) => settleUpdatedDocuments(qc, updated)
1895
1895
  })
@@ -1902,7 +1902,7 @@ function useRenameFolder() {
1902
1902
  const qc = useQueryClient();
1903
1903
  const { mutateAsync } = useUpdateDocuments();
1904
1904
  return useCallback(
1905
- async (documents, from, to) => {
1905
+ async (documents2, from, to) => {
1906
1906
  const moved = (folder) => {
1907
1907
  const segments = folderSegments(folder);
1908
1908
  if (from.length === 0 || segments.length < from.length) return void 0;
@@ -1910,7 +1910,7 @@ function useRenameFolder() {
1910
1910
  const next = [...to, ...segments.slice(from.length)];
1911
1911
  return next.length > 0 ? next.join("/") : null;
1912
1912
  };
1913
- const updates = documents.flatMap((doc) => {
1913
+ const updates = documents2.flatMap((doc) => {
1914
1914
  const folder = moved(doc.folder);
1915
1915
  return folder === void 0 ? [] : [{ external_id: doc.external_id, folder }];
1916
1916
  });
@@ -3322,21 +3322,21 @@ var MailOfflineUnavailableError = class extends Error {
3322
3322
  function accountPath(id) {
3323
3323
  return `/accounts/${encodeURIComponent(id)}`;
3324
3324
  }
3325
- async function mailJson(fetch, path, init) {
3326
- const response = await fetch(path, init);
3325
+ async function mailJson(fetch2, path, init) {
3326
+ const response = await fetch2(path, init);
3327
3327
  return response.status === 204 ? void 0 : response.json();
3328
3328
  }
3329
- function createMailClient(fetch, overrides = {}) {
3329
+ function createMailClient(fetch2, overrides = {}) {
3330
3330
  return {
3331
- fetch,
3332
- getPolicy: () => mailJson(fetch, "/policy"),
3333
- listAccounts: () => mailJson(fetch, "/accounts"),
3334
- listFolders: (account) => mailJson(fetch, `${accountPath(account.id)}/folders`),
3331
+ fetch: fetch2,
3332
+ getPolicy: () => mailJson(fetch2, "/policy"),
3333
+ listAccounts: () => mailJson(fetch2, "/accounts"),
3334
+ listFolders: (account) => mailJson(fetch2, `${accountPath(account.id)}/folders`),
3335
3335
  listMessages: (account, folderId, query, cursor) => mailJson(
3336
- fetch,
3336
+ fetch2,
3337
3337
  `${accountPath(account.id)}/messages?${new URLSearchParams({ folder_id: folderId, q: query, ...cursor ? { cursor } : {} })}`
3338
3338
  ),
3339
- getMessage: (account, messageId) => mailJson(fetch, `${accountPath(account.id)}/messages/${encodeURIComponent(messageId)}`),
3339
+ getMessage: (account, messageId) => mailJson(fetch2, `${accountPath(account.id)}/messages/${encodeURIComponent(messageId)}`),
3340
3340
  unlock: async () => {
3341
3341
  },
3342
3342
  ...overrides
@@ -3350,12 +3350,12 @@ function arbiMailClient(arbi) {
3350
3350
  });
3351
3351
  return unlocking;
3352
3352
  };
3353
- const fetch = async (path, init = {}) => {
3353
+ const fetch2 = async (path, init = {}) => {
3354
3354
  if (path.startsWith("/accounts/native/") && (init.method ?? "GET") !== "POST")
3355
3355
  await unlockNative();
3356
3356
  return arbi.mail.fetch(path, init);
3357
3357
  };
3358
- return createMailClient(fetch, {
3358
+ return createMailClient(fetch2, {
3359
3359
  unlock: async (account) => {
3360
3360
  if (account.provider === "native") await unlockNative();
3361
3361
  }
@@ -4052,7 +4052,7 @@ function invalidateCalendars(qc) {
4052
4052
  function useOfflineRead() {
4053
4053
  const { offline } = useCalendarSupport();
4054
4054
  return {
4055
- read: (key, fetch) => offline ? offline.read(key, fetch) : fetch(),
4055
+ read: (key, fetch2) => offline ? offline.read(key, fetch2) : fetch2(),
4056
4056
  // Offline-capable queries must run without the network to reach the saved copy.
4057
4057
  networkMode: offline ? "always" : void 0
4058
4058
  };
@@ -8020,9 +8020,9 @@ var COLUMN_MAPPING = {
8020
8020
  file_size: { header: "File Size", getValue: (d) => d.file_size || "" },
8021
8021
  shared: { header: "Shared", getValue: (d) => d.shared ? "Yes" : "No" }
8022
8022
  };
8023
- function buildDocumentMetadataRows(documents, selectedColumns) {
8023
+ function buildDocumentMetadataRows(documents2, selectedColumns) {
8024
8024
  const columns = selectedColumns || Object.keys(COLUMN_MAPPING);
8025
- return documents.map((doc) => {
8025
+ return documents2.map((doc) => {
8026
8026
  const row = {};
8027
8027
  for (const colId of columns) {
8028
8028
  const standard = COLUMN_MAPPING[colId];
@@ -8054,9 +8054,9 @@ function useDownloadDocuments({ workspaceName } = {}) {
8054
8054
  );
8055
8055
  const downloadDocuments = useCallback(
8056
8056
  // selectedColumns: undefined = all default columns; [] = files only (no index.csv)
8057
- async (documents, selectedColumns) => {
8057
+ async (documents2, selectedColumns) => {
8058
8058
  const includeMetadataCsv = selectedColumns === void 0 || selectedColumns.length > 0;
8059
- if (documents.length === 0) {
8059
+ if (documents2.length === 0) {
8060
8060
  notify.error("No documents to download");
8061
8061
  return;
8062
8062
  }
@@ -8066,7 +8066,7 @@ function useDownloadDocuments({ workspaceName } = {}) {
8066
8066
  const zip = new JSZip();
8067
8067
  const downloaded = [];
8068
8068
  const failedDocs = [];
8069
- for (const doc of documents) {
8069
+ for (const doc of documents2) {
8070
8070
  try {
8071
8071
  const file = await fetchNamedFile(doc);
8072
8072
  zip.file(file.name, file.blob);
@@ -8257,8 +8257,8 @@ function createArbiSessionStore(initial = {}) {
8257
8257
  setPaMode: (paMode) => {
8258
8258
  if (state.paMode !== paMode) update({ paMode });
8259
8259
  },
8260
- setConversationDocuments: (conversationId, documents) => update({
8261
- conversationDocuments: { ...state.conversationDocuments, [conversationId]: documents }
8260
+ setConversationDocuments: (conversationId, documents2) => update({
8261
+ conversationDocuments: { ...state.conversationDocuments, [conversationId]: documents2 }
8262
8262
  })
8263
8263
  };
8264
8264
  }
@@ -8305,7 +8305,7 @@ var STATUS_VARIANTS = {
8305
8305
  };
8306
8306
  function DocumentTable({
8307
8307
  workspaceId,
8308
- documents,
8308
+ documents: documents2,
8309
8309
  onOpenDocument,
8310
8310
  openOnRowClick = true,
8311
8311
  selectedIds,
@@ -8314,9 +8314,9 @@ function DocumentTable({
8314
8314
  extraColumns,
8315
8315
  className
8316
8316
  }) {
8317
- const query = useDocuments(workspaceId, { enabled: !documents });
8318
- const rows = documents ?? query.data ?? [];
8319
- const isLoading = !documents && query.isLoading;
8317
+ const query = useDocuments(workspaceId, { enabled: !documents2 });
8318
+ const rows = documents2 ?? query.data ?? [];
8319
+ const isLoading = !documents2 && query.isLoading;
8320
8320
  const tagsQuery = useTags(workspaceId);
8321
8321
  const tagNameById = React3.useMemo(() => {
8322
8322
  const map = /* @__PURE__ */ new Map();
@@ -8580,16 +8580,16 @@ function TileTooltip({ title, labels }) {
8580
8580
  }
8581
8581
  function DocumentGallery({
8582
8582
  workspaceId,
8583
- documents,
8583
+ documents: documents2,
8584
8584
  onOpenDocument,
8585
8585
  selectedIds,
8586
8586
  onSelectionChange,
8587
8587
  minTileWidth = 148,
8588
8588
  className
8589
8589
  }) {
8590
- const query = useDocuments(workspaceId, { enabled: !documents });
8591
- const rows = documents ?? query.data ?? [];
8592
- const isLoading = !documents && query.isLoading;
8590
+ const query = useDocuments(workspaceId, { enabled: !documents2 });
8591
+ const rows = documents2 ?? query.data ?? [];
8592
+ const isLoading = !documents2 && query.isLoading;
8593
8593
  const tagsQuery = useTags(workspaceId);
8594
8594
  const tagNameById = React3.useMemo(() => {
8595
8595
  const map = /* @__PURE__ */ new Map();
@@ -9426,7 +9426,340 @@ function hasVideoTrack(blob) {
9426
9426
  video.src = url;
9427
9427
  });
9428
9428
  }
9429
+ var { SUPPORTED_EXTENSIONS, mimeFromName, sanitizeFolderPath } = documents;
9430
+ var UPLOAD_ACCEPT = ".pdf,.txt,.md,.html,.doc,.docx,.rtf,.ppt,.pptx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.bmp,.tiff,.tif,.webp,.mp4,.mpeg,.mpg,.webm,.mov,.avi,.mkv,.mp3,.wav,.m4a,.aac,.ogg,.flac,.eml,.msg,.mbox,.pst,.ost,.zip,application/pdf,text/plain,text/markdown,text/html,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/rtf,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,image/jpeg,image/png,image/gif,image/bmp,image/tiff,image/webp,video/mp4,video/mpeg,video/webm,video/quicktime,video/x-msvideo,video/x-matroska,audio/mpeg,audio/wav,audio/mp4,audio/aac,audio/ogg,audio/flac,message/rfc822,application/vnd.ms-outlook,application/mbox,application/zip,application/x-zip-compressed";
9431
+ var UPLOAD_MAX_FILE_SIZE = 2 * 1024 * 1024 * 1024;
9432
+ var SUPPORTED_TYPES = /* @__PURE__ */ new Set([
9433
+ "application/pdf",
9434
+ "text/plain",
9435
+ "text/markdown",
9436
+ "text/html",
9437
+ "application/msword",
9438
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
9439
+ "application/rtf",
9440
+ "application/vnd.ms-powerpoint",
9441
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
9442
+ "application/vnd.ms-excel",
9443
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
9444
+ "image/jpeg",
9445
+ "image/png",
9446
+ "image/gif",
9447
+ "image/bmp",
9448
+ "image/tiff",
9449
+ "image/webp",
9450
+ "video/mp4",
9451
+ "video/mpeg",
9452
+ "video/webm",
9453
+ "video/quicktime",
9454
+ "video/x-msvideo",
9455
+ "video/x-matroska",
9456
+ "audio/mpeg",
9457
+ "audio/wav",
9458
+ "audio/mp4",
9459
+ "audio/aac",
9460
+ "audio/ogg",
9461
+ "audio/flac",
9462
+ "message/rfc822",
9463
+ "application/vnd.ms-outlook",
9464
+ "application/mbox"
9465
+ ]);
9466
+ function extensionOf(name) {
9467
+ const dot = name.lastIndexOf(".");
9468
+ return dot === -1 ? "" : name.slice(dot).toLowerCase();
9469
+ }
9470
+ function withRelativePath(file, relativePath) {
9471
+ const copy = new File([file], file.name, { type: file.type, lastModified: file.lastModified });
9472
+ Object.defineProperty(copy, "webkitRelativePath", { value: relativePath, writable: false });
9473
+ return copy;
9474
+ }
9475
+ function isZipFile(file) {
9476
+ return file.name.toLowerCase().endsWith(".zip") || file.type === "application/zip" || file.type === "application/x-zip-compressed";
9477
+ }
9478
+ var extractZipFile = async (zip, maxFileSize) => {
9479
+ const { unzip } = await import('unzipit');
9480
+ const { entries } = await unzip(await zip.arrayBuffer());
9481
+ const names = Object.keys(entries).filter((name) => !entries[name].isDirectory);
9482
+ const roots = new Set(names.map((name) => name.split("/")[0]));
9483
+ const hasSingleRoot = roots.size === 1 && names.every((name) => name.includes("/"));
9484
+ const base = zip.name.replace(/\.zip$/i, "");
9485
+ const extractedFiles = [];
9486
+ const skippedLargeFiles = [];
9487
+ for (const name of names) {
9488
+ const entry = entries[name];
9489
+ if (!SUPPORTED_EXTENSIONS.has(extensionOf(name))) continue;
9490
+ const fileName = name.split("/").pop() ?? name;
9491
+ if (entry.size > maxFileSize) {
9492
+ skippedLargeFiles.push(fileName);
9493
+ continue;
9494
+ }
9495
+ const file = new File([await entry.arrayBuffer()], fileName, {
9496
+ type: mimeFromName(fileName) ?? "application/octet-stream",
9497
+ lastModified: entry.lastModDate?.getTime() ?? Date.now()
9498
+ });
9499
+ extractedFiles.push(withRelativePath(file, hasSingleRoot ? name : `${base}/${name}`));
9500
+ }
9501
+ return { extractedFiles, skippedLargeFiles };
9502
+ };
9503
+ async function prepareUploadFiles(chosen, options = {}) {
9504
+ const maxFileSize = options.maxFileSize ?? UPLOAD_MAX_FILE_SIZE;
9505
+ const extractZip = options.extractZip ?? extractZipFile;
9506
+ const accepted = [];
9507
+ const refused = [];
9508
+ const zips = [];
9509
+ for (const file of Array.from(chosen)) {
9510
+ if (isZipFile(file)) {
9511
+ zips.push(file);
9512
+ continue;
9513
+ }
9514
+ const extension = extensionOf(file.name);
9515
+ if (file.size === 0) refused.push({ name: file.name, reason: "empty" });
9516
+ else if (file.size > maxFileSize) refused.push({ name: file.name, reason: "too_large" });
9517
+ else if (!extension) refused.push({ name: file.name, reason: "no_extension" });
9518
+ else if (!SUPPORTED_TYPES.has(file.type) && !SUPPORTED_EXTENSIONS.has(extension))
9519
+ refused.push({ name: file.name, reason: "unsupported" });
9520
+ else accepted.push(file);
9521
+ }
9522
+ for (const zip of zips) {
9523
+ try {
9524
+ const { extractedFiles, skippedLargeFiles } = await extractZip(zip, maxFileSize);
9525
+ for (const name of skippedLargeFiles)
9526
+ refused.push({ name: `${name} (from ${zip.name})`, reason: "too_large" });
9527
+ if (extractedFiles.length === 0 && skippedLargeFiles.length === 0)
9528
+ refused.push({ name: zip.name, reason: "empty_zip" });
9529
+ accepted.push(...extractedFiles);
9530
+ } catch {
9531
+ refused.push({ name: zip.name, reason: "zip_error" });
9532
+ }
9533
+ }
9534
+ accepted.sort(
9535
+ (a, b) => (a.webkitRelativePath || a.name).toLowerCase().localeCompare((b.webkitRelativePath || b.name).toLowerCase())
9536
+ );
9537
+ return { accepted, refused };
9538
+ }
9539
+ function readDirectory(directory, path, into) {
9540
+ return new Promise((resolve) => {
9541
+ const reader = directory.createReader();
9542
+ const readBatch = () => reader.readEntries(async (entries) => {
9543
+ if (entries.length === 0) return resolve();
9544
+ await Promise.all(
9545
+ entries.map(
9546
+ (entry) => entry.isFile ? new Promise(
9547
+ (done) => entry.file(
9548
+ (file) => {
9549
+ into.push(withRelativePath(file, `${path}/${file.name}`));
9550
+ done();
9551
+ },
9552
+ () => done()
9553
+ )
9554
+ ) : entry.isDirectory ? readDirectory(entry, `${path}/${entry.name}`, into) : Promise.resolve()
9555
+ )
9556
+ );
9557
+ readBatch();
9558
+ });
9559
+ readBatch();
9560
+ });
9561
+ }
9562
+ async function filesFromDrop(transfer) {
9563
+ const items = Array.from(transfer.items ?? []);
9564
+ if (items.length === 0) return Array.from(transfer.files ?? []);
9565
+ const files = [];
9566
+ const folders = [];
9567
+ for (const item of items) {
9568
+ if (item.kind !== "file") continue;
9569
+ const entry = item.webkitGetAsEntry?.();
9570
+ if (entry?.isDirectory) {
9571
+ folders.push(readDirectory(entry, entry.name, files));
9572
+ } else {
9573
+ const file = item.getAsFile();
9574
+ if (file) files.push(file);
9575
+ }
9576
+ }
9577
+ await Promise.all(folders);
9578
+ return files;
9579
+ }
9580
+ function uploadFolderOf(file, base) {
9581
+ const relative = file.webkitRelativePath;
9582
+ const slash = relative ? relative.lastIndexOf("/") : -1;
9583
+ const own = slash > 0 ? relative.slice(0, slash) : "";
9584
+ return sanitizeFolderPath([base, own].filter(Boolean).join("/")) || null;
9585
+ }
9586
+ var { uploadDocumentsDirect, mimeFromName: mimeFromName2 } = documents;
9587
+ var BATCH_SIZE2 = 100;
9588
+ var CONCURRENT_BATCHES = 4;
9589
+ var uploadedFolders = /* @__PURE__ */ new Map();
9590
+ function uploadedDocumentFolder(workspaceId, docId) {
9591
+ const pending = uploadedFolders.get(docId);
9592
+ return pending?.workspaceId === workspaceId ? pending.folder : void 0;
9593
+ }
9594
+ function forgetUploadedDocumentFolder(docId) {
9595
+ uploadedFolders.delete(docId);
9596
+ }
9597
+ async function runLimited(tasks, limit) {
9598
+ const results = new Array(tasks.length);
9599
+ let next = 0;
9600
+ const worker = async () => {
9601
+ while (next < tasks.length) {
9602
+ const index = next++;
9603
+ results[index] = await tasks[index]();
9604
+ }
9605
+ };
9606
+ await Promise.all(Array.from({ length: Math.min(limit, tasks.length) }, worker));
9607
+ return results;
9608
+ }
9609
+ function useUploadFiles() {
9610
+ const arbi = useArbi();
9611
+ const qc = useQueryClient();
9612
+ const { resolveWorkspaceKey, processingStatus } = useDocumentsSupport();
9613
+ const { data: settings } = useUserSettings();
9614
+ const { mutateAsync: generateDocTags } = useGenerateDocTags();
9615
+ const direct = settings?.use_s3_direct_upload === true;
9616
+ return useCallback(
9617
+ async (input, onProgress) => {
9618
+ const workspaceId = arbi.getWorkspaceId();
9619
+ const groups = /* @__PURE__ */ new Map();
9620
+ for (const file of input.files) {
9621
+ const folder = uploadFolderOf(file, input.folder);
9622
+ groups.set(folder, [...groups.get(folder) ?? [], file]);
9623
+ }
9624
+ const batches = [];
9625
+ for (const [folder, files] of groups)
9626
+ for (let i = 0; i < files.length; i += BATCH_SIZE2)
9627
+ batches.push({ folder, files: files.slice(i, i + BATCH_SIZE2) });
9628
+ let workspaceKey = null;
9629
+ if (direct && resolveWorkspaceKey) {
9630
+ try {
9631
+ workspaceKey = await resolveWorkspaceKey(workspaceId);
9632
+ } catch {
9633
+ workspaceKey = null;
9634
+ }
9635
+ }
9636
+ const total = input.files.reduce((sum, file) => sum + file.size, 0);
9637
+ const loadedByBatch = new Array(batches.length).fill(0);
9638
+ let done = 0;
9639
+ const report = () => {
9640
+ const loaded = loadedByBatch.reduce((sum, bytes) => sum + bytes, 0);
9641
+ onProgress?.({
9642
+ loaded,
9643
+ total,
9644
+ percentage: total > 0 ? Math.min(Math.round(loaded / total * 100), 100) : 0,
9645
+ batches: batches.length > 1 ? { current: done, total: batches.length } : null
9646
+ });
9647
+ };
9648
+ report();
9649
+ const results = await runLimited(
9650
+ batches.map(({ folder, files }, index) => async () => {
9651
+ const bytes = files.reduce((sum, file) => sum + file.size, 0);
9652
+ const result = workspaceKey ? await uploadDocumentsDirect(
9653
+ arbi.getClient(),
9654
+ workspaceKey,
9655
+ await Promise.all(
9656
+ files.map(async (file) => ({
9657
+ name: file.name,
9658
+ data: new Uint8Array(await file.arrayBuffer()),
9659
+ contentType: file.type || mimeFromName2(file.name)
9660
+ }))
9661
+ ),
9662
+ {
9663
+ shared: input.shared,
9664
+ folder: folder ?? void 0,
9665
+ configExtId: input.configExtId ?? void 0,
9666
+ // Ciphertext bytes, scaled back to the files' own so the total stays true.
9667
+ onBytesProgress: ({ loaded, total: sent }) => {
9668
+ loadedByBatch[index] = sent > 0 ? Math.round(loaded / sent * bytes) : 0;
9669
+ report();
9670
+ }
9671
+ }
9672
+ ) : await arbi.documents.upload(files, {
9673
+ shared: input.shared,
9674
+ folder: folder ?? void 0,
9675
+ configExtId: input.configExtId ?? void 0,
9676
+ onProgress: (loaded) => {
9677
+ loadedByBatch[index] = Math.min(loaded, bytes);
9678
+ report();
9679
+ }
9680
+ });
9681
+ const docIds2 = result.doc_ext_ids ?? [];
9682
+ if (docIds2.length > 0) {
9683
+ for (const docId of docIds2) uploadedFolders.set(docId, { workspaceId, folder });
9684
+ const made = new Set(docIds2);
9685
+ patchDocuments(
9686
+ qc,
9687
+ (rows) => rows.map((doc) => made.has(doc.external_id) ? { ...doc, folder } : doc),
9688
+ workspaceId
9689
+ );
9690
+ }
9691
+ loadedByBatch[index] = bytes;
9692
+ done += 1;
9693
+ report();
9694
+ return result;
9695
+ }),
9696
+ CONCURRENT_BATCHES
9697
+ );
9698
+ const docIds = results.flatMap((result) => result.doc_ext_ids ?? []);
9699
+ const skipped = results.flatMap((result) => result.skipped ?? []);
9700
+ if (docIds.length > 0) {
9701
+ const read = await refreshDocuments(qc, arbi, docIds, { processingStatus });
9702
+ for (const doc of read) forgetUploadedDocumentFolder(doc.external_id);
9703
+ }
9704
+ await qc.invalidateQueries({ queryKey: arbiQueryKeys.workspaces() });
9705
+ if (docIds.length > 0 && input.generateTagIds?.length) {
9706
+ await generateDocTags({ tagIds: input.generateTagIds, docIds, overwrite: false }).catch(
9707
+ () => void 0
9708
+ );
9709
+ }
9710
+ return { docIds, skipped };
9711
+ },
9712
+ [arbi, qc, direct, resolveWorkspaceKey, processingStatus, generateDocTags]
9713
+ );
9714
+ }
9715
+ function isZipUrl(url) {
9716
+ try {
9717
+ return new URL(url).pathname.toLowerCase().endsWith(".zip");
9718
+ } catch {
9719
+ return url.toLowerCase().endsWith(".zip");
9720
+ }
9721
+ }
9722
+ function useUploadFromUrls() {
9723
+ const { mutateAsync: uploadUrls } = useUploadUrls();
9724
+ const { extractZip = extractZipFile } = useDocumentsSupport();
9725
+ return useCallback(
9726
+ async ({ urls, shared, configExtId }) => {
9727
+ const zipUrls = urls.filter(isZipUrl);
9728
+ const others = urls.filter((url) => !isZipUrl(url));
9729
+ const zipFiles = [];
9730
+ const oversizedInZips = [];
9731
+ const failedZipUrls = [];
9732
+ await Promise.all(
9733
+ zipUrls.map(async (url) => {
9734
+ try {
9735
+ const response = await fetch(url);
9736
+ if (!response.ok) throw new Error(`HTTP ${response.status}`);
9737
+ const name = decodeURIComponent(new URL(url).pathname.split("/").pop() || "") || "archive.zip";
9738
+ const zip = new File([await response.blob()], name, { type: "application/zip" });
9739
+ const { extractedFiles, skippedLargeFiles } = await extractZip(
9740
+ zip,
9741
+ UPLOAD_MAX_FILE_SIZE
9742
+ );
9743
+ zipFiles.push(...extractedFiles);
9744
+ oversizedInZips.push(...skippedLargeFiles);
9745
+ } catch {
9746
+ failedZipUrls.push(url);
9747
+ }
9748
+ })
9749
+ );
9750
+ const result = others.length ? await uploadUrls({ urls: others, shared, configExtId }) : {};
9751
+ return {
9752
+ docIds: result.doc_ext_ids ?? [],
9753
+ skipped: result.skipped ?? [],
9754
+ zipFiles,
9755
+ oversizedInZips,
9756
+ failedZipUrls
9757
+ };
9758
+ },
9759
+ [uploadUrls, extractZip]
9760
+ );
9761
+ }
9429
9762
 
9430
- export { ALLOWED_PORTAL_ORIGINS, AccountClientProvider, ActivityFeed, AiActionCard, AiAnswer, AppleIcon, ArbiBotIcon, ArbiSessionStateProvider, ArbiWebSocketProvider, ArtifactCanvas, BOX_SEAT_REFUSED, BOX_SEAT_REFUSED_ACTION, BOX_SEAT_REFUSED_TITLE, COLUMN_LABEL_FALLBACKS, CalendarSupportProvider, ChatBubble, CitationRenderer, ClaudeIcon, CommandPalette, CommandPaletteProvider, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_DOCUMENT_VIEWER_STATE, DEFAULT_METADATA_TAGS, DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES, DEFAULT_START_BY_EMAIL_LABELS, DateSeparator, DirectMessages, DmAvatar, DmComposer, DocQaPanel, DocSearch, DocumentCardMenu, DocumentGallery, DocumentReview, DocumentTable, DocumentsSupportProvider, DraftTitleControls, EMPTY_SESSION_STATE, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, ImageCropModal, ImageCropper, LinkedInIcon, MAIL_DRAFT_REPLACED_EVENT, MAX_AVATAR_FILE_BYTES, MailClientProvider, MailOfflineUnavailableError, MessageArtifactCard, MessageBubble, MessageThread, OpenAIIcon, POLL_EVERY_MS, PhotoCapture, ProviderIcon, RUN_WINDOW_MS, SIGNATURE_NOTIFICATION_TYPES, SLOW_AFTER_MS, STILL_WORKING, StartByEmail, TypingIndicator, VideoCapture, VoiceNoteRecorder, WORK_NOTIFICATION_LABELS, accountPath, aliasTakenMessage, annotateThread, announceMailDraftReplaced, applyOptimisticDocumentEdit, arbiAccountClient, arbiMailClient, archiveName, buildDocumentMetadataRows, buildFolderTree, calendarQueryKeys, callNotificationMeta, canonicalFolderPath, captureFrameAsBlob, connectOAuthCalendarAccount, connectorErrorStatus, connectorQueryKeys, connectorReturnTo, createArbiSessionStore, createMailClient, cropImage, dayKey, defaultMailAlias, deploymentUserMeta, describeActivity, describeServerNotification, documentActivityMeta, documentActivityPhrase, documentDisplayName, docxMentionMeta, downloadRecoveryFile, fallbackFileName, fileAttachment, formatDocDate, formatFolderLabel, formatIdentityPrice, getDocumentAuthor, getDocumentDate, getDocumentNature, getDocumentSubject, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, inputRequestTitle, invalidateCalendarEvents, invalidateCalendars, isAliasTakenError, isDeploymentAdmin, isDeploymentUserNotification, isDocumentAddableToConversation, isOfflineReadableArbiQuery, isQueuedCalendarWrite, isReplayableArbiMutation, isRestorableArbiQueryOnline, isSignatureNotificationType, isWorkspaceNotificationType, mailDraftIdFromContent, mailJson, mailQueryKeys, mountDiditVerification, nextAliasSuggestion, nextViewingDocument, notificationUserName, parseActivityContent, parseDeleteAccountBlockers, pickRecentWorkspaces, redlineStats, registerArbiMutationDefaults, resetCalendarAccountSyncState, resolveActiveWorkspace, rollbackOptimisticDocumentEdit, safePortalUrl, selectIsGenerating, selectViewingDocumentId, signatureNotificationPhrase, signatureRequestMeta, supportsHouseTemplates, textToArtifact, titleFromQuestion, toChatCitations, toNotificationPreferences, toProfileView, toRedlineMarkdown, toShellWorkspace, useAccountClient, useActOnStep, useAddHolidayCalendar, useAddProjectAddonBlock, useAddWorkspaceMembers, useAddonQuote, useAgentChats, useAgentConfig, useAgentModels, useAgentSession, useAgentWorkspaces, useAiTask, useArbiChat, useArbiConnected, useArbiDocumentSync, useArbiSessionState, useArbiSessionStore, useArbiShellWorkspaces, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssignDocTags, useAuthorizeLimits, useAvatarCrop, useBookingPages, useCalDavProfiles, useCalendarAccounts, useCalendarEvent, useCalendarEventByUid, useCalendarEvents, useCalendarInvitations, useCalendarOutbox, useCalendarOverlays, useCalendarSettings, useCalendarShares, useCalendarSupport, useCalendars, useCameraStream, useCancelDriveSync, useCancelMailboxSync, useCancelProjectSubscription, useChangeProjectPlan, useChargeWatch, useClaimNativeAlias, useCloseAgentSession, useCommandPalette, useConfirmEmailChange, useConnectCalDavAccount, useConnectMailAccount, useConnectOAuthAccount, useConnectorAutoSync, useConnectorCatalog, useConnectorVendorVisibility, useContacts, useConversationActivity, useConversationPendingAuth, useConversationUsage, useCreateAgent, useCreateCalendar, useCreateContact, useCreateEvent, useCreateFact, useCreateFacts, useCreateProject, useCreateProjectCheckout, useCreateRoom, useCreateWork, useCreateWorkflow, useCurrentSessionId, useDecideCounter, useDeleteAccount, useDeleteAccountFlow, useDeleteBookingPage, useDeleteCalendar, useDeleteContact, useDeleteDocuments, useDeleteEvent, useDeleteFact, useDeleteNotifications, useDeleteProject, useDeleteSkill, useDeleteWorkflow, useDeleteWorkspaces, useDirectMessages, useDisconnectCalendarAccount, useDisconnectConnector, useDisconnectMailAccount, useDisconnectSlack, useDocumentThumbnails, useDocumentsSupport, useDownloadDocuments, useDriveFolderChildren, useDriveFolderDocCount, useDriveFolders, useDriveSyncEstimate, useDriveSyncProgress, useEmailChange, useEnableDriveSync, useEnableMailboxSync, useFacts, useFetchCalendarEvent, useFilteredProjects, useFinaliseTranslation, useFindTime, useFollowThread, useFreeBusy, useGenerateAgentAvatar, useGenerateDocTags, useGrantAgentAccess, useHolidayCountries, useHouseTemplateCandidates, useIdentityVerification, useIdentityVerificationFlow, useImportCalendar, useInvalidateProjects, useInviteContacts, useIsSlow, useMailAccounts, useMailAttachmentText, useMailCache, useMailClient, useMailDraftCompose, useMailDraftEditor, useMailDraftReplaced, useMailFolders, useMailMessage, useMailMessages, useMailOnline, useMailPolicy, useMailProjects, useMailUnlock, useMailboxFolders, useMailboxSyncProgress, useMarkNotificationsRead, useMcpTools, useMoveEvent, useMyConnectors, useNameEditor, useNotificationPreferences, useNotifications, usePassageQuotes, usePasswordChange, usePasswordChangeForm, usePendingContacts, usePlanQuote, usePlanWork, usePreviewProjectPlanChange, useProcessingTask, useProcessingTasks, useProducts, useProfile, useProjectBillingPortal, useProjectConversationUsage, useProjectEvents, usePublishCalendar, useRefreshCalendar, useRefreshConnectorsOnRunEnd, useRefreshProject, useRemoveDocTags, useRemoveWorkspaceMembers, useRenameFolder, useRequestEmailChange, useRespondToEvent, useResumeCalendarAccountConnect, useRevokeAgentAccess, useRooms, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSaveBookingPage, useSaveCalendarSettings, useSaveMailDraft, useSearchContacts, useSearchFacts, useSemanticSearch, useSendBackStep, useSendMail, useSessions, useSetSkillVisibility, useSetWorkspaceHouseTemplate, useSetWorkspaceMemberRoles, useShareCalendar, useShellWorkspaces, useSignOut, useSkillSource, useSkills, useSlackConnection, useStartAgentSession, useStartCalendarAccountOAuth, useStartWorkQuery, useSubscribeCalendar, useSyncAccountsOnOpen, useSyncCalendarAccount, useTerminateSession, useTriggerDriveSync, useTriggerMailboxSync, useUnshareCalendar, useUpdateCalendar, useUpdateCalendarAccount, useUpdateContact, useUpdateConversation, useUpdateDocTag, useUpdateDocuments, useUpdateEvent, useUpdateFact, useUpdateMailMessage, useUpdateProfile, useUpdateProjectAddonSettings, useUpdateProjectFields, useUpdateProjectNextPeriodAddons, useUpdateUserSettings, useUpdateWorkflow, useUpdateWorkspace, useUploadDocuments, useUploadSkillFiles, useUploadUrls, useUserSettings, useVideoRecorder, useWorkNotifications, useWorkflowRuns, useWorkflows, useWorkspaceDocs, useWorkspaceNotificationLevel, useWorkspaceUsers, userDisplayName, userInitials, workflowStepOf, workspaceHouseTemplateId };
9763
+ export { ALLOWED_PORTAL_ORIGINS, AccountClientProvider, ActivityFeed, AiActionCard, AiAnswer, AppleIcon, ArbiBotIcon, ArbiSessionStateProvider, ArbiWebSocketProvider, ArtifactCanvas, BOX_SEAT_REFUSED, BOX_SEAT_REFUSED_ACTION, BOX_SEAT_REFUSED_TITLE, COLUMN_LABEL_FALLBACKS, CalendarSupportProvider, ChatBubble, CitationRenderer, ClaudeIcon, CommandPalette, CommandPaletteProvider, ConversationList, DEFAULT_ASPECT_OPTIONS, DEFAULT_DOCUMENT_VIEWER_STATE, DEFAULT_METADATA_TAGS, DEFAULT_PASSWORD_CHANGE_FORM_MESSAGES, DEFAULT_START_BY_EMAIL_LABELS, DateSeparator, DirectMessages, DmAvatar, DmComposer, DocQaPanel, DocSearch, DocumentCardMenu, DocumentGallery, DocumentReview, DocumentTable, DocumentsSupportProvider, DraftTitleControls, EMPTY_SESSION_STATE, FileIcon, FireworksIcon, GeminiIcon, GitHubIcon, GoogleIcon, ImageCropModal, ImageCropper, LinkedInIcon, MAIL_DRAFT_REPLACED_EVENT, MAX_AVATAR_FILE_BYTES, MailClientProvider, MailOfflineUnavailableError, MessageArtifactCard, MessageBubble, MessageThread, OpenAIIcon, POLL_EVERY_MS, PhotoCapture, ProviderIcon, RUN_WINDOW_MS, SIGNATURE_NOTIFICATION_TYPES, SLOW_AFTER_MS, STILL_WORKING, StartByEmail, TypingIndicator, UPLOAD_ACCEPT, UPLOAD_MAX_FILE_SIZE, VideoCapture, VoiceNoteRecorder, WORK_NOTIFICATION_LABELS, accountPath, aliasTakenMessage, annotateThread, announceMailDraftReplaced, applyOptimisticDocumentEdit, arbiAccountClient, arbiMailClient, archiveName, buildDocumentMetadataRows, buildFolderTree, calendarQueryKeys, callNotificationMeta, canonicalFolderPath, captureFrameAsBlob, connectOAuthCalendarAccount, connectorErrorStatus, connectorQueryKeys, connectorReturnTo, createArbiSessionStore, createMailClient, cropImage, dayKey, defaultMailAlias, deploymentUserMeta, describeActivity, describeServerNotification, documentActivityMeta, documentActivityPhrase, documentDisplayName, docxMentionMeta, downloadRecoveryFile, extractZipFile, fallbackFileName, fileAttachment, filesFromDrop, forgetUploadedDocumentFolder, formatDocDate, formatFolderLabel, formatIdentityPrice, getDocumentAuthor, getDocumentDate, getDocumentNature, getDocumentSubject, getNotificationTypeMeta, getWorkspaceActionText, getWorkspaceKind, getWorkspaceSentPhrase, hasVideoTrack, identityStepFor, inputRequestTitle, invalidateCalendarEvents, invalidateCalendars, isAliasTakenError, isDeploymentAdmin, isDeploymentUserNotification, isDocumentAddableToConversation, isOfflineReadableArbiQuery, isQueuedCalendarWrite, isReplayableArbiMutation, isRestorableArbiQueryOnline, isSignatureNotificationType, isWorkspaceNotificationType, isZipFile, mailDraftIdFromContent, mailJson, mailQueryKeys, mountDiditVerification, nextAliasSuggestion, nextViewingDocument, notificationUserName, parseActivityContent, parseDeleteAccountBlockers, pickRecentWorkspaces, prepareUploadFiles, redlineStats, registerArbiMutationDefaults, resetCalendarAccountSyncState, resolveActiveWorkspace, rollbackOptimisticDocumentEdit, safePortalUrl, selectIsGenerating, selectViewingDocumentId, signatureNotificationPhrase, signatureRequestMeta, supportsHouseTemplates, textToArtifact, titleFromQuestion, toChatCitations, toNotificationPreferences, toProfileView, toRedlineMarkdown, toShellWorkspace, uploadFolderOf, uploadedDocumentFolder, useAccountClient, useActOnStep, useAddHolidayCalendar, useAddProjectAddonBlock, useAddWorkspaceMembers, useAddonQuote, useAgentChats, useAgentConfig, useAgentModels, useAgentSession, useAgentWorkspaces, useAiTask, useArbiChat, useArbiConnected, useArbiDocumentSync, useArbiSessionState, useArbiSessionStore, useArbiShellWorkspaces, useArbiWebSocket, useArbiWsContext, useArbiWsMessage, useArbiWsStatus, useArbiWsStore, useArbiWsTask, useArbiWsTasks, useAssignDocTags, useAuthorizeLimits, useAvatarCrop, useBookingPages, useCalDavProfiles, useCalendarAccounts, useCalendarEvent, useCalendarEventByUid, useCalendarEvents, useCalendarInvitations, useCalendarOutbox, useCalendarOverlays, useCalendarSettings, useCalendarShares, useCalendarSupport, useCalendars, useCameraStream, useCancelDriveSync, useCancelMailboxSync, useCancelProjectSubscription, useChangeProjectPlan, useChargeWatch, useClaimNativeAlias, useCloseAgentSession, useCommandPalette, useConfirmEmailChange, useConnectCalDavAccount, useConnectMailAccount, useConnectOAuthAccount, useConnectorAutoSync, useConnectorCatalog, useConnectorVendorVisibility, useContacts, useConversationActivity, useConversationPendingAuth, useConversationUsage, useCreateAgent, useCreateCalendar, useCreateContact, useCreateEvent, useCreateFact, useCreateFacts, useCreateProject, useCreateProjectCheckout, useCreateRoom, useCreateWork, useCreateWorkflow, useCurrentSessionId, useDecideCounter, useDeleteAccount, useDeleteAccountFlow, useDeleteBookingPage, useDeleteCalendar, useDeleteContact, useDeleteDocuments, useDeleteEvent, useDeleteFact, useDeleteNotifications, useDeleteProject, useDeleteSkill, useDeleteWorkflow, useDeleteWorkspaces, useDirectMessages, useDisconnectCalendarAccount, useDisconnectConnector, useDisconnectMailAccount, useDisconnectSlack, useDocumentThumbnails, useDocumentsSupport, useDownloadDocuments, useDriveFolderChildren, useDriveFolderDocCount, useDriveFolders, useDriveSyncEstimate, useDriveSyncProgress, useEmailChange, useEnableDriveSync, useEnableMailboxSync, useFacts, useFetchCalendarEvent, useFilteredProjects, useFinaliseTranslation, useFindTime, useFollowThread, useFreeBusy, useGenerateAgentAvatar, useGenerateDocTags, useGrantAgentAccess, useHolidayCountries, useHouseTemplateCandidates, useIdentityVerification, useIdentityVerificationFlow, useImportCalendar, useInvalidateProjects, useInviteContacts, useIsSlow, useMailAccounts, useMailAttachmentText, useMailCache, useMailClient, useMailDraftCompose, useMailDraftEditor, useMailDraftReplaced, useMailFolders, useMailMessage, useMailMessages, useMailOnline, useMailPolicy, useMailProjects, useMailUnlock, useMailboxFolders, useMailboxSyncProgress, useMarkNotificationsRead, useMcpTools, useMoveEvent, useMyConnectors, useNameEditor, useNotificationPreferences, useNotifications, usePassageQuotes, usePasswordChange, usePasswordChangeForm, usePendingContacts, usePlanQuote, usePlanWork, usePreviewProjectPlanChange, useProcessingTask, useProcessingTasks, useProducts, useProfile, useProjectBillingPortal, useProjectConversationUsage, useProjectEvents, usePublishCalendar, useRefreshCalendar, useRefreshConnectorsOnRunEnd, useRefreshProject, useRemoveDocTags, useRemoveWorkspaceMembers, useRenameFolder, useRequestEmailChange, useRespondToEvent, useResumeCalendarAccountConnect, useRevokeAgentAccess, useRooms, useRunConversation, useRunWorkflow, useSaveAgentConfig, useSaveBookingPage, useSaveCalendarSettings, useSaveMailDraft, useSearchContacts, useSearchFacts, useSemanticSearch, useSendBackStep, useSendMail, useSessions, useSetSkillVisibility, useSetWorkspaceHouseTemplate, useSetWorkspaceMemberRoles, useShareCalendar, useShellWorkspaces, useSignOut, useSkillSource, useSkills, useSlackConnection, useStartAgentSession, useStartCalendarAccountOAuth, useStartWorkQuery, useSubscribeCalendar, useSyncAccountsOnOpen, useSyncCalendarAccount, useTerminateSession, useTriggerDriveSync, useTriggerMailboxSync, useUnshareCalendar, useUpdateCalendar, useUpdateCalendarAccount, useUpdateContact, useUpdateConversation, useUpdateDocTag, useUpdateDocuments, useUpdateEvent, useUpdateFact, useUpdateMailMessage, useUpdateProfile, useUpdateProjectAddonSettings, useUpdateProjectFields, useUpdateProjectNextPeriodAddons, useUpdateUserSettings, useUpdateWorkflow, useUpdateWorkspace, useUploadDocuments, useUploadFiles, useUploadFromUrls, useUploadSkillFiles, useUploadUrls, useUserSettings, useVideoRecorder, useWorkNotifications, useWorkflowRuns, useWorkflows, useWorkspaceDocs, useWorkspaceNotificationLevel, useWorkspaceUsers, userDisplayName, userInitials, withRelativePath, workflowStepOf, workspaceHouseTemplateId };
9431
9764
  //# sourceMappingURL=index.js.map
9432
9765
  //# sourceMappingURL=index.js.map