@hiai-gg/docsmint 0.3.6 → 0.3.7

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 (141) hide show
  1. package/dist/backend/index.js +1 -1
  2. package/dist/frontend/CategoryDialog--rIE7FrH.js +580 -0
  3. package/dist/frontend/ConfirmDialog-Cpzyb55f.js +212 -0
  4. package/dist/frontend/CreateSnapshotDialog-CmkV-n2A.js +216 -0
  5. package/dist/frontend/DatePicker-Byynca7V.js +257 -0
  6. package/dist/frontend/DeleteDialog-ap6nOywZ.js +174 -0
  7. package/dist/frontend/FolderDialog-DmN_trV0.js +247 -0
  8. package/dist/frontend/FolderNode-C4B8a2fd.js +317 -0
  9. package/dist/frontend/FolderTreeSelector-D6ijiZTA.js +100 -0
  10. package/dist/frontend/Icon-DtNo0N1U.js +64 -0
  11. package/dist/frontend/SettingsDialog-2kTaTXAs.js +992 -0
  12. package/dist/frontend/ShareDialog-BBDGNF5n.js +165 -0
  13. package/dist/frontend/TagCreateDialog-DiLZnJo4.js +258 -0
  14. package/dist/frontend/api/attachments.d.ts +6 -0
  15. package/dist/frontend/api/attachments.js +2 -0
  16. package/dist/frontend/api/categories.js +1 -1
  17. package/dist/frontend/api/documents.js +1 -1
  18. package/dist/frontend/api/folders.js +1 -1
  19. package/dist/frontend/api/settings.js +1 -1
  20. package/dist/frontend/api/share.d.ts +5 -0
  21. package/dist/frontend/api/share.js +2 -0
  22. package/dist/frontend/api/tags.js +1 -1
  23. package/dist/frontend/api-keys-CpkrA8rD.js +35 -0
  24. package/dist/frontend/attachments-BuILSs56.js +50 -0
  25. package/dist/frontend/{settings-PCrOtied.js → auth-client-Cygmp1I2.js} +205 -265
  26. package/dist/frontend/awareness-snQ3RD9f.js +3714 -0
  27. package/dist/frontend/bundle-mjs-CP6Owz-8.js +1723 -0
  28. package/dist/frontend/camera-B7dAOd4s.js +28 -0
  29. package/dist/frontend/{categories-BE6ZpZl8.js → categories-izQovv2w.js} +1 -1
  30. package/dist/frontend/check-CDwRlG9T.js +24 -0
  31. package/dist/frontend/chevron-down-B7ZrjUmT.js +24 -0
  32. package/dist/frontend/circle-check-CDqeMB2d.js +28 -0
  33. package/dist/frontend/{client-C6QQGb0e.js → client-Bc5Fzx40.js} +833 -814
  34. package/dist/frontend/{client-B9hzI0W8.js → client-GbtOH90i.js} +1 -1
  35. package/dist/frontend/clipboard-Cgzxc0_R.js +16 -0
  36. package/dist/frontend/clock-Ck5Sn-Zl.js +28 -0
  37. package/dist/frontend/clsx-nmtDPO_P.js +16 -0
  38. package/dist/frontend/collaboration.d.ts +6 -0
  39. package/dist/frontend/collaboration.js +182 -0
  40. package/dist/frontend/components/category-dialog.d.ts +2 -0
  41. package/dist/frontend/components/category-dialog.js +2 -0
  42. package/dist/frontend/components/create-snapshot-dialog.d.ts +2 -0
  43. package/dist/frontend/components/create-snapshot-dialog.js +2 -0
  44. package/dist/frontend/components/delete-dialog.d.ts +2 -0
  45. package/dist/frontend/components/delete-dialog.js +2 -0
  46. package/dist/frontend/components/editor/document-editor.d.ts +3 -0
  47. package/dist/frontend/components/editor/document-editor.js +3021 -0
  48. package/dist/frontend/components/editor/document-title.d.ts +2 -0
  49. package/dist/frontend/components/editor/document-title.js +31 -0
  50. package/dist/frontend/components/editor/docx-serializer.d.ts +2 -0
  51. package/dist/frontend/components/editor/docx-serializer.js +14600 -0
  52. package/dist/frontend/components/editor/extensions.d.ts +2 -0
  53. package/dist/frontend/components/editor/extensions.js +2 -0
  54. package/dist/frontend/components/editor/markdown-toggle.d.ts +2 -0
  55. package/dist/frontend/components/editor/markdown-toggle.js +72 -0
  56. package/dist/frontend/components/editor/markdown.d.ts +1 -0
  57. package/dist/frontend/components/editor/markdown.js +2 -0
  58. package/dist/frontend/components/folder-node.d.ts +3 -0
  59. package/dist/frontend/components/folder-node.js +2 -0
  60. package/dist/frontend/components/folder-tree-selector.d.ts +2 -0
  61. package/dist/frontend/components/folder-tree-selector.js +2 -0
  62. package/dist/frontend/components/save-as-dialog.d.ts +2 -0
  63. package/dist/frontend/components/save-as-dialog.js +254 -0
  64. package/dist/frontend/components/settings.js +1 -1
  65. package/dist/frontend/components/share-dialog.d.ts +2 -0
  66. package/dist/frontend/components/share-dialog.js +2 -0
  67. package/dist/frontend/components/sidebar.js +1206 -3762
  68. package/dist/frontend/components/tag-create-dialog.d.ts +2 -0
  69. package/dist/frontend/components/tag-create-dialog.js +2 -0
  70. package/dist/frontend/components/version-history.d.ts +2 -0
  71. package/dist/frontend/components/version-history.js +293 -0
  72. package/dist/frontend/{context-DbnW5yib.js → context-BMD6XTPe.js} +0 -3
  73. package/dist/frontend/copy-CMAA6GP0.js +31 -0
  74. package/dist/frontend/dashboard.js +1148 -1224
  75. package/dist/frontend/{SettingsDialog-D4pgFD0D.js → db-ByrlYfaI.js} +923 -2002
  76. package/dist/frontend/dialog-BDkiG42a.js +213 -0
  77. package/dist/frontend/disclose-version-5I57E3LD.js +3 -0
  78. package/dist/frontend/dndzone-BzsOINtP.js +1199 -0
  79. package/dist/frontend/doc-tabs.d.ts +7 -0
  80. package/dist/frontend/doc-tabs.js +14 -0
  81. package/dist/frontend/document-drop-coordinator-C4xHMjwC.js +68 -0
  82. package/dist/frontend/document-drop-coordinator.d.ts +2 -0
  83. package/dist/frontend/document-drop-coordinator.js +2 -0
  84. package/dist/frontend/{documents-DFVS9SsL.js → documents-BsDkvzCm.js} +1 -1
  85. package/dist/frontend/editorExtensions-BMHvUbdk.js +27021 -0
  86. package/dist/frontend/ellipsis-vertical-BBuPldbW.js +519 -0
  87. package/dist/frontend/extension.js +6 -5
  88. package/dist/frontend/floating-layer-anchor-C51M4l6v.js +4513 -0
  89. package/dist/frontend/folder-TQjKY4yn.js +44 -0
  90. package/dist/frontend/folder-refresh.d.ts +8 -0
  91. package/dist/frontend/folder-refresh.js +2 -0
  92. package/dist/frontend/{folders-CGe9diAG.js → folders-CTuV_JtU.js} +1 -1
  93. package/dist/frontend/frontend.css +1 -1
  94. package/dist/frontend/i18n.js +1 -1
  95. package/dist/frontend/identity-DyWeNzu_.js +69 -0
  96. package/dist/frontend/index-client-jobkrWVL.js +86 -0
  97. package/dist/frontend/input-CBI6p4Xl.js +23 -0
  98. package/dist/frontend/keyboard.d.ts +14 -0
  99. package/dist/frontend/keyboard.js +2 -0
  100. package/dist/frontend/keyboard.svelte-D7H8DihC.js +133 -0
  101. package/dist/frontend/label-C-GkhEp4.js +30 -0
  102. package/dist/frontend/loader-circle-Bk-WFz9g.js +267 -0
  103. package/dist/frontend/markdown-BwnyjITU.js +11 -0
  104. package/dist/frontend/messages-BpYaLbzE.js +1091 -0
  105. package/dist/frontend/offline/identity.d.ts +6 -0
  106. package/dist/frontend/offline/identity.js +2 -0
  107. package/dist/frontend/resolve-BG4HgzpN.js +19 -0
  108. package/dist/frontend/rolldown-runtime-CWhphoD1.js +23 -0
  109. package/dist/frontend/rotate-ccw-CleZtJ5D.js +24 -0
  110. package/dist/frontend/search.js +637 -628
  111. package/dist/frontend/select-value-CvrWRkXW.js +1436 -0
  112. package/dist/frontend/settings-blyobazp.js +62 -0
  113. package/dist/frontend/share-Cu7SSJuJ.js +28 -0
  114. package/dist/frontend/shared-document.js +41 -40
  115. package/dist/frontend/subfolders-refresh-store.svelte-BsheoQma.js +65 -0
  116. package/dist/frontend/{tag-C5xrg-bb.js → tag-Dx3SmucJ.js} +7 -7
  117. package/dist/frontend/tag-store.svelte-CIaF4sdZ.js +29 -0
  118. package/dist/frontend/{tags-DVXTut0p.js → tags-CtCV0Djo.js} +1 -1
  119. package/dist/frontend/textarea-Dfp78XlL.js +23 -0
  120. package/dist/frontend/theme.js +1 -1
  121. package/dist/frontend/{theme.svelte-ei0QxXa8.js → theme.svelte-CROg1Hi5.js} +7 -7
  122. package/dist/frontend/types.d.ts +6 -0
  123. package/dist/frontend/types.js +0 -0
  124. package/dist/frontend/utils/clipboard.d.ts +1 -0
  125. package/dist/frontend/utils/clipboard.js +2 -0
  126. package/dist/frontend/utils/dndzone.d.ts +4 -0
  127. package/dist/frontend/utils/dndzone.js +2 -0
  128. package/dist/frontend/utils-C0OW2678.js +20 -0
  129. package/dist/frontend/utils-D8kmM3ub.js +8 -0
  130. package/dist/frontend/utils.d.ts +4 -0
  131. package/dist/frontend/utils.js +2 -0
  132. package/dist/frontend/x-DaTdeDXv.js +24 -0
  133. package/package.json +109 -1
  134. package/packages/cli/src/index.ts +1 -1
  135. package/packages/mcp-server/src/index.ts +1 -1
  136. package/dist/frontend/DatePicker-BcMD49PV.js +0 -275
  137. package/dist/frontend/ShareDialog-Dzh7rV7J.js +0 -1317
  138. package/dist/frontend/input-ieWIt8I7.js +0 -257
  139. package/dist/frontend/messages-CTGAsqFu.js +0 -1106
  140. package/dist/frontend/resolve-Bl6xmJl_.js +0 -2068
  141. package/dist/frontend/tag-store.svelte-B3839FYq.js +0 -6152
@@ -1,73 +1,72 @@
1
- import { t as e } from "./client-B9hzI0W8.js";
2
1
  //#region ../node_modules/.bun/@better-auth+core@1.6.22+97ef1a25343ecf7e/node_modules/@better-auth/core/dist/env/env-impl.mjs
3
- var t = Object.create(null), n = (e) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? t : globalThis), r = new Proxy(t, {
4
- get(e, r) {
5
- return n()[r] ?? t[r];
2
+ var e = Object.create(null), t = (t) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (t ? e : globalThis), n = new Proxy(e, {
3
+ get(n, r) {
4
+ return t()[r] ?? e[r];
6
5
  },
7
- has(e, r) {
8
- return r in n() || r in t;
6
+ has(n, r) {
7
+ return r in t() || r in e;
9
8
  },
10
- set(e, t, r) {
11
- let i = n(!0);
12
- return i[t] = r, !0;
9
+ set(e, n, r) {
10
+ let i = t(!0);
11
+ return i[n] = r, !0;
13
12
  },
14
- deleteProperty(e, t) {
15
- if (!t) return !1;
16
- let r = n(!0);
17
- return delete r[t], !0;
13
+ deleteProperty(e, n) {
14
+ if (!n) return !1;
15
+ let r = t(!0);
16
+ return delete r[n], !0;
18
17
  },
19
18
  ownKeys() {
20
- let e = n(!0);
19
+ let e = t(!0);
21
20
  return Object.keys(e);
22
21
  }
23
22
  });
24
- r.NODE_ENV;
25
- function i(e, t) {
23
+ n.NODE_ENV;
24
+ function r(e, t) {
26
25
  return typeof process < "u" && process.env ? process.env[e] ?? t : typeof Deno < "u" ? Deno.env.get(e) ?? t : typeof Bun < "u" ? Bun.env[e] ?? t : t;
27
26
  }
28
27
  Object.freeze({
29
28
  get BETTER_AUTH_SECRET() {
30
- return i("BETTER_AUTH_SECRET");
29
+ return r("BETTER_AUTH_SECRET");
31
30
  },
32
31
  get AUTH_SECRET() {
33
- return i("AUTH_SECRET");
32
+ return r("AUTH_SECRET");
34
33
  },
35
34
  get BETTER_AUTH_TELEMETRY() {
36
- return i("BETTER_AUTH_TELEMETRY");
35
+ return r("BETTER_AUTH_TELEMETRY");
37
36
  },
38
37
  get BETTER_AUTH_TELEMETRY_ID() {
39
- return i("BETTER_AUTH_TELEMETRY_ID");
38
+ return r("BETTER_AUTH_TELEMETRY_ID");
40
39
  },
41
40
  get NODE_ENV() {
42
- return i("NODE_ENV", "development");
41
+ return r("NODE_ENV", "development");
43
42
  },
44
43
  get PACKAGE_VERSION() {
45
- return i("PACKAGE_VERSION", "0.0.0");
44
+ return r("PACKAGE_VERSION", "0.0.0");
46
45
  },
47
46
  get BETTER_AUTH_TELEMETRY_ENDPOINT() {
48
- return i("BETTER_AUTH_TELEMETRY_ENDPOINT", "");
47
+ return r("BETTER_AUTH_TELEMETRY_ENDPOINT", "");
49
48
  }
50
49
  });
51
50
  //#endregion
52
51
  //#region ../node_modules/.bun/better-call@1.3.7+68a1e3a0c4588df3/node_modules/better-call/dist/error.mjs
53
- function a() {
52
+ function i() {
54
53
  let e = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
55
54
  return e === void 0 ? Object.isExtensible(Error) : Object.prototype.hasOwnProperty.call(e, "writable") ? e.writable : e.set !== void 0;
56
55
  }
57
- function o(e) {
56
+ function a(e) {
58
57
  let t = e.split("\n at ");
59
58
  return t.length <= 1 ? e : (t.splice(1, 1), t.join("\n at "));
60
59
  }
61
- function s(e, t) {
60
+ function o(e, t) {
62
61
  class n extends e {
63
62
  #e;
64
63
  constructor(...e) {
65
- if (a()) {
64
+ if (i()) {
66
65
  let t = Error.stackTraceLimit;
67
66
  Error.stackTraceLimit = 0, super(...e), Error.stackTraceLimit = t;
68
67
  } else super(...e);
69
68
  let t = (/* @__PURE__ */ Error()).stack;
70
- t && (this.#e = o(t.replace(/^Error/, this.name)));
69
+ t && (this.#e = a(t.replace(/^Error/, this.name)));
71
70
  }
72
71
  get errorStack() {
73
72
  return this.#e;
@@ -81,7 +80,7 @@ function s(e, t) {
81
80
  configurable: !0
82
81
  }), n;
83
82
  }
84
- var c = {
83
+ var s = {
85
84
  OK: 200,
86
85
  CREATED: 201,
87
86
  ACCEPTED: 202,
@@ -133,44 +132,44 @@ var c = {
133
132
  NOT_EXTENDED: 510,
134
133
  NETWORK_AUTHENTICATION_REQUIRED: 511
135
134
  };
136
- s(class extends Error {
137
- constructor(e = "INTERNAL_SERVER_ERROR", t = void 0, n = {}, r = typeof e == "number" ? e : c[e]) {
135
+ o(class extends Error {
136
+ constructor(e = "INTERNAL_SERVER_ERROR", t = void 0, n = {}, r = typeof e == "number" ? e : s[e]) {
138
137
  super(t?.message, t?.cause ? { cause: t.cause } : void 0), this.status = e, this.body = t, this.headers = n, this.statusCode = r, this.name = "APIError", this.status = e, this.headers = n, this.statusCode = r, this.body = t;
139
138
  }
140
139
  }, Error);
141
140
  //#endregion
142
141
  //#region ../node_modules/.bun/@better-auth+core@1.6.22+97ef1a25343ecf7e/node_modules/@better-auth/core/dist/error/index.mjs
143
- var l = class extends Error {
142
+ var c = class extends Error {
144
143
  constructor(e, t) {
145
144
  super(e, t), this.name = "BetterAuthError", this.message = e, this.stack = "";
146
145
  }
147
- }, u = 47;
148
- function d(e) {
146
+ }, l = 47;
147
+ function u(e) {
149
148
  let t = e.length;
150
- for (; t > 0 && e.charCodeAt(t - 1) === u;) t--;
149
+ for (; t > 0 && e.charCodeAt(t - 1) === l;) t--;
151
150
  return t === e.length ? e : e.slice(0, t);
152
151
  }
153
- function f(e) {
152
+ function d(e) {
154
153
  try {
155
- return (d(new URL(e).pathname) || "/") !== "/";
154
+ return (u(new URL(e).pathname) || "/") !== "/";
156
155
  } catch {
157
- throw new l(`Invalid base URL: ${e}. Please provide a valid base URL.`);
156
+ throw new c(`Invalid base URL: ${e}. Please provide a valid base URL.`);
158
157
  }
159
158
  }
160
- function p(e) {
159
+ function f(e) {
161
160
  try {
162
161
  let t = new URL(e);
163
- if (t.protocol !== "http:" && t.protocol !== "https:") throw new l(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`);
162
+ if (t.protocol !== "http:" && t.protocol !== "https:") throw new c(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`);
164
163
  } catch (t) {
165
- throw t instanceof l ? t : new l(`Invalid base URL: ${e}. Please provide a valid base URL.`, { cause: t });
164
+ throw t instanceof c ? t : new c(`Invalid base URL: ${e}. Please provide a valid base URL.`, { cause: t });
166
165
  }
167
166
  }
168
- function m(e, t = "/api/auth") {
169
- if (p(e), f(e)) return e;
170
- let n = d(e);
167
+ function p(e, t = "/api/auth") {
168
+ if (f(e), d(e)) return e;
169
+ let n = u(e);
171
170
  return !t || t === "/" ? n : (t = t.startsWith("/") ? t : `/${t}`, `${n}${t}`);
172
171
  }
173
- function h(e, t) {
172
+ function m(e, t) {
174
173
  return !e || e.trim() === "" ? !1 : t === "proto" ? e === "http" || e === "https" : t === "host" ? [
175
174
  /\.\./,
176
175
  /\0/,
@@ -182,24 +181,24 @@ function h(e, t) {
182
181
  /data:/i
183
182
  ].some((t) => t.test(e)) ? !1 : /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e) || /^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e) || /^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e) || /^localhost(:[0-9]{1,5})?$/i.test(e) : !1;
184
183
  }
185
- function g(e, t, n, i, a) {
186
- if (e) return m(e, t);
184
+ function h(e, t, r, i, a) {
185
+ if (e) return p(e, t);
187
186
  if (i !== !1) {
188
- let e = r.BETTER_AUTH_URL || r.NEXT_PUBLIC_BETTER_AUTH_URL || r.PUBLIC_BETTER_AUTH_URL || r.NUXT_PUBLIC_BETTER_AUTH_URL || r.NUXT_PUBLIC_AUTH_URL || (r.BASE_URL === "/" ? void 0 : r.BASE_URL);
189
- if (e) return m(e, t);
187
+ let e = n.BETTER_AUTH_URL || n.NEXT_PUBLIC_BETTER_AUTH_URL || n.PUBLIC_BETTER_AUTH_URL || n.NUXT_PUBLIC_BETTER_AUTH_URL || n.NUXT_PUBLIC_AUTH_URL || (n.BASE_URL === "/" ? void 0 : n.BASE_URL);
188
+ if (e) return p(e, t);
190
189
  }
191
- let o = n?.headers.get("x-forwarded-host"), s = n?.headers.get("x-forwarded-proto");
192
- if (o && s && a && h(s, "proto") && h(o, "host")) try {
193
- return m(`${s}://${o}`, t);
190
+ let o = r?.headers.get("x-forwarded-host"), s = r?.headers.get("x-forwarded-proto");
191
+ if (o && s && a && m(s, "proto") && m(o, "host")) try {
192
+ return p(`${s}://${o}`, t);
194
193
  } catch {}
195
- if (n) {
196
- let e = _(n.url);
197
- if (!e) throw new l("Could not get origin from request. Please provide a valid base URL.");
198
- return m(e, t);
194
+ if (r) {
195
+ let e = g(r.url);
196
+ if (!e) throw new c("Could not get origin from request. Please provide a valid base URL.");
197
+ return p(e, t);
199
198
  }
200
- if (typeof window < "u" && window.location) return m(window.location.origin, t);
199
+ if (typeof window < "u" && window.location) return p(window.location.origin, t);
201
200
  }
202
- function _(e) {
201
+ function g(e) {
203
202
  try {
204
203
  let t = new URL(e);
205
204
  return t.origin === "null" ? null : t.origin;
@@ -209,12 +208,12 @@ function _(e) {
209
208
  }
210
209
  //#endregion
211
210
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/parser.mjs
212
- var v = {
211
+ var _ = {
213
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*:/,
214
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*:/,
215
214
  protoShort: /"__proto__"\s*:/,
216
215
  constructorShort: /"constructor"\s*:/
217
- }, y = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/, b = {
216
+ }, v = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/, y = {
218
217
  true: !0,
219
218
  false: !1,
220
219
  null: null,
@@ -222,30 +221,30 @@ var v = {
222
221
  nan: NaN,
223
222
  infinity: Infinity,
224
223
  "-infinity": -Infinity
225
- }, x = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;
226
- function ee(e) {
224
+ }, b = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;
225
+ function x(e) {
227
226
  return e instanceof Date && !isNaN(e.getTime());
228
227
  }
229
- function te(e) {
230
- let t = x.exec(e);
228
+ function ee(e) {
229
+ let t = b.exec(e);
231
230
  if (!t) return null;
232
231
  let [, n, r, i, a, o, s, c, l, u, d] = t, f = new Date(Date.UTC(parseInt(n, 10), parseInt(r, 10) - 1, parseInt(i, 10), parseInt(a, 10), parseInt(o, 10), parseInt(s, 10), c ? parseInt(c.padEnd(3, "0"), 10) : 0));
233
232
  if (l) {
234
233
  let e = (parseInt(u, 10) * 60 + parseInt(d, 10)) * (l === "+" ? -1 : 1);
235
234
  f.setUTCMinutes(f.getUTCMinutes() + e);
236
235
  }
237
- return ee(f) ? f : null;
236
+ return x(f) ? f : null;
238
237
  }
239
- function ne(e, t = {}) {
238
+ function te(e, t = {}) {
240
239
  let { strict: n = !1, warnings: r = !1, reviver: i, parseDates: a = !0 } = t;
241
240
  if (typeof e != "string") return e;
242
241
  let o = e.trim(), s = o.toLowerCase();
243
- if (s.length <= 9 && s in b) return b[s];
244
- if (!y.test(o)) {
242
+ if (s.length <= 9 && s in y) return y[s];
243
+ if (!v.test(o)) {
245
244
  if (n) throw SyntaxError("[better-json] Invalid JSON");
246
245
  return e;
247
246
  }
248
- if (Object.entries(v).some(([e, t]) => {
247
+ if (Object.entries(_).some(([e, t]) => {
249
248
  let n = t.test(o);
250
249
  return n && r && console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`), n;
251
250
  }) && n) throw Error("[better-json] Potential prototype pollution attempt detected");
@@ -256,7 +255,7 @@ function ne(e, t = {}) {
256
255
  return;
257
256
  }
258
257
  if (a && typeof t == "string") {
259
- let e = te(t);
258
+ let e = ee(t);
260
259
  if (e) return e;
261
260
  }
262
261
  return i ? i(e, t) : t;
@@ -266,36 +265,36 @@ function ne(e, t = {}) {
266
265
  return e;
267
266
  }
268
267
  }
269
- function re(e, t = { strict: !0 }) {
270
- return ne(e, t);
268
+ function ne(e, t = { strict: !0 }) {
269
+ return te(e, t);
271
270
  }
272
271
  //#endregion
273
272
  //#region ../node_modules/.bun/@better-auth+core@1.6.22+97ef1a25343ecf7e/node_modules/@better-auth/core/dist/utils/url.mjs
274
- var ie = [
273
+ var re = [
275
274
  "javascript:",
276
275
  "data:",
277
276
  "vbscript:"
278
277
  ];
279
- function ae(e) {
278
+ function ie(e) {
280
279
  let t;
281
280
  try {
282
281
  t = new URL(e);
283
282
  } catch {
284
283
  return !0;
285
284
  }
286
- return !ie.includes(t.protocol);
285
+ return !re.includes(t.protocol);
287
286
  }
288
287
  //#endregion
289
288
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/fetch-plugins.mjs
290
- var oe = {
289
+ var ae = {
291
290
  id: "redirect",
292
291
  name: "Redirect",
293
292
  hooks: { onSuccess(e) {
294
- if (e.data?.url && e.data?.redirect && ae(e.data.url) && typeof window < "u" && window.location && window.location) try {
293
+ if (e.data?.url && e.data?.redirect && ie(e.data.url) && typeof window < "u" && window.location && window.location) try {
295
294
  window.location.href = e.data.url;
296
295
  } catch {}
297
296
  } }
298
- }, S = Symbol("clean"), C = [], w = 0, T = 4, se = globalThis.nanostoresGlobal ||= { epoch: 0 }, E = /* @__NO_SIDE_EFFECTS__ */ (e) => {
297
+ }, S = Symbol("clean"), C = [], w = 0, T = 4, oe = globalThis.nanostoresGlobal ||= { epoch: 0 }, E = /* @__NO_SIDE_EFFECTS__ */ (e) => {
299
298
  let t = [], n = {
300
299
  get() {
301
300
  return n.lc || n.listen(() => {})(), n.value;
@@ -310,7 +309,7 @@ var oe = {
310
309
  };
311
310
  },
312
311
  notify(e, r) {
313
- se.epoch++;
312
+ oe.epoch++;
314
313
  let i = !C.length;
315
314
  for (let i of t) C.push(i, n.value, e, r);
316
315
  if (i) {
@@ -332,7 +331,7 @@ var oe = {
332
331
  return process.env.NODE_ENV !== "production" && (n[S] = () => {
333
332
  t = [], n.lc = 0, n.off();
334
333
  }), n;
335
- }, ce = 2, le = 5, D = 6, O = 10, k = (e, t, n, r) => (e.events = e.events || {}, e.events[n + O] || (e.events[n + O] = r((t) => {
334
+ }, se = 2, ce = 5, D = 6, O = 10, k = (e, t, n, r) => (e.events = e.events || {}, e.events[n + O] || (e.events[n + O] = r((t) => {
336
335
  e.events[n].reduceRight((e, t) => (t(e), e), {
337
336
  shared: {},
338
337
  ...t
@@ -340,7 +339,7 @@ var oe = {
340
339
  })), e.events[n] = e.events[n] || [], e.events[n].push(t), () => {
341
340
  let r = e.events[n], i = r.indexOf(t);
342
341
  r.splice(i, 1), r.length || (delete e.events[n], e.events[n + O](), delete e.events[n + O]);
343
- }), ue = (e, t) => k(e, t, ce, (t) => {
342
+ }), le = (e, t) => k(e, t, se, (t) => {
344
343
  let n = e.set, r = e.setKey;
345
344
  return e.setKey &&= (n, i) => {
346
345
  let a;
@@ -365,10 +364,10 @@ var oe = {
365
364
  }, () => {
366
365
  e.set = n, e.setKey = r;
367
366
  };
368
- }), de = 1e3, fe = (e, t) => k(e, (n) => {
367
+ }), ue = 1e3, de = (e, t) => k(e, (n) => {
369
368
  let r = t(n);
370
369
  r && e.events[D].push(r);
371
- }, le, (t) => {
370
+ }, ce, (t) => {
372
371
  let n = e.listen;
373
372
  e.listen = (...r) => (!e.lc && !e.active && (e.active = !0, t()), n(...r));
374
373
  let r = e.off;
@@ -379,7 +378,7 @@ var oe = {
379
378
  for (let t of e.events[D]) t();
380
379
  e.events[D] = [];
381
380
  }
382
- }, de);
381
+ }, ue);
383
382
  }, process.env.NODE_ENV !== "production") {
384
383
  let t = e[S];
385
384
  e[S] = () => {
@@ -413,14 +412,14 @@ function j(e, t) {
413
412
  }
414
413
  return !1;
415
414
  }
416
- function pe(e, t) {
417
- return ue(e, ({ newValue: n, abort: r }) => {
415
+ function fe(e, t) {
416
+ return le(e, ({ newValue: n, abort: r }) => {
418
417
  t(e.value, n) && r();
419
418
  });
420
419
  }
421
420
  //#endregion
422
421
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/broadcast-channel.mjs
423
- var M = Symbol.for("better-auth:broadcast-channel"), me = () => Math.floor(Date.now() / 1e3), he = class {
422
+ var M = Symbol.for("better-auth:broadcast-channel"), pe = () => Math.floor(Date.now() / 1e3), me = class {
424
423
  listeners = /* @__PURE__ */ new Set();
425
424
  name;
426
425
  constructor(e = "better-auth.message") {
@@ -435,7 +434,7 @@ var M = Symbol.for("better-auth:broadcast-channel"), me = () => Math.floor(Date.
435
434
  if (!(typeof window > "u")) try {
436
435
  localStorage.setItem(this.name, JSON.stringify({
437
436
  ...e,
438
- timestamp: me()
437
+ timestamp: pe()
439
438
  }));
440
439
  } catch {}
441
440
  }
@@ -452,11 +451,11 @@ var M = Symbol.for("better-auth:broadcast-channel"), me = () => Math.floor(Date.
452
451
  }
453
452
  };
454
453
  function N(e = "better-auth.message") {
455
- return globalThis[M] || (globalThis[M] = new he(e)), globalThis[M];
454
+ return globalThis[M] || (globalThis[M] = new me(e)), globalThis[M];
456
455
  }
457
456
  //#endregion
458
457
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/focus-manager.mjs
459
- var P = Symbol.for("better-auth:focus-manager"), ge = class {
458
+ var P = Symbol.for("better-auth:focus-manager"), he = class {
460
459
  listeners = /* @__PURE__ */ new Set();
461
460
  subscribe(e) {
462
461
  return this.listeners.add(e), () => {
@@ -477,11 +476,11 @@ var P = Symbol.for("better-auth:focus-manager"), ge = class {
477
476
  }
478
477
  };
479
478
  function F() {
480
- return globalThis[P] || (globalThis[P] = new ge()), globalThis[P];
479
+ return globalThis[P] || (globalThis[P] = new he()), globalThis[P];
481
480
  }
482
481
  //#endregion
483
482
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/online-manager.mjs
484
- var I = Symbol.for("better-auth:online-manager"), _e = class {
483
+ var I = Symbol.for("better-auth:online-manager"), ge = class {
485
484
  listeners = /* @__PURE__ */ new Set();
486
485
  isOnline = typeof navigator < "u" ? navigator.onLine : !0;
487
486
  subscribe(e) {
@@ -501,12 +500,12 @@ var I = Symbol.for("better-auth:online-manager"), _e = class {
501
500
  }
502
501
  };
503
502
  function L() {
504
- return globalThis[I] || (globalThis[I] = new _e()), globalThis[I];
503
+ return globalThis[I] || (globalThis[I] = new ge()), globalThis[I];
505
504
  }
506
505
  //#endregion
507
506
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/session-refresh.mjs
508
- var R = () => Math.floor(Date.now() / 1e3), ve = 5;
509
- function ye(e) {
507
+ var R = () => Math.floor(Date.now() / 1e3), _e = 5;
508
+ function ve(e) {
510
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 = {
511
510
  isInitialized: !1,
512
511
  lastSessionRequest: 0
@@ -521,7 +520,7 @@ function ye(e) {
521
520
  return;
522
521
  }
523
522
  if (e?.event === "visibilitychange") {
524
- if (R() - c.lastSessionRequest < ve) return;
523
+ if (R() - c.lastSessionRequest < _e) return;
525
524
  c.lastSessionRequest = R(), t();
526
525
  return;
527
526
  }
@@ -567,20 +566,20 @@ function ye(e) {
567
566
  }
568
567
  //#endregion
569
568
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/session-atom.mjs
570
- var be = () => typeof window > "u";
569
+ var ye = () => typeof window > "u";
571
570
  function z(e) {
572
571
  return typeof e == "object" && e && "data" in e && "error" in e ? e : {
573
572
  data: e,
574
573
  error: null
575
574
  };
576
575
  }
577
- function xe(e) {
576
+ function be(e) {
578
577
  return !e || e.session === null && e.user === null ? null : e;
579
578
  }
580
- function Se(e, t) {
579
+ function xe(e, t) {
581
580
  return j(e.data, t.data) && e.error === t.error && e.isPending === t.isPending && e.isRefetching === t.isRefetching && e.refetch === t.refetch;
582
581
  }
583
- function Ce(e, t) {
582
+ function Se(e, t) {
584
583
  let n = /* @__PURE__ */ E(!1), r, i = (e) => s(e), a = /* @__PURE__ */ E({
585
584
  data: null,
586
585
  error: null,
@@ -588,7 +587,7 @@ function Ce(e, t) {
588
587
  isRefetching: !1,
589
588
  refetch: i
590
589
  });
591
- pe(a, Se);
590
+ fe(a, xe);
592
591
  let o = (e) => {
593
592
  if (r !== e) return;
594
593
  let t = a.get();
@@ -648,7 +647,7 @@ function Ce(e, t) {
648
647
  });
649
648
  return;
650
649
  }
651
- let l = xe(s), u = a.get(), d = u.data != null && l != null && j(u.data, l) ? u.data : l;
650
+ let l = be(s), u = a.get(), d = u.data != null && l != null && j(u.data, l) ? u.data : l;
652
651
  a.set({
653
652
  data: d,
654
653
  error: null,
@@ -671,12 +670,12 @@ function Ce(e, t) {
671
670
  });
672
671
  }
673
672
  }, c = () => {};
674
- return fe(a, () => {
673
+ return de(a, () => {
675
674
  let e;
676
- be() || (e = setTimeout(() => {
675
+ ye() || (e = setTimeout(() => {
677
676
  s();
678
677
  }, 0));
679
- let i = ye({
678
+ let i = ve({
680
679
  fetchSession: s,
681
680
  shouldPollSession: () => a.get().data != null,
682
681
  sessionSignal: n,
@@ -710,23 +709,23 @@ function V(e, t, n = ".", r) {
710
709
  }
711
710
  return i;
712
711
  }
713
- function we(e) {
712
+ function Ce(e) {
714
713
  return (...t) => t.reduce((t, n) => V(t, n, "", e), {});
715
714
  }
716
- var Te = we(), Ee = Object.defineProperty, De = Object.defineProperties, Oe = Object.getOwnPropertyDescriptors, H = Object.getOwnPropertySymbols, ke = Object.prototype.hasOwnProperty, Ae = Object.prototype.propertyIsEnumerable, je = (e, t, n) => t in e ? Ee(e, t, {
715
+ var we = Ce(), Te = Object.defineProperty, Ee = Object.defineProperties, De = Object.getOwnPropertyDescriptors, H = Object.getOwnPropertySymbols, Oe = Object.prototype.hasOwnProperty, ke = Object.prototype.propertyIsEnumerable, U = (e, t, n) => t in e ? Te(e, t, {
717
716
  enumerable: !0,
718
717
  configurable: !0,
719
718
  writable: !0,
720
719
  value: n
721
- }) : e[t] = n, U = (e, t) => {
722
- for (var n in t ||= {}) ke.call(t, n) && je(e, n, t[n]);
723
- if (H) for (var n of H(t)) Ae.call(t, n) && je(e, n, t[n]);
720
+ }) : e[t] = n, W = (e, t) => {
721
+ for (var n in t ||= {}) Oe.call(t, n) && U(e, n, t[n]);
722
+ if (H) for (var n of H(t)) ke.call(t, n) && U(e, n, t[n]);
724
723
  return e;
725
- }, W = (e, t) => De(e, Oe(t)), Me = class extends Error {
724
+ }, G = (e, t) => Ee(e, De(t)), Ae = class extends Error {
726
725
  constructor(e, t, n) {
727
726
  super(t || e.toString(), { cause: n }), this.status = e, this.statusText = t, this.error = n, Error.captureStackTrace(this, this.constructor);
728
727
  }
729
- }, Ne = async (e, t) => {
728
+ }, je = async (e, t) => {
730
729
  let n = t || {}, r = {
731
730
  onRequest: [t?.onRequest],
732
731
  onResponse: [t?.onResponse],
@@ -751,7 +750,7 @@ var Te = we(), Ee = Object.defineProperty, De = Object.defineProperties, Oe = Ob
751
750
  options: n,
752
751
  hooks: r
753
752
  };
754
- }, G = class {
753
+ }, K = class {
755
754
  constructor(e) {
756
755
  this.options = e;
757
756
  }
@@ -761,7 +760,7 @@ var Te = we(), Ee = Object.defineProperty, De = Object.defineProperties, Oe = Ob
761
760
  getDelay() {
762
761
  return this.options.delay;
763
762
  }
764
- }, Pe = class {
763
+ }, Me = class {
765
764
  constructor(e) {
766
765
  this.options = e;
767
766
  }
@@ -772,19 +771,19 @@ var Te = we(), Ee = Object.defineProperty, De = Object.defineProperties, Oe = Ob
772
771
  return Math.min(this.options.maxDelay, this.options.baseDelay * 2 ** e);
773
772
  }
774
773
  };
775
- function Fe(e) {
776
- if (typeof e == "number") return new G({
774
+ function Ne(e) {
775
+ if (typeof e == "number") return new K({
777
776
  type: "linear",
778
777
  attempts: e,
779
778
  delay: 1e3
780
779
  });
781
780
  switch (e.type) {
782
- case "linear": return new G(e);
783
- case "exponential": return new Pe(e);
781
+ case "linear": return new K(e);
782
+ case "exponential": return new Me(e);
784
783
  default: throw Error("Invalid retry strategy");
785
784
  }
786
785
  }
787
- var Ie = async (e) => {
786
+ var Pe = async (e) => {
788
787
  let t = {}, n = async (e) => typeof e == "function" ? await e() : e;
789
788
  if (e?.auth) {
790
789
  if (e.auth.type === "Bearer") {
@@ -802,8 +801,8 @@ var Ie = async (e) => {
802
801
  }
803
802
  }
804
803
  return t;
805
- }, Le = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
806
- function Re(e) {
804
+ }, Fe = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
805
+ function Ie(e) {
807
806
  let t = e.headers.get("content-type"), n = /* @__PURE__ */ new Set([
808
807
  "image/svg",
809
808
  "application/xml",
@@ -812,37 +811,37 @@ function Re(e) {
812
811
  ]);
813
812
  if (!t) return "json";
814
813
  let r = t.split(";").shift() || "";
815
- return Le.test(r) ? "json" : n.has(r) || r.startsWith("text/") ? "text" : "blob";
814
+ return Fe.test(r) ? "json" : n.has(r) || r.startsWith("text/") ? "text" : "blob";
816
815
  }
817
- function ze(e) {
816
+ function Le(e) {
818
817
  try {
819
818
  return JSON.parse(e), !0;
820
819
  } catch {
821
820
  return !1;
822
821
  }
823
822
  }
824
- function K(e) {
823
+ function q(e) {
825
824
  if (e === void 0) return !1;
826
825
  let t = typeof e;
827
826
  return t === "string" || t === "number" || t === "boolean" || t === null ? !0 : t === "object" ? Array.isArray(e) ? !0 : e.buffer ? !1 : e.constructor && e.constructor.name === "Object" || typeof e.toJSON == "function" : !1;
828
827
  }
829
- function q(e) {
828
+ function J(e) {
830
829
  try {
831
830
  return JSON.parse(e);
832
831
  } catch {
833
832
  return e;
834
833
  }
835
834
  }
836
- function J(e) {
835
+ function Y(e) {
837
836
  return typeof e == "function";
838
837
  }
839
- function Be(e) {
838
+ function Re(e) {
840
839
  if (e?.customFetchImpl) return e.customFetchImpl;
841
- if (typeof globalThis < "u" && J(globalThis.fetch)) return globalThis.fetch;
842
- if (typeof window < "u" && J(window.fetch)) return window.fetch;
840
+ if (typeof globalThis < "u" && Y(globalThis.fetch)) return globalThis.fetch;
841
+ if (typeof window < "u" && Y(window.fetch)) return window.fetch;
843
842
  throw Error("No fetch implementation found");
844
843
  }
845
- function Y(...e) {
844
+ function X(...e) {
846
845
  let t = {};
847
846
  for (let n of e) if (n) if (n instanceof Headers) n.forEach((e, n) => {
848
847
  t[n] = e;
@@ -853,34 +852,34 @@ function Y(...e) {
853
852
  }
854
853
  return t;
855
854
  }
856
- async function Ve(e) {
857
- let t = new Headers(Y(e?.headers, await Ie(e)));
855
+ async function ze(e) {
856
+ let t = new Headers(X(e?.headers, await Pe(e)));
858
857
  if (!t.has("content-type")) {
859
- let n = He(e?.body);
858
+ let n = Be(e?.body);
860
859
  n && t.set("content-type", n);
861
860
  }
862
861
  return t;
863
862
  }
864
- function He(e) {
865
- return K(e) ? "application/json" : null;
863
+ function Be(e) {
864
+ return q(e) ? "application/json" : null;
866
865
  }
867
- function Ue(e) {
866
+ function Ve(e) {
868
867
  let t = e.get("content-type");
869
868
  return t ? t.split(";")[0].trim().toLowerCase() : null;
870
869
  }
871
- function We(e, t) {
870
+ function He(e, t) {
872
871
  let { body: n } = e;
873
- return n ? !K(n) || typeof n == "string" ? n : Ue(t) === "application/x-www-form-urlencoded" ? new URLSearchParams(n).toString() : JSON.stringify(n) : null;
872
+ return n ? !q(n) || typeof n == "string" ? n : Ve(t) === "application/x-www-form-urlencoded" ? new URLSearchParams(n).toString() : JSON.stringify(n) : null;
874
873
  }
875
- function Ge(e, t) {
874
+ function Ue(e, t) {
876
875
  if (t?.method) return t.method.toUpperCase();
877
876
  if (e.startsWith("@")) {
878
877
  let n = e.split("@")[1]?.split("/")[0];
879
- return Z.includes(n) ? n.toUpperCase() : t?.body ? "POST" : "GET";
878
+ return Q.includes(n) ? n.toUpperCase() : t?.body ? "POST" : "GET";
880
879
  }
881
880
  return t?.body ? "POST" : "GET";
882
881
  }
883
- function Ke(e, t) {
882
+ function We(e, t) {
884
883
  let n;
885
884
  return !e?.signal && e?.timeout && (n = setTimeout(() => t?.abort(), e?.timeout)), {
886
885
  abortTimeout: n,
@@ -889,23 +888,23 @@ function Ke(e, t) {
889
888
  }
890
889
  };
891
890
  }
892
- var qe = class e extends Error {
891
+ var Ge = class e extends Error {
893
892
  constructor(t, n) {
894
893
  super(n || JSON.stringify(t, null, 2)), this.issues = t, Object.setPrototypeOf(this, e.prototype);
895
894
  }
896
895
  };
897
- async function X(e, t) {
896
+ async function Z(e, t) {
898
897
  let n = await e["~standard"].validate(t);
899
- if (n.issues) throw new qe(n.issues);
898
+ if (n.issues) throw new Ge(n.issues);
900
899
  return n.value;
901
900
  }
902
- var Z = [
901
+ var Q = [
903
902
  "get",
904
903
  "post",
905
904
  "put",
906
905
  "patch",
907
906
  "delete"
908
- ], Je = (e) => ({
907
+ ], Ke = (e) => ({
909
908
  id: "apply-schema",
910
909
  name: "Apply Schema",
911
910
  version: "1.0.0",
@@ -925,19 +924,19 @@ var Z = [
925
924
  });
926
925
  else if (typeof n.headers == "object") for (let [e, r] of Object.entries(n.headers)) r != null && (t[e.toLowerCase()] = r);
927
926
  }
928
- let r = await X(i.headers, t), a = {};
927
+ let r = await Z(i.headers, t), a = {};
929
928
  for (let [e, t] of Object.entries(r)) a[e.toLowerCase()] = t;
930
929
  e = a;
931
930
  }
932
- let r = W(U({}, n), {
931
+ let r = G(W({}, n), {
933
932
  method: i.method,
934
933
  output: i.output,
935
934
  headers: e
936
935
  });
937
- return n?.disableValidation || (r = W(U({}, r), {
938
- body: i.input ? await X(i.input, n?.body) : n?.body,
939
- params: i.params ? await X(i.params, n?.params) : n?.params,
940
- query: i.query ? await X(i.query, n?.query) : n?.query
936
+ return n?.disableValidation || (r = G(W({}, r), {
937
+ body: i.input ? await Z(i.input, n?.body) : n?.body,
938
+ params: i.params ? await Z(i.params, n?.params) : n?.params,
939
+ query: i.query ? await Z(i.query, n?.query) : n?.query
941
940
  })), {
942
941
  url: t,
943
942
  options: r
@@ -949,18 +948,18 @@ var Z = [
949
948
  options: n
950
949
  };
951
950
  }
952
- }), Ye = (e) => {
951
+ }), qe = (e) => {
953
952
  async function t(t, n) {
954
- let r = W(U(U({}, e), n), {
955
- headers: Y(e?.headers, n?.headers),
953
+ let r = G(W(W({}, e), n), {
954
+ headers: X(e?.headers, n?.headers),
956
955
  plugins: [
957
956
  ...e?.plugins || [],
958
- Je(e || {}),
957
+ Ke(e || {}),
959
958
  ...n?.plugins || []
960
959
  ]
961
960
  });
962
961
  if (e?.catchAllError) try {
963
- return await Q(t, r);
962
+ return await $(t, r);
964
963
  } catch (e) {
965
964
  return {
966
965
  data: null,
@@ -972,17 +971,17 @@ var Z = [
972
971
  }
973
972
  };
974
973
  }
975
- return await Q(t, r);
974
+ return await $(t, r);
976
975
  }
977
976
  return t;
978
- }, Xe = (e) => e === "." || e === "..";
979
- function Ze(e, t) {
977
+ }, Je = (e) => e === "." || e === "..";
978
+ function Ye(e, t) {
980
979
  let n = e;
981
980
  for (let [e, r] of t) n = n.replace(e, r);
982
- if (Xe(n)) throw TypeError("Path parameters cannot be reserved path segments");
981
+ if (Je(n)) throw TypeError("Path parameters cannot be reserved path segments");
983
982
  return encodeURIComponent(n);
984
983
  }
985
- function Qe(e, t) {
984
+ function Xe(e, t) {
986
985
  let { baseURL: n, params: r, query: i } = t || {
987
986
  query: {},
988
987
  params: {},
@@ -990,7 +989,7 @@ function Qe(e, t) {
990
989
  }, a = e.startsWith("http") ? e.split("/").slice(0, 3).join("/") : n || "";
991
990
  if (e.startsWith("@")) {
992
991
  let t = e.toString().split("@")[1].split("/")[0];
993
- Z.includes(t) && (e = e.replace(`@${t}/`, "/"));
992
+ Q.includes(t) && (e = e.replace(`@${t}/`, "/"));
994
993
  }
995
994
  a.endsWith("/") || (a += "/");
996
995
  let [o, s] = e.replace(a, "").split("?"), c = new URLSearchParams(s);
@@ -1012,12 +1011,12 @@ function Qe(e, t) {
1012
1011
  l.set(n, String(e));
1013
1012
  }
1014
1013
  } else for (let [e, t] of Object.entries(r)) l.set(`:${e}`, String(t));
1015
- o = o.split("/").map((e) => Ze(e, l)).join("/"), o = o.replace(/^\/+/, "");
1014
+ o = o.split("/").map((e) => Ye(e, l)).join("/"), o = o.replace(/^\/+/, "");
1016
1015
  let u = c.toString();
1017
1016
  return u = u.length > 0 ? `?${u}`.replace(/\+/g, "%20") : "", a.startsWith("http") ? new URL(`${o}${u}`, a) : `${a}${o}${u}`;
1018
1017
  }
1019
- var Q = async (e, t) => {
1020
- let { hooks: n, url: r, options: i } = await Ne(e, t), a = Be(i), o = new AbortController(), s = i.signal ?? o.signal, c = Qe(r, i), l = await Ve(i), u = We(i, l), d = Ge(r, i), f = W(U({}, i), {
1018
+ var $ = async (e, t) => {
1019
+ let { hooks: n, url: r, options: i } = await je(e, t), a = Re(i), o = new AbortController(), s = i.signal ?? o.signal, c = Xe(r, i), l = await ze(i), u = He(i, l), d = Ue(r, i), f = G(W({}, i), {
1021
1020
  url: c,
1022
1021
  headers: l,
1023
1022
  body: u,
@@ -1029,14 +1028,14 @@ var Q = async (e, t) => {
1029
1028
  typeof t == "object" && t && Object.assign(f, t);
1030
1029
  }
1031
1030
  ("pipeTo" in f && typeof f.pipeTo == "function" || typeof t?.body?.pipe == "function") && ("duplex" in f || (f.duplex = "half"));
1032
- let { clearTimeout: p } = Ke(i, o), m = await a(f.url, f);
1031
+ let { clearTimeout: p } = We(i, o), m = await a(f.url, f);
1033
1032
  p();
1034
1033
  let h = {
1035
1034
  response: m,
1036
1035
  request: f
1037
1036
  };
1038
1037
  for (let e of n.onResponse) if (e) {
1039
- let n = await e(W(U({}, h), { response: t?.hookOptions?.cloneResponse ? m.clone() : m }));
1038
+ let n = await e(G(W({}, h), { response: t?.hookOptions?.cloneResponse ? m.clone() : m }));
1040
1039
  n instanceof Response ? m = n : typeof n == "object" && n && (m = n.response);
1041
1040
  }
1042
1041
  if (m.ok) {
@@ -1044,49 +1043,49 @@ var Q = async (e, t) => {
1044
1043
  data: "",
1045
1044
  error: null
1046
1045
  };
1047
- let e = Re(m), r = {
1046
+ let e = Ie(m), r = {
1048
1047
  data: null,
1049
1048
  response: m,
1050
1049
  request: f
1051
1050
  };
1052
1051
  if (e === "json" || e === "text") {
1053
1052
  let e = await m.text();
1054
- r.data = await (f.jsonParser ?? q)(e);
1053
+ r.data = await (f.jsonParser ?? J)(e);
1055
1054
  } else r.data = await m[e]();
1056
- f?.output && f.output && !f.disableValidation && (r.data = await X(f.output, r.data));
1057
- for (let e of n.onSuccess) e && await e(W(U({}, r), { response: t?.hookOptions?.cloneResponse ? m.clone() : m }));
1055
+ f?.output && f.output && !f.disableValidation && (r.data = await Z(f.output, r.data));
1056
+ for (let e of n.onSuccess) e && await e(G(W({}, r), { response: t?.hookOptions?.cloneResponse ? m.clone() : m }));
1058
1057
  return t?.throw ? r.data : {
1059
1058
  data: r.data,
1060
1059
  error: null
1061
1060
  };
1062
1061
  }
1063
- let g = t?.jsonParser ?? q, _ = await m.text(), v = ze(_), y = v ? await g(_) : null, b = {
1062
+ let g = t?.jsonParser ?? J, _ = await m.text(), v = Le(_), y = v ? await g(_) : null, b = {
1064
1063
  response: m,
1065
1064
  responseText: _,
1066
1065
  request: f,
1067
- error: W(U({}, y), {
1066
+ error: G(W({}, y), {
1068
1067
  status: m.status,
1069
1068
  statusText: m.statusText
1070
1069
  })
1071
1070
  };
1072
- for (let e of n.onError) e && await e(W(U({}, b), { response: t?.hookOptions?.cloneResponse ? m.clone() : m }));
1071
+ for (let e of n.onError) e && await e(G(W({}, b), { response: t?.hookOptions?.cloneResponse ? m.clone() : m }));
1073
1072
  if (t?.retry) {
1074
- let r = Fe(t.retry), i = t.retryAttempt ?? 0;
1073
+ let r = Ne(t.retry), i = t.retryAttempt ?? 0;
1075
1074
  if (await r.shouldAttemptRetry(i, m)) {
1076
1075
  for (let e of n.onRetry) e && await e(h);
1077
1076
  let a = r.getDelay(i);
1078
- return await new Promise((e) => setTimeout(e, a)), await Q(e, W(U({}, t), { retryAttempt: i + 1 }));
1077
+ return await new Promise((e) => setTimeout(e, a)), await $(e, G(W({}, t), { retryAttempt: i + 1 }));
1079
1078
  }
1080
1079
  }
1081
- if (t?.throw) throw new Me(m.status, m.statusText, v ? y : _);
1080
+ if (t?.throw) throw new Ae(m.status, m.statusText, v ? y : _);
1082
1081
  return {
1083
1082
  data: null,
1084
- error: W(U({}, y), {
1083
+ error: G(W({}, y), {
1085
1084
  status: m.status,
1086
1085
  statusText: m.statusText
1087
1086
  })
1088
1087
  };
1089
- }, $e = (e) => {
1088
+ }, Ze = (e) => {
1090
1089
  if (typeof process > "u") return;
1091
1090
  let t = e ?? "/api/auth";
1092
1091
  if (process.env.NEXT_PUBLIC_AUTH_URL) return process.env.NEXT_PUBLIC_AUTH_URL;
@@ -1099,8 +1098,8 @@ var Q = async (e, t) => {
1099
1098
  return `${new URL(`${e}${process.env.VERCEL_URL}`).origin}${t}`;
1100
1099
  } catch {}
1101
1100
  }
1102
- }, et = (e, t) => {
1103
- let n = "credentials" in Request.prototype, r = g(e?.baseURL, e?.basePath, void 0, t) ?? $e(e?.basePath) ?? "/api/auth", i = e?.plugins?.flatMap((e) => e.fetchPlugins).filter((e) => e !== void 0) || [], a = {
1101
+ }, Qe = (e, t) => {
1102
+ let n = "credentials" in Request.prototype, r = h(e?.baseURL, e?.basePath, void 0, t) ?? Ze(e?.basePath) ?? "/api/auth", i = e?.plugins?.flatMap((e) => e.fetchPlugins).filter((e) => e !== void 0) || [], a = {
1104
1103
  id: "lifecycle-hooks",
1105
1104
  name: "lifecycle-hooks",
1106
1105
  hooks: {
@@ -1109,22 +1108,22 @@ var Q = async (e, t) => {
1109
1108
  onRequest: e?.fetchOptions?.onRequest,
1110
1109
  onResponse: e?.fetchOptions?.onResponse
1111
1110
  }
1112
- }, { onSuccess: o, onError: s, onRequest: c, onResponse: l, ...u } = e?.fetchOptions || {}, d = Ye({
1111
+ }, { onSuccess: o, onError: s, onRequest: c, onResponse: l, ...u } = e?.fetchOptions || {}, d = qe({
1113
1112
  baseURL: r,
1114
1113
  ...n ? { credentials: "include" } : {},
1115
1114
  method: "GET",
1116
1115
  jsonParser(e) {
1117
- return e ? re(e, { strict: !1 }) : null;
1116
+ return e ? ne(e, { strict: !1 }) : null;
1118
1117
  },
1119
1118
  customFetchImpl: fetch,
1120
1119
  ...u,
1121
1120
  plugins: [
1122
1121
  a,
1123
1122
  ...u.plugins || [],
1124
- ...e?.disableDefaultFetchPlugins ? [] : [oe],
1123
+ ...e?.disableDefaultFetchPlugins ? [] : [ae],
1125
1124
  ...i
1126
1125
  ]
1127
- }), { $sessionSignal: f, session: p, broadcastSessionUpdate: m } = Ce(d, e), h = e?.plugins || [], _ = {}, v = {
1126
+ }), { $sessionSignal: f, session: p, broadcastSessionUpdate: m } = Se(d, e), g = e?.plugins || [], _ = {}, v = {
1128
1127
  $sessionSignal: f,
1129
1128
  session: p
1130
1129
  }, y = {
@@ -1141,7 +1140,7 @@ var Q = async (e, t) => {
1141
1140
  e === "/sign-out" ? m("signout") : (e === "/update-user" || e === "/update-session") && m("updateUser");
1142
1141
  }
1143
1142
  }];
1144
- for (let e of h) e.getAtoms && Object.assign(v, e.getAtoms?.(d)), e.pathMethods && Object.assign(y, e.pathMethods), e.atomListeners && b.push(...e.atomListeners);
1143
+ for (let e of g) e.getAtoms && Object.assign(v, e.getAtoms?.(d)), e.pathMethods && Object.assign(y, e.pathMethods), e.atomListeners && b.push(...e.atomListeners);
1145
1144
  let x = {
1146
1145
  notify: (e) => {
1147
1146
  v[e].set(!v[e].get());
@@ -1151,7 +1150,7 @@ var Q = async (e, t) => {
1151
1150
  },
1152
1151
  atoms: v
1153
1152
  };
1154
- for (let t of h) t.getActions && (_ = Te(t.getActions?.(d, x, e) ?? {}, _));
1153
+ for (let t of g) t.getActions && (_ = we(t.getActions?.(d, x, e) ?? {}, _));
1155
1154
  return {
1156
1155
  get baseURL() {
1157
1156
  return r;
@@ -1166,28 +1165,28 @@ var Q = async (e, t) => {
1166
1165
  };
1167
1166
  //#endregion
1168
1167
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/utils/is-atom.mjs
1169
- function tt(e) {
1168
+ function $e(e) {
1170
1169
  return typeof e == "object" && !!e && "get" in e && typeof e.get == "function" && "lc" in e && typeof e.lc == "number";
1171
1170
  }
1172
1171
  //#endregion
1173
1172
  //#region ../node_modules/.bun/@better-auth+core@1.6.22+97ef1a25343ecf7e/node_modules/@better-auth/core/dist/utils/string.mjs
1174
- function nt(e) {
1173
+ function et(e) {
1175
1174
  return e.charAt(0).toUpperCase() + e.slice(1);
1176
1175
  }
1177
- var rt = /[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu, it = /['\u2019]/g;
1178
- function at(e) {
1179
- return e.replace(it, "").match(rt) ?? [];
1176
+ var tt = /[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu, nt = /['\u2019]/g;
1177
+ function rt(e) {
1178
+ return e.replace(nt, "").match(tt) ?? [];
1180
1179
  }
1181
- function ot(e) {
1182
- return at(e).map((e) => e.toLowerCase()).join("-");
1180
+ function it(e) {
1181
+ return rt(e).map((e) => e.toLowerCase()).join("-");
1183
1182
  }
1184
1183
  //#endregion
1185
1184
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/proxy.mjs
1186
- function st(e, t, n) {
1185
+ function at(e, t, n) {
1187
1186
  let r = t[e], { fetchOptions: i, query: a, ...o } = n || {};
1188
1187
  return r || (i?.method ? i.method : o && Object.keys(o).length > 0 ? "POST" : "GET");
1189
1188
  }
1190
- function ct(e, t, n, r, i) {
1189
+ function ot(e, t, n, r, i) {
1191
1190
  function a(o = []) {
1192
1191
  return new Proxy(function() {}, {
1193
1192
  get(t, n) {
@@ -1198,13 +1197,13 @@ function ct(e, t, n, r, i) {
1198
1197
  i = void 0;
1199
1198
  break;
1200
1199
  }
1201
- return typeof i == "function" || tt(i) ? i : a(r);
1200
+ return typeof i == "function" || $e(i) ? i : a(r);
1202
1201
  },
1203
1202
  apply: async (e, a, s) => {
1204
- let c = "/" + o.map(ot).join("/"), l = s[0] || {}, u = s[1] || {}, { query: d, fetchOptions: f, ...p } = l, m = {
1203
+ let c = "/" + o.map(it).join("/"), l = s[0] || {}, u = s[1] || {}, { query: d, fetchOptions: f, ...p } = l, m = {
1205
1204
  ...u,
1206
1205
  ...f
1207
- }, h = st(c, n, l);
1206
+ }, h = at(c, n, l);
1208
1207
  return await t(c, {
1209
1208
  ...m,
1210
1209
  body: h === "GET" ? void 0 : {
@@ -1237,10 +1236,10 @@ function ct(e, t, n, r, i) {
1237
1236
  }
1238
1237
  //#endregion
1239
1238
  //#region ../node_modules/.bun/better-auth@1.6.22+bb1208860964dff1/node_modules/better-auth/dist/client/vanilla.mjs
1240
- function lt(e) {
1241
- let { pluginPathMethods: t, pluginsActions: n, pluginsAtoms: r, $fetch: i, atomListeners: a, $store: o } = et(e), s = {};
1242
- for (let [e, t] of Object.entries(r)) s[`use${nt(e)}`] = t;
1243
- return ct({
1239
+ function st(e) {
1240
+ let { pluginPathMethods: t, pluginsActions: n, pluginsAtoms: r, $fetch: i, atomListeners: a, $store: o } = Qe(e), s = {};
1241
+ for (let [e, t] of Object.entries(r)) s[`use${et(e)}`] = t;
1242
+ return ot({
1244
1243
  ...n,
1245
1244
  ...s,
1246
1245
  $fetch: i,
@@ -1249,65 +1248,6 @@ function lt(e) {
1249
1248
  }
1250
1249
  //#endregion
1251
1250
  //#region src/lib/auth-client.ts
1252
- var $ = lt({ baseURL: typeof window < "u" ? window.location.origin : "" }), { signIn: ut, signUp: dt, signOut: ft, getSession: pt } = $;
1253
- //#endregion
1254
- //#region src/lib/api/settings.ts
1255
- async function mt() {
1256
- try {
1257
- let t = await e("/api/auth/get-session");
1258
- if (t.user?.name || t.user?.email) return t.user;
1259
- } catch {}
1260
- let { data: t } = await $.getSession();
1261
- return t?.user ? {
1262
- id: t.user.id ?? "",
1263
- name: t.user.name ?? "User",
1264
- email: t.user.email ?? "",
1265
- avatar: null
1266
- } : {
1267
- id: "",
1268
- name: "User",
1269
- email: "",
1270
- avatar: null
1271
- };
1272
- }
1273
- async function ht(t) {
1274
- return e("/api/auth/update-user", {
1275
- method: "POST",
1276
- body: JSON.stringify({ name: t.name })
1277
- });
1278
- }
1279
- var gt = "hiai-docs:embedding-config";
1280
- function _t() {
1281
- if (typeof window > "u") return {
1282
- baseUrl: "",
1283
- apiKey: "",
1284
- model: "",
1285
- fallbackBaseUrl: null,
1286
- fallbackApiKey: null,
1287
- fallbackModel: null
1288
- };
1289
- try {
1290
- let e = localStorage.getItem(gt);
1291
- if (e) return JSON.parse(e);
1292
- } catch {}
1293
- return {
1294
- baseUrl: "",
1295
- apiKey: "",
1296
- model: "",
1297
- fallbackBaseUrl: null,
1298
- fallbackApiKey: null,
1299
- fallbackModel: null
1300
- };
1301
- }
1302
- function vt(e) {
1303
- let t = {
1304
- ..._t(),
1305
- ...e
1306
- };
1307
- return localStorage.setItem(gt, JSON.stringify(t)), t;
1308
- }
1309
- async function yt() {
1310
- await e("/api/auth/delete-user", { method: "POST" });
1311
- }
1251
+ var ct = st({ baseURL: typeof window < "u" ? window.location.origin : "" }), { signIn: lt, signUp: ut, signOut: dt, getSession: ft } = ct;
1312
1252
  //#endregion
1313
- export { ht as a, ft as c, vt as i, _t as n, $ as o, mt as r, pt as s, yt as t };
1253
+ export { ft as n, dt as r, ct as t };