@mt-gloss/ui 0.1.138 → 0.1.140

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,85 +1,85 @@
1
- import { u as O, g as ke, m as be, n as K, l as De, S as Le, e as Me, o as Oe } from "./COMMITS-aGwevMtR.js";
2
- import { C as en, N as tn, w as nn, x as an, q as sn, f as rn, v as on, P as ln, t as cn, k as dn, j as un, i as pn, h as mn } from "./COMMITS-aGwevMtR.js";
3
- import { jsx as a, jsxs as f, Fragment as q } from "react/jsx-runtime";
4
- import * as H from "react";
5
- import R, { useState as A, useRef as Q, createContext as ye, useContext as ve, useMemo as ce, useEffect as z, useCallback as M, useLayoutEffect as Ie } from "react";
6
- import { SPIN_COMMIT_REDUCED as Re, SPIN_COMMIT_FULL as $e } from "@mt-gloss/motion";
7
- import { useMotionValue as de, animate as B, motion as Fe } from "framer-motion";
8
- import { useSensors as Ue, useSensor as ue, PointerSensor as ze, KeyboardSensor as He, DndContext as Be, closestCenter as Ye } from "@dnd-kit/core";
9
- import { sortableKeyboardCoordinates as Ve, SortableContext as Ke, horizontalListSortingStrategy as qe, arrayMove as Qe, useSortable as We } from "@dnd-kit/sortable";
1
+ import { u as M, g as xe, m as ae, n as z, l as Ae, S as De, e as Me, o as Le } from "./COMMITS-DEdHYT0E.js";
2
+ import { C as Wt, N as jt, w as Zt, x as Xt, q as Jt, f as en, v as tn, P as nn, t as an, k as sn, j as on, i as rn, h as ln } from "./COMMITS-DEdHYT0E.js";
3
+ import { jsx as a, jsxs as b, Fragment as ge } from "react/jsx-runtime";
4
+ import * as U from "react";
5
+ import I, { useState as E, useRef as K, createContext as ye, useContext as be, useMemo as ie, useEffect as F, useCallback as k, useLayoutEffect as ke } from "react";
6
+ import { SPIN_COMMIT_REDUCED as Oe, SPIN_COMMIT_FULL as Ie } from "@mt-gloss/motion";
7
+ import { useMotionValue as ce, animate as B, motion as Re } from "framer-motion";
8
+ import { useSensors as $e, useSensor as de, PointerSensor as Fe, KeyboardSensor as ze, DndContext as He, closestCenter as Ue } from "@dnd-kit/core";
9
+ import { sortableKeyboardCoordinates as Be, SortableContext as Ye, horizontalListSortingStrategy as Ve, arrayMove as Ke, useSortable as qe } from "@dnd-kit/sortable";
10
10
  import { CSS as Ge } from "@dnd-kit/utilities";
11
- import { M as pe } from "./MetricCard-DOPtBpek.js";
12
- function Ht() {
13
- const e = O();
11
+ import { M as ue } from "./MetricCard-DOPtBpek.js";
12
+ function Rt() {
13
+ const e = M();
14
14
  if (e?.state.activePanelId !== "settings") return null;
15
15
  const t = e.state.activeTrigger;
16
16
  return t?.kind === "card-overflow" ? t.cardId : null;
17
17
  }
18
- function je({ span: e, rotating: t = !0, children: r }) {
19
- const l = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = r != null ? "full" : "fallback";
20
- return /* @__PURE__ */ a("div", { className: l, "data-clone-fidelity": n, children: r });
18
+ function ve({ span: e, rotating: t = !0, children: s }) {
19
+ const r = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = s != null ? "full" : "fallback";
20
+ return /* @__PURE__ */ a("div", { className: r, "data-clone-fidelity": n, children: s });
21
21
  }
22
- const Ze = 500, Xe = 1, Je = "var(--gloss-color-primary, #6366f1)";
23
- function et({
22
+ const Qe = 500, We = 1, je = "var(--gloss-color-primary, #6366f1)";
23
+ function Ze({
24
24
  children: e,
25
25
  spinTrigger: t,
26
- onSpinComplete: r,
27
- spinDuration: l,
26
+ onSpinComplete: s,
27
+ spinDuration: r,
28
28
  spinRotations: n,
29
- accentColor: i
29
+ accentColor: c
30
30
  }) {
31
- const u = de(0), o = de(1), s = H.useRef(null), c = H.useMemo(() => ke() === "reduced", []), d = H.useRef(t);
32
- return H.useEffect(() => {
31
+ const p = ce(0), o = ce(1), i = U.useRef(null), l = U.useMemo(() => xe() === "reduced", []), d = U.useRef(t);
32
+ return U.useEffect(() => {
33
33
  if (t === void 0 || t === d.current) return;
34
34
  d.current = t;
35
- const h = (l ?? Ze) / 1e3, y = n ?? Xe, p = s.current;
36
- if (c) {
37
- const _ = [];
38
- if (p) {
35
+ const h = (r ?? Qe) / 1e3, y = n ?? We, m = i.current;
36
+ if (l) {
37
+ const g = [];
38
+ if (m) {
39
39
  const x = B(
40
- p,
40
+ m,
41
41
  { opacity: [0, 0.4, 0] },
42
- Re
42
+ Oe
43
43
  );
44
- _.push(x), x.then(() => {
45
- r?.();
44
+ g.push(x), x.then(() => {
45
+ s?.();
46
46
  });
47
47
  } else
48
48
  Promise.resolve().then(() => {
49
- r?.();
49
+ s?.();
50
50
  });
51
51
  return () => {
52
- _.forEach((x) => x.stop());
52
+ g.forEach((x) => x.stop());
53
53
  };
54
54
  }
55
- const v = { ...$e, duration: h }, T = B(u, [0, 360 * y], v), S = B(o, [1, 1.03, 1], v), b = [T, S];
56
- if (p) {
57
- const _ = B(
58
- p,
55
+ const v = { ...Ie, duration: h }, _ = B(p, [0, 360 * y], v), N = B(o, [1, 1.03, 1], v), w = [_, N];
56
+ if (m) {
57
+ const g = B(
58
+ m,
59
59
  { opacity: [0, 0.6, 0, 0] },
60
60
  { ...v, times: [0, 0.3, 0.8, 1] }
61
61
  );
62
- b.push(_);
62
+ w.push(g);
63
63
  }
64
- return T.then(() => {
65
- r?.();
64
+ return _.then(() => {
65
+ s?.();
66
66
  }), () => {
67
- b.forEach((_) => _.stop());
67
+ w.forEach((g) => g.stop());
68
68
  };
69
- }, [t, l, n, c, r, u, o]), /* @__PURE__ */ f(
70
- Fe.div,
69
+ }, [t, r, n, l, s, p, o]), /* @__PURE__ */ b(
70
+ Re.div,
71
71
  {
72
72
  className: "clone-stage",
73
- style: { rotateY: u, scale: o },
73
+ style: { rotateY: p, scale: o },
74
74
  children: [
75
75
  e,
76
76
  /* @__PURE__ */ a(
77
77
  "div",
78
78
  {
79
- ref: s,
79
+ ref: i,
80
80
  className: "clone-stage__accent",
81
81
  style: {
82
- "--spin-accent-color": i ?? Je
82
+ "--spin-accent-color": c ?? je
83
83
  }
84
84
  }
85
85
  )
@@ -87,67 +87,16 @@ function et({
87
87
  }
88
88
  );
89
89
  }
90
- function Bt({ primary: e, secondary: t }) {
91
- return /* @__PURE__ */ f("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
90
+ function $t({ primary: e, secondary: t }) {
91
+ return /* @__PURE__ */ b("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
92
92
  /* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-primary", children: e }),
93
93
  t != null && /* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-secondary", children: t })
94
94
  ] });
95
95
  }
96
- function tt({
97
- value: e,
98
- onChange: t,
99
- enabled: r = !1,
100
- onToggleEnabled: l
101
- }) {
102
- const n = "settings-threshold-enabled";
103
- return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
104
- /* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
105
- /* @__PURE__ */ a("label", { htmlFor: n, className: "settings-shell__toggle-label", children: "Show threshold indicator" }),
106
- /* @__PURE__ */ a(
107
- "input",
108
- {
109
- id: n,
110
- type: "checkbox",
111
- role: "switch",
112
- "aria-label": "Enable threshold indicator",
113
- "aria-checked": r,
114
- checked: r,
115
- onChange: (i) => l?.(i.target.checked),
116
- className: "settings-shell__toggle"
117
- }
118
- )
119
- ] }),
120
- r ? /* @__PURE__ */ f(q, { children: [
121
- /* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
122
- /* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
123
- /* @__PURE__ */ a(
124
- "input",
125
- {
126
- id: "settings-threshold-input",
127
- type: "range",
128
- min: 0,
129
- max: 100,
130
- value: e,
131
- onChange: t,
132
- "aria-label": "Threshold",
133
- "aria-valuenow": e,
134
- "aria-valuemin": 0,
135
- "aria-valuemax": 100,
136
- className: "settings-shell__slider"
137
- }
138
- ),
139
- /* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
140
- e,
141
- "%"
142
- ] })
143
- ] })
144
- ] }) : /* @__PURE__ */ a("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default styling. Turn on to tint values below the threshold." })
145
- ] });
146
- }
147
- function nt({ value: e, onChange: t }) {
148
- return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
96
+ function Xe({ value: e, onChange: t }) {
97
+ return /* @__PURE__ */ b("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
149
98
  /* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
150
- /* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
99
+ /* @__PURE__ */ b("div", { className: "settings-shell__slider-row", children: [
151
100
  /* @__PURE__ */ a(
152
101
  "input",
153
102
  {
@@ -164,25 +113,47 @@ function nt({ value: e, onChange: t }) {
164
113
  className: "settings-shell__slider"
165
114
  }
166
115
  ),
167
- /* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
116
+ /* @__PURE__ */ b("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
168
117
  e,
169
118
  " days"
170
119
  ] })
171
120
  ] })
172
121
  ] });
173
122
  }
174
- function at({ id: e, onRemove: t }) {
175
- const { attributes: r, listeners: l, setNodeRef: n, transform: i, transition: u, isDragging: o } = We({ id: e }), s = {
176
- transform: Ge.Transform.toString(i),
177
- transition: u,
178
- opacity: o ? 0.6 : 1
123
+ function Je({
124
+ id: e,
125
+ onActivate: t,
126
+ disabled: s
127
+ }) {
128
+ const r = "settings-shell__slot-pill settings-shell__slot-pill--ghost" + (s ? " settings-shell__slot-pill--ghost-disabled" : "");
129
+ return /* @__PURE__ */ a("li", { className: r, "data-ghost": "true", children: /* @__PURE__ */ a(
130
+ "button",
131
+ {
132
+ type: "button",
133
+ className: "settings-shell__slot-pill__ghost-activate",
134
+ "aria-label": `Restore ${e}`,
135
+ "aria-disabled": s ? "true" : void 0,
136
+ onClick: s ? void 0 : t,
137
+ children: /* @__PURE__ */ a("span", { className: "settings-shell__slot-pill__label", children: e })
138
+ }
139
+ ) });
140
+ }
141
+ function et({
142
+ id: e,
143
+ onRemove: t,
144
+ removeDisabled: s
145
+ }) {
146
+ const { attributes: r, listeners: n, setNodeRef: c, transform: p, transition: o, isDragging: i } = qe({ id: e }), l = {
147
+ transform: Ge.Transform.toString(p),
148
+ transition: o,
149
+ opacity: i ? 0.6 : 1
179
150
  };
180
- return /* @__PURE__ */ f(
151
+ return /* @__PURE__ */ b(
181
152
  "li",
182
153
  {
183
- ref: n,
184
- style: s,
185
- className: `settings-shell__slot-pill${o ? " settings-shell__slot-pill--dragging" : ""}`,
154
+ ref: c,
155
+ style: l,
156
+ className: `settings-shell__slot-pill${i ? " settings-shell__slot-pill--dragging" : ""}`,
186
157
  children: [
187
158
  /* @__PURE__ */ a(
188
159
  "button",
@@ -191,7 +162,7 @@ function at({ id: e, onRemove: t }) {
191
162
  className: "settings-shell__slot-pill__handle",
192
163
  "aria-label": `Reorder ${e}`,
193
164
  ...r,
194
- ...l,
165
+ ...n,
195
166
  children: /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
196
167
  }
197
168
  ),
@@ -200,9 +171,10 @@ function at({ id: e, onRemove: t }) {
200
171
  "button",
201
172
  {
202
173
  type: "button",
203
- className: "settings-shell__slot-pill__remove",
174
+ className: "settings-shell__slot-pill__remove" + (s ? " settings-shell__slot-pill__remove--disabled" : ""),
204
175
  "aria-label": `Remove ${e}`,
205
- onClick: t,
176
+ "aria-disabled": s ? "true" : void 0,
177
+ onClick: s ? void 0 : t,
206
178
  children: "×"
207
179
  }
208
180
  )
@@ -210,124 +182,99 @@ function at({ id: e, onRemove: t }) {
210
182
  }
211
183
  );
212
184
  }
213
- function st({ value: e, onChange: t }) {
214
- const r = Ue(
215
- ue(ze, { activationConstraint: { distance: 4 } }),
216
- ue(He, { coordinateGetter: Ve })
217
- ), l = R.useRef(!1), [n, i] = R.useState(!1), u = (s) => {
218
- const { active: c, over: d } = s;
219
- if (!d || c.id === d.id) return;
220
- const m = e.findIndex((y) => y === c.id), h = e.findIndex((y) => y === d.id);
221
- m === -1 || h === -1 || t(Qe([...e], m, h));
222
- }, o = (s) => {
223
- l.current || (l.current = !0, i(!0)), t(e.filter((c) => c !== s));
224
- };
225
- return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
226
- /* @__PURE__ */ a(Be, { sensors: r, collisionDetection: Ye, onDragEnd: u, children: /* @__PURE__ */ a(Ke, { items: [...e], strategy: qe, children: /* @__PURE__ */ a("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ a(at, { id: s, onRemove: () => o(s) }, s)) }) }) }),
227
- e.length === 0 && n && /* @__PURE__ */ a("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
228
- /* @__PURE__ */ a("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
229
- ] });
230
- }
231
- const rt = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
232
- function ot({
185
+ function tt({
233
186
  value: e,
234
- onSelect: t,
235
- enabled: r = !1,
236
- onToggleEnabled: l
187
+ onChange: t,
188
+ naturalSlots: s
237
189
  }) {
238
- const n = "settings-accent-enabled";
239
- return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
240
- /* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
241
- /* @__PURE__ */ a("label", { htmlFor: n, className: "settings-shell__toggle-label", children: "Override default accent" }),
242
- /* @__PURE__ */ a(
243
- "input",
190
+ const r = $e(
191
+ de(Fe, { activationConstraint: { distance: 4 } }),
192
+ de(ze, { coordinateGetter: Be })
193
+ ), n = (u) => {
194
+ const { active: h, over: y } = u;
195
+ if (!y || h.id === y.id) return;
196
+ const m = e.findIndex((_) => _ === h.id), v = e.findIndex((_) => _ === y.id);
197
+ m === -1 || v === -1 || t(Ke([...e], m, v));
198
+ }, c = e.length === 1, p = (u) => {
199
+ c || t(e.filter((h) => h !== u));
200
+ }, o = I.useMemo(() => new Set(e), [e]), i = I.useMemo(
201
+ () => (s ?? []).filter((u) => !o.has(u)),
202
+ [s, o]
203
+ ), l = !1, d = (u) => {
204
+ t([...e, u]);
205
+ };
206
+ return /* @__PURE__ */ b("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
207
+ /* @__PURE__ */ a(He, { sensors: r, collisionDetection: Ue, onDragEnd: n, children: /* @__PURE__ */ a(Ye, { items: [...e], strategy: Ve, children: /* @__PURE__ */ b("ul", { className: "settings-shell__slots-list", role: "list", children: [
208
+ e.map((u) => /* @__PURE__ */ a(
209
+ et,
244
210
  {
245
- id: n,
246
- type: "checkbox",
247
- role: "switch",
248
- "aria-label": "Enable accent override",
249
- "aria-checked": r,
250
- checked: r,
251
- onChange: (i) => l?.(i.target.checked),
252
- className: "settings-shell__toggle"
253
- }
254
- )
255
- ] }),
256
- r ? /* @__PURE__ */ f(q, { children: [
257
- /* @__PURE__ */ a("span", { className: "settings-shell__label", children: "Accent color" }),
258
- /* @__PURE__ */ a("div", { className: "settings-shell__swatch-row", children: rt.map((i) => {
259
- const u = e === i;
260
- return /* @__PURE__ */ a(
261
- "button",
262
- {
263
- type: "button",
264
- "aria-pressed": u,
265
- "aria-label": `Accent ${i}`,
266
- className: `settings-shell__swatch${u ? " settings-shell__swatch--active" : ""}`,
267
- style: { backgroundColor: i },
268
- onClick: () => t(i)
269
- },
270
- i
271
- );
272
- }) })
273
- ] }) : /* @__PURE__ */ a("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default accent. Turn on to override." })
211
+ id: u,
212
+ onRemove: () => p(u),
213
+ removeDisabled: c
214
+ },
215
+ u
216
+ )),
217
+ i.map((u) => /* @__PURE__ */ a(
218
+ Je,
219
+ {
220
+ id: u,
221
+ onActivate: () => d(u),
222
+ disabled: l
223
+ },
224
+ `ghost:${u}`
225
+ ))
226
+ ] }) }) }),
227
+ /* @__PURE__ */ a("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
274
228
  ] });
275
229
  }
276
- const lt = ["Orders", "Quota", "Unassigned"], it = ["threshold", "timeframe", "color"];
277
- function Yt({
230
+ const nt = ["Orders", "Quota", "Unassigned"], at = ["timeframe"];
231
+ function Ft({
278
232
  isOpen: e,
279
233
  cardSpan: t,
280
- cardLabel: r = "Metric",
281
- cardValue: l = "—",
234
+ cardLabel: s = "Metric",
235
+ cardValue: r = "—",
282
236
  previewSlot: n,
283
- dimensions: i = it,
284
- initialTab: u,
285
- initialValues: o
237
+ dimensions: c = at,
238
+ initialTab: p,
239
+ initialValues: o,
240
+ naturalSlots: i
286
241
  }) {
287
- const s = O(), c = s?.state.activeTrigger, d = c?.kind === "card-overflow" ? c.cardId : null, m = be(), h = c?.span, y = t ?? h ?? 1, p = i[0] ?? "threshold", [v, T] = R.useState(u ?? p);
288
- R.useEffect(() => {
289
- i.includes(v) || T(p);
290
- }, [i, v, p]);
291
- const b = d != null ? s?.state?.bufferByCard?.[d]?.changes ?? {} : {}, _ = typeof b.threshold == "number" ? b.threshold : typeof o?.threshold == "number" ? o.threshold : 80, x = typeof b.timeframe == "number" ? b.timeframe : typeof o?.timeframe == "number" ? o.timeframe : 30, $ = typeof b.accent == "string" ? b.accent : typeof o?.accent == "string" ? o.accent : null, F = Array.isArray(b.slots) ? b.slots : Array.isArray(o?.slots) ? o.slots : lt, E = typeof b.thresholdEnabled == "boolean" ? b.thresholdEnabled : typeof o?.thresholdEnabled == "boolean" ? o.thresholdEnabled : !1, L = typeof b.accentEnabled == "boolean" ? b.accentEnabled : typeof o?.accentEnabled == "boolean" ? o.accentEnabled : !1, W = (w) => {
292
- d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(w.target.value) });
293
- }, G = (w) => {
294
- d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(w.target.value) });
295
- }, ie = (w) => {
296
- d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: w });
297
- }, j = (w) => {
298
- d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: w });
299
- }, Z = (w) => {
300
- d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "thresholdEnabled", value: w });
301
- }, g = (w) => {
302
- d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accentEnabled", value: w });
303
- }, N = s?.state.isDirty ?? !1, P = d, k = () => {
304
- P != null && s?.dispatch({ type: "CLEAR_BUFFER", cardId: P });
305
- }, [D, U] = R.useState(0), Ae = () => {
306
- U((w) => w + 1), s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
307
- }, xe = R.useCallback(() => {
242
+ const l = M(), d = l?.state.activeTrigger, u = d?.kind === "card-overflow" ? d.cardId : null, h = ae(), y = d?.span, m = t ?? y ?? 1, v = c[0] ?? "timeframe", [_, N] = I.useState(p ?? v);
243
+ I.useEffect(() => {
244
+ c.includes(_) || N(v);
245
+ }, [c, _, v]);
246
+ const g = u != null ? l?.state?.bufferByCard?.[u]?.changes ?? {} : {}, x = typeof g.timeframe == "number" ? g.timeframe : typeof o?.timeframe == "number" ? o.timeframe : 30, R = Array.isArray(g.slots) ? g.slots : Array.isArray(o?.slots) ? o.slots : nt, $ = (S) => {
247
+ u == null || l == null || l.dispatch({ type: "SET_BUFFER_VALUE", cardId: u, key: "timeframe", value: Number(S.target.value) });
248
+ }, P = (S) => {
249
+ u == null || l == null || l.dispatch({ type: "SET_BUFFER_VALUE", cardId: u, key: "slots", value: S });
250
+ }, A = l?.state.isDirty ?? !1, H = u, q = () => {
251
+ H != null && l?.dispatch({ type: "CLEAR_BUFFER", cardId: H });
252
+ }, [le, G] = I.useState(0), Q = () => {
253
+ G((S) => S + 1), l?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
254
+ }, f = I.useCallback(() => {
308
255
  }, []);
309
256
  return /* @__PURE__ */ a(
310
- K,
257
+ z,
311
258
  {
312
259
  variant: "with-stage",
313
- onClose: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
260
+ onClose: () => l?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
314
261
  stage: (
315
262
  // M003-S004-MOT-02 — CloneStage wraps CloneCard so the spin-commit
316
263
  // gesture has a transform host that does NOT disturb the inner
317
264
  // CloneCard's existing sway / span-N geometry. Counter is owned here
318
265
  // (Option 3); reptime sees no spinTrigger plumbing.
319
- /* @__PURE__ */ a(et, { spinTrigger: D, onSpinComplete: xe, children: /* @__PURE__ */ a(je, { span: y, rotating: !m, children: n ?? /* @__PURE__ */ f(q, { children: [
320
- /* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: r }),
321
- /* @__PURE__ */ a("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: l })
266
+ /* @__PURE__ */ a(Ze, { spinTrigger: le, onSpinComplete: f, children: /* @__PURE__ */ a(ve, { span: m, rotating: !h, children: n ?? /* @__PURE__ */ b(ge, { children: [
267
+ /* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: s }),
268
+ /* @__PURE__ */ a("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: r })
322
269
  ] }) }) })
323
270
  ),
324
271
  navigation: /* @__PURE__ */ a(
325
- De,
272
+ Ae,
326
273
  {
327
- dimensions: i,
328
- activeTab: v,
329
- onSelect: T,
330
- reduced: m
274
+ dimensions: c,
275
+ activeTab: _,
276
+ onSelect: N,
277
+ reduced: h
331
278
  }
332
279
  ),
333
280
  footer: {
@@ -337,8 +284,8 @@ function Yt({
337
284
  id: "btn-reset",
338
285
  type: "button",
339
286
  className: "gloss-panel-chrome-v2__footer-btn",
340
- disabled: !N,
341
- onClick: k,
287
+ disabled: !A,
288
+ onClick: q,
342
289
  children: "Reset"
343
290
  }
344
291
  ),
@@ -348,47 +295,58 @@ function Yt({
348
295
  id: "settings-apply",
349
296
  type: "button",
350
297
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
351
- disabled: !N,
352
- onClick: Ae,
298
+ disabled: !A,
299
+ onClick: Q,
353
300
  children: "Apply"
354
301
  }
355
302
  )
356
303
  },
357
- children: /* @__PURE__ */ a("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ f(
304
+ children: /* @__PURE__ */ a("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ b(
358
305
  "div",
359
306
  {
360
307
  role: "tabpanel",
361
- id: `settings-tabpanel-${v}`,
308
+ id: `settings-tabpanel-${_}`,
362
309
  "aria-label": "Settings dimension controls",
363
310
  tabIndex: 0,
364
311
  className: "settings-shell__tabpanel",
365
312
  children: [
366
- v === "threshold" && /* @__PURE__ */ a(
367
- tt,
368
- {
369
- value: _,
370
- onChange: W,
371
- enabled: E,
372
- onToggleEnabled: Z
373
- }
374
- ),
375
- v === "timeframe" && /* @__PURE__ */ a(nt, { value: x, onChange: G }),
376
- v === "slots" && /* @__PURE__ */ a(st, { value: F, onChange: j }),
377
- v === "color" && /* @__PURE__ */ a(
378
- ot,
379
- {
380
- value: $,
381
- onSelect: ie,
382
- enabled: L,
383
- onToggleEnabled: g
384
- }
385
- )
313
+ _ === "timeframe" && /* @__PURE__ */ a(Xe, { value: x, onChange: $ }),
314
+ _ === "slots" && /* @__PURE__ */ a(tt, { value: R, onChange: P, naturalSlots: i })
386
315
  ]
387
316
  }
388
317
  ) })
389
318
  }
390
319
  );
391
320
  }
321
+ function st({
322
+ isOpen: e,
323
+ cardSpan: t,
324
+ previewSlot: s,
325
+ metricInfo: r
326
+ }) {
327
+ const n = M(), c = n?.state.activeTrigger, p = ae(), o = c?.span;
328
+ return /* @__PURE__ */ a(
329
+ z,
330
+ {
331
+ variant: "with-stage",
332
+ onClose: () => n?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
333
+ stage: /* @__PURE__ */ a(ve, { span: t ?? o ?? 1, rotating: !p, children: s }),
334
+ children: /* @__PURE__ */ b(
335
+ "div",
336
+ {
337
+ className: "metric-info-shell",
338
+ "data-shell": "metric-info",
339
+ "aria-hidden": !e,
340
+ children: [
341
+ /* @__PURE__ */ a("h2", { className: "metric-info-shell__title", children: r.title }),
342
+ /* @__PURE__ */ a("p", { className: "metric-info-shell__description", children: r.description })
343
+ ]
344
+ }
345
+ )
346
+ }
347
+ );
348
+ }
349
+ st.displayName = "MetricInfoShell";
392
350
  const _e = [
393
351
  "Revenue",
394
352
  "Order flow",
@@ -706,46 +664,46 @@ const _e = [
706
664
  ]
707
665
  }
708
666
  };
709
- function Ee({
667
+ function Pe({
710
668
  lenses: e,
711
669
  activeLens: t,
712
- onLensChange: r,
713
- variant: l = "pills",
670
+ onLensChange: s,
671
+ variant: r = "pills",
714
672
  lensMeta: n = Ne
715
673
  }) {
716
- return l === "pills" ? /* @__PURE__ */ a("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ a("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((i) => {
717
- const u = i === t, o = n[i], s = ["cat-pill"];
718
- return u && s.push("active"), /* @__PURE__ */ f(
674
+ return r === "pills" ? /* @__PURE__ */ a("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ a("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((c) => {
675
+ const p = c === t, o = n[c], i = ["cat-pill"];
676
+ return p && i.push("active"), /* @__PURE__ */ b(
719
677
  "button",
720
678
  {
721
679
  type: "button",
722
680
  role: "tab",
723
- "aria-selected": u,
724
- className: s.join(" "),
725
- "data-lens": i,
681
+ "aria-selected": p,
682
+ className: i.join(" "),
683
+ "data-lens": c,
726
684
  onClick: () => {
727
- u || r(i);
685
+ p || s(c);
728
686
  },
729
687
  children: [
730
- i,
688
+ c,
731
689
  o?.beta && /* @__PURE__ */ a("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
732
690
  ]
733
691
  },
734
- i
692
+ c
735
693
  );
736
- }) }) }) : /* @__PURE__ */ a(ct, { lenses: e, activeLens: t, onLensChange: r });
694
+ }) }) }) : /* @__PURE__ */ a(ot, { lenses: e, activeLens: t, onLensChange: s });
737
695
  }
738
- function ct({
696
+ function ot({
739
697
  lenses: e,
740
698
  activeLens: t,
741
- onLensChange: r
699
+ onLensChange: s
742
700
  }) {
743
- const [l, n] = A(!1), i = Q(null), u = () => {
744
- i.current != null && (window.clearTimeout(i.current), i.current = null);
701
+ const [r, n] = E(!1), c = K(null), p = () => {
702
+ c.current != null && (window.clearTimeout(c.current), c.current = null);
745
703
  }, o = () => {
746
- u(), i.current = window.setTimeout(() => n(!1), 100);
747
- }, s = e.filter((c) => c !== t);
748
- return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ f("div", { className: "cat-segmented", children: [
704
+ p(), c.current = window.setTimeout(() => n(!1), 100);
705
+ }, i = e.filter((l) => l !== t);
706
+ return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ b("div", { className: "cat-segmented", children: [
749
707
  /* @__PURE__ */ a(
750
708
  "button",
751
709
  {
@@ -756,35 +714,35 @@ function ct({
756
714
  children: t
757
715
  }
758
716
  ),
759
- /* @__PURE__ */ f(
717
+ /* @__PURE__ */ b(
760
718
  "div",
761
719
  {
762
720
  className: "cat-seg-more",
763
721
  onMouseEnter: () => {
764
- u(), n(!0);
722
+ p(), n(!0);
765
723
  },
766
724
  onMouseLeave: o,
767
725
  children: [
768
- /* @__PURE__ */ a("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": l, children: "More ▾" }),
769
- l && /* @__PURE__ */ a(
726
+ /* @__PURE__ */ a("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": r, children: "More ▾" }),
727
+ r && /* @__PURE__ */ a(
770
728
  "div",
771
729
  {
772
730
  className: "cat-seg-overflow",
773
731
  role: "menu",
774
- onMouseEnter: u,
732
+ onMouseEnter: p,
775
733
  onMouseLeave: o,
776
- children: s.map((c) => /* @__PURE__ */ a(
734
+ children: i.map((l) => /* @__PURE__ */ a(
777
735
  "button",
778
736
  {
779
737
  type: "button",
780
- "data-lens": c,
738
+ "data-lens": l,
781
739
  role: "menuitem",
782
740
  onClick: () => {
783
- r(c), n(!1);
741
+ s(l), n(!1);
784
742
  },
785
- children: c
743
+ children: l
786
744
  },
787
- c
745
+ l
788
746
  ))
789
747
  }
790
748
  )
@@ -793,38 +751,38 @@ function ct({
793
751
  )
794
752
  ] }) });
795
753
  }
796
- function ae({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
754
+ function te({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: r }) {
797
755
  return /* @__PURE__ */ a("div", { className: "cat-tiles", children: e.map((n) => {
798
- const i = n.id === t, u = n.subStats != null && n.subStats.length > 0;
756
+ const c = n.id === t, p = n.subStats != null && n.subStats.length > 0;
799
757
  let o = null;
800
- u ? n.subStats.length === 5 ? o = "span-5" : n.subStats.length === 3 ? o = "span-3" : o = "span-2" : n.stack === !0 && (o = "span-2");
801
- const s = ["cat-tile"];
802
- o && s.push(o), i && s.push("selected"), n.isNew && s.push("is-new"), n.startHere && s.push("start-here"), n.donut && s.push("has-donut");
803
- const c = 1;
758
+ p ? n.subStats.length === 5 ? o = "span-5" : n.subStats.length === 3 ? o = "span-3" : o = "span-2" : n.stack === !0 && (o = "span-2");
759
+ const i = ["cat-tile"];
760
+ o && i.push(o), c && i.push("selected"), n.isNew && i.push("is-new"), n.startHere && i.push("start-here"), n.donut && i.push("has-donut");
761
+ const l = 1;
804
762
  let d = 0.7;
805
763
  if (n.donut) {
806
- const m = /([\d.]+)\s*%/.exec(n.value);
807
- if (m) {
808
- const h = parseFloat(m[1]);
764
+ const u = /([\d.]+)\s*%/.exec(n.value);
765
+ if (u) {
766
+ const h = parseFloat(u[1]);
809
767
  Number.isFinite(h) && (d = Math.max(0, Math.min(1, h / 100)));
810
768
  }
811
769
  }
812
- return /* @__PURE__ */ f(
770
+ return /* @__PURE__ */ b(
813
771
  "button",
814
772
  {
815
773
  type: "button",
816
- className: s.join(" "),
774
+ className: i.join(" "),
817
775
  "data-metric": n.id,
818
776
  "data-desc": n.desc,
819
- "data-col-span": String(c),
777
+ "data-col-span": String(l),
820
778
  "data-donut": n.donut ? "true" : void 0,
821
779
  "data-accent": n.accent,
822
- "aria-pressed": i,
823
- onClick: () => r(n.id, n.desc),
780
+ "aria-pressed": c,
781
+ onClick: () => s(n.id, n.desc),
824
782
  style: n.accent ? { "--cat-tile-accent": n.accent } : void 0,
825
783
  children: [
826
784
  n.startHere && /* @__PURE__ */ a("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
827
- l ? l(n) : /* @__PURE__ */ a(
785
+ r ? r(n) : /* @__PURE__ */ a(
828
786
  "div",
829
787
  {
830
788
  className: "cat-tile-primitive-wrapper gloss-metric-card",
@@ -832,7 +790,7 @@ function ae({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
832
790
  style: { pointerEvents: "none", width: "100%", height: "100%" },
833
791
  "aria-hidden": "true",
834
792
  children: n.donut ? /* @__PURE__ */ a(
835
- pe,
793
+ ue,
836
794
  {
837
795
  variant: "donut",
838
796
  label: n.label,
@@ -840,20 +798,20 @@ function ae({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
840
798
  donutValue: d,
841
799
  donutMax: 1,
842
800
  accentColor: n.accent,
843
- colSpan: c
801
+ colSpan: l
844
802
  }
845
803
  ) : /* @__PURE__ */ a(
846
- pe,
804
+ ue,
847
805
  {
848
806
  variant: "standard",
849
807
  label: n.label,
850
808
  value: n.value,
851
- colSpan: c
809
+ colSpan: l
852
810
  }
853
811
  )
854
812
  }
855
813
  ),
856
- n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((m) => /* @__PURE__ */ a("span", { children: m }, m)) }),
814
+ n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((u) => /* @__PURE__ */ a("span", { children: u }, u)) }),
857
815
  n.isNew && /* @__PURE__ */ a("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
858
816
  ]
859
817
  },
@@ -861,17 +819,17 @@ function ae({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
861
819
  );
862
820
  }) });
863
821
  }
864
- const re = ye(null);
822
+ const se = ye(null);
865
823
  function oe() {
866
- return ve(re);
824
+ return be(se);
867
825
  }
868
- function Vt({ mode: e, dispatch: t }) {
869
- const r = oe();
870
- if (r == null && e == null) return null;
871
- const l = r?.mode ?? e ?? "add", n = r?.selectedTileId ?? null, i = r?.description ?? null, u = n == null;
872
- return /* @__PURE__ */ f("div", { className: "panel-footer catalog", children: [
873
- /* @__PURE__ */ a("div", { className: "cat-description", id: "cat-desc", children: i ?? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) }),
874
- /* @__PURE__ */ f("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
826
+ function zt({ mode: e, dispatch: t }) {
827
+ const s = oe();
828
+ if (s == null && e == null) return null;
829
+ const r = s?.mode ?? e ?? "add", n = s?.selectedTileId ?? null, c = s?.description ?? null, p = n == null;
830
+ return /* @__PURE__ */ b("div", { className: "panel-footer catalog", children: [
831
+ /* @__PURE__ */ a("div", { className: "cat-description", id: "cat-desc", children: c ?? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) }),
832
+ /* @__PURE__ */ b("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
875
833
  /* @__PURE__ */ a("div", { className: "spacer", style: { flex: 1 } }),
876
834
  /* @__PURE__ */ a(
877
835
  "button",
@@ -883,24 +841,24 @@ function Vt({ mode: e, dispatch: t }) {
883
841
  children: "Cancel"
884
842
  }
885
843
  ),
886
- l === "add" && /* @__PURE__ */ a(
844
+ r === "add" && /* @__PURE__ */ a(
887
845
  "button",
888
846
  {
889
847
  id: "btn-cat-add",
890
848
  type: "button",
891
849
  className: "btn btn-primary",
892
- disabled: u,
850
+ disabled: p,
893
851
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
894
852
  children: "Add metric"
895
853
  }
896
854
  ),
897
- l === "replace" && /* @__PURE__ */ a(
855
+ r === "replace" && /* @__PURE__ */ a(
898
856
  "button",
899
857
  {
900
858
  id: "btn-cat-replace",
901
859
  type: "button",
902
860
  className: "btn btn-primary",
903
- disabled: u,
861
+ disabled: p,
904
862
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
905
863
  children: "Replace metric"
906
864
  }
@@ -908,63 +866,63 @@ function Vt({ mode: e, dispatch: t }) {
908
866
  ] })
909
867
  ] });
910
868
  }
911
- function me(e, t) {
869
+ function pe(e, t) {
912
870
  if (t.length === 0) return !0;
913
- const r = t.toLowerCase();
914
- if (e.label.toLowerCase().includes(r) || e.value.toLowerCase().includes(r)) return !0;
871
+ const s = t.toLowerCase();
872
+ if (e.label.toLowerCase().includes(s) || e.value.toLowerCase().includes(s)) return !0;
915
873
  if (e.subStats) {
916
- for (const l of e.subStats)
917
- if (l.label.toLowerCase().includes(r) || l.value.toLowerCase().includes(r)) return !0;
874
+ for (const r of e.subStats)
875
+ if (r.label.toLowerCase().includes(s) || r.value.toLowerCase().includes(s)) return !0;
918
876
  }
919
877
  return !1;
920
878
  }
921
- function dt() {
879
+ function rt() {
922
880
  const t = oe()?.description ?? null;
923
881
  return t == null ? /* @__PURE__ */ a("span", { style: { fontStyle: "italic" }, children: "Tap a metric to see its description" }) : /* @__PURE__ */ a("span", { children: t });
924
882
  }
925
- function Kt({
883
+ function Ht({
926
884
  isOpen: e,
927
885
  lenses: t = _e,
928
- defaultLens: r = Ce,
929
- tilesByLens: l = Se,
886
+ defaultLens: s = Ce,
887
+ tilesByLens: r = Se,
930
888
  lensMeta: n = Ne,
931
- renderTile: i,
932
- onAdd: u
889
+ renderTile: c,
890
+ onAdd: p
933
891
  }) {
934
- const o = O(), [s, c] = A(r), [d, m] = A(null), [h, y] = A(null), [p, v] = A(""), T = l[s] ?? { primary: [] }, S = n[s], b = ce(
935
- () => T.primary.filter((E) => me(E, p)),
936
- [T.primary, p]
937
- ), _ = ce(
938
- () => (T.secondary ?? []).filter((E) => me(E, p)),
939
- [T.secondary, p]
892
+ const o = M(), [i, l] = E(s), [d, u] = E(null), [h, y] = E(null), [m, v] = E(""), _ = r[i] ?? { primary: [] }, N = n[i], w = ie(
893
+ () => _.primary.filter((P) => pe(P, m)),
894
+ [_.primary, m]
895
+ ), g = ie(
896
+ () => (_.secondary ?? []).filter((P) => pe(P, m)),
897
+ [_.secondary, m]
940
898
  ), x = () => {
941
- d != null && u?.(d), o?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
942
- }, $ = () => o?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), F = d == null;
899
+ d != null && p?.(d), o?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
900
+ }, R = () => o?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), $ = d == null;
943
901
  return /* @__PURE__ */ a(
944
- re.Provider,
902
+ se.Provider,
945
903
  {
946
904
  value: { mode: "add", selectedTileId: d, description: h },
947
905
  children: /* @__PURE__ */ a(
948
- K,
906
+ z,
949
907
  {
950
908
  variant: "no-stage",
951
909
  title: "Add a metric",
952
- onClose: $,
910
+ onClose: R,
953
911
  footer: {
954
- left: /* @__PURE__ */ a(dt, {}),
912
+ left: /* @__PURE__ */ a(rt, {}),
955
913
  right: /* @__PURE__ */ a(
956
914
  "button",
957
915
  {
958
916
  id: "btn-cat-add",
959
917
  type: "button",
960
918
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
961
- disabled: F,
919
+ disabled: $,
962
920
  onClick: x,
963
921
  children: "Add metric"
964
922
  }
965
923
  )
966
924
  },
967
- children: /* @__PURE__ */ f("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
925
+ children: /* @__PURE__ */ b("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
968
926
  /* @__PURE__ */ a("div", { className: "cat-search", children: /* @__PURE__ */ a(
969
927
  "input",
970
928
  {
@@ -972,54 +930,54 @@ function Kt({
972
930
  className: "cat-search-input",
973
931
  placeholder: "Search metrics",
974
932
  "aria-label": "Search metrics",
975
- value: p,
976
- onChange: (E) => v(E.target.value)
933
+ value: m,
934
+ onChange: (P) => v(P.target.value)
977
935
  }
978
936
  ) }),
979
937
  /* @__PURE__ */ a(
980
- Ee,
938
+ Pe,
981
939
  {
982
940
  lenses: t,
983
- activeLens: s,
941
+ activeLens: i,
984
942
  lensMeta: n,
985
943
  variant: "pills",
986
- onLensChange: (E) => {
987
- c(E), m(null), y(null), v("");
944
+ onLensChange: (P) => {
945
+ l(P), u(null), y(null), v("");
988
946
  }
989
947
  }
990
948
  ),
991
- S && /* @__PURE__ */ f("div", { className: "cat-lens-meta", children: [
992
- /* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: S.headline }),
993
- /* @__PURE__ */ a("p", { className: "cat-lens-helper", children: S.helper })
949
+ N && /* @__PURE__ */ b("div", { className: "cat-lens-meta", children: [
950
+ /* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: N.headline }),
951
+ /* @__PURE__ */ a("p", { className: "cat-lens-helper", children: N.helper })
994
952
  ] }),
995
953
  /* @__PURE__ */ a(
996
- ae,
954
+ te,
997
955
  {
998
- tiles: b,
956
+ tiles: w,
999
957
  selectedTileId: d,
1000
- onSelectTile: (E, L) => {
1001
- m(E), y(L);
958
+ onSelectTile: (P, A) => {
959
+ u(P), y(A);
1002
960
  },
1003
- renderTile: i
961
+ renderTile: c
1004
962
  }
1005
963
  ),
1006
- _.length > 0 && /* @__PURE__ */ f("div", { className: "cat-more-in-lens", children: [
964
+ g.length > 0 && /* @__PURE__ */ b("div", { className: "cat-more-in-lens", children: [
1007
965
  /* @__PURE__ */ a("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
1008
966
  /* @__PURE__ */ a(
1009
- ae,
967
+ te,
1010
968
  {
1011
- tiles: _,
969
+ tiles: g,
1012
970
  selectedTileId: d,
1013
- onSelectTile: (E, L) => {
1014
- m(E), y(L);
971
+ onSelectTile: (P, A) => {
972
+ u(P), y(A);
1015
973
  },
1016
- renderTile: i
974
+ renderTile: c
1017
975
  }
1018
976
  )
1019
977
  ] }),
1020
- b.length === 0 && _.length === 0 && p.length > 0 && /* @__PURE__ */ f("div", { className: "cat-empty", children: [
978
+ w.length === 0 && g.length === 0 && m.length > 0 && /* @__PURE__ */ b("div", { className: "cat-empty", children: [
1021
979
  'No metrics match "',
1022
- p,
980
+ m,
1023
981
  '".'
1024
982
  ] })
1025
983
  ] })
@@ -1028,67 +986,67 @@ function Kt({
1028
986
  }
1029
987
  );
1030
988
  }
1031
- function ut() {
989
+ function lt() {
1032
990
  const t = oe()?.description ?? null;
1033
- return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(q, { children: t });
991
+ return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(ge, { children: t });
1034
992
  }
1035
- function qt({
993
+ function Ut({
1036
994
  isOpen: e,
1037
995
  replacingLabel: t,
1038
- lenses: r = _e,
1039
- defaultLens: l = Ce,
996
+ lenses: s = _e,
997
+ defaultLens: r = Ce,
1040
998
  tilesByLens: n = Se,
1041
- renderTile: i
999
+ renderTile: c
1042
1000
  }) {
1043
- const u = O(), [o, s] = A(l), [c, d] = A(null), [m, h] = A(null), y = n[o] ?? { primary: [] }, p = [...y.primary, ...y.secondary ?? []], v = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), T = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), S = c == null;
1001
+ const p = M(), [o, i] = E(r), [l, d] = E(null), [u, h] = E(null), y = n[o] ?? { primary: [] }, m = [...y.primary, ...y.secondary ?? []], v = () => p?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), _ = () => p?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), N = l == null;
1044
1002
  return /* @__PURE__ */ a(
1045
- re.Provider,
1003
+ se.Provider,
1046
1004
  {
1047
- value: { mode: "replace", selectedTileId: c, description: m },
1005
+ value: { mode: "replace", selectedTileId: l, description: u },
1048
1006
  children: /* @__PURE__ */ a(
1049
- K,
1007
+ z,
1050
1008
  {
1051
1009
  variant: "no-stage",
1052
1010
  title: "Replace metric",
1053
- onClose: T,
1011
+ onClose: _,
1054
1012
  footer: {
1055
- left: /* @__PURE__ */ a(ut, {}),
1013
+ left: /* @__PURE__ */ a(lt, {}),
1056
1014
  right: /* @__PURE__ */ a(
1057
1015
  "button",
1058
1016
  {
1059
1017
  id: "btn-cat-replace",
1060
1018
  type: "button",
1061
1019
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
1062
- disabled: S,
1020
+ disabled: N,
1063
1021
  onClick: v,
1064
1022
  children: "Replace metric"
1065
1023
  }
1066
1024
  )
1067
1025
  },
1068
- children: /* @__PURE__ */ f("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
1069
- t && /* @__PURE__ */ f("p", { className: "cat-subtitle", children: [
1026
+ children: /* @__PURE__ */ b("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
1027
+ t && /* @__PURE__ */ b("p", { className: "cat-subtitle", children: [
1070
1028
  "replacing ",
1071
1029
  t
1072
1030
  ] }),
1073
1031
  /* @__PURE__ */ a(
1074
- Ee,
1032
+ Pe,
1075
1033
  {
1076
- lenses: r,
1034
+ lenses: s,
1077
1035
  activeLens: o,
1078
- onLensChange: (b) => {
1079
- s(b), d(null), h(null);
1036
+ onLensChange: (w) => {
1037
+ i(w), d(null), h(null);
1080
1038
  }
1081
1039
  }
1082
1040
  ),
1083
1041
  /* @__PURE__ */ a(
1084
- ae,
1042
+ te,
1085
1043
  {
1086
- tiles: p,
1087
- selectedTileId: c,
1088
- onSelectTile: (b, _) => {
1089
- d(b), h(_);
1044
+ tiles: m,
1045
+ selectedTileId: l,
1046
+ onSelectTile: (w, g) => {
1047
+ d(w), h(g);
1090
1048
  },
1091
- renderTile: i
1049
+ renderTile: c
1092
1050
  }
1093
1051
  )
1094
1052
  ] })
@@ -1098,12 +1056,12 @@ function qt({
1098
1056
  );
1099
1057
  }
1100
1058
  const Te = ye(null);
1101
- function Pe() {
1102
- return ve(Te);
1059
+ function we() {
1060
+ return be(Te);
1103
1061
  }
1104
- function pt(e = {}) {
1105
- const t = Pe(), r = t?.createPage, l = t?.setPages;
1106
- return /* @__PURE__ */ f(
1062
+ function it(e = {}) {
1063
+ const t = we(), s = t?.createPage, r = t?.setPages;
1064
+ return /* @__PURE__ */ b(
1107
1065
  "div",
1108
1066
  {
1109
1067
  className: "panel-footer pm",
@@ -1117,11 +1075,11 @@ function pt(e = {}) {
1117
1075
  type: "button",
1118
1076
  className: "btn btn-primary",
1119
1077
  onClick: () => {
1120
- if (r) {
1121
- r();
1078
+ if (s) {
1079
+ s();
1122
1080
  return;
1123
1081
  }
1124
- l && l((n) => [
1082
+ r && r((n) => [
1125
1083
  ...n,
1126
1084
  { id: `new-${Date.now()}`, name: "Untitled", active: !1 }
1127
1085
  ]);
@@ -1133,34 +1091,34 @@ function pt(e = {}) {
1133
1091
  }
1134
1092
  );
1135
1093
  }
1136
- function he({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n }) {
1137
- const i = Pe(), [u, o] = A(!1), s = Q(null);
1138
- z(() => {
1139
- if (!u) return;
1140
- const p = (v) => {
1141
- s.current && (s.current.contains(v.target) || o(!1));
1094
+ function me({ page: e, onRename: t, onKebab: s, onDragStart: r, onSwitchPage: n }) {
1095
+ const c = we(), [p, o] = E(!1), i = K(null);
1096
+ F(() => {
1097
+ if (!p) return;
1098
+ const m = (v) => {
1099
+ i.current && (i.current.contains(v.target) || o(!1));
1142
1100
  };
1143
- return document.addEventListener("mousedown", p, !0), () => document.removeEventListener("mousedown", p, !0);
1144
- }, [u]);
1145
- const c = () => {
1101
+ return document.addEventListener("mousedown", m, !0), () => document.removeEventListener("mousedown", m, !0);
1102
+ }, [p]);
1103
+ const l = () => {
1146
1104
  if (o(!1), t) return t(e.id);
1147
- if (!i?.renamePage) return;
1148
- const p = window.prompt("Rename page", e.name);
1149
- p != null && p.trim().length > 0 && i.renamePage(e.id, p.trim());
1105
+ if (!c?.renamePage) return;
1106
+ const m = window.prompt("Rename page", e.name);
1107
+ m != null && m.trim().length > 0 && c.renamePage(e.id, m.trim());
1150
1108
  }, d = () => {
1151
- o(!1), i?.duplicatePage?.(e.id);
1152
- }, m = () => {
1153
- o(!1), i?.deletePage?.(e.id);
1154
- }, h = (p) => {
1155
- p.stopPropagation(), n && !e.active && n(e.id);
1109
+ o(!1), c?.duplicatePage?.(e.id);
1110
+ }, u = () => {
1111
+ o(!1), c?.deletePage?.(e.id);
1112
+ }, h = (m) => {
1113
+ m.stopPropagation(), n && !e.active && n(e.id);
1156
1114
  }, y = ["pm-row"];
1157
- return e.active && y.push("active"), /* @__PURE__ */ f("div", { ref: s, className: y.join(" "), "data-page-id": e.id, role: "listitem", children: [
1115
+ return e.active && y.push("active"), /* @__PURE__ */ b("div", { ref: i, className: y.join(" "), "data-page-id": e.id, role: "listitem", children: [
1158
1116
  /* @__PURE__ */ a(
1159
1117
  "div",
1160
1118
  {
1161
1119
  className: "pm-handle",
1162
1120
  "aria-hidden": "true",
1163
- onMouseDown: () => l?.(e.id),
1121
+ onMouseDown: () => r?.(e.id),
1164
1122
  children: "⋮⋮"
1165
1123
  }
1166
1124
  ),
@@ -1171,8 +1129,8 @@ function he({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n
1171
1129
  role: n && !e.active ? "button" : void 0,
1172
1130
  tabIndex: n && !e.active ? 0 : void 0,
1173
1131
  onClick: n ? h : void 0,
1174
- onKeyDown: (p) => {
1175
- !n || e.active || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), p.stopPropagation(), n(e.id));
1132
+ onKeyDown: (m) => {
1133
+ !n || e.active || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), m.stopPropagation(), n(e.id));
1176
1134
  },
1177
1135
  "aria-label": n && !e.active ? `Switch to ${e.name}` : void 0,
1178
1136
  children: e.name
@@ -1185,26 +1143,26 @@ function he({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n
1185
1143
  className: "pm-kebab",
1186
1144
  "aria-label": "Page options",
1187
1145
  "aria-haspopup": "menu",
1188
- "aria-expanded": u,
1189
- onPointerDown: (p) => p.stopPropagation(),
1190
- onMouseDown: (p) => p.stopPropagation(),
1191
- onClick: (p) => {
1192
- if (p.stopPropagation(), r) return r(e.id);
1146
+ "aria-expanded": p,
1147
+ onPointerDown: (m) => m.stopPropagation(),
1148
+ onMouseDown: (m) => m.stopPropagation(),
1149
+ onClick: (m) => {
1150
+ if (m.stopPropagation(), s) return s(e.id);
1193
1151
  o((v) => !v);
1194
1152
  },
1195
1153
  children: "⋯"
1196
1154
  }
1197
1155
  ),
1198
- u && /* @__PURE__ */ f(
1156
+ p && /* @__PURE__ */ b(
1199
1157
  "div",
1200
1158
  {
1201
1159
  className: "pm-kebab-menu",
1202
1160
  role: "menu",
1203
1161
  "data-page-id": e.id,
1204
- onPointerDown: (p) => p.stopPropagation(),
1205
- onMouseDown: (p) => p.stopPropagation(),
1162
+ onPointerDown: (m) => m.stopPropagation(),
1163
+ onMouseDown: (m) => m.stopPropagation(),
1206
1164
  children: [
1207
- /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: c, children: "Rename" }),
1165
+ /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: l, children: "Rename" }),
1208
1166
  /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: d, children: "Duplicate" }),
1209
1167
  /* @__PURE__ */ a(
1210
1168
  "button",
@@ -1212,7 +1170,7 @@ function he({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n
1212
1170
  type: "button",
1213
1171
  role: "menuitem",
1214
1172
  className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
1215
- onClick: m,
1173
+ onClick: u,
1216
1174
  children: "Delete"
1217
1175
  }
1218
1176
  )
@@ -1221,121 +1179,121 @@ function he({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n
1221
1179
  )
1222
1180
  ] });
1223
1181
  }
1224
- const mt = [
1182
+ const ct = [
1225
1183
  { id: "p-pipeline", name: "My Pipeline", active: !0 },
1226
1184
  { id: "p-numbers", name: "My Numbers", active: !1 },
1227
1185
  { id: "p-morning", name: "My Morning", active: !1 },
1228
1186
  { id: "p-accounts", name: "My Accounts", active: !1 }
1229
1187
  ];
1230
- function Qt({
1188
+ function Bt({
1231
1189
  isOpen: e,
1232
- pages: t = mt,
1233
- externalPages: r,
1234
- activePageId: l,
1190
+ pages: t = ct,
1191
+ externalPages: s,
1192
+ activePageId: r,
1235
1193
  onRename: n,
1236
- onDuplicate: i,
1237
- onDelete: u,
1194
+ onDuplicate: c,
1195
+ onDelete: p,
1238
1196
  onReorder: o,
1239
- onCreatePage: s,
1240
- onSwitchPage: c
1197
+ onCreatePage: i,
1198
+ onSwitchPage: l
1241
1199
  }) {
1242
- const d = O(), [m, h] = A(() => [...t]), y = M((g, N) => {
1243
- h((P) => P.map((k) => k.id === g ? { ...k, name: N } : k));
1244
- }, []), p = M((g) => {
1245
- h((N) => {
1246
- const P = N.find((U) => U.id === g);
1247
- if (!P) return N;
1248
- const k = {
1249
- id: `${P.id}-copy-${Date.now()}`,
1250
- name: `${P.name} copy`,
1200
+ const d = M(), [u, h] = E(() => [...t]), y = k((f, T) => {
1201
+ h((S) => S.map((D) => D.id === f ? { ...D, name: T } : D));
1202
+ }, []), m = k((f) => {
1203
+ h((T) => {
1204
+ const S = T.find((W) => W.id === f);
1205
+ if (!S) return T;
1206
+ const D = {
1207
+ id: `${S.id}-copy-${Date.now()}`,
1208
+ name: `${S.name} copy`,
1251
1209
  active: !1
1252
- }, D = N.findIndex((U) => U.id === g);
1253
- return [...N.slice(0, D + 1), k, ...N.slice(D + 1)];
1210
+ }, L = T.findIndex((W) => W.id === f);
1211
+ return [...T.slice(0, L + 1), D, ...T.slice(L + 1)];
1254
1212
  });
1255
- }, []), v = M((g) => {
1256
- h((N) => N.filter((P) => P.id !== g));
1257
- }, []), T = M((g) => {
1258
- h((N) => {
1259
- const P = new Map(N.map((D) => [D.id, D])), k = g.map((D) => P.get(D)).filter(Boolean);
1260
- return k.length === N.length ? k : N;
1213
+ }, []), v = k((f) => {
1214
+ h((T) => T.filter((S) => S.id !== f));
1215
+ }, []), _ = k((f) => {
1216
+ h((T) => {
1217
+ const S = new Map(T.map((L) => [L.id, L])), D = f.map((L) => S.get(L)).filter(Boolean);
1218
+ return D.length === T.length ? D : T;
1261
1219
  });
1262
- }, []), S = r != null, b = S ? r : m, _ = l != null ? b.map((g) => ({ ...g, active: g.id === l })) : [...b], x = n ?? (S ? void 0 : y), $ = i ?? (S ? void 0 : p), F = u ?? (S ? void 0 : v), E = o ?? (S ? void 0 : T), L = M(
1263
- (g) => {
1264
- S || h(g);
1220
+ }, []), N = s != null, w = N ? s : u, g = r != null ? w.map((f) => ({ ...f, active: f.id === r })) : [...w], x = n ?? (N ? void 0 : y), R = c ?? (N ? void 0 : m), $ = p ?? (N ? void 0 : v), P = o ?? (N ? void 0 : _), A = k(
1221
+ (f) => {
1222
+ N || h(f);
1265
1223
  },
1266
- [S]
1267
- ), W = M(
1268
- (g) => {
1269
- const N = g[0]?.items.map((P) => P.id) ?? [];
1270
- N.length > 0 && E && E(N);
1224
+ [N]
1225
+ ), H = k(
1226
+ (f) => {
1227
+ const T = f[0]?.items.map((S) => S.id) ?? [];
1228
+ T.length > 0 && P && P(T);
1271
1229
  },
1272
- [E]
1273
- ), G = _.map((g) => `${g.id}:${g.name}`).join("|"), j = E != null && _.length > 1 ? /* @__PURE__ */ a(
1274
- Le,
1230
+ [P]
1231
+ ), q = g.map((f) => `${f.id}:${f.name}`).join("|"), G = P != null && g.length > 1 ? /* @__PURE__ */ a(
1232
+ De,
1275
1233
  {
1276
1234
  zones: [
1277
1235
  {
1278
1236
  zoneKey: "pm-pages",
1279
- items: _.map((g) => ({ ...g, id: g.id }))
1237
+ items: g.map((f) => ({ ...f, id: f.id }))
1280
1238
  }
1281
1239
  ],
1282
- onZoneChange: W,
1283
- renderZone: (g, N, P) => /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: P }),
1284
- renderItem: (g) => /* @__PURE__ */ a(
1285
- he,
1240
+ onZoneChange: H,
1241
+ renderZone: (f, T, S) => /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: S }),
1242
+ renderItem: (f) => /* @__PURE__ */ a(
1243
+ me,
1286
1244
  {
1287
- page: g,
1288
- onSwitchPage: c
1245
+ page: f,
1246
+ onSwitchPage: l
1289
1247
  },
1290
- g.id
1248
+ f.id
1291
1249
  )
1292
1250
  },
1293
- G
1294
- ) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: _.map((g) => /* @__PURE__ */ a(
1295
- he,
1251
+ q
1252
+ ) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: g.map((f) => /* @__PURE__ */ a(
1253
+ me,
1296
1254
  {
1297
- page: g,
1298
- onSwitchPage: c
1255
+ page: f,
1256
+ onSwitchPage: l
1299
1257
  },
1300
- g.id
1301
- )) }), Z = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
1258
+ f.id
1259
+ )) }), Q = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
1302
1260
  return /* @__PURE__ */ a(
1303
1261
  Te.Provider,
1304
1262
  {
1305
1263
  value: {
1306
- pages: _,
1307
- setPages: L,
1264
+ pages: g,
1265
+ setPages: A,
1308
1266
  renamePage: x,
1309
- duplicatePage: $,
1310
- deletePage: F,
1267
+ duplicatePage: R,
1268
+ deletePage: $,
1311
1269
  // Sprint 2026-05-20 — propagate live create binding for footer.
1312
- createPage: s
1270
+ createPage: i
1313
1271
  },
1314
1272
  children: /* @__PURE__ */ a(
1315
- K,
1273
+ z,
1316
1274
  {
1317
1275
  variant: "no-stage",
1318
1276
  title: "Manage pages",
1319
- onClose: Z,
1320
- footer: { right: /* @__PURE__ */ a(pt, {}) },
1321
- children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children: j })
1277
+ onClose: Q,
1278
+ footer: { right: /* @__PURE__ */ a(it, {}) },
1279
+ children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children: G })
1322
1280
  }
1323
1281
  )
1324
1282
  }
1325
1283
  );
1326
1284
  }
1327
- const Wt = {
1285
+ const Yt = {
1328
1286
  SETTINGS: "settings",
1329
1287
  CATALOG_ADD: "catalog-add",
1330
1288
  CATALOG_REPLACE: "catalog-replace",
1331
1289
  PAGE_MGMT: "page-management",
1332
1290
  NOTIFICATION_CENTER: "notification-center"
1333
- }, ht = {
1291
+ }, dt = {
1334
1292
  position: "fixed",
1335
1293
  inset: 0,
1336
1294
  pointerEvents: "none",
1337
1295
  zIndex: 55
1338
- }, ft = {
1296
+ }, ut = {
1339
1297
  position: "absolute",
1340
1298
  inset: 0,
1341
1299
  zIndex: 1,
@@ -1344,352 +1302,352 @@ const Wt = {
1344
1302
  pointerEvents: "none",
1345
1303
  background: "rgba(0, 0, 0, 0.04)"
1346
1304
  };
1347
- function Gt() {
1348
- const { state: e, dispatch: t, getCloseLog: r } = Me();
1349
- z(() => {
1305
+ function Vt() {
1306
+ const { state: e, dispatch: t, getCloseLog: s } = Me();
1307
+ F(() => {
1350
1308
  if (e.activePanelId == null) return;
1351
- function n(i) {
1352
- i.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
1309
+ function n(c) {
1310
+ c.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
1353
1311
  }
1354
1312
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
1355
1313
  }, [e.activePanelId, t]);
1356
- const l = Q(e);
1357
- return Ie(() => {
1358
- l.current = e;
1359
- }), z(() => {
1314
+ const r = K(e);
1315
+ return ke(() => {
1316
+ r.current = e;
1317
+ }), F(() => {
1360
1318
  if (process.env.NODE_ENV === "production") return;
1361
1319
  const n = window;
1362
1320
  return n.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), n.__panelsHostHandle = {
1363
1321
  dispatch: t,
1364
- getState: () => l.current,
1365
- getCloseLog: r
1322
+ getState: () => r.current,
1323
+ getCloseLog: s
1366
1324
  }, () => {
1367
1325
  n.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
1368
1326
  };
1369
- }, [t, r]), /* @__PURE__ */ a("div", { "data-panel-host": "true", style: ht, children: e.activePanelId != null && /* @__PURE__ */ a(
1327
+ }, [t, s]), /* @__PURE__ */ a("div", { "data-panel-host": "true", style: dt, children: e.activePanelId != null && /* @__PURE__ */ a(
1370
1328
  "div",
1371
1329
  {
1372
1330
  "data-panel-scrim": "true",
1373
- style: ft
1331
+ style: ut
1374
1332
  }
1375
1333
  ) });
1376
1334
  }
1377
- const gt = 700;
1378
- function bt(e, t) {
1379
- const [r, l] = A(null), n = Q(null);
1380
- return z(() => {
1335
+ const pt = 700;
1336
+ function mt(e, t) {
1337
+ const [s, r] = E(null), n = K(null);
1338
+ return F(() => {
1381
1339
  if (e != null) {
1382
- n.current != null && (clearTimeout(n.current), n.current = null), l(null);
1340
+ n.current != null && (clearTimeout(n.current), n.current = null), r(null);
1383
1341
  return;
1384
1342
  }
1385
1343
  if (t) {
1386
- n.current != null && (clearTimeout(n.current), n.current = null), l(null);
1344
+ n.current != null && (clearTimeout(n.current), n.current = null), r(null);
1387
1345
  return;
1388
1346
  }
1389
1347
  return n.current = setTimeout(() => {
1390
- l(null), n.current = null;
1391
- }, gt), () => {
1348
+ r(null), n.current = null;
1349
+ }, pt), () => {
1392
1350
  n.current != null && (clearTimeout(n.current), n.current = null);
1393
1351
  };
1394
- }, [e, t]), z(() => {
1395
- e != null && l(e);
1396
- }, [e]), e != null ? { panelId: e, isOpen: !0 } : r != null ? { panelId: r, isOpen: !1 } : { panelId: null, isOpen: !1 };
1352
+ }, [e, t]), F(() => {
1353
+ e != null && r(e);
1354
+ }, [e]), e != null ? { panelId: e, isOpen: !0 } : s != null ? { panelId: s, isOpen: !1 } : { panelId: null, isOpen: !1 };
1397
1355
  }
1398
- function jt({ panelComponents: e, children: t }) {
1399
- const r = O(), l = r?.state.lastClose?.reason === "section-hidden", n = bt(r?.state.activePanelId ?? null, l);
1400
- if (r == null || n.panelId == null) return null;
1401
- const i = n.panelId, u = n.isOpen, o = e?.[i];
1356
+ function Kt({ panelComponents: e, children: t }) {
1357
+ const s = M(), r = s?.state.lastClose?.reason === "section-hidden", n = mt(s?.state.activePanelId ?? null, r);
1358
+ if (s == null || n.panelId == null) return null;
1359
+ const c = n.panelId, p = n.isOpen, o = e?.[c];
1402
1360
  return o == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
1403
1361
  "[panels] No panel component registered for activePanelId:",
1404
- i
1405
- ), null) : /* @__PURE__ */ a(Oe, { isOpen: u, children: o != null ? /* @__PURE__ */ a(o, { isOpen: u }) : t });
1362
+ c
1363
+ ), null) : /* @__PURE__ */ a(Le, { isOpen: p, children: o != null ? /* @__PURE__ */ a(o, { isOpen: p }) : t });
1406
1364
  }
1407
- function fe(e) {
1365
+ function he(e) {
1408
1366
  return e === null ? null : e.kind === "manage-pages-action" ? `global-${e.align ?? "left"}` : e.kind === "card-overflow" || e.kind === "empty-cell" ? `section-${e.sectionIndex}` : null;
1409
1367
  }
1410
- const yt = 685, ge = 627, vt = "cubic-bezier(0.22, 1, 0.36, 1)", _t = 200;
1411
- function we(e, t) {
1368
+ const ht = 685, fe = 627, ft = "cubic-bezier(0.22, 1, 0.36, 1)", gt = 200;
1369
+ function Ee(e, t) {
1412
1370
  if (typeof window > "u") return t;
1413
- const r = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1414
- if (!r) return t;
1415
- const l = parseFloat(r);
1416
- return Number.isNaN(l) ? t : r.endsWith("s") && !r.endsWith("ms") ? l * 1e3 : l;
1371
+ const s = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1372
+ if (!s) return t;
1373
+ const r = parseFloat(s);
1374
+ return Number.isNaN(r) ? t : s.endsWith("s") && !s.endsWith("ms") ? r * 1e3 : r;
1417
1375
  }
1418
- function Ct(e, t) {
1376
+ function yt(e, t) {
1419
1377
  return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
1420
1378
  }
1421
1379
  function Y(e) {
1422
1380
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1423
1381
  }
1424
- function Nt(e) {
1425
- const { mountEl: t, chromeEl: r, reducedMotion: l, onAssert: n } = e;
1426
- if (t == null || r == null) {
1382
+ function bt(e) {
1383
+ const { mountEl: t, chromeEl: s, reducedMotion: r, onAssert: n } = e;
1384
+ if (t == null || s == null) {
1427
1385
  Y(e), n?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1428
1386
  return;
1429
1387
  }
1430
- if (l) {
1388
+ if (r) {
1431
1389
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), n?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
1432
1390
  return;
1433
1391
  }
1434
- if (typeof r.animate != "function") {
1392
+ if (typeof s.animate != "function") {
1435
1393
  Y(e), n?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1436
1394
  return;
1437
1395
  }
1438
- const i = r.cloneNode(!0);
1439
- i.id = "panel-chrome-frozen", i.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(i), r.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1440
- const u = we("--panel-open-dur", yt), o = Ct("--panel-easing", vt), s = r.animate(
1396
+ const c = s.cloneNode(!0);
1397
+ c.id = "panel-chrome-frozen", c.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(c), s.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1398
+ const p = Ee("--panel-open-dur", ht), o = yt("--panel-easing", ft), i = s.animate(
1441
1399
  [{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
1442
- { duration: u, easing: o, fill: "forwards" }
1400
+ { duration: p, easing: o, fill: "forwards" }
1443
1401
  );
1444
- s.addEventListener(
1402
+ i.addEventListener(
1445
1403
  "finish",
1446
1404
  () => {
1447
- i.remove(), r.style.zIndex = "", s.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1405
+ c.remove(), s.style.zIndex = "", i.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1448
1406
  },
1449
1407
  { once: !0 }
1450
1408
  );
1451
1409
  }
1452
- function St(e) {
1453
- const { mountEl: t, onAssert: r } = e;
1410
+ function vt(e) {
1411
+ const { mountEl: t, onAssert: s } = e;
1454
1412
  if (t == null) {
1455
- e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => Y(e), ge), r?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1413
+ e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => Y(e), fe), s?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1456
1414
  return;
1457
1415
  }
1458
- const l = we("--panel-close-dur", ge);
1459
- let n = !1, i = null;
1460
- const u = (s) => {
1461
- s.target !== t || s.propertyName !== "max-height" || n || (n = !0, i != null && clearTimeout(i), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-complete", timestamp: Date.now() }));
1416
+ const r = Ee("--panel-close-dur", fe);
1417
+ let n = !1, c = null;
1418
+ const p = (i) => {
1419
+ i.target !== t || i.propertyName !== "max-height" || n || (n = !0, c != null && clearTimeout(c), t.removeEventListener("transitionend", p), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "handoff-complete", timestamp: Date.now() }));
1462
1420
  }, o = () => {
1463
- n || (n = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-forced", timestamp: Date.now() }));
1421
+ n || (n = !0, t.removeEventListener("transitionend", p), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "handoff-forced", timestamp: Date.now() }));
1464
1422
  };
1465
- t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(o, l + _t);
1423
+ t.addEventListener("transitionend", p), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), c = setTimeout(o, r + gt);
1466
1424
  }
1467
- function Et(e) {
1468
- const { state: t, onAssert: r } = e;
1425
+ function _t(e) {
1426
+ const { state: t, onAssert: s } = e;
1469
1427
  if (t.activePanelId && t.isDirty) {
1470
- e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "blocked-dirty", timestamp: Date.now() });
1428
+ e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "blocked-dirty", timestamp: Date.now() });
1471
1429
  return;
1472
1430
  }
1473
- const l = fe(t.activeTrigger), n = fe(e.trigger);
1474
- if (!!t.activePanelId && l != null && l === n) {
1475
- Nt(e);
1431
+ const r = he(t.activeTrigger), n = he(e.trigger);
1432
+ if (!!t.activePanelId && r != null && r === n) {
1433
+ bt(e);
1476
1434
  return;
1477
1435
  }
1478
1436
  if (t.activePanelId) {
1479
- St(e);
1437
+ vt(e);
1480
1438
  return;
1481
1439
  }
1482
- Y(e), r?.({ branch: "fresh-open", timestamp: Date.now() });
1440
+ Y(e), s?.({ branch: "fresh-open", timestamp: Date.now() });
1483
1441
  }
1484
- function Tt() {
1442
+ function Ct() {
1485
1443
  if (!(typeof window > "u"))
1486
1444
  return window.__panelsAsserter;
1487
1445
  }
1488
- function Zt() {
1489
- const e = O(), t = be();
1490
- return M(
1491
- (r, l) => {
1446
+ function qt() {
1447
+ const e = M(), t = ae();
1448
+ return k(
1449
+ (s, r) => {
1492
1450
  if (!e)
1493
1451
  return;
1494
- const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, i = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
1495
- panelId: r,
1496
- trigger: l,
1452
+ const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, c = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, p = {
1453
+ panelId: s,
1454
+ trigger: r,
1497
1455
  state: e.state,
1498
1456
  dispatch: e.dispatch,
1499
1457
  mountEl: n,
1500
- chromeEl: i,
1458
+ chromeEl: c,
1501
1459
  reducedMotion: t,
1502
1460
  onAssert: (o) => {
1503
- Tt()?.recordTransition?.(o);
1461
+ Ct()?.recordTransition?.(o);
1504
1462
  }
1505
1463
  };
1506
- Et(u);
1464
+ _t(p);
1507
1465
  },
1508
1466
  [e, t]
1509
1467
  );
1510
1468
  }
1511
- let V = !1, X = null;
1512
- function se() {
1469
+ let V = !1, j = null;
1470
+ function ne() {
1513
1471
  const e = [];
1514
1472
  let t = "cleaned";
1515
1473
  document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
1516
- const l = document.querySelectorAll(".gloss-panel-mount");
1517
- l.length > 1 && e.push(`mount-count=${l.length}`);
1518
- const n = l[0] ?? null, i = n ? n.querySelectorAll(".gloss-panel-chrome") : [];
1519
- i.length > 1 && e.push(`chrome-count=${i.length}`);
1520
- const u = i[0] ?? null;
1521
- if (u) {
1522
- const d = u.style.zIndex;
1474
+ const r = document.querySelectorAll(".gloss-panel-mount");
1475
+ r.length > 1 && e.push(`mount-count=${r.length}`);
1476
+ const n = r[0] ?? null, c = n ? n.querySelectorAll(".gloss-panel-chrome") : [];
1477
+ c.length > 1 && e.push(`chrome-count=${c.length}`);
1478
+ const p = c[0] ?? null;
1479
+ if (p) {
1480
+ const d = p.style.zIndex;
1523
1481
  d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
1524
1482
  }
1525
- const o = n ? "present" : "absent", s = u ? "present" : "absent";
1483
+ const o = n ? "present" : "absent", i = p ? "present" : "absent";
1526
1484
  return {
1527
1485
  valid: e.length === 0,
1528
1486
  mount: o,
1529
- chrome: s,
1487
+ chrome: i,
1530
1488
  frozen: t,
1531
1489
  orphans: e,
1532
1490
  timestamp: Date.now()
1533
1491
  };
1534
1492
  }
1535
- const J = "8px 8px 0px", ee = "64px", te = "inset(0px 0px 60px 0px)", ne = "inset(0px -40px -40px -40px)";
1536
- function C(e, t, r, l, n) {
1537
- return { id: e, constraint: t, expected: r, actual: l, pass: n };
1493
+ const Z = "8px 8px 0px", X = "64px", J = "inset(0px 0px 60px 0px)", ee = "inset(0px -40px -40px -40px)";
1494
+ function C(e, t, s, r, n) {
1495
+ return { id: e, constraint: t, expected: s, actual: r, pass: n };
1538
1496
  }
1539
- function I(e) {
1497
+ function O(e) {
1540
1498
  const t = parseInt(e, 10);
1541
1499
  return Number.isFinite(t) ? t : NaN;
1542
1500
  }
1543
- function le() {
1544
- const e = [], t = document.querySelector(".gloss-panel-mount"), r = t?.querySelector(".gloss-panel-chrome") ?? null, l = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), n = document.querySelector(".bell-cutout"), i = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
1501
+ function re() {
1502
+ const e = [], t = document.querySelector(".gloss-panel-mount"), s = t?.querySelector(".gloss-panel-chrome") ?? null, r = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), n = document.querySelector(".bell-cutout"), c = document.querySelector(".bell-popover"), p = document.querySelector(".gloss-bottom-toolbar");
1545
1503
  if (!t)
1546
1504
  e.push(C("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1547
1505
  else {
1548
- const o = getComputedStyle(t), s = o.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = o.clipPath || t.style.clipPath || "", d = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), m = d ? parseInt(d[1], 10) : NaN, h = I(s), y = Number.isFinite(m) && Number.isFinite(h) && m === h;
1506
+ const o = getComputedStyle(t), i = o.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), l = o.clipPath || t.style.clipPath || "", d = l.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), u = d ? parseInt(d[1], 10) : NaN, h = O(i), y = Number.isFinite(u) && Number.isFinite(h) && u === h;
1549
1507
  e.push(
1550
1508
  C(
1551
1509
  "C1",
1552
1510
  "mount --reveal-y matches clip-path inset-bottom Npx",
1553
1511
  `inset(0 0 ${h}px 0) === --reveal-y(${h}px)`,
1554
- `--reveal-y=${s || "n/a"} clip-path=${c || "n/a"}`,
1512
+ `--reveal-y=${i || "n/a"} clip-path=${l || "n/a"}`,
1555
1513
  y
1556
1514
  )
1557
1515
  );
1558
1516
  }
1559
1517
  if (!t)
1560
- e.push(C("C2", "mount padding constant", J, "absent", !1));
1518
+ e.push(C("C2", "mount padding constant", Z, "absent", !1));
1561
1519
  else {
1562
- const o = t.style.padding, s = getComputedStyle(t), c = o || s.padding || "", d = c === J || c === "8px 8px 0px 8px";
1563
- e.push(C("C2", "mount padding constant", J, c || "n/a", d));
1520
+ const o = t.style.padding, i = getComputedStyle(t), l = o || i.padding || "", d = l === Z || l === "8px 8px 0px 8px";
1521
+ e.push(C("C2", "mount padding constant", Z, l || "n/a", d));
1564
1522
  }
1565
1523
  if (!t)
1566
- e.push(C("C3", "mount.bottom resolves to var(--tb-h)=64px", ee, "absent", !1));
1524
+ e.push(C("C3", "mount.bottom resolves to var(--tb-h)=64px", X, "absent", !1));
1567
1525
  else {
1568
- const s = getComputedStyle(t).bottom || t.style.bottom || "", c = s === ee;
1569
- e.push(C("C3", "mount.bottom resolves to var(--tb-h)=64px", ee, s || "n/a", c));
1526
+ const i = getComputedStyle(t).bottom || t.style.bottom || "", l = i === X;
1527
+ e.push(C("C3", "mount.bottom resolves to var(--tb-h)=64px", X, i || "n/a", l));
1570
1528
  }
1571
- if (!r)
1529
+ if (!s)
1572
1530
  e.push(C("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1573
1531
  else {
1574
- const o = getComputedStyle(r), s = I(
1575
- o.getPropertyValue("--row-h").trim() || r.style.getPropertyValue("--row-h").trim() || "0"
1576
- ), c = I(
1577
- o.getPropertyValue("--row-gap").trim() || r.style.getPropertyValue("--row-gap").trim() || "0"
1578
- ), d = s * 3 + c * 3 - 8, m = I(o.height || r.style.height || ""), h = Number.isFinite(s) && Number.isFinite(c) && Number.isFinite(m) && Number.isFinite(d) && m === d;
1532
+ const o = getComputedStyle(s), i = O(
1533
+ o.getPropertyValue("--row-h").trim() || s.style.getPropertyValue("--row-h").trim() || "0"
1534
+ ), l = O(
1535
+ o.getPropertyValue("--row-gap").trim() || s.style.getPropertyValue("--row-gap").trim() || "0"
1536
+ ), d = i * 3 + l * 3 - 8, u = O(o.height || s.style.height || ""), h = Number.isFinite(i) && Number.isFinite(l) && Number.isFinite(u) && Number.isFinite(d) && u === d;
1579
1537
  e.push(
1580
1538
  C(
1581
1539
  "C4",
1582
1540
  "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
1583
- `${d}px (rh=${s} rg=${c})`,
1584
- `${m}px`,
1541
+ `${d}px (rh=${i} rg=${l})`,
1542
+ `${u}px`,
1585
1543
  h
1586
1544
  )
1587
1545
  );
1588
1546
  }
1589
- if (!l || !r)
1547
+ if (!r || !s)
1590
1548
  e.push(
1591
1549
  C(
1592
1550
  "C5",
1593
1551
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1594
1552
  "present",
1595
- `coordinator=${l ? "present" : "absent"} chrome=${r ? "present" : "absent"}`,
1553
+ `coordinator=${r ? "present" : "absent"} chrome=${s ? "present" : "absent"}`,
1596
1554
  !1
1597
1555
  )
1598
1556
  );
1599
1557
  else {
1600
- const o = getComputedStyle(l), s = getComputedStyle(r), c = o.perspective || l.style.perspective || "", d = (o.perspectiveOrigin || l.style.perspectiveOrigin || "").trim(), m = s.perspectiveStyle || r.style.perspectiveStyle || "", v = c !== "" && c !== "none" && (d === "center bottom" || d === "50% 100%") && m === "flat";
1558
+ const o = getComputedStyle(r), i = getComputedStyle(s), l = o.perspective || r.style.perspective || "", d = (o.perspectiveOrigin || r.style.perspectiveOrigin || "").trim(), u = i.perspectiveStyle || s.style.perspectiveStyle || "", v = l !== "" && l !== "none" && (d === "center bottom" || d === "50% 100%") && u === "flat";
1601
1559
  e.push(
1602
1560
  C(
1603
1561
  "C5",
1604
1562
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1605
1563
  "perspective:not-none, origin:center bottom, chrome-style:flat",
1606
- `perspective=${c} origin=${d} chrome-style=${m}`,
1564
+ `perspective=${l} origin=${d} chrome-style=${u}`,
1607
1565
  v
1608
1566
  )
1609
1567
  );
1610
1568
  }
1611
1569
  {
1612
- let o = !1, s = "absent";
1570
+ let o = !1, i = "absent";
1613
1571
  try {
1614
- for (const c of Array.from(document.styleSheets)) {
1572
+ for (const l of Array.from(document.styleSheets)) {
1615
1573
  let d = [];
1616
1574
  try {
1617
- d = Array.from(c.cssRules ?? []);
1575
+ d = Array.from(l.cssRules ?? []);
1618
1576
  } catch {
1619
1577
  continue;
1620
1578
  }
1621
- for (const m of d)
1622
- if (m.name === "stage-spin") {
1623
- const y = Array.from(m.cssRules), p = y.find((_) => _.keyText === "0%" || _.keyText === "from"), v = y.find((_) => _.keyText === "100%" || _.keyText === "to"), T = p?.style.transform ?? "", S = v?.style.transform ?? "", b = /rotateY\(\s*0(?:deg)?\s*\)/;
1624
- o = b.test(T) && b.test(S), s = `0%=${T || "n/a"} 100%=${S || "n/a"}`;
1579
+ for (const u of d)
1580
+ if (u.name === "stage-spin") {
1581
+ const y = Array.from(u.cssRules), m = y.find((g) => g.keyText === "0%" || g.keyText === "from"), v = y.find((g) => g.keyText === "100%" || g.keyText === "to"), _ = m?.style.transform ?? "", N = v?.style.transform ?? "", w = /rotateY\(\s*0(?:deg)?\s*\)/;
1582
+ o = w.test(_) && w.test(N), i = `0%=${_ || "n/a"} 100%=${N || "n/a"}`;
1625
1583
  break;
1626
1584
  }
1627
- if (s !== "absent") break;
1585
+ if (i !== "absent") break;
1628
1586
  }
1629
1587
  } catch {
1630
- s = "inspection-error";
1588
+ i = "inspection-error";
1631
1589
  }
1632
1590
  e.push(
1633
1591
  C(
1634
1592
  "C6",
1635
1593
  "@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
1636
1594
  "both frames rotateY(0)",
1637
- s,
1595
+ i,
1638
1596
  o
1639
1597
  )
1640
1598
  );
1641
1599
  }
1642
1600
  {
1643
- const o = document.documentElement, s = getComputedStyle(o), c = s.getPropertyValue("--panel-open-dur").trim() || o.style.getPropertyValue("--panel-open-dur").trim(), d = s.getPropertyValue("--panel-close-dur").trim() || o.style.getPropertyValue("--panel-close-dur").trim(), m = I(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), h = I(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), y = Number.isFinite(m) && Number.isFinite(h) && m > h;
1601
+ const o = document.documentElement, i = getComputedStyle(o), l = i.getPropertyValue("--panel-open-dur").trim() || o.style.getPropertyValue("--panel-open-dur").trim(), d = i.getPropertyValue("--panel-close-dur").trim() || o.style.getPropertyValue("--panel-close-dur").trim(), u = O(l) || parseFloat(l) * (l.endsWith("s") && !l.endsWith("ms") ? 1e3 : 1), h = O(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), y = Number.isFinite(u) && Number.isFinite(h) && u > h;
1644
1602
  e.push(
1645
- C("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${d || "n/a"}`, y)
1603
+ C("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${l || "n/a"} close=${d || "n/a"}`, y)
1646
1604
  );
1647
1605
  }
1648
1606
  if (!n)
1649
1607
  e.push(C("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1650
1608
  else {
1651
- const o = getComputedStyle(n), s = o.animationName || "", c = o.transitionProperty || "", d = (s === "" || s === "none") && (c === "" || c === "none" || c === "all");
1609
+ const o = getComputedStyle(n), i = o.animationName || "", l = o.transitionProperty || "", d = (i === "" || i === "none") && (l === "" || l === "none" || l === "all");
1652
1610
  e.push(
1653
1611
  C(
1654
1612
  "C8",
1655
1613
  "BellCutout zero computed animation/transition",
1656
1614
  "animation:none AND transition:none",
1657
- `animation=${s || "n/a"} transition=${c || "n/a"}`,
1615
+ `animation=${i || "n/a"} transition=${l || "n/a"}`,
1658
1616
  d
1659
1617
  )
1660
1618
  );
1661
1619
  }
1662
1620
  if (!t)
1663
- e.push(C("C9", "mount closed-state clipPath", te, "absent", !1));
1621
+ e.push(C("C9", "mount closed-state clipPath", J, "absent", !1));
1664
1622
  else {
1665
- const o = t.style.clipPath, s = getComputedStyle(t), c = o || s.clipPath || "", d = c === te;
1666
- e.push(C("C9", "mount closed-state clipPath", te, c || "n/a", d));
1623
+ const o = t.style.clipPath, i = getComputedStyle(t), l = o || i.clipPath || "", d = l === J;
1624
+ e.push(C("C9", "mount closed-state clipPath", J, l || "n/a", d));
1667
1625
  }
1668
- if (!i)
1626
+ if (!c)
1669
1627
  e.push(C("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1670
1628
  else {
1671
- const o = i.parentElement, s = o === document.body;
1629
+ const o = c.parentElement, i = o === document.body;
1672
1630
  e.push(
1673
1631
  C(
1674
1632
  "C10",
1675
1633
  "bell-popover parentElement === document.body (open)",
1676
1634
  "body",
1677
1635
  o === document.body ? "body" : o?.tagName ?? "n/a",
1678
- s
1636
+ i
1679
1637
  )
1680
1638
  );
1681
1639
  }
1682
- if (!l)
1640
+ if (!r)
1683
1641
  e.push(C("C11", "coordinator overflow === visible", "visible", "absent", !1));
1684
1642
  else {
1685
- const s = getComputedStyle(l).overflow || l.style.overflow || "", c = s === "visible";
1686
- e.push(C("C11", "coordinator overflow === visible", "visible", s || "n/a", c));
1643
+ const i = getComputedStyle(r).overflow || r.style.overflow || "", l = i === "visible";
1644
+ e.push(C("C11", "coordinator overflow === visible", "visible", i || "n/a", l));
1687
1645
  }
1688
- if (!u)
1689
- e.push(C("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ne, "absent", !1));
1646
+ if (!p)
1647
+ e.push(C("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ee, "absent", !1));
1690
1648
  else {
1691
- const o = u.style.clipPath, s = getComputedStyle(u), c = o || s.clipPath || "", d = c === ne;
1692
- e.push(C("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ne, c || "n/a", d));
1649
+ const o = p.style.clipPath, i = getComputedStyle(p), l = o || i.clipPath || "", d = l === ee;
1650
+ e.push(C("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ee, l || "n/a", d));
1693
1651
  }
1694
1652
  return e.push(
1695
1653
  C(
@@ -1709,11 +1667,11 @@ function le() {
1709
1667
  )
1710
1668
  ), e;
1711
1669
  }
1712
- function Pt(e) {
1713
- return le().find((t) => t.id === e);
1670
+ function Nt(e) {
1671
+ return re().find((t) => t.id === e);
1714
1672
  }
1715
- function wt() {
1716
- const e = se();
1673
+ function St() {
1674
+ const e = ne();
1717
1675
  return { q12: [
1718
1676
  {
1719
1677
  id: "Q12-12",
@@ -1722,83 +1680,84 @@ function wt() {
1722
1680
  actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
1723
1681
  pass: e.valid
1724
1682
  }
1725
- ], cc: le() };
1683
+ ], cc: re() };
1726
1684
  }
1727
- function At() {
1685
+ function Pt() {
1728
1686
  return {
1729
- enable: xt,
1730
- disable: kt,
1687
+ enable: Tt,
1688
+ disable: wt,
1731
1689
  isEnabled: () => V,
1732
- getLastReport: () => X,
1690
+ getLastReport: () => j,
1733
1691
  recordTransition: (e) => {
1734
- V && (X = { ...e, ...se() });
1692
+ V && (j = { ...e, ...ne() });
1735
1693
  },
1736
1694
  assertOnce: () => {
1737
- const e = se();
1738
- return X = e, e;
1695
+ const e = ne();
1696
+ return j = e, e;
1739
1697
  },
1740
- assertCcOnly: le,
1741
- getCcRowById: Pt,
1742
- assertPanelTruths: wt
1698
+ assertCcOnly: re,
1699
+ getCcRowById: Nt,
1700
+ assertPanelTruths: St
1743
1701
  };
1744
1702
  }
1745
- function xt() {
1703
+ function Tt() {
1746
1704
  if (V = !0, typeof window > "u") return;
1747
- window.__panelsAsserter || (window.__panelsAsserter = At(), console.info(
1705
+ window.__panelsAsserter || (window.__panelsAsserter = Pt(), console.info(
1748
1706
  "[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
1749
1707
  ));
1750
1708
  }
1751
- function kt() {
1709
+ function wt() {
1752
1710
  V = !1;
1753
1711
  }
1754
1712
  export {
1755
- en as COMMITS,
1756
- Kt as CatalogAddShell,
1757
- Vt as CatalogFooter,
1758
- qt as CatalogReplaceShell,
1759
- re as CatalogStateContext,
1760
- je as CloneCard,
1761
- et as CloneStage,
1713
+ Wt as COMMITS,
1714
+ Ht as CatalogAddShell,
1715
+ zt as CatalogFooter,
1716
+ Ut as CatalogReplaceShell,
1717
+ se as CatalogStateContext,
1718
+ ve as CloneCard,
1719
+ Ze as CloneStage,
1762
1720
  Ce as MOCK_DEFAULT_LENS,
1763
1721
  _e as MOCK_LENSES,
1764
1722
  Ne as MOCK_LENS_META,
1765
- mt as MOCK_PAGES,
1723
+ ct as MOCK_PAGES,
1766
1724
  Se as MOCK_TILES_BY_LENS,
1767
- tn as NotificationCenterShell,
1768
- Wt as PANEL_IDS,
1769
- pt as PageMgmtFooter,
1770
- Qt as PageMgmtShell,
1725
+ st as MetricInfoShell,
1726
+ jt as NotificationCenterShell,
1727
+ Yt as PANEL_IDS,
1728
+ it as PageMgmtFooter,
1729
+ Bt as PageMgmtShell,
1771
1730
  Te as PageMgmtStateContext,
1772
- nn as PanelBody,
1773
- K as PanelChromeV2,
1774
- an as PanelFooter,
1775
- Bt as PanelFooterMessage,
1776
- sn as PanelHeader,
1777
- rn as PanelHost,
1778
- Gt as PanelHostShell,
1779
- Oe as PanelMount,
1780
- on as PanelNavigation,
1781
- ln as PanelProvider,
1782
- jt as PanelSlot,
1783
- cn as PanelStage,
1784
- Yt as SettingsShell,
1785
- le as assertCcOnly,
1786
- se as assertPanelDomShape,
1787
- wt as assertPanelTruths,
1788
- dn as deriveSurfaceState,
1789
- kt as disablePanelAsserter,
1790
- xt as enablePanelAsserter,
1791
- Pt as getCcRowById,
1792
- un as initialState,
1793
- fe as positionKey,
1794
- pn as reducer,
1795
- Et as transitionToPanel,
1731
+ Zt as PanelBody,
1732
+ z as PanelChromeV2,
1733
+ Xt as PanelFooter,
1734
+ $t as PanelFooterMessage,
1735
+ Jt as PanelHeader,
1736
+ en as PanelHost,
1737
+ Vt as PanelHostShell,
1738
+ Le as PanelMount,
1739
+ tn as PanelNavigation,
1740
+ nn as PanelProvider,
1741
+ Kt as PanelSlot,
1742
+ an as PanelStage,
1743
+ Ft as SettingsShell,
1744
+ re as assertCcOnly,
1745
+ ne as assertPanelDomShape,
1746
+ St as assertPanelTruths,
1747
+ sn as deriveSurfaceState,
1748
+ wt as disablePanelAsserter,
1749
+ Tt as enablePanelAsserter,
1750
+ Nt as getCcRowById,
1751
+ on as initialState,
1752
+ he as positionKey,
1753
+ rn as reducer,
1754
+ _t as transitionToPanel,
1796
1755
  oe as useCatalogState,
1797
- Ht as useEditingCardId,
1798
- Pe as usePageMgmtState,
1756
+ Rt as useEditingCardId,
1757
+ we as usePageMgmtState,
1799
1758
  Me as usePanelContext,
1800
- O as usePanelContextOptional,
1801
- mn as usePanelCoordinator,
1802
- be as useReducedMotionPanel,
1803
- Zt as useTransitionToPanel
1759
+ M as usePanelContextOptional,
1760
+ ln as usePanelCoordinator,
1761
+ ae as useReducedMotionPanel,
1762
+ qt as useTransitionToPanel
1804
1763
  };