@hiai-gg/docsmint 0.6.8 → 0.7.1

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 (138) hide show
  1. package/README.md +90 -99
  2. package/backend/src/lib/api-keys.ts +14 -6
  3. package/backend/src/lib/lifecycle-service.ts +397 -73
  4. package/dist/backend/index.js +13039 -10865
  5. package/dist/backend-account-runtime-cleanup.js +152 -42
  6. package/dist/backend-api-key-facade.js +207 -61
  7. package/dist/backend-pipeline-cancellation.js +144 -42
  8. package/dist/client.d.ts +12 -2
  9. package/dist/client.js +83 -30
  10. package/dist/frontend/{CategoryDialog-CbXBMBZB.js → CategoryDialog-t_WIvFAG.js} +5 -5
  11. package/dist/frontend/{ConfirmDialog-DgMTQBq4.js → ConfirmDialog-_LlrA--f.js} +3 -3
  12. package/dist/frontend/{CreateSnapshotDialog-FUq-ZfBH.js → CreateSnapshotDialog-DW3PwAt5.js} +4 -4
  13. package/dist/frontend/{DatePicker-D6E-EEtZ.js → DatePicker-CAw0wZZK.js} +9 -9
  14. package/dist/frontend/{DeleteDialog-8k6JYWCx.js → DeleteDialog-L1A3FhMM.js} +1 -1
  15. package/dist/frontend/{FolderNode-DAAn_T8_.js → FolderNode-DzTqitR8.js} +2 -2
  16. package/dist/frontend/{HiAiEditor-DSVG3GNd.js → HiAiEditor-B7MK19_j.js} +7 -7
  17. package/dist/frontend/{SettingsDialog-BDNgf5rv.js → SettingsDialog-CS5L4nnU.js} +13 -13
  18. package/dist/frontend/ShareDialog-CwFa8mlk.js +281 -0
  19. package/dist/frontend/{Sidebar-DX08utdV.js → Sidebar-CDaFFmaQ.js} +18 -17
  20. package/dist/frontend/{TagCreateDialog-Bb0-Vtzh.js → TagCreateDialog-C7Avn2_h.js} +4 -4
  21. package/dist/frontend/api/attachments.js +1 -1
  22. package/dist/frontend/api/settings.js +1 -1
  23. package/dist/frontend/app-shell.js +3 -3
  24. package/dist/frontend/{attachments-B8AuDjno.js → attachments-B2aH3hXF.js} +10 -9
  25. package/dist/frontend/{auth-client-Cygmp1I2.js → auth-client-CnDZwPfp.js} +11 -11
  26. package/dist/frontend/components/category-dialog.js +1 -1
  27. package/dist/frontend/components/create-snapshot-dialog.js +1 -1
  28. package/dist/frontend/components/delete-dialog.js +1 -1
  29. package/dist/frontend/components/editor/compact-editor.js +1 -1
  30. package/dist/frontend/components/editor/document-editor.js +1 -1
  31. package/dist/frontend/components/editor/document-title.js +1 -1
  32. package/dist/frontend/components/editor/markdown-toggle.js +1 -1
  33. package/dist/frontend/components/folder-node.js +1 -1
  34. package/dist/frontend/components/save-as-dialog.js +4 -4
  35. package/dist/frontend/components/settings.js +1 -1
  36. package/dist/frontend/components/share-dialog.d.ts +2 -1
  37. package/dist/frontend/components/share-dialog.js +1 -1
  38. package/dist/frontend/components/sidebar.js +1 -1
  39. package/dist/frontend/components/tag-create-dialog.js +1 -1
  40. package/dist/frontend/components/version-history.js +3 -3
  41. package/dist/frontend/{confirm-dialog-CzmoZw3a.js → confirm-dialog-BW2h2NE8.js} +5 -5
  42. package/dist/frontend/dashboard.js +1008 -998
  43. package/dist/frontend/{db-ByrlYfaI.js → db-Bo1t_76T.js} +1 -1
  44. package/dist/frontend/{dialog-Ce79C9fd.js → dialog-C2iKObEu.js} +7 -7
  45. package/dist/frontend/{dropdown-menu-CJ_7V3N0.js → dropdown-menu-BXIl2E26.js} +12 -12
  46. package/dist/frontend/{floating-layer-anchor-S5RSefGN.js → floating-layer-anchor-BGIndLY-.js} +63 -63
  47. package/dist/frontend/i18n.js +1 -1
  48. package/dist/frontend/{identity-DyWeNzu_.js → identity-Ynrglr5i.js} +1 -1
  49. package/dist/frontend/{input-BWlOML_m.js → input-eHFb2qiL.js} +2 -2
  50. package/dist/frontend/{label-C2HfJNQ2.js → label-_I1iiaNU.js} +2 -2
  51. package/dist/frontend/messages-DTRe4U2V.js +1093 -0
  52. package/dist/frontend/offline/identity.js +1 -1
  53. package/dist/frontend/search.js +3 -3
  54. package/dist/frontend/{select-value-JCAp2PmU.js → select-value-CtMyrvDJ.js} +18 -18
  55. package/dist/frontend/{settings-DSrUl4hW.js → settings-BR48ihB4.js} +6 -23
  56. package/dist/frontend/{textarea-DOAE-h42.js → textarea-2eslfANY.js} +2 -2
  57. package/dist/frontend/{utils-BPDRytUU.js → utils-CDBqTgoV.js} +1 -1
  58. package/dist/frontend-ssr/api/attachments.js +1 -1
  59. package/dist/frontend-ssr/api/settings.js +1 -1
  60. package/dist/frontend-ssr/app-shell.js +3 -3
  61. package/dist/frontend-ssr/assets/{CategoryDialog-QHEv_9N4.js → CategoryDialog-B3MrZUho.js} +5 -5
  62. package/dist/frontend-ssr/assets/{ConfirmDialog-BhAelejz.js → ConfirmDialog-D1BDXXll.js} +3 -3
  63. package/dist/frontend-ssr/assets/{CreateSnapshotDialog-CI8vXXcN.js → CreateSnapshotDialog-NM0n1Whr.js} +4 -4
  64. package/dist/frontend-ssr/assets/{DatePicker-D84cJ-Eq.js → DatePicker-Dcok9XVm.js} +4 -4
  65. package/dist/frontend-ssr/assets/{DeleteDialog-DG9Lm38J.js → DeleteDialog-oHT_p_vG.js} +1 -1
  66. package/dist/frontend-ssr/assets/{FolderNode-kmilhDjO.js → FolderNode-B84NL8Rg.js} +2 -2
  67. package/dist/frontend-ssr/assets/{HiAiEditor-CUOJmKzT.js → HiAiEditor-tU0jmp6L.js} +6 -6
  68. package/dist/frontend-ssr/assets/{SettingsDialog-BjJIiVLc.js → SettingsDialog-Dkp79L1B.js} +13 -13
  69. package/dist/frontend-ssr/assets/{ShareDialog-C9C-XTm4.js → ShareDialog-B1-30sRR.js} +20 -7
  70. package/dist/frontend-ssr/assets/{Sidebar-C2sUfGNk.js → Sidebar-CGp45ngo.js} +14 -13
  71. package/dist/frontend-ssr/assets/{TagCreateDialog-DUPMitlL.js → TagCreateDialog-CGGtYSso.js} +4 -4
  72. package/dist/frontend-ssr/assets/{attachments-Cj3fQyUp.js → attachments-BdkOp8ha.js} +5 -4
  73. package/dist/frontend-ssr/assets/{auth-client-x26kqY8Z.js → auth-client-CojKIzqy.js} +13 -13
  74. package/dist/frontend-ssr/assets/{confirm-dialog-XuyaL8sr.js → confirm-dialog-B-oV5wYk.js} +5 -5
  75. package/dist/frontend-ssr/assets/{db-CnxeO66n.js → db-BhwJPEkn.js} +1 -1
  76. package/dist/frontend-ssr/assets/{dialog-BOV1u6zP.js → dialog-1SB5neow.js} +8 -8
  77. package/dist/frontend-ssr/assets/{dropdown-menu-Dn_vQq9b.js → dropdown-menu-DqoOkdqB.js} +12 -12
  78. package/dist/frontend-ssr/assets/{floating-layer-anchor-BIAu-252.js → floating-layer-anchor-BoiiIEiK.js} +71 -71
  79. package/dist/frontend-ssr/assets/{identity-B3uHoDtf.js → identity-DcMMBKWg.js} +1 -1
  80. package/dist/frontend-ssr/assets/{input-DezGsU3y.js → input-Df-QP3Km.js} +2 -2
  81. package/dist/frontend-ssr/assets/{label-Bj8-TfFN.js → label-CbUOUz6L.js} +2 -2
  82. package/dist/frontend-ssr/assets/{messages-BAQzILs4.js → messages-B1TjVIH8.js} +2 -2
  83. package/dist/frontend-ssr/assets/{select-value-DBhbkNcc.js → select-value-CXEDWrZg.js} +18 -18
  84. package/dist/frontend-ssr/assets/{settings-Bk5Hk9Vq.js → settings-Mp8EuFSn.js} +3 -21
  85. package/dist/frontend-ssr/assets/{textarea-Dev-qSEc.js → textarea-CHh8NuSS.js} +2 -2
  86. package/dist/frontend-ssr/assets/{utils-DtlPPXpJ.js → utils-DtX0ta7y.js} +1 -1
  87. package/dist/frontend-ssr/components/category-dialog.js +1 -1
  88. package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -1
  89. package/dist/frontend-ssr/components/delete-dialog.js +1 -1
  90. package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
  91. package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
  92. package/dist/frontend-ssr/components/editor/document-title.js +1 -1
  93. package/dist/frontend-ssr/components/editor/markdown-toggle.js +1 -1
  94. package/dist/frontend-ssr/components/folder-node.js +1 -1
  95. package/dist/frontend-ssr/components/save-as-dialog.js +4 -4
  96. package/dist/frontend-ssr/components/settings.js +1 -1
  97. package/dist/frontend-ssr/components/share-dialog.js +1 -1
  98. package/dist/frontend-ssr/components/sidebar.js +1 -1
  99. package/dist/frontend-ssr/components/tag-create-dialog.js +1 -1
  100. package/dist/frontend-ssr/components/version-history.js +3 -3
  101. package/dist/frontend-ssr/dashboard.js +32 -30
  102. package/dist/frontend-ssr/i18n.js +1 -1
  103. package/dist/frontend-ssr/offline/identity.js +1 -1
  104. package/dist/frontend-ssr/search.js +3 -3
  105. package/dist/index.d.ts +5 -5
  106. package/dist/index.js +2 -2
  107. package/dist/lifecycle-persistent.d.ts +1 -1
  108. package/dist/lifecycle-runtime.js +52659 -338
  109. package/dist/mcp-cli.js +1056 -0
  110. package/dist/mcp-server.d.ts +39 -0
  111. package/dist/mcp-server.js +1053 -0
  112. package/dist/storage-quota.d.ts +5 -1
  113. package/dist/types.d.ts +7 -0
  114. package/dist/workspace.d.ts +11 -2
  115. package/dist/workspace.js +82 -10
  116. package/package.json +7 -13
  117. package/packages/cli/src/index.ts +4 -3
  118. package/packages/db/src/client.ts +56 -5
  119. package/packages/db/src/schema.ts +192 -1
  120. package/packages/db/src/with-tenant.ts +20 -2
  121. package/server.json +42 -5
  122. package/dist/frontend/ShareDialog-2Mty7hm4.js +0 -258
  123. package/dist/frontend/messages-DIovIZrK.js +0 -1093
  124. package/packages/mcp-server/src/capabilities.ts +0 -189
  125. package/packages/mcp-server/src/client.ts +0 -225
  126. package/packages/mcp-server/src/index.ts +0 -8
  127. package/packages/mcp-server/src/server.ts +0 -87
  128. package/packages/mcp-server/src/tools/create-document.ts +0 -34
  129. package/packages/mcp-server/src/tools/create-folder.ts +0 -31
  130. package/packages/mcp-server/src/tools/create-snapshot.ts +0 -27
  131. package/packages/mcp-server/src/tools/export-document.ts +0 -22
  132. package/packages/mcp-server/src/tools/get-document.ts +0 -22
  133. package/packages/mcp-server/src/tools/list-documents.ts +0 -34
  134. package/packages/mcp-server/src/tools/list-folders.ts +0 -26
  135. package/packages/mcp-server/src/tools/search.ts +0 -39
  136. package/packages/mcp-server/src/tools/update-document.ts +0 -38
  137. package/packages/mcp-server/src/tools/version-history.ts +0 -27
  138. package/packages/mcp-server/src/types.ts +0 -126
@@ -1,19 +1,19 @@
1
1
  import { t as e } from "./Icon-Db-o32_E.js";
2
2
  import { n as t } from "./dist-DQa_OHOa.js";
3
- import { $n as n, B as r, Bt as i, Cr as a, Er as o, Sr as s, Tr as c, _r as l, br as u, cr as d, dr as f, fr as p, gr as m, hr as h, lr as g, mr as _, or as v, pr as y, sr as b, ur as x, vr as S, wr as C, xr as w, yr as T } from "./messages-DIovIZrK.js";
3
+ import { $n as n, B as r, Bt as i, Cr as a, Er as o, Sr as s, Tr as c, _r as l, br as u, cr as d, dr as f, fr as p, gr as m, hr as h, lr as g, mr as _, or as v, pr as y, sr as b, ur as x, vr as S, wr as C, xr as w, yr as T } from "./messages-DTRe4U2V.js";
4
4
  import { a as E, n as ee, t as te } from "./route-context-DYQlUfzL.js";
5
- import { t as D } from "./utils-BPDRytUU.js";
6
- import { a as ne, i as re, n as ie, o as O, r as ae, t as oe } from "./dialog-Ce79C9fd.js";
7
- import { t as k } from "./input-BWlOML_m.js";
8
- import { t as A } from "./label-C2HfJNQ2.js";
9
- import { r as se, t as ce } from "./auth-client-Cygmp1I2.js";
10
- import { a as le, r as ue } from "./settings-DSrUl4hW.js";
5
+ import { t as D } from "./utils-CDBqTgoV.js";
6
+ import { a as ne, i as re, n as ie, o as O, r as ae, t as oe } from "./dialog-C2iKObEu.js";
7
+ import { t as k } from "./input-eHFb2qiL.js";
8
+ import { t as A } from "./label-_I1iiaNU.js";
9
+ import { r as se, t as ce } from "./auth-client-CnDZwPfp.js";
10
+ import { a as le, r as ue } from "./settings-BR48ihB4.js";
11
11
  import { a as j, i as M, n as N, o as de, s as P, t as F } from "./api-keys-DIwAdYkg.js";
12
12
  import { i as I } from "./categories-X7gK8azc.js";
13
13
  import { t as fe } from "./context-D0zPFXZ4.js";
14
14
  import { t as pe } from "./resolve-BG4HgzpN.js";
15
- import { n as L, t as R } from "./db-ByrlYfaI.js";
16
- import { a as z, t as B } from "./identity-DyWeNzu_.js";
15
+ import { n as L, t as R } from "./db-Bo1t_76T.js";
16
+ import { a as z, t as B } from "./identity-Ynrglr5i.js";
17
17
  import { t as V } from "./editor-preferences.svelte-Bt_A9k7n.js";
18
18
  import { n as H, r as U, t as W } from "./search-preferences-B1GdbdUc.js";
19
19
  import { t as me } from "./theme.svelte-DKfCy12k.js";
@@ -70,7 +70,7 @@ function ve(t, n) {
70
70
  }));
71
71
  }
72
72
  //#endregion
73
- //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs.svelte
73
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs.svelte
74
74
  var K = G.from_html("<div><!></div>");
75
75
  function ye(e, t) {
76
76
  G.push(t, !0);
@@ -86,7 +86,7 @@ function ye(e, t) {
86
86
  }, [() => G.clsx(D("w-full", t.class))]), G.append(e, r), G.pop();
87
87
  }
88
88
  //#endregion
89
- //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-content.svelte
89
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-content.svelte
90
90
  var be = G.from_html("<div role=\"tabpanel\"><!></div>");
91
91
  function q(e, t) {
92
92
  G.push(t, !0);
@@ -104,7 +104,7 @@ function q(e, t) {
104
104
  }), G.append(e, n), G.pop();
105
105
  }
106
106
  //#endregion
107
- //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-list.svelte
107
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-list.svelte
108
108
  var xe = G.from_html("<div role=\"tablist\"><!></div>");
109
109
  function Se(e, t) {
110
110
  G.push(t, !0);
@@ -117,7 +117,7 @@ function Se(e, t) {
117
117
  }), G.reset(n), G.template_effect((e) => G.set_class(n, 1, e), [() => G.clsx(D("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", t.class))]), G.append(e, n), G.pop();
118
118
  }
119
119
  //#endregion
120
- //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-trigger.svelte
120
+ //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+8f2b9fada26e5f3b/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-trigger.svelte
121
121
  var Ce = G.from_html("<button type=\"button\" role=\"tab\"><!></button>");
122
122
  function J(e, t) {
123
123
  G.push(t, !0);
@@ -0,0 +1,281 @@
1
+ import { $n as e, Ar as t, Br as n, Dr as r, Fr as i, Hr as a, Ir as o, Lr as s, Mr as c, Nr as l, Or as u, Pr as d, Rr as f, Ur as p, Vr as ee, Zn as m, jr as te, kr as h, or as g, zr as ne } from "./messages-DTRe4U2V.js";
2
+ import { a as _ } from "./route-context-DYQlUfzL.js";
3
+ import { a as re, i as ie, n as ae, r as v, t as oe } from "./select-value-CtMyrvDJ.js";
4
+ import { n as y } from "./share-D7JtkC85.js";
5
+ import { h as b, u as x } from "./keyboard.svelte-CApmX0vl.js";
6
+ import { t as S } from "./clipboard-Cgzxc0_R.js";
7
+ import "svelte/internal/disclose-version";
8
+ import * as C from "svelte/internal/client";
9
+ //#region src/lib/components/share-configuration.ts
10
+ function w(e) {
11
+ return e === "standalone" ? ["public"] : ["public", "restricted"];
12
+ }
13
+ function T(e) {
14
+ let t = e.displayMode === "standalone" ? "public" : e.accessMode, n = t === "restricted";
15
+ return {
16
+ documentId: e.documentId || void 0,
17
+ folderId: e.folderId || void 0,
18
+ categoryId: e.categoryId || void 0,
19
+ password: e.usePassword ? e.password : void 0,
20
+ expiresIn: e.expiresIn,
21
+ accessMode: t,
22
+ allowPasswordFallback: n && e.usePassword ? e.allowPasswordFallback : void 0,
23
+ guests: n ? e.guests : void 0
24
+ };
25
+ }
26
+ //#endregion
27
+ //#region src/lib/components/ShareDialog.svelte
28
+ var se = C.from_html("<button type=\"button\"> </button>"), E = C.from_html("<label class=\"flex items-start gap-2 text-xs text-muted-foreground\"><input type=\"checkbox\" class=\"mt-0.5\"/> Allow anyone with the password to view. Commenting and editing still require an invited account.</label>"), ce = C.from_html("<input type=\"password\" class=\"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"/> <!>", 1), le = C.from_html("<button> </button>"), ue = C.from_html("<!> <!> <!>", 1), de = C.from_html("<!> <!>", 1), fe = C.from_html("<span class=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"> <button class=\"text-muted-foreground hover:text-foreground\">&times;</button></span>"), pe = C.from_html("<div class=\"flex flex-wrap gap-1.5\"></div>"), me = C.from_html("<div class=\"space-y-2\"><span class=\"text-sm font-medium\"> </span> <div class=\"flex gap-2\"><input type=\"email\" placeholder=\"guest@email.com\" class=\"flex h-9 flex-1 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\"/> <!> <button class=\"rounded-md border border-border px-3 py-1.5 text-sm font-medium hover:bg-accent\"> </button></div> <!></div>"), he = C.from_html("<p class=\"text-xs text-destructive\"> </p>"), ge = C.from_html("<div class=\"space-y-4\"><div aria-label=\"Share access mode\"></div> <p class=\"rounded-md border border-border bg-muted/40 p-3 text-xs text-muted-foreground\"> </p> <div class=\"flex items-center justify-between\"><span class=\"text-sm font-medium\"> </span> <button role=\"switch\"><span></span></button></div> <!> <div class=\"space-y-2\"><span class=\"text-sm font-medium\"> </span> <div class=\"flex gap-2\"></div></div> <!> <!> <button class=\"w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50\"> </button></div>"), D = C.from_html("<div class=\"space-y-4\"><p class=\"text-sm text-muted-foreground\"> </p> <div data-share-created-url=\"\" class=\"flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center\"><code class=\"min-w-0 flex-1 break-all rounded-md bg-muted px-3 py-2 text-sm\"> </code> <button data-share-copy-action=\"\" class=\"w-full shrink-0 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 sm:w-auto\"> </button></div> <button class=\"w-full rounded-md border border-border px-4 py-2 text-sm font-medium hover:bg-accent\"> </button></div>"), O = C.from_html("<div class=\"fixed inset-0 layer-modal z-[100] flex items-center justify-center\"><button class=\"absolute inset-0 z-[100] bg-black/50\"></button> <div class=\"relative z-[101] w-full max-w-md rounded-lg border border-border bg-background p-6 shadow-lg\" role=\"dialog\" aria-modal=\"true\"><div class=\"mb-4 flex items-center justify-between\"><h2 class=\"text-lg font-semibold\"> </h2> <button class=\"rounded-md p-1 text-muted-foreground hover:bg-accent hover:text-foreground\">&#10005;</button></div> <!></div></div>");
29
+ function k(k, A) {
30
+ C.push(A, !0);
31
+ let j = C.prop(A, "open", 15, !1), M = C.prop(A, "documentId", 3, ""), N = C.prop(A, "documentTitle", 3, ""), P = C.prop(A, "folderId", 3, ""), F = C.prop(A, "folderName", 3, ""), I = C.prop(A, "categoryId", 3, ""), _e = C.prop(A, "categoryName", 3, ""), L = C.prop(A, "displayMode", 3, "host-managed"), R = C.state(!1), z = C.state("public"), B = C.state(!1), V = C.state(""), H = C.state("7d"), U = C.state(""), W = C.state("viewer"), G = C.state(C.proxy([])), K = C.state(""), q = C.state(!1), J = C.state(!1), Y = C.state(""), ve = _(), X = C.derived(() => w(L()));
32
+ C.user_effect(() => (x({
33
+ id: "share-dialog-escape",
34
+ keys: "escape",
35
+ description: "Close share dialog",
36
+ scope: "dialog",
37
+ enabled: j(),
38
+ overrideInput: !0,
39
+ handler: () => {
40
+ j() && Q();
41
+ }
42
+ }), () => {
43
+ b("share-dialog-escape");
44
+ }));
45
+ function Z() {
46
+ let e = C.get(U).trim();
47
+ e?.includes("@") && !C.get(G).some((t) => t.email === e.toLowerCase()) && (C.set(G, [...C.get(G), {
48
+ email: e.toLowerCase(),
49
+ role: C.get(W)
50
+ }], !0), C.set(U, ""));
51
+ }
52
+ function ye(e) {
53
+ C.set(G, C.get(G).filter((t) => t.email !== e), !0);
54
+ }
55
+ async function be() {
56
+ C.set(J, !0), C.set(Y, "");
57
+ try {
58
+ let e = T({
59
+ displayMode: L(),
60
+ documentId: M(),
61
+ folderId: P(),
62
+ categoryId: I(),
63
+ usePassword: C.get(R),
64
+ password: C.get(V),
65
+ expiresIn: C.get(H),
66
+ accessMode: C.get(z),
67
+ allowPasswordFallback: C.get(B),
68
+ guests: C.get(G)
69
+ }), t = await y(e, ve.fetch);
70
+ C.set(K, `${window.location.origin}/s/${t.token}`), A.onCreated?.({
71
+ token: t.token,
72
+ url: C.get(K),
73
+ accessMode: e.accessMode
74
+ });
75
+ } catch (e) {
76
+ C.set(Y, e instanceof Error ? e.message : g(), !0), console.error("ShareDialog: createShareLink failed", e);
77
+ } finally {
78
+ C.set(J, !1);
79
+ }
80
+ }
81
+ async function xe() {
82
+ C.get(K) && (await S(C.get(K)), C.set(q, !0), setTimeout(() => {
83
+ C.set(q, !1);
84
+ }, 2e3));
85
+ }
86
+ function Q() {
87
+ j(!1), C.set(K, ""), C.set(R, !1), C.set(z, "public"), C.set(B, !1), C.set(V, ""), C.set(H, "7d"), C.set(G, [], !0), C.set(Y, "");
88
+ }
89
+ var $ = C.comment(), Se = C.first_child($), Ce = (g) => {
90
+ var _ = O(), y = C.child(_), b = C.sibling(y, 2), x = C.child(b), S = C.child(x), w = C.child(S);
91
+ C.reset(S);
92
+ var T = C.sibling(S, 2);
93
+ C.reset(x);
94
+ var k = C.sibling(x, 2), A = (e) => {
95
+ var r = ge(), u = C.child(r);
96
+ C.each(u, 21, () => C.get(X), C.index, (e, t) => {
97
+ var n = se(), r = C.child(n, !0);
98
+ C.reset(n), C.template_effect(() => {
99
+ C.set_class(n, 1, `rounded-md px-3 py-2 text-sm font-medium ${C.get(z) === C.get(t) ? "bg-background shadow-sm" : "text-muted-foreground"}`), C.set_text(r, C.get(t) === "public" ? "Public link" : "Specific people");
100
+ }), C.delegated("click", n, () => {
101
+ C.set(z, C.get(t), !0), C.get(t) === "public" && (C.set(G, [], !0), C.set(B, !1));
102
+ }), C.append(e, n);
103
+ }), C.reset(u);
104
+ var p = C.sibling(u, 2), m = C.child(p, !0);
105
+ C.reset(p);
106
+ var h = C.sibling(p, 2), g = C.child(h), _ = C.child(g, !0);
107
+ C.reset(g);
108
+ var y = C.sibling(g, 2), b = C.child(y);
109
+ C.reset(y), C.reset(h);
110
+ var x = C.sibling(h, 2), S = (e) => {
111
+ var t = ce(), n = C.first_child(t);
112
+ C.remove_input_defaults(n);
113
+ var r = C.sibling(n, 2), i = (e) => {
114
+ var t = E(), n = C.child(t);
115
+ C.remove_input_defaults(n), C.next(), C.reset(t), C.bind_checked(n, () => C.get(B), (e) => C.set(B, e)), C.append(e, t);
116
+ };
117
+ C.if(r, (e) => {
118
+ C.get(z) === "restricted" && e(i);
119
+ }), C.template_effect((e) => C.set_attribute(n, "placeholder", e), [() => f()]), C.bind_value(n, () => C.get(V), (e) => C.set(V, e)), C.append(e, t);
120
+ };
121
+ C.if(x, (e) => {
122
+ C.get(R) && e(S);
123
+ });
124
+ var w = C.sibling(x, 2), T = C.child(w), D = C.child(T, !0);
125
+ C.reset(T);
126
+ var O = C.sibling(T, 2);
127
+ C.each(O, 21, () => [
128
+ ["1h", i()],
129
+ ["1d", d()],
130
+ ["7d", l()],
131
+ ["30d", c()],
132
+ ["never", o()]
133
+ ], C.index, (e, t) => {
134
+ var n = C.derived(() => C.to_array(C.get(t), 2));
135
+ let r = () => C.get(n)[0], i = () => C.get(n)[1];
136
+ var a = le(), o = C.child(a, !0);
137
+ C.reset(a), C.template_effect(() => {
138
+ C.set_class(a, 1, `rounded-md border px-2.5 py-1 text-xs font-medium transition-colors
139
+ ${C.get(H) === r() ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent"}`), C.set_text(o, i());
140
+ }), C.delegated("click", a, () => {
141
+ C.set(H, r(), !0);
142
+ }), C.append(e, a);
143
+ }), C.reset(O), C.reset(w);
144
+ var k = C.sibling(w, 2), A = (e) => {
145
+ var n = me(), r = C.child(n), i = C.child(r, !0);
146
+ C.reset(r);
147
+ var a = C.sibling(r, 2), o = C.child(a);
148
+ C.remove_input_defaults(o);
149
+ var s = C.sibling(o, 2);
150
+ re(s, {
151
+ type: "single",
152
+ get value() {
153
+ return C.get(W);
154
+ },
155
+ onValueChange: (e) => {
156
+ (e === "viewer" || e === "commenter" || e === "editor") && C.set(W, e, !0);
157
+ },
158
+ children: (e, t) => {
159
+ var n = de(), r = C.first_child(n);
160
+ ae(r, {
161
+ class: "h-9 w-32 justify-between px-3 text-sm",
162
+ "aria-label": "Guest role",
163
+ children: (e, t) => {
164
+ oe(e, {
165
+ placeholder: "Role",
166
+ children: (e, t) => {
167
+ C.next();
168
+ var n = C.text();
169
+ C.template_effect(() => C.set_text(n, C.get(W) === "viewer" ? "Viewer" : C.get(W) === "commenter" ? "Commenter" : "Editor")), C.append(e, n);
170
+ },
171
+ $$slots: { default: !0 }
172
+ });
173
+ },
174
+ $$slots: { default: !0 }
175
+ }), ie(C.sibling(r, 2), {
176
+ children: (e, t) => {
177
+ var n = ue(), r = C.first_child(n);
178
+ v(r, {
179
+ value: "viewer",
180
+ children: (e, t) => {
181
+ C.next();
182
+ var n = C.text("Viewer");
183
+ C.append(e, n);
184
+ },
185
+ $$slots: { default: !0 }
186
+ });
187
+ var i = C.sibling(r, 2);
188
+ v(i, {
189
+ value: "commenter",
190
+ children: (e, t) => {
191
+ C.next();
192
+ var n = C.text("Commenter");
193
+ C.append(e, n);
194
+ },
195
+ $$slots: { default: !0 }
196
+ }), v(C.sibling(i, 2), {
197
+ value: "editor",
198
+ children: (e, t) => {
199
+ C.next();
200
+ var n = C.text("Editor");
201
+ C.append(e, n);
202
+ },
203
+ $$slots: { default: !0 }
204
+ }), C.append(e, n);
205
+ },
206
+ $$slots: { default: !0 }
207
+ }), C.append(e, n);
208
+ },
209
+ $$slots: { default: !0 }
210
+ });
211
+ var c = C.sibling(s, 2), l = C.child(c, !0);
212
+ C.reset(c), C.reset(a);
213
+ var u = C.sibling(a, 2), d = (e) => {
214
+ var t = pe();
215
+ C.each(t, 21, () => C.get(G), C.index, (e, t) => {
216
+ var n = fe(), r = C.child(n), i = C.sibling(r);
217
+ C.reset(n), C.template_effect(() => C.set_text(r, `${C.get(t).email ?? ""} · ${C.get(t).role ?? ""} `)), C.delegated("click", i, () => ye(C.get(t).email)), C.append(e, n);
218
+ }), C.reset(t), C.append(e, t);
219
+ };
220
+ C.if(u, (e) => {
221
+ C.get(G).length > 0 && e(d);
222
+ }), C.reset(n), C.template_effect((e, t) => {
223
+ C.set_text(i, e), C.set_text(l, t);
224
+ }, [() => te(), () => t()]), C.delegated("keydown", o, (e) => {
225
+ e.key === "Enter" && (e.preventDefault(), Z());
226
+ }), C.bind_value(o, () => C.get(U), (e) => C.set(U, e)), C.delegated("click", c, Z), C.append(e, n);
227
+ };
228
+ C.if(k, (e) => {
229
+ C.get(z) === "restricted" && e(A);
230
+ });
231
+ var j = C.sibling(k, 2), M = (e) => {
232
+ var t = he(), n = C.child(t, !0);
233
+ C.reset(t), C.template_effect(() => C.set_text(n, C.get(Y))), C.append(e, t);
234
+ };
235
+ C.if(j, (e) => {
236
+ C.get(Y) && e(M);
237
+ });
238
+ var N = C.sibling(j, 2), P = C.child(N, !0);
239
+ C.reset(N), C.reset(r), C.template_effect((e, t, n, r) => {
240
+ C.set_class(u, 1, `grid ${C.get(X).length === 1 ? "grid-cols-1" : "grid-cols-2"} gap-2 rounded-lg bg-muted p-1`), C.set_text(m, C.get(z) === "public" ? "Anyone with this link can view the document. The link may be forwarded." : "Only invited email addresses can comment or edit. A password fallback, when enabled, grants view-only access."), C.set_text(_, e), C.set_class(y, 1, `relative inline-flex h-5 w-9 items-center rounded-full transition-colors ${C.get(R) ? "bg-primary" : "bg-input"}`), C.set_attribute(y, "aria-checked", C.get(R)), C.set_attribute(y, "aria-label", t), C.set_class(b, 1, `inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${C.get(R) ? "translate-x-4" : "translate-x-0.5"}`), C.set_text(D, n), N.disabled = C.get(J) || C.get(z) === "restricted" && C.get(G).length === 0 || C.get(R) && C.get(V).length < 8, C.set_text(P, r);
241
+ }, [
242
+ () => n(),
243
+ () => ne(),
244
+ () => s(),
245
+ () => C.get(J) ? ee() : a()
246
+ ]), C.delegated("click", y, () => {
247
+ C.set(R, !C.get(R));
248
+ }), C.delegated("click", N, be), C.append(e, r);
249
+ }, j = (e) => {
250
+ var t = D(), n = C.child(t), i = C.child(n, !0);
251
+ C.reset(n);
252
+ var a = C.sibling(n, 2), o = C.child(a), s = C.child(o, !0);
253
+ C.reset(o);
254
+ var c = C.sibling(o, 2), l = C.child(c, !0);
255
+ C.reset(c), C.reset(a);
256
+ var d = C.sibling(a, 2), f = C.child(d, !0);
257
+ C.reset(d), C.reset(t), C.template_effect((e, t, n) => {
258
+ C.set_text(i, e), C.set_text(s, C.get(K)), C.set_text(l, t), C.set_text(f, n);
259
+ }, [
260
+ () => C.get(z) === "restricted" ? "Invitations were queued for delivery. This is not a public link." : r(),
261
+ () => C.get(q) ? u() : h(),
262
+ () => m()
263
+ ]), C.delegated("click", c, xe), C.delegated("click", d, Q), C.append(e, t);
264
+ };
265
+ C.if(k, (e) => {
266
+ C.get(K) ? e(j, -1) : e(A);
267
+ }), C.reset(b), C.reset(_), C.template_effect((e, t, n) => {
268
+ C.set_attribute(y, "aria-label", e), C.set_text(w, `${t ?? ""} "${(_e() || F() || N()) ?? ""}"`), C.set_attribute(T, "aria-label", n);
269
+ }, [
270
+ () => e(),
271
+ () => p(),
272
+ () => e()
273
+ ]), C.delegated("click", y, Q), C.delegated("click", T, Q), C.append(g, _);
274
+ };
275
+ C.if(Se, (e) => {
276
+ j() && e(Ce);
277
+ }), C.append(k, $), C.pop();
278
+ }
279
+ C.delegate(["click", "keydown"]);
280
+ //#endregion
281
+ export { k as t };
@@ -4,18 +4,18 @@ import { t as n } from "./chevron-down-C2ft7XUV.js";
4
4
  import { n as r, t as i } from "./folder-Cx60MRpi.js";
5
5
  import { t as a } from "./clock-Dz86E4Kz.js";
6
6
  import { t as o } from "./copy-CvCh4ZVt.js";
7
- import { n as s, r as c, t as l } from "./confirm-dialog-CzmoZw3a.js";
8
- import { t as u } from "./SettingsDialog-BDNgf5rv.js";
7
+ import { n as s, r as c, t as l } from "./confirm-dialog-BW2h2NE8.js";
8
+ import { t as u } from "./SettingsDialog-CS5L4nnU.js";
9
9
  import { n as d, t as f } from "./tag-DhVFHMcV.js";
10
10
  import { t as p } from "./x-cfdlccjs.js";
11
- import { a as m, i as h, o as ee, r as g, t as te } from "./dropdown-menu-CJ_7V3N0.js";
11
+ import { a as m, i as h, o as ee, r as g, t as te } from "./dropdown-menu-BXIl2E26.js";
12
12
  import { n as ne } from "./dist-DQa_OHOa.js";
13
- import { $r as _, Di as v, Ei as y, Er as b, Gn as x, Gt as re, Ii as S, Kt as C, Lt as w, O as T, Oi as E, Pi as ie, Qr as D, Ti as ae, Ut as O, Wn as oe, Xn as se, Xr as k, Yn as A, Zr as j, di as ce, ei as M, hi as le, ir as ue, ji as de, ki as fe, li as pe, nr as N, or as me, p as he, pi as ge, ri as P, rr as _e, tr as ve, ui as ye, vi as be, w as xe, wi as Se } from "./messages-DIovIZrK.js";
13
+ import { $r as _, Di as v, Ei as y, Er as b, Gn as x, Gt as re, Ii as S, Kt as C, Lt as w, O as T, Oi as E, Pi as ie, Qr as D, Ti as ae, Ut as O, Wn as oe, Xn as se, Xr as k, Yn as A, Zr as j, di as ce, ei as M, hi as le, ir as ue, ji as de, ki as fe, li as pe, nr as N, or as me, p as he, pi as ge, ri as P, rr as _e, tr as ve, ui as ye, vi as be, w as xe, wi as Se } from "./messages-DTRe4U2V.js";
14
14
  import { a as Ce, i as we, n as Te, t as Ee } from "./route-context-DYQlUfzL.js";
15
15
  import { t as F } from "./utils-DrfHTcei.js";
16
- import { a as De, i as Oe, n as ke, o as Ae, r as je, t as Me } from "./dialog-Ce79C9fd.js";
17
- import { t as Ne } from "./input-BWlOML_m.js";
18
- import { t as Pe } from "./label-C2HfJNQ2.js";
16
+ import { a as De, i as Oe, n as ke, o as Ae, r as je, t as Me } from "./dialog-C2iKObEu.js";
17
+ import { t as Ne } from "./input-eHFb2qiL.js";
18
+ import { t as Pe } from "./label-_I1iiaNU.js";
19
19
  import { n as Fe } from "./client-GbtOH90i.js";
20
20
  import { i as Ie, r as Le, s as Re } from "./categories-X7gK8azc.js";
21
21
  import { t as I } from "./context-D0zPFXZ4.js";
@@ -23,17 +23,17 @@ import { t as L } from "./resolve-BG4HgzpN.js";
23
23
  import { n as ze, t as Be } from "./dndzone-BzsOINtP.js";
24
24
  import { c as Ve, i as He, r as Ue, s as We, t as Ge } from "./documents-CwCs1rA7.js";
25
25
  import { c as Ke, r as qe, s as Je, t as Ye } from "./folders-ONG03Dkv.js";
26
- import { t as Xe } from "./DeleteDialog-8k6JYWCx.js";
27
- import { t as Ze } from "./clipboard-Cgzxc0_R.js";
28
- import { t as Qe } from "./ShareDialog-2Mty7hm4.js";
29
- import { t as $e } from "./CategoryDialog-CbXBMBZB.js";
26
+ import { t as Xe } from "./DeleteDialog-L1A3FhMM.js";
27
+ import { t as Ze } from "./ShareDialog-CwFa8mlk.js";
28
+ import { t as Qe } from "./clipboard-Cgzxc0_R.js";
29
+ import { t as $e } from "./CategoryDialog-t_WIvFAG.js";
30
30
  import { n as et, t as tt } from "./document-drop-coordinator-C4xHMjwC.js";
31
31
  import { a as nt, c as rt, d as it, f as at, i as ot, n as st, o as ct, p as lt, r as ut, s as dt, t as ft, u as pt } from "./subfolders-refresh-store.svelte-DxP21a1c.js";
32
- import { t as mt } from "./FolderNode-DAAn_T8_.js";
32
+ import { t as mt } from "./FolderNode-DzTqitR8.js";
33
33
  import { a as ht, i as R, n as z, o as B, s as gt, t as _t } from "./tag-store.svelte-ogVCMCbv.js";
34
- import { t as vt } from "./ConfirmDialog-DgMTQBq4.js";
34
+ import { t as vt } from "./ConfirmDialog-_LlrA--f.js";
35
35
  import { i as yt, o as bt } from "./tags-BdCaMGfj.js";
36
- import { t as xt } from "./TagCreateDialog-Bb0-Vtzh.js";
36
+ import { t as xt } from "./TagCreateDialog-C7Avn2_h.js";
37
37
  import "svelte/internal/disclose-version";
38
38
  import * as V from "svelte/internal/client";
39
39
  import { onDestroy as St, onMount as Ct, untrack as wt } from "svelte";
@@ -308,7 +308,7 @@ function Kt(e, i) {
308
308
  } finally {
309
309
  V.set(ln, null);
310
310
  }
311
- n && await Ze(n) && (V.set(cn, e, !0), un && clearTimeout(un), un = setTimeout(() => {
311
+ n && await Qe(n) && (V.set(cn, e, !0), un && clearTimeout(un), un = setTimeout(() => {
312
312
  V.set(cn, null), un = null;
313
313
  }, 2e3));
314
314
  }
@@ -1260,7 +1260,8 @@ function Kt(e, i) {
1260
1260
  }
1261
1261
  });
1262
1262
  }
1263
- return Qe(V.sibling(Ur, 2), {
1263
+ return Ze(V.sibling(Ur, 2), {
1264
+ displayMode: "standalone",
1264
1265
  get documentId() {
1265
1266
  return V.get(Xt);
1266
1267
  },
@@ -1344,7 +1345,7 @@ function Zt(e, n) {
1344
1345
  } finally {
1345
1346
  V.set(u, null);
1346
1347
  }
1347
- a && await Ze(a) && (V.set(l, t, !0), d && clearTimeout(d), d = setTimeout(() => {
1348
+ a && await Qe(a) && (V.set(l, t, !0), d && clearTimeout(d), d = setTimeout(() => {
1348
1349
  V.set(l, null), d = null;
1349
1350
  }, 2e3));
1350
1351
  }
@@ -1,10 +1,10 @@
1
1
  import { n as e } from "./dist-DQa_OHOa.js";
2
- import { Yn as t, er as n, ir as r, ni as i, or as a, ri as o, rr as s, ti as c } from "./messages-DIovIZrK.js";
2
+ import { Yn as t, er as n, ir as r, ni as i, or as a, ri as o, rr as s, ti as c } from "./messages-DTRe4U2V.js";
3
3
  import { a as l } from "./route-context-DYQlUfzL.js";
4
4
  import { t as u } from "./utils-DrfHTcei.js";
5
- import { a as d, i as f, n as p, o as m, r as h, t as g } from "./dialog-Ce79C9fd.js";
6
- import { t as _ } from "./input-BWlOML_m.js";
7
- import { t as v } from "./label-C2HfJNQ2.js";
5
+ import { a as d, i as f, n as p, o as m, r as h, t as g } from "./dialog-C2iKObEu.js";
6
+ import { t as _ } from "./input-eHFb2qiL.js";
7
+ import { t as v } from "./label-_I1iiaNU.js";
8
8
  import { c as y, l as b, n as x, r as S } from "./tags-BdCaMGfj.js";
9
9
  import "svelte/internal/disclose-version";
10
10
  import * as C from "svelte/internal/client";
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "../attachments-B8AuDjno.js";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../attachments-B2aH3hXF.js";
2
2
  export { a as confirmAttachment, n as isFileSizeAllowed, i as isImageFile, t as listAttachments, e as presignAttachment, r as uploadAttachment };
@@ -1,2 +1,2 @@
1
- import { a as e, i as t, n, r, t as i } from "../settings-DSrUl4hW.js";
1
+ import { a as e, i as t, n, r, t as i } from "../settings-BR48ihB4.js";
2
2
  export { i as deleteAccount, n as getEmbeddingConfig, r as getProfile, t as updateEmbeddingConfig, e as updateProfile };
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./Icon-Db-o32_E.js";
2
- import { n as t } from "./SettingsDialog-BDNgf5rv.js";
3
- import { t as n } from "./Sidebar-DX08utdV.js";
4
- import { D as r } from "./messages-DIovIZrK.js";
2
+ import { n as t } from "./SettingsDialog-CS5L4nnU.js";
3
+ import { t as n } from "./Sidebar-CDaFFmaQ.js";
4
+ import { D as r } from "./messages-DTRe4U2V.js";
5
5
  import { o as i, r as a } from "./route-context-DYQlUfzL.js";
6
6
  import { t as o } from "./editor-preferences.svelte-Bt_A9k7n.js";
7
7
  import { d as s } from "./subfolders-refresh-store.svelte-DxP21a1c.js";
@@ -11,17 +11,18 @@ function n(t, n, r) {
11
11
  }
12
12
  }, r);
13
13
  }
14
- function r(t, n, r, i, a) {
14
+ function r(t, n, r, i, a, o) {
15
15
  return e(`/api/documents/${t}/attachments/confirm`, {
16
16
  method: "POST",
17
17
  body: {
18
18
  key: n,
19
- filename: r.name,
20
- contentType: r.type,
21
- size: r.size,
22
- ...i ? { quotaReservationId: i } : {}
19
+ uploadToken: r,
20
+ filename: i.name,
21
+ contentType: i.type,
22
+ size: i.size,
23
+ ...a ? { quotaReservationId: a } : {}
23
24
  }
24
- }, a);
25
+ }, o);
25
26
  }
26
27
  async function i(e, t, i) {
27
28
  let a = await n(e, t, i), o = new AbortController(), s = setTimeout(() => o.abort(), 5 * 6e4), c;
@@ -33,12 +34,12 @@ async function i(e, t, i) {
33
34
  signal: o.signal
34
35
  });
35
36
  } catch (n) {
36
- throw await r(e, a.key, t, a.quotaReservationId, i).catch(() => void 0), n;
37
+ throw await r(e, a.key, a.uploadToken, t, a.quotaReservationId, i).catch(() => void 0), n;
37
38
  } finally {
38
39
  clearTimeout(s);
39
40
  }
40
- if (!c.ok) throw await r(e, a.key, t, a.quotaReservationId, i).catch(() => void 0), Error(`Storage upload failed: ${c.status} ${c.statusText}`);
41
- return r(e, a.key, t, a.quotaReservationId, i);
41
+ if (!c.ok) throw await r(e, a.key, a.uploadToken, t, a.quotaReservationId, i).catch(() => void 0), Error(`Storage upload failed: ${c.status} ${c.statusText}`);
42
+ return r(e, a.key, a.uploadToken, t, a.quotaReservationId, i);
42
43
  }
43
44
  function a(t, n) {
44
45
  return e(`/api/documents/${t}/attachments`, {}, n);
@@ -207,7 +207,7 @@ function g(e) {
207
207
  }
208
208
  }
209
209
  //#endregion
210
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/parser.mjs
210
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/parser.mjs
211
211
  var _ = {
212
212
  proto: /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,
213
213
  constructor: /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,
@@ -285,7 +285,7 @@ function ie(e) {
285
285
  return !re.includes(t.protocol);
286
286
  }
287
287
  //#endregion
288
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/fetch-plugins.mjs
288
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/fetch-plugins.mjs
289
289
  var ae = {
290
290
  id: "redirect",
291
291
  name: "Redirect",
@@ -391,7 +391,7 @@ var ae = {
391
391
  };
392
392
  });
393
393
  //#endregion
394
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/equality.mjs
394
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/equality.mjs
395
395
  function A(e) {
396
396
  if (typeof e != "object" || !e) return !1;
397
397
  let t = Object.getPrototypeOf(e);
@@ -418,7 +418,7 @@ function fe(e, t) {
418
418
  });
419
419
  }
420
420
  //#endregion
421
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/broadcast-channel.mjs
421
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/broadcast-channel.mjs
422
422
  var M = Symbol.for("better-auth:broadcast-channel"), pe = () => Math.floor(Date.now() / 1e3), me = class {
423
423
  listeners = /* @__PURE__ */ new Set();
424
424
  name;
@@ -454,7 +454,7 @@ function N(e = "better-auth.message") {
454
454
  return globalThis[M] || (globalThis[M] = new me(e)), globalThis[M];
455
455
  }
456
456
  //#endregion
457
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/focus-manager.mjs
457
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/focus-manager.mjs
458
458
  var P = Symbol.for("better-auth:focus-manager"), he = class {
459
459
  listeners = /* @__PURE__ */ new Set();
460
460
  subscribe(e) {
@@ -479,7 +479,7 @@ function F() {
479
479
  return globalThis[P] || (globalThis[P] = new he()), globalThis[P];
480
480
  }
481
481
  //#endregion
482
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/online-manager.mjs
482
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/online-manager.mjs
483
483
  var I = Symbol.for("better-auth:online-manager"), ge = class {
484
484
  listeners = /* @__PURE__ */ new Set();
485
485
  isOnline = typeof navigator < "u" ? navigator.onLine : !0;
@@ -503,7 +503,7 @@ function L() {
503
503
  return globalThis[I] || (globalThis[I] = new ge()), globalThis[I];
504
504
  }
505
505
  //#endregion
506
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/session-refresh.mjs
506
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/session-refresh.mjs
507
507
  var R = () => Math.floor(Date.now() / 1e3), _e = 5;
508
508
  function ve(e) {
509
509
  let { fetchSession: t, shouldPollSession: n = () => !0, sessionSignal: r, options: i = {} } = e, a = i.sessionOptions?.refetchInterval ?? 0, o = i.sessionOptions?.refetchOnWindowFocus ?? !0, s = i.sessionOptions?.refetchWhenOffline ?? !1, c = {
@@ -565,7 +565,7 @@ function ve(e) {
565
565
  };
566
566
  }
567
567
  //#endregion
568
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/session-atom.mjs
568
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/session-atom.mjs
569
569
  var ye = () => typeof window > "u";
570
570
  function z(e) {
571
571
  return typeof e == "object" && e && "data" in e && "error" in e ? e : {
@@ -1164,7 +1164,7 @@ var $ = async (e, t) => {
1164
1164
  };
1165
1165
  };
1166
1166
  //#endregion
1167
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/utils/is-atom.mjs
1167
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/utils/is-atom.mjs
1168
1168
  function $e(e) {
1169
1169
  return typeof e == "object" && !!e && "get" in e && typeof e.get == "function" && "lc" in e && typeof e.lc == "number";
1170
1170
  }
@@ -1181,7 +1181,7 @@ function it(e) {
1181
1181
  return rt(e).map((e) => e.toLowerCase()).join("-");
1182
1182
  }
1183
1183
  //#endregion
1184
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/proxy.mjs
1184
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/proxy.mjs
1185
1185
  function at(e, t, n) {
1186
1186
  let r = t[e], { fetchOptions: i, query: a, ...o } = n || {};
1187
1187
  return r || (i?.method ? i.method : o && Object.keys(o).length > 0 ? "POST" : "GET");
@@ -1235,7 +1235,7 @@ function ot(e, t, n, r, i) {
1235
1235
  return a();
1236
1236
  }
1237
1237
  //#endregion
1238
- //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/vanilla.mjs
1238
+ //#region ../node_modules/.bun/better-auth@1.6.22+81bceec6070f2f33/node_modules/better-auth/dist/client/vanilla.mjs
1239
1239
  function st(e) {
1240
1240
  let { pluginPathMethods: t, pluginsActions: n, pluginsAtoms: r, $fetch: i, atomListeners: a, $store: o } = Qe(e), s = {};
1241
1241
  for (let [e, t] of Object.entries(r)) s[`use${et(e)}`] = t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../CategoryDialog-CbXBMBZB.js";
1
+ import { t as e } from "../CategoryDialog-t_WIvFAG.js";
2
2
  export { e as CategoryDialog };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../CreateSnapshotDialog-FUq-ZfBH.js";
1
+ import { t as e } from "../CreateSnapshotDialog-DW3PwAt5.js";
2
2
  export { e as CreateSnapshotDialog };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../DeleteDialog-8k6JYWCx.js";
1
+ import { t as e } from "../DeleteDialog-L1A3FhMM.js";
2
2
  export { e as DeleteDialog };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../HiAiEditor-DSVG3GNd.js";
1
+ import { t as e } from "../../HiAiEditor-B7MK19_j.js";
2
2
  import "svelte/internal/disclose-version";
3
3
  import * as t from "svelte/internal/client";
4
4
  //#region src/lib/components/editor/CompactEditor.svelte
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../HiAiEditor-DSVG3GNd.js";
1
+ import { t as e } from "../../HiAiEditor-B7MK19_j.js";
2
2
  export { e as DocsmintDocumentEditorHost };
@@ -1,4 +1,4 @@
1
- import { Mi as e, ji as t } from "../../messages-DIovIZrK.js";
1
+ import { Mi as e, ji as t } from "../../messages-DTRe4U2V.js";
2
2
  import "svelte/internal/disclose-version";
3
3
  import * as n from "svelte/internal/client";
4
4
  //#region src/lib/components/editor/DocumentTitle.svelte