@backmatter/studio 0.0.18 → 0.0.20

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 (41) hide show
  1. package/dist/chunks/{UiKitApp-DkuQBiQZ.js → UiKitApp-C269OA8v.js} +528 -481
  2. package/dist/chunks/{WorkspaceRoutes-DVvb3N-V.js → WorkspaceRoutes-B4B5jjje.js} +24376 -23915
  3. package/dist/chunks/{dashboard-B4FITg6c.js → dashboard-DeNgythd.js} +586 -565
  4. package/dist/chunks/{index-CegtXnEI.js → index-7-TtXaMq.js} +104 -104
  5. package/dist/dashboard.js +2 -2
  6. package/dist/index.js +166 -159
  7. package/dist/site-widget.css +25 -6
  8. package/dist/site-widget.js +6925 -6840
  9. package/dist/studio.css +171 -36
  10. package/package.json +2 -2
  11. package/src/api.ts +48 -1
  12. package/src/chat/ChatMessage.tsx +4 -4
  13. package/src/chat/ChatProvider.tsx +6 -0
  14. package/src/chat/chat-helpers.ts +54 -2
  15. package/src/chrome/CommandPalette.tsx +3 -3
  16. package/src/chrome/ContentExplorerSidebar.tsx +421 -74
  17. package/src/chrome/WorkspaceStatusBar.tsx +24 -24
  18. package/src/chrome/commit-error.ts +48 -60
  19. package/src/chrome/commit-failure.tsx +2 -2
  20. package/src/chrome/content-path-tree.ts +4 -0
  21. package/src/chrome/explorer-row-menu.ts +28 -0
  22. package/src/chrome/folder-create-context.ts +14 -0
  23. package/src/chrome/use-publish-check.ts +75 -0
  24. package/src/fields/FieldControl.tsx +173 -62
  25. package/src/pages/BlocksList.tsx +38 -3
  26. package/src/pages/DocEditorPage.tsx +47 -64
  27. package/src/pages/EmbedPublishPage.tsx +13 -5
  28. package/src/pages/GithubConnectPage.tsx +1 -1
  29. package/src/pages/LoginPage.tsx +67 -5
  30. package/src/pages/MediaFieldInput.tsx +155 -63
  31. package/src/pages/MediaGalleryPage.tsx +56 -3
  32. package/src/pages/PreviewAddress.tsx +30 -0
  33. package/src/pages/WorkspaceHomePage.tsx +1 -1
  34. package/src/pages/ui-kit/colors.tsx +2 -0
  35. package/src/pages/ui-kit/fields.tsx +60 -0
  36. package/src/styles/themes.ts +2 -0
  37. package/src/styles/tokens.stylex.ts +1 -0
  38. package/src/ui/Button.tsx +14 -0
  39. package/src/ui/Field.tsx +12 -1
  40. package/src/ui/Input.tsx +191 -97
  41. package/src/ui/popup.ts +13 -6
@@ -1,13 +1,13 @@
1
- var Ke = Object.defineProperty;
2
- var Xe = (e, t, n) => t in e ? Ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var D = (e, t, n) => Xe(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { jsxs as k, jsx as o, Fragment as ge } from "react/jsx-runtime";
5
- import { useRef as Ye, useCallback as Qe, useSyncExternalStore as Ze, useState as w, useEffect as V, lazy as et, Suspense as tt } from "react";
6
- import { U as nt, aj as ve, ak as rt, P as _, al as st, p as it, am as at, an as Ne, ao as Ce, ap as Ie, aq as ot, ar as lt, N as qe, as as ct, at as ie, ad as J, W as ze, au as ut, av as Fe, ae as dt, ag as re, a7 as Q, a8 as Z, V as ae, aw as ft, Q as z, ax as ht, G as be, ay as ee, af as pt, az as gt, aA as mt, aB as xt, f as yt, aC as vt, a3 as bt, aD as wt, aE as kt, w as St, B as Et, F as Rt, aF as _t, aG as Ot, aH as Tt, H as Pt, aI as jt, R as Lt, I as At, J as Ut, K as Nt, L as F, M as Ct, O as It } from "./WorkspaceRoutes-DVvb3N-V.js";
1
+ var Xe = Object.defineProperty;
2
+ var Ye = (e, t, n) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var H = (e, t, n) => Ye(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { jsxs as k, jsx as o, Fragment as me } from "react/jsx-runtime";
5
+ import { useRef as Qe, useCallback as Ze, useSyncExternalStore as et, useState as S, useEffect as V, lazy as tt, Suspense as nt } from "react";
6
+ import { X as rt, an as be, ao as st, V as R, ap as it, k as at, aq as ot, ar as Ce, as as Ie, at as qe, au as lt, av as ct, P as ze, aw as ut, ax as ie, ah as J, Z as Be, ay as dt, az as Fe, ai as ft, ak as re, aa as Q, ab as Z, Y as ae, aA as ht, W as B, aB as pt, J as we, aC as ee, aj as gt, aD as mt, aE as xt, aF as yt, f as vt, aG as bt, a6 as wt, aH as kt, aI as St, z as Et, B as Rt, I as _t, aJ as Ot, aK as Tt, aL as Pt, K as jt, aM as Lt, R as At, L as Nt, M as Ut, N as Ct, O as F, Q as It, U as qt } from "./WorkspaceRoutes-B4B5jjje.js";
7
7
  const te = /* @__PURE__ */ Object.create(null), W = (e) => {
8
8
  var t, n;
9
9
  return ((t = globalThis.process) == null ? void 0 : t.env) || ((n = globalThis.Deno) == null ? void 0 : n.env.toObject()) || globalThis.__env__ || (e ? te : globalThis);
10
- }, q = new Proxy(te, {
10
+ }, z = new Proxy(te, {
11
11
  get(e, t) {
12
12
  return W()[t] ?? te[t];
13
13
  },
@@ -28,21 +28,21 @@ const te = /* @__PURE__ */ Object.create(null), W = (e) => {
28
28
  return Object.keys(e);
29
29
  }
30
30
  });
31
- q.NODE_ENV;
31
+ z.NODE_ENV;
32
32
  var ne = class extends Error {
33
33
  constructor(e, t) {
34
34
  super(e, t), this.name = "BetterAuthError", this.message = e, this.stack = "";
35
35
  }
36
36
  };
37
- const qt = 47;
38
- function Be(e) {
37
+ const zt = 47;
38
+ function Me(e) {
39
39
  let t = e.length;
40
- for (; t > 0 && e.charCodeAt(t - 1) === qt; ) t--;
40
+ for (; t > 0 && e.charCodeAt(t - 1) === zt; ) t--;
41
41
  return t === e.length ? e : e.slice(0, t);
42
42
  }
43
- function zt(e) {
43
+ function Bt(e) {
44
44
  try {
45
- return (Be(new URL(e).pathname) || "/") !== "/";
45
+ return (Me(new URL(e).pathname) || "/") !== "/";
46
46
  } catch {
47
47
  throw new ne(`Invalid base URL: ${e}. Please provide a valid base URL.`);
48
48
  }
@@ -56,24 +56,24 @@ function Ft(e) {
56
56
  }
57
57
  }
58
58
  function oe(e, t = "/api/auth") {
59
- if (Ft(e), zt(e)) return e;
60
- const n = Be(e);
59
+ if (Ft(e), Bt(e)) return e;
60
+ const n = Me(e);
61
61
  return !t || t === "/" ? n : (t = t.startsWith("/") ? t : `/${t}`, `${n}${t}`);
62
62
  }
63
- function Bt(e, t, n, r, s) {
63
+ function Mt(e, t, n, r, s) {
64
64
  if (e) return oe(e, t);
65
65
  {
66
- const i = q.BETTER_AUTH_URL || q.NEXT_PUBLIC_BETTER_AUTH_URL || q.PUBLIC_BETTER_AUTH_URL || q.NUXT_PUBLIC_BETTER_AUTH_URL || q.NUXT_PUBLIC_AUTH_URL || (q.BASE_URL !== "/" ? q.BASE_URL : void 0);
66
+ const i = z.BETTER_AUTH_URL || z.NEXT_PUBLIC_BETTER_AUTH_URL || z.PUBLIC_BETTER_AUTH_URL || z.NUXT_PUBLIC_BETTER_AUTH_URL || z.NUXT_PUBLIC_AUTH_URL || (z.BASE_URL !== "/" ? z.BASE_URL : void 0);
67
67
  if (i) return oe(i, t);
68
68
  }
69
69
  if (typeof window < "u" && window.location) return oe(window.location.origin, t);
70
70
  }
71
- const Mt = {
71
+ const Dt = {
72
72
  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
73
  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
74
  protoShort: /"__proto__"\s*:/,
75
75
  constructorShort: /"constructor"\s*:/
76
- }, Dt = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/, we = {
76
+ }, Ht = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/, ke = {
77
77
  true: !0,
78
78
  false: !1,
79
79
  null: null,
@@ -81,30 +81,30 @@ const Mt = {
81
81
  nan: NaN,
82
82
  infinity: Number.POSITIVE_INFINITY,
83
83
  "-infinity": Number.NEGATIVE_INFINITY
84
- }, Ht = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;
85
- function Wt(e) {
84
+ }, Wt = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;
85
+ function $t(e) {
86
86
  return e instanceof Date && !isNaN(e.getTime());
87
87
  }
88
- function $t(e) {
89
- const t = Ht.exec(e);
88
+ function Gt(e) {
89
+ const t = Wt.exec(e);
90
90
  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));
91
+ const [, n, r, s, i, l, d, a, u, c, g] = t, h = 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
92
  if (u) {
93
- const g = (parseInt(c, 10) * 60 + parseInt(m, 10)) * (u === "+" ? -1 : 1);
94
- p.setUTCMinutes(p.getUTCMinutes() + g);
93
+ const p = (parseInt(c, 10) * 60 + parseInt(g, 10)) * (u === "+" ? -1 : 1);
94
+ h.setUTCMinutes(h.getUTCMinutes() + p);
95
95
  }
96
- return Wt(p) ? p : null;
96
+ return $t(h) ? h : null;
97
97
  }
98
- function Gt(e, t = {}) {
98
+ function Jt(e, t = {}) {
99
99
  const { strict: n = !1, warnings: r = !1, reviver: s, parseDates: i = !0 } = t;
100
100
  if (typeof e != "string") return e;
101
101
  const l = e.trim(), d = l.toLowerCase();
102
- if (d.length <= 9 && d in we) return we[d];
103
- if (!Dt.test(l)) {
102
+ if (d.length <= 9 && d in ke) return ke[d];
103
+ if (!Ht.test(l)) {
104
104
  if (n) throw new SyntaxError("[better-json] Invalid JSON");
105
105
  return e;
106
106
  }
107
- if (Object.entries(Mt).some(([a, u]) => {
107
+ if (Object.entries(Dt).some(([a, u]) => {
108
108
  const c = u.test(l);
109
109
  return c && r && console.warn(`[better-json] Detected potential prototype pollution attempt using ${a} pattern`), c;
110
110
  }) && n) throw new Error("[better-json] Potential prototype pollution attempt detected");
@@ -115,8 +115,8 @@ function Gt(e, t = {}) {
115
115
  return;
116
116
  }
117
117
  if (i && typeof c == "string") {
118
- const m = $t(c);
119
- if (m) return m;
118
+ const g = Gt(c);
119
+ if (g) return g;
120
120
  }
121
121
  return s ? s(u, c) : c;
122
122
  });
@@ -125,54 +125,54 @@ function Gt(e, t = {}) {
125
125
  return e;
126
126
  }
127
127
  }
128
- function Jt(e, t = { strict: !0 }) {
129
- return Gt(e, t);
128
+ function Vt(e, t = { strict: !0 }) {
129
+ return Jt(e, t);
130
130
  }
131
- const Vt = [
131
+ const Kt = [
132
132
  "javascript:",
133
133
  "data:",
134
134
  "vbscript:"
135
135
  ];
136
- function Kt(e) {
136
+ function Xt(e) {
137
137
  let t;
138
138
  try {
139
139
  t = new URL(e);
140
140
  } catch {
141
141
  return !0;
142
142
  }
143
- return !Vt.includes(t.protocol);
143
+ return !Kt.includes(t.protocol);
144
144
  }
145
- const Xt = {
145
+ const Yt = {
146
146
  id: "redirect",
147
147
  name: "Redirect",
148
148
  hooks: { onSuccess(e) {
149
149
  var t, n;
150
- if ((t = e.data) != null && t.url && ((n = e.data) != null && n.redirect) && Kt(e.data.url) && typeof window < "u" && window.location && window.location)
150
+ if ((t = e.data) != null && t.url && ((n = e.data) != null && n.redirect) && Xt(e.data.url) && typeof window < "u" && window.location && window.location)
151
151
  try {
152
152
  window.location.href = e.data.url;
153
153
  } catch {
154
154
  }
155
155
  } }
156
156
  };
157
- let A = [], $ = 0;
158
- const me = 4, Yt = globalThis.nanostoresGlobal || (globalThis.nanostoresGlobal = { epoch: 0 });
159
- let Qt = () => {
157
+ let U = [], $ = 0;
158
+ const xe = 4, Qt = globalThis.nanostoresGlobal || (globalThis.nanostoresGlobal = { epoch: 0 });
159
+ let Zt = () => {
160
160
  let e, t;
161
- for (; $ < A.length; ) {
162
- t = $, $ += me;
161
+ for (; $ < U.length; ) {
162
+ t = $, $ += xe;
163
163
  try {
164
- A[t](
165
- A[t + 1].value,
166
- A[t + 2],
167
- A[t + 3]
164
+ U[t](
165
+ U[t + 1].value,
166
+ U[t + 2],
167
+ U[t + 3]
168
168
  );
169
169
  } catch (n) {
170
170
  e = n;
171
171
  }
172
172
  }
173
- if (A.length = $ = 0, e) throw e;
173
+ if (U.length = $ = 0, e) throw e;
174
174
  };
175
- const ke = /* @__NO_SIDE_EFFECTS__ */ (e) => {
175
+ const Se = /* @__NO_SIDE_EFFECTS__ */ (e) => {
176
176
  let t = [], n = {
177
177
  eq: Object.is,
178
178
  get() {
@@ -183,23 +183,23 @@ const ke = /* @__NO_SIDE_EFFECTS__ */ (e) => {
183
183
  lc: 0,
184
184
  listen(r) {
185
185
  return n.lc = t.push(r), () => {
186
- for (let i = $; i < A.length; )
187
- A[i] === r ? A.splice(i, me) : i += me;
186
+ for (let i = $; i < U.length; )
187
+ U[i] === r ? U.splice(i, xe) : i += xe;
188
188
  let s = t.indexOf(r);
189
189
  ~s && (t.splice(s, 1), --n.lc || n.off());
190
190
  };
191
191
  },
192
192
  notify(r, s) {
193
- Yt.epoch++;
194
- let i = !A.length && !0;
193
+ Qt.epoch++;
194
+ let i = !U.length && !0;
195
195
  for (let l of t)
196
- A.push(
196
+ U.push(
197
197
  l,
198
198
  n,
199
199
  r,
200
200
  s
201
201
  );
202
- i && Qt();
202
+ i && Zt();
203
203
  },
204
204
  /* It will be called on last listener unsubscribing.
205
205
  We will redefine it in onMount and onStop. */
@@ -216,8 +216,8 @@ const ke = /* @__NO_SIDE_EFFECTS__ */ (e) => {
216
216
  value: e
217
217
  };
218
218
  return n;
219
- }, Zt = 2, en = 5, X = 6, Y = 10;
220
- let Me = (e, t, n, r) => (e.events = e.events || {}, e.events[n + Y] || (e.events[n + Y] = r((s) => {
219
+ }, en = 2, tn = 5, X = 6, Y = 10;
220
+ let De = (e, t, n, r) => (e.events = e.events || {}, e.events[n + Y] || (e.events[n + Y] = r((s) => {
221
221
  e.events[n].reduceRight((i, l) => (l(i), i), {
222
222
  shared: {},
223
223
  ...s
@@ -225,7 +225,7 @@ let Me = (e, t, n, r) => (e.events = e.events || {}, e.events[n + Y] || (e.event
225
225
  })), e.events[n] = e.events[n] || [], e.events[n].push(t), () => {
226
226
  let s = e.events[n], i = s.indexOf(t);
227
227
  ~i && (s.splice(i, 1), s.length || (e.events[n + Y](), delete e.events[n + Y]));
228
- }), tn = (e, t) => Me(e, t, Zt, (n) => {
228
+ }), nn = (e, t) => De(e, t, en, (n) => {
229
229
  let r = e.set, s = e.setKey;
230
230
  return e.setKey && (e.setKey = (i, l) => {
231
231
  let d;
@@ -245,11 +245,11 @@ let Me = (e, t, n, r) => (e.events = e.events || {}, e.events[n + Y] || (e.event
245
245
  e.set = r, e.setKey = s;
246
246
  };
247
247
  });
248
- const De = 1e3;
249
- let nn = (e, t) => Me(e, (r) => {
248
+ const He = 1e3;
249
+ let rn = (e, t) => De(e, (r) => {
250
250
  let s = t(r);
251
251
  s && e.events[X].push(s);
252
- }, en, (r) => {
252
+ }, tn, (r) => {
253
253
  let s = e.listen;
254
254
  e.listen = (...l) => (!e.lc && !e.active && (e.active = !0, r()), s(...l));
255
255
  let i = e.off;
@@ -260,13 +260,13 @@ let nn = (e, t) => Me(e, (r) => {
260
260
  for (let l of e.events[X]) l();
261
261
  e.events[X] = [];
262
262
  }
263
- }, De);
263
+ }, He);
264
264
  }, () => {
265
265
  e.listen = s, e.off = i;
266
266
  };
267
267
  });
268
- function Se(e, t) {
269
- let n = rn(t), r = e;
268
+ function Ee(e, t) {
269
+ let n = sn(t), r = e;
270
270
  for (let s of n) {
271
271
  if (r == null)
272
272
  return;
@@ -274,29 +274,29 @@ function Se(e, t) {
274
274
  }
275
275
  return r;
276
276
  }
277
- const Ee = /(.*)\[(\d+)\]/;
278
- function rn(e) {
279
- return e.split(".").flatMap((t) => He(t));
277
+ const Re = /(.*)\[(\d+)\]/;
278
+ function sn(e) {
279
+ return e.split(".").flatMap((t) => We(t));
280
280
  }
281
- function He(e) {
282
- if (Ee.test(e)) {
283
- let [, t, n] = e.match(Ee);
284
- return [...He(t), n];
281
+ function We(e) {
282
+ if (Re.test(e)) {
283
+ let [, t, n] = e.match(Re);
284
+ return [...We(t), n];
285
285
  }
286
286
  return [e];
287
287
  }
288
- function sn(e, t, n) {
288
+ function an(e, t, n) {
289
289
  let r = new Set(t);
290
290
  return e.listen((s, i, l) => {
291
291
  (l === void 0 ? t.some(
292
292
  (d) => i === void 0 || // `map` keys are plain properties, but a `deepMap` key is a path into
293
293
  // the value, where a plain lookup would compare undefined to undefined
294
294
  // and never report a change.
295
- s[d] !== i[d] || Se(s, d) !== Se(i, d)
295
+ s[d] !== i[d] || Ee(s, d) !== Ee(i, d)
296
296
  ) : r.has(l) || r.has(l.split(/\.|\[/)[0])) && n(s, i, l);
297
297
  });
298
298
  }
299
- function Re(e) {
299
+ function _e(e) {
300
300
  if (typeof e != "object" || e === null) return !1;
301
301
  const t = Object.getPrototypeOf(e);
302
302
  return t === Object.prototype || t === null;
@@ -308,7 +308,7 @@ function se(e, t) {
308
308
  for (let n = 0; n < e.length; n++) if (!se(e[n], t[n])) return !1;
309
309
  return !0;
310
310
  }
311
- if (Re(e) && Re(t)) {
311
+ if (_e(e) && _e(t)) {
312
312
  const n = Object.keys(e), r = Object.keys(t);
313
313
  if (n.length !== r.length) return !1;
314
314
  for (const s of n) if (!(s in t) || !se(e[s], t[s])) return !1;
@@ -316,16 +316,16 @@ function se(e, t) {
316
316
  }
317
317
  return !1;
318
318
  }
319
- function an(e, t) {
320
- return tn(e, ({ newValue: n, abort: r }) => {
319
+ function on(e, t) {
320
+ return nn(e, ({ newValue: n, abort: r }) => {
321
321
  t(e.value, n) && r();
322
322
  });
323
323
  }
324
- const le = Symbol.for("better-auth:broadcast-channel"), on = () => Math.floor(Date.now() / 1e3);
325
- var ln = class {
324
+ const le = Symbol.for("better-auth:broadcast-channel"), ln = () => Math.floor(Date.now() / 1e3);
325
+ var cn = class {
326
326
  constructor(e = "better-auth.message") {
327
- D(this, "listeners", /* @__PURE__ */ new Set());
328
- D(this, "name");
327
+ H(this, "listeners", /* @__PURE__ */ new Set());
328
+ H(this, "name");
329
329
  this.name = e;
330
330
  }
331
331
  subscribe(e) {
@@ -338,7 +338,7 @@ var ln = class {
338
338
  try {
339
339
  localStorage.setItem(this.name, JSON.stringify({
340
340
  ...e,
341
- timestamp: on()
341
+ timestamp: ln()
342
342
  }));
343
343
  } catch {
344
344
  }
@@ -357,12 +357,12 @@ var ln = class {
357
357
  }
358
358
  };
359
359
  function ce(e = "better-auth.message") {
360
- return globalThis[le] || (globalThis[le] = new ln(e)), globalThis[le];
360
+ return globalThis[le] || (globalThis[le] = new cn(e)), globalThis[le];
361
361
  }
362
362
  const ue = Symbol.for("better-auth:focus-manager");
363
- var cn = class {
363
+ var un = class {
364
364
  constructor() {
365
- D(this, "listeners", /* @__PURE__ */ new Set());
365
+ H(this, "listeners", /* @__PURE__ */ new Set());
366
366
  }
367
367
  subscribe(e) {
368
368
  return this.listeners.add(e), () => {
@@ -383,14 +383,14 @@ var cn = class {
383
383
  };
384
384
  }
385
385
  };
386
- function _e() {
387
- return globalThis[ue] || (globalThis[ue] = new cn()), globalThis[ue];
386
+ function Oe() {
387
+ return globalThis[ue] || (globalThis[ue] = new un()), globalThis[ue];
388
388
  }
389
389
  const de = Symbol.for("better-auth:online-manager");
390
- var un = class {
390
+ var dn = class {
391
391
  constructor() {
392
- D(this, "listeners", /* @__PURE__ */ new Set());
393
- D(this, "isOnline", typeof navigator < "u" ? navigator.onLine : !0);
392
+ H(this, "listeners", /* @__PURE__ */ new Set());
393
+ H(this, "isOnline", typeof navigator < "u" ? navigator.onLine : !0);
394
394
  }
395
395
  subscribe(e) {
396
396
  return this.listeners.add(e), () => {
@@ -410,52 +410,52 @@ var un = class {
410
410
  }
411
411
  };
412
412
  function fe() {
413
- return globalThis[de] || (globalThis[de] = new un()), globalThis[de];
413
+ return globalThis[de] || (globalThis[de] = new dn()), globalThis[de];
414
414
  }
415
- const he = () => Math.floor(Date.now() / 1e3), dn = 5;
416
- function fn(e) {
417
- var O, b, T;
418
- const { fetchSession: t, shouldPollSession: n = () => !0, sessionSignal: r, options: s = {} } = e, i = ((O = s.sessionOptions) == null ? void 0 : O.refetchInterval) ?? 0, l = ((b = s.sessionOptions) == null ? void 0 : b.refetchOnWindowFocus) ?? !0, d = ((T = s.sessionOptions) == null ? void 0 : T.refetchWhenOffline) ?? !1, a = {
415
+ const he = () => Math.floor(Date.now() / 1e3), fn = 5;
416
+ function hn(e) {
417
+ var T, y, _;
418
+ const { fetchSession: t, shouldPollSession: n = () => !0, sessionSignal: r, options: s = {} } = e, i = ((T = s.sessionOptions) == null ? void 0 : T.refetchInterval) ?? 0, l = ((y = s.sessionOptions) == null ? void 0 : y.refetchOnWindowFocus) ?? !0, d = ((_ = s.sessionOptions) == null ? void 0 : _.refetchWhenOffline) ?? !1, a = {
419
419
  isInitialized: !1,
420
420
  lastSessionRequest: 0
421
- }, u = () => d || fe().isOnline, c = (f) => {
421
+ }, u = () => d || fe().isOnline, c = (m) => {
422
422
  if (u()) {
423
- if ((f == null ? void 0 : f.event) === "storage") {
423
+ if ((m == null ? void 0 : m.event) === "storage") {
424
424
  t();
425
425
  return;
426
426
  }
427
- if ((f == null ? void 0 : f.event) === "poll") {
427
+ if ((m == null ? void 0 : m.event) === "poll") {
428
428
  a.lastSessionRequest = he(), t();
429
429
  return;
430
430
  }
431
- if ((f == null ? void 0 : f.event) === "visibilitychange") {
432
- if (he() - a.lastSessionRequest < dn) return;
431
+ if ((m == null ? void 0 : m.event) === "visibilitychange") {
432
+ if (he() - a.lastSessionRequest < fn) return;
433
433
  a.lastSessionRequest = he(), t();
434
434
  return;
435
435
  }
436
436
  t();
437
437
  }
438
- }, m = (f) => {
438
+ }, g = (m) => {
439
439
  ce().post({
440
440
  event: "session",
441
- data: { trigger: f },
441
+ data: { trigger: m },
442
442
  clientId: Math.random().toString(36).substring(7)
443
443
  });
444
- }, p = () => {
444
+ }, h = () => {
445
445
  i && i > 0 && (a.pollInterval = setInterval(() => {
446
446
  n() && c({ event: "poll" });
447
447
  }, i * 1e3));
448
- }, g = () => {
448
+ }, p = () => {
449
449
  a.unsubscribeBroadcast = ce().subscribe(() => {
450
450
  c({ event: "storage" });
451
451
  });
452
- }, y = () => {
453
- l && (a.unsubscribeFocus = _e().subscribe(() => {
452
+ }, v = () => {
453
+ l && (a.unsubscribeFocus = Oe().subscribe(() => {
454
454
  c({ event: "visibilitychange" });
455
455
  }));
456
- }, v = () => {
457
- a.unsubscribeOnline = fe().subscribe((f) => {
458
- f && c({ event: "visibilitychange" });
456
+ }, b = () => {
457
+ a.unsubscribeOnline = fe().subscribe((m) => {
458
+ m && c({ event: "visibilitychange" });
459
459
  });
460
460
  }, x = () => {
461
461
  a.unsubscribeSignal = r.listen(() => {
@@ -464,17 +464,17 @@ function fn(e) {
464
464
  };
465
465
  return {
466
466
  init: () => {
467
- a.isInitialized || (a.isInitialized = !0, p(), g(), y(), v(), x(), a.cleanupBroadcastSetup = ce().setup(), a.cleanupFocusSetup = _e().setup(), a.cleanupOnlineSetup = fe().setup());
467
+ a.isInitialized || (a.isInitialized = !0, h(), p(), v(), b(), x(), a.cleanupBroadcastSetup = ce().setup(), a.cleanupFocusSetup = Oe().setup(), a.cleanupOnlineSetup = fe().setup());
468
468
  },
469
469
  cleanup: () => {
470
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
471
  },
472
472
  triggerRefetch: c,
473
- broadcastSessionUpdate: m
473
+ broadcastSessionUpdate: g
474
474
  };
475
475
  }
476
- const hn = () => typeof window > "u", pn = De;
477
- function gn(e, t) {
476
+ const pn = () => typeof window > "u", gn = He;
477
+ function mn(e, t) {
478
478
  if (typeof window > "u") return;
479
479
  const n = e.get();
480
480
  n.data !== null || t === null || e.set({
@@ -484,83 +484,83 @@ function gn(e, t) {
484
484
  isPending: !1
485
485
  });
486
486
  }
487
- function Oe(e) {
487
+ function Te(e) {
488
488
  return typeof e == "object" && e !== null && "data" in e && "error" in e ? e : {
489
489
  data: e,
490
490
  error: null
491
491
  };
492
492
  }
493
- function mn(e) {
493
+ function xn(e) {
494
494
  return !e || e.session === null && e.user === null ? null : e;
495
495
  }
496
- function xn(e, t) {
496
+ function yn(e, t) {
497
497
  return se(e.data, t.data) && e.error === t.error && e.isPending === t.isPending && e.isRefetching === t.isRefetching && e.refetch === t.refetch;
498
498
  }
499
- function yn(e, t) {
500
- const n = /* @__PURE__ */ ke(!1);
499
+ function vn(e, t) {
500
+ const n = /* @__PURE__ */ Se(!1);
501
501
  let r, s = 0, i = 0;
502
502
  n.listen(() => {
503
503
  i++, s = 0;
504
504
  });
505
- const l = (g) => c(g), d = /* @__PURE__ */ ke({
505
+ const l = (p) => c(p), d = /* @__PURE__ */ Se({
506
506
  data: null,
507
507
  error: null,
508
508
  isPending: !0,
509
509
  isRefetching: !1,
510
510
  refetch: l
511
511
  });
512
- an(d, xn);
513
- const a = async (g, y) => {
514
- const v = d.value;
512
+ on(d, yn);
513
+ const a = async (p, v) => {
514
+ const b = d.value;
515
515
  if (d.set({
516
- ...v,
517
- isPending: v.data === null,
516
+ ...b,
517
+ isPending: b.data === null,
518
518
  isRefetching: !0,
519
519
  error: null,
520
520
  refetch: l
521
- }), g.aborted) return "aborted";
521
+ }), p.aborted) return "aborted";
522
522
  try {
523
523
  const x = await e("/get-session", {
524
524
  method: "GET",
525
- query: y == null ? void 0 : y.query,
526
- signal: g
525
+ query: v == null ? void 0 : v.query,
526
+ signal: p
527
527
  });
528
- if (g.aborted) return "aborted";
529
- let { data: S, error: E } = Oe(x), O = "fresh";
530
- if (S != null && S.needsRefresh) try {
531
- const R = await e("/get-session", {
528
+ if (p.aborted) return "aborted";
529
+ let { data: E, error: P } = Te(x), T = "fresh";
530
+ if (E != null && E.needsRefresh) try {
531
+ const O = await e("/get-session", {
532
532
  method: "POST",
533
- signal: g
533
+ signal: p
534
534
  });
535
- if (g.aborted) return "aborted";
536
- ({ data: S, error: E } = Oe(R));
535
+ if (p.aborted) return "aborted";
536
+ ({ data: E, error: P } = Te(O));
537
537
  } catch {
538
- if (g.aborted) return "aborted";
539
- O = "stale";
538
+ if (p.aborted) return "aborted";
539
+ T = "stale";
540
540
  }
541
- if (E) {
542
- const R = d.value, U = (E == null ? void 0 : E.status) === 401;
541
+ if (P) {
542
+ const O = d.value, L = (P == null ? void 0 : P.status) === 401;
543
543
  return d.set({
544
- data: U ? null : R.data,
545
- error: E,
544
+ data: L ? null : O.data,
545
+ error: P,
546
546
  isPending: !1,
547
547
  isRefetching: !1,
548
548
  refetch: l
549
549
  }), "failed";
550
550
  }
551
- const b = mn(S), T = d.value, f = T.data != null && b != null && se(T.data, b) ? T.data : b;
551
+ const y = xn(E), _ = d.value, m = _.data != null && y != null && se(_.data, y) ? _.data : y;
552
552
  return d.set({
553
- data: f,
553
+ data: m,
554
554
  error: null,
555
555
  isPending: !1,
556
556
  isRefetching: !1,
557
557
  refetch: l
558
- }), O;
558
+ }), T;
559
559
  } catch (x) {
560
- if (g.aborted) return "aborted";
561
- const S = d.value;
560
+ if (p.aborted) return "aborted";
561
+ const E = d.value;
562
562
  return d.set({
563
- data: S.data,
563
+ data: E.data,
564
564
  error: x,
565
565
  isPending: !1,
566
566
  isRefetching: !1,
@@ -568,44 +568,44 @@ function yn(e, t) {
568
568
  }), "failed";
569
569
  }
570
570
  }, u = () => {
571
- var v, x;
572
- const g = (x = (v = d.value.data) == null ? void 0 : v.session) == null ? void 0 : x.expiresAt, y = g instanceof Date ? g.getTime() : Number.POSITIVE_INFINITY;
573
- return Math.min(Date.now() + pn, y);
574
- }, c = (g) => {
571
+ var b, x;
572
+ const p = (x = (b = d.value.data) == null ? void 0 : b.session) == null ? void 0 : x.expiresAt, v = p instanceof Date ? p.getTime() : Number.POSITIVE_INFINITY;
573
+ return Math.min(Date.now() + gn, v);
574
+ }, c = (p) => {
575
575
  s = 0, r == null || r.cancel();
576
- const y = new AbortController(), v = {
577
- cancel: () => y.abort(),
578
- promise: Promise.resolve().then(() => y.signal.aborted ? "aborted" : a(y.signal, g)),
576
+ const v = new AbortController(), b = {
577
+ cancel: () => v.abort(),
578
+ promise: Promise.resolve().then(() => v.signal.aborted ? "aborted" : a(v.signal, p)),
579
579
  revision: i
580
580
  };
581
- r = v;
582
- const x = (S) => {
583
- r === v && (r = void 0, S === "fresh" && v.revision === i && (s = u()));
581
+ r = b;
582
+ const x = (E) => {
583
+ r === b && (r = void 0, E === "fresh" && b.revision === i && (s = u()));
584
584
  };
585
- return v.promise.then(x, () => x("failed")), v.promise.then(() => {
585
+ return b.promise.then(x, () => x("failed")), b.promise.then(() => {
586
586
  });
587
- }, m = () => (r == null ? void 0 : r.revision) === i ? r.promise.then(() => {
587
+ }, g = () => (r == null ? void 0 : r.revision) === i ? r.promise.then(() => {
588
588
  }) : Date.now() < s ? Promise.resolve() : c();
589
- let p = () => {
589
+ let h = () => {
590
590
  };
591
- return nn(d, () => {
592
- let g;
593
- hn() || (g = setTimeout(() => {
594
- m();
591
+ return rn(d, () => {
592
+ let p;
593
+ pn() || (p = setTimeout(() => {
594
+ g();
595
595
  }, 0));
596
- const y = fn({
596
+ const v = hn({
597
597
  fetchSession: c,
598
598
  shouldPollSession: () => d.value.data != null,
599
599
  sessionSignal: n,
600
600
  options: t
601
601
  });
602
- return y.init(), p = y.broadcastSessionUpdate, () => {
603
- g && clearTimeout(g), y.cleanup();
602
+ return v.init(), h = v.broadcastSessionUpdate, () => {
603
+ p && clearTimeout(p), v.cleanup();
604
604
  };
605
605
  }), {
606
606
  session: d,
607
607
  $sessionSignal: n,
608
- broadcastSessionUpdate: (g) => p(g)
608
+ broadcastSessionUpdate: (p) => h(p)
609
609
  };
610
610
  }
611
611
  function pe(e) {
@@ -614,15 +614,15 @@ function pe(e) {
614
614
  const t = Object.getPrototypeOf(e);
615
615
  return t !== null && t !== Object.prototype && Object.getPrototypeOf(t) !== null || Symbol.iterator in e ? !1 : Symbol.toStringTag in e ? Object.prototype.toString.call(e) === "[object Module]" : !0;
616
616
  }
617
- function xe(e, t, n = ".", r) {
617
+ function ye(e, t, n = ".", r) {
618
618
  if (!pe(t))
619
- return xe(e, {}, n, r);
619
+ return ye(e, {}, n, r);
620
620
  const s = { ...t };
621
621
  for (const i of Object.keys(e)) {
622
622
  if (i === "__proto__" || i === "constructor")
623
623
  continue;
624
624
  const l = e[i];
625
- l != null && (r && r(s, i, l, n) || (Array.isArray(l) && Array.isArray(s[i]) ? s[i] = [...l, ...s[i]] : pe(l) && pe(s[i]) ? s[i] = xe(
625
+ l != null && (r && r(s, i, l, n) || (Array.isArray(l) && Array.isArray(s[i]) ? s[i] = [...l, ...s[i]] : pe(l) && pe(s[i]) ? s[i] = ye(
626
626
  l,
627
627
  s[i],
628
628
  (n ? `${n}.` : "") + i.toString(),
@@ -631,27 +631,27 @@ function xe(e, t, n = ".", r) {
631
631
  }
632
632
  return s;
633
633
  }
634
- function vn(e) {
634
+ function bn(e) {
635
635
  return (...t) => (
636
636
  // eslint-disable-next-line unicorn/no-array-reduce
637
- t.reduce((n, r) => xe(n, r, "", e), {})
637
+ t.reduce((n, r) => ye(n, r, "", e), {})
638
638
  );
639
639
  }
640
- const bn = vn();
641
- var wn = Object.defineProperty, kn = Object.defineProperties, Sn = Object.getOwnPropertyDescriptors, Te = Object.getOwnPropertySymbols, En = Object.prototype.hasOwnProperty, Rn = Object.prototype.propertyIsEnumerable, Pe = (e, t, n) => t in e ? wn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, L = (e, t) => {
640
+ const wn = bn();
641
+ var kn = Object.defineProperty, Sn = Object.defineProperties, En = Object.getOwnPropertyDescriptors, Pe = Object.getOwnPropertySymbols, Rn = Object.prototype.hasOwnProperty, _n = Object.prototype.propertyIsEnumerable, je = (e, t, n) => t in e ? kn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, N = (e, t) => {
642
642
  for (var n in t || (t = {}))
643
- En.call(t, n) && Pe(e, n, t[n]);
644
- if (Te)
645
- for (var n of Te(t))
646
- Rn.call(t, n) && Pe(e, n, t[n]);
643
+ Rn.call(t, n) && je(e, n, t[n]);
644
+ if (Pe)
645
+ for (var n of Pe(t))
646
+ _n.call(t, n) && je(e, n, t[n]);
647
647
  return e;
648
- }, N = (e, t) => kn(e, Sn(t)), _n = class extends Error {
648
+ }, C = (e, t) => Sn(e, En(t)), On = class extends Error {
649
649
  constructor(e, t, n) {
650
650
  super(t || e.toString(), {
651
651
  cause: n
652
652
  }), this.status = e, this.statusText = t, this.error = n, Error.captureStackTrace(this, this.constructor);
653
653
  }
654
- }, On = async (e, t) => {
654
+ }, Tn = async (e, t) => {
655
655
  var n, r, s, i, l, d;
656
656
  let a = t || {};
657
657
  const u = {
@@ -669,8 +669,8 @@ var wn = Object.defineProperty, kn = Object.defineProperties, Sn = Object.getOwn
669
669
  };
670
670
  for (const c of (t == null ? void 0 : t.plugins) || []) {
671
671
  if (c.init) {
672
- const m = await ((n = c.init) == null ? void 0 : n.call(c, e.toString(), t));
673
- a = m.options || a, e = m.url;
672
+ const g = await ((n = c.init) == null ? void 0 : n.call(c, e.toString(), t));
673
+ a = g.options || a, e = g.url;
674
674
  }
675
675
  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
676
  }
@@ -679,7 +679,7 @@ var wn = Object.defineProperty, kn = Object.defineProperties, Sn = Object.getOwn
679
679
  options: a,
680
680
  hooks: u
681
681
  };
682
- }, je = class {
682
+ }, Le = class {
683
683
  constructor(e) {
684
684
  this.options = e;
685
685
  }
@@ -691,7 +691,7 @@ var wn = Object.defineProperty, kn = Object.defineProperties, Sn = Object.getOwn
691
691
  getDelay() {
692
692
  return this.options.delay;
693
693
  }
694
- }, Tn = class {
694
+ }, Pn = class {
695
695
  constructor(e) {
696
696
  this.options = e;
697
697
  }
@@ -707,23 +707,23 @@ var wn = Object.defineProperty, kn = Object.defineProperties, Sn = Object.getOwn
707
707
  );
708
708
  }
709
709
  };
710
- function Pn(e) {
710
+ function jn(e) {
711
711
  if (typeof e == "number")
712
- return new je({
712
+ return new Le({
713
713
  type: "linear",
714
714
  attempts: e,
715
715
  delay: 1e3
716
716
  });
717
717
  switch (e.type) {
718
718
  case "linear":
719
- return new je(e);
719
+ return new Le(e);
720
720
  case "exponential":
721
- return new Tn(e);
721
+ return new Pn(e);
722
722
  default:
723
723
  throw new Error("Invalid retry strategy");
724
724
  }
725
725
  }
726
- var jn = async (e) => {
726
+ var Ln = async (e) => {
727
727
  const t = {}, n = async (r) => typeof r == "function" ? await r() : r;
728
728
  if (e != null && e.auth) {
729
729
  if (e.auth.type === "Bearer") {
@@ -750,8 +750,8 @@ var jn = async (e) => {
750
750
  }
751
751
  }
752
752
  return t;
753
- }, Ln = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
754
- function An(e) {
753
+ }, An = /^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;
754
+ function Nn(e) {
755
755
  const t = e.headers.get("content-type"), n = /* @__PURE__ */ new Set([
756
756
  "image/svg",
757
757
  "application/xml",
@@ -761,7 +761,7 @@ function An(e) {
761
761
  if (!t)
762
762
  return "json";
763
763
  const r = t.split(";").shift() || "";
764
- return Ln.test(r) ? "json" : n.has(r) || r.startsWith("text/") ? "text" : "blob";
764
+ return An.test(r) ? "json" : n.has(r) || r.startsWith("text/") ? "text" : "blob";
765
765
  }
766
766
  function Un(e) {
767
767
  try {
@@ -770,32 +770,32 @@ function Un(e) {
770
770
  return !1;
771
771
  }
772
772
  }
773
- function We(e) {
773
+ function $e(e) {
774
774
  if (e === void 0)
775
775
  return !1;
776
776
  const t = typeof e;
777
777
  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";
778
778
  }
779
- function Le(e) {
779
+ function Ae(e) {
780
780
  try {
781
781
  return JSON.parse(e);
782
782
  } catch {
783
783
  return e;
784
784
  }
785
785
  }
786
- function Ae(e) {
786
+ function Ne(e) {
787
787
  return typeof e == "function";
788
788
  }
789
- function Nn(e) {
789
+ function Cn(e) {
790
790
  if (e != null && e.customFetchImpl)
791
791
  return e.customFetchImpl;
792
- if (typeof globalThis < "u" && Ae(globalThis.fetch))
792
+ if (typeof globalThis < "u" && Ne(globalThis.fetch))
793
793
  return globalThis.fetch;
794
- if (typeof window < "u" && Ae(window.fetch))
794
+ if (typeof window < "u" && Ne(window.fetch))
795
795
  return window.fetch;
796
796
  throw new Error("No fetch implementation found");
797
797
  }
798
- function $e(...e) {
798
+ function Ge(...e) {
799
799
  const t = {};
800
800
  for (const n of e)
801
801
  if (n)
@@ -810,24 +810,24 @@ function $e(...e) {
810
810
  }
811
811
  return t;
812
812
  }
813
- async function Cn(e) {
814
- const t = new Headers($e(e == null ? void 0 : e.headers, await jn(e)));
813
+ async function In(e) {
814
+ const t = new Headers(Ge(e == null ? void 0 : e.headers, await Ln(e)));
815
815
  if (!t.has("content-type")) {
816
- const n = In(e == null ? void 0 : e.body);
816
+ const n = qn(e == null ? void 0 : e.body);
817
817
  n && t.set("content-type", n);
818
818
  }
819
819
  return t;
820
820
  }
821
- function In(e) {
822
- return We(e) ? "application/json" : null;
823
- }
824
821
  function qn(e) {
822
+ return $e(e) ? "application/json" : null;
823
+ }
824
+ function zn(e) {
825
825
  const t = e.get("content-type");
826
826
  return t ? t.split(";")[0].trim().toLowerCase() : null;
827
827
  }
828
- function zn(e, t) {
828
+ function Bn(e, t) {
829
829
  const { body: n } = e;
830
- return n ? !We(n) || typeof n == "string" ? n : qn(t) === "application/x-www-form-urlencoded" ? new URLSearchParams(n).toString() : JSON.stringify(n) : null;
830
+ return n ? !$e(n) || typeof n == "string" ? n : zn(t) === "application/x-www-form-urlencoded" ? new URLSearchParams(n).toString() : JSON.stringify(n) : null;
831
831
  }
832
832
  function Fn(e, t) {
833
833
  var n;
@@ -835,11 +835,11 @@ function Fn(e, t) {
835
835
  return t.method.toUpperCase();
836
836
  if (e.startsWith("@")) {
837
837
  const r = (n = e.split("@")[1]) == null ? void 0 : n.split("/")[0];
838
- return Je.includes(r) ? r.toUpperCase() : t != null && t.body ? "POST" : "GET";
838
+ return Ve.includes(r) ? r.toUpperCase() : t != null && t.body ? "POST" : "GET";
839
839
  }
840
840
  return t != null && t.body ? "POST" : "GET";
841
841
  }
842
- function Bn(e, t) {
842
+ function Mn(e, t) {
843
843
  let n;
844
844
  return !(e != null && e.signal) && (e != null && e.timeout) && (n = setTimeout(() => t == null ? void 0 : t.abort(), e == null ? void 0 : e.timeout)), {
845
845
  abortTimeout: n,
@@ -848,18 +848,18 @@ function Bn(e, t) {
848
848
  }
849
849
  };
850
850
  }
851
- var Mn = class Ge extends Error {
851
+ var Dn = class Je extends Error {
852
852
  constructor(t, n) {
853
- super(n || JSON.stringify(t, null, 2)), this.issues = t, Object.setPrototypeOf(this, Ge.prototype);
853
+ super(n || JSON.stringify(t, null, 2)), this.issues = t, Object.setPrototypeOf(this, Je.prototype);
854
854
  }
855
855
  };
856
856
  async function G(e, t) {
857
857
  const n = await e["~standard"].validate(t);
858
858
  if (n.issues)
859
- throw new Mn(n.issues);
859
+ throw new Dn(n.issues);
860
860
  return n.value;
861
861
  }
862
- var Je = ["get", "post", "put", "patch", "delete"], Dn = (e) => ({
862
+ var Ve = ["get", "post", "put", "patch", "delete"], Hn = (e) => ({
863
863
  id: "apply-schema",
864
864
  name: "Apply Schema",
865
865
  version: "1.0.0",
@@ -878,36 +878,36 @@ var Je = ["get", "post", "put", "patch", "delete"], Dn = (e) => ({
878
878
  if (u) {
879
879
  let c = n == null ? void 0 : n.headers;
880
880
  if (u.headers && !(n != null && n.disableValidation)) {
881
- const p = {};
881
+ const h = {};
882
882
  if (n != null && n.headers) {
883
883
  if (n.headers instanceof Headers)
884
- n.headers.forEach((v, x) => {
885
- p[x.toLowerCase()] = v;
884
+ n.headers.forEach((b, x) => {
885
+ h[x.toLowerCase()] = b;
886
886
  });
887
887
  else if (typeof n.headers == "object")
888
- for (const [v, x] of Object.entries(n.headers))
889
- x != null && (p[v.toLowerCase()] = x);
888
+ for (const [b, x] of Object.entries(n.headers))
889
+ x != null && (h[b.toLowerCase()] = x);
890
890
  }
891
- const g = await G(
891
+ const p = await G(
892
892
  u.headers,
893
- p
894
- ), y = {};
895
- for (const [v, x] of Object.entries(g))
896
- y[v.toLowerCase()] = x;
897
- c = y;
893
+ h
894
+ ), v = {};
895
+ for (const [b, x] of Object.entries(p))
896
+ v[b.toLowerCase()] = x;
897
+ c = v;
898
898
  }
899
- let m = N(L({}, n), {
899
+ let g = C(N({}, n), {
900
900
  method: u.method,
901
901
  output: u.output,
902
902
  headers: c
903
903
  });
904
- return n != null && n.disableValidation || (m = N(L({}, m), {
904
+ return n != null && n.disableValidation || (g = C(N({}, g), {
905
905
  body: u.input ? await G(u.input, n == null ? void 0 : n.body) : n == null ? void 0 : n.body,
906
906
  params: u.params ? await G(u.params, n == null ? void 0 : n.params) : n == null ? void 0 : n.params,
907
907
  query: u.query ? await G(u.query, n == null ? void 0 : n.query) : n == null ? void 0 : n.query
908
908
  })), {
909
909
  url: t,
910
- options: m
910
+ options: g
911
911
  };
912
912
  }
913
913
  }
@@ -916,15 +916,15 @@ var Je = ["get", "post", "put", "patch", "delete"], Dn = (e) => ({
916
916
  options: n
917
917
  };
918
918
  }
919
- }), Hn = (e) => {
919
+ }), Wn = (e) => {
920
920
  async function t(n, r) {
921
- const s = N(L(L({}, e), r), {
922
- headers: $e(e == null ? void 0 : e.headers, r == null ? void 0 : r.headers),
923
- plugins: [...(e == null ? void 0 : e.plugins) || [], Dn(e || {}), ...(r == null ? void 0 : r.plugins) || []]
921
+ const s = C(N(N({}, e), r), {
922
+ headers: Ge(e == null ? void 0 : e.headers, r == null ? void 0 : r.headers),
923
+ plugins: [...(e == null ? void 0 : e.plugins) || [], Hn(e || {}), ...(r == null ? void 0 : r.plugins) || []]
924
924
  });
925
925
  if (e != null && e.catchAllError)
926
926
  try {
927
- return await ye(n, s);
927
+ return await ve(n, s);
928
928
  } catch (i) {
929
929
  return {
930
930
  data: null,
@@ -936,19 +936,19 @@ var Je = ["get", "post", "put", "patch", "delete"], Dn = (e) => ({
936
936
  }
937
937
  };
938
938
  }
939
- return await ye(n, s);
939
+ return await ve(n, s);
940
940
  }
941
941
  return t;
942
- }, Wn = (e) => e === "." || e === "..";
943
- function $n(e, t) {
942
+ }, $n = (e) => e === "." || e === "..";
943
+ function Gn(e, t) {
944
944
  let n = e;
945
945
  for (const [r, s] of t)
946
946
  n = n.replace(r, s);
947
- if (Wn(n))
947
+ if ($n(n))
948
948
  throw new TypeError("Path parameters cannot be reserved path segments");
949
949
  return encodeURIComponent(n);
950
950
  }
951
- function Gn(e, t) {
951
+ function Jn(e, t) {
952
952
  const { baseURL: n, params: r, query: s } = t || {
953
953
  query: {},
954
954
  params: {},
@@ -956,141 +956,141 @@ function Gn(e, t) {
956
956
  };
957
957
  let i = e.startsWith("http") ? e.split("/").slice(0, 3).join("/") : n || "";
958
958
  if (e.startsWith("@")) {
959
- const p = e.toString().split("@")[1].split("/")[0];
960
- Je.includes(p) && (e = e.replace(`@${p}/`, "/"));
959
+ const h = e.toString().split("@")[1].split("/")[0];
960
+ Ve.includes(h) && (e = e.replace(`@${h}/`, "/"));
961
961
  }
962
962
  i.endsWith("/") || (i += "/");
963
963
  let [l, d] = e.replace(i, "").split("?");
964
964
  const a = new URLSearchParams(d);
965
- for (const [p, g] of Object.entries(s || {})) {
966
- if (g == null) continue;
967
- let y;
968
- if (typeof g == "string")
969
- y = g;
970
- else if (Array.isArray(g)) {
971
- for (const v of g)
972
- a.append(p, v);
965
+ for (const [h, p] of Object.entries(s || {})) {
966
+ if (p == null) continue;
967
+ let v;
968
+ if (typeof p == "string")
969
+ v = p;
970
+ else if (Array.isArray(p)) {
971
+ for (const b of p)
972
+ a.append(h, b);
973
973
  continue;
974
974
  } else
975
- y = JSON.stringify(g);
976
- a.set(p, y);
975
+ v = JSON.stringify(p);
976
+ a.set(h, v);
977
977
  }
978
978
  const u = /* @__PURE__ */ new Map();
979
979
  if (r)
980
980
  if (Array.isArray(r)) {
981
- const p = l.split("/").filter((g) => g.startsWith(":"));
982
- for (const [g, y] of p.entries()) {
983
- const v = r[g];
984
- u.set(y, String(v));
981
+ const h = l.split("/").filter((p) => p.startsWith(":"));
982
+ for (const [p, v] of h.entries()) {
983
+ const b = r[p];
984
+ u.set(v, String(b));
985
985
  }
986
986
  } else
987
- for (const [p, g] of Object.entries(r))
988
- u.set(`:${p}`, String(g));
989
- l = l.split("/").map((p) => $n(p, u)).join("/"), l = l.replace(/^\/+/, "");
987
+ for (const [h, p] of Object.entries(r))
988
+ u.set(`:${h}`, String(p));
989
+ l = l.split("/").map((h) => Gn(h, u)).join("/"), l = l.replace(/^\/+/, "");
990
990
  let c = a.toString();
991
991
  return c = c.length > 0 ? `?${c}`.replace(/\+/g, "%20") : "", i.startsWith("http") ? new URL(`${l}${c}`, i) : `${i}${l}${c}`;
992
992
  }
993
- var ye = async (e, t) => {
993
+ var ve = async (e, t) => {
994
994
  var n, r, s, i, l, d, a, u;
995
995
  const {
996
996
  hooks: c,
997
- url: m,
998
- options: p
999
- } = await On(e, t), g = Nn(p), y = new AbortController(), v = (n = p.signal) != null ? n : y.signal, x = Gn(m, p), S = await Cn(p), E = zn(p, S), O = Fn(m, p), b = N(L({}, p), {
997
+ url: g,
998
+ options: h
999
+ } = await Tn(e, t), p = Cn(h), v = new AbortController(), b = (n = h.signal) != null ? n : v.signal, x = Jn(g, h), E = await In(h), P = Bn(h, E), T = Fn(g, h), y = C(N({}, h), {
1000
1000
  url: x,
1001
- headers: S,
1002
- body: E,
1003
- method: O,
1004
- signal: v
1001
+ headers: E,
1002
+ body: P,
1003
+ method: T,
1004
+ signal: b
1005
1005
  });
1006
- for (const P of c.onRequest)
1007
- if (P) {
1008
- const h = await P(b);
1009
- typeof h == "object" && h !== null && Object.assign(b, h);
1006
+ for (const j of c.onRequest)
1007
+ if (j) {
1008
+ const f = await j(y);
1009
+ typeof f == "object" && f !== null && Object.assign(y, f);
1010
1010
  }
1011
- ("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 } = Bn(p, y);
1013
- let f = await g(b.url, b);
1014
- T();
1015
- const R = {
1016
- response: f,
1017
- request: b
1011
+ ("pipeTo" in y && typeof y.pipeTo == "function" || typeof ((r = t == null ? void 0 : t.body) == null ? void 0 : r.pipe) == "function") && ("duplex" in y || (y.duplex = "half"));
1012
+ const { clearTimeout: _ } = Mn(h, v);
1013
+ let m = await p(y.url, y);
1014
+ _();
1015
+ const O = {
1016
+ response: m,
1017
+ request: y
1018
1018
  };
1019
- for (const P of c.onResponse)
1020
- if (P) {
1021
- const h = await P(N(L({}, R), {
1022
- response: (s = t == null ? void 0 : t.hookOptions) != null && s.cloneResponse ? f.clone() : f
1019
+ for (const j of c.onResponse)
1020
+ if (j) {
1021
+ const f = await j(C(N({}, O), {
1022
+ response: (s = t == null ? void 0 : t.hookOptions) != null && s.cloneResponse ? m.clone() : m
1023
1023
  }));
1024
- h instanceof Response ? f = h : typeof h == "object" && h !== null && (f = h.response);
1024
+ f instanceof Response ? m = f : typeof f == "object" && f !== null && (m = f.response);
1025
1025
  }
1026
- if (f.ok) {
1027
- if (!(b.method !== "HEAD"))
1026
+ if (m.ok) {
1027
+ if (!(y.method !== "HEAD"))
1028
1028
  return {
1029
1029
  data: "",
1030
1030
  error: null
1031
1031
  };
1032
- const h = An(f), j = {
1032
+ const f = Nn(m), A = {
1033
1033
  data: null,
1034
- response: f,
1035
- request: b
1034
+ response: m,
1035
+ request: y
1036
1036
  };
1037
- if (h === "json" || h === "text") {
1038
- const I = await f.text(), Ve = (i = b.jsonParser) != null ? i : Le;
1039
- j.data = await Ve(I);
1037
+ if (f === "json" || f === "text") {
1038
+ const I = await m.text(), Ke = (i = y.jsonParser) != null ? i : Ae;
1039
+ A.data = await Ke(I);
1040
1040
  } else
1041
- j.data = await f[h]();
1042
- b != null && b.output && b.output && !b.disableValidation && (j.data = await G(
1043
- b.output,
1044
- j.data
1041
+ A.data = await m[f]();
1042
+ y != null && y.output && y.output && !y.disableValidation && (A.data = await G(
1043
+ y.output,
1044
+ A.data
1045
1045
  ));
1046
1046
  for (const I of c.onSuccess)
1047
- I && await I(N(L({}, j), {
1048
- response: (l = t == null ? void 0 : t.hookOptions) != null && l.cloneResponse ? f.clone() : f
1047
+ I && await I(C(N({}, A), {
1048
+ response: (l = t == null ? void 0 : t.hookOptions) != null && l.cloneResponse ? m.clone() : m
1049
1049
  }));
1050
- return t != null && t.throw ? j.data : {
1051
- data: j.data,
1050
+ return t != null && t.throw ? A.data : {
1051
+ data: A.data,
1052
1052
  error: null
1053
1053
  };
1054
1054
  }
1055
- const U = (d = t == null ? void 0 : t.jsonParser) != null ? d : Le, C = await f.text(), H = Un(C), M = H ? await U(C) : null, K = {
1056
- response: f,
1057
- responseText: C,
1058
- request: b,
1059
- error: N(L({}, M), {
1060
- status: f.status,
1061
- statusText: f.statusText
1055
+ const L = (d = t == null ? void 0 : t.jsonParser) != null ? d : Ae, w = await m.text(), q = Un(w), D = q ? await L(w) : null, K = {
1056
+ response: m,
1057
+ responseText: w,
1058
+ request: y,
1059
+ error: C(N({}, D), {
1060
+ status: m.status,
1061
+ statusText: m.statusText
1062
1062
  })
1063
1063
  };
1064
- for (const P of c.onError)
1065
- P && await P(N(L({}, K), {
1066
- response: (a = t == null ? void 0 : t.hookOptions) != null && a.cloneResponse ? f.clone() : f
1064
+ for (const j of c.onError)
1065
+ j && await j(C(N({}, K), {
1066
+ response: (a = t == null ? void 0 : t.hookOptions) != null && a.cloneResponse ? m.clone() : m
1067
1067
  }));
1068
1068
  if (t != null && t.retry) {
1069
- const P = Pn(t.retry), h = (u = t.retryAttempt) != null ? u : 0;
1070
- if (await P.shouldAttemptRetry(h, f)) {
1069
+ const j = jn(t.retry), f = (u = t.retryAttempt) != null ? u : 0;
1070
+ if (await j.shouldAttemptRetry(f, m)) {
1071
1071
  for (const I of c.onRetry)
1072
- I && await I(R);
1073
- const j = P.getDelay(h);
1074
- return await new Promise((I) => setTimeout(I, j)), await ye(e, N(L({}, t), {
1075
- retryAttempt: h + 1
1072
+ I && await I(O);
1073
+ const A = j.getDelay(f);
1074
+ return await new Promise((I) => setTimeout(I, A)), await ve(e, C(N({}, t), {
1075
+ retryAttempt: f + 1
1076
1076
  }));
1077
1077
  }
1078
1078
  }
1079
1079
  if (t != null && t.throw)
1080
- throw new _n(
1081
- f.status,
1082
- f.statusText,
1083
- H ? M : C
1080
+ throw new On(
1081
+ m.status,
1082
+ m.statusText,
1083
+ q ? D : w
1084
1084
  );
1085
1085
  return {
1086
1086
  data: null,
1087
- error: N(L({}, M), {
1088
- status: f.status,
1089
- statusText: f.statusText
1087
+ error: C(N({}, D), {
1088
+ status: m.status,
1089
+ statusText: m.statusText
1090
1090
  })
1091
1091
  };
1092
1092
  };
1093
- const Jn = (e) => {
1093
+ const Vn = (e) => {
1094
1094
  if (typeof process > "u") return;
1095
1095
  const t = e ?? "/api/auth";
1096
1096
  if (process.env.NEXT_PUBLIC_AUTH_URL) return process.env.NEXT_PUBLIC_AUTH_URL;
@@ -1105,99 +1105,99 @@ const Jn = (e) => {
1105
1105
  } catch {
1106
1106
  }
1107
1107
  }
1108
- }, Vn = (e, t) => {
1109
- var R, U, C, H, M, K, P;
1110
- const n = "credentials" in Request.prototype, r = Bt(e == null ? void 0 : e.baseURL, e == null ? void 0 : e.basePath) ?? Jn(e == null ? void 0 : e.basePath) ?? "/api/auth", s = ((R = e == null ? void 0 : e.plugins) == null ? void 0 : R.flatMap((h) => h.fetchPlugins).filter((h) => h !== void 0)) || [], i = {
1108
+ }, Kn = (e, t) => {
1109
+ var O, L, w, q, D, K, j;
1110
+ const n = "credentials" in Request.prototype, r = Mt(e == null ? void 0 : e.baseURL, e == null ? void 0 : e.basePath) ?? Vn(e == null ? void 0 : e.basePath) ?? "/api/auth", s = ((O = e == null ? void 0 : e.plugins) == null ? void 0 : O.flatMap((f) => f.fetchPlugins).filter((f) => f !== void 0)) || [], i = {
1111
1111
  id: "lifecycle-hooks",
1112
1112
  name: "lifecycle-hooks",
1113
1113
  hooks: {
1114
- onSuccess: (U = e == null ? void 0 : e.fetchOptions) == null ? void 0 : U.onSuccess,
1115
- onError: (C = e == null ? void 0 : e.fetchOptions) == null ? void 0 : C.onError,
1116
- onRequest: (H = e == null ? void 0 : e.fetchOptions) == null ? void 0 : H.onRequest,
1117
- onResponse: (M = e == null ? void 0 : e.fetchOptions) == null ? void 0 : M.onResponse
1114
+ onSuccess: (L = e == null ? void 0 : e.fetchOptions) == null ? void 0 : L.onSuccess,
1115
+ onError: (w = e == null ? void 0 : e.fetchOptions) == null ? void 0 : w.onError,
1116
+ onRequest: (q = e == null ? void 0 : e.fetchOptions) == null ? void 0 : q.onRequest,
1117
+ onResponse: (D = e == null ? void 0 : e.fetchOptions) == null ? void 0 : D.onResponse
1118
1118
  }
1119
- }, { onSuccess: l, onError: d, onRequest: a, onResponse: u, ...c } = (e == null ? void 0 : e.fetchOptions) || {}, m = Hn({
1119
+ }, { onSuccess: l, onError: d, onRequest: a, onResponse: u, ...c } = (e == null ? void 0 : e.fetchOptions) || {}, g = Wn({
1120
1120
  baseURL: r,
1121
1121
  ...n ? { credentials: "include" } : {},
1122
1122
  method: "GET",
1123
- jsonParser(h) {
1124
- return h ? Jt(h, { strict: !1 }) : null;
1123
+ jsonParser(f) {
1124
+ return f ? Vt(f, { strict: !1 }) : null;
1125
1125
  },
1126
1126
  customFetchImpl: fetch,
1127
1127
  ...c,
1128
1128
  plugins: [
1129
1129
  i,
1130
1130
  ...c.plugins || [],
1131
- ...e != null && e.disableDefaultFetchPlugins ? [] : [Xt],
1131
+ ...e != null && e.disableDefaultFetchPlugins ? [] : [Yt],
1132
1132
  ...s
1133
1133
  ]
1134
- }), { $sessionSignal: p, session: g, broadcastSessionUpdate: y } = yn(m, e);
1135
- let v = !1;
1136
- const x = (h) => {
1137
- v || h === null || (v = !0, gn(g, h));
1138
- }, S = (e == null ? void 0 : e.plugins) || [];
1139
- let E = {};
1140
- const O = {
1141
- $sessionSignal: p,
1142
- session: g
1143
- }, b = {
1134
+ }), { $sessionSignal: h, session: p, broadcastSessionUpdate: v } = vn(g, e);
1135
+ let b = !1;
1136
+ const x = (f) => {
1137
+ b || f === null || (b = !0, mn(p, f));
1138
+ }, E = (e == null ? void 0 : e.plugins) || [];
1139
+ let P = {};
1140
+ const T = {
1141
+ $sessionSignal: h,
1142
+ session: p
1143
+ }, y = {
1144
1144
  "/sign-out": "POST",
1145
1145
  "/revoke-sessions": "POST",
1146
1146
  "/revoke-other-sessions": "POST",
1147
1147
  "/delete-user": "POST"
1148
- }, T = [{
1148
+ }, _ = [{
1149
1149
  signal: "$sessionSignal",
1150
- matcher(h) {
1151
- return h === "/sign-out" || h === "/update-user" || h === "/update-session" || h === "/sign-up/email" || h === "/sign-in/email" || h === "/delete-user" || h === "/verify-email" || h === "/revoke-sessions" || h === "/revoke-session" || h === "/revoke-other-sessions" || h === "/change-email" || h === "/change-password";
1150
+ matcher(f) {
1151
+ return f === "/sign-out" || f === "/update-user" || f === "/update-session" || f === "/sign-up/email" || f === "/sign-in/email" || f === "/delete-user" || f === "/verify-email" || f === "/revoke-sessions" || f === "/revoke-session" || f === "/revoke-other-sessions" || f === "/change-email" || f === "/change-password";
1152
1152
  },
1153
- callback(h) {
1154
- h === "/sign-out" ? y("signout") : (h === "/update-user" || h === "/update-session") && y("updateUser");
1153
+ callback(f) {
1154
+ f === "/sign-out" ? v("signout") : (f === "/update-user" || f === "/update-session") && v("updateUser");
1155
1155
  }
1156
1156
  }];
1157
- for (const h of S)
1158
- h.getAtoms && Object.assign(O, (K = h.getAtoms) == null ? void 0 : K.call(h, m)), h.pathMethods && Object.assign(b, h.pathMethods), h.atomListeners && T.push(...h.atomListeners);
1159
- const f = {
1160
- notify: (h) => {
1161
- O[h].set(!O[h].get());
1157
+ for (const f of E)
1158
+ f.getAtoms && Object.assign(T, (K = f.getAtoms) == null ? void 0 : K.call(f, g)), f.pathMethods && Object.assign(y, f.pathMethods), f.atomListeners && _.push(...f.atomListeners);
1159
+ const m = {
1160
+ notify: (f) => {
1161
+ T[f].set(!T[f].get());
1162
1162
  },
1163
- listen: (h, j) => {
1164
- O[h].subscribe(j);
1163
+ listen: (f, A) => {
1164
+ T[f].subscribe(A);
1165
1165
  },
1166
- atoms: O
1166
+ atoms: T
1167
1167
  };
1168
- for (const h of S) h.getActions && (E = bn(((P = h.getActions) == null ? void 0 : P.call(h, m, f, e)) ?? {}, E));
1168
+ for (const f of E) f.getActions && (P = wn(((j = f.getActions) == null ? void 0 : j.call(f, g, m, e)) ?? {}, P));
1169
1169
  return {
1170
1170
  get baseURL() {
1171
1171
  return r;
1172
1172
  },
1173
- pluginsActions: E,
1174
- pluginsAtoms: O,
1175
- pluginPathMethods: b,
1176
- atomListeners: T,
1173
+ pluginsActions: P,
1174
+ pluginsAtoms: T,
1175
+ pluginPathMethods: y,
1176
+ atomListeners: _,
1177
1177
  hydrateSession: x,
1178
- $sessionSignal: p,
1179
- $fetch: m,
1180
- $store: f
1178
+ $sessionSignal: h,
1179
+ $fetch: g,
1180
+ $store: m
1181
1181
  };
1182
1182
  };
1183
- function Kn(e) {
1183
+ function Xn(e) {
1184
1184
  return typeof e == "object" && e !== null && "get" in e && typeof e.get == "function" && "lc" in e && typeof e.lc == "number";
1185
1185
  }
1186
- function Xn(e) {
1186
+ function Yn(e) {
1187
1187
  return e.charAt(0).toUpperCase() + e.slice(1);
1188
1188
  }
1189
- const Yn = new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+", "gu"), Qn = /['\u2019]/g;
1190
- function Zn(e) {
1191
- return e.replace(Qn, "").match(Yn) ?? [];
1192
- }
1189
+ const Qn = new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+", "gu"), Zn = /['\u2019]/g;
1193
1190
  function er(e) {
1194
- return Zn(e).map((t) => t.toLowerCase()).join("-");
1191
+ return e.replace(Zn, "").match(Qn) ?? [];
1195
1192
  }
1196
- function tr(e, t, n) {
1193
+ function tr(e) {
1194
+ return er(e).map((t) => t.toLowerCase()).join("-");
1195
+ }
1196
+ function nr(e, t, n) {
1197
1197
  const r = t[e], { fetchOptions: s, query: i, ...l } = n || {};
1198
1198
  return r || (s != null && s.method ? s.method : l && Object.keys(l).length > 0 ? "POST" : "GET");
1199
1199
  }
1200
- function nr(e, t, n, r, s) {
1200
+ function rr(e, t, n, r, s) {
1201
1201
  function i(l = []) {
1202
1202
  return new Proxy(function() {
1203
1203
  }, {
@@ -1205,41 +1205,41 @@ function nr(e, t, n, r, s) {
1205
1205
  if (typeof a != "string" || a === "then" || a === "catch" || a === "finally") return;
1206
1206
  const u = [...l, a];
1207
1207
  let c = e;
1208
- for (const m of u) if (c && typeof c == "object" && m in c) c = c[m];
1208
+ for (const g of u) if (c && typeof c == "object" && g in c) c = c[g];
1209
1209
  else {
1210
1210
  c = void 0;
1211
1211
  break;
1212
1212
  }
1213
- return typeof c == "function" || Kn(c) ? c : i(u);
1213
+ return typeof c == "function" || Xn(c) ? c : i(u);
1214
1214
  },
1215
1215
  apply: async (d, a, u) => {
1216
- const c = "/" + l.map(er).join("/"), m = u[0] || {}, p = u[1] || {}, { query: g, fetchOptions: y, ...v } = m, x = {
1217
- ...p,
1218
- ...y
1219
- }, S = tr(c, n, m);
1216
+ const c = "/" + l.map(tr).join("/"), g = u[0] || {}, h = u[1] || {}, { query: p, fetchOptions: v, ...b } = g, x = {
1217
+ ...h,
1218
+ ...v
1219
+ }, E = nr(c, n, g);
1220
1220
  return await t(c, {
1221
1221
  ...x,
1222
- body: S === "GET" ? void 0 : {
1223
- ...v,
1222
+ body: E === "GET" ? void 0 : {
1223
+ ...b,
1224
1224
  ...(x == null ? void 0 : x.body) || {}
1225
1225
  },
1226
- query: g || (x == null ? void 0 : x.query),
1227
- method: S,
1228
- async onSuccess(E) {
1229
- var T, f;
1230
- if (await ((T = x == null ? void 0 : x.onSuccess) == null ? void 0 : T.call(x, E)), !s || x.disableSignal) return;
1231
- const O = s.filter((R) => R.matcher(c));
1232
- if (!O.length) return;
1233
- const b = /* @__PURE__ */ new Set();
1234
- for (const R of O) {
1235
- const U = r[R.signal];
1236
- if (!U) return;
1237
- if (b.has(R.signal)) continue;
1238
- b.add(R.signal);
1239
- const C = U.get();
1226
+ query: p || (x == null ? void 0 : x.query),
1227
+ method: E,
1228
+ async onSuccess(P) {
1229
+ var _, m;
1230
+ if (await ((_ = x == null ? void 0 : x.onSuccess) == null ? void 0 : _.call(x, P)), !s || x.disableSignal) return;
1231
+ const T = s.filter((O) => O.matcher(c));
1232
+ if (!T.length) return;
1233
+ const y = /* @__PURE__ */ new Set();
1234
+ for (const O of T) {
1235
+ const L = r[O.signal];
1236
+ if (!L) return;
1237
+ if (y.has(O.signal)) continue;
1238
+ y.add(O.signal);
1239
+ const w = L.get();
1240
1240
  setTimeout(() => {
1241
- U.set(!C);
1242
- }, 10), (f = R.callback) == null || f.call(R, c);
1241
+ L.set(!w);
1242
+ }, 10), (m = O.callback) == null || m.call(O, c);
1243
1243
  }
1244
1244
  }
1245
1245
  });
@@ -1248,22 +1248,22 @@ function nr(e, t, n, r, s) {
1248
1248
  }
1249
1249
  return i();
1250
1250
  }
1251
- function rr(e, t = {}) {
1252
- const n = Ye(e.get()), { keys: r, deps: s = [e, r] } = t, i = Qe((d) => {
1251
+ function sr(e, t = {}) {
1252
+ const n = Qe(e.get()), { keys: r, deps: s = [e, r] } = t, i = Ze((d) => {
1253
1253
  const a = (u) => {
1254
1254
  n.current !== u && (n.current = u, d());
1255
1255
  };
1256
- return a(e.value), r != null && r.length ? sn(e, r, a) : e.listen(a);
1256
+ return a(e.value), r != null && r.length ? an(e, r, a) : e.listen(a);
1257
1257
  }, s), l = () => n.current;
1258
- return Ze(i, l, l);
1259
- }
1260
- function sr(e) {
1261
- return `use${Xn(e)}`;
1258
+ return et(i, l, l);
1262
1259
  }
1263
1260
  function ir(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[sr(u)] = () => rr(c);
1266
- return nr({
1261
+ return `use${Yn(e)}`;
1262
+ }
1263
+ function ar(e) {
1264
+ const { pluginPathMethods: t, pluginsActions: n, pluginsAtoms: r, hydrateSession: s, $fetch: i, $store: l, atomListeners: d } = Kn(e), a = {};
1265
+ for (const [u, c] of Object.entries(r)) a[ir(u)] = () => sr(c);
1266
+ return rr({
1267
1267
  ...n,
1268
1268
  ...a,
1269
1269
  hydrateSession: s,
@@ -1271,78 +1271,99 @@ function ir(e) {
1271
1271
  $store: l
1272
1272
  }, i, t, r, d);
1273
1273
  }
1274
- var ar = "1.7.3";
1275
- const or = ar, lr = () => ({
1274
+ var or = "1.7.3";
1275
+ const lr = or, cr = () => ({
1276
1276
  id: "magic-link",
1277
- version: or,
1277
+ version: lr,
1278
1278
  $InferServerPlugin: {}
1279
1279
  });
1280
1280
  let Ue = null;
1281
- function B() {
1282
- return Ue ?? (Ue = ir({
1283
- baseURL: nt(),
1284
- plugins: [lr()]
1281
+ function M() {
1282
+ return Ue ?? (Ue = ar({
1283
+ baseURL: rt(),
1284
+ plugins: [cr()]
1285
1285
  })), Ue;
1286
1286
  }
1287
- function cr() {
1288
- const [e] = ve(), [t, n] = w(null), [r, s] = w(null), [i, l] = w(!1), [d, a] = w(null), u = e.get("token") ? e.get("email") ?? "" : "", [c, m] = w(u || (e.get("email") ?? "")), [p, g] = w(""), [y, v] = w(""), [x, S] = w("signin");
1287
+ const ge = {
1288
+ terms: "https://backmatter.app/legal/terms",
1289
+ privacy: "https://backmatter.app/legal/privacy",
1290
+ dpa: "https://backmatter.app/legal/dpa"
1291
+ };
1292
+ function ur() {
1293
+ const [e] = be(), [t, n] = S(null), [r, s] = S(null), [i, l] = S(!1), [d, a] = S(null), u = e.get("token") ? e.get("email") ?? "" : "", [c, g] = S(u || (e.get("email") ?? "")), [h, p] = S(""), [v, b] = S(""), [x, E] = S("signin"), [P, T] = S(!1), y = x === "signup" && !P;
1289
1294
  V(() => {
1290
- rt().then((f) => a(f.github)).catch(() => a(!1));
1295
+ st().then((w) => a(w.github)).catch(() => a(!1));
1291
1296
  }, []);
1292
- const E = window.location.href;
1293
- async function O() {
1297
+ const _ = window.location.href;
1298
+ async function m() {
1294
1299
  l(!0), n(null);
1295
1300
  try {
1296
- await B().signIn.social({
1301
+ await M().signIn.social({
1297
1302
  provider: "github",
1298
- callbackURL: E
1303
+ callbackURL: _
1299
1304
  });
1300
- } catch (f) {
1301
- n(f instanceof Error ? f.message : "GitHub sign-in failed"), l(!1);
1305
+ } catch (w) {
1306
+ n(w instanceof Error ? w.message : "GitHub sign-in failed"), l(!1);
1302
1307
  }
1303
1308
  }
1304
- async function b() {
1309
+ async function O() {
1305
1310
  l(!0), n(null), s(null);
1306
- const f = await B().signIn.magicLink({
1311
+ const w = await M().signIn.magicLink({
1307
1312
  email: c,
1308
- callbackURL: E
1313
+ callbackURL: _
1309
1314
  });
1310
- if (l(!1), f.error) {
1311
- n(f.error.message ?? "Could not send the magic link");
1315
+ if (l(!1), w.error) {
1316
+ n(w.error.message ?? "Could not send the magic link");
1312
1317
  return;
1313
1318
  }
1314
1319
  s("Check your email for a sign-in link.");
1315
1320
  }
1316
- async function T(f) {
1317
- f.preventDefault(), l(!0), n(null);
1318
- const R = x === "signup" ? await B().signUp.email({
1321
+ async function L(w) {
1322
+ w.preventDefault(), l(!0), n(null);
1323
+ const q = x === "signup" ? await M().signUp.email({
1319
1324
  email: c,
1320
- password: p,
1321
- name: y,
1322
- callbackURL: E
1323
- }) : await B().signIn.email({
1325
+ password: h,
1326
+ name: v,
1327
+ callbackURL: _
1328
+ }) : await M().signIn.email({
1324
1329
  email: c,
1325
- password: p,
1326
- callbackURL: E
1330
+ password: h,
1331
+ callbackURL: _
1327
1332
  });
1328
- if (R.error) {
1329
- n(R.error.message ?? "Sign-in failed"), l(!1);
1333
+ if (q.error) {
1334
+ n(q.error.message ?? "Sign-in failed"), l(!1);
1330
1335
  return;
1331
1336
  }
1332
- window.location.assign(E);
1337
+ window.location.assign(_);
1333
1338
  }
1334
- return /* @__PURE__ */ k("main", { ...it(at, dr.main), children: [
1339
+ return /* @__PURE__ */ k("main", { ...at(ot, fr.main), children: [
1335
1340
  /* @__PURE__ */ o("div", { className: "x10l6tqk x10a8y8t x47corl x87ps6o xlxt4rd", "aria-hidden": !0 }),
1336
1341
  /* @__PURE__ */ k("div", { className: "x1n2onr6 x78zum5 xh8yej3 xxc7z9f xdt5ytf x6s0dn4 x2b8uid", children: [
1337
- /* @__PURE__ */ o("div", { className: "xrvj5dj x1ku5rj1 x1useyqa xsdox4t x1y5o9j5 x1n0nidx", children: /* @__PURE__ */ o(ur, {}) }),
1342
+ /* @__PURE__ */ o("div", { className: "xrvj5dj x1ku5rj1 x1useyqa xsdox4t x1y5o9j5 x1n0nidx", children: /* @__PURE__ */ o(dr, {}) }),
1338
1343
  /* @__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(_, { 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." }) }),
1344
+ /* @__PURE__ */ o("div", { className: "x1g7u8ds", children: /* @__PURE__ */ o(R, { 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
1345
  /* @__PURE__ */ k("div", { className: "x78zum5 xh8yej3 x1tfhste xdt5ytf x6s0dn4 x11cgr9k", children: [
1341
- t ? /* @__PURE__ */ o(_, { tone: "danger", children: t }) : null,
1342
- r ? /* @__PURE__ */ o(_, { tone: "muted", children: r }) : null,
1343
- /* @__PURE__ */ k("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, ...{
1346
+ t ? /* @__PURE__ */ o(R, { tone: "danger", children: t }) : null,
1347
+ r ? /* @__PURE__ */ o(R, { tone: "muted", children: r }) : null,
1348
+ /* @__PURE__ */ k("p", { className: "x1ghz6dp x1vrk1b5 x1evy7pa x111yfic xdpxx8g", children: [
1349
+ "By continuing you agree to the",
1350
+ " ",
1351
+ /* @__PURE__ */ o("a", { href: ge.terms, className: "xqjzbou xrys4gj", children: "Terms" }),
1352
+ " and the",
1353
+ " ",
1354
+ /* @__PURE__ */ o("a", { href: ge.dpa, className: "xqjzbou xrys4gj", children: "Data Processing Agreement" }),
1355
+ ", and you acknowledge the",
1356
+ " ",
1357
+ /* @__PURE__ */ o("a", { href: ge.privacy, className: "xqjzbou xrys4gj", children: "Privacy policy" }),
1358
+ ". A consumer who asks us to start the service now loses the 14-day right of withdrawal once it has begun."
1359
+ ] }),
1360
+ x === "signup" ? /* @__PURE__ */ k("label", { className: "x78zum5 xh8yej3 x3smv4v x1cy8zhl x1gg8mnh xdpxx8g x1vrk1b5 x1evy7pa xqjzbou x1ypdohk", children: [
1361
+ /* @__PURE__ */ o("input", { type: "checkbox", checked: P, onChange: (w) => T(w.target.checked), className: "x1xp8n7a xmix8c7 xr9ek0c x2lah0s x1kb3qnp" }),
1362
+ /* @__PURE__ */ o("span", { children: "I agree, and I ask Backmatter to start the service now." })
1363
+ ] }) : null,
1364
+ /* @__PURE__ */ k("form", { onSubmit: (w) => void L(w), className: "x78zum5 xh8yej3 xdt5ytf x1ndbd79", children: [
1365
+ x === "signup" ? /* @__PURE__ */ o("input", { required: !0, value: v, onChange: (w) => b(w.target.value), placeholder: "Name", autoComplete: "name", className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x17ia0ru x1l3a84d" }) : null,
1366
+ /* @__PURE__ */ o("input", { required: !0, type: "email", value: c, onChange: (w) => g(w.target.value), placeholder: "Email", autoComplete: "email", readOnly: !!u, ...{
1346
1367
  0: {
1347
1368
  className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x17ia0ru x1l3a84d"
1348
1369
  },
@@ -1350,48 +1371,48 @@ function cr() {
1350
1371
  className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x1l3a84d x10jjolp"
1351
1372
  }
1352
1373
  }[!!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, ...{
1374
+ /* @__PURE__ */ o("input", { required: !0, type: "password", value: h, onChange: (w) => p(w.target.value), placeholder: "Password", autoComplete: x === "signup" ? "new-password" : "current-password", className: "x9f619 xh8yej3 x1gg8mnh x173sf5p xmkeg23 x1y0btm7 x198m1os x4pepcl xf6xdpg x17ia0ru x1l3a84d" }),
1375
+ /* @__PURE__ */ o("button", { type: "submit", disabled: i || y, ...{
1355
1376
  0: {
1356
1377
  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
1378
  },
1358
1379
  1: {
1359
1380
  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"
1360
1381
  }
1361
- }[!!i << 0], children: x === "signup" ? "Create account" : "Sign in" })
1382
+ }[!!(i || y) << 0], children: x === "signup" ? "Create account" : "Sign in" })
1362
1383
  ] }),
1363
- /* @__PURE__ */ o("button", { type: "button", disabled: i || !c, onClick: () => void b(), ...{
1384
+ /* @__PURE__ */ o("button", { type: "button", disabled: i || !c || y, onClick: () => void O(), ...{
1364
1385
  0: {
1365
1386
  className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k xc342km x1e6avla xjbqb8w x1n0nidx x1vrk1b5 x1ypdohk"
1366
1387
  },
1367
1388
  1: {
1368
1389
  className: "x3nfvp2 x9f619 xh8yej3 x1gg8mnh x6s0dn4 xl56j7k xc342km x1e6avla xjbqb8w x1n0nidx x1vrk1b5 xwq05k6 x1h6gzvc x47corl"
1369
1390
  }
1370
- }[!!(i || !c) << 0], children: "Email me a magic link" }),
1371
- /* @__PURE__ */ o("button", { type: "button", disabled: i, onClick: () => S(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__ */ k("button", { type: "button", disabled: i || d !== !0, onClick: () => void O(), ...{
1391
+ }[!!(i || !c || y) << 0], children: "Email me a magic link" }),
1392
+ /* @__PURE__ */ o("button", { type: "button", disabled: i, onClick: () => E(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" }),
1393
+ /* @__PURE__ */ k("button", { type: "button", disabled: i || d !== !0 || y, onClick: () => void m(), ...{
1373
1394
  0: {
1374
1395
  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
1396
  },
1376
1397
  1: {
1377
1398
  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
1399
  }
1379
- }[!!(i || d !== !0) << 0], children: [
1380
- /* @__PURE__ */ o(st, { size: 18 }),
1400
+ }[!!(i || d !== !0 || y) << 0], children: [
1401
+ /* @__PURE__ */ o(it, { size: 18 }),
1381
1402
  "Continue with GitHub"
1382
1403
  ] })
1383
1404
  ] })
1384
1405
  ] })
1385
1406
  ] });
1386
1407
  }
1387
- function ur() {
1408
+ function dr() {
1388
1409
  return /* @__PURE__ */ k("svg", { width: "48", height: "48", viewBox: "0 0 48 48", fill: "none", "aria-hidden": !0, children: [
1389
1410
  /* @__PURE__ */ o("circle", { cx: "24", cy: "24", r: "18.25", stroke: "currentColor", strokeWidth: "1.25", opacity: "0.28" }),
1390
1411
  /* @__PURE__ */ o("circle", { cx: "24", cy: "24", r: "11.25", stroke: "currentColor", strokeWidth: "1.25", opacity: "0.55" }),
1391
1412
  /* @__PURE__ */ o("circle", { cx: "24", cy: "24", r: "4", fill: "currentColor" })
1392
1413
  ] });
1393
1414
  }
1394
- const dr = {
1415
+ const fr = {
1395
1416
  main: {
1396
1417
  kVAEAm: "x1n2onr6",
1397
1418
  k1xSpc: "x78zum5",
@@ -1408,47 +1429,47 @@ const dr = {
1408
1429
  $$css: !0
1409
1430
  }
1410
1431
  };
1411
- function fr() {
1432
+ function hr() {
1412
1433
  var s;
1413
- const { userId: e } = Ne(), t = Ce(), n = Ie(e), r = ot(n, ((s = t.control) == null ? void 0 : s.workspaces) ?? []);
1414
- return r === "/workspaces" && n && lt(e), /* @__PURE__ */ o(qe, { to: r, replace: !0 });
1434
+ const { userId: e } = Ce(), t = Ie(), n = qe(e), r = lt(n, ((s = t.control) == null ? void 0 : s.workspaces) ?? []);
1435
+ return r === "/workspaces" && n && ct(e), /* @__PURE__ */ o(ze, { to: r, replace: !0 });
1415
1436
  }
1416
- function hr({
1437
+ function pr({
1417
1438
  to: e,
1418
1439
  title: t,
1419
1440
  meta: n,
1420
1441
  trailing: r
1421
1442
  }) {
1422
- const s = /* @__PURE__ */ k(ge, { children: [
1443
+ const s = /* @__PURE__ */ k(me, { children: [
1423
1444
  /* @__PURE__ */ k("span", { className: "x78zum5 xeuugli xdt5ytf x195vfkc", children: [
1424
1445
  /* @__PURE__ */ o("span", { className: "x17tv04q xk50ysn", children: t }),
1425
1446
  n ? /* @__PURE__ */ o("span", { className: "x1vrk1b5 x111yfic", children: n }) : null
1426
1447
  ] }),
1427
1448
  r ? /* @__PURE__ */ o("span", { className: "x2lah0s x1vrk1b5 x111yfic", children: r }) : null
1428
1449
  ] });
1429
- return e ? /* @__PURE__ */ o(ct, { to: e, className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x21xpn4 x173sf5p x15jjofa x1hl2dhg xqjzbou xso031l x1q0q8m5 x4b2zrn x1t1lzn6 x1xcxyqb", children: s }) : /* @__PURE__ */ o("div", { className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x21xpn4 x173sf5p x15jjofa x1hl2dhg xqjzbou xso031l x1q0q8m5 x4b2zrn x1t1lzn6 x1xcxyqb xt0e3qv", children: s });
1450
+ return e ? /* @__PURE__ */ o(ut, { to: e, className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x21xpn4 x173sf5p x15jjofa x1hl2dhg xqjzbou xso031l x1q0q8m5 x4b2zrn x1t1lzn6 x1xcxyqb", children: s }) : /* @__PURE__ */ o("div", { className: "x78zum5 x6s0dn4 x1qughib x11cgr9k x21xpn4 x173sf5p x15jjofa x1hl2dhg xqjzbou xso031l x1q0q8m5 x4b2zrn x1t1lzn6 x1xcxyqb xt0e3qv", children: s });
1430
1451
  }
1431
- function pr({
1452
+ function gr({
1432
1453
  children: e
1433
1454
  }) {
1434
1455
  return /* @__PURE__ */ o("div", { className: "x78zum5 xdt5ytf xmkeg23 x1y0btm7 x1j0qoeq x13oidi x1hb2obb xb3r6kr", children: e });
1435
1456
  }
1436
- function gr() {
1457
+ function mr() {
1437
1458
  var t;
1438
- const e = ((t = Ce().control) == null ? void 0 : t.workspaces) ?? [];
1459
+ const e = ((t = Ie().control) == null ? void 0 : t.workspaces) ?? [];
1439
1460
  return /* @__PURE__ */ k(ie, { centered: !0, children: [
1440
1461
  /* @__PURE__ */ o(
1441
1462
  J,
1442
1463
  {
1443
1464
  title: "Workspaces",
1444
1465
  description: "Each workspace is a site and a team.",
1445
- action: /* @__PURE__ */ o(ze, { to: "/workspaces/new", children: "New workspace" })
1466
+ action: /* @__PURE__ */ o(Be, { to: "/workspaces/new", children: "New workspace" })
1446
1467
  }
1447
1468
  ),
1448
- e.length === 0 ? /* @__PURE__ */ o(_, { tone: "muted", children: "No workspaces yet." }) : /* @__PURE__ */ o(pr, { children: e.map((n) => /* @__PURE__ */ o(
1449
- hr,
1469
+ e.length === 0 ? /* @__PURE__ */ o(R, { tone: "muted", children: "No workspaces yet." }) : /* @__PURE__ */ o(gr, { children: e.map((n) => /* @__PURE__ */ o(
1470
+ pr,
1450
1471
  {
1451
- to: ut(n.slug),
1472
+ to: dt(n.slug),
1452
1473
  title: n.name,
1453
1474
  meta: n.role
1454
1475
  },
@@ -1456,13 +1477,13 @@ function gr() {
1456
1477
  )) })
1457
1478
  ] });
1458
1479
  }
1459
- function mr() {
1460
- const e = Fe(), [t, n] = w(""), [r, s] = w(null), [i, l] = w(!1);
1480
+ function xr() {
1481
+ const e = Fe(), [t, n] = S(""), [r, s] = S(null), [i, l] = S(!1);
1461
1482
  async function d(a) {
1462
1483
  a.preventDefault(), l(!0), s(null);
1463
1484
  try {
1464
- const { workspace: u } = await ft(t), c = z.getState().control;
1465
- c && z.applyControl({
1485
+ const { workspace: u } = await ht(t), c = B.getState().control;
1486
+ c && B.applyControl({
1466
1487
  ...c,
1467
1488
  workspaces: [
1468
1489
  ...c.workspaces,
@@ -1484,7 +1505,7 @@ function mr() {
1484
1505
  /* @__PURE__ */ o(
1485
1506
  J,
1486
1507
  {
1487
- kicker: /* @__PURE__ */ o(dt, { to: "/workspaces", children: "← Workspaces" }),
1508
+ kicker: /* @__PURE__ */ o(ft, { to: "/workspaces", children: "← Workspaces" }),
1488
1509
  title: "Create workspace"
1489
1510
  }
1490
1511
  ),
@@ -1498,12 +1519,12 @@ function mr() {
1498
1519
  placeholder: "Docs site"
1499
1520
  }
1500
1521
  ) }),
1501
- r ? /* @__PURE__ */ o(_, { tone: "danger", children: r }) : null,
1522
+ r ? /* @__PURE__ */ o(R, { tone: "danger", children: r }) : null,
1502
1523
  /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(ae, { type: "submit", disabled: i, children: i ? "Creating…" : "Create workspace" }) })
1503
1524
  ] }) })
1504
1525
  ] });
1505
1526
  }
1506
- function xr(e, t) {
1527
+ function yr(e, t) {
1507
1528
  switch (e) {
1508
1529
  case "invite_expired":
1509
1530
  return "This invite has expired. Ask for a new one.";
@@ -1519,56 +1540,56 @@ function xr(e, t) {
1519
1540
  return t;
1520
1541
  }
1521
1542
  }
1522
- function yr() {
1523
- const [e] = ve(), t = Fe(), n = e.get("token") ?? "", r = e.get("email") ?? "", [s, i] = w(null), [l, d] = w(null), [a, u] = w(!1);
1543
+ function vr() {
1544
+ const [e] = be(), t = Fe(), n = e.get("token") ?? "", r = e.get("email") ?? "", [s, i] = S(null), [l, d] = S(null), [a, u] = S(!1);
1524
1545
  V(() => {
1525
1546
  if (!n) {
1526
1547
  i("This invite link is missing a token.");
1527
1548
  return;
1528
1549
  }
1529
- let m = !1;
1530
- return ht(n).then((p) => {
1531
- m || t(`/${p.slug}`, { replace: !0 });
1532
- }).catch(async (p) => {
1533
- if (m) return;
1534
- const g = p && typeof p == "object" && "code" in p ? p.code : void 0;
1535
- if (g === "invite_email_mismatch" || g === "unauthorized") {
1536
- const v = await be().catch(() => null);
1537
- if (m) return;
1538
- d((v == null ? void 0 : v.user.email) ?? null), u(!0);
1550
+ let g = !1;
1551
+ return pt(n).then((h) => {
1552
+ g || t(`/${h.slug}`, { replace: !0 });
1553
+ }).catch(async (h) => {
1554
+ if (g) return;
1555
+ const p = h && typeof h == "object" && "code" in h ? h.code : void 0;
1556
+ if (p === "invite_email_mismatch" || p === "unauthorized") {
1557
+ const b = await we().catch(() => null);
1558
+ if (g) return;
1559
+ d((b == null ? void 0 : b.user.email) ?? null), u(!0);
1539
1560
  return;
1540
1561
  }
1541
- const y = p instanceof Error ? p.message : "Could not accept invite";
1542
- i(xr(g, y));
1562
+ const v = h instanceof Error ? h.message : "Could not accept invite";
1563
+ i(yr(p, v));
1543
1564
  }), () => {
1544
- m = !0;
1565
+ g = !0;
1545
1566
  };
1546
1567
  }, [t, n]);
1547
1568
  async function c() {
1548
- await B().signOut().catch(() => {
1549
- }), ee(), z.wipe(), window.location.assign(window.location.href);
1569
+ await M().signOut().catch(() => {
1570
+ }), ee(), B.wipe(), window.location.assign(window.location.href);
1550
1571
  }
1551
1572
  return /* @__PURE__ */ k(ie, { centered: !0, children: [
1552
1573
  /* @__PURE__ */ o(J, { title: "Accept invite" }),
1553
1574
  a ? /* @__PURE__ */ k(re, { children: [
1554
- /* @__PURE__ */ 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(_, { size: "sm", tone: "muted", children: "Password and GitHub stay on the next screen. A magic link sends one more email to that address." }),
1575
+ /* @__PURE__ */ o(R, { children: l ? `You're signed in as ${l}. This invite is for ${r || "someone else"}.` : `Sign in as ${r || "the invited email"} to join.` }),
1576
+ /* @__PURE__ */ o(R, { size: "sm", tone: "muted", children: "Password and GitHub stay on the next screen. A magic link sends one more email to that address." }),
1556
1577
  /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(ae, { type: "button", variant: "secondary", onClick: () => void c(), children: r ? `Sign in as ${r}` : "Sign in to continue" }) })
1557
- ] }) : s ? /* @__PURE__ */ o(_, { tone: "danger", children: s }) : /* @__PURE__ */ o(_, { tone: "muted", children: "Joining workspace…" })
1578
+ ] }) : s ? /* @__PURE__ */ o(R, { tone: "danger", children: s }) : /* @__PURE__ */ o(R, { tone: "muted", children: "Joining workspace…" })
1558
1579
  ] });
1559
1580
  }
1560
- function vr() {
1561
- const { email: e, userId: t } = Ne(), [n, r] = w(""), [s, i] = w(null), [l, d] = w(null), [a, u] = w(!1);
1581
+ function br() {
1582
+ const { email: e, userId: t } = Ce(), [n, r] = S(""), [s, i] = S(null), [l, d] = S(null), [a, u] = S(!1);
1562
1583
  V(() => {
1563
- be().then((m) => {
1564
- m != null && m.user.name && r(m.user.name);
1584
+ we().then((g) => {
1585
+ g != null && g.user.name && r(g.user.name);
1565
1586
  });
1566
1587
  }, []);
1567
- async function c(m) {
1568
- m.preventDefault(), u(!0), d(null), i(null);
1569
- const p = await B().updateUser({ name: n });
1570
- if (u(!1), p.error) {
1571
- d(p.error.message ?? "Could not save name");
1588
+ async function c(g) {
1589
+ g.preventDefault(), u(!0), d(null), i(null);
1590
+ const h = await M().updateUser({ name: n });
1591
+ if (u(!1), h.error) {
1592
+ d(h.error.message ?? "Could not save name");
1572
1593
  return;
1573
1594
  }
1574
1595
  i("Name saved. New publishes will use it.");
@@ -1582,9 +1603,9 @@ function vr() {
1582
1603
  }
1583
1604
  ),
1584
1605
  /* @__PURE__ */ k(re, { gap: "lg", children: [
1585
- /* @__PURE__ */ o(pt, { children: /* @__PURE__ */ o("form", { onSubmit: (m) => void c(m), children: /* @__PURE__ */ k(re, { children: [
1586
- /* @__PURE__ */ o(_, { as: "h2", size: "lg", weight: "medium", children: "Account" }),
1587
- /* @__PURE__ */ o(Q, { label: "Name", children: /* @__PURE__ */ o(Z, { value: n, onChange: (m) => r(m.target.value), autoComplete: "name" }) }),
1606
+ /* @__PURE__ */ o(gt, { children: /* @__PURE__ */ o("form", { onSubmit: (g) => void c(g), children: /* @__PURE__ */ k(re, { children: [
1607
+ /* @__PURE__ */ o(R, { as: "h2", size: "lg", weight: "medium", children: "Account" }),
1608
+ /* @__PURE__ */ o(Q, { label: "Name", children: /* @__PURE__ */ o(Z, { value: n, onChange: (g) => r(g.target.value), autoComplete: "name" }) }),
1588
1609
  /* @__PURE__ */ o(Q, { label: "Email", children: /* @__PURE__ */ o(
1589
1610
  Z,
1590
1611
  {
@@ -1604,8 +1625,8 @@ function vr() {
1604
1625
  spellCheck: !1
1605
1626
  }
1606
1627
  ) }),
1607
- l ? /* @__PURE__ */ o(_, { tone: "danger", children: l }) : null,
1608
- s ? /* @__PURE__ */ o(_, { tone: "muted", children: s }) : null,
1628
+ l ? /* @__PURE__ */ o(R, { tone: "danger", children: l }) : null,
1629
+ s ? /* @__PURE__ */ o(R, { tone: "muted", children: s }) : null,
1609
1630
  /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(ae, { type: "submit", disabled: a, children: a ? "Saving…" : "Save name" }) })
1610
1631
  ] }) }) }),
1611
1632
  /* @__PURE__ */ k("div", { children: [
@@ -1617,39 +1638,39 @@ function vr() {
1617
1638
  compact: !0
1618
1639
  }
1619
1640
  ),
1620
- /* @__PURE__ */ o(gt, { scope: "user", canEdit: !0 })
1641
+ /* @__PURE__ */ o(mt, { scope: "user", canEdit: !0 })
1621
1642
  ] })
1622
1643
  ] })
1623
1644
  ] });
1624
1645
  }
1625
- function br({
1646
+ function wr({
1626
1647
  email: e
1627
1648
  }) {
1628
- const [t] = ve(), n = t.get("id") ?? "", [r, s] = w("idle"), [i, l] = w(null);
1649
+ const [t] = be(), n = t.get("id") ?? "", [r, s] = S("idle"), [i, l] = S(null);
1629
1650
  return /* @__PURE__ */ o("main", { className: "x78zum5 x9f619 xh8yej3 x1ov3xa9 x6s0dn4 xl56j7k x1y5dg2c x86kjsi xqjzbou", children: /* @__PURE__ */ k("div", { className: "x78zum5 xh8yej3 x1va8c73 xdt5ytf x1cy8zhl x11cgr9k x9f619 xmkeg23 x1y0btm7 x1j0qoeq x13oidi x1hb2obb x1y5dg2c x1vrk1b5", children: [
1630
- /* @__PURE__ */ o(_, { as: "h1", size: "xl", weight: "medium", children: "Allow the CLI" }),
1631
- /* @__PURE__ */ k(_, { tone: "muted", children: [
1651
+ /* @__PURE__ */ o(R, { as: "h1", size: "xl", weight: "medium", children: "Allow the CLI" }),
1652
+ /* @__PURE__ */ k(R, { tone: "muted", children: [
1632
1653
  "This signs the CLI in as ",
1633
1654
  e,
1634
1655
  ". It can act in any workspace you belong to. It does not pick one."
1635
1656
  ] }),
1636
- r === "done" ? /* @__PURE__ */ o(_, { children: "You can return to the terminal." }) : null,
1637
- i ? /* @__PURE__ */ o(_, { tone: "danger", children: i }) : null,
1657
+ r === "done" ? /* @__PURE__ */ o(R, { children: "You can return to the terminal." }) : null,
1658
+ i ? /* @__PURE__ */ o(R, { tone: "danger", children: i }) : null,
1638
1659
  r === "done" ? null : /* @__PURE__ */ o(ae, { disabled: !n, onClick: () => {
1639
- l(null), mt(n).then(() => s("done")).catch((d) => {
1660
+ l(null), xt(n).then(() => s("done")).catch((d) => {
1640
1661
  s("error"), l(d instanceof Error ? d.message : "Could not approve");
1641
1662
  });
1642
1663
  }, children: "Allow" })
1643
1664
  ] }) });
1644
1665
  }
1645
- function wr({
1666
+ function kr({
1646
1667
  userId: e
1647
1668
  }) {
1648
- const [t, n] = w({
1669
+ const [t, n] = S({
1649
1670
  kind: "working"
1650
1671
  });
1651
1672
  return V(() => {
1652
- const r = xt(window.location.search);
1673
+ const r = yt(window.location.search);
1653
1674
  if (!r) {
1654
1675
  n({
1655
1676
  kind: "error",
@@ -1662,7 +1683,7 @@ function wr({
1662
1683
  try {
1663
1684
  const {
1664
1685
  workspace: i
1665
- } = await yt(r.workspaceId), l = vt(r.returnUrl, i.siteUrls);
1686
+ } = await vt(r.workspaceId), l = bt(r.returnUrl, i.siteUrls);
1666
1687
  if (!l) {
1667
1688
  n({
1668
1689
  kind: "error",
@@ -1672,12 +1693,12 @@ function wr({
1672
1693
  }
1673
1694
  const {
1674
1695
  ticket: d
1675
- } = await bt(i.id, {
1696
+ } = await wt(i.id, {
1676
1697
  redirect: l.redirect,
1677
1698
  tree: e
1678
1699
  });
1679
1700
  if (s) return;
1680
- window.location.replace(wt(l.origin, d));
1701
+ window.location.replace(kt(l.origin, d));
1681
1702
  } catch (i) {
1682
1703
  if (s) return;
1683
1704
  n({
@@ -1688,71 +1709,71 @@ function wr({
1688
1709
  })(), () => {
1689
1710
  s = !0;
1690
1711
  };
1691
- }, [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__ */ k(ge, { children: [
1692
- /* @__PURE__ */ o(_, { size: "lg", weight: "medium", children: "Opening your site…" }),
1693
- /* @__PURE__ */ o(_, { tone: "muted", children: "Setting up editing on the site and sending you back." })
1694
- ] }) : /* @__PURE__ */ k(ge, { children: [
1695
- /* @__PURE__ */ o(_, { size: "lg", weight: "medium", children: "Could not open the site" }),
1696
- /* @__PURE__ */ o(_, { tone: "muted", children: t.message }),
1697
- /* @__PURE__ */ o(ze, { to: "/", variant: "secondary", children: "Back to the dashboard" })
1712
+ }, [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__ */ k(me, { children: [
1713
+ /* @__PURE__ */ o(R, { size: "lg", weight: "medium", children: "Opening your site…" }),
1714
+ /* @__PURE__ */ o(R, { tone: "muted", children: "Setting up editing on the site and sending you back." })
1715
+ ] }) : /* @__PURE__ */ k(me, { children: [
1716
+ /* @__PURE__ */ o(R, { size: "lg", weight: "medium", children: "Could not open the site" }),
1717
+ /* @__PURE__ */ o(R, { tone: "muted", children: t.message }),
1718
+ /* @__PURE__ */ o(Be, { to: "/", variant: "secondary", children: "Back to the dashboard" })
1698
1719
  ] }) }) });
1699
1720
  }
1700
- function kr(e) {
1701
- if (!kt()) return !1;
1721
+ function Sr(e) {
1722
+ if (!St()) return !1;
1702
1723
  const t = e.replace(/\/$/, "") || "/";
1703
1724
  return t === "/__ui" || /^\/__ui\/[^/]+$/.test(t);
1704
1725
  }
1705
- const Sr = et(() => import("./UiKitApp-DkuQBiQZ.js").then((e) => ({
1726
+ const Er = tt(() => import("./UiKitApp-C269OA8v.js").then((e) => ({
1706
1727
  default: e.UiKitApp
1707
1728
  })));
1708
- function Pr() {
1709
- return /* @__PURE__ */ o(St, { children: /* @__PURE__ */ o(Et, { children: /* @__PURE__ */ o(Er, {}) }) });
1729
+ function jr() {
1730
+ return /* @__PURE__ */ o(Et, { children: /* @__PURE__ */ o(Rt, { children: /* @__PURE__ */ o(Rr, {}) }) });
1710
1731
  }
1711
- function Er() {
1712
- const e = Rt(), [t, n] = w(() => {
1713
- const r = _t();
1732
+ function Rr() {
1733
+ const e = _t(), [t, n] = S(() => {
1734
+ const r = Ot();
1714
1735
  return r ? {
1715
1736
  user: r
1716
1737
  } : "loading";
1717
1738
  });
1718
1739
  return V(() => {
1719
- be().then((r) => {
1740
+ we().then((r) => {
1720
1741
  if (!(r != null && r.user)) {
1721
- ee(), z.wipe(), n(null);
1742
+ ee(), B.wipe(), n(null);
1722
1743
  return;
1723
1744
  }
1724
- if (Ot(r.user), n({
1745
+ if (Tt(r.user), n({
1725
1746
  user: {
1726
1747
  id: r.user.id,
1727
1748
  email: r.user.email
1728
1749
  }
1729
- }), z.getState().sessionUserId !== r.user.id) {
1730
- const s = Tt(window.location.pathname);
1731
- z.hydrate(r.user.id, s ?? Ie(r.user.id));
1750
+ }), B.getState().sessionUserId !== r.user.id) {
1751
+ const s = Pt(window.location.pathname);
1752
+ B.hydrate(r.user.id, s ?? qe(r.user.id));
1732
1753
  }
1733
1754
  }).catch(() => {
1734
- ee(), z.wipe(), n(null);
1755
+ ee(), B.wipe(), n(null);
1735
1756
  });
1736
- }, []), kr(e.pathname) ? /* @__PURE__ */ o(tt, { fallback: /* @__PURE__ */ o("div", { className: "x1y5dg2c", children: /* @__PURE__ */ o(_, { tone: "muted", children: "Loading kit…" }) }), children: /* @__PURE__ */ o(Sr, {}) }) : t === "loading" ? /* @__PURE__ */ o(Pt, {}) : t ? e.pathname.replace(/\/$/, "") === "/enter" ? /* @__PURE__ */ o(wr, { userId: t.user.id }) : jt(e.pathname) ? /* @__PURE__ */ o(br, { email: t.user.email }) : /* @__PURE__ */ o(Lt, { user: t.user, children: /* @__PURE__ */ o(At, { children: /* @__PURE__ */ o(Ut, { userId: t.user.id, email: t.user.email, onLogout: () => {
1737
- ee(), z.wipe(), B().signOut().then(() => {
1757
+ }, []), Sr(e.pathname) ? /* @__PURE__ */ o(nt, { fallback: /* @__PURE__ */ o("div", { className: "x1y5dg2c", children: /* @__PURE__ */ o(R, { tone: "muted", children: "Loading kit…" }) }), children: /* @__PURE__ */ o(Er, {}) }) : t === "loading" ? /* @__PURE__ */ o(jt, {}) : t ? e.pathname.replace(/\/$/, "") === "/enter" ? /* @__PURE__ */ o(kr, { userId: t.user.id }) : Lt(e.pathname) ? /* @__PURE__ */ o(wr, { email: t.user.email }) : /* @__PURE__ */ o(At, { user: t.user, children: /* @__PURE__ */ o(Nt, { children: /* @__PURE__ */ o(Ut, { userId: t.user.id, email: t.user.email, onLogout: () => {
1758
+ ee(), B.wipe(), M().signOut().then(() => {
1738
1759
  n(null);
1739
1760
  }).catch(() => {
1740
1761
  n(null);
1741
1762
  });
1742
- }, children: /* @__PURE__ */ k(Nt, { children: [
1743
- /* @__PURE__ */ o(F, { path: "/", element: /* @__PURE__ */ o(fr, {}) }),
1744
- /* @__PURE__ */ o(F, { path: "/workspaces", element: /* @__PURE__ */ o(gr, {}) }),
1745
- /* @__PURE__ */ o(F, { path: "/workspaces/new", element: /* @__PURE__ */ o(mr, {}) }),
1746
- /* @__PURE__ */ o(F, { path: "/invite", element: /* @__PURE__ */ o(yr, {}) }),
1747
- /* @__PURE__ */ o(F, { path: "/account", element: /* @__PURE__ */ o(vr, {}) }),
1748
- /* @__PURE__ */ o(F, { path: "/workspaces/:workspaceId/*", element: /* @__PURE__ */ o(Ct, {}) }),
1749
- It(),
1750
- /* @__PURE__ */ o(F, { path: "*", element: /* @__PURE__ */ o(qe, { to: "/", replace: !0 }) })
1751
- ] }) }) }) }) : /* @__PURE__ */ o(cr, {});
1763
+ }, children: /* @__PURE__ */ k(Ct, { children: [
1764
+ /* @__PURE__ */ o(F, { path: "/", element: /* @__PURE__ */ o(hr, {}) }),
1765
+ /* @__PURE__ */ o(F, { path: "/workspaces", element: /* @__PURE__ */ o(mr, {}) }),
1766
+ /* @__PURE__ */ o(F, { path: "/workspaces/new", element: /* @__PURE__ */ o(xr, {}) }),
1767
+ /* @__PURE__ */ o(F, { path: "/invite", element: /* @__PURE__ */ o(vr, {}) }),
1768
+ /* @__PURE__ */ o(F, { path: "/account", element: /* @__PURE__ */ o(br, {}) }),
1769
+ /* @__PURE__ */ o(F, { path: "/workspaces/:workspaceId/*", element: /* @__PURE__ */ o(It, {}) }),
1770
+ qt(),
1771
+ /* @__PURE__ */ o(F, { path: "*", element: /* @__PURE__ */ o(ze, { to: "/", replace: !0 }) })
1772
+ ] }) }) }) }) : /* @__PURE__ */ o(ur, {});
1752
1773
  }
1753
1774
  export {
1754
- Pr as A,
1755
- pr as L,
1756
- hr as a,
1757
- kr as i
1775
+ jr as A,
1776
+ gr as L,
1777
+ pr as a,
1778
+ Sr as i
1758
1779
  };