@photon-ai/pho-ui 2.13.0 → 2.15.0

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 (70) hide show
  1. package/dist/chunks/IconChevronRight-CzoJnYNI.js +11 -0
  2. package/dist/chunks/IconChevronRight-CzoJnYNI.js.map +1 -0
  3. package/dist/chunks/{basic-page-CJwG4I83.js → basic-page-CVZT_zaH.js} +619 -614
  4. package/dist/chunks/basic-page-CVZT_zaH.js.map +1 -0
  5. package/dist/chunks/code-block-CdozzaHM.js +139 -0
  6. package/dist/chunks/code-block-CdozzaHM.js.map +1 -0
  7. package/dist/chunks/combobox-D4LiGJB2.js +136 -0
  8. package/dist/chunks/combobox-D4LiGJB2.js.map +1 -0
  9. package/dist/chunks/command-Ck8IAgV7.js +192 -0
  10. package/dist/chunks/command-Ck8IAgV7.js.map +1 -0
  11. package/dist/chunks/copy-button-B_B15mEi.js +56 -0
  12. package/dist/chunks/copy-button-B_B15mEi.js.map +1 -0
  13. package/dist/chunks/description-list-C-mwe4ki.js +59 -0
  14. package/dist/chunks/description-list-C-mwe4ki.js.map +1 -0
  15. package/dist/chunks/filter-bar-Cjjq38xo.js +259 -0
  16. package/dist/chunks/filter-bar-Cjjq38xo.js.map +1 -0
  17. package/dist/chunks/log-list-0AXnjFrk.js +244 -0
  18. package/dist/chunks/log-list-0AXnjFrk.js.map +1 -0
  19. package/dist/chunks/toggle-o84tawXy.js +33 -0
  20. package/dist/chunks/toggle-o84tawXy.js.map +1 -0
  21. package/dist/chunks/tooltip-BTF7GChl.js +32 -0
  22. package/dist/chunks/tooltip-BTF7GChl.js.map +1 -0
  23. package/dist/chunks/trace-CbH0IohX.js +314 -0
  24. package/dist/chunks/trace-CbH0IohX.js.map +1 -0
  25. package/dist/chunks/use-copy-D6JwKUll.js +25 -0
  26. package/dist/chunks/use-copy-D6JwKUll.js.map +1 -0
  27. package/dist/components/code-block.js +6 -0
  28. package/dist/components/combobox.js +1 -1
  29. package/dist/components/command.js +3 -189
  30. package/dist/components/copy-button.js +6 -0
  31. package/dist/components/description-list.js +5 -0
  32. package/dist/components/filter-bar.js +8 -0
  33. package/dist/components/log-list.js +8 -0
  34. package/dist/components/phone-input.js +1 -1
  35. package/dist/components/toggle.js +3 -30
  36. package/dist/components/tooltip.js +2 -29
  37. package/dist/components/trace.js +9 -0
  38. package/dist/index.js +122 -96
  39. package/dist/primitives.js +2 -2
  40. package/dist/sections/basic-page.js +17 -17
  41. package/dist/src/components/accordion/index.d.ts +1 -1
  42. package/dist/src/components/code-block/code-block.d.ts +43 -0
  43. package/dist/src/components/code-block/index.d.ts +2 -0
  44. package/dist/src/components/code-block/tokenize-json.d.ts +12 -0
  45. package/dist/src/components/combobox/combobox.d.ts +30 -4
  46. package/dist/src/components/combobox/index.d.ts +1 -1
  47. package/dist/src/components/copy-button/copy-button.d.ts +49 -0
  48. package/dist/src/components/copy-button/index.d.ts +1 -0
  49. package/dist/src/components/description-list/description-list.d.ts +60 -0
  50. package/dist/src/components/description-list/index.d.ts +1 -0
  51. package/dist/src/components/filter-bar/filter-bar.d.ts +101 -0
  52. package/dist/src/components/filter-bar/index.d.ts +1 -0
  53. package/dist/src/components/log-list/index.d.ts +1 -0
  54. package/dist/src/components/log-list/log-list.d.ts +136 -0
  55. package/dist/src/components/trace/index.d.ts +2 -0
  56. package/dist/src/components/trace/layout.d.ts +48 -0
  57. package/dist/src/components/trace/trace.d.ts +53 -0
  58. package/dist/src/index.d.ts +6 -0
  59. package/dist/src/sections/basic-page/basic-page.d.ts +34 -24
  60. package/dist/src/utils/index.d.ts +1 -0
  61. package/dist/src/utils/use-copy.d.ts +14 -0
  62. package/dist/utils.js +6 -3
  63. package/package.json +25 -1
  64. package/src/styles/theme.css +30 -0
  65. package/dist/chunks/basic-page-CJwG4I83.js.map +0 -1
  66. package/dist/chunks/combobox-Dj5m_dDd.js +0 -117
  67. package/dist/chunks/combobox-Dj5m_dDd.js.map +0 -1
  68. package/dist/components/command.js.map +0 -1
  69. package/dist/components/toggle.js.map +0 -1
  70. package/dist/components/tooltip.js.map +0 -1
@@ -1,36 +1,33 @@
1
1
  "use client";
2
2
  import { t as p } from "./cn-ChIgwEl3.js";
3
- import { n as Me } from "./link-provider-DXzDQ08N.js";
4
- import { FADE_ENTRANCE as rt, FADE_SWAP as it, SPRING_ENTRANCE as st, TRAVEL_LINEAR as lt, fadeThroughBlur as ee } from "../motion.js";
3
+ import { n as De } from "./link-provider-DXzDQ08N.js";
4
+ import { FADE_ENTRANCE as it, FADE_SWAP as st, SPRING_ENTRANCE as lt, TRAVEL_LINEAR as ot, fadeThroughBlur as ee } from "../motion.js";
5
5
  import { a as ie, o as pe } from "./button-CdqS_t5a.js";
6
- import { t as ot } from "./createReactComponent-BqCmnqfX.js";
7
6
  import { t as ct } from "./error-D0yoFxCv.js";
8
- import { t as ne } from "./IconChevronLeft-CSWMKQ4C.js";
9
- import { a as fe, i as ut, n as dt, r as pt, s as ft } from "./data-table-CHLJfGkS.js";
7
+ import { t as ae } from "./IconChevronLeft-CSWMKQ4C.js";
8
+ import { t as ut } from "./IconChevronRight-CzoJnYNI.js";
9
+ import { a as fe, i as dt, n as pt, r as ft, s as mt } from "./data-table-CHLJfGkS.js";
10
10
  import { t as Ee } from "./IconSearch-BKAHkLyX.js";
11
- import { t as mt } from "./IconX-pZ9vrtSr.js";
12
- import { t as ht } from "./toast-iSf6NuAS.js";
11
+ import { t as ht } from "./IconX-pZ9vrtSr.js";
12
+ import { t as gt } from "./toast-iSf6NuAS.js";
13
13
  import { t as le } from "./input-group-fc9_jD4d.js";
14
- import { t as gt } from "./animated-height-CCO-Ocoz.js";
15
- import { n as De, t as Q } from "./scroll-area-BO-9PMM7.js";
16
- import { i as vt } from "./checkbox-CLPmblNA.js";
17
- import { t as bt } from "./form-AiHbbw4m.js";
14
+ import { t as bt } from "./animated-height-CCO-Ocoz.js";
15
+ import { n as He, t as Q } from "./scroll-area-BO-9PMM7.js";
16
+ import { i as yt } from "./checkbox-CLPmblNA.js";
17
+ import { t as vt } from "./form-AiHbbw4m.js";
18
18
  import { i as W } from "./menu-BQeprfxB.js";
19
- import { Children as Y, Fragment as yt, createContext as z, isValidElement as He, useCallback as Fe, useContext as R, useEffect as O, useId as xt, useLayoutEffect as V, useMemo as $, useRef as E, useState as w, useSyncExternalStore as me } from "react";
20
- import { Fragment as he, jsx as t, jsxs as y } from "react/jsx-runtime";
21
- import { AnimatePresence as G, motion as N, useIsPresent as wt, useReducedMotion as L } from "motion/react";
19
+ import { Children as Y, Fragment as xt, createContext as z, isValidElement as Fe, useCallback as Ge, useContext as T, useEffect as L, useId as wt, useLayoutEffect as V, useMemo as $, useRef as _, useState as x, useSyncExternalStore as me } from "react";
20
+ import { Fragment as he, jsx as t, jsxs as v } from "react/jsx-runtime";
21
+ import { AnimatePresence as G, motion as N, useIsPresent as Nt, useReducedMotion as B } from "motion/react";
22
22
  import { Dialog as te } from "@base-ui/react/dialog";
23
23
  import { createPortal as Ce } from "react-dom";
24
- var Nt = [["path", {
25
- d: "M9 6l6 6l-6 6",
26
- key: "svg-0"
27
- }]], At = ot("outline", "chevron-right", "ChevronRight", Nt), ge = "rounded-base border border-pho-secondary bg-pho-primary", ae = "divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0", Ge = `${ge} ${ae}`, _e = "flex min-w-0 flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5", Et = "flex min-h-[4.25rem] min-w-0 flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6", Ct = "flex flex-col gap-3 px-5 py-4", _t = "-mx-5 -mb-4 flex items-center rounded-b-[calc(0.75rem-1px)] bg-pho-secondary py-1 pr-3 pl-5", kt = "-mx-2 -mt-1.5 flex items-center rounded-sm bg-pho-secondary px-2 py-0.5", T = st, M = rt, j = 12, St = 768;
28
- function Rt(e) {
24
+ var ge = "rounded-base border border-pho-secondary bg-pho-primary", ne = "divide-y divide-pho-secondary [&>:has(+[data-basic-page-alert])]:border-b-0", ze = `${ge} ${ne}`, Se = "flex min-w-0 flex-col gap-3 rounded-base border border-pho-secondary bg-pho-page p-5", At = "flex min-h-[4.25rem] min-w-0 flex-col gap-3 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6", _t = "flex flex-col gap-3 px-5 py-4", Et = "-mx-5 -mb-4 flex items-center rounded-b-[calc(0.75rem-1px)] bg-pho-secondary py-1 pr-3 pl-5", Ct = "-mx-2 -mt-1.5 flex items-center rounded-sm bg-pho-secondary px-2 py-0.5", P = lt, M = it, q = 12, St = 768;
25
+ function kt(e) {
29
26
  return Math.round(Math.min(Math.max(e * 0.4, 320), 448));
30
27
  }
31
- var ze = z(null), Ve = z(null);
28
+ var Ve = z(null), $e = z(null);
32
29
  function Tt(e) {
33
- const [n, a] = w(null), [r, s] = w(!1), [l, c] = w(!1), [o, i] = w(() => ({
30
+ const [a, n] = x(null), [r, s] = x(!1), [l, o] = x(!1), [c, i] = x(() => ({
34
31
  width: typeof window > "u" ? 0 : window.innerWidth,
35
32
  height: null
36
33
  }));
@@ -38,10 +35,10 @@ function Tt(e) {
38
35
  const d = e.current;
39
36
  if (!r || d == null) return;
40
37
  const f = we(d), u = () => {
41
- const h = d.offsetWidth, v = f?.clientHeight ?? null;
42
- i((g) => g.width === h && g.height === v ? g : {
38
+ const h = d.offsetWidth, b = f?.clientHeight ?? null;
39
+ i((g) => g.width === h && g.height === b ? g : {
43
40
  width: h,
44
- height: v
41
+ height: b
45
42
  });
46
43
  };
47
44
  if (u(), typeof ResizeObserver > "u") return;
@@ -49,74 +46,74 @@ function Tt(e) {
49
46
  return m.observe(d), f != null && m.observe(f), () => m.disconnect();
50
47
  }, [e, r]), {
51
48
  host: $(() => ({
52
- slot: n,
53
- presentation: o.width >= St ? "panel" : "page",
54
- width: Rt(o.width),
55
- paneHeight: o.height,
56
- setOpen: c,
49
+ slot: a,
50
+ presentation: c.width >= St ? "panel" : "page",
51
+ width: kt(c.width),
52
+ paneHeight: c.height,
53
+ setOpen: o,
57
54
  setPresent: s
58
- }), [n, o]),
59
- setSlot: a,
55
+ }), [a, c]),
56
+ setSlot: n,
60
57
  open: l
61
58
  };
62
59
  }
63
- function Pt(e) {
60
+ function Rt(e) {
64
61
  return e == null ? window.scrollY : e.scrollTop;
65
62
  }
66
- function ke(e, n) {
67
- e == null ? window.scrollTo({ top: n }) : e.scrollTop = n;
63
+ function ke(e, a) {
64
+ e == null ? window.scrollTo({ top: a }) : e.scrollTop = a;
68
65
  }
69
- function It({ condense: e = !0, width: n, className: a, children: r, ref: s, ...l }) {
70
- const c = R(se)?.adopt ?? !1, o = R(Ve), [i, d] = w(!1), f = E(0), u = Fe((H) => {
66
+ function Pt({ condense: e = !0, width: a, className: n, children: r, ref: s, ...l }) {
67
+ const o = T(se)?.adopt ?? !1, c = T($e), [i, d] = x(!1), f = _(0), u = Ge((H) => {
71
68
  f.current += H ? 1 : -1, d(f.current > 0);
72
- }, []), m = n === "wide" || n == null && i, [h] = w(ft), v = E(null), [g, C] = w(null), [b, k] = w(null), x = $(() => ({
73
- setTitle: C,
74
- setTail: k
69
+ }, []), m = a === "wide" || a == null && i, [h] = x(mt), b = _(null), [g, E] = x(null), [y, C] = x(null), w = $(() => ({
70
+ setTitle: E,
71
+ setTail: C
75
72
  }), []);
76
- O(() => {
77
- if (o != null)
78
- return o.setBack(b), () => o.setBack(null);
79
- }, [o, b]);
80
- const { host: _, setSlot: P, open: B } = Tt(v), I = B && _.presentation === "page", D = E(!1), q = E(0);
73
+ L(() => {
74
+ if (c != null)
75
+ return c.setBack(y), () => c.setBack(null);
76
+ }, [c, y]);
77
+ const { host: S, setSlot: O, open: R } = Tt(b), I = R && S.presentation === "page", D = _(!1), j = _(0);
81
78
  V(() => {
82
- const H = v.current;
79
+ const H = b.current;
83
80
  if (I === D.current || H == null) return;
84
81
  D.current = I;
85
82
  const A = we(H);
86
- I ? (q.current = Pt(A), ke(A, 0)) : ke(A, q.current);
83
+ I ? (j.current = Rt(A), ke(A, 0)) : ke(A, j.current);
87
84
  }, [I]);
88
- const U = e ? /* @__PURE__ */ t(Ot, {
85
+ const U = e ? /* @__PURE__ */ t(It, {
89
86
  title: g,
90
- tail: o == null ? b : null,
91
- silent: I || o != null
87
+ tail: c == null ? y : null,
88
+ silent: I || c != null
92
89
  }) : null, J = /* @__PURE__ */ t("div", {
93
90
  "data-basic-page-column": "",
94
- className: p("mx-auto flex w-full min-w-0 flex-1 flex-col px-5 pt-12 pb-12 *:min-w-0", m ? "max-w-[84rem] md:px-8" : "max-w-[44.5rem]", c || o != null ? "[&_[data-basic-page-back]]:hidden" : "has-[[data-basic-page-back]]:pt-16"),
95
- children: e ? /* @__PURE__ */ t(be.Provider, {
96
- value: x,
91
+ className: p("mx-auto flex w-full min-w-0 flex-1 flex-col px-5 pt-12 pb-12 *:min-w-0", m ? "max-w-[84rem] md:px-8" : "max-w-[44.5rem]", o || c != null ? "[&_[data-basic-page-back]]:hidden" : "has-[[data-basic-page-back]]:pt-16"),
92
+ children: e ? /* @__PURE__ */ t(ye.Provider, {
93
+ value: w,
97
94
  children: r
98
95
  }) : r
99
96
  });
100
97
  return /* @__PURE__ */ t("div", {
101
98
  "data-basic-page-root": "",
102
99
  "data-basic-page-width": m ? "wide" : void 0,
103
- className: p("relative flex min-h-full w-full min-w-0 flex-row", a),
100
+ className: p("relative flex min-h-full w-full min-w-0 flex-row", n),
104
101
  ...l,
105
102
  ref: (H) => {
106
- v.current = H, typeof s == "function" ? s(H) : s != null && (s.current = H);
103
+ b.current = H, typeof s == "function" ? s(H) : s != null && (s.current = H);
107
104
  },
108
- children: /* @__PURE__ */ t(ze.Provider, {
109
- value: _,
110
- children: /* @__PURE__ */ t(ut.Provider, {
105
+ children: /* @__PURE__ */ t(Ve.Provider, {
106
+ value: S,
107
+ children: /* @__PURE__ */ t(dt.Provider, {
111
108
  value: u,
112
- children: /* @__PURE__ */ y(fe.Provider, {
109
+ children: /* @__PURE__ */ v(fe.Provider, {
113
110
  value: h,
114
- children: [/* @__PURE__ */ y("div", {
111
+ children: [/* @__PURE__ */ v("div", {
115
112
  "data-basic-page-main": "",
116
113
  className: p("flex min-w-0 flex-1 flex-col", I && "hidden"),
117
114
  children: [U, J]
118
115
  }), /* @__PURE__ */ t("div", {
119
- ref: P,
116
+ ref: O,
120
117
  className: "contents"
121
118
  })]
122
119
  })
@@ -124,43 +121,43 @@ function It({ condense: e = !0, width: n, className: a, children: r, ref: s, ...
124
121
  })
125
122
  });
126
123
  }
127
- function Ot({ title: e, tail: n, silent: a = !1 }) {
128
- const r = L(), [s, l] = w(!1), c = R(se), o = xt();
129
- O(() => {
130
- if (c != null) {
131
- if (a) {
132
- c.store.clear(o);
124
+ function It({ title: e, tail: a, silent: n = !1 }) {
125
+ const r = B(), [s, l] = x(!1), o = T(se), c = wt();
126
+ L(() => {
127
+ if (o != null) {
128
+ if (n) {
129
+ o.store.clear(c);
133
130
  return;
134
131
  }
135
- c.store.set(o, {
132
+ o.store.set(c, {
136
133
  condensed: s,
137
134
  title: e?.label ?? null,
138
- back: n
135
+ back: a
139
136
  });
140
137
  }
141
138
  }, [
142
- c,
143
139
  o,
140
+ c,
144
141
  s,
145
142
  e,
146
- n,
147
- a
148
- ]), O(() => {
149
- if (c != null)
150
- return () => c.store.clear(o);
151
- }, [c, o]);
143
+ a,
144
+ n
145
+ ]), L(() => {
146
+ if (o != null)
147
+ return () => o.store.clear(c);
148
+ }, [o, c]);
152
149
  const i = e?.el ?? null;
153
- return O(() => {
150
+ return L(() => {
154
151
  if (i == null || typeof IntersectionObserver > "u") return;
155
152
  const d = new IntersectionObserver(([f]) => l(f != null && !f.isIntersecting), { root: we(i) });
156
153
  return d.observe(i), () => d.disconnect();
157
154
  }, [i]), /* @__PURE__ */ t("div", {
158
155
  "data-basic-page-condense": "",
159
156
  className: "sticky top-0 z-20 h-0 overflow-visible",
160
- children: /* @__PURE__ */ t(G, { children: s && !(c?.adopt ?? !1) && /* @__PURE__ */ y(N.div, {
157
+ children: /* @__PURE__ */ t(G, { children: s && !(o?.adopt ?? !1) && /* @__PURE__ */ v(N.div, {
161
158
  initial: {
162
159
  opacity: 0,
163
- y: r ? 0 : Pe
160
+ y: r ? 0 : Ie
164
161
  },
165
162
  animate: {
166
163
  opacity: 1,
@@ -168,26 +165,26 @@ function Ot({ title: e, tail: n, silent: a = !1 }) {
168
165
  },
169
166
  exit: {
170
167
  opacity: 0,
171
- y: r ? 0 : Pe
168
+ y: r ? 0 : Ie
172
169
  },
173
170
  transition: {
174
171
  ...xe,
175
- y: jt
172
+ y: $t
176
173
  },
177
174
  className: "border-pho-secondary bg-pho-page/85 relative grid h-12 grid-cols-[1fr_minmax(0,auto)_1fr] items-center border-b px-3 backdrop-blur",
178
175
  children: [/* @__PURE__ */ t("div", {
179
176
  className: "flex min-w-0 items-center justify-start",
180
- children: n != null && /* @__PURE__ */ t(pe, {
177
+ children: a != null && /* @__PURE__ */ t(pe, {
181
178
  variant: "ghost",
182
179
  size: "sm",
183
- href: n.href,
184
- onClick: n.onClick,
180
+ href: a.href,
181
+ onClick: a.onClick,
185
182
  prefix: /* @__PURE__ */ t("span", {
186
183
  className: "inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0",
187
- children: /* @__PURE__ */ t(ne, {})
184
+ children: /* @__PURE__ */ t(ae, {})
188
185
  }),
189
186
  className: "min-w-max",
190
- children: n.label
187
+ children: a.label
191
188
  })
192
189
  }), /* @__PURE__ */ t("span", {
193
190
  className: "text-pho-primary block max-w-full min-w-0 truncate text-center text-base font-medium",
@@ -196,111 +193,111 @@ function Ot({ title: e, tail: n, silent: a = !1 }) {
196
193
  }) })
197
194
  });
198
195
  }
199
- function Lt(e) {
196
+ function Ot(e) {
200
197
  return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
201
198
  }
202
- function Bt(e) {
199
+ function Lt(e) {
203
200
  if (!(typeof e != "string" && typeof e != "number"))
204
- return Lt(String(e)) || void 0;
201
+ return Ot(String(e)) || void 0;
205
202
  }
206
- function ve(e, n) {
203
+ function be(e, a) {
207
204
  if (e !== "")
208
- return e ?? Bt(n);
205
+ return e ?? Lt(a);
209
206
  }
210
- var Mt = (e) => `basic-page-morph-${e}`, Dt = { layout: T }, Se = 10, Re = {
207
+ var Bt = (e) => `basic-page-morph-${e}`, Mt = { layout: P }, Te = 10, Re = {
211
208
  delay: 0.2,
212
209
  duration: 0.12,
213
210
  ease: "easeOut"
214
- }, Ht = {
211
+ }, Dt = {
215
212
  duration: 0.18,
216
213
  ease: "easeOut"
217
- }, Ft = -8, Gt = {
214
+ }, Ht = -8, Ft = {
218
215
  duration: 0.16,
219
216
  ease: "easeOut"
220
- }, zt = {
217
+ }, Gt = {
221
218
  delay: 0.14,
222
219
  duration: 0.16,
223
220
  ease: "easeOut"
224
- }, $e = {
221
+ }, qe = {
225
222
  duration: 0.12,
226
223
  ease: "easeOut"
227
224
  }, K = [];
228
- function Vt(e) {
229
- const n = E({ labels: e });
230
- n.current.labels = e, V(() => {
231
- const a = n.current;
232
- return K.push(a), () => {
233
- K.splice(K.indexOf(a), 1);
225
+ function zt(e) {
226
+ const a = _({ labels: e });
227
+ a.current.labels = e, V(() => {
228
+ const n = a.current;
229
+ return K.push(n), () => {
230
+ K.splice(K.indexOf(n), 1);
234
231
  };
235
232
  }, []);
236
233
  }
237
234
  function je() {
238
- const [e] = w(() => {
239
- const n = K[K.length - 1];
240
- return n ? { labels: [...n.labels] } : null;
235
+ const [e] = x(() => {
236
+ const a = K[K.length - 1];
237
+ return a ? { labels: [...a.labels] } : null;
241
238
  });
242
239
  return e;
243
240
  }
244
- var be = z(null), ue = {
241
+ var ye = z(null), ue = {
245
242
  condensed: !1,
246
243
  title: null,
247
244
  back: null
248
- }, se = z(null), ye = () => () => {
249
- }, Te = () => ue;
250
- function $t({ adopt: e = !0, children: n }) {
251
- const [a] = w(() => {
245
+ }, se = z(null), ve = () => () => {
246
+ }, Pe = () => ue;
247
+ function Vt({ adopt: e = !0, children: a }) {
248
+ const [n] = x(() => {
252
249
  let s = ue, l = null;
253
- const c = /* @__PURE__ */ new Set(), o = () => {
254
- for (const i of c) i();
250
+ const o = /* @__PURE__ */ new Set(), c = () => {
251
+ for (const i of o) i();
255
252
  };
256
253
  return {
257
254
  get: () => s,
258
255
  set(i, d) {
259
- l = i, s = d, o();
256
+ l = i, s = d, c();
260
257
  },
261
258
  clear(i) {
262
- l === i && (l = null, s = ue, o());
259
+ l === i && (l = null, s = ue, c());
263
260
  },
264
261
  subscribe(i) {
265
- return c.add(i), () => c.delete(i);
262
+ return o.add(i), () => o.delete(i);
266
263
  }
267
264
  };
268
265
  }), r = $(() => ({
269
- store: a,
266
+ store: n,
270
267
  adopt: e
271
- }), [a, e]);
268
+ }), [n, e]);
272
269
  return /* @__PURE__ */ t(se.Provider, {
273
270
  value: r,
274
- children: n
271
+ children: a
275
272
  });
276
273
  }
277
- function fa() {
278
- const e = R(se);
279
- return me(e?.store.subscribe ?? ye, e?.store.get ?? Te, e?.store.get ?? Te);
274
+ function fn() {
275
+ const e = T(se);
276
+ return me(e?.store.subscribe ?? ve, e?.store.get ?? Pe, e?.store.get ?? Pe);
280
277
  }
281
- var xe = it, jt = lt, Pe = -8;
278
+ var xe = st, $t = ot, Ie = -8;
282
279
  function we(e) {
283
280
  if (typeof getComputedStyle != "function") return null;
284
- for (let n = e.parentElement; n != null && n !== document.body; n = n.parentElement) {
285
- const { overflowY: a } = getComputedStyle(n);
286
- if (a === "auto" || a === "scroll") return n;
281
+ for (let a = e.parentElement; a != null && a !== document.body; a = a.parentElement) {
282
+ const { overflowY: n } = getComputedStyle(a);
283
+ if (n === "auto" || n === "scroll") return a;
287
284
  }
288
285
  return null;
289
286
  }
290
287
  var oe = /* @__PURE__ */ new Map(), qt = 96;
291
- function Wt(e) {
292
- const n = e.closest("[data-basic-page-root]"), a = n?.querySelector("[data-basic-page-column]");
293
- return !n || !a ? 0 : a.getBoundingClientRect().left - n.getBoundingClientRect().left;
288
+ function jt(e) {
289
+ const a = e.closest("[data-basic-page-root]"), n = a?.querySelector("[data-basic-page-column]");
290
+ return !a || !n ? 0 : n.getBoundingClientRect().left - a.getBoundingClientRect().left;
294
291
  }
295
- function qe(e) {
296
- const [n] = w(() => {
292
+ function We(e) {
293
+ const [a] = x(() => {
297
294
  if (e == null) return !1;
298
295
  const r = oe.get(e);
299
- return r != null && r.visible && r.el.isConnected && Wt(r.el) <= qt;
300
- }), a = E(null);
301
- return O(() => {
296
+ return r != null && r.visible && r.el.isConnected && jt(r.el) <= qt;
297
+ }), n = _(null);
298
+ return L(() => {
302
299
  if (e == null || typeof IntersectionObserver > "u") return;
303
- const r = a.current;
300
+ const r = n.current;
304
301
  if (!r) return;
305
302
  const s = new IntersectionObserver(([l]) => {
306
303
  l && oe.set(e, {
@@ -312,11 +309,11 @@ function qe(e) {
312
309
  s.disconnect(), oe.delete(e);
313
310
  };
314
311
  }, [e]), {
315
- fly: n,
316
- ref: a
312
+ fly: a,
313
+ ref: n
317
314
  };
318
315
  }
319
- var Kt = {
316
+ var Wt = {
320
317
  fade: {
321
318
  initial: { opacity: 0 },
322
319
  animate: { opacity: 1 },
@@ -325,114 +322,115 @@ var Kt = {
325
322
  rise: {
326
323
  initial: {
327
324
  opacity: 0,
328
- y: j
325
+ y: q
329
326
  },
330
327
  animate: {
331
328
  opacity: 1,
332
329
  y: 0
333
330
  },
334
331
  transition: {
335
- y: T,
332
+ y: P,
336
333
  opacity: M
337
334
  }
338
335
  },
339
336
  slide: {
340
337
  initial: { x: "-100%" },
341
338
  animate: { x: 0 },
342
- transition: { x: zt }
339
+ transition: { x: Gt }
343
340
  }
344
341
  };
345
- function We({ morphId: e, fromClassName: n, fly: a, morphRef: r, arrival: s, className: l, children: c }) {
346
- const [o, i] = w(!1), d = !a && s != null ? Kt[s] : null;
347
- return /* @__PURE__ */ y(N.span, {
342
+ function Ke({ morphId: e, fromClassName: a, fly: n, morphRef: r, arrival: s, className: l, children: o }) {
343
+ const [c, i] = x(!1), d = !n && s != null ? Wt[s] : null;
344
+ return /* @__PURE__ */ v(N.span, {
348
345
  ref: r,
349
- layoutId: Mt(e),
346
+ layoutId: Bt(e),
350
347
  initial: d?.initial,
351
348
  animate: d?.animate,
352
- transition: a ? Dt : {
349
+ transition: n ? Mt : {
353
350
  layout: { duration: 0 },
354
351
  ...d?.transition
355
352
  },
356
353
  onLayoutAnimationStart: () => {
357
- a && i(!0);
354
+ n && i(!0);
358
355
  },
359
356
  onLayoutAnimationComplete: () => i(!1),
360
357
  className: p("relative inline-block", l),
361
- children: [c, o && /* @__PURE__ */ t(N.span, {
358
+ children: [o, c && /* @__PURE__ */ t(N.span, {
362
359
  "aria-hidden": !0,
363
360
  initial: { opacity: 1 },
364
361
  animate: { opacity: 0 },
365
- transition: Ht,
362
+ transition: Dt,
366
363
  onAnimationComplete: () => i(!1),
367
- className: p("absolute inset-0", n),
368
- children: c
364
+ className: p("absolute inset-0", a),
365
+ children: o
369
366
  })]
370
367
  });
371
368
  }
372
- var Ie = "max-w-full min-w-0 truncate align-top";
373
- function Xt({ id: e, morphId: n, enter: a, trailing: r, className: s, children: l, ...c }) {
374
- const o = ve(e, l), i = L(), d = qe(n), f = je(), u = !i && (n != null || a === !0), m = a || f != null ? "rise" : void 0, h = R(be), v = E(null);
369
+ var Oe = "max-w-full min-w-0 truncate align-top";
370
+ function Kt({ id: e, morphId: a, enter: n, trailing: r, className: s, children: l, ...o }) {
371
+ const c = be(e, l), i = B(), d = Ae(n === !0), f = We(a), u = je(), m = !i && (a != null || d === !0), h = d || u != null ? "rise" : void 0, b = T(ye), g = _(null);
375
372
  V(() => {
376
- if (h != null)
377
- return h.setTitle({
373
+ if (b != null)
374
+ return b.setTitle({
378
375
  label: l,
379
- el: v.current
380
- }), () => h.setTitle(null);
381
- }, [h, l]);
382
- const [g, C] = w(d.fly && f != null);
376
+ el: g.current
377
+ }), () => b.setTitle(null);
378
+ }, [b, l]);
379
+ const [E, y] = x(f.fly && u != null);
383
380
  V(() => {
384
- K.length > 0 && C(!1);
381
+ K.length > 0 && y(!1);
385
382
  }, []);
386
- const b = r != null && r !== !1, k = !i && (n != null ? d.fly || m != null : a === !0), x = n != null && !i ? /* @__PURE__ */ t(We, {
387
- morphId: n,
383
+ const C = r != null && r !== !1, w = !i && (a != null ? f.fly || h != null : d === !0), S = a != null && !i ? /* @__PURE__ */ t(Ke, {
384
+ morphId: a,
388
385
  fromClassName: "text-pho-secondary",
389
- fly: d.fly,
390
- morphRef: d.ref,
391
- arrival: m,
392
- className: Ie,
386
+ fly: f.fly,
387
+ morphRef: f.ref,
388
+ arrival: h,
389
+ className: Oe,
393
390
  children: l
394
- }) : a && !i ? /* @__PURE__ */ t(N.span, {
391
+ }) : d && !i ? /* @__PURE__ */ t(N.span, {
395
392
  initial: {
396
393
  opacity: 0,
397
- y: j
394
+ y: q
398
395
  },
399
396
  animate: {
400
397
  opacity: 1,
401
398
  y: 0
402
399
  },
403
400
  transition: {
404
- y: T,
401
+ y: P,
405
402
  opacity: M
406
403
  },
407
- className: p("inline-block", Ie),
404
+ className: p("inline-block", Oe),
408
405
  children: l
409
- }) : b ? /* @__PURE__ */ t("span", {
406
+ }) : C ? /* @__PURE__ */ t("span", {
410
407
  className: "min-w-0 truncate",
411
408
  children: l
412
409
  }) : l;
413
- return /* @__PURE__ */ y("h1", {
414
- id: o,
415
- className: p("text-display-base text-pho-primary max-w-full min-w-0 scroll-mt-12 px-5 font-medium", u ? "whitespace-nowrap" : "truncate", s),
416
- ...c,
417
- ref: (_) => {
418
- v.current = _;
419
- const P = c.ref;
420
- typeof P == "function" ? P(_) : P != null && (P.current = _);
410
+ return /* @__PURE__ */ v("h1", {
411
+ id: c,
412
+ "data-basic-page-title": "",
413
+ className: p("text-display-base text-pho-primary max-w-full min-w-0 scroll-mt-12 px-5 font-medium", m ? "whitespace-nowrap" : "truncate", s),
414
+ ...o,
415
+ ref: (O) => {
416
+ g.current = O;
417
+ const R = o.ref;
418
+ typeof R == "function" ? R(O) : R != null && (R.current = O);
421
419
  },
422
- children: [b ? /* @__PURE__ */ y("span", {
420
+ children: [C ? /* @__PURE__ */ v("span", {
423
421
  className: "flex max-w-full min-w-0 items-center gap-2",
424
- children: [x, k ? /* @__PURE__ */ t(N.span, {
422
+ children: [S, w ? /* @__PURE__ */ t(N.span, {
425
423
  "data-basic-page-title-trailing": "",
426
424
  initial: {
427
425
  opacity: 0,
428
- y: j
426
+ y: q
429
427
  },
430
428
  animate: {
431
429
  opacity: 1,
432
430
  y: 0
433
431
  },
434
432
  transition: {
435
- y: T,
433
+ y: P,
436
434
  opacity: M
437
435
  },
438
436
  className: "shrink-0",
@@ -442,205 +440,212 @@ function Xt({ id: e, morphId: n, enter: a, trailing: r, className: s, children:
442
440
  className: "shrink-0",
443
441
  children: r
444
442
  })]
445
- }) : x, g && /* @__PURE__ */ t(N.span, {
443
+ }) : S, E && /* @__PURE__ */ t(N.span, {
446
444
  "aria-hidden": !0,
447
445
  initial: { opacity: 1 },
448
446
  animate: { opacity: 0 },
449
- transition: $e,
450
- onAnimationComplete: () => C(!1),
451
- className: p("text-pho-secondary pointer-events-none absolute inline-flex items-center", Tn),
452
- children: /* @__PURE__ */ t(ne, {})
447
+ transition: qe,
448
+ onAnimationComplete: () => y(!1),
449
+ className: p("text-pho-secondary pointer-events-none absolute inline-flex items-center", Ta),
450
+ children: /* @__PURE__ */ t(ae, {})
453
451
  })]
454
452
  });
455
453
  }
456
- var Ke = z(!1);
457
- function Qt() {
458
- const e = R(Ke), n = L(), [a] = w(() => e && !n);
459
- return a;
454
+ var Xe = z(!1);
455
+ function Xt() {
456
+ const e = T(Xe), a = B(), [n] = x(() => e && !a);
457
+ return n;
460
458
  }
461
- var Yt = {
459
+ var Qt = {
462
460
  height: 0,
463
461
  opacity: 0,
464
462
  paddingTop: 0,
465
463
  paddingBottom: 0,
466
464
  borderTopWidth: 0
467
- }, Ut = {
468
- y: T,
465
+ }, Yt = {
466
+ y: P,
469
467
  opacity: M,
470
- height: T,
471
- paddingTop: T,
472
- paddingBottom: T,
473
- borderTopWidth: T
468
+ height: P,
469
+ paddingTop: P,
470
+ paddingBottom: P,
471
+ borderTopWidth: P
474
472
  };
475
473
  function Ne() {
476
- const e = Qt(), n = wt(), a = L();
474
+ const e = Xt(), a = Nt(), n = B();
477
475
  return {
478
476
  initial: e ? {
479
477
  opacity: 0,
480
- y: j
478
+ y: q
481
479
  } : !1,
482
480
  animate: {
483
481
  opacity: 1,
484
482
  y: 0
485
483
  },
486
- exit: Yt,
487
- transition: a ? { duration: 0 } : Ut,
488
- leaving: !n
484
+ exit: Qt,
485
+ transition: n ? { duration: 0 } : Yt,
486
+ leaving: !a
489
487
  };
490
488
  }
491
- var Jt = typeof process < "u" && process.env.NODE_ENV !== "production";
492
- function Xe(e, n, a, r) {
493
- O(() => {
494
- if (!Jt || e.current == null || typeof getComputedStyle != "function") return;
495
- const s = (c) => {
496
- const o = getComputedStyle(c).rowGap;
497
- return o === "" || o === "normal" ? null : parseFloat(o);
489
+ var Ut = typeof process < "u" && process.env.NODE_ENV !== "production";
490
+ function Qe(e, a, n, r) {
491
+ L(() => {
492
+ if (!Ut || e.current == null || typeof getComputedStyle != "function") return;
493
+ const s = (o) => {
494
+ const c = getComputedStyle(o).rowGap;
495
+ return c === "" || c === "normal" ? null : parseFloat(c);
498
496
  }, l = s(e.current);
499
- l != null && l !== a && console.warn(`[BasicPage.${n}] spaced at ${l}px instead of ${a}px. Spacing is the system's: Stack gap-10 between blocks, a block gap-3, Fields gap-5. Remove the class and move the wrapper instead.`, e.current);
500
- for (const c of Array.from(e.current.children)) {
501
- const o = r(c);
502
- if (o == null || getComputedStyle(c).display === "contents") continue;
503
- const i = s(c);
504
- i != null && i !== o && console.warn(`[BasicPage.${n}] a child is spaced at ${i}px instead of ${o}px. Spacing is the system's: Stack gap-10 between blocks, a block gap-3, Fields gap-5. Remove the class and move the wrapper instead.`, c);
497
+ l != null && l !== n && console.warn(`[BasicPage.${a}] spaced at ${l}px instead of ${n}px. Spacing is the system's: Stack gap-10 between blocks, a block gap-3, Fields gap-5. Remove the class and move the wrapper instead.`, e.current);
498
+ for (const o of Array.from(e.current.children)) {
499
+ const c = r(o);
500
+ if (c == null || getComputedStyle(o).display === "contents") continue;
501
+ const i = s(o);
502
+ i != null && i !== c && console.warn(`[BasicPage.${a}] a child is spaced at ${i}px instead of ${c}px. Spacing is the system's: Stack gap-10 between blocks, a block gap-3, Fields gap-5. Remove the class and move the wrapper instead.`, o);
505
503
  }
506
504
  });
507
505
  }
508
- function Zt({ enter: e = !0, className: n, children: a, ref: r, ...s }) {
509
- const l = L(), c = E(null);
510
- Xe(c, "Stack", 40, (u) => u.hasAttribute("data-basic-page-fields") ? 20 : 12);
511
- const o = s["aria-busy"], i = o === !0 || o === "true", d = E(i), f = d.current && !i;
512
- return O(() => {
513
- d.current = i;
506
+ function Jt() {
507
+ return typeof document > "u" ? !1 : Array.from(document.querySelectorAll("[data-basic-page-stack], [data-basic-page-title], [data-basic-page-header]")).some((e) => e.closest('[aria-busy="true"]') != null);
508
+ }
509
+ function Ae(e, a = !1) {
510
+ const [n] = x(() => e && typeof document < "u" && (a || !Jt()));
511
+ return n;
512
+ }
513
+ function Zt({ enter: e, className: a, children: n, ref: r, ...s }) {
514
+ const l = B(), o = _(null);
515
+ Qe(o, "Stack", 40, (m) => m.hasAttribute("data-basic-page-fields") ? 20 : 12);
516
+ const c = Ae(e ?? !0, e === !0), i = s["aria-busy"], d = i === !0 || i === "true", f = _(d), u = f.current && !d;
517
+ return L(() => {
518
+ f.current = d;
514
519
  }), /* @__PURE__ */ t(N.div, {
515
- ref: (u) => {
516
- c.current = u, typeof r == "function" ? r(u) : r != null && (r.current = u);
520
+ ref: (m) => {
521
+ o.current = m, typeof r == "function" ? r(m) : r != null && (r.current = m);
517
522
  },
518
523
  "data-basic-page-stack": "",
519
- initial: l || !e ? !1 : {
524
+ initial: l || !c ? !1 : {
520
525
  opacity: 0,
521
- y: j
526
+ y: q
522
527
  },
523
528
  animate: {
524
529
  opacity: 1,
525
530
  y: 0
526
531
  },
527
532
  transition: {
528
- y: T,
533
+ y: P,
529
534
  opacity: M
530
535
  },
531
- className: p("mt-7 flex min-w-0 flex-col gap-10", "[&:has(>*:first-child:not([data-basic-page-callout])>[data-basic-page-header]:first-child)]:mt-6 [&:has(>*:first-child:not([data-basic-page-callout])>h2:first-child)]:mt-6 [&:has(>[data-basic-page-header]:first-child)]:mt-6 [&:has(>h2:first-child)]:mt-6", "*:flex *:min-w-0 *:flex-col [&>*:not([data-basic-page-fields])]:gap-3", n),
536
+ className: p("mt-7 flex min-w-0 flex-col gap-10", "[&:has(>*:first-child:not([data-basic-page-callout])>[data-basic-page-header]:first-child)]:mt-6 [&:has(>*:first-child:not([data-basic-page-callout])>h2:first-child)]:mt-6 [&:has(>[data-basic-page-header]:first-child)]:mt-6 [&:has(>h2:first-child)]:mt-6", "*:flex *:min-w-0 *:flex-col [&>*:not([data-basic-page-fields])]:gap-3", a),
532
537
  ...s,
533
- children: /* @__PURE__ */ t(Ke.Provider, {
534
- value: f,
535
- children: a
538
+ children: /* @__PURE__ */ t(Xe.Provider, {
539
+ value: u,
540
+ children: n
536
541
  })
537
542
  });
538
543
  }
539
- var Oe = "@container grid min-w-0 grid-cols-[minmax(0,1fr)_auto_auto] mb-3 [&>:not([data-basic-page-search]):not([data-basic-page-header-action])]:col-start-1 [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0";
540
- function en({ enter: e, className: n, ...a }) {
541
- const r = L();
542
- return e && !r ? /* @__PURE__ */ t(N.div, {
544
+ var Le = "@container grid min-w-0 grid-cols-[minmax(0,1fr)_auto_auto] mb-3 [&>:not([data-basic-page-search]):not([data-basic-page-header-action])]:col-start-1 [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action]))]:row-span-2 [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action]))]:self-center [&>:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])):not(:nth-last-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])))]:self-end [&>:not([data-basic-page-search]):not([data-basic-page-header-action]):not(:nth-child(1_of_:not([data-basic-page-search]):not([data-basic-page-header-action])))]:self-start [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0";
545
+ function ea({ enter: e, className: a, ...n }) {
546
+ const r = B();
547
+ return Ae(e === !0) && !r ? /* @__PURE__ */ t(N.div, {
543
548
  initial: {
544
549
  opacity: 0,
545
- y: j
550
+ y: q
546
551
  },
547
552
  animate: {
548
553
  opacity: 1,
549
554
  y: 0
550
555
  },
551
556
  transition: {
552
- y: T,
557
+ y: P,
553
558
  opacity: M
554
559
  },
555
560
  "data-basic-page-header": "",
556
- className: p(Oe, n),
557
- ...a
561
+ className: p(Le, a),
562
+ ...n
558
563
  }) : /* @__PURE__ */ t("div", {
559
564
  "data-basic-page-header": "",
560
- className: p(Oe, n),
561
- ...a
565
+ className: p(Le, a),
566
+ ...n
562
567
  });
563
568
  }
564
- function tn({ className: e, ...n }) {
569
+ function ta({ className: e, ...a }) {
565
570
  return /* @__PURE__ */ t("div", {
566
571
  "data-basic-page-header-action": "",
567
572
  className: p("flex items-center gap-2", "[[data-basic-page-header]>&]:col-start-3 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:self-start [[data-basic-page-header]>&]:justify-self-end", e),
568
- ...n
573
+ ...a
569
574
  });
570
575
  }
571
- function nn({ id: e, className: n, children: a, ...r }) {
572
- const s = ve(e, a);
576
+ function aa({ id: e, className: a, children: n, ...r }) {
577
+ const s = be(e, n);
573
578
  return /* @__PURE__ */ t("h2", {
574
579
  id: s,
575
- className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate px-5 font-medium", "mb-3 [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-header]>&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0", n),
580
+ className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate px-5 font-medium", "mb-3 [[data-basic-page-callout]_&]:mb-0 [[data-basic-page-header]>&]:mb-0 [[data-basic-page-stack]>*>&]:mb-0", a),
576
581
  ...r,
577
- children: a
582
+ children: n
578
583
  });
579
584
  }
580
- function Qe({ className: e, ...n }) {
585
+ function Ye({ className: e, ...a }) {
581
586
  return /* @__PURE__ */ t("p", {
582
587
  className: p("text-display-xs text-pho-description px-5 font-normal", e),
583
- ...n
588
+ ...a
584
589
  });
585
590
  }
586
- function an({ one: e, other: n, ...a }) {
587
- const r = R(fe), s = me(r?.subscribe ?? ye, () => r?.get().api ?? null, () => null);
591
+ function na({ one: e, other: a, ...n }) {
592
+ const r = T(fe), s = me(r?.subscribe ?? ve, () => r?.get().api ?? null, () => null);
588
593
  if (s == null) return null;
589
- const l = s.query.trim() !== "" ? `${s.matched} of ${s.total}.` : `${s.total} ${s.total === 1 ? e : n}.`;
590
- return /* @__PURE__ */ t(Qe, {
591
- ...a,
594
+ const l = s.query.trim() !== "" ? `${s.matched} of ${s.total}.` : `${s.total} ${s.total === 1 ? e : a}.`;
595
+ return /* @__PURE__ */ t(Ye, {
596
+ ...n,
592
597
  children: l
593
598
  });
594
599
  }
595
- function rn({ className: e, ...n }) {
600
+ function ra({ className: e, ...a }) {
596
601
  return /* @__PURE__ */ t("p", {
597
602
  className: p("text-pho-description px-5 text-xs font-normal", "mt-3 [[data-basic-page-callout]_&]:mt-0 [[data-basic-page-stack]>*>&]:mt-0", e),
598
- ...n
603
+ ...a
599
604
  });
600
605
  }
601
- function sn({ animateHeight: e, className: n, children: a, ...r }) {
602
- const s = /* @__PURE__ */ t(G, { children: Y.toArray(a) });
606
+ function ia({ animateHeight: e, className: a, children: n, ...r }) {
607
+ const s = /* @__PURE__ */ t(G, { children: Y.toArray(n) });
603
608
  return e ? /* @__PURE__ */ t("div", {
604
- className: p(ge, "min-h-0 overflow-hidden", n),
609
+ className: p(ge, "min-h-0 overflow-hidden", a),
605
610
  ...r,
606
- children: /* @__PURE__ */ t(gt, {
607
- transition: T,
608
- className: ae,
611
+ children: /* @__PURE__ */ t(bt, {
612
+ transition: P,
613
+ className: ne,
609
614
  children: s
610
615
  })
611
616
  }) : /* @__PURE__ */ t("div", {
612
- className: p(Ge, n),
617
+ className: p(ze, a),
613
618
  ...r,
614
619
  children: s
615
620
  });
616
621
  }
617
- function ln({ className: e, ...n }) {
618
- const { leaving: a, ...r } = Ne();
622
+ function sa({ className: e, ...a }) {
623
+ const { leaving: n, ...r } = Ne();
619
624
  return /* @__PURE__ */ t(N.div, {
620
625
  ...r,
621
- className: p(Ct, a && "overflow-hidden", e),
622
- ...n
626
+ className: p(_t, n && "overflow-hidden", e),
627
+ ...a
623
628
  });
624
629
  }
625
- function on({ divided: e = !1, className: n, ...a }) {
630
+ function la({ divided: e = !1, className: a, ...n }) {
626
631
  return /* @__PURE__ */ t("div", {
627
- className: p(e ? kt : _t, n),
628
- ...a
632
+ className: p(e ? Ct : Et, a),
633
+ ...n
629
634
  });
630
635
  }
631
- function cn({ className: e, icon: n, children: a, ...r }) {
632
- if (n == null || n === !1 || n === !0) return /* @__PURE__ */ t("div", {
636
+ function oa({ className: e, icon: a, children: n, ...r }) {
637
+ if (a == null || a === !1 || a === !0) return /* @__PURE__ */ t("div", {
633
638
  "data-basic-page-callout": "",
634
- className: p(_e, e),
639
+ className: p(Se, e),
635
640
  ...r,
636
- children: a
641
+ children: n
637
642
  });
638
- const [s, ...l] = Y.toArray(a);
639
- return /* @__PURE__ */ y("div", {
643
+ const [s, ...l] = Y.toArray(n);
644
+ return /* @__PURE__ */ v("div", {
640
645
  "data-basic-page-callout": "",
641
- className: p(_e, e),
646
+ className: p(Se, e),
642
647
  ...r,
643
- children: [/* @__PURE__ */ y("div", {
648
+ children: [/* @__PURE__ */ v("div", {
644
649
  className: "relative",
645
650
  children: [/* @__PURE__ */ t("div", {
646
651
  className: "min-w-0 pr-16",
@@ -648,119 +653,119 @@ function cn({ className: e, icon: n, children: a, ...r }) {
648
653
  }), /* @__PURE__ */ t("div", {
649
654
  "aria-hidden": !0,
650
655
  className: "text-pho-primary pointer-events-none absolute top-0 right-0 size-14 opacity-[0.275] [&>svg]:size-full",
651
- children: n
656
+ children: a
652
657
  })]
653
658
  }), l]
654
659
  });
655
660
  }
656
- function un({ id: e, className: n, children: a, ...r }) {
657
- const s = ve(e, a);
661
+ function ca({ id: e, className: a, children: n, ...r }) {
662
+ const s = be(e, n);
658
663
  return /* @__PURE__ */ t("h2", {
659
664
  id: s,
660
- className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate font-medium", n),
665
+ className: p("text-display-xs text-pho-primary max-w-full min-w-0 scroll-mt-12 truncate font-medium", a),
661
666
  ...r,
662
- children: a
667
+ children: n
663
668
  });
664
669
  }
665
- function dn({ className: e, ...n }) {
670
+ function ua({ className: e, ...a }) {
666
671
  return /* @__PURE__ */ t("p", {
667
672
  className: p("text-display-xs text-pho-description font-normal", e),
668
- ...n
673
+ ...a
669
674
  });
670
675
  }
671
- var Ye = z(null), Ue = z(!1);
672
- function pn({ className: e, children: n, ...a }) {
676
+ var Ue = z(null), Je = z(!1);
677
+ function da({ className: e, children: a, ...n }) {
673
678
  let r = !1;
674
- const s = Y.toArray(n).map((l, c) => {
675
- if (!He(l)) return l;
676
- let o;
677
- return l.props.done ? o = "done" : r ? o = "upcoming" : (r = !0, o = l.props.working ? "working" : l.props.pending ? "pending" : "current"), /* @__PURE__ */ t(Ye.Provider, {
679
+ const s = Y.toArray(a).map((l, o) => {
680
+ if (!Fe(l)) return l;
681
+ let c;
682
+ return l.props.done ? c = "done" : r ? c = "upcoming" : (r = !0, c = l.props.working ? "working" : l.props.pending ? "pending" : "current"), /* @__PURE__ */ t(Ue.Provider, {
678
683
  value: {
679
- number: c + 1,
680
- state: o
684
+ number: o + 1,
685
+ state: c
681
686
  },
682
687
  children: l
683
- }, l.key ?? c);
688
+ }, l.key ?? o);
684
689
  });
685
690
  return /* @__PURE__ */ t("ol", {
686
691
  "data-basic-page-onboard": "",
687
- className: p(Ge, "m-0 list-none p-0", e),
688
- ...a,
692
+ className: p(ze, "m-0 list-none p-0", e),
693
+ ...n,
689
694
  children: s
690
695
  });
691
696
  }
692
- var fn = "relative grid size-5 shrink-0 place-items-center rounded-full border text-xs font-medium tabular-nums transition-[background-color,border-color,color] duration-200 ease-out *:[grid-area:1/1]", mn = {
697
+ var pa = "relative grid size-5 shrink-0 place-items-center rounded-full border text-xs font-medium tabular-nums transition-[background-color,border-color,color] duration-200 ease-out *:[grid-area:1/1]", fa = {
693
698
  done: "border-pho-ink text-pho-primary",
694
699
  current: "bg-pho-brand-solid text-pho-on-brand border-transparent",
695
700
  working: "border-transparent text-pho-primary",
696
701
  pending: "border-pho-ink text-pho-primary border-dashed",
697
702
  upcoming: "border-pho-primary text-pho-description"
698
- }, hn = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink opacity-30", gn = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink border-r-transparent border-b-transparent border-l-transparent animate-pho-spinner", vn = {
703
+ }, ma = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink opacity-30", ha = "pointer-events-none absolute -inset-px rounded-full border border-pho-ink border-r-transparent border-b-transparent border-l-transparent animate-pho-spinner", ga = {
699
704
  done: "Done.",
700
705
  working: "In progress.",
701
706
  pending: "Waiting."
702
707
  };
703
- function bn({ icon: e, aside: n, title: a, description: r, done: s, working: l, pending: c, className: o, children: i, ...d }) {
704
- const f = R(Ye), u = f?.state ?? (s ? "done" : l ? "working" : c ? "pending" : "current"), m = L(), h = u === "current" || u === "working" || u === "pending", v = u === "upcoming", g = vn[u], C = i != null && i !== !1, b = e != null && e !== !1, k = n != null && n !== !1;
708
+ function ba({ icon: e, aside: a, title: n, description: r, done: s, working: l, pending: o, className: c, children: i, ...d }) {
709
+ const f = T(Ue), u = f?.state ?? (s ? "done" : l ? "working" : o ? "pending" : "current"), m = B(), h = u === "current" || u === "working" || u === "pending", b = u === "upcoming", g = ga[u], E = i != null && i !== !1, y = e != null && e !== !1, C = a != null && a !== !1;
705
710
  return /* @__PURE__ */ t("li", {
706
711
  "data-basic-page-step": u,
707
712
  "aria-current": h ? "step" : void 0,
708
- className: p("relative m-0 grid min-w-0 grid-cols-[auto_minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)] items-center gap-x-3 px-5 py-4", "transition-[background-color] duration-200 ease-out first:rounded-t-[calc(0.75rem-1px)] last:rounded-b-[calc(0.75rem-1px)] motion-reduce:transition-none", h && "bg-pho-page", o),
713
+ className: p("relative m-0 grid min-w-0 grid-cols-[auto_minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)] items-center gap-x-3 px-5 py-4", "transition-[background-color] duration-200 ease-out first:rounded-t-[calc(0.75rem-1px)] last:rounded-b-[calc(0.75rem-1px)] motion-reduce:transition-none", h && "bg-pho-page", c),
709
714
  ...d,
710
- children: /* @__PURE__ */ y(Ue.Provider, {
715
+ children: /* @__PURE__ */ v(Je.Provider, {
711
716
  value: !0,
712
717
  children: [
713
- /* @__PURE__ */ y("span", {
718
+ /* @__PURE__ */ v("span", {
714
719
  "aria-hidden": !0,
715
- className: p(fn, mn[u], "col-start-1 row-start-1"),
720
+ className: p(pa, fa[u], "col-start-1 row-start-1"),
716
721
  children: [/* @__PURE__ */ t(G, {
717
722
  initial: !1,
718
723
  children: u === "done" ? /* @__PURE__ */ t(N.span, {
719
724
  ...ee(m),
720
725
  className: "flex",
721
- children: /* @__PURE__ */ t(vt, { className: "size-3" })
726
+ children: /* @__PURE__ */ t(yt, { className: "size-3" })
722
727
  }, "check") : /* @__PURE__ */ t(N.span, {
723
728
  ...ee(m),
724
729
  children: f?.number ?? 1
725
730
  }, "number")
726
- }), u === "working" ? /* @__PURE__ */ y(he, { children: [/* @__PURE__ */ t("span", { className: hn }), /* @__PURE__ */ t("span", { className: gn })] }) : null]
731
+ }), u === "working" ? /* @__PURE__ */ v(he, { children: [/* @__PURE__ */ t("span", { className: ma }), /* @__PURE__ */ t("span", { className: ha })] }) : null]
727
732
  }),
728
- /* @__PURE__ */ y("div", {
733
+ /* @__PURE__ */ v("div", {
729
734
  "data-basic-page-step-title": "",
730
- className: p("text-display-xs col-start-2 row-start-1 min-w-0 font-medium transition-colors duration-200 ease-out", v ? "text-pho-description" : "text-pho-primary"),
731
- children: [g ? /* @__PURE__ */ y("span", {
735
+ className: p("text-display-xs col-start-2 row-start-1 min-w-0 font-medium transition-colors duration-200 ease-out", b ? "text-pho-description" : "text-pho-primary"),
736
+ children: [g ? /* @__PURE__ */ v("span", {
732
737
  className: "sr-only",
733
738
  children: [g, " "]
734
- }) : null, a]
739
+ }) : null, n]
735
740
  }),
736
- /* @__PURE__ */ t(Ae, {
741
+ /* @__PURE__ */ t(_e, {
737
742
  show: h,
738
743
  gap: "none",
739
744
  clip: !1,
740
745
  className: "col-start-2 row-start-2 flex min-w-0 flex-col self-stretch",
741
- children: /* @__PURE__ */ y("div", {
746
+ children: /* @__PURE__ */ v("div", {
742
747
  "data-basic-page-step-body": "",
743
748
  className: "flex min-w-0 flex-1 flex-col",
744
749
  children: [r ? /* @__PURE__ */ t("div", {
745
750
  className: "text-display-xs text-pho-description font-normal",
746
751
  children: r
747
- }) : null, C ? /* @__PURE__ */ t("div", {
752
+ }) : null, E ? /* @__PURE__ */ t("div", {
748
753
  className: "mt-auto flex flex-wrap items-center gap-2 pt-3",
749
754
  children: i
750
755
  }) : null]
751
756
  })
752
757
  }),
753
- u === "done" && C ? /* @__PURE__ */ t("div", {
758
+ u === "done" && E ? /* @__PURE__ */ t("div", {
754
759
  className: "col-start-3 row-start-1 flex min-w-0 items-center gap-2",
755
760
  children: i
756
- }) : k ? /* @__PURE__ */ t(G, {
761
+ }) : C ? /* @__PURE__ */ t(G, {
757
762
  initial: !1,
758
763
  children: h ? /* @__PURE__ */ t(N.div, {
759
764
  ...ee(m),
760
765
  className: "col-start-3 row-span-2 row-start-1 self-start",
761
- children: n
766
+ children: a
762
767
  }, "aside") : null
763
- }) : b ? /* @__PURE__ */ t(G, {
768
+ }) : y ? /* @__PURE__ */ t(G, {
764
769
  initial: !1,
765
770
  children: h ? /* @__PURE__ */ t(N.div, {
766
771
  "aria-hidden": !0,
@@ -776,24 +781,24 @@ function bn({ icon: e, aside: n, title: a, description: r, done: s, working: l,
776
781
  })
777
782
  });
778
783
  }
779
- function yn({ label: e, description: n, htmlFor: a, stacked: r = !1, className: s, children: l, ...c }) {
780
- const { leaving: o, ...i } = Ne();
781
- return /* @__PURE__ */ y(N.div, {
784
+ function ya({ label: e, description: a, htmlFor: n, stacked: r = !1, className: s, children: l, ...o }) {
785
+ const { leaving: c, ...i } = Ne();
786
+ return /* @__PURE__ */ v(N.div, {
782
787
  ...i,
783
- className: p(Et, r && "sm:flex-col sm:items-stretch sm:justify-start sm:gap-3", o && "overflow-hidden", s),
784
- ...c,
785
- children: [/* @__PURE__ */ y("div", {
788
+ className: p(At, r && "sm:flex-col sm:items-stretch sm:justify-start sm:gap-3", c && "overflow-hidden", s),
789
+ ...o,
790
+ children: [/* @__PURE__ */ v("div", {
786
791
  className: "min-w-0",
787
- children: [a ? /* @__PURE__ */ t("label", {
788
- htmlFor: a,
792
+ children: [n ? /* @__PURE__ */ t("label", {
793
+ htmlFor: n,
789
794
  className: "text-pho-primary block text-base font-normal",
790
795
  children: e
791
796
  }) : /* @__PURE__ */ t("div", {
792
797
  className: "text-pho-primary text-base font-normal",
793
798
  children: e
794
- }), n ? /* @__PURE__ */ t("p", {
799
+ }), a ? /* @__PURE__ */ t("p", {
795
800
  className: "text-pho-description text-xs",
796
- children: n
801
+ children: a
797
802
  }) : null]
798
803
  }), /* @__PURE__ */ t("div", {
799
804
  className: p("flex w-full min-w-0 items-center gap-2 sm:w-auto", r && "sm:w-full"),
@@ -801,18 +806,18 @@ function yn({ label: e, description: n, htmlFor: a, stacked: r = !1, className:
801
806
  })]
802
807
  });
803
808
  }
804
- function xn({ className: e, ...n }) {
805
- const a = R(Ue);
809
+ function va({ className: e, ...a }) {
810
+ const n = T(Je);
806
811
  return /* @__PURE__ */ t("p", {
807
- className: p("text-pho-description max-w-full min-w-0 truncate", a ? "text-display-xs font-normal" : "text-base", e),
808
- ...n
812
+ className: p("text-pho-description max-w-full min-w-0 truncate", n ? "text-display-xs font-normal" : "text-base", e),
813
+ ...a
809
814
  });
810
815
  }
811
- function wn({ error: e, show: n, className: a, children: r, ...s }) {
812
- const l = L(), c = R(X), o = e ?? c?.error ?? void 0;
816
+ function xa({ error: e, show: a, className: n, children: r, ...s }) {
817
+ const l = B(), o = T(X), c = e ?? o?.error ?? void 0;
813
818
  return /* @__PURE__ */ t(G, {
814
819
  initial: !1,
815
- children: (n ?? !0) && (o != null || r != null) ? /* @__PURE__ */ t(N.div, {
820
+ children: (a ?? !0) && (c != null || r != null) ? /* @__PURE__ */ t(N.div, {
816
821
  "data-basic-page-alert": "",
817
822
  className: "overflow-hidden",
818
823
  initial: {
@@ -828,53 +833,53 @@ function wn({ error: e, show: n, className: a, children: r, ...s }) {
828
833
  opacity: 0
829
834
  },
830
835
  transition: l ? { duration: 0 } : {
831
- height: T,
836
+ height: P,
832
837
  opacity: M
833
838
  },
834
839
  children: /* @__PURE__ */ t(ct, {
835
- error: o,
836
- className: p("px-5 pb-3", a),
840
+ error: c,
841
+ className: p("px-5 pb-3", n),
837
842
  ...s,
838
843
  children: r
839
844
  })
840
845
  }) : null
841
846
  });
842
847
  }
843
- function ma() {
844
- return R(X)?.requestSave ?? null;
848
+ function mn() {
849
+ return T(X)?.requestSave ?? null;
845
850
  }
846
- var ha = 800, ce = ht.createToastManager(), X = z(null);
847
- function Nn({ action: e, errors: n, autoSave: a = !1, className: r, children: s, onChange: l, onBlur: c, ...o }) {
848
- const [i, d] = w(!1), [f, u] = w(!1), [m, h] = w(null), [v, g] = w(n ?? {}), [C, b] = w(null), k = E(null), x = E(null), _ = E(null), P = E(!1), B = E(!1), I = E(null), D = E(async () => {
851
+ var hn = 800, ce = gt.createToastManager(), X = z(null);
852
+ function wa({ action: e, errors: a, autoSave: n = !1, className: r, children: s, onChange: l, onBlur: o, ...c }) {
853
+ const [i, d] = x(!1), [f, u] = x(!1), [m, h] = x(null), [b, g] = x(a ?? {}), [E, y] = x(null), C = _(null), w = _(null), S = _(null), O = _(!1), R = _(!1), I = _(null), D = _(async () => {
849
854
  });
850
- O(() => () => {
851
- x.current != null && clearTimeout(x.current);
855
+ L(() => () => {
856
+ w.current != null && clearTimeout(w.current);
852
857
  }, []);
853
- const q = async () => {
854
- const A = k.current;
858
+ const j = async () => {
859
+ const A = C.current;
855
860
  if (A == null || e == null) return;
856
- if (P.current) {
857
- B.current = !0;
861
+ if (O.current) {
862
+ R.current = !0;
858
863
  return;
859
864
  }
860
865
  if (!A.checkValidity()) return;
861
- const S = Object.fromEntries(new FormData(A).entries()), Z = _.current;
862
- P.current = !0, b({
866
+ const k = Object.fromEntries(new FormData(A).entries()), Z = S.current;
867
+ O.current = !0, y({
863
868
  field: Z,
864
869
  phase: "saving"
865
870
  }), h(null);
866
871
  try {
867
- const F = (await e(S))?.errors;
872
+ const F = (await e(k))?.errors;
868
873
  if (F != null && Object.keys(F).length > 0) {
869
- g(F), b(null);
874
+ g(F), y(null);
870
875
  return;
871
876
  }
872
- g({}), u(!1), b({
877
+ g({}), u(!1), y({
873
878
  field: Z,
874
879
  phase: "saved"
875
880
  }), I.current != null && (ce.close(I.current), I.current = null);
876
881
  } catch (F) {
877
- b(null), h(F), I.current != null && ce.close(I.current), I.current = ce.add({
882
+ y(null), h(F), I.current != null && ce.close(I.current), I.current = ce.add({
878
883
  type: "error",
879
884
  title: "Couldn't save",
880
885
  description: F instanceof Error && F.message !== "" ? F.message : "The change is still here — try again.",
@@ -887,45 +892,45 @@ function Nn({ action: e, errors: n, autoSave: a = !1, className: r, children: s,
887
892
  }
888
893
  });
889
894
  } finally {
890
- P.current = !1, B.current && (B.current = !1, D.current());
895
+ O.current = !1, R.current && (R.current = !1, D.current());
891
896
  }
892
897
  };
893
- D.current = q;
898
+ D.current = j;
894
899
  const U = () => {
895
- x.current != null && clearTimeout(x.current), x.current = setTimeout(() => {
896
- x.current = null, D.current();
900
+ w.current != null && clearTimeout(w.current), w.current = setTimeout(() => {
901
+ w.current = null, D.current();
897
902
  }, 800);
898
- }, J = $(() => a ? (A) => {
899
- A != null && (_.current = A), u(!0), U();
900
- } : null, [a]), H = $(() => ({
903
+ }, J = $(() => n ? (A) => {
904
+ A != null && (S.current = A), u(!0), U();
905
+ } : null, [n]), H = $(() => ({
901
906
  pending: i,
902
907
  dirty: f,
903
908
  error: m,
904
- auto: C,
909
+ auto: E,
905
910
  requestSave: J
906
911
  }), [
907
912
  i,
908
913
  f,
909
914
  m,
910
- C,
915
+ E,
911
916
  J
912
917
  ]);
913
918
  return /* @__PURE__ */ t(X.Provider, {
914
919
  value: H,
915
- children: /* @__PURE__ */ t(bt, {
916
- errors: v,
920
+ children: /* @__PURE__ */ t(vt, {
921
+ errors: b,
917
922
  onFormSubmit: async (A) => {
918
923
  if (e != null) {
919
924
  d(!0), h(null);
920
925
  try {
921
- const S = (await e(A))?.errors;
922
- if (S != null && Object.keys(S).length > 0) {
923
- g(S);
926
+ const k = (await e(A))?.errors;
927
+ if (k != null && Object.keys(k).length > 0) {
928
+ g(k);
924
929
  return;
925
930
  }
926
931
  g({}), u(!1);
927
- } catch (S) {
928
- h(S);
932
+ } catch (k) {
933
+ h(k);
929
934
  } finally {
930
935
  d(!1);
931
936
  }
@@ -933,21 +938,21 @@ function Nn({ action: e, errors: n, autoSave: a = !1, className: r, children: s,
933
938
  },
934
939
  onChange: (A) => {
935
940
  u(!0), h(null);
936
- const S = A.target.name;
937
- S && S in v && g((Z) => {
938
- const { [S]: F, ...at } = Z;
939
- return at;
940
- }), a && (S && (_.current = S), U()), l?.(A);
941
+ const k = A.target.name;
942
+ k && k in b && g((Z) => {
943
+ const { [k]: F, ...rt } = Z;
944
+ return rt;
945
+ }), n && (k && (S.current = k), U()), l?.(A);
941
946
  },
942
947
  onBlur: (A) => {
943
- a && f && x.current != null && (clearTimeout(x.current), x.current = null, D.current()), c?.(A);
948
+ n && f && w.current != null && (clearTimeout(w.current), w.current = null, D.current()), o?.(A);
944
949
  },
945
950
  className: p("contents [[data-basic-page-stack]>&]:flex [[data-basic-page-stack]>&]:min-w-0 [[data-basic-page-stack]>&]:flex-col", r),
946
- ...o,
951
+ ...c,
947
952
  ref: (A) => {
948
- k.current = A;
949
- const S = o.ref;
950
- typeof S == "function" ? S(A) : S != null && (S.current = A);
953
+ C.current = A;
954
+ const k = c.ref;
955
+ typeof k == "function" ? k(A) : k != null && (k.current = A);
951
956
  },
952
957
  children: /* @__PURE__ */ t("fieldset", {
953
958
  disabled: i,
@@ -958,15 +963,15 @@ function Nn({ action: e, errors: n, autoSave: a = !1, className: r, children: s,
958
963
  })
959
964
  });
960
965
  }
961
- function An({ name: e, className: n, ...a }) {
962
- const r = R(X), s = L(), l = r?.auto ?? null, c = l != null && (e == null || l.field === e), [o, i] = w(!1), d = c ? l.phase : null;
963
- O(() => {
966
+ function Na({ name: e, className: a, ...n }) {
967
+ const r = T(X), s = B(), l = r?.auto ?? null, o = l != null && (e == null || l.field === e), [c, i] = x(!1), d = o ? l.phase : null;
968
+ L(() => {
964
969
  if (d !== "saved") return;
965
970
  i(!0);
966
971
  const m = setTimeout(() => i(!1), 1800);
967
972
  return () => clearTimeout(m);
968
973
  }, [d, l]);
969
- const f = d === "saving" ? "Saving…" : d === "saved" && o ? "Saved" : null, u = s ? "blur(0px)" : `blur(${De}px)`;
974
+ const f = d === "saving" ? "Saving…" : d === "saved" && c ? "Saved" : null, u = s ? "blur(0px)" : `blur(${He}px)`;
970
975
  return /* @__PURE__ */ t("span", {
971
976
  className: "grid justify-items-end",
972
977
  children: /* @__PURE__ */ t(G, {
@@ -985,102 +990,102 @@ function An({ name: e, className: n, ...a }) {
985
990
  filter: u
986
991
  },
987
992
  transition: xe,
988
- className: p("text-pho-description pl-8 [grid-area:1/1]", n),
993
+ className: p("text-pho-description pl-8 [grid-area:1/1]", a),
989
994
  style: { background: "linear-gradient(to left, var(--background-color-pho-primary) calc(100% - 2rem), transparent)" },
990
- ...a,
995
+ ...n,
991
996
  children: f
992
997
  }, f)
993
998
  })
994
999
  });
995
1000
  }
996
- var En = "flex min-w-0 flex-col gap-5 p-5 [&>[data-basic-page-alert]]:-mx-5 [&>[data-basic-page-alert]]:-mt-2 [&>[data-basic-page-alert]]:-mb-5 [&>[data-basic-page-footer]]:pr-0 [&>[data-basic-page-reveal]]:flex [&>[data-basic-page-reveal]]:flex-col [&>[data-basic-page-reveal]]:gap-5";
997
- function Cn({ className: e, ...n }) {
998
- const a = E(null);
999
- return Xe(a, "Fields", 20, () => null), /* @__PURE__ */ t("div", {
1001
+ var Aa = "flex min-w-0 flex-col gap-5 p-5 [&>[data-basic-page-alert]]:-mx-5 [&>[data-basic-page-alert]]:-mt-2 [&>[data-basic-page-alert]]:-mb-5 [&>[data-basic-page-footer]]:pr-0 [&>[data-basic-page-reveal]]:flex [&>[data-basic-page-reveal]]:flex-col [&>[data-basic-page-reveal]]:gap-5";
1002
+ function _a({ className: e, ...a }) {
1003
+ const n = _(null);
1004
+ return Qe(n, "Fields", 20, () => null), /* @__PURE__ */ t("div", {
1000
1005
  "data-basic-page-fields": "",
1001
- className: p(ge, En, e),
1002
- ...n,
1006
+ className: p(ge, Aa, e),
1007
+ ...a,
1003
1008
  ref: (r) => {
1004
- a.current = r;
1005
- const s = n.ref;
1009
+ n.current = r;
1010
+ const s = a.ref;
1006
1011
  typeof s == "function" ? s(r) : s != null && (s.current = r);
1007
1012
  }
1008
1013
  });
1009
1014
  }
1010
- function _n({ className: e, ...n }) {
1015
+ function Ea({ className: e, ...a }) {
1011
1016
  return /* @__PURE__ */ t("div", {
1012
1017
  className: p("flex min-w-0 flex-col gap-5 *:min-w-0 sm:flex-row sm:gap-3 sm:*:flex-1", e),
1013
- ...n
1018
+ ...a
1014
1019
  });
1015
1020
  }
1016
- function kn({ children: e = "Save changes", ...n }) {
1017
- const a = R(X);
1021
+ function Ca({ children: e = "Save changes", ...a }) {
1022
+ const n = T(X);
1018
1023
  return /* @__PURE__ */ t(ie, {
1019
1024
  type: "submit",
1020
1025
  variant: "effect",
1021
1026
  size: "sm",
1022
- loading: a?.pending,
1023
- ...n,
1027
+ loading: n?.pending,
1028
+ ...a,
1024
1029
  children: e
1025
1030
  });
1026
1031
  }
1027
- function Sn({ show: e, className: n, ...a }) {
1028
- const r = R(X), s = e === "dirty" ? r?.dirty ?? !1 : e, l = /* @__PURE__ */ t("div", {
1032
+ function Sa({ show: e, className: a, ...n }) {
1033
+ const r = T(X), s = e === "dirty" ? r?.dirty ?? !1 : e, l = /* @__PURE__ */ t("div", {
1029
1034
  "data-basic-page-footer": "",
1030
- className: p("flex items-center justify-end gap-3 pr-[calc(1.25rem+2.5px)]", n),
1031
- ...a
1035
+ className: p("flex items-center justify-end gap-3 pr-[calc(1.25rem+2.5px)]", a),
1036
+ ...n
1032
1037
  });
1033
- return s === void 0 ? l : /* @__PURE__ */ t(Ae, {
1038
+ return s === void 0 ? l : /* @__PURE__ */ t(_e, {
1034
1039
  show: s,
1035
1040
  gap: "block",
1036
1041
  clip: !1,
1037
1042
  children: l
1038
1043
  });
1039
1044
  }
1040
- var Rn = {
1045
+ var ka = {
1041
1046
  stack: "-2.5rem",
1042
1047
  block: "-0.75rem",
1043
1048
  fields: "-1.25rem",
1044
1049
  none: "0px"
1045
1050
  };
1046
- function Ae({ show: e, clip: n = !0, gap: a = "stack", dividers: r, className: s, ...l }) {
1047
- const c = L(), o = Rn[r ? "none" : a], i = E(null), d = E(e !== !0);
1048
- O(() => {
1051
+ function _e({ show: e, clip: a = !0, gap: n = "stack", dividers: r, className: s, ...l }) {
1052
+ const o = B(), c = ka[r ? "none" : n], i = _(null), d = _(e !== !0);
1053
+ L(() => {
1049
1054
  d.current = !0;
1050
1055
  }, []);
1051
1056
  const f = () => {
1052
- n && i.current && (i.current.style.overflow = "hidden");
1057
+ a && i.current && (i.current.style.overflow = "hidden");
1053
1058
  }, u = () => {
1054
1059
  i.current && (i.current.style.overflow = "");
1055
1060
  };
1056
1061
  return e === void 0 ? /* @__PURE__ */ t(N.div, {
1057
- initial: c ? !1 : {
1062
+ initial: o ? !1 : {
1058
1063
  opacity: 0,
1059
- y: j
1064
+ y: q
1060
1065
  },
1061
1066
  animate: {
1062
1067
  opacity: 1,
1063
1068
  y: 0
1064
1069
  },
1065
1070
  transition: {
1066
- y: T,
1071
+ y: P,
1067
1072
  opacity: M
1068
1073
  },
1069
- className: p(r && ae, s),
1074
+ className: p(r && ne, s),
1070
1075
  ...l
1071
1076
  }) : /* @__PURE__ */ t(G, {
1072
1077
  initial: !1,
1073
1078
  children: e ? /* @__PURE__ */ t(N.div, {
1074
1079
  "data-basic-page-reveal": "",
1075
1080
  ref: (m) => {
1076
- i.current = m, n && m && d.current && (m.style.overflow = "hidden");
1081
+ i.current = m, a && m && d.current && (m.style.overflow = "hidden");
1077
1082
  },
1078
1083
  onAnimationStart: f,
1079
1084
  onAnimationComplete: u,
1080
1085
  initial: {
1081
1086
  height: 0,
1082
1087
  opacity: 0,
1083
- marginTop: o
1088
+ marginTop: c
1084
1089
  },
1085
1090
  animate: {
1086
1091
  height: "auto",
@@ -1090,93 +1095,93 @@ function Ae({ show: e, clip: n = !0, gap: a = "stack", dividers: r, className: s
1090
1095
  exit: {
1091
1096
  height: 0,
1092
1097
  opacity: 0,
1093
- marginTop: o
1098
+ marginTop: c
1094
1099
  },
1095
- transition: c ? { duration: 0 } : {
1096
- height: T,
1097
- marginTop: T,
1100
+ transition: o ? { duration: 0 } : {
1101
+ height: P,
1102
+ marginTop: P,
1098
1103
  opacity: M
1099
1104
  },
1100
- className: p(r && ae, s),
1105
+ className: p(r && ne, s),
1101
1106
  ...l
1102
1107
  }) : null
1103
1108
  });
1104
1109
  }
1105
- var Tn = "top-4 left-5 h-8 text-base [&>svg]:size-[1.125em] [&>svg]:shrink-0", Pn = "(min-width: 40rem)";
1106
- function In() {
1107
- return typeof window < "u" && typeof window.matchMedia == "function" && !window.matchMedia(Pn).matches;
1110
+ var Ta = "top-4 left-5 h-8 text-base [&>svg]:size-[1.125em] [&>svg]:shrink-0", Ra = "(min-width: 40rem)";
1111
+ function Pa() {
1112
+ return typeof window < "u" && typeof window.matchMedia == "function" && !window.matchMedia(Ra).matches;
1108
1113
  }
1109
- var Je = z(null);
1110
- function Ze({ className: e, children: n, ...a }) {
1111
- const r = Y.toArray(n).filter(He), s = r.map((k) => k.props.children ?? null), l = je();
1112
- Vt(s);
1113
- const [c] = w(In), o = L(), i = r.length, d = Me(), f = !c && i >= On, u = R(be), m = i > 0 ? r[i - 1]?.props : null, h = m?.children ?? "Back", v = m?.href, g = m?.onClick;
1114
+ var Ze = z(null);
1115
+ function et({ className: e, children: a, ...n }) {
1116
+ const r = Y.toArray(a).filter(Fe), s = r.map((C) => C.props.children ?? null), l = je();
1117
+ zt(s);
1118
+ const [o] = x(Pa), c = B(), i = r.length, d = De(), f = !o && i >= Ia, u = T(ye), m = i > 0 ? r[i - 1]?.props : null, h = m?.children ?? "Back", b = m?.href, g = m?.onClick;
1114
1119
  V(() => {
1115
- if (!(u == null || v == null))
1120
+ if (!(u == null || b == null))
1116
1121
  return u.setTail({
1117
1122
  label: h,
1118
- href: v,
1123
+ href: b,
1119
1124
  onClick: g
1120
1125
  }), () => u.setTail(null);
1121
1126
  }, [
1122
1127
  u,
1123
1128
  h,
1124
- v,
1129
+ b,
1125
1130
  g
1126
1131
  ]);
1127
- const [C, b] = w(!o && !c && l != null && l.labels.length > i);
1132
+ const [E, y] = x(!c && !o && l != null && l.labels.length > i);
1128
1133
  return /* @__PURE__ */ t("nav", {
1129
1134
  "aria-label": "Breadcrumb",
1130
1135
  "data-basic-page-back": "",
1131
1136
  className: p("absolute top-4 left-3 flex min-w-max items-center", e),
1132
- ...a,
1133
- children: /* @__PURE__ */ y("ol", {
1137
+ ...n,
1138
+ children: /* @__PURE__ */ v("ol", {
1134
1139
  className: "m-0 flex list-none items-center p-0",
1135
- children: [r.map((k, x) => f && x > 0 && x < i - 2 ? null : /* @__PURE__ */ y(yt, { children: [f && x === i - 2 && /* @__PURE__ */ y("li", {
1140
+ children: [r.map((C, w) => f && w > 0 && w < i - 2 ? null : /* @__PURE__ */ v(xt, { children: [f && w === i - 2 && /* @__PURE__ */ v("li", {
1136
1141
  className: "m-0 flex items-center max-sm:hidden",
1137
1142
  children: [/* @__PURE__ */ t("span", {
1138
1143
  "aria-hidden": !0,
1139
1144
  className: de,
1140
1145
  children: re
1141
- }), /* @__PURE__ */ y(W.Root, { children: [/* @__PURE__ */ t(W.Trigger, { render: /* @__PURE__ */ t(ie, {
1146
+ }), /* @__PURE__ */ v(W.Root, { children: [/* @__PURE__ */ t(W.Trigger, { render: /* @__PURE__ */ t(ie, {
1142
1147
  variant: "ghost",
1143
1148
  size: "sm",
1144
1149
  "aria-label": "Hidden pages",
1145
1150
  className: "px-2",
1146
- children: Ln
1151
+ children: Oa
1147
1152
  }) }), /* @__PURE__ */ t(W.Portal, { children: /* @__PURE__ */ t(W.Positioner, {
1148
1153
  align: "start",
1149
1154
  sideOffset: 4,
1150
- children: /* @__PURE__ */ t(W.Popup, { children: r.slice(1, i - 2).map((_, P) => {
1151
- const B = _.props;
1155
+ children: /* @__PURE__ */ t(W.Popup, { children: r.slice(1, i - 2).map((S, O) => {
1156
+ const R = S.props;
1152
1157
  return /* @__PURE__ */ t(W.LinkItem, {
1153
1158
  render: /* @__PURE__ */ t(d, {
1154
- href: B.href,
1155
- onClick: B.onClick
1159
+ href: R.href,
1160
+ onClick: R.onClick
1156
1161
  }),
1157
- children: B.children ?? "Back"
1158
- }, _.key ?? P);
1162
+ children: R.children ?? "Back"
1163
+ }, S.key ?? O);
1159
1164
  }) })
1160
1165
  }) })] })]
1161
1166
  }), /* @__PURE__ */ t("li", {
1162
- className: p("m-0 flex items-center", x < i - 1 && "max-sm:hidden"),
1163
- children: /* @__PURE__ */ t(Je.Provider, {
1167
+ className: p("m-0 flex items-center", w < i - 1 && "max-sm:hidden"),
1168
+ children: /* @__PURE__ */ t(Ze.Provider, {
1164
1169
  value: {
1165
- index: x,
1170
+ index: w,
1166
1171
  count: i,
1167
1172
  departing: l,
1168
- narrow: c
1173
+ narrow: o
1169
1174
  },
1170
- children: k
1175
+ children: C
1171
1176
  })
1172
- })] }, k.key ?? x)), C && /* @__PURE__ */ t("li", {
1177
+ })] }, C.key ?? w)), E && /* @__PURE__ */ t("li", {
1173
1178
  "aria-hidden": !0,
1174
1179
  className: "m-0 flex items-center max-sm:hidden",
1175
1180
  children: /* @__PURE__ */ t(N.span, {
1176
1181
  initial: { opacity: 1 },
1177
1182
  animate: { opacity: 0 },
1178
- transition: $e,
1179
- onAnimationComplete: () => b(!1),
1183
+ transition: qe,
1184
+ onAnimationComplete: () => y(!1),
1180
1185
  className: de,
1181
1186
  children: re
1182
1187
  })
@@ -1184,18 +1189,18 @@ function Ze({ className: e, children: n, ...a }) {
1184
1189
  })
1185
1190
  });
1186
1191
  }
1187
- var de = "text-pho-description -mx-1 inline-flex shrink-0 text-base select-none", re = "/", On = 4, Ln = "…";
1188
- function et({ href: e, className: n, morphId: a, children: r = "Back", ...s }) {
1189
- const l = R(Je), c = L(), o = a != null && !c, i = qe(o ? a : void 0);
1192
+ var de = "text-pho-description -mx-1 inline-flex shrink-0 text-base select-none", re = "/", Ia = 4, Oa = "…";
1193
+ function tt({ href: e, className: a, morphId: n, children: r = "Back", ...s }) {
1194
+ const l = T(Ze), o = B(), c = n != null && !o, i = We(c ? n : void 0);
1190
1195
  if (l == null) throw new Error("BasicPage.Crumb must be rendered inside BasicPage.Breadcrumbs");
1191
- const { index: d, count: f, departing: u, narrow: m } = l, h = d === 0, v = d === f - 1, g = u != null && u.labels.length < f, C = u != null && u.labels.length > f, b = v && (u == null || g || m), k = h || v, x = h && v ? "" : h ? "max-sm:hidden" : "sm:hidden", _ = u != null, P = v ? m ? C ? "slide" : "fade" : b ? "fade" : void 0 : void 0, [B, I] = w(o && m && i.fly && u != null && !C ? u.labels[u.labels.length - 1] : null), D = o && k && !_, q = o && !h && v && (u == null || g);
1192
- return /* @__PURE__ */ y(he, { children: [!h && /* @__PURE__ */ t("span", {
1196
+ const { index: d, count: f, departing: u, narrow: m } = l, h = d === 0, b = d === f - 1, g = u != null && u.labels.length < f, E = u != null && u.labels.length > f, y = b && (u == null || g || m), C = h || b, w = h && b ? "" : h ? "max-sm:hidden" : "sm:hidden", S = u != null, O = b ? m ? E ? "slide" : "fade" : y ? "fade" : void 0 : void 0, [R, I] = x(c && m && i.fly && u != null && !E ? u.labels[u.labels.length - 1] : null), D = c && C && !S, j = c && !h && b && (u == null || g);
1197
+ return /* @__PURE__ */ v(he, { children: [!h && /* @__PURE__ */ t("span", {
1193
1198
  "aria-hidden": !0,
1194
1199
  className: p(de, "max-sm:hidden"),
1195
- children: q ? /* @__PURE__ */ t(N.span, {
1200
+ children: j ? /* @__PURE__ */ t(N.span, {
1196
1201
  initial: i.fly ? {
1197
1202
  opacity: 0,
1198
- x: Se
1203
+ x: Te
1199
1204
  } : { opacity: 0 },
1200
1205
  animate: i.fly ? {
1201
1206
  opacity: 1,
@@ -1209,70 +1214,70 @@ function et({ href: e, className: n, morphId: a, children: r = "Back", ...s }) {
1209
1214
  variant: "ghost",
1210
1215
  size: "sm",
1211
1216
  href: e,
1212
- prefix: k ? D ? /* @__PURE__ */ t(N.span, {
1217
+ prefix: C ? D ? /* @__PURE__ */ t(N.span, {
1213
1218
  initial: i.fly ? {
1214
1219
  opacity: 0,
1215
- x: Se
1220
+ x: Te
1216
1221
  } : { opacity: 0 },
1217
1222
  animate: i.fly ? {
1218
1223
  opacity: 1,
1219
1224
  x: 0
1220
1225
  } : { opacity: 1 },
1221
1226
  transition: i.fly ? Re : M,
1222
- className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", x),
1223
- children: /* @__PURE__ */ t(ne, {})
1227
+ className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", w),
1228
+ children: /* @__PURE__ */ t(ae, {})
1224
1229
  }) : /* @__PURE__ */ t("span", {
1225
- className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", x),
1226
- children: /* @__PURE__ */ t(ne, {})
1230
+ className: p("inline-flex [&>svg]:size-[1.125em] [&>svg]:shrink-0", w),
1231
+ children: /* @__PURE__ */ t(ae, {})
1227
1232
  }) : /* @__PURE__ */ t("span", { className: "hidden" }),
1228
- className: p("min-w-max", n),
1233
+ className: p("min-w-max", a),
1229
1234
  ...s,
1230
- children: o && a != null ? /* @__PURE__ */ y("span", {
1231
- className: p("relative block", !i.fly && P === "slide" && "overflow-hidden", !v && "max-w-40 truncate"),
1232
- children: [/* @__PURE__ */ t(We, {
1233
- morphId: a,
1235
+ children: c && n != null ? /* @__PURE__ */ v("span", {
1236
+ className: p("relative block", !i.fly && O === "slide" && "overflow-hidden", !b && "max-w-40 truncate"),
1237
+ children: [/* @__PURE__ */ t(Ke, {
1238
+ morphId: n,
1234
1239
  fromClassName: "text-pho-primary",
1235
1240
  fly: i.fly,
1236
1241
  morphRef: i.ref,
1237
- arrival: P,
1242
+ arrival: O,
1238
1243
  children: r
1239
- }), B != null && /* @__PURE__ */ t(N.span, {
1244
+ }), R != null && /* @__PURE__ */ t(N.span, {
1240
1245
  "aria-hidden": !0,
1241
1246
  initial: {
1242
1247
  x: 0,
1243
1248
  opacity: 1
1244
1249
  },
1245
1250
  animate: {
1246
- x: Ft,
1251
+ x: Ht,
1247
1252
  opacity: 0
1248
1253
  },
1249
- transition: Gt,
1254
+ transition: Ft,
1250
1255
  onAnimationComplete: () => I(null),
1251
1256
  className: "pointer-events-none absolute inset-y-0 left-0 whitespace-nowrap",
1252
- children: B
1257
+ children: R
1253
1258
  })]
1254
1259
  }) : /* @__PURE__ */ t("span", {
1255
- className: p("block", !v && "max-w-40 truncate"),
1260
+ className: p("block", !b && "max-w-40 truncate"),
1256
1261
  children: r
1257
1262
  })
1258
1263
  })] });
1259
1264
  }
1260
- function Bn({ className: e, ...n }) {
1261
- return /* @__PURE__ */ t(Ze, {
1265
+ function La({ className: e, ...a }) {
1266
+ return /* @__PURE__ */ t(et, {
1262
1267
  className: e,
1263
- children: /* @__PURE__ */ t(et, { ...n })
1268
+ children: /* @__PURE__ */ t(tt, { ...a })
1264
1269
  });
1265
1270
  }
1266
- function Mn({ label: e, description: n, leading: a, href: r, className: s, children: l, ...c }) {
1267
- const o = Me(), i = $(() => N.create(o), [o]), { leaving: d, ...f } = Ne();
1268
- return /* @__PURE__ */ y(i, {
1271
+ function Ba({ label: e, description: a, leading: n, href: r, className: s, children: l, ...o }) {
1272
+ const c = De(), i = $(() => N.create(c), [c]), { leaving: d, ...f } = Ne();
1273
+ return /* @__PURE__ */ v(i, {
1269
1274
  href: r,
1270
1275
  ...f,
1271
- ...c,
1276
+ ...o,
1272
1277
  className: p("flex min-h-[4.25rem] min-w-0 flex-row items-center justify-between gap-6 px-5 py-4", "group outline-pho-brand hover:bg-pho-primary-hover cursor-pointer transition-colors focus-visible:outline-2 focus-visible:-outline-offset-2", "aria-[current=page]:bg-pho-primary-hover", "first:rounded-t-[calc(var(--radius-base)-1px)] last:rounded-b-[calc(var(--radius-base)-1px)]", d && "overflow-hidden", s),
1273
- children: [/* @__PURE__ */ y("div", {
1274
- className: p("flex min-w-0 flex-1 items-center", a != null && "gap-3"),
1275
- children: [a, /* @__PURE__ */ y("div", {
1278
+ children: [/* @__PURE__ */ v("div", {
1279
+ className: p("flex min-w-0 flex-1 items-center", n != null && "gap-3"),
1280
+ children: [n, /* @__PURE__ */ v("div", {
1276
1281
  className: "min-w-0",
1277
1282
  children: [/* @__PURE__ */ t("div", {
1278
1283
  className: "flex min-w-0 items-center gap-1",
@@ -1280,103 +1285,103 @@ function Mn({ label: e, description: n, leading: a, href: r, className: s, child
1280
1285
  className: "text-pho-primary truncate text-base font-medium",
1281
1286
  children: e
1282
1287
  }) : e
1283
- }), n ? /* @__PURE__ */ t("div", {
1288
+ }), a ? /* @__PURE__ */ t("div", {
1284
1289
  className: "text-pho-description truncate text-xs",
1285
- children: n
1290
+ children: a
1286
1291
  }) : null]
1287
1292
  })]
1288
- }), /* @__PURE__ */ y("div", {
1293
+ }), /* @__PURE__ */ v("div", {
1289
1294
  className: "flex min-w-0 items-center justify-end gap-2",
1290
1295
  children: [l != null ? /* @__PURE__ */ t("div", {
1291
1296
  className: "min-w-0",
1292
1297
  children: l
1293
- }) : null, /* @__PURE__ */ t(At, {
1298
+ }) : null, /* @__PURE__ */ t(ut, {
1294
1299
  "aria-hidden": !0,
1295
1300
  className: "text-pho-secondary group-hover:text-pho-secondary-hover size-4 shrink-0 transition-colors"
1296
1301
  })]
1297
1302
  })]
1298
1303
  });
1299
1304
  }
1300
- function Dn({ open: e, variant: n = "overlay", modal: a = !1, placeholder: r, onClose: s, children: l }) {
1301
- const c = R(ze), o = e ?? Y.toArray(l).length > 0, i = c?.setOpen, d = c?.setPresent;
1305
+ function Ma({ open: e, variant: a = "overlay", modal: n = !1, placeholder: r, onClose: s, children: l }) {
1306
+ const o = T(Ve), c = e ?? Y.toArray(l).length > 0, i = o?.setOpen, d = o?.setPresent;
1302
1307
  return V(() => {
1303
1308
  if (d != null)
1304
1309
  return d(!0), () => d(!1);
1305
1310
  }, [d]), V(() => {
1306
1311
  if (i != null)
1307
- return i(o), () => i(!1);
1308
- }, [i, o]), O(() => {
1309
- c == null && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn("BasicPage.Aside: needs a `BasicPage.Root` around it.");
1310
- }, [c]), c == null || c.slot == null ? null : c.presentation === "page" ? Ce(o ? /* @__PURE__ */ t("div", {
1312
+ return i(c), () => i(!1);
1313
+ }, [i, c]), L(() => {
1314
+ o == null && typeof process < "u" && process.env.NODE_ENV !== "production" && console.warn("BasicPage.Aside: needs a `BasicPage.Root` around it.");
1315
+ }, [o]), o == null || o.slot == null ? null : o.presentation === "page" ? Ce(c ? /* @__PURE__ */ t("div", {
1311
1316
  "data-basic-page-aside": "page",
1312
1317
  className: "flex min-w-0 flex-1 flex-col",
1313
1318
  children: l
1314
- }) : null, c.slot) : n === "inline" ? Ce(/* @__PURE__ */ t(Hn, {
1315
- width: c.width,
1316
- paneHeight: c.paneHeight,
1319
+ }) : null, o.slot) : a === "inline" ? Ce(/* @__PURE__ */ t(Da, {
1320
+ width: o.width,
1321
+ paneHeight: o.paneHeight,
1317
1322
  onClose: s,
1318
- open: o,
1323
+ open: c,
1319
1324
  placeholder: r,
1320
1325
  children: l
1321
- }), c.slot) : /* @__PURE__ */ t(Fn, {
1322
- container: c.slot,
1323
- width: c.width,
1324
- paneHeight: c.paneHeight,
1326
+ }), o.slot) : /* @__PURE__ */ t(Ha, {
1327
+ container: o.slot,
1328
+ width: o.width,
1329
+ paneHeight: o.paneHeight,
1325
1330
  onClose: s,
1326
- open: o,
1327
- modal: a,
1331
+ open: c,
1332
+ modal: n,
1328
1333
  children: l
1329
1334
  });
1330
1335
  }
1331
- function tt() {
1332
- const [e, n] = w(null), a = $(() => ({ setBack: n }), []), r = E(null);
1336
+ function at() {
1337
+ const [e, a] = x(null), n = $(() => ({ setBack: a }), []), r = _(null);
1333
1338
  return {
1334
1339
  back: e,
1335
- panel: a,
1340
+ panel: n,
1336
1341
  closeRef: r,
1337
- leave: Fe(() => {
1342
+ leave: Ge(() => {
1338
1343
  const s = r.current?.querySelector("a, button");
1339
1344
  return s == null ? !1 : (s.click(), !0);
1340
1345
  }, [])
1341
1346
  };
1342
1347
  }
1343
- var Le = {
1348
+ var Be = {
1344
1349
  variant: "ghost",
1345
1350
  size: "sm",
1346
1351
  svgOnly: !0,
1347
1352
  "aria-label": "Close",
1348
- children: /* @__PURE__ */ t(mt, {})
1353
+ children: /* @__PURE__ */ t(ht, {})
1349
1354
  };
1350
- function nt({ back: e, onClose: n, closeRef: a, panel: r, children: s }) {
1351
- return /* @__PURE__ */ y(he, { children: [/* @__PURE__ */ t("span", {
1352
- ref: a,
1355
+ function nt({ back: e, onClose: a, closeRef: n, panel: r, children: s }) {
1356
+ return /* @__PURE__ */ v(he, { children: [/* @__PURE__ */ t("span", {
1357
+ ref: n,
1353
1358
  className: "absolute top-2 right-2 z-30",
1354
1359
  children: e != null ? /* @__PURE__ */ t(pe, {
1355
- ...Le,
1360
+ ...Be,
1356
1361
  href: e.href,
1357
1362
  onClick: e.onClick
1358
- }) : n != null ? /* @__PURE__ */ t(ie, {
1359
- ...Le,
1360
- onClick: n
1363
+ }) : a != null ? /* @__PURE__ */ t(ie, {
1364
+ ...Be,
1365
+ onClick: a
1361
1366
  }) : null
1362
- }), /* @__PURE__ */ y(Q.Root, {
1367
+ }), /* @__PURE__ */ v(Q.Root, {
1363
1368
  className: "min-h-0 flex-1",
1364
1369
  children: [/* @__PURE__ */ t(Q.Viewport, { children: /* @__PURE__ */ t(Q.Content, {
1365
1370
  className: "flex min-h-full flex-col",
1366
- children: /* @__PURE__ */ t(Ve.Provider, {
1371
+ children: /* @__PURE__ */ t($e.Provider, {
1367
1372
  value: r,
1368
1373
  children: s
1369
1374
  })
1370
1375
  }) }), /* @__PURE__ */ t(Q.Scrollbar, { children: /* @__PURE__ */ t(Q.Thumb, {}) })]
1371
1376
  })] });
1372
1377
  }
1373
- function Hn({ width: e, paneHeight: n, onClose: a, open: r, placeholder: s, children: l }) {
1374
- const c = L(), { back: o, panel: i, closeRef: d, leave: f } = tt(), u = c ? "blur(0px)" : `blur(${De}px)`, m = n ?? "100dvh";
1375
- O(() => {
1376
- const v = (g) => {
1378
+ function Da({ width: e, paneHeight: a, onClose: n, open: r, placeholder: s, children: l }) {
1379
+ const o = B(), { back: c, panel: i, closeRef: d, leave: f } = at(), u = o ? "blur(0px)" : `blur(${He}px)`, m = a ?? "100dvh";
1380
+ L(() => {
1381
+ const b = (g) => {
1377
1382
  g.key !== "Escape" || g.defaultPrevented || f() && g.preventDefault();
1378
1383
  };
1379
- return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
1384
+ return document.addEventListener("keydown", b), () => document.removeEventListener("keydown", b);
1380
1385
  }, [f]);
1381
1386
  const h = {
1382
1387
  initial: {
@@ -1391,7 +1396,7 @@ function Hn({ width: e, paneHeight: n, onClose: a, open: r, placeholder: s, chil
1391
1396
  opacity: 0,
1392
1397
  filter: u
1393
1398
  },
1394
- transition: c ? { duration: 0 } : xe
1399
+ transition: o ? { duration: 0 } : xe
1395
1400
  };
1396
1401
  return /* @__PURE__ */ t("aside", {
1397
1402
  "data-basic-page-aside": "panel",
@@ -1410,8 +1415,8 @@ function Hn({ width: e, paneHeight: n, onClose: a, open: r, placeholder: s, chil
1410
1415
  ...h,
1411
1416
  className: "relative flex flex-col",
1412
1417
  children: /* @__PURE__ */ t(nt, {
1413
- back: o,
1414
- onClose: a,
1418
+ back: c,
1419
+ onClose: n,
1415
1420
  closeRef: d,
1416
1421
  panel: i,
1417
1422
  children: l
@@ -1425,8 +1430,8 @@ function Hn({ width: e, paneHeight: n, onClose: a, open: r, placeholder: s, chil
1425
1430
  })
1426
1431
  });
1427
1432
  }
1428
- function Fn({ container: e, width: n, paneHeight: a, onClose: r, open: s, modal: l, children: c }) {
1429
- const { back: o, panel: i, closeRef: d, leave: f } = tt(), u = a ?? "100dvh";
1433
+ function Ha({ container: e, width: a, paneHeight: n, onClose: r, open: s, modal: l, children: o }) {
1434
+ const { back: c, panel: i, closeRef: d, leave: f } = at(), u = n ?? "100dvh";
1430
1435
  return /* @__PURE__ */ t(te.Root, {
1431
1436
  open: s,
1432
1437
  modal: l ? "trap-focus" : !1,
@@ -1434,7 +1439,7 @@ function Fn({ container: e, width: n, paneHeight: a, onClose: r, open: s, modal:
1434
1439
  onOpenChange: (m, h) => {
1435
1440
  m || (h.cancel(), f());
1436
1441
  },
1437
- children: /* @__PURE__ */ y(te.Portal, {
1442
+ children: /* @__PURE__ */ v(te.Portal, {
1438
1443
  container: e,
1439
1444
  className: "contents",
1440
1445
  children: [l ? /* @__PURE__ */ t(te.Backdrop, {
@@ -1447,31 +1452,31 @@ function Fn({ container: e, width: n, paneHeight: a, onClose: r, open: s, modal:
1447
1452
  initialFocus: l ? void 0 : !1,
1448
1453
  finalFocus: l ? void 0 : !1,
1449
1454
  className: p("absolute inset-y-0 right-0 z-30 flex flex-col outline-none", "transition-[translate,opacity] duration-250 ease-out motion-reduce:transition-none", "data-[ending-style]:translate-x-3 data-[ending-style]:opacity-0 data-[ending-style]:duration-200 data-[starting-style]:translate-x-3 data-[starting-style]:opacity-0"),
1450
- style: { width: n },
1455
+ style: { width: a },
1451
1456
  children: /* @__PURE__ */ t("div", {
1452
1457
  className: "border-pho-secondary bg-pho-primary shadow-pho-xl sticky top-0 flex flex-col border-l",
1453
1458
  style: { height: u },
1454
1459
  children: /* @__PURE__ */ t(nt, {
1455
- back: o,
1460
+ back: c,
1456
1461
  onClose: r,
1457
1462
  closeRef: d,
1458
1463
  panel: i,
1459
- children: c
1464
+ children: o
1460
1465
  })
1461
1466
  })
1462
1467
  })]
1463
1468
  })
1464
1469
  });
1465
1470
  }
1466
- var Gn = "14rem", zn = "transition-[width] duration-[330ms] ease-pho-spring motion-reduce:transition-none", Be = "transition-[opacity,visibility] duration-200 ease-out motion-reduce:transition-none";
1467
- function Vn({ variant: e = "box", fold: n = "auto", value: a, onValueChange: r, placeholder: s, label: l, className: c, ...o }) {
1468
- const i = R(fe), d = me(i?.subscribe ?? ye, () => i?.get().api ?? null, () => null), f = a != null;
1469
- O(() => {
1471
+ var Fa = "14rem", Ga = "transition-[width] duration-[330ms] ease-pho-spring motion-reduce:transition-none", Me = "transition-[opacity,visibility] duration-200 ease-out motion-reduce:transition-none";
1472
+ function za({ variant: e = "box", fold: a = "auto", value: n, onValueChange: r, placeholder: s, label: l, className: o, ...c }) {
1473
+ const i = T(fe), d = me(i?.subscribe ?? ve, () => i?.get().api ?? null, () => null), f = n != null;
1474
+ L(() => {
1470
1475
  if (!(i == null || f))
1471
1476
  return i.adopt(!0), () => i.adopt(!1);
1472
1477
  }, [i, f]);
1473
1478
  const u = f ? {
1474
- query: a,
1479
+ query: n,
1475
1480
  setQuery: r,
1476
1481
  placeholder: s ?? "Search",
1477
1482
  label: l ?? s ?? "Search"
@@ -1480,39 +1485,39 @@ function Vn({ variant: e = "box", fold: n = "auto", value: a, onValueChange: r,
1480
1485
  setQuery: d.setQuery,
1481
1486
  placeholder: d.placeholder,
1482
1487
  label: l ?? d.placeholder
1483
- }, [m, h] = w(!1), v = E(null), g = m || (u?.query ?? "") !== "";
1484
- if (O(() => {
1488
+ }, [m, h] = x(!1), b = _(null), g = m || (u?.query ?? "") !== "";
1489
+ if (L(() => {
1485
1490
  if (!m) return;
1486
- let b = 0, k = 0;
1487
- const x = () => {
1488
- const _ = v.current;
1489
- _ != null && (_.focus(), document.activeElement !== _ && k++ < 5 && (b = requestAnimationFrame(x)));
1491
+ let y = 0, C = 0;
1492
+ const w = () => {
1493
+ const S = b.current;
1494
+ S != null && (S.focus(), document.activeElement !== S && C++ < 5 && (y = requestAnimationFrame(w)));
1490
1495
  };
1491
- return b = requestAnimationFrame(x), () => cancelAnimationFrame(b);
1496
+ return y = requestAnimationFrame(w), () => cancelAnimationFrame(y);
1492
1497
  }, [m]), e === "ghost") return /* @__PURE__ */ t("div", {
1493
1498
  "data-basic-page-search": "",
1494
1499
  "data-variant": "ghost",
1495
- className: p("flex min-w-0 flex-1", u == null && "hidden", c),
1496
- ...o,
1497
- children: u != null && /* @__PURE__ */ t(pt, {
1500
+ className: p("flex min-w-0 flex-1", u == null && "hidden", o),
1501
+ ...c,
1502
+ children: u != null && /* @__PURE__ */ t(ft, {
1498
1503
  value: u.query,
1499
1504
  onChange: u.setQuery,
1500
1505
  placeholder: u.placeholder,
1501
1506
  "aria-label": u.label,
1502
- onKeyDown: (b) => {
1503
- b.key === "Escape" && (b.preventDefault(), u.setQuery(""), b.currentTarget.blur());
1507
+ onKeyDown: (y) => {
1508
+ y.key === "Escape" && (y.preventDefault(), u.setQuery(""), y.currentTarget.blur());
1504
1509
  }
1505
1510
  })
1506
1511
  });
1507
- const C = n === "auto";
1512
+ const E = a === "auto";
1508
1513
  return /* @__PURE__ */ t("div", {
1509
1514
  "data-basic-page-search": "",
1510
1515
  "data-expanded": g || void 0,
1511
- className: p("grid min-w-0 content-center", "[[data-basic-page-header]>&]:col-start-2 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:justify-items-end [[data-basic-page-header]>&]:self-center", "[[data-basic-page-header]:has([data-basic-page-header-action])>&]:self-start", u == null && "hidden", c),
1512
- ...o,
1513
- children: u != null && /* @__PURE__ */ y("div", {
1514
- className: p("grid w-9 max-w-full justify-items-end *:[grid-area:1/1]", zn, C && "@[36rem]:w-56"),
1515
- style: g ? { width: Gn } : void 0,
1516
+ className: p("grid min-w-0 content-center", "[[data-basic-page-header]>&]:col-start-2 [[data-basic-page-header]>&]:row-span-2 [[data-basic-page-header]>&]:row-start-1 [[data-basic-page-header]>&]:ml-4 [[data-basic-page-header]>&]:justify-items-end [[data-basic-page-header]>&]:self-start", u == null && "hidden", o),
1517
+ ...c,
1518
+ children: u != null && /* @__PURE__ */ v("div", {
1519
+ className: p("grid w-9 max-w-full justify-items-end *:[grid-area:1/1]", Ga, E && "@[36rem]:w-56"),
1520
+ style: g ? { width: Fa } : void 0,
1516
1521
  children: [/* @__PURE__ */ t(ie, {
1517
1522
  variant: "outlined",
1518
1523
  size: "sm",
@@ -1522,24 +1527,24 @@ function Vn({ variant: e = "box", fold: n = "auto", value: a, onValueChange: r,
1522
1527
  "aria-hidden": g || void 0,
1523
1528
  tabIndex: g ? -1 : void 0,
1524
1529
  onClick: () => h(!0),
1525
- className: p(Be, g ? "pointer-events-none invisible opacity-0" : "visible opacity-100", C && "@[36rem]:pointer-events-none @[36rem]:invisible @[36rem]:opacity-0"),
1530
+ className: p(Me, g ? "pointer-events-none invisible opacity-0" : "visible opacity-100", E && "@[36rem]:pointer-events-none @[36rem]:invisible @[36rem]:opacity-0"),
1526
1531
  children: /* @__PURE__ */ t(Ee, {})
1527
1532
  }), /* @__PURE__ */ t("div", {
1528
- inert: !C && !g,
1529
- className: p("w-full min-w-0", Be, g ? "visible opacity-100" : "pointer-events-none invisible opacity-0", C && "@[36rem]:pointer-events-auto @[36rem]:visible @[36rem]:opacity-100"),
1530
- children: /* @__PURE__ */ y(le.Root, {
1533
+ inert: !E && !g,
1534
+ className: p("w-full min-w-0", Me, g ? "visible opacity-100" : "pointer-events-none invisible opacity-0", E && "@[36rem]:pointer-events-auto @[36rem]:visible @[36rem]:opacity-100"),
1535
+ children: /* @__PURE__ */ v(le.Root, {
1531
1536
  size: "sm",
1532
1537
  className: "w-full",
1533
1538
  children: [/* @__PURE__ */ t(le.Addon, { children: /* @__PURE__ */ t(Ee, {}) }), /* @__PURE__ */ t(le.Input, {
1534
- ref: v,
1539
+ ref: b,
1535
1540
  type: "search",
1536
1541
  value: u.query,
1537
- onChange: (b) => u.setQuery(b.target.value),
1542
+ onChange: (y) => u.setQuery(y.target.value),
1538
1543
  onBlur: () => {
1539
1544
  u.query === "" && h(!1);
1540
1545
  },
1541
- onKeyDown: (b) => {
1542
- b.key === "Escape" && (b.preventDefault(), u.setQuery(""), h(!1), b.currentTarget.blur());
1546
+ onKeyDown: (y) => {
1547
+ y.key === "Escape" && (y.preventDefault(), u.setQuery(""), h(!1), y.currentTarget.blur());
1543
1548
  },
1544
1549
  placeholder: u.placeholder,
1545
1550
  "aria-label": u.label
@@ -1549,58 +1554,58 @@ function Vn({ variant: e = "box", fold: n = "auto", value: a, onValueChange: r,
1549
1554
  })
1550
1555
  });
1551
1556
  }
1552
- var ga = {
1553
- Root: It,
1554
- Aside: Dn,
1555
- Search: Vn,
1556
- Table: dt,
1557
- CondenseScope: $t,
1558
- Breadcrumbs: Ze,
1559
- Crumb: et,
1560
- Back: Bn,
1561
- Title: Xt,
1557
+ var gn = {
1558
+ Root: Pt,
1559
+ Aside: Ma,
1560
+ Search: za,
1561
+ Table: pt,
1562
+ CondenseScope: Vt,
1563
+ Breadcrumbs: et,
1564
+ Crumb: tt,
1565
+ Back: La,
1566
+ Title: Kt,
1562
1567
  Stack: Zt,
1563
- Header: en,
1564
- HeaderAction: tn,
1565
- SectionTitle: nn,
1566
- Description: Qe,
1567
- TableCount: an,
1568
- SectionFooter: rn,
1569
- Card: sn,
1570
- Item: ln,
1571
- ItemPanel: on,
1572
- Callout: cn,
1573
- CalloutTitle: un,
1574
- CalloutDescription: dn,
1575
- Onboard: pn,
1576
- Step: bn,
1577
- Row: yn,
1578
- RowLink: Mn,
1579
- Value: xn,
1580
- Alert: wn,
1581
- Footer: Sn,
1582
- Form: Nn,
1583
- Saved: An,
1584
- Fields: Cn,
1585
- Inline: _n,
1586
- Submit: kn,
1587
- Reveal: Ae
1568
+ Header: ea,
1569
+ HeaderAction: ta,
1570
+ SectionTitle: aa,
1571
+ Description: Ye,
1572
+ TableCount: na,
1573
+ SectionFooter: ra,
1574
+ Card: ia,
1575
+ Item: sa,
1576
+ ItemPanel: la,
1577
+ Callout: oa,
1578
+ CalloutTitle: ca,
1579
+ CalloutDescription: ua,
1580
+ Onboard: da,
1581
+ Step: ba,
1582
+ Row: ya,
1583
+ RowLink: Ba,
1584
+ Value: va,
1585
+ Alert: xa,
1586
+ Footer: Sa,
1587
+ Form: wa,
1588
+ Saved: Na,
1589
+ Fields: _a,
1590
+ Inline: Ea,
1591
+ Submit: Ca,
1592
+ Reveal: _e
1588
1593
  };
1589
1594
  export {
1590
- _t as a,
1591
- ga as c,
1592
- jt as d,
1595
+ Et as a,
1596
+ gn as c,
1597
+ $t as d,
1593
1598
  ce as f,
1594
- Ct as i,
1599
+ _t as i,
1595
1600
  xe as l,
1596
- fa as m,
1597
- _e as n,
1598
- kt as o,
1599
- ma as p,
1600
- Ge as r,
1601
- Et as s,
1602
- ha as t,
1603
- Pe as u
1601
+ fn as m,
1602
+ Se as n,
1603
+ Ct as o,
1604
+ mn as p,
1605
+ ze as r,
1606
+ At as s,
1607
+ hn as t,
1608
+ Ie as u
1604
1609
  };
1605
1610
 
1606
- //# sourceMappingURL=basic-page-CJwG4I83.js.map
1611
+ //# sourceMappingURL=basic-page-CVZT_zaH.js.map