@backmatter/studio 0.0.4 → 0.0.6

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.
@@ -1,10 +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 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";
4
+ import { jsxs as E, jsx as o, Fragment as be } from "react/jsx-runtime";
5
+ import { useRef as et, useCallback as tt, useSyncExternalStore as nt, useState as R, useEffect as J, Suspense as we, lazy as rt } from "react";
6
+ import { Y as st, Z as Ce, _ as it, $ as at, p as ot, a0 as lt, X as Ie, a1 as ct, j as qe, a2 as ut, a3 as Fe, B as ye, a4 as dt, a5 as ft, U as ve, f as ht, u as pt, M as gt, a6 as Be, R as mt, a7 as xt, V as yt, W as q } from "./status-bar-action-RNBujSgk.js";
7
+ import { T as O, j as ze, k as Me, l as De, m as vt, n as bt, o as ae, c as V, 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 jt, i as Nt, L as At, w as Ct } from "./WorkspaceRoutes-CPvkgvxe.js";
8
8
  const ne = /* @__PURE__ */ Object.create(null), W = (e) => {
9
9
  var t, n;
10
10
  return ((t = globalThis.process) == null ? void 0 : t.env) || ((n = globalThis.Deno) == null ? void 0 : n.env.toObject()) || globalThis.__env__ || (e ? ne : globalThis);
@@ -56,18 +56,18 @@ function Ft(e) {
56
56
  throw t instanceof re ? t : new re(`Invalid base URL: ${e}. Please provide a valid base URL.`, { cause: t });
57
57
  }
58
58
  }
59
- function ae(e, t = "/api/auth") {
59
+ function oe(e, t = "/api/auth") {
60
60
  if (Ft(e), qt(e)) return e;
61
61
  const n = He(e);
62
62
  return !t || t === "/" ? n : (t = t.startsWith("/") ? t : `/${t}`, `${n}${t}`);
63
63
  }
64
64
  function Bt(e, t, n, r, s) {
65
- if (e) return ae(e, t);
65
+ if (e) return oe(e, t);
66
66
  {
67
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);
68
- if (i) return ae(i, t);
68
+ if (i) return oe(i, t);
69
69
  }
70
- if (typeof window < "u" && window.location) return ae(window.location.origin, t);
70
+ if (typeof window < "u" && window.location) return oe(window.location.origin, t);
71
71
  }
72
72
  const zt = {
73
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*:/,
@@ -89,7 +89,7 @@ function Ht(e) {
89
89
  function Wt(e) {
90
90
  const t = Dt.exec(e);
91
91
  if (!t) return null;
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
+ 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));
93
93
  if (u) {
94
94
  const g = (parseInt(c, 10) * 60 + parseInt(m, 10)) * (u === "+" ? -1 : 1);
95
95
  p.setUTCMinutes(p.getUTCMinutes() + g);
@@ -105,9 +105,9 @@ function $t(e, t = {}) {
105
105
  if (n) throw new SyntaxError("[better-json] Invalid JSON");
106
106
  return e;
107
107
  }
108
- if (Object.entries(zt).some(([o, u]) => {
108
+ if (Object.entries(zt).some(([a, u]) => {
109
109
  const c = u.test(l);
110
- return c && r && console.warn(`[better-json] Detected potential prototype pollution attempt using ${o} pattern`), c;
110
+ return c && r && console.warn(`[better-json] Detected potential prototype pollution attempt using ${a} pattern`), c;
111
111
  }) && n) throw new Error("[better-json] Potential prototype pollution attempt detected");
112
112
  try {
113
113
  return JSON.parse(l, (u, c) => {
@@ -121,57 +121,57 @@ function $t(e, t = {}) {
121
121
  }
122
122
  return s ? s(u, c) : c;
123
123
  });
124
- } catch (o) {
125
- if (n) throw o;
124
+ } catch (a) {
125
+ if (n) throw a;
126
126
  return e;
127
127
  }
128
128
  }
129
129
  function Gt(e, t = { strict: !0 }) {
130
130
  return $t(e, t);
131
131
  }
132
- const Jt = [
132
+ const Vt = [
133
133
  "javascript:",
134
134
  "data:",
135
135
  "vbscript:"
136
136
  ];
137
- function Vt(e) {
137
+ function Jt(e) {
138
138
  let t;
139
139
  try {
140
140
  t = new URL(e);
141
141
  } catch {
142
142
  return !0;
143
143
  }
144
- return !Jt.includes(t.protocol);
144
+ return !Vt.includes(t.protocol);
145
145
  }
146
146
  const Kt = {
147
147
  id: "redirect",
148
148
  name: "Redirect",
149
149
  hooks: { onSuccess(e) {
150
150
  var t, n;
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
+ if ((t = e.data) != null && t.url && ((n = e.data) != null && n.redirect) && Jt(e.data.url) && typeof window < "u" && window.location && window.location)
152
152
  try {
153
153
  window.location.href = e.data.url;
154
154
  } catch {
155
155
  }
156
156
  } }
157
157
  };
158
- let N = [], $ = 0;
158
+ let j = [], $ = 0;
159
159
  const ge = 4, Xt = globalThis.nanostoresGlobal || (globalThis.nanostoresGlobal = { epoch: 0 });
160
160
  let Yt = () => {
161
161
  let e, t;
162
- for (; $ < N.length; ) {
162
+ for (; $ < j.length; ) {
163
163
  t = $, $ += ge;
164
164
  try {
165
- N[t](
166
- N[t + 1].value,
167
- N[t + 2],
168
- N[t + 3]
165
+ j[t](
166
+ j[t + 1].value,
167
+ j[t + 2],
168
+ j[t + 3]
169
169
  );
170
170
  } catch (n) {
171
171
  e = n;
172
172
  }
173
173
  }
174
- if (N.length = $ = 0, e) throw e;
174
+ if (j.length = $ = 0, e) throw e;
175
175
  };
176
176
  const ke = /* @__NO_SIDE_EFFECTS__ */ (e) => {
177
177
  let t = [], n = {
@@ -184,17 +184,17 @@ const ke = /* @__NO_SIDE_EFFECTS__ */ (e) => {
184
184
  lc: 0,
185
185
  listen(r) {
186
186
  return n.lc = t.push(r), () => {
187
- for (let i = $; i < N.length; )
188
- N[i] === r ? N.splice(i, ge) : i += ge;
187
+ for (let i = $; i < j.length; )
188
+ j[i] === r ? j.splice(i, ge) : i += ge;
189
189
  let s = t.indexOf(r);
190
190
  ~s && (t.splice(s, 1), --n.lc || n.off());
191
191
  };
192
192
  },
193
193
  notify(r, s) {
194
194
  Xt.epoch++;
195
- let i = !N.length && !0;
195
+ let i = !j.length && !0;
196
196
  for (let l of t)
197
- N.push(
197
+ j.push(
198
198
  l,
199
199
  n,
200
200
  r,
@@ -322,8 +322,8 @@ function sn(e, t) {
322
322
  t(e.value, n) && r();
323
323
  });
324
324
  }
325
- const le = Symbol.for("better-auth:broadcast-channel"), on = () => Math.floor(Date.now() / 1e3);
326
- var an = class {
325
+ const le = Symbol.for("better-auth:broadcast-channel"), an = () => Math.floor(Date.now() / 1e3);
326
+ var on = class {
327
327
  constructor(e = "better-auth.message") {
328
328
  D(this, "listeners", /* @__PURE__ */ new Set());
329
329
  D(this, "name");
@@ -339,7 +339,7 @@ var an = class {
339
339
  try {
340
340
  localStorage.setItem(this.name, JSON.stringify({
341
341
  ...e,
342
- timestamp: on()
342
+ timestamp: an()
343
343
  }));
344
344
  } catch {
345
345
  }
@@ -358,7 +358,7 @@ var an = class {
358
358
  }
359
359
  };
360
360
  function ce(e = "better-auth.message") {
361
- return globalThis[le] || (globalThis[le] = new an(e)), globalThis[le];
361
+ return globalThis[le] || (globalThis[le] = new on(e)), globalThis[le];
362
362
  }
363
363
  const ue = Symbol.for("better-auth:focus-manager");
364
364
  var ln = class {
@@ -416,7 +416,7 @@ function fe() {
416
416
  const he = () => Math.floor(Date.now() / 1e3), un = 5;
417
417
  function dn(e) {
418
418
  var _, b, T;
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
+ 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 = {
420
420
  isInitialized: !1,
421
421
  lastSessionRequest: 0
422
422
  }, u = () => d || fe().isOnline, c = (f) => {
@@ -426,12 +426,12 @@ function dn(e) {
426
426
  return;
427
427
  }
428
428
  if ((f == null ? void 0 : f.event) === "poll") {
429
- o.lastSessionRequest = he(), t();
429
+ a.lastSessionRequest = he(), t();
430
430
  return;
431
431
  }
432
432
  if ((f == null ? void 0 : f.event) === "visibilitychange") {
433
- if (he() - o.lastSessionRequest < un) return;
434
- o.lastSessionRequest = he(), t();
433
+ if (he() - a.lastSessionRequest < un) return;
434
+ a.lastSessionRequest = he(), t();
435
435
  return;
436
436
  }
437
437
  t();
@@ -443,32 +443,32 @@ function dn(e) {
443
443
  clientId: Math.random().toString(36).substring(7)
444
444
  });
445
445
  }, p = () => {
446
- i && i > 0 && (o.pollInterval = setInterval(() => {
446
+ i && i > 0 && (a.pollInterval = setInterval(() => {
447
447
  n() && c({ event: "poll" });
448
448
  }, i * 1e3));
449
449
  }, g = () => {
450
- o.unsubscribeBroadcast = ce().subscribe(() => {
450
+ a.unsubscribeBroadcast = ce().subscribe(() => {
451
451
  c({ event: "storage" });
452
452
  });
453
453
  }, y = () => {
454
- l && (o.unsubscribeFocus = Oe().subscribe(() => {
454
+ l && (a.unsubscribeFocus = Oe().subscribe(() => {
455
455
  c({ event: "visibilitychange" });
456
456
  }));
457
457
  }, v = () => {
458
- o.unsubscribeOnline = fe().subscribe((f) => {
458
+ a.unsubscribeOnline = fe().subscribe((f) => {
459
459
  f && c({ event: "visibilitychange" });
460
460
  });
461
461
  }, x = () => {
462
- o.unsubscribeSignal = r.listen(() => {
462
+ a.unsubscribeSignal = r.listen(() => {
463
463
  t();
464
464
  });
465
465
  };
466
466
  return {
467
467
  init: () => {
468
- o.isInitialized || (o.isInitialized = !0, p(), g(), y(), v(), x(), o.cleanupBroadcastSetup = ce().setup(), o.cleanupFocusSetup = Oe().setup(), o.cleanupOnlineSetup = fe().setup());
468
+ a.isInitialized || (a.isInitialized = !0, p(), g(), y(), v(), x(), a.cleanupBroadcastSetup = ce().setup(), a.cleanupFocusSetup = Oe().setup(), a.cleanupOnlineSetup = fe().setup());
469
469
  },
470
470
  cleanup: () => {
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
+ 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);
472
472
  },
473
473
  triggerRefetch: c,
474
474
  broadcastSessionUpdate: m
@@ -511,7 +511,7 @@ function xn(e, t) {
511
511
  refetch: l
512
512
  });
513
513
  sn(d, mn);
514
- const o = async (g, y) => {
514
+ const a = async (g, y) => {
515
515
  const v = d.value;
516
516
  if (d.set({
517
517
  ...v,
@@ -540,9 +540,9 @@ function xn(e, t) {
540
540
  _ = "stale";
541
541
  }
542
542
  if (S) {
543
- const k = d.value, j = (S == null ? void 0 : S.status) === 401;
543
+ const k = d.value, N = (S == null ? void 0 : S.status) === 401;
544
544
  return d.set({
545
- data: j ? null : k.data,
545
+ data: N ? null : k.data,
546
546
  error: S,
547
547
  isPending: !1,
548
548
  isRefetching: !1,
@@ -576,7 +576,7 @@ function xn(e, t) {
576
576
  s = 0, r == null || r.cancel();
577
577
  const y = new AbortController(), v = {
578
578
  cancel: () => y.abort(),
579
- promise: Promise.resolve().then(() => y.signal.aborted ? "aborted" : o(y.signal, g)),
579
+ promise: Promise.resolve().then(() => y.signal.aborted ? "aborted" : a(y.signal, g)),
580
580
  revision: i
581
581
  };
582
582
  r = v;
@@ -654,7 +654,7 @@ var bn = Object.defineProperty, wn = Object.defineProperties, Sn = Object.getOwn
654
654
  }
655
655
  }, _n = async (e, t) => {
656
656
  var n, r, s, i, l, d;
657
- let o = t || {};
657
+ let a = t || {};
658
658
  const u = {
659
659
  onRequest: [t == null ? void 0 : t.onRequest],
660
660
  onResponse: [t == null ? void 0 : t.onResponse],
@@ -665,19 +665,19 @@ var bn = Object.defineProperty, wn = Object.defineProperties, Sn = Object.getOwn
665
665
  if (!t || !(t != null && t.plugins))
666
666
  return {
667
667
  url: e,
668
- options: o,
668
+ options: a,
669
669
  hooks: u
670
670
  };
671
671
  for (const c of (t == null ? void 0 : t.plugins) || []) {
672
672
  if (c.init) {
673
673
  const m = await ((n = c.init) == null ? void 0 : n.call(c, e.toString(), t));
674
- o = m.options || o, e = m.url;
674
+ a = m.options || a, e = m.url;
675
675
  }
676
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);
677
677
  }
678
678
  return {
679
679
  url: e,
680
- options: o,
680
+ options: a,
681
681
  hooks: u
682
682
  };
683
683
  }, Ue = class {
@@ -764,39 +764,39 @@ function Un(e) {
764
764
  const r = t.split(";").shift() || "";
765
765
  return Ln.test(r) ? "json" : n.has(r) || r.startsWith("text/") ? "text" : "blob";
766
766
  }
767
- function Nn(e) {
767
+ function jn(e) {
768
768
  try {
769
769
  return JSON.parse(e), !0;
770
770
  } catch {
771
771
  return !1;
772
772
  }
773
773
  }
774
- function Je(e) {
774
+ function Ve(e) {
775
775
  if (e === void 0)
776
776
  return !1;
777
777
  const t = typeof e;
778
778
  return t === "string" || t === "number" || t === "boolean" || t === null ? !0 : t !== "object" ? !1 : Array.isArray(e) ? !0 : e.buffer ? !1 : e.constructor && e.constructor.name === "Object" || typeof e.toJSON == "function";
779
779
  }
780
- function Ne(e) {
780
+ function je(e) {
781
781
  try {
782
782
  return JSON.parse(e);
783
783
  } catch {
784
784
  return e;
785
785
  }
786
786
  }
787
- function je(e) {
787
+ function Ne(e) {
788
788
  return typeof e == "function";
789
789
  }
790
- function jn(e) {
790
+ function Nn(e) {
791
791
  if (e != null && e.customFetchImpl)
792
792
  return e.customFetchImpl;
793
- if (typeof globalThis < "u" && je(globalThis.fetch))
793
+ if (typeof globalThis < "u" && Ne(globalThis.fetch))
794
794
  return globalThis.fetch;
795
- if (typeof window < "u" && je(window.fetch))
795
+ if (typeof window < "u" && Ne(window.fetch))
796
796
  return window.fetch;
797
797
  throw new Error("No fetch implementation found");
798
798
  }
799
- function Ve(...e) {
799
+ function Je(...e) {
800
800
  const t = {};
801
801
  for (const n of e)
802
802
  if (n)
@@ -812,7 +812,7 @@ function Ve(...e) {
812
812
  return t;
813
813
  }
814
814
  async function An(e) {
815
- const t = new Headers(Ve(e == null ? void 0 : e.headers, await Pn(e)));
815
+ const t = new Headers(Je(e == null ? void 0 : e.headers, await Pn(e)));
816
816
  if (!t.has("content-type")) {
817
817
  const n = Cn(e == null ? void 0 : e.body);
818
818
  n && t.set("content-type", n);
@@ -820,7 +820,7 @@ async function An(e) {
820
820
  return t;
821
821
  }
822
822
  function Cn(e) {
823
- return Je(e) ? "application/json" : null;
823
+ return Ve(e) ? "application/json" : null;
824
824
  }
825
825
  function In(e) {
826
826
  const t = e.get("content-type");
@@ -828,7 +828,7 @@ function In(e) {
828
828
  }
829
829
  function qn(e, t) {
830
830
  const { body: n } = e;
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
+ return n ? !Ve(n) || typeof n == "string" ? n : In(t) === "application/x-www-form-urlencoded" ? new URLSearchParams(n).toString() : JSON.stringify(n) : null;
832
832
  }
833
833
  function Fn(e, t) {
834
834
  var n;
@@ -867,15 +867,15 @@ var Xe = ["get", "post", "put", "patch", "delete"], Mn = (e) => ({
867
867
  async init(t, n) {
868
868
  var r, s, i, l;
869
869
  const d = ((s = (r = e.plugins) == null ? void 0 : r.find(
870
- (o) => {
870
+ (a) => {
871
871
  var u;
872
- return (u = o.schema) != null && u.config ? t.startsWith(o.schema.config.baseURL || "") || t.startsWith(o.schema.config.prefix || "") : !1;
872
+ return (u = a.schema) != null && u.config ? t.startsWith(a.schema.config.baseURL || "") || t.startsWith(a.schema.config.prefix || "") : !1;
873
873
  }
874
874
  )) == null ? void 0 : s.schema) || e.schema;
875
875
  if (d) {
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];
876
+ let a = t;
877
+ (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));
878
+ const u = d.schema[a];
879
879
  if (u) {
880
880
  let c = n == null ? void 0 : n.headers;
881
881
  if (u.headers && !(n != null && n.disableValidation)) {
@@ -920,7 +920,7 @@ var Xe = ["get", "post", "put", "patch", "delete"], Mn = (e) => ({
920
920
  }), Dn = (e) => {
921
921
  async function t(n, r) {
922
922
  const s = A(U(U({}, e), r), {
923
- headers: Ve(e == null ? void 0 : e.headers, r == null ? void 0 : r.headers),
923
+ headers: Je(e == null ? void 0 : e.headers, r == null ? void 0 : r.headers),
924
924
  plugins: [...(e == null ? void 0 : e.plugins) || [], Mn(e || {}), ...(r == null ? void 0 : r.plugins) || []]
925
925
  });
926
926
  if (e != null && e.catchAllError)
@@ -962,7 +962,7 @@ function $n(e, t) {
962
962
  }
963
963
  i.endsWith("/") || (i += "/");
964
964
  let [l, d] = e.replace(i, "").split("?");
965
- const o = new URLSearchParams(d);
965
+ const a = new URLSearchParams(d);
966
966
  for (const [p, g] of Object.entries(s || {})) {
967
967
  if (g == null) continue;
968
968
  let y;
@@ -970,11 +970,11 @@ function $n(e, t) {
970
970
  y = g;
971
971
  else if (Array.isArray(g)) {
972
972
  for (const v of g)
973
- o.append(p, v);
973
+ a.append(p, v);
974
974
  continue;
975
975
  } else
976
976
  y = JSON.stringify(g);
977
- o.set(p, y);
977
+ a.set(p, y);
978
978
  }
979
979
  const u = /* @__PURE__ */ new Map();
980
980
  if (r)
@@ -988,16 +988,16 @@ function $n(e, t) {
988
988
  for (const [p, g] of Object.entries(r))
989
989
  u.set(`:${p}`, String(g));
990
990
  l = l.split("/").map((p) => Wn(p, u)).join("/"), l = l.replace(/^\/+/, "");
991
- let c = o.toString();
991
+ let c = a.toString();
992
992
  return c = c.length > 0 ? `?${c}`.replace(/\+/g, "%20") : "", i.startsWith("http") ? new URL(`${l}${c}`, i) : `${i}${l}${c}`;
993
993
  }
994
994
  var xe = async (e, t) => {
995
- var n, r, s, i, l, d, o, u;
995
+ var n, r, s, i, l, d, a, u;
996
996
  const {
997
997
  hooks: c,
998
998
  url: m,
999
999
  options: p
1000
- } = await _n(e, t), g = jn(p), y = new AbortController(), v = (n = p.signal) != null ? n : y.signal, x = $n(m, p), w = await An(p), S = qn(p, w), _ = Fn(m, p), b = A(U({}, p), {
1000
+ } = await _n(e, t), g = Nn(p), y = new AbortController(), v = (n = p.signal) != null ? n : y.signal, x = $n(m, p), w = await An(p), S = qn(p, w), _ = Fn(m, p), b = A(U({}, p), {
1001
1001
  url: x,
1002
1002
  headers: w,
1003
1003
  body: S,
@@ -1036,7 +1036,7 @@ var xe = async (e, t) => {
1036
1036
  request: b
1037
1037
  };
1038
1038
  if (h === "json" || h === "text") {
1039
- const I = await f.text(), Ye = (i = b.jsonParser) != null ? i : Ne;
1039
+ const I = await f.text(), Ye = (i = b.jsonParser) != null ? i : je;
1040
1040
  L.data = await Ye(I);
1041
1041
  } else
1042
1042
  L.data = await f[h]();
@@ -1053,7 +1053,7 @@ var xe = async (e, t) => {
1053
1053
  error: null
1054
1054
  };
1055
1055
  }
1056
- const j = (d = t == null ? void 0 : t.jsonParser) != null ? d : Ne, C = await f.text(), H = Nn(C), M = H ? await j(C) : null, K = {
1056
+ const N = (d = t == null ? void 0 : t.jsonParser) != null ? d : je, C = await f.text(), H = jn(C), M = H ? await N(C) : null, K = {
1057
1057
  response: f,
1058
1058
  responseText: C,
1059
1059
  request: b,
@@ -1064,7 +1064,7 @@ var xe = async (e, t) => {
1064
1064
  };
1065
1065
  for (const P of c.onError)
1066
1066
  P && await P(A(U({}, K), {
1067
- response: (o = t == null ? void 0 : t.hookOptions) != null && o.cloneResponse ? f.clone() : f
1067
+ response: (a = t == null ? void 0 : t.hookOptions) != null && a.cloneResponse ? f.clone() : f
1068
1068
  }));
1069
1069
  if (t != null && t.retry) {
1070
1070
  const P = Tn(t.retry), h = (u = t.retryAttempt) != null ? u : 0;
@@ -1106,18 +1106,18 @@ const Gn = (e) => {
1106
1106
  } catch {
1107
1107
  }
1108
1108
  }
1109
- }, Jn = (e, t) => {
1110
- var k, j, C, H, M, K, P;
1109
+ }, Vn = (e, t) => {
1110
+ var k, N, C, H, M, K, P;
1111
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 = {
1112
1112
  id: "lifecycle-hooks",
1113
1113
  name: "lifecycle-hooks",
1114
1114
  hooks: {
1115
- onSuccess: (j = e == null ? void 0 : e.fetchOptions) == null ? void 0 : j.onSuccess,
1115
+ onSuccess: (N = e == null ? void 0 : e.fetchOptions) == null ? void 0 : N.onSuccess,
1116
1116
  onError: (C = e == null ? void 0 : e.fetchOptions) == null ? void 0 : C.onError,
1117
1117
  onRequest: (H = e == null ? void 0 : e.fetchOptions) == null ? void 0 : H.onRequest,
1118
1118
  onResponse: (M = e == null ? void 0 : e.fetchOptions) == null ? void 0 : M.onResponse
1119
1119
  }
1120
- }, { onSuccess: l, onError: d, onRequest: o, onResponse: u, ...c } = (e == null ? void 0 : e.fetchOptions) || {}, m = Dn({
1120
+ }, { onSuccess: l, onError: d, onRequest: a, onResponse: u, ...c } = (e == null ? void 0 : e.fetchOptions) || {}, m = Dn({
1121
1121
  baseURL: r,
1122
1122
  ...n ? { credentials: "include" } : {},
1123
1123
  method: "GET",
@@ -1181,7 +1181,7 @@ const Gn = (e) => {
1181
1181
  $store: f
1182
1182
  };
1183
1183
  };
1184
- function Vn(e) {
1184
+ function Jn(e) {
1185
1185
  return typeof e == "object" && e !== null && "get" in e && typeof e.get == "function" && "lc" in e && typeof e.lc == "number";
1186
1186
  }
1187
1187
  function Kn(e) {
@@ -1202,18 +1202,18 @@ function tr(e, t, n, r, s) {
1202
1202
  function i(l = []) {
1203
1203
  return new Proxy(function() {
1204
1204
  }, {
1205
- get(d, o) {
1206
- if (typeof o != "string" || o === "then" || o === "catch" || o === "finally") return;
1207
- const u = [...l, o];
1205
+ get(d, a) {
1206
+ if (typeof a != "string" || a === "then" || a === "catch" || a === "finally") return;
1207
+ const u = [...l, a];
1208
1208
  let c = e;
1209
1209
  for (const m of u) if (c && typeof c == "object" && m in c) c = c[m];
1210
1210
  else {
1211
1211
  c = void 0;
1212
1212
  break;
1213
1213
  }
1214
- return typeof c == "function" || Vn(c) ? c : i(u);
1214
+ return typeof c == "function" || Jn(c) ? c : i(u);
1215
1215
  },
1216
- apply: async (d, o, u) => {
1216
+ apply: async (d, a, u) => {
1217
1217
  const c = "/" + l.map(Zn).join("/"), m = u[0] || {}, p = u[1] || {}, { query: g, fetchOptions: y, ...v } = m, x = {
1218
1218
  ...p,
1219
1219
  ...y
@@ -1233,13 +1233,13 @@ function tr(e, t, n, r, s) {
1233
1233
  if (!_.length) return;
1234
1234
  const b = /* @__PURE__ */ new Set();
1235
1235
  for (const k of _) {
1236
- const j = r[k.signal];
1237
- if (!j) return;
1236
+ const N = r[k.signal];
1237
+ if (!N) return;
1238
1238
  if (b.has(k.signal)) continue;
1239
1239
  b.add(k.signal);
1240
- const C = j.get();
1240
+ const C = N.get();
1241
1241
  setTimeout(() => {
1242
- j.set(!C);
1242
+ N.set(!C);
1243
1243
  }, 10), (f = k.callback) == null || f.call(k, c);
1244
1244
  }
1245
1245
  }
@@ -1251,10 +1251,10 @@ function tr(e, t, n, r, s) {
1251
1251
  }
1252
1252
  function nr(e, t = {}) {
1253
1253
  const n = et(e.get()), { keys: r, deps: s = [e, r] } = t, i = tt((d) => {
1254
- const o = (u) => {
1254
+ const a = (u) => {
1255
1255
  n.current !== u && (n.current = u, d());
1256
1256
  };
1257
- return o(e.value), r != null && r.length ? rn(e, r, o) : e.listen(o);
1257
+ return a(e.value), r != null && r.length ? rn(e, r, a) : e.listen(a);
1258
1258
  }, s), l = () => n.current;
1259
1259
  return nt(i, l, l);
1260
1260
  }
@@ -1262,33 +1262,33 @@ function rr(e) {
1262
1262
  return `use${Kn(e)}`;
1263
1263
  }
1264
1264
  function sr(e) {
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);
1265
+ const { pluginPathMethods: t, pluginsActions: n, pluginsAtoms: r, hydrateSession: s, $fetch: i, $store: l, atomListeners: d } = Vn(e), a = {};
1266
+ for (const [u, c] of Object.entries(r)) a[rr(u)] = () => nr(c);
1267
1267
  return tr({
1268
1268
  ...n,
1269
- ...o,
1269
+ ...a,
1270
1270
  hydrateSession: s,
1271
1271
  $fetch: i,
1272
1272
  $store: l
1273
1273
  }, i, t, r, d);
1274
1274
  }
1275
1275
  var ir = "1.7.3";
1276
- const or = ir, ar = () => ({
1276
+ const ar = ir, or = () => ({
1277
1277
  id: "magic-link",
1278
- version: or,
1278
+ version: ar,
1279
1279
  $InferServerPlugin: {}
1280
1280
  });
1281
1281
  let Ae = null;
1282
1282
  function z() {
1283
1283
  return Ae ?? (Ae = sr({
1284
1284
  baseURL: st(),
1285
- plugins: [ar()]
1285
+ plugins: [or()]
1286
1286
  })), Ae;
1287
1287
  }
1288
1288
  function lr() {
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));
1289
+ const [e] = Ce(), [t, n] = R(null), [r, s] = R(null), [i, l] = R(!1), [d, a] = 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
+ J(() => {
1291
+ it().then((f) => a(f.github)).catch(() => a(!1));
1292
1292
  }, []);
1293
1293
  const S = window.location.href;
1294
1294
  async function _() {
@@ -1332,18 +1332,18 @@ function lr() {
1332
1332
  }
1333
1333
  window.location.assign(S);
1334
1334
  }
1335
- return /* @__PURE__ */ E("main", { ...ot(at, ur.main), children: [
1336
- /* @__PURE__ */ a("div", { className: "x10l6tqk x10a8y8t x47corl x87ps6o xlxt4rd", "aria-hidden": !0 }),
1335
+ return /* @__PURE__ */ E("main", { ...ot(lt, ur.main), children: [
1336
+ /* @__PURE__ */ o("div", { className: "x10l6tqk x10a8y8t x47corl x87ps6o xlxt4rd", "aria-hidden": !0 }),
1337
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." }) }),
1338
+ /* @__PURE__ */ o("div", { className: "xrvj5dj x1ku5rj1 x1useyqa xsdox4t x1y5o9j5 x1n0nidx", children: /* @__PURE__ */ o(cr, {}) }),
1339
+ /* @__PURE__ */ o("h1", { className: "x1ghz6dp xqjzbou xneq65o x1s688f x1b4dsll x1u7k74 x1w2vvpw", children: u ? "Join this workspace" : "Welcome back" }),
1340
+ /* @__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." }) }),
1341
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,
1342
+ t ? /* @__PURE__ */ o(O, { tone: "danger", children: t }) : null,
1343
+ r ? /* @__PURE__ */ o(O, { tone: "muted", children: r }) : null,
1344
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, ...{
1345
+ 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,
1346
+ /* @__PURE__ */ o("input", { required: !0, type: "email", value: c, onChange: (f) => m(f.target.value), placeholder: "Email", autoComplete: "email", readOnly: !!u, ...{
1347
1347
  0: {
1348
1348
  className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x17ia0ru x1l3a84d"
1349
1349
  },
@@ -1351,8 +1351,8 @@ function lr() {
1351
1351
  className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x1l3a84d x10jjolp"
1352
1352
  }
1353
1353
  }[!!u << 0] }),
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, ...{
1354
+ /* @__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" }),
1355
+ /* @__PURE__ */ o("button", { type: "submit", disabled: i, ...{
1356
1356
  0: {
1357
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"
1358
1358
  },
@@ -1361,7 +1361,7 @@ function lr() {
1361
1361
  }
1362
1362
  }[!!i << 0], children: x === "signup" ? "Create account" : "Sign in" })
1363
1363
  ] }),
1364
- /* @__PURE__ */ a("button", { type: "button", disabled: i || !c, onClick: () => void b(), ...{
1364
+ /* @__PURE__ */ o("button", { type: "button", disabled: i || !c, onClick: () => void b(), ...{
1365
1365
  0: {
1366
1366
  className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k xc342km x1e6avla xjbqb8w x1n0nidx x1vrk1b5 x1ypdohk"
1367
1367
  },
@@ -1369,7 +1369,7 @@ function lr() {
1369
1369
  className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k xc342km x1e6avla xjbqb8w x1n0nidx x1vrk1b5 xwq05k6 x1h6gzvc x47corl"
1370
1370
  }
1371
1371
  }[!!(i || !c) << 0], children: "Email me a magic link" }),
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" }),
1372
+ /* @__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" }),
1373
1373
  /* @__PURE__ */ E("button", { type: "button", disabled: i || d !== !0, onClick: () => void _(), ...{
1374
1374
  0: {
1375
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"
@@ -1378,7 +1378,7 @@ function lr() {
1378
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"
1379
1379
  }
1380
1380
  }[!!(i || d !== !0) << 0], children: [
1381
- /* @__PURE__ */ a(yt, { size: 18 }),
1381
+ /* @__PURE__ */ o(at, { size: 18 }),
1382
1382
  "Continue with GitHub"
1383
1383
  ] })
1384
1384
  ] })
@@ -1387,9 +1387,9 @@ function lr() {
1387
1387
  }
1388
1388
  function cr() {
1389
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" })
1390
+ /* @__PURE__ */ o("circle", { cx: "24", cy: "24", r: "18.25", stroke: "currentColor", strokeWidth: "1.25", opacity: "0.28" }),
1391
+ /* @__PURE__ */ o("circle", { cx: "24", cy: "24", r: "11.25", stroke: "currentColor", strokeWidth: "1.25", opacity: "0.55" }),
1392
+ /* @__PURE__ */ o("circle", { cx: "24", cy: "24", r: "4", fill: "currentColor" })
1393
1393
  ] });
1394
1394
  }
1395
1395
  const ur = {
@@ -1412,7 +1412,7 @@ const ur = {
1412
1412
  function dr() {
1413
1413
  var s;
1414
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
+ return r === "/workspaces" && n && bt(e), /* @__PURE__ */ o(Ie, { to: r, replace: !0 });
1416
1416
  }
1417
1417
  function fr({
1418
1418
  to: e,
@@ -1420,35 +1420,35 @@ function fr({
1420
1420
  meta: n,
1421
1421
  trailing: r
1422
1422
  }) {
1423
- return /* @__PURE__ */ E(lt, { to: e, className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x21xpn4 x173sf5p x15jjofa x1hl2dhg xqjzbou xso031l x1q0q8m5 x4b2zrn x1t1lzn6 x1xcxyqb", children: [
1423
+ return /* @__PURE__ */ E(ct, { to: e, className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x21xpn4 x173sf5p x15jjofa x1hl2dhg xqjzbou xso031l x1q0q8m5 x4b2zrn x1t1lzn6 x1xcxyqb", children: [
1424
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
1425
+ /* @__PURE__ */ o("span", { className: "x17tv04q xk50ysn", children: t }),
1426
+ n ? /* @__PURE__ */ o("span", { className: "x1vrk1b5 x111yfic", children: n }) : null
1427
1427
  ] }),
1428
- r ? /* @__PURE__ */ a("span", { className: "x2lah0s x1vrk1b5 x111yfic", children: r }) : null
1428
+ r ? /* @__PURE__ */ o("span", { className: "x2lah0s x1vrk1b5 x111yfic", children: r }) : null
1429
1429
  ] });
1430
1430
  }
1431
1431
  function hr({
1432
1432
  children: e
1433
1433
  }) {
1434
- return /* @__PURE__ */ a("div", { className: "x78zum5 xdt5ytf xmkeg23 x1y0btm7 x1j0qoeq x13oidi x1hb2obb xb3r6kr", children: e });
1434
+ return /* @__PURE__ */ o("div", { className: "x78zum5 xdt5ytf xmkeg23 x1y0btm7 x1j0qoeq x13oidi x1hb2obb xb3r6kr", children: e });
1435
1435
  }
1436
1436
  function pr() {
1437
1437
  var t;
1438
1438
  const e = ((t = Me().control) == null ? void 0 : t.workspaces) ?? [];
1439
- return /* @__PURE__ */ E(oe, { centered: !0, children: [
1440
- /* @__PURE__ */ a(
1441
- J,
1439
+ return /* @__PURE__ */ E(ae, { centered: !0, children: [
1440
+ /* @__PURE__ */ o(
1441
+ V,
1442
1442
  {
1443
1443
  title: "Workspaces",
1444
1444
  description: "Each workspace is a site and a team.",
1445
- action: /* @__PURE__ */ a(qe, { to: "/workspaces/new", children: "New workspace" })
1445
+ action: /* @__PURE__ */ o(qe, { to: "/workspaces/new", children: "New workspace" })
1446
1446
  }
1447
1447
  ),
1448
- e.length === 0 ? /* @__PURE__ */ a(O, { tone: "muted", children: "No workspaces yet." }) : /* @__PURE__ */ a(hr, { children: e.map((n) => /* @__PURE__ */ a(
1448
+ e.length === 0 ? /* @__PURE__ */ o(O, { tone: "muted", children: "No workspaces yet." }) : /* @__PURE__ */ o(hr, { children: e.map((n) => /* @__PURE__ */ o(
1449
1449
  fr,
1450
1450
  {
1451
- to: ct(n.slug),
1451
+ to: ut(n.slug),
1452
1452
  title: n.name,
1453
1453
  meta: n.role
1454
1454
  },
@@ -1458,10 +1458,10 @@ function pr() {
1458
1458
  }
1459
1459
  function gr() {
1460
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);
1461
+ async function d(a) {
1462
+ a.preventDefault(), l(!0), s(null);
1463
1463
  try {
1464
- const { workspace: u } = await ut(t), c = B.getState().control;
1464
+ const { workspace: u } = await dt(t), c = B.getState().control;
1465
1465
  c && B.applyControl({
1466
1466
  ...c,
1467
1467
  workspaces: [
@@ -1480,26 +1480,26 @@ function gr() {
1480
1480
  l(!1);
1481
1481
  }
1482
1482
  }
1483
- return /* @__PURE__ */ E(oe, { children: [
1484
- /* @__PURE__ */ a(
1485
- J,
1483
+ return /* @__PURE__ */ E(ae, { children: [
1484
+ /* @__PURE__ */ o(
1485
+ V,
1486
1486
  {
1487
- kicker: /* @__PURE__ */ a(wt, { to: "/workspaces", children: "← Workspaces" }),
1487
+ kicker: /* @__PURE__ */ o(wt, { to: "/workspaces", children: "← Workspaces" }),
1488
1488
  title: "Create workspace"
1489
1489
  }
1490
1490
  ),
1491
- /* @__PURE__ */ a("form", { onSubmit: d, children: /* @__PURE__ */ E(se, { children: [
1492
- /* @__PURE__ */ a(Z, { label: "Name", children: /* @__PURE__ */ a(
1491
+ /* @__PURE__ */ o("form", { onSubmit: d, children: /* @__PURE__ */ E(se, { children: [
1492
+ /* @__PURE__ */ o(Z, { label: "Name", children: /* @__PURE__ */ o(
1493
1493
  ee,
1494
1494
  {
1495
1495
  required: !0,
1496
1496
  value: t,
1497
- onChange: (o) => n(o.target.value),
1497
+ onChange: (a) => n(a.target.value),
1498
1498
  placeholder: "Docs site"
1499
1499
  }
1500
1500
  ) }),
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" }) })
1501
+ r ? /* @__PURE__ */ o(O, { tone: "danger", children: r }) : null,
1502
+ /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(ye, { type: "submit", disabled: i, children: i ? "Creating…" : "Create workspace" }) })
1503
1503
  ] }) })
1504
1504
  ] });
1505
1505
  }
@@ -1520,14 +1520,14 @@ function mr(e, t) {
1520
1520
  }
1521
1521
  }
1522
1522
  function xr() {
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(() => {
1523
+ const [e] = Ce(), t = Fe(), n = e.get("token") ?? "", r = e.get("email") ?? "", [s, i] = R(null), [l, d] = R(null), [a, u] = R(!1);
1524
+ J(() => {
1525
1525
  if (!n) {
1526
1526
  i("This invite link is missing a token.");
1527
1527
  return;
1528
1528
  }
1529
1529
  let m = !1;
1530
- return dt(n).then((p) => {
1530
+ return ft(n).then((p) => {
1531
1531
  m || t(`/${p.slug}`, { replace: !0 });
1532
1532
  }).catch(async (p) => {
1533
1533
  if (m) return;
@@ -1548,18 +1548,18 @@ function xr() {
1548
1548
  await z().signOut().catch(() => {
1549
1549
  }), te(), B.wipe(), window.location.assign(window.location.href);
1550
1550
  }
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…" })
1551
+ return /* @__PURE__ */ E(ae, { centered: !0, children: [
1552
+ /* @__PURE__ */ o(V, { title: "Accept invite" }),
1553
+ a ? /* @__PURE__ */ E(se, { children: [
1554
+ /* @__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.` }),
1555
+ /* @__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." }),
1556
+ /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(ye, { type: "button", variant: "secondary", onClick: () => void c(), children: r ? `Sign in as ${r}` : "Sign in to continue" }) })
1557
+ ] }) : s ? /* @__PURE__ */ o(O, { tone: "danger", children: s }) : /* @__PURE__ */ o(O, { tone: "muted", children: "Joining workspace…" })
1558
1558
  ] });
1559
1559
  }
1560
1560
  function yr() {
1561
- const { email: e, userId: t } = ze(), [n, r] = R(""), [s, i] = R(null), [l, d] = R(null), [o, u] = R(!1);
1562
- V(() => {
1561
+ const { email: e, userId: t } = ze(), [n, r] = R(""), [s, i] = R(null), [l, d] = R(null), [a, u] = R(!1);
1562
+ J(() => {
1563
1563
  ve().then((m) => {
1564
1564
  m != null && m.user.name && r(m.user.name);
1565
1565
  });
@@ -1573,19 +1573,19 @@ function yr() {
1573
1573
  }
1574
1574
  i("Name saved. New publishes will use it.");
1575
1575
  }
1576
- return /* @__PURE__ */ E(oe, { children: [
1577
- /* @__PURE__ */ a(
1578
- J,
1576
+ return /* @__PURE__ */ E(ae, { children: [
1577
+ /* @__PURE__ */ o(
1578
+ V,
1579
1579
  {
1580
1580
  title: "User settings",
1581
1581
  description: "Your account on this Backmatter instance."
1582
1582
  }
1583
1583
  ),
1584
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(
1585
+ /* @__PURE__ */ o(St, { children: /* @__PURE__ */ o("form", { onSubmit: (m) => void c(m), children: /* @__PURE__ */ E(se, { children: [
1586
+ /* @__PURE__ */ o(O, { as: "h2", size: "lg", weight: "medium", children: "Account" }),
1587
+ /* @__PURE__ */ o(Z, { label: "Name", children: /* @__PURE__ */ o(ee, { value: n, onChange: (m) => r(m.target.value), autoComplete: "name" }) }),
1588
+ /* @__PURE__ */ o(Z, { label: "Email", children: /* @__PURE__ */ o(
1589
1589
  ee,
1590
1590
  {
1591
1591
  type: "email",
@@ -1595,7 +1595,7 @@ function yr() {
1595
1595
  spellCheck: !1
1596
1596
  }
1597
1597
  ) }),
1598
- /* @__PURE__ */ a(Z, { label: "User ID", hint: "Stable id for this account.", children: /* @__PURE__ */ a(
1598
+ /* @__PURE__ */ o(Z, { label: "User ID", hint: "Stable id for this account.", children: /* @__PURE__ */ o(
1599
1599
  ee,
1600
1600
  {
1601
1601
  value: t,
@@ -1604,20 +1604,20 @@ function yr() {
1604
1604
  spellCheck: !1
1605
1605
  }
1606
1606
  ) }),
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" }) })
1607
+ l ? /* @__PURE__ */ o(O, { tone: "danger", children: l }) : null,
1608
+ s ? /* @__PURE__ */ o(O, { tone: "muted", children: s }) : null,
1609
+ /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(ye, { type: "submit", disabled: a, children: a ? "Saving…" : "Save name" }) })
1610
1610
  ] }) }) }),
1611
1611
  /* @__PURE__ */ E("div", { children: [
1612
- /* @__PURE__ */ a(
1613
- J,
1612
+ /* @__PURE__ */ o(
1613
+ V,
1614
1614
  {
1615
1615
  title: "Connectors",
1616
1616
  description: "Personal MCP servers that follow you across workspaces.",
1617
1617
  compact: !0
1618
1618
  }
1619
1619
  ),
1620
- /* @__PURE__ */ a(kt, { scope: "user", canEdit: !0 })
1620
+ /* @__PURE__ */ o(kt, { scope: "user", canEdit: !0 })
1621
1621
  ] })
1622
1622
  ] })
1623
1623
  ] });
@@ -1628,7 +1628,7 @@ function vr({
1628
1628
  const [t, n] = R({
1629
1629
  kind: "working"
1630
1630
  });
1631
- return V(() => {
1631
+ return J(() => {
1632
1632
  const r = Rt(window.location.search);
1633
1633
  if (!r) {
1634
1634
  n({
@@ -1642,7 +1642,7 @@ function vr({
1642
1642
  try {
1643
1643
  const {
1644
1644
  workspace: i
1645
- } = await ft(r.workspaceId), l = Et(r.returnUrl, i.siteUrls);
1645
+ } = await ht(r.workspaceId), l = Et(r.returnUrl, i.siteUrls);
1646
1646
  if (!l) {
1647
1647
  n({
1648
1648
  kind: "error",
@@ -1652,7 +1652,7 @@ function vr({
1652
1652
  }
1653
1653
  const {
1654
1654
  ticket: d
1655
- } = await ht(i.id, {
1655
+ } = await pt(i.id, {
1656
1656
  redirect: l.redirect,
1657
1657
  tree: e
1658
1658
  });
@@ -1668,32 +1668,32 @@ function vr({
1668
1668
  })(), () => {
1669
1669
  s = !0;
1670
1670
  };
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." })
1671
+ }, [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__ */ E(be, { children: [
1672
+ /* @__PURE__ */ o(O, { size: "lg", weight: "medium", children: "Opening your site…" }),
1673
+ /* @__PURE__ */ o(O, { tone: "muted", children: "Setting up editing on the site and sending you back." })
1674
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" })
1675
+ /* @__PURE__ */ o(O, { size: "lg", weight: "medium", children: "Could not open the site" }),
1676
+ /* @__PURE__ */ o(O, { tone: "muted", children: t.message }),
1677
+ /* @__PURE__ */ o(qe, { to: "/", variant: "secondary", children: "Back to the dashboard" })
1678
1678
  ] }) }) });
1679
1679
  }
1680
- const Q = Be() ? rt(() => import("./UiKitPage-BOunq6mr.js").then((e) => ({
1680
+ const Q = Be() ? rt(() => import("./UiKitPage-DyVyBp0I.js").then((e) => ({
1681
1681
  default: e.UiKitPage
1682
1682
  }))) : null;
1683
1683
  function br(e) {
1684
1684
  return Be() && e.replace(/\/$/, "") === "/__ui";
1685
1685
  }
1686
1686
  function Or() {
1687
- return /* @__PURE__ */ a(Ot, { children: /* @__PURE__ */ a(pt, { children: /* @__PURE__ */ a(wr, {}) }) });
1687
+ return /* @__PURE__ */ o(Ot, { children: /* @__PURE__ */ o(gt, { children: /* @__PURE__ */ o(wr, {}) }) });
1688
1688
  }
1689
1689
  function wr() {
1690
- const e = gt(), [t, n] = R(() => {
1690
+ const e = mt(), [t, n] = R(() => {
1691
1691
  const r = Tt();
1692
1692
  return r ? {
1693
1693
  user: r
1694
1694
  } : "loading";
1695
1695
  });
1696
- return V(() => {
1696
+ return J(() => {
1697
1697
  ve().then((r) => {
1698
1698
  if (!(r != null && r.user)) {
1699
1699
  te(), B.wipe(), n(null);
@@ -1705,29 +1705,29 @@ function wr() {
1705
1705
  email: r.user.email
1706
1706
  }
1707
1707
  }), B.getState().sessionUserId !== r.user.id) {
1708
- const s = mt(window.location.pathname);
1708
+ const s = xt(window.location.pathname);
1709
1709
  B.hydrate(r.user.id, s ?? De(r.user.id));
1710
1710
  }
1711
1711
  }).catch(() => {
1712
1712
  te(), B.wipe(), n(null);
1713
1713
  });
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: () => {
1714
+ }, []), 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(Lt, {}) : t ? e.pathname.replace(/\/$/, "") === "/enter" ? /* @__PURE__ */ o(vr, { userId: t.user.id }) : /* @__PURE__ */ o(Ut, { user: t.user, children: /* @__PURE__ */ o(jt, { children: /* @__PURE__ */ o(Nt, { userId: t.user.id, email: t.user.email, onLogout: () => {
1715
1715
  te(), B.wipe(), z().signOut().then(() => {
1716
1716
  n(null);
1717
1717
  }).catch(() => {
1718
1718
  n(null);
1719
1719
  });
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, {}) }),
1720
+ }, children: /* @__PURE__ */ E(yt, { children: [
1721
+ /* @__PURE__ */ o(q, { path: "/", element: /* @__PURE__ */ o(dr, {}) }),
1722
+ /* @__PURE__ */ o(q, { path: "/workspaces", element: /* @__PURE__ */ o(pr, {}) }),
1723
+ /* @__PURE__ */ o(q, { path: "/workspaces/new", element: /* @__PURE__ */ o(gr, {}) }),
1724
+ /* @__PURE__ */ o(q, { path: "/invite", element: /* @__PURE__ */ o(xr, {}) }),
1725
+ /* @__PURE__ */ o(q, { path: "/account", element: /* @__PURE__ */ o(yr, {}) }),
1726
+ /* @__PURE__ */ o(q, { path: "/workspaces/:workspaceId/*", element: /* @__PURE__ */ o(At, {}) }),
1727
1727
  Ct(),
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, {});
1728
+ 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,
1729
+ /* @__PURE__ */ o(q, { path: "*", element: /* @__PURE__ */ o(Ie, { to: "/", replace: !0 }) })
1730
+ ] }) }) }) }) : /* @__PURE__ */ o(lr, {});
1731
1731
  }
1732
1732
  export {
1733
1733
  Or as A,