@backmatter/studio 0.0.2 → 0.0.4

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 (36) hide show
  1. package/dist/chunks/EmbedPublishPage-hx1xoAhI.js +149 -0
  2. package/dist/chunks/{UiKitPage-CTZtLwJ0.js → UiKitPage-BOunq6mr.js} +12 -11
  3. package/dist/chunks/WorkspaceRoutes-CTFTWu3L.js +57731 -0
  4. package/dist/chunks/{dashboard-nvFBzpZv.js → dashboard-upmiawx5.js} +216 -215
  5. package/dist/chunks/{index-Cr-IOgdC.js → index-CBvevwfT.js} +9 -8
  6. package/dist/chunks/status-bar-action-DiXhfcj3.js +30254 -0
  7. package/dist/dashboard.js +2 -2
  8. package/dist/index.js +139 -228
  9. package/dist/site-widget.js +292 -0
  10. package/dist/studio.css +46 -6
  11. package/package.json +7 -2
  12. package/src/api.ts +4 -0
  13. package/src/chat/ChangeCard.tsx +11 -6
  14. package/src/chat/ChatMessage.tsx +27 -2
  15. package/src/chat/ChatPanel.tsx +12 -2
  16. package/src/chat/ChatProvider.tsx +40 -3
  17. package/src/chat/Composer.tsx +92 -6
  18. package/src/chat/DocLink.tsx +31 -0
  19. package/src/chat/DocListCard.tsx +3 -3
  20. package/src/chat/PointerChip.tsx +139 -0
  21. package/src/chat/chat-context.ts +80 -1
  22. package/src/chat/icons.tsx +20 -0
  23. package/src/chat/session-expiry.ts +13 -5
  24. package/src/chrome/OpenSiteButton.tsx +33 -25
  25. package/src/index.css +9 -1
  26. package/src/pages/EmbedChatPage.tsx +25 -1
  27. package/src/pages/EmbedPublishPage.tsx +279 -84
  28. package/src/pages/GithubConnectPage.tsx +44 -19
  29. package/src/pages/SelectRepositoriesLink.tsx +30 -0
  30. package/src/pages/SettingsGeneralPage.tsx +2 -0
  31. package/src/pages/SettingsGithubPage.tsx +8 -3
  32. package/src/pages/host-env.ts +7 -2
  33. package/src/site-pointer.ts +271 -0
  34. package/src/site-widget.tsx +391 -0
  35. package/src/site.tsx +11 -7
  36. package/dist/chunks/WorkspaceRoutes-DyRVES9t.js +0 -87308
@@ -1,9 +1,10 @@
1
1
  var Qe = Object.defineProperty;
2
2
  var Ze = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var D = (e, t, n) => Ze(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { jsxs as R, jsx as o, Fragment as be } from "react/jsx-runtime";
5
- import { useRef as et, useCallback as tt, useSyncExternalStore as nt, useState as E, useEffect as J, Suspense as we, lazy as rt } from "react";
6
- import { _ as st, $ as Ce, a0 as it, T as O, a1 as at, p as ot, a2 as lt, a3 as Ie, a4 as qe, a5 as Fe, a6 as ct, a7 as ut, W as ze, a8 as dt, a9 as ae, e as V, b as Be, aa as ft, ab as Me, B as ht, S as se, F as Z, I as ee, a as ye, ac as pt, Z as z, ad as gt, M as ve, ae as te, P as mt, af as xt, ag as yt, o as vt, ah as bt, ai as wt, aj as St, A as kt, G as Et, ak as De, L as Rt, al as _t, am as Ot, an as Tt, N as Pt, R as Lt, O as Ut, Q as Nt, U as jt, V as q, X as At, Y as Ct } from "./WorkspaceRoutes-DyRVES9t.js";
4
+ import { jsxs as E, jsx as a, Fragment as be } from "react/jsx-runtime";
5
+ import { useRef as et, useCallback as tt, useSyncExternalStore as nt, useState as R, useEffect as V, Suspense as we, lazy as rt } from "react";
6
+ import { M as st, O as Ce, Q as it, p as ot, U as at, N as Ie, V as lt, A as qe, W as ct, X as Fe, B as ye, Y as ut, Z as dt, K as ve, n as ft, _ as ht, F as pt, $ as Be, J as gt, a0 as mt, R as xt, L as q } from "./status-bar-action-DiXhfcj3.js";
7
+ import { T as O, G as yt, j as ze, k as Me, l as De, m as vt, n as bt, o as oe, c as J, B as wt, S as se, F as Z, I as ee, r as B, p as te, P as St, M as kt, q as Rt, t as Et, v as _t, f as Ot, x as Tt, y as Pt, g as Lt, R as Ut, h as Nt, i as jt, L as At, w as Ct } from "./WorkspaceRoutes-CTFTWu3L.js";
7
8
  const ne = /* @__PURE__ */ Object.create(null), W = (e) => {
8
9
  var t, n;
9
10
  return ((t = globalThis.process) == null ? void 0 : t.env) || ((n = globalThis.Deno) == null ? void 0 : n.env.toObject()) || globalThis.__env__ || (e ? ne : globalThis);
@@ -55,20 +56,20 @@ function Ft(e) {
55
56
  throw t instanceof re ? t : new re(`Invalid base URL: ${e}. Please provide a valid base URL.`, { cause: t });
56
57
  }
57
58
  }
58
- function oe(e, t = "/api/auth") {
59
+ function ae(e, t = "/api/auth") {
59
60
  if (Ft(e), qt(e)) return e;
60
61
  const n = He(e);
61
62
  return !t || t === "/" ? n : (t = t.startsWith("/") ? t : `/${t}`, `${n}${t}`);
62
63
  }
63
- function zt(e, t, n, r, s) {
64
- if (e) return oe(e, t);
64
+ function Bt(e, t, n, r, s) {
65
+ if (e) return ae(e, t);
65
66
  {
66
67
  const i = F.BETTER_AUTH_URL || F.NEXT_PUBLIC_BETTER_AUTH_URL || F.PUBLIC_BETTER_AUTH_URL || F.NUXT_PUBLIC_BETTER_AUTH_URL || F.NUXT_PUBLIC_AUTH_URL || (F.BASE_URL !== "/" ? F.BASE_URL : void 0);
67
- if (i) return oe(i, t);
68
+ if (i) return ae(i, t);
68
69
  }
69
- if (typeof window < "u" && window.location) return oe(window.location.origin, t);
70
+ if (typeof window < "u" && window.location) return ae(window.location.origin, t);
70
71
  }
71
- const Bt = {
72
+ const zt = {
72
73
  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*:/,
73
74
  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*:/,
74
75
  protoShort: /"__proto__"\s*:/,
@@ -88,7 +89,7 @@ function Ht(e) {
88
89
  function Wt(e) {
89
90
  const t = Dt.exec(e);
90
91
  if (!t) return null;
91
- const [, n, r, s, i, l, d, a, u, c, m] = t, p = new Date(Date.UTC(parseInt(n, 10), parseInt(r, 10) - 1, parseInt(s, 10), parseInt(i, 10), parseInt(l, 10), parseInt(d, 10), a ? parseInt(a.padEnd(3, "0"), 10) : 0));
92
+ const [, n, r, s, i, l, d, o, u, c, m] = t, p = new Date(Date.UTC(parseInt(n, 10), parseInt(r, 10) - 1, parseInt(s, 10), parseInt(i, 10), parseInt(l, 10), parseInt(d, 10), o ? parseInt(o.padEnd(3, "0"), 10) : 0));
92
93
  if (u) {
93
94
  const g = (parseInt(c, 10) * 60 + parseInt(m, 10)) * (u === "+" ? -1 : 1);
94
95
  p.setUTCMinutes(p.getUTCMinutes() + g);
@@ -104,9 +105,9 @@ function $t(e, t = {}) {
104
105
  if (n) throw new SyntaxError("[better-json] Invalid JSON");
105
106
  return e;
106
107
  }
107
- if (Object.entries(Bt).some(([a, u]) => {
108
+ if (Object.entries(zt).some(([o, u]) => {
108
109
  const c = u.test(l);
109
- return c && r && console.warn(`[better-json] Detected potential prototype pollution attempt using ${a} pattern`), c;
110
+ return c && r && console.warn(`[better-json] Detected potential prototype pollution attempt using ${o} pattern`), c;
110
111
  }) && n) throw new Error("[better-json] Potential prototype pollution attempt detected");
111
112
  try {
112
113
  return JSON.parse(l, (u, c) => {
@@ -120,34 +121,34 @@ function $t(e, t = {}) {
120
121
  }
121
122
  return s ? s(u, c) : c;
122
123
  });
123
- } catch (a) {
124
- if (n) throw a;
124
+ } catch (o) {
125
+ if (n) throw o;
125
126
  return e;
126
127
  }
127
128
  }
128
129
  function Gt(e, t = { strict: !0 }) {
129
130
  return $t(e, t);
130
131
  }
131
- const Vt = [
132
+ const Jt = [
132
133
  "javascript:",
133
134
  "data:",
134
135
  "vbscript:"
135
136
  ];
136
- function Jt(e) {
137
+ function Vt(e) {
137
138
  let t;
138
139
  try {
139
140
  t = new URL(e);
140
141
  } catch {
141
142
  return !0;
142
143
  }
143
- return !Vt.includes(t.protocol);
144
+ return !Jt.includes(t.protocol);
144
145
  }
145
146
  const Kt = {
146
147
  id: "redirect",
147
148
  name: "Redirect",
148
149
  hooks: { onSuccess(e) {
149
150
  var t, n;
150
- if ((t = e.data) != null && t.url && ((n = e.data) != null && n.redirect) && Jt(e.data.url) && typeof window < "u" && window.location && window.location)
151
+ if ((t = e.data) != null && t.url && ((n = e.data) != null && n.redirect) && Vt(e.data.url) && typeof window < "u" && window.location && window.location)
151
152
  try {
152
153
  window.location.href = e.data.url;
153
154
  } catch {
@@ -265,7 +266,7 @@ let tn = (e, t) => We(e, (r) => {
265
266
  e.listen = s, e.off = i;
266
267
  };
267
268
  });
268
- function Ee(e, t) {
269
+ function Re(e, t) {
269
270
  let n = nn(t), r = e;
270
271
  for (let s of n) {
271
272
  if (r == null)
@@ -274,13 +275,13 @@ function Ee(e, t) {
274
275
  }
275
276
  return r;
276
277
  }
277
- const Re = /(.*)\[(\d+)\]/;
278
+ const Ee = /(.*)\[(\d+)\]/;
278
279
  function nn(e) {
279
280
  return e.split(".").flatMap((t) => Ge(t));
280
281
  }
281
282
  function Ge(e) {
282
- if (Re.test(e)) {
283
- let [, t, n] = e.match(Re);
283
+ if (Ee.test(e)) {
284
+ let [, t, n] = e.match(Ee);
284
285
  return [...Ge(t), n];
285
286
  }
286
287
  return [e];
@@ -292,7 +293,7 @@ function rn(e, t, n) {
292
293
  (d) => i === void 0 || // `map` keys are plain properties, but a `deepMap` key is a path into
293
294
  // the value, where a plain lookup would compare undefined to undefined
294
295
  // and never report a change.
295
- s[d] !== i[d] || Ee(s, d) !== Ee(i, d)
296
+ s[d] !== i[d] || Re(s, d) !== Re(i, d)
296
297
  ) : r.has(l) || r.has(l.split(/\.|\[/)[0])) && n(s, i, l);
297
298
  });
298
299
  }
@@ -321,8 +322,8 @@ function sn(e, t) {
321
322
  t(e.value, n) && r();
322
323
  });
323
324
  }
324
- const le = Symbol.for("better-auth:broadcast-channel"), an = () => Math.floor(Date.now() / 1e3);
325
- var on = class {
325
+ const le = Symbol.for("better-auth:broadcast-channel"), on = () => Math.floor(Date.now() / 1e3);
326
+ var an = class {
326
327
  constructor(e = "better-auth.message") {
327
328
  D(this, "listeners", /* @__PURE__ */ new Set());
328
329
  D(this, "name");
@@ -338,7 +339,7 @@ var on = class {
338
339
  try {
339
340
  localStorage.setItem(this.name, JSON.stringify({
340
341
  ...e,
341
- timestamp: an()
342
+ timestamp: on()
342
343
  }));
343
344
  } catch {
344
345
  }
@@ -357,7 +358,7 @@ var on = class {
357
358
  }
358
359
  };
359
360
  function ce(e = "better-auth.message") {
360
- return globalThis[le] || (globalThis[le] = new on(e)), globalThis[le];
361
+ return globalThis[le] || (globalThis[le] = new an(e)), globalThis[le];
361
362
  }
362
363
  const ue = Symbol.for("better-auth:focus-manager");
363
364
  var ln = class {
@@ -415,7 +416,7 @@ function fe() {
415
416
  const he = () => Math.floor(Date.now() / 1e3), un = 5;
416
417
  function dn(e) {
417
418
  var _, b, T;
418
- const { fetchSession: t, shouldPollSession: n = () => !0, sessionSignal: r, options: s = {} } = e, i = ((_ = s.sessionOptions) == null ? void 0 : _.refetchInterval) ?? 0, l = ((b = s.sessionOptions) == null ? void 0 : b.refetchOnWindowFocus) ?? !0, d = ((T = s.sessionOptions) == null ? void 0 : T.refetchWhenOffline) ?? !1, a = {
419
+ const { fetchSession: t, shouldPollSession: n = () => !0, sessionSignal: r, options: s = {} } = e, i = ((_ = s.sessionOptions) == null ? void 0 : _.refetchInterval) ?? 0, l = ((b = s.sessionOptions) == null ? void 0 : b.refetchOnWindowFocus) ?? !0, d = ((T = s.sessionOptions) == null ? void 0 : T.refetchWhenOffline) ?? !1, o = {
419
420
  isInitialized: !1,
420
421
  lastSessionRequest: 0
421
422
  }, u = () => d || fe().isOnline, c = (f) => {
@@ -425,12 +426,12 @@ function dn(e) {
425
426
  return;
426
427
  }
427
428
  if ((f == null ? void 0 : f.event) === "poll") {
428
- a.lastSessionRequest = he(), t();
429
+ o.lastSessionRequest = he(), t();
429
430
  return;
430
431
  }
431
432
  if ((f == null ? void 0 : f.event) === "visibilitychange") {
432
- if (he() - a.lastSessionRequest < un) return;
433
- a.lastSessionRequest = he(), t();
433
+ if (he() - o.lastSessionRequest < un) return;
434
+ o.lastSessionRequest = he(), t();
434
435
  return;
435
436
  }
436
437
  t();
@@ -442,32 +443,32 @@ function dn(e) {
442
443
  clientId: Math.random().toString(36).substring(7)
443
444
  });
444
445
  }, p = () => {
445
- i && i > 0 && (a.pollInterval = setInterval(() => {
446
+ i && i > 0 && (o.pollInterval = setInterval(() => {
446
447
  n() && c({ event: "poll" });
447
448
  }, i * 1e3));
448
449
  }, g = () => {
449
- a.unsubscribeBroadcast = ce().subscribe(() => {
450
+ o.unsubscribeBroadcast = ce().subscribe(() => {
450
451
  c({ event: "storage" });
451
452
  });
452
453
  }, y = () => {
453
- l && (a.unsubscribeFocus = Oe().subscribe(() => {
454
+ l && (o.unsubscribeFocus = Oe().subscribe(() => {
454
455
  c({ event: "visibilitychange" });
455
456
  }));
456
457
  }, v = () => {
457
- a.unsubscribeOnline = fe().subscribe((f) => {
458
+ o.unsubscribeOnline = fe().subscribe((f) => {
458
459
  f && c({ event: "visibilitychange" });
459
460
  });
460
461
  }, x = () => {
461
- a.unsubscribeSignal = r.listen(() => {
462
+ o.unsubscribeSignal = r.listen(() => {
462
463
  t();
463
464
  });
464
465
  };
465
466
  return {
466
467
  init: () => {
467
- a.isInitialized || (a.isInitialized = !0, p(), g(), y(), v(), x(), a.cleanupBroadcastSetup = ce().setup(), a.cleanupFocusSetup = Oe().setup(), a.cleanupOnlineSetup = fe().setup());
468
+ o.isInitialized || (o.isInitialized = !0, p(), g(), y(), v(), x(), o.cleanupBroadcastSetup = ce().setup(), o.cleanupFocusSetup = Oe().setup(), o.cleanupOnlineSetup = fe().setup());
468
469
  },
469
470
  cleanup: () => {
470
- a.isInitialized && (a.pollInterval && (clearInterval(a.pollInterval), a.pollInterval = void 0), a.unsubscribeBroadcast && (a.unsubscribeBroadcast(), a.unsubscribeBroadcast = void 0), a.unsubscribeFocus && (a.unsubscribeFocus(), a.unsubscribeFocus = void 0), a.unsubscribeOnline && (a.unsubscribeOnline(), a.unsubscribeOnline = void 0), a.unsubscribeSignal && (a.unsubscribeSignal(), a.unsubscribeSignal = void 0), a.cleanupBroadcastSetup && (a.cleanupBroadcastSetup(), a.cleanupBroadcastSetup = void 0), a.cleanupFocusSetup && (a.cleanupFocusSetup(), a.cleanupFocusSetup = void 0), a.cleanupOnlineSetup && (a.cleanupOnlineSetup(), a.cleanupOnlineSetup = void 0), a.isInitialized = !1, a.lastSessionRequest = 0);
471
+ o.isInitialized && (o.pollInterval && (clearInterval(o.pollInterval), o.pollInterval = void 0), o.unsubscribeBroadcast && (o.unsubscribeBroadcast(), o.unsubscribeBroadcast = void 0), o.unsubscribeFocus && (o.unsubscribeFocus(), o.unsubscribeFocus = void 0), o.unsubscribeOnline && (o.unsubscribeOnline(), o.unsubscribeOnline = void 0), o.unsubscribeSignal && (o.unsubscribeSignal(), o.unsubscribeSignal = void 0), o.cleanupBroadcastSetup && (o.cleanupBroadcastSetup(), o.cleanupBroadcastSetup = void 0), o.cleanupFocusSetup && (o.cleanupFocusSetup(), o.cleanupFocusSetup = void 0), o.cleanupOnlineSetup && (o.cleanupOnlineSetup(), o.cleanupOnlineSetup = void 0), o.isInitialized = !1, o.lastSessionRequest = 0);
471
472
  },
472
473
  triggerRefetch: c,
473
474
  broadcastSessionUpdate: m
@@ -510,7 +511,7 @@ function xn(e, t) {
510
511
  refetch: l
511
512
  });
512
513
  sn(d, mn);
513
- const a = async (g, y) => {
514
+ const o = async (g, y) => {
514
515
  const v = d.value;
515
516
  if (d.set({
516
517
  ...v,
@@ -575,7 +576,7 @@ function xn(e, t) {
575
576
  s = 0, r == null || r.cancel();
576
577
  const y = new AbortController(), v = {
577
578
  cancel: () => y.abort(),
578
- promise: Promise.resolve().then(() => y.signal.aborted ? "aborted" : a(y.signal, g)),
579
+ promise: Promise.resolve().then(() => y.signal.aborted ? "aborted" : o(y.signal, g)),
579
580
  revision: i
580
581
  };
581
582
  r = v;
@@ -638,14 +639,14 @@ function yn(e) {
638
639
  );
639
640
  }
640
641
  const vn = yn();
641
- var bn = Object.defineProperty, wn = Object.defineProperties, Sn = Object.getOwnPropertyDescriptors, Pe = Object.getOwnPropertySymbols, kn = Object.prototype.hasOwnProperty, En = Object.prototype.propertyIsEnumerable, Le = (e, t, n) => t in e ? bn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, U = (e, t) => {
642
+ var bn = Object.defineProperty, wn = Object.defineProperties, Sn = Object.getOwnPropertyDescriptors, Pe = Object.getOwnPropertySymbols, kn = Object.prototype.hasOwnProperty, Rn = Object.prototype.propertyIsEnumerable, Le = (e, t, n) => t in e ? bn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, U = (e, t) => {
642
643
  for (var n in t || (t = {}))
643
644
  kn.call(t, n) && Le(e, n, t[n]);
644
645
  if (Pe)
645
646
  for (var n of Pe(t))
646
- En.call(t, n) && Le(e, n, t[n]);
647
+ Rn.call(t, n) && Le(e, n, t[n]);
647
648
  return e;
648
- }, A = (e, t) => wn(e, Sn(t)), Rn = class extends Error {
649
+ }, A = (e, t) => wn(e, Sn(t)), En = class extends Error {
649
650
  constructor(e, t, n) {
650
651
  super(t || e.toString(), {
651
652
  cause: n
@@ -653,7 +654,7 @@ var bn = Object.defineProperty, wn = Object.defineProperties, Sn = Object.getOwn
653
654
  }
654
655
  }, _n = async (e, t) => {
655
656
  var n, r, s, i, l, d;
656
- let a = t || {};
657
+ let o = t || {};
657
658
  const u = {
658
659
  onRequest: [t == null ? void 0 : t.onRequest],
659
660
  onResponse: [t == null ? void 0 : t.onResponse],
@@ -664,19 +665,19 @@ var bn = Object.defineProperty, wn = Object.defineProperties, Sn = Object.getOwn
664
665
  if (!t || !(t != null && t.plugins))
665
666
  return {
666
667
  url: e,
667
- options: a,
668
+ options: o,
668
669
  hooks: u
669
670
  };
670
671
  for (const c of (t == null ? void 0 : t.plugins) || []) {
671
672
  if (c.init) {
672
673
  const m = await ((n = c.init) == null ? void 0 : n.call(c, e.toString(), t));
673
- a = m.options || a, e = m.url;
674
+ o = m.options || o, e = m.url;
674
675
  }
675
676
  u.onRequest.push((r = c.hooks) == null ? void 0 : r.onRequest), u.onResponse.push((s = c.hooks) == null ? void 0 : s.onResponse), u.onSuccess.push((i = c.hooks) == null ? void 0 : i.onSuccess), u.onError.push((l = c.hooks) == null ? void 0 : l.onError), u.onRetry.push((d = c.hooks) == null ? void 0 : d.onRetry);
676
677
  }
677
678
  return {
678
679
  url: e,
679
- options: a,
680
+ options: o,
680
681
  hooks: u
681
682
  };
682
683
  }, Ue = class {
@@ -770,7 +771,7 @@ function Nn(e) {
770
771
  return !1;
771
772
  }
772
773
  }
773
- function Ve(e) {
774
+ function Je(e) {
774
775
  if (e === void 0)
775
776
  return !1;
776
777
  const t = typeof e;
@@ -795,7 +796,7 @@ function jn(e) {
795
796
  return window.fetch;
796
797
  throw new Error("No fetch implementation found");
797
798
  }
798
- function Je(...e) {
799
+ function Ve(...e) {
799
800
  const t = {};
800
801
  for (const n of e)
801
802
  if (n)
@@ -811,7 +812,7 @@ function Je(...e) {
811
812
  return t;
812
813
  }
813
814
  async function An(e) {
814
- const t = new Headers(Je(e == null ? void 0 : e.headers, await Pn(e)));
815
+ const t = new Headers(Ve(e == null ? void 0 : e.headers, await Pn(e)));
815
816
  if (!t.has("content-type")) {
816
817
  const n = Cn(e == null ? void 0 : e.body);
817
818
  n && t.set("content-type", n);
@@ -819,7 +820,7 @@ async function An(e) {
819
820
  return t;
820
821
  }
821
822
  function Cn(e) {
822
- return Ve(e) ? "application/json" : null;
823
+ return Je(e) ? "application/json" : null;
823
824
  }
824
825
  function In(e) {
825
826
  const t = e.get("content-type");
@@ -827,7 +828,7 @@ function In(e) {
827
828
  }
828
829
  function qn(e, t) {
829
830
  const { body: n } = e;
830
- return n ? !Ve(n) || typeof n == "string" ? n : In(t) === "application/x-www-form-urlencoded" ? new URLSearchParams(n).toString() : JSON.stringify(n) : null;
831
+ return n ? !Je(n) || typeof n == "string" ? n : In(t) === "application/x-www-form-urlencoded" ? new URLSearchParams(n).toString() : JSON.stringify(n) : null;
831
832
  }
832
833
  function Fn(e, t) {
833
834
  var n;
@@ -839,7 +840,7 @@ function Fn(e, t) {
839
840
  }
840
841
  return t != null && t.body ? "POST" : "GET";
841
842
  }
842
- function zn(e, t) {
843
+ function Bn(e, t) {
843
844
  let n;
844
845
  return !(e != null && e.signal) && (e != null && e.timeout) && (n = setTimeout(() => t == null ? void 0 : t.abort(), e == null ? void 0 : e.timeout)), {
845
846
  abortTimeout: n,
@@ -848,7 +849,7 @@ function zn(e, t) {
848
849
  }
849
850
  };
850
851
  }
851
- var Bn = class Ke extends Error {
852
+ var zn = class Ke extends Error {
852
853
  constructor(t, n) {
853
854
  super(n || JSON.stringify(t, null, 2)), this.issues = t, Object.setPrototypeOf(this, Ke.prototype);
854
855
  }
@@ -856,7 +857,7 @@ var Bn = class Ke extends Error {
856
857
  async function G(e, t) {
857
858
  const n = await e["~standard"].validate(t);
858
859
  if (n.issues)
859
- throw new Bn(n.issues);
860
+ throw new zn(n.issues);
860
861
  return n.value;
861
862
  }
862
863
  var Xe = ["get", "post", "put", "patch", "delete"], Mn = (e) => ({
@@ -866,15 +867,15 @@ var Xe = ["get", "post", "put", "patch", "delete"], Mn = (e) => ({
866
867
  async init(t, n) {
867
868
  var r, s, i, l;
868
869
  const d = ((s = (r = e.plugins) == null ? void 0 : r.find(
869
- (a) => {
870
+ (o) => {
870
871
  var u;
871
- return (u = a.schema) != null && u.config ? t.startsWith(a.schema.config.baseURL || "") || t.startsWith(a.schema.config.prefix || "") : !1;
872
+ return (u = o.schema) != null && u.config ? t.startsWith(o.schema.config.baseURL || "") || t.startsWith(o.schema.config.prefix || "") : !1;
872
873
  }
873
874
  )) == null ? void 0 : s.schema) || e.schema;
874
875
  if (d) {
875
- let a = t;
876
- (i = d.config) != null && i.prefix && a.startsWith(d.config.prefix) && (a = a.replace(d.config.prefix, ""), d.config.baseURL && (t = t.replace(d.config.prefix, d.config.baseURL))), (l = d.config) != null && l.baseURL && a.startsWith(d.config.baseURL) && (a = a.replace(d.config.baseURL, "")), a.startsWith("/") && a.charAt(1) === "@" && (a = a.substring(1));
877
- const u = d.schema[a];
876
+ let o = t;
877
+ (i = d.config) != null && i.prefix && o.startsWith(d.config.prefix) && (o = o.replace(d.config.prefix, ""), d.config.baseURL && (t = t.replace(d.config.prefix, d.config.baseURL))), (l = d.config) != null && l.baseURL && o.startsWith(d.config.baseURL) && (o = o.replace(d.config.baseURL, "")), o.startsWith("/") && o.charAt(1) === "@" && (o = o.substring(1));
878
+ const u = d.schema[o];
878
879
  if (u) {
879
880
  let c = n == null ? void 0 : n.headers;
880
881
  if (u.headers && !(n != null && n.disableValidation)) {
@@ -919,7 +920,7 @@ var Xe = ["get", "post", "put", "patch", "delete"], Mn = (e) => ({
919
920
  }), Dn = (e) => {
920
921
  async function t(n, r) {
921
922
  const s = A(U(U({}, e), r), {
922
- headers: Je(e == null ? void 0 : e.headers, r == null ? void 0 : r.headers),
923
+ headers: Ve(e == null ? void 0 : e.headers, r == null ? void 0 : r.headers),
923
924
  plugins: [...(e == null ? void 0 : e.plugins) || [], Mn(e || {}), ...(r == null ? void 0 : r.plugins) || []]
924
925
  });
925
926
  if (e != null && e.catchAllError)
@@ -961,7 +962,7 @@ function $n(e, t) {
961
962
  }
962
963
  i.endsWith("/") || (i += "/");
963
964
  let [l, d] = e.replace(i, "").split("?");
964
- const a = new URLSearchParams(d);
965
+ const o = new URLSearchParams(d);
965
966
  for (const [p, g] of Object.entries(s || {})) {
966
967
  if (g == null) continue;
967
968
  let y;
@@ -969,11 +970,11 @@ function $n(e, t) {
969
970
  y = g;
970
971
  else if (Array.isArray(g)) {
971
972
  for (const v of g)
972
- a.append(p, v);
973
+ o.append(p, v);
973
974
  continue;
974
975
  } else
975
976
  y = JSON.stringify(g);
976
- a.set(p, y);
977
+ o.set(p, y);
977
978
  }
978
979
  const u = /* @__PURE__ */ new Map();
979
980
  if (r)
@@ -987,11 +988,11 @@ function $n(e, t) {
987
988
  for (const [p, g] of Object.entries(r))
988
989
  u.set(`:${p}`, String(g));
989
990
  l = l.split("/").map((p) => Wn(p, u)).join("/"), l = l.replace(/^\/+/, "");
990
- let c = a.toString();
991
+ let c = o.toString();
991
992
  return c = c.length > 0 ? `?${c}`.replace(/\+/g, "%20") : "", i.startsWith("http") ? new URL(`${l}${c}`, i) : `${i}${l}${c}`;
992
993
  }
993
994
  var xe = async (e, t) => {
994
- var n, r, s, i, l, d, a, u;
995
+ var n, r, s, i, l, d, o, u;
995
996
  const {
996
997
  hooks: c,
997
998
  url: m,
@@ -1009,7 +1010,7 @@ var xe = async (e, t) => {
1009
1010
  typeof h == "object" && h !== null && Object.assign(b, h);
1010
1011
  }
1011
1012
  ("pipeTo" in b && typeof b.pipeTo == "function" || typeof ((r = t == null ? void 0 : t.body) == null ? void 0 : r.pipe) == "function") && ("duplex" in b || (b.duplex = "half"));
1012
- const { clearTimeout: T } = zn(p, y);
1013
+ const { clearTimeout: T } = Bn(p, y);
1013
1014
  let f = await g(b.url, b);
1014
1015
  T();
1015
1016
  const k = {
@@ -1063,7 +1064,7 @@ var xe = async (e, t) => {
1063
1064
  };
1064
1065
  for (const P of c.onError)
1065
1066
  P && await P(A(U({}, K), {
1066
- response: (a = t == null ? void 0 : t.hookOptions) != null && a.cloneResponse ? f.clone() : f
1067
+ response: (o = t == null ? void 0 : t.hookOptions) != null && o.cloneResponse ? f.clone() : f
1067
1068
  }));
1068
1069
  if (t != null && t.retry) {
1069
1070
  const P = Tn(t.retry), h = (u = t.retryAttempt) != null ? u : 0;
@@ -1077,7 +1078,7 @@ var xe = async (e, t) => {
1077
1078
  }
1078
1079
  }
1079
1080
  if (t != null && t.throw)
1080
- throw new Rn(
1081
+ throw new En(
1081
1082
  f.status,
1082
1083
  f.statusText,
1083
1084
  H ? M : C
@@ -1105,9 +1106,9 @@ const Gn = (e) => {
1105
1106
  } catch {
1106
1107
  }
1107
1108
  }
1108
- }, Vn = (e, t) => {
1109
+ }, Jn = (e, t) => {
1109
1110
  var k, j, C, H, M, K, P;
1110
- const n = "credentials" in Request.prototype, r = zt(e == null ? void 0 : e.baseURL, e == null ? void 0 : e.basePath) ?? Gn(e == null ? void 0 : e.basePath) ?? "/api/auth", s = ((k = e == null ? void 0 : e.plugins) == null ? void 0 : k.flatMap((h) => h.fetchPlugins).filter((h) => h !== void 0)) || [], i = {
1111
+ const n = "credentials" in Request.prototype, r = Bt(e == null ? void 0 : e.baseURL, e == null ? void 0 : e.basePath) ?? Gn(e == null ? void 0 : e.basePath) ?? "/api/auth", s = ((k = e == null ? void 0 : e.plugins) == null ? void 0 : k.flatMap((h) => h.fetchPlugins).filter((h) => h !== void 0)) || [], i = {
1111
1112
  id: "lifecycle-hooks",
1112
1113
  name: "lifecycle-hooks",
1113
1114
  hooks: {
@@ -1116,7 +1117,7 @@ const Gn = (e) => {
1116
1117
  onRequest: (H = e == null ? void 0 : e.fetchOptions) == null ? void 0 : H.onRequest,
1117
1118
  onResponse: (M = e == null ? void 0 : e.fetchOptions) == null ? void 0 : M.onResponse
1118
1119
  }
1119
- }, { onSuccess: l, onError: d, onRequest: a, onResponse: u, ...c } = (e == null ? void 0 : e.fetchOptions) || {}, m = Dn({
1120
+ }, { onSuccess: l, onError: d, onRequest: o, onResponse: u, ...c } = (e == null ? void 0 : e.fetchOptions) || {}, m = Dn({
1120
1121
  baseURL: r,
1121
1122
  ...n ? { credentials: "include" } : {},
1122
1123
  method: "GET",
@@ -1180,7 +1181,7 @@ const Gn = (e) => {
1180
1181
  $store: f
1181
1182
  };
1182
1183
  };
1183
- function Jn(e) {
1184
+ function Vn(e) {
1184
1185
  return typeof e == "object" && e !== null && "get" in e && typeof e.get == "function" && "lc" in e && typeof e.lc == "number";
1185
1186
  }
1186
1187
  function Kn(e) {
@@ -1201,18 +1202,18 @@ function tr(e, t, n, r, s) {
1201
1202
  function i(l = []) {
1202
1203
  return new Proxy(function() {
1203
1204
  }, {
1204
- get(d, a) {
1205
- if (typeof a != "string" || a === "then" || a === "catch" || a === "finally") return;
1206
- const u = [...l, a];
1205
+ get(d, o) {
1206
+ if (typeof o != "string" || o === "then" || o === "catch" || o === "finally") return;
1207
+ const u = [...l, o];
1207
1208
  let c = e;
1208
1209
  for (const m of u) if (c && typeof c == "object" && m in c) c = c[m];
1209
1210
  else {
1210
1211
  c = void 0;
1211
1212
  break;
1212
1213
  }
1213
- return typeof c == "function" || Jn(c) ? c : i(u);
1214
+ return typeof c == "function" || Vn(c) ? c : i(u);
1214
1215
  },
1215
- apply: async (d, a, u) => {
1216
+ apply: async (d, o, u) => {
1216
1217
  const c = "/" + l.map(Zn).join("/"), m = u[0] || {}, p = u[1] || {}, { query: g, fetchOptions: y, ...v } = m, x = {
1217
1218
  ...p,
1218
1219
  ...y
@@ -1250,10 +1251,10 @@ function tr(e, t, n, r, s) {
1250
1251
  }
1251
1252
  function nr(e, t = {}) {
1252
1253
  const n = et(e.get()), { keys: r, deps: s = [e, r] } = t, i = tt((d) => {
1253
- const a = (u) => {
1254
+ const o = (u) => {
1254
1255
  n.current !== u && (n.current = u, d());
1255
1256
  };
1256
- return a(e.value), r != null && r.length ? rn(e, r, a) : e.listen(a);
1257
+ return o(e.value), r != null && r.length ? rn(e, r, o) : e.listen(o);
1257
1258
  }, s), l = () => n.current;
1258
1259
  return nt(i, l, l);
1259
1260
  }
@@ -1261,39 +1262,39 @@ function rr(e) {
1261
1262
  return `use${Kn(e)}`;
1262
1263
  }
1263
1264
  function sr(e) {
1264
- const { pluginPathMethods: t, pluginsActions: n, pluginsAtoms: r, hydrateSession: s, $fetch: i, $store: l, atomListeners: d } = Vn(e), a = {};
1265
- for (const [u, c] of Object.entries(r)) a[rr(u)] = () => nr(c);
1265
+ const { pluginPathMethods: t, pluginsActions: n, pluginsAtoms: r, hydrateSession: s, $fetch: i, $store: l, atomListeners: d } = Jn(e), o = {};
1266
+ for (const [u, c] of Object.entries(r)) o[rr(u)] = () => nr(c);
1266
1267
  return tr({
1267
1268
  ...n,
1268
- ...a,
1269
+ ...o,
1269
1270
  hydrateSession: s,
1270
1271
  $fetch: i,
1271
1272
  $store: l
1272
1273
  }, i, t, r, d);
1273
1274
  }
1274
1275
  var ir = "1.7.3";
1275
- const ar = ir, or = () => ({
1276
+ const or = ir, ar = () => ({
1276
1277
  id: "magic-link",
1277
- version: ar,
1278
+ version: or,
1278
1279
  $InferServerPlugin: {}
1279
1280
  });
1280
1281
  let Ae = null;
1281
- function B() {
1282
+ function z() {
1282
1283
  return Ae ?? (Ae = sr({
1283
1284
  baseURL: st(),
1284
- plugins: [or()]
1285
+ plugins: [ar()]
1285
1286
  })), Ae;
1286
1287
  }
1287
1288
  function lr() {
1288
- const [e] = Ce(), [t, n] = E(null), [r, s] = E(null), [i, l] = E(!1), [d, a] = E(null), u = e.get("token") ? e.get("email") ?? "" : "", [c, m] = E(u || (e.get("email") ?? "")), [p, g] = E(""), [y, v] = E(""), [x, w] = E("signin");
1289
- J(() => {
1290
- it().then((f) => a(f.github)).catch(() => a(!1));
1289
+ const [e] = Ce(), [t, n] = R(null), [r, s] = R(null), [i, l] = R(!1), [d, o] = R(null), u = e.get("token") ? e.get("email") ?? "" : "", [c, m] = R(u || (e.get("email") ?? "")), [p, g] = R(""), [y, v] = R(""), [x, w] = R("signin");
1290
+ V(() => {
1291
+ it().then((f) => o(f.github)).catch(() => o(!1));
1291
1292
  }, []);
1292
1293
  const S = window.location.href;
1293
1294
  async function _() {
1294
1295
  l(!0), n(null);
1295
1296
  try {
1296
- await B().signIn.social({
1297
+ await z().signIn.social({
1297
1298
  provider: "github",
1298
1299
  callbackURL: S
1299
1300
  });
@@ -1303,7 +1304,7 @@ function lr() {
1303
1304
  }
1304
1305
  async function b() {
1305
1306
  l(!0), n(null), s(null);
1306
- const f = await B().signIn.magicLink({
1307
+ const f = await z().signIn.magicLink({
1307
1308
  email: c,
1308
1309
  callbackURL: S
1309
1310
  });
@@ -1315,12 +1316,12 @@ function lr() {
1315
1316
  }
1316
1317
  async function T(f) {
1317
1318
  f.preventDefault(), l(!0), n(null);
1318
- const k = x === "signup" ? await B().signUp.email({
1319
+ const k = x === "signup" ? await z().signUp.email({
1319
1320
  email: c,
1320
1321
  password: p,
1321
1322
  name: y,
1322
1323
  callbackURL: S
1323
- }) : await B().signIn.email({
1324
+ }) : await z().signIn.email({
1324
1325
  email: c,
1325
1326
  password: p,
1326
1327
  callbackURL: S
@@ -1331,18 +1332,18 @@ function lr() {
1331
1332
  }
1332
1333
  window.location.assign(S);
1333
1334
  }
1334
- return /* @__PURE__ */ R("main", { ...ot(lt, ur.main), children: [
1335
- /* @__PURE__ */ o("div", { className: "x10l6tqk x10a8y8t x47corl x87ps6o xlxt4rd", "aria-hidden": !0 }),
1336
- /* @__PURE__ */ R("div", { className: "x1n2onr6 x78zum5 xh8yej3 xxc7z9f xdt5ytf x6s0dn4 x2b8uid", children: [
1337
- /* @__PURE__ */ o("div", { className: "xrvj5dj x1ku5rj1 x1useyqa xsdox4t x1y5o9j5 x1n0nidx", children: /* @__PURE__ */ o(cr, {}) }),
1338
- /* @__PURE__ */ o("h1", { className: "x1ghz6dp xqjzbou xneq65o x1s688f x1b4dsll x1u7k74 x1w2vvpw", children: u ? "Join this workspace" : "Welcome back" }),
1339
- /* @__PURE__ */ o("div", { className: "x1g7u8ds", children: /* @__PURE__ */ o(O, { tone: "muted", children: u ? `Sign in as ${u}. A password or GitHub stays on this page. A magic link sends one more email.` : "Sign in with email or GitHub." }) }),
1340
- /* @__PURE__ */ R("div", { className: "x78zum5 xh8yej3 x1tfhste xdt5ytf x6s0dn4 x11cgr9k", children: [
1341
- t ? /* @__PURE__ */ o(O, { tone: "danger", children: t }) : null,
1342
- r ? /* @__PURE__ */ o(O, { tone: "muted", children: r }) : null,
1343
- /* @__PURE__ */ R("form", { onSubmit: (f) => void T(f), className: "x78zum5 xh8yej3 xdt5ytf x1ndbd79", children: [
1344
- x === "signup" ? /* @__PURE__ */ o("input", { required: !0, value: y, onChange: (f) => v(f.target.value), placeholder: "Name", autoComplete: "name", className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x17ia0ru x1l3a84d" }) : null,
1345
- /* @__PURE__ */ o("input", { required: !0, type: "email", value: c, onChange: (f) => m(f.target.value), placeholder: "Email", autoComplete: "email", readOnly: !!u, ...{
1335
+ return /* @__PURE__ */ E("main", { ...ot(at, ur.main), children: [
1336
+ /* @__PURE__ */ a("div", { className: "x10l6tqk x10a8y8t x47corl x87ps6o xlxt4rd", "aria-hidden": !0 }),
1337
+ /* @__PURE__ */ E("div", { className: "x1n2onr6 x78zum5 xh8yej3 xxc7z9f xdt5ytf x6s0dn4 x2b8uid", children: [
1338
+ /* @__PURE__ */ a("div", { className: "xrvj5dj x1ku5rj1 x1useyqa xsdox4t x1y5o9j5 x1n0nidx", children: /* @__PURE__ */ a(cr, {}) }),
1339
+ /* @__PURE__ */ a("h1", { className: "x1ghz6dp xqjzbou xneq65o x1s688f x1b4dsll x1u7k74 x1w2vvpw", children: u ? "Join this workspace" : "Welcome back" }),
1340
+ /* @__PURE__ */ a("div", { className: "x1g7u8ds", children: /* @__PURE__ */ a(O, { tone: "muted", children: u ? `Sign in as ${u}. A password or GitHub stays on this page. A magic link sends one more email.` : "Sign in with email or GitHub." }) }),
1341
+ /* @__PURE__ */ E("div", { className: "x78zum5 xh8yej3 x1tfhste xdt5ytf x6s0dn4 x11cgr9k", children: [
1342
+ t ? /* @__PURE__ */ a(O, { tone: "danger", children: t }) : null,
1343
+ r ? /* @__PURE__ */ a(O, { tone: "muted", children: r }) : null,
1344
+ /* @__PURE__ */ E("form", { onSubmit: (f) => void T(f), className: "x78zum5 xh8yej3 xdt5ytf x1ndbd79", children: [
1345
+ x === "signup" ? /* @__PURE__ */ a("input", { required: !0, value: y, onChange: (f) => v(f.target.value), placeholder: "Name", autoComplete: "name", className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x17ia0ru x1l3a84d" }) : null,
1346
+ /* @__PURE__ */ a("input", { required: !0, type: "email", value: c, onChange: (f) => m(f.target.value), placeholder: "Email", autoComplete: "email", readOnly: !!u, ...{
1346
1347
  0: {
1347
1348
  className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x17ia0ru x1l3a84d"
1348
1349
  },
@@ -1350,8 +1351,8 @@ function lr() {
1350
1351
  className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x1l3a84d x10jjolp"
1351
1352
  }
1352
1353
  }[!!u << 0] }),
1353
- /* @__PURE__ */ o("input", { required: !0, type: "password", value: p, onChange: (f) => g(f.target.value), placeholder: "Password", autoComplete: x === "signup" ? "new-password" : "current-password", className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x17ia0ru x1l3a84d" }),
1354
- /* @__PURE__ */ o("button", { type: "submit", disabled: i, ...{
1354
+ /* @__PURE__ */ a("input", { required: !0, type: "password", value: p, onChange: (f) => g(f.target.value), placeholder: "Password", autoComplete: x === "signup" ? "new-password" : "current-password", className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x17ia0ru x1l3a84d" }),
1355
+ /* @__PURE__ */ a("button", { type: "submit", disabled: i, ...{
1355
1356
  0: {
1356
1357
  className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k x3smv4v x161b3w3 xc342km x1e6avla xj4hn0o x1wt99x4 x1l3a84d xk50ysn x1u7k74 xggy1nq xr1c510 xx6bhzk xwji4o3 xq3txz7 xd3so5o x12w9bfk xb93eig"
1357
1358
  },
@@ -1360,7 +1361,7 @@ function lr() {
1360
1361
  }
1361
1362
  }[!!i << 0], children: x === "signup" ? "Create account" : "Sign in" })
1362
1363
  ] }),
1363
- /* @__PURE__ */ o("button", { type: "button", disabled: i || !c, onClick: () => void b(), ...{
1364
+ /* @__PURE__ */ a("button", { type: "button", disabled: i || !c, onClick: () => void b(), ...{
1364
1365
  0: {
1365
1366
  className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k xc342km x1e6avla xjbqb8w x1n0nidx x1vrk1b5 x1ypdohk"
1366
1367
  },
@@ -1368,8 +1369,8 @@ function lr() {
1368
1369
  className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k xc342km x1e6avla xjbqb8w x1n0nidx x1vrk1b5 xwq05k6 x1h6gzvc x47corl"
1369
1370
  }
1370
1371
  }[!!(i || !c) << 0], children: "Email me a magic link" }),
1371
- /* @__PURE__ */ o("button", { type: "button", disabled: i, onClick: () => w(x === "signup" ? "signin" : "signup"), className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k xc342km x1e6avla xjbqb8w x1n0nidx x1vrk1b5 x1ypdohk", children: x === "signup" ? "I already have an account" : "Create an account" }),
1372
- /* @__PURE__ */ R("button", { type: "button", disabled: i || d !== !0, onClick: () => void _(), ...{
1372
+ /* @__PURE__ */ a("button", { type: "button", disabled: i, onClick: () => w(x === "signup" ? "signin" : "signup"), className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k xc342km x1e6avla xjbqb8w x1n0nidx x1vrk1b5 x1ypdohk", children: x === "signup" ? "I already have an account" : "Create an account" }),
1373
+ /* @__PURE__ */ E("button", { type: "button", disabled: i || d !== !0, onClick: () => void _(), ...{
1373
1374
  0: {
1374
1375
  className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k x3smv4v x161b3w3 xc342km x1e6avla xj4hn0o x1wt99x4 x1l3a84d xk50ysn x1u7k74 xggy1nq xr1c510 xx6bhzk xwji4o3 xq3txz7 xd3so5o x12w9bfk xb93eig"
1375
1376
  },
@@ -1377,7 +1378,7 @@ function lr() {
1377
1378
  className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k x3smv4v x161b3w3 xc342km x1e6avla xj4hn0o x1wt99x4 x1l3a84d xk50ysn x1u7k74 xggy1nq xr1c510 xx6bhzk xwji4o3 xq3txz7 xd3so5o x12w9bfk xb93eig xwq05k6 x1h6gzvc x47corl"
1378
1379
  }
1379
1380
  }[!!(i || d !== !0) << 0], children: [
1380
- /* @__PURE__ */ o(at, { size: 18 }),
1381
+ /* @__PURE__ */ a(yt, { size: 18 }),
1381
1382
  "Continue with GitHub"
1382
1383
  ] })
1383
1384
  ] })
@@ -1385,10 +1386,10 @@ function lr() {
1385
1386
  ] });
1386
1387
  }
1387
1388
  function cr() {
1388
- return /* @__PURE__ */ R("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", "aria-hidden": !0, children: [
1389
- /* @__PURE__ */ o("circle", { cx: "24", cy: "24", r: "18.25", stroke: "currentColor", strokeWidth: "1.25", opacity: "0.28" }),
1390
- /* @__PURE__ */ o("circle", { cx: "24", cy: "24", r: "11.25", stroke: "currentColor", strokeWidth: "1.25", opacity: "0.55" }),
1391
- /* @__PURE__ */ o("circle", { cx: "24", cy: "24", r: "4", fill: "currentColor" })
1389
+ return /* @__PURE__ */ E("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", "aria-hidden": !0, children: [
1390
+ /* @__PURE__ */ a("circle", { cx: "24", cy: "24", r: "18.25", stroke: "currentColor", strokeWidth: "1.25", opacity: "0.28" }),
1391
+ /* @__PURE__ */ a("circle", { cx: "24", cy: "24", r: "11.25", stroke: "currentColor", strokeWidth: "1.25", opacity: "0.55" }),
1392
+ /* @__PURE__ */ a("circle", { cx: "24", cy: "24", r: "4", fill: "currentColor" })
1392
1393
  ] });
1393
1394
  }
1394
1395
  const ur = {
@@ -1410,8 +1411,8 @@ const ur = {
1410
1411
  };
1411
1412
  function dr() {
1412
1413
  var s;
1413
- const { userId: e } = Ie(), t = qe(), n = Fe(e), r = ct(n, ((s = t.control) == null ? void 0 : s.workspaces) ?? []);
1414
- return r === "/workspaces" && n && ut(e), /* @__PURE__ */ o(ze, { to: r, replace: !0 });
1414
+ const { userId: e } = ze(), t = Me(), n = De(e), r = vt(n, ((s = t.control) == null ? void 0 : s.workspaces) ?? []);
1415
+ return r === "/workspaces" && n && bt(e), /* @__PURE__ */ a(Ie, { to: r, replace: !0 });
1415
1416
  }
1416
1417
  function fr({
1417
1418
  to: e,
@@ -1419,35 +1420,35 @@ function fr({
1419
1420
  meta: n,
1420
1421
  trailing: r
1421
1422
  }) {
1422
- return /* @__PURE__ */ R(dt, { to: e, className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x21xpn4 x173sf5p x15jjofa x1hl2dhg xqjzbou xso031l x1q0q8m5 x4b2zrn x1t1lzn6 x1xcxyqb", children: [
1423
- /* @__PURE__ */ R("span", { className: "x78zum5 xeuugli xdt5ytf x195vfkc", children: [
1424
- /* @__PURE__ */ o("span", { className: "x17tv04q xk50ysn", children: t }),
1425
- n ? /* @__PURE__ */ o("span", { className: "x1vrk1b5 x111yfic", children: n }) : null
1423
+ return /* @__PURE__ */ E(lt, { to: e, className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x21xpn4 x173sf5p x15jjofa x1hl2dhg xqjzbou xso031l x1q0q8m5 x4b2zrn x1t1lzn6 x1xcxyqb", children: [
1424
+ /* @__PURE__ */ E("span", { className: "x78zum5 xeuugli xdt5ytf x195vfkc", children: [
1425
+ /* @__PURE__ */ a("span", { className: "x17tv04q xk50ysn", children: t }),
1426
+ n ? /* @__PURE__ */ a("span", { className: "x1vrk1b5 x111yfic", children: n }) : null
1426
1427
  ] }),
1427
- r ? /* @__PURE__ */ o("span", { className: "x2lah0s x1vrk1b5 x111yfic", children: r }) : null
1428
+ r ? /* @__PURE__ */ a("span", { className: "x2lah0s x1vrk1b5 x111yfic", children: r }) : null
1428
1429
  ] });
1429
1430
  }
1430
1431
  function hr({
1431
1432
  children: e
1432
1433
  }) {
1433
- return /* @__PURE__ */ o("div", { className: "x78zum5 xdt5ytf xmkeg23 x1y0btm7 x1j0qoeq x13oidi x1hb2obb xb3r6kr", children: e });
1434
+ return /* @__PURE__ */ a("div", { className: "x78zum5 xdt5ytf xmkeg23 x1y0btm7 x1j0qoeq x13oidi x1hb2obb xb3r6kr", children: e });
1434
1435
  }
1435
1436
  function pr() {
1436
1437
  var t;
1437
- const e = ((t = qe().control) == null ? void 0 : t.workspaces) ?? [];
1438
- return /* @__PURE__ */ R(ae, { centered: !0, children: [
1439
- /* @__PURE__ */ o(
1440
- V,
1438
+ const e = ((t = Me().control) == null ? void 0 : t.workspaces) ?? [];
1439
+ return /* @__PURE__ */ E(oe, { centered: !0, children: [
1440
+ /* @__PURE__ */ a(
1441
+ J,
1441
1442
  {
1442
1443
  title: "Workspaces",
1443
1444
  description: "Each workspace is a site and a team.",
1444
- action: /* @__PURE__ */ o(Be, { to: "/workspaces/new", children: "New workspace" })
1445
+ action: /* @__PURE__ */ a(qe, { to: "/workspaces/new", children: "New workspace" })
1445
1446
  }
1446
1447
  ),
1447
- e.length === 0 ? /* @__PURE__ */ o(O, { tone: "muted", children: "No workspaces yet." }) : /* @__PURE__ */ o(hr, { children: e.map((n) => /* @__PURE__ */ o(
1448
+ e.length === 0 ? /* @__PURE__ */ a(O, { tone: "muted", children: "No workspaces yet." }) : /* @__PURE__ */ a(hr, { children: e.map((n) => /* @__PURE__ */ a(
1448
1449
  fr,
1449
1450
  {
1450
- to: ft(n.slug),
1451
+ to: ct(n.slug),
1451
1452
  title: n.name,
1452
1453
  meta: n.role
1453
1454
  },
@@ -1456,12 +1457,12 @@ function pr() {
1456
1457
  ] });
1457
1458
  }
1458
1459
  function gr() {
1459
- const e = Me(), [t, n] = E(""), [r, s] = E(null), [i, l] = E(!1);
1460
- async function d(a) {
1461
- a.preventDefault(), l(!0), s(null);
1460
+ const e = Fe(), [t, n] = R(""), [r, s] = R(null), [i, l] = R(!1);
1461
+ async function d(o) {
1462
+ o.preventDefault(), l(!0), s(null);
1462
1463
  try {
1463
- const { workspace: u } = await pt(t), c = z.getState().control;
1464
- c && z.applyControl({
1464
+ const { workspace: u } = await ut(t), c = B.getState().control;
1465
+ c && B.applyControl({
1465
1466
  ...c,
1466
1467
  workspaces: [
1467
1468
  ...c.workspaces,
@@ -1479,26 +1480,26 @@ function gr() {
1479
1480
  l(!1);
1480
1481
  }
1481
1482
  }
1482
- return /* @__PURE__ */ R(ae, { children: [
1483
- /* @__PURE__ */ o(
1484
- V,
1483
+ return /* @__PURE__ */ E(oe, { children: [
1484
+ /* @__PURE__ */ a(
1485
+ J,
1485
1486
  {
1486
- kicker: /* @__PURE__ */ o(ht, { to: "/workspaces", children: "← Workspaces" }),
1487
+ kicker: /* @__PURE__ */ a(wt, { to: "/workspaces", children: "← Workspaces" }),
1487
1488
  title: "Create workspace"
1488
1489
  }
1489
1490
  ),
1490
- /* @__PURE__ */ o("form", { onSubmit: d, children: /* @__PURE__ */ R(se, { children: [
1491
- /* @__PURE__ */ o(Z, { label: "Name", children: /* @__PURE__ */ o(
1491
+ /* @__PURE__ */ a("form", { onSubmit: d, children: /* @__PURE__ */ E(se, { children: [
1492
+ /* @__PURE__ */ a(Z, { label: "Name", children: /* @__PURE__ */ a(
1492
1493
  ee,
1493
1494
  {
1494
1495
  required: !0,
1495
1496
  value: t,
1496
- onChange: (a) => n(a.target.value),
1497
+ onChange: (o) => n(o.target.value),
1497
1498
  placeholder: "Docs site"
1498
1499
  }
1499
1500
  ) }),
1500
- r ? /* @__PURE__ */ o(O, { tone: "danger", children: r }) : null,
1501
- /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(ye, { type: "submit", disabled: i, children: i ? "Creating…" : "Create workspace" }) })
1501
+ r ? /* @__PURE__ */ a(O, { tone: "danger", children: r }) : null,
1502
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(ye, { type: "submit", disabled: i, children: i ? "Creating…" : "Create workspace" }) })
1502
1503
  ] }) })
1503
1504
  ] });
1504
1505
  }
@@ -1519,14 +1520,14 @@ function mr(e, t) {
1519
1520
  }
1520
1521
  }
1521
1522
  function xr() {
1522
- const [e] = Ce(), t = Me(), n = e.get("token") ?? "", r = e.get("email") ?? "", [s, i] = E(null), [l, d] = E(null), [a, u] = E(!1);
1523
- J(() => {
1523
+ const [e] = Ce(), t = Fe(), n = e.get("token") ?? "", r = e.get("email") ?? "", [s, i] = R(null), [l, d] = R(null), [o, u] = R(!1);
1524
+ V(() => {
1524
1525
  if (!n) {
1525
1526
  i("This invite link is missing a token.");
1526
1527
  return;
1527
1528
  }
1528
1529
  let m = !1;
1529
- return gt(n).then((p) => {
1530
+ return dt(n).then((p) => {
1530
1531
  m || t(`/${p.slug}`, { replace: !0 });
1531
1532
  }).catch(async (p) => {
1532
1533
  if (m) return;
@@ -1544,47 +1545,47 @@ function xr() {
1544
1545
  };
1545
1546
  }, [t, n]);
1546
1547
  async function c() {
1547
- await B().signOut().catch(() => {
1548
- }), te(), z.wipe(), window.location.assign(window.location.href);
1548
+ await z().signOut().catch(() => {
1549
+ }), te(), B.wipe(), window.location.assign(window.location.href);
1549
1550
  }
1550
- return /* @__PURE__ */ R(ae, { centered: !0, children: [
1551
- /* @__PURE__ */ o(V, { title: "Accept invite" }),
1552
- a ? /* @__PURE__ */ R(se, { children: [
1553
- /* @__PURE__ */ o(O, { children: l ? `You're signed in as ${l}. This invite is for ${r || "someone else"}.` : `Sign in as ${r || "the invited email"} to join.` }),
1554
- /* @__PURE__ */ o(O, { size: "sm", tone: "muted", children: "Password and GitHub stay on the next screen. A magic link sends one more email to that address." }),
1555
- /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(ye, { type: "button", variant: "secondary", onClick: () => void c(), children: r ? `Sign in as ${r}` : "Sign in to continue" }) })
1556
- ] }) : s ? /* @__PURE__ */ o(O, { tone: "danger", children: s }) : /* @__PURE__ */ o(O, { tone: "muted", children: "Joining workspace…" })
1551
+ return /* @__PURE__ */ E(oe, { centered: !0, children: [
1552
+ /* @__PURE__ */ a(J, { title: "Accept invite" }),
1553
+ o ? /* @__PURE__ */ E(se, { children: [
1554
+ /* @__PURE__ */ a(O, { children: l ? `You're signed in as ${l}. This invite is for ${r || "someone else"}.` : `Sign in as ${r || "the invited email"} to join.` }),
1555
+ /* @__PURE__ */ a(O, { size: "sm", tone: "muted", children: "Password and GitHub stay on the next screen. A magic link sends one more email to that address." }),
1556
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(ye, { type: "button", variant: "secondary", onClick: () => void c(), children: r ? `Sign in as ${r}` : "Sign in to continue" }) })
1557
+ ] }) : s ? /* @__PURE__ */ a(O, { tone: "danger", children: s }) : /* @__PURE__ */ a(O, { tone: "muted", children: "Joining workspace…" })
1557
1558
  ] });
1558
1559
  }
1559
1560
  function yr() {
1560
- const { email: e, userId: t } = Ie(), [n, r] = E(""), [s, i] = E(null), [l, d] = E(null), [a, u] = E(!1);
1561
- J(() => {
1561
+ const { email: e, userId: t } = ze(), [n, r] = R(""), [s, i] = R(null), [l, d] = R(null), [o, u] = R(!1);
1562
+ V(() => {
1562
1563
  ve().then((m) => {
1563
1564
  m != null && m.user.name && r(m.user.name);
1564
1565
  });
1565
1566
  }, []);
1566
1567
  async function c(m) {
1567
1568
  m.preventDefault(), u(!0), d(null), i(null);
1568
- const p = await B().updateUser({ name: n });
1569
+ const p = await z().updateUser({ name: n });
1569
1570
  if (u(!1), p.error) {
1570
1571
  d(p.error.message ?? "Could not save name");
1571
1572
  return;
1572
1573
  }
1573
1574
  i("Name saved. New publishes will use it.");
1574
1575
  }
1575
- return /* @__PURE__ */ R(ae, { children: [
1576
- /* @__PURE__ */ o(
1577
- V,
1576
+ return /* @__PURE__ */ E(oe, { children: [
1577
+ /* @__PURE__ */ a(
1578
+ J,
1578
1579
  {
1579
1580
  title: "User settings",
1580
1581
  description: "Your account on this Backmatter instance."
1581
1582
  }
1582
1583
  ),
1583
- /* @__PURE__ */ R(se, { gap: "lg", children: [
1584
- /* @__PURE__ */ o(mt, { children: /* @__PURE__ */ o("form", { onSubmit: (m) => void c(m), children: /* @__PURE__ */ R(se, { children: [
1585
- /* @__PURE__ */ o(O, { as: "h2", size: "lg", weight: "medium", children: "Account" }),
1586
- /* @__PURE__ */ o(Z, { label: "Name", children: /* @__PURE__ */ o(ee, { value: n, onChange: (m) => r(m.target.value), autoComplete: "name" }) }),
1587
- /* @__PURE__ */ o(Z, { label: "Email", children: /* @__PURE__ */ o(
1584
+ /* @__PURE__ */ E(se, { gap: "lg", children: [
1585
+ /* @__PURE__ */ a(St, { children: /* @__PURE__ */ a("form", { onSubmit: (m) => void c(m), children: /* @__PURE__ */ E(se, { children: [
1586
+ /* @__PURE__ */ a(O, { as: "h2", size: "lg", weight: "medium", children: "Account" }),
1587
+ /* @__PURE__ */ a(Z, { label: "Name", children: /* @__PURE__ */ a(ee, { value: n, onChange: (m) => r(m.target.value), autoComplete: "name" }) }),
1588
+ /* @__PURE__ */ a(Z, { label: "Email", children: /* @__PURE__ */ a(
1588
1589
  ee,
1589
1590
  {
1590
1591
  type: "email",
@@ -1594,7 +1595,7 @@ function yr() {
1594
1595
  spellCheck: !1
1595
1596
  }
1596
1597
  ) }),
1597
- /* @__PURE__ */ o(Z, { label: "User ID", hint: "Stable id for this account.", children: /* @__PURE__ */ o(
1598
+ /* @__PURE__ */ a(Z, { label: "User ID", hint: "Stable id for this account.", children: /* @__PURE__ */ a(
1598
1599
  ee,
1599
1600
  {
1600
1601
  value: t,
@@ -1603,20 +1604,20 @@ function yr() {
1603
1604
  spellCheck: !1
1604
1605
  }
1605
1606
  ) }),
1606
- l ? /* @__PURE__ */ o(O, { tone: "danger", children: l }) : null,
1607
- s ? /* @__PURE__ */ o(O, { tone: "muted", children: s }) : null,
1608
- /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(ye, { type: "submit", disabled: a, children: a ? "Saving…" : "Save name" }) })
1607
+ l ? /* @__PURE__ */ a(O, { tone: "danger", children: l }) : null,
1608
+ s ? /* @__PURE__ */ a(O, { tone: "muted", children: s }) : null,
1609
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(ye, { type: "submit", disabled: o, children: o ? "Saving…" : "Save name" }) })
1609
1610
  ] }) }) }),
1610
- /* @__PURE__ */ R("div", { children: [
1611
- /* @__PURE__ */ o(
1612
- V,
1611
+ /* @__PURE__ */ E("div", { children: [
1612
+ /* @__PURE__ */ a(
1613
+ J,
1613
1614
  {
1614
1615
  title: "Connectors",
1615
1616
  description: "Personal MCP servers that follow you across workspaces.",
1616
1617
  compact: !0
1617
1618
  }
1618
1619
  ),
1619
- /* @__PURE__ */ o(xt, { scope: "user", canEdit: !0 })
1620
+ /* @__PURE__ */ a(kt, { scope: "user", canEdit: !0 })
1620
1621
  ] })
1621
1622
  ] })
1622
1623
  ] });
@@ -1624,11 +1625,11 @@ function yr() {
1624
1625
  function vr({
1625
1626
  userId: e
1626
1627
  }) {
1627
- const [t, n] = E({
1628
+ const [t, n] = R({
1628
1629
  kind: "working"
1629
1630
  });
1630
- return J(() => {
1631
- const r = yt(window.location.search);
1631
+ return V(() => {
1632
+ const r = Rt(window.location.search);
1632
1633
  if (!r) {
1633
1634
  n({
1634
1635
  kind: "error",
@@ -1641,7 +1642,7 @@ function vr({
1641
1642
  try {
1642
1643
  const {
1643
1644
  workspace: i
1644
- } = await vt(r.workspaceId), l = bt(r.returnUrl, i.siteUrls);
1645
+ } = await ft(r.workspaceId), l = Et(r.returnUrl, i.siteUrls);
1645
1646
  if (!l) {
1646
1647
  n({
1647
1648
  kind: "error",
@@ -1651,12 +1652,12 @@ function vr({
1651
1652
  }
1652
1653
  const {
1653
1654
  ticket: d
1654
- } = await wt(i.id, {
1655
+ } = await ht(i.id, {
1655
1656
  redirect: l.redirect,
1656
1657
  tree: e
1657
1658
  });
1658
1659
  if (s) return;
1659
- window.location.replace(St(l.origin, d));
1660
+ window.location.replace(_t(l.origin, d));
1660
1661
  } catch (i) {
1661
1662
  if (s) return;
1662
1663
  n({
@@ -1667,69 +1668,69 @@ function vr({
1667
1668
  })(), () => {
1668
1669
  s = !0;
1669
1670
  };
1670
- }, [e]), /* @__PURE__ */ o("div", { className: "x1ov3xa9 xrvj5dj x1ku5rj1 x1t7e3gq", children: /* @__PURE__ */ o("div", { className: "x78zum5 xdt5ytf x1ndbd79 x1lr1uin x1t7e3gq x4pepcl x1d0qn7y", children: t.kind === "working" ? /* @__PURE__ */ R(be, { children: [
1671
- /* @__PURE__ */ o(O, { size: "lg", weight: "medium", children: "Opening your site…" }),
1672
- /* @__PURE__ */ o(O, { tone: "muted", children: "Setting up editing on the site and sending you back." })
1673
- ] }) : /* @__PURE__ */ R(be, { children: [
1674
- /* @__PURE__ */ o(O, { size: "lg", weight: "medium", children: "Could not open the site" }),
1675
- /* @__PURE__ */ o(O, { tone: "muted", children: t.message }),
1676
- /* @__PURE__ */ o(Be, { to: "/", variant: "secondary", children: "Back to the dashboard" })
1671
+ }, [e]), /* @__PURE__ */ a("div", { className: "x1ov3xa9 xrvj5dj x1ku5rj1 x1t7e3gq", children: /* @__PURE__ */ a("div", { className: "x78zum5 xdt5ytf x1ndbd79 x1lr1uin x1t7e3gq x4pepcl x1d0qn7y", children: t.kind === "working" ? /* @__PURE__ */ E(be, { children: [
1672
+ /* @__PURE__ */ a(O, { size: "lg", weight: "medium", children: "Opening your site…" }),
1673
+ /* @__PURE__ */ a(O, { tone: "muted", children: "Setting up editing on the site and sending you back." })
1674
+ ] }) : /* @__PURE__ */ E(be, { children: [
1675
+ /* @__PURE__ */ a(O, { size: "lg", weight: "medium", children: "Could not open the site" }),
1676
+ /* @__PURE__ */ a(O, { tone: "muted", children: t.message }),
1677
+ /* @__PURE__ */ a(qe, { to: "/", variant: "secondary", children: "Back to the dashboard" })
1677
1678
  ] }) }) });
1678
1679
  }
1679
- const Q = De() ? rt(() => import("./UiKitPage-CTZtLwJ0.js").then((e) => ({
1680
+ const Q = Be() ? rt(() => import("./UiKitPage-BOunq6mr.js").then((e) => ({
1680
1681
  default: e.UiKitPage
1681
1682
  }))) : null;
1682
1683
  function br(e) {
1683
- return De() && e.replace(/\/$/, "") === "/__ui";
1684
+ return Be() && e.replace(/\/$/, "") === "/__ui";
1684
1685
  }
1685
- function _r() {
1686
- return /* @__PURE__ */ o(kt, { children: /* @__PURE__ */ o(Et, { children: /* @__PURE__ */ o(wr, {}) }) });
1686
+ function Or() {
1687
+ return /* @__PURE__ */ a(Ot, { children: /* @__PURE__ */ a(pt, { children: /* @__PURE__ */ a(wr, {}) }) });
1687
1688
  }
1688
1689
  function wr() {
1689
- const e = Rt(), [t, n] = E(() => {
1690
- const r = _t();
1690
+ const e = gt(), [t, n] = R(() => {
1691
+ const r = Tt();
1691
1692
  return r ? {
1692
1693
  user: r
1693
1694
  } : "loading";
1694
1695
  });
1695
- return J(() => {
1696
+ return V(() => {
1696
1697
  ve().then((r) => {
1697
1698
  if (!(r != null && r.user)) {
1698
- te(), z.wipe(), n(null);
1699
+ te(), B.wipe(), n(null);
1699
1700
  return;
1700
1701
  }
1701
- if (Ot(r.user), n({
1702
+ if (Pt(r.user), n({
1702
1703
  user: {
1703
1704
  id: r.user.id,
1704
1705
  email: r.user.email
1705
1706
  }
1706
- }), z.getState().sessionUserId !== r.user.id) {
1707
- const s = Tt(window.location.pathname);
1708
- z.hydrate(r.user.id, s ?? Fe(r.user.id));
1707
+ }), B.getState().sessionUserId !== r.user.id) {
1708
+ const s = mt(window.location.pathname);
1709
+ B.hydrate(r.user.id, s ?? De(r.user.id));
1709
1710
  }
1710
1711
  }).catch(() => {
1711
- te(), z.wipe(), n(null);
1712
+ te(), B.wipe(), n(null);
1712
1713
  });
1713
- }, []), Q && br(e.pathname) ? /* @__PURE__ */ o(we, { fallback: /* @__PURE__ */ o("div", { className: "x1y5dg2c", children: /* @__PURE__ */ o(O, { tone: "muted", children: "Loading kit…" }) }), children: /* @__PURE__ */ o(Q, {}) }) : t === "loading" ? /* @__PURE__ */ o(Pt, {}) : t ? e.pathname.replace(/\/$/, "") === "/enter" ? /* @__PURE__ */ o(vr, { userId: t.user.id }) : /* @__PURE__ */ o(Lt, { user: t.user, children: /* @__PURE__ */ o(Ut, { children: /* @__PURE__ */ o(Nt, { userId: t.user.id, email: t.user.email, onLogout: () => {
1714
- te(), z.wipe(), B().signOut().then(() => {
1714
+ }, []), Q && br(e.pathname) ? /* @__PURE__ */ a(we, { fallback: /* @__PURE__ */ a("div", { className: "x1y5dg2c", children: /* @__PURE__ */ a(O, { tone: "muted", children: "Loading kit…" }) }), children: /* @__PURE__ */ a(Q, {}) }) : t === "loading" ? /* @__PURE__ */ a(Lt, {}) : t ? e.pathname.replace(/\/$/, "") === "/enter" ? /* @__PURE__ */ a(vr, { userId: t.user.id }) : /* @__PURE__ */ a(Ut, { user: t.user, children: /* @__PURE__ */ a(Nt, { children: /* @__PURE__ */ a(jt, { userId: t.user.id, email: t.user.email, onLogout: () => {
1715
+ te(), B.wipe(), z().signOut().then(() => {
1715
1716
  n(null);
1716
1717
  }).catch(() => {
1717
1718
  n(null);
1718
1719
  });
1719
- }, children: /* @__PURE__ */ R(jt, { children: [
1720
- /* @__PURE__ */ o(q, { path: "/", element: /* @__PURE__ */ o(dr, {}) }),
1721
- /* @__PURE__ */ o(q, { path: "/workspaces", element: /* @__PURE__ */ o(pr, {}) }),
1722
- /* @__PURE__ */ o(q, { path: "/workspaces/new", element: /* @__PURE__ */ o(gr, {}) }),
1723
- /* @__PURE__ */ o(q, { path: "/invite", element: /* @__PURE__ */ o(xr, {}) }),
1724
- /* @__PURE__ */ o(q, { path: "/account", element: /* @__PURE__ */ o(yr, {}) }),
1725
- /* @__PURE__ */ o(q, { path: "/workspaces/:workspaceId/*", element: /* @__PURE__ */ o(At, {}) }),
1720
+ }, children: /* @__PURE__ */ E(xt, { children: [
1721
+ /* @__PURE__ */ a(q, { path: "/", element: /* @__PURE__ */ a(dr, {}) }),
1722
+ /* @__PURE__ */ a(q, { path: "/workspaces", element: /* @__PURE__ */ a(pr, {}) }),
1723
+ /* @__PURE__ */ a(q, { path: "/workspaces/new", element: /* @__PURE__ */ a(gr, {}) }),
1724
+ /* @__PURE__ */ a(q, { path: "/invite", element: /* @__PURE__ */ a(xr, {}) }),
1725
+ /* @__PURE__ */ a(q, { path: "/account", element: /* @__PURE__ */ a(yr, {}) }),
1726
+ /* @__PURE__ */ a(q, { path: "/workspaces/:workspaceId/*", element: /* @__PURE__ */ a(At, {}) }),
1726
1727
  Ct(),
1727
- Q ? /* @__PURE__ */ o(q, { path: "/__ui", element: /* @__PURE__ */ o(we, { fallback: /* @__PURE__ */ o("div", { className: "x1y5dg2c", children: /* @__PURE__ */ o(O, { tone: "muted", children: "Loading kit…" }) }), children: /* @__PURE__ */ o(Q, {}) }) }) : null,
1728
- /* @__PURE__ */ o(q, { path: "*", element: /* @__PURE__ */ o(ze, { to: "/", replace: !0 }) })
1729
- ] }) }) }) }) : /* @__PURE__ */ o(lr, {});
1728
+ Q ? /* @__PURE__ */ a(q, { path: "/__ui", element: /* @__PURE__ */ a(we, { fallback: /* @__PURE__ */ a("div", { className: "x1y5dg2c", children: /* @__PURE__ */ a(O, { tone: "muted", children: "Loading kit…" }) }), children: /* @__PURE__ */ a(Q, {}) }) }) : null,
1729
+ /* @__PURE__ */ a(q, { path: "*", element: /* @__PURE__ */ a(Ie, { to: "/", replace: !0 }) })
1730
+ ] }) }) }) }) : /* @__PURE__ */ a(lr, {});
1730
1731
  }
1731
1732
  export {
1732
- _r as A,
1733
+ Or as A,
1733
1734
  hr as L,
1734
1735
  fr as a,
1735
1736
  br as i