@mt-gloss/ui 0.1.118 → 0.1.120

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,102 +1,36 @@
1
- import { u as H, h as he, g as Se, S as we, b as Ee, j as $, d as q } from "./COMMITS-BxJQwv4H.js";
2
- import { C as Kt, c as Yt, P as Wt, f as Gt, i as Qt, r as qt, e as jt } from "./COMMITS-BxJQwv4H.js";
3
- import { jsx as n, jsxs as p, Fragment as R } from "react/jsx-runtime";
4
- import F, { useState as x, useRef as V, createContext as fe, useContext as ge, useMemo as oe, useEffect as I, useCallback as k, useLayoutEffect as Pe } from "react";
5
- import { useSensors as xe, useSensor as ie, PointerSensor as Ae, KeyboardSensor as ke, DndContext as De, closestCenter as Oe } from "@dnd-kit/core";
6
- import { sortableKeyboardCoordinates as Le, SortableContext as Ie, horizontalListSortingStrategy as Me, arrayMove as $e, useSortable as Re } from "@dnd-kit/sortable";
7
- import { CSS as Fe } from "@dnd-kit/utilities";
8
- import { M as ce } from "./MetricCard-Cyoxhb_S.js";
9
- function Dt() {
10
- const e = H();
1
+ import { u as O, h as fe, j as V, g as we, S as Ee, b as Pe, k as xe } from "./COMMITS-8eHelQHO.js";
2
+ import { C as Ut, N as zt, o as Ht, d as Vt, p as Bt, l as Kt, c as Yt, n as Wt, P as Gt, m as Qt, f as qt, i as jt, r as Zt, e as Xt } from "./COMMITS-8eHelQHO.js";
3
+ import { jsx as n, jsxs as f, Fragment as B } from "react/jsx-runtime";
4
+ import U, { useState as x, useRef as K, createContext as ge, useContext as be, useMemo as ie, useEffect as R, useCallback as L, useLayoutEffect as Ae } from "react";
5
+ import { useSensors as ke, useSensor as ce, PointerSensor as De, KeyboardSensor as Le, DndContext as Oe, closestCenter as Me } from "@dnd-kit/core";
6
+ import { sortableKeyboardCoordinates as Ie, SortableContext as $e, horizontalListSortingStrategy as Re, arrayMove as Fe, useSortable as Ue } from "@dnd-kit/sortable";
7
+ import { CSS as ze } from "@dnd-kit/utilities";
8
+ import { M as de } from "./MetricCard-Cyoxhb_S.js";
9
+ function wt() {
10
+ const e = O();
11
11
  if (e?.state.activePanelId !== "settings") return null;
12
12
  const t = e.state.activeTrigger;
13
13
  return t?.kind === "card-overflow" ? t.cardId : null;
14
14
  }
15
- function Ue({ span: e, rotating: t = !0, children: l }) {
16
- const o = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), a = l != null ? "full" : "fallback";
17
- return /* @__PURE__ */ n("div", { className: o, "data-clone-fidelity": a, children: l });
15
+ function He({ span: e, rotating: t = !0, children: r }) {
16
+ const l = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), a = r != null ? "full" : "fallback";
17
+ return /* @__PURE__ */ n("div", { className: l, "data-clone-fidelity": a, children: r });
18
18
  }
19
- function ze({ title: e, onClose: t }) {
20
- return /* @__PURE__ */ p("div", { className: "gloss-panel-chrome-v2__header", children: [
21
- e != null && /* @__PURE__ */ n("span", { className: "gloss-panel-chrome-v2__title", children: e }),
22
- /* @__PURE__ */ n(
23
- "button",
24
- {
25
- id: "panel-close",
26
- type: "button",
27
- "aria-label": "Close panel",
28
- className: "gloss-panel-chrome-v2__close",
29
- onClick: t,
30
- children: "×"
31
- }
32
- )
33
- ] });
34
- }
35
- function He({ children: e }) {
36
- return /* @__PURE__ */ n(
37
- "div",
38
- {
39
- "data-panel-stage": !0,
40
- "aria-hidden": "true",
41
- className: "gloss-panel-chrome-v2__stage",
42
- children: e
43
- }
44
- );
45
- }
46
- function Ve({ children: e }) {
47
- return /* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__navigation", children: e });
48
- }
49
- function Be({ children: e }) {
50
- return /* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__body", children: e });
51
- }
52
- function Ke({ left: e, right: t }) {
53
- return /* @__PURE__ */ p("div", { className: "gloss-panel-chrome-v2__footer", children: [
54
- /* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__footer-left", children: e }),
55
- /* @__PURE__ */ n("div", { className: "gloss-panel-chrome-v2__footer-right", children: t })
56
- ] });
57
- }
58
- function Ye({
59
- children: e,
60
- onClose: t,
61
- title: l,
62
- variant: o = "no-stage",
63
- stage: a,
64
- navigation: i,
65
- footer: u
66
- }) {
67
- return /* @__PURE__ */ p(
68
- "div",
69
- {
70
- "data-chrome": "panel-v2",
71
- "data-chrome-variant": o,
72
- role: "dialog",
73
- "aria-modal": "true",
74
- className: `gloss-panel-chrome-v2 gloss-panel-chrome-v2--${o}`,
75
- children: [
76
- /* @__PURE__ */ n(ze, { title: l, onClose: t }),
77
- o === "with-stage" && /* @__PURE__ */ n(He, { children: a }),
78
- i != null && /* @__PURE__ */ n(Ve, { children: i }),
79
- /* @__PURE__ */ n(Be, { children: e }),
80
- u != null && /* @__PURE__ */ n(Ke, { left: u.left, right: u.right })
81
- ]
82
- }
83
- );
84
- }
85
- function Ot({ primary: e, secondary: t }) {
86
- return /* @__PURE__ */ p("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
19
+ function Et({ primary: e, secondary: t }) {
20
+ return /* @__PURE__ */ f("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
87
21
  /* @__PURE__ */ n("span", { className: "gloss-panel-chrome-v2__footer-msg-primary", children: e }),
88
22
  t != null && /* @__PURE__ */ n("span", { className: "gloss-panel-chrome-v2__footer-msg-secondary", children: t })
89
23
  ] });
90
24
  }
91
- function We({
25
+ function Ve({
92
26
  value: e,
93
27
  onChange: t,
94
- enabled: l = !1,
95
- onToggleEnabled: o
28
+ enabled: r = !1,
29
+ onToggleEnabled: l
96
30
  }) {
97
31
  const a = "settings-threshold-enabled";
98
- return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
99
- /* @__PURE__ */ p("div", { className: "settings-shell__toggle-row", children: [
32
+ return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
33
+ /* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
100
34
  /* @__PURE__ */ n("label", { htmlFor: a, className: "settings-shell__toggle-label", children: "Show threshold indicator" }),
101
35
  /* @__PURE__ */ n(
102
36
  "input",
@@ -105,16 +39,16 @@ function We({
105
39
  type: "checkbox",
106
40
  role: "switch",
107
41
  "aria-label": "Enable threshold indicator",
108
- "aria-checked": l,
109
- checked: l,
110
- onChange: (i) => o?.(i.target.checked),
42
+ "aria-checked": r,
43
+ checked: r,
44
+ onChange: (i) => l?.(i.target.checked),
111
45
  className: "settings-shell__toggle"
112
46
  }
113
47
  )
114
48
  ] }),
115
- l ? /* @__PURE__ */ p(R, { children: [
49
+ r ? /* @__PURE__ */ f(B, { children: [
116
50
  /* @__PURE__ */ n("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
117
- /* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
51
+ /* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
118
52
  /* @__PURE__ */ n(
119
53
  "input",
120
54
  {
@@ -131,7 +65,7 @@ function We({
131
65
  className: "settings-shell__slider"
132
66
  }
133
67
  ),
134
- /* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
68
+ /* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
135
69
  e,
136
70
  "%"
137
71
  ] })
@@ -139,10 +73,10 @@ function We({
139
73
  ] }) : /* @__PURE__ */ n("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default styling. Turn on to tint values below the threshold." })
140
74
  ] });
141
75
  }
142
- function Ge({ value: e, onChange: t }) {
143
- return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
76
+ function Be({ value: e, onChange: t }) {
77
+ return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
144
78
  /* @__PURE__ */ n("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
145
- /* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
79
+ /* @__PURE__ */ f("div", { className: "settings-shell__slider-row", children: [
146
80
  /* @__PURE__ */ n(
147
81
  "input",
148
82
  {
@@ -159,25 +93,25 @@ function Ge({ value: e, onChange: t }) {
159
93
  className: "settings-shell__slider"
160
94
  }
161
95
  ),
162
- /* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
96
+ /* @__PURE__ */ f("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
163
97
  e,
164
98
  " days"
165
99
  ] })
166
100
  ] })
167
101
  ] });
168
102
  }
169
- function Qe({ id: e, onRemove: t }) {
170
- const { attributes: l, listeners: o, setNodeRef: a, transform: i, transition: u, isDragging: r } = Re({ id: e }), s = {
171
- transform: Fe.Transform.toString(i),
103
+ function Ke({ id: e, onRemove: t }) {
104
+ const { attributes: r, listeners: l, setNodeRef: a, transform: i, transition: u, isDragging: o } = Ue({ id: e }), s = {
105
+ transform: ze.Transform.toString(i),
172
106
  transition: u,
173
- opacity: r ? 0.6 : 1
107
+ opacity: o ? 0.6 : 1
174
108
  };
175
- return /* @__PURE__ */ p(
109
+ return /* @__PURE__ */ f(
176
110
  "li",
177
111
  {
178
112
  ref: a,
179
113
  style: s,
180
- className: `settings-shell__slot-pill${r ? " settings-shell__slot-pill--dragging" : ""}`,
114
+ className: `settings-shell__slot-pill${o ? " settings-shell__slot-pill--dragging" : ""}`,
181
115
  children: [
182
116
  /* @__PURE__ */ n(
183
117
  "button",
@@ -185,8 +119,8 @@ function Qe({ id: e, onRemove: t }) {
185
119
  type: "button",
186
120
  className: "settings-shell__slot-pill__handle",
187
121
  "aria-label": `Reorder ${e}`,
122
+ ...r,
188
123
  ...l,
189
- ...o,
190
124
  children: /* @__PURE__ */ n("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
191
125
  }
192
126
  ),
@@ -205,35 +139,34 @@ function Qe({ id: e, onRemove: t }) {
205
139
  }
206
140
  );
207
141
  }
208
- function qe({ value: e, onChange: t }) {
209
- const l = xe(
210
- ie(Ae, { activationConstraint: { distance: 4 } }),
211
- ie(ke, { coordinateGetter: Le })
212
- ), o = F.useRef(!1), [a, i] = F.useState(!1), u = (s) => {
142
+ function Ye({ value: e, onChange: t }) {
143
+ const r = ke(
144
+ ce(De, { activationConstraint: { distance: 4 } }),
145
+ ce(Le, { coordinateGetter: Ie })
146
+ ), l = U.useRef(!1), [a, i] = U.useState(!1), u = (s) => {
213
147
  const { active: c, over: d } = s;
214
148
  if (!d || c.id === d.id) return;
215
- const h = e.findIndex((b) => b === c.id), f = e.findIndex((b) => b === d.id);
216
- h === -1 || f === -1 || t($e([...e], h, f));
217
- }, r = (s) => {
218
- o.current || (o.current = !0, i(!0)), t(e.filter((c) => c !== s));
149
+ const m = e.findIndex((b) => b === c.id), h = e.findIndex((b) => b === d.id);
150
+ m === -1 || h === -1 || t(Fe([...e], m, h));
151
+ }, o = (s) => {
152
+ l.current || (l.current = !0, i(!0)), t(e.filter((c) => c !== s));
219
153
  };
220
- return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
221
- /* @__PURE__ */ n("span", { className: "settings-shell__label", children: "Stack slots" }),
222
- /* @__PURE__ */ n(De, { sensors: l, collisionDetection: Oe, onDragEnd: u, children: /* @__PURE__ */ n(Ie, { items: [...e], strategy: Me, children: /* @__PURE__ */ n("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ n(Qe, { id: s, onRemove: () => r(s) }, s)) }) }) }),
154
+ return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
155
+ /* @__PURE__ */ n(Oe, { sensors: r, collisionDetection: Me, onDragEnd: u, children: /* @__PURE__ */ n($e, { items: [...e], strategy: Re, children: /* @__PURE__ */ n("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ n(Ke, { id: s, onRemove: () => o(s) }, s)) }) }) }),
223
156
  e.length === 0 && a && /* @__PURE__ */ n("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
224
157
  /* @__PURE__ */ n("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
225
158
  ] });
226
159
  }
227
- const je = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
228
- function Ze({
160
+ const We = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
161
+ function Ge({
229
162
  value: e,
230
163
  onSelect: t,
231
- enabled: l = !1,
232
- onToggleEnabled: o
164
+ enabled: r = !1,
165
+ onToggleEnabled: l
233
166
  }) {
234
167
  const a = "settings-accent-enabled";
235
- return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
236
- /* @__PURE__ */ p("div", { className: "settings-shell__toggle-row", children: [
168
+ return /* @__PURE__ */ f("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
169
+ /* @__PURE__ */ f("div", { className: "settings-shell__toggle-row", children: [
237
170
  /* @__PURE__ */ n("label", { htmlFor: a, className: "settings-shell__toggle-label", children: "Override default accent" }),
238
171
  /* @__PURE__ */ n(
239
172
  "input",
@@ -242,16 +175,16 @@ function Ze({
242
175
  type: "checkbox",
243
176
  role: "switch",
244
177
  "aria-label": "Enable accent override",
245
- "aria-checked": l,
246
- checked: l,
247
- onChange: (i) => o?.(i.target.checked),
178
+ "aria-checked": r,
179
+ checked: r,
180
+ onChange: (i) => l?.(i.target.checked),
248
181
  className: "settings-shell__toggle"
249
182
  }
250
183
  )
251
184
  ] }),
252
- l ? /* @__PURE__ */ p(R, { children: [
185
+ r ? /* @__PURE__ */ f(B, { children: [
253
186
  /* @__PURE__ */ n("span", { className: "settings-shell__label", children: "Accent color" }),
254
- /* @__PURE__ */ n("div", { className: "settings-shell__swatch-row", children: je.map((i) => {
187
+ /* @__PURE__ */ n("div", { className: "settings-shell__swatch-row", children: We.map((i) => {
255
188
  const u = e === i;
256
189
  return /* @__PURE__ */ n(
257
190
  "button",
@@ -269,22 +202,22 @@ function Ze({
269
202
  ] }) : /* @__PURE__ */ n("p", { className: "settings-shell__help", "aria-live": "polite", children: "Off — the card uses its default accent. Turn on to override." })
270
203
  ] });
271
204
  }
272
- const Xe = ["Orders", "Quota", "Unassigned"], Je = ["threshold", "timeframe", "color"];
273
- function Lt({
205
+ const Qe = ["Orders", "Quota", "Unassigned"], qe = ["threshold", "timeframe", "color"];
206
+ function Pt({
274
207
  isOpen: e,
275
208
  cardSpan: t,
276
- cardLabel: l = "Metric",
277
- cardValue: o = "—",
209
+ cardLabel: r = "Metric",
210
+ cardValue: l = "—",
278
211
  previewSlot: a,
279
- dimensions: i = Je,
212
+ dimensions: i = qe,
280
213
  initialTab: u,
281
- initialValues: r
214
+ initialValues: o
282
215
  }) {
283
- const s = H(), c = s?.state.activeTrigger, d = c?.kind === "card-overflow" ? c.cardId : null, h = he(), f = c?.span, b = t ?? f ?? 1, m = i[0] ?? "threshold", [v, w] = F.useState(u ?? m);
284
- F.useEffect(() => {
285
- i.includes(v) || w(m);
286
- }, [i, v, m]);
287
- const C = d != null ? s?.state?.bufferByCard?.[d]?.changes ?? {} : {}, y = typeof C.threshold == "number" ? C.threshold : typeof r?.threshold == "number" ? r.threshold : 80, D = typeof C.timeframe == "number" ? C.timeframe : typeof r?.timeframe == "number" ? r.timeframe : 30, B = typeof C.accent == "string" ? C.accent : typeof r?.accent == "string" ? r.accent : null, K = Array.isArray(C.slots) ? C.slots : Array.isArray(r?.slots) ? r.slots : Xe, O = typeof C.thresholdEnabled == "boolean" ? C.thresholdEnabled : typeof r?.thresholdEnabled == "boolean" ? r.thresholdEnabled : !1, Y = typeof C.accentEnabled == "boolean" ? C.accentEnabled : typeof r?.accentEnabled == "boolean" ? r.accentEnabled : !1, W = (P) => {
216
+ const s = O(), c = s?.state.activeTrigger, d = c?.kind === "card-overflow" ? c.cardId : null, m = fe(), h = c?.span, b = t ?? h ?? 1, p = i[0] ?? "threshold", [y, E] = U.useState(u ?? p);
217
+ U.useEffect(() => {
218
+ i.includes(y) || E(p);
219
+ }, [i, y, p]);
220
+ const v = d != null ? s?.state?.bufferByCard?.[d]?.changes ?? {} : {}, N = typeof v.threshold == "number" ? v.threshold : typeof o?.threshold == "number" ? o.threshold : 80, I = typeof v.timeframe == "number" ? v.timeframe : typeof o?.timeframe == "number" ? o.timeframe : 30, $ = typeof v.accent == "string" ? v.accent : typeof o?.accent == "string" ? o.accent : null, w = Array.isArray(v.slots) ? v.slots : Array.isArray(o?.slots) ? o.slots : Qe, A = typeof v.thresholdEnabled == "boolean" ? v.thresholdEnabled : typeof o?.thresholdEnabled == "boolean" ? o.thresholdEnabled : !1, Y = typeof v.accentEnabled == "boolean" ? v.accentEnabled : typeof o?.accentEnabled == "boolean" ? o.accentEnabled : !1, W = (P) => {
288
221
  d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(P.target.value) });
289
222
  }, G = (P) => {
290
223
  d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(P.target.value) });
@@ -292,28 +225,27 @@ function Lt({
292
225
  d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: P });
293
226
  }, Q = (P) => {
294
227
  d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: P });
295
- }, g = (P) => {
228
+ }, q = (P) => {
296
229
  d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "thresholdEnabled", value: P });
297
- }, N = (P) => {
230
+ }, g = (P) => {
298
231
  d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accentEnabled", value: P });
299
- }, T = s?.state.isDirty ?? !1, E = d;
232
+ }, C = s?.state.isDirty ?? !1, S = d;
300
233
  return /* @__PURE__ */ n(
301
- Ye,
234
+ V,
302
235
  {
303
236
  variant: "with-stage",
304
- title: "Configure metric",
305
237
  onClose: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
306
- stage: /* @__PURE__ */ n(Ue, { span: b, rotating: !h, children: a ?? /* @__PURE__ */ p(R, { children: [
307
- /* @__PURE__ */ n("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: l }),
308
- /* @__PURE__ */ n("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: o })
238
+ stage: /* @__PURE__ */ n(He, { span: b, rotating: !m, children: a ?? /* @__PURE__ */ f(B, { children: [
239
+ /* @__PURE__ */ n("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: r }),
240
+ /* @__PURE__ */ n("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: l })
309
241
  ] }) }),
310
242
  navigation: /* @__PURE__ */ n(
311
- Se,
243
+ we,
312
244
  {
313
245
  dimensions: i,
314
- activeTab: v,
315
- onSelect: w,
316
- reduced: h
246
+ activeTab: y,
247
+ onSelect: E,
248
+ reduced: m
317
249
  }
318
250
  ),
319
251
  footer: {
@@ -323,64 +255,52 @@ function Lt({
323
255
  id: "btn-reset",
324
256
  type: "button",
325
257
  className: "gloss-panel-chrome-v2__footer-btn",
326
- disabled: !T,
258
+ disabled: !C,
327
259
  onClick: () => {
328
- E != null && s?.dispatch({ type: "CLEAR_BUFFER", cardId: E });
260
+ S != null && s?.dispatch({ type: "CLEAR_BUFFER", cardId: S });
329
261
  },
330
262
  children: "Reset"
331
263
  }
332
264
  ),
333
- right: /* @__PURE__ */ p(R, { children: [
334
- /* @__PURE__ */ n(
335
- "button",
336
- {
337
- id: "settings-cancel",
338
- type: "button",
339
- className: "gloss-panel-chrome-v2__footer-btn",
340
- onClick: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "cancel-button" }),
341
- children: "Cancel"
342
- }
343
- ),
344
- /* @__PURE__ */ n(
345
- "button",
346
- {
347
- id: "settings-apply",
348
- type: "button",
349
- className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
350
- disabled: !T,
351
- onClick: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }),
352
- children: "Apply"
353
- }
354
- )
355
- ] })
265
+ right: /* @__PURE__ */ n(
266
+ "button",
267
+ {
268
+ id: "settings-apply",
269
+ type: "button",
270
+ className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
271
+ disabled: !C,
272
+ onClick: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }),
273
+ children: "Apply"
274
+ }
275
+ )
356
276
  },
357
- children: /* @__PURE__ */ n("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ p(
277
+ children: /* @__PURE__ */ n("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ f(
358
278
  "div",
359
279
  {
360
280
  role: "tabpanel",
361
- id: `settings-tabpanel-${v}`,
281
+ id: `settings-tabpanel-${y}`,
362
282
  "aria-label": "Settings dimension controls",
363
283
  tabIndex: 0,
364
284
  className: "settings-shell__tabpanel",
365
285
  children: [
366
- v === "threshold" && /* @__PURE__ */ n(
367
- We,
286
+ y === "threshold" && /* @__PURE__ */ n(
287
+ Ve,
368
288
  {
369
- value: y,
289
+ value: N,
370
290
  onChange: W,
371
- enabled: O,
372
- onToggleEnabled: g
291
+ enabled: A,
292
+ onToggleEnabled: q
373
293
  }
374
294
  ),
375
- v === "timeframe" && /* @__PURE__ */ n(Ge, { value: D, onChange: G }),
376
- v === "slots" && /* @__PURE__ */ n(qe, { value: K, onChange: Q }),
377
- v === "color" && /* @__PURE__ */ n(
378
- Ze,
295
+ y === "timeframe" && /* @__PURE__ */ n(Be, { value: I, onChange: G }),
296
+ y === "slots" && /* @__PURE__ */ n(Ye, { value: w, onChange: Q }),
297
+ y === "color" && /* @__PURE__ */ n(
298
+ Ge,
379
299
  {
380
- value: B,
300
+ value: $,
381
301
  onSelect: le,
382
302
  enabled: Y,
383
- onToggleEnabled: N
303
+ onToggleEnabled: g
384
304
  }
385
305
  )
386
306
  ]
@@ -389,7 +309,7 @@ function Lt({
389
309
  }
390
310
  );
391
311
  }
392
- const be = [
312
+ const ve = [
393
313
  "Overbought",
394
314
  "What's selling",
395
315
  "On track vs plan",
@@ -397,7 +317,7 @@ const be = [
397
317
  "Vendor performance",
398
318
  "Assortment mix",
399
319
  "Customer retention"
400
- ], ve = "Overbought", ae = {
320
+ ], ye = "Overbought", ae = {
401
321
  Overbought: {
402
322
  headline: "Am I overbought?",
403
323
  helper: "Find slow-moving inventory before discount cycles eat margin."
@@ -428,7 +348,7 @@ const be = [
428
348
  }
429
349
  };
430
350
  ae["Customer retention"].beta = !0;
431
- const ye = {
351
+ const _e = {
432
352
  Overbought: {
433
353
  primary: [
434
354
  {
@@ -893,16 +813,16 @@ const ye = {
893
813
  ]
894
814
  }
895
815
  };
896
- function _e({
816
+ function Ce({
897
817
  lenses: e,
898
818
  activeLens: t,
899
- onLensChange: l,
900
- variant: o = "pills",
819
+ onLensChange: r,
820
+ variant: l = "pills",
901
821
  lensMeta: a = ae
902
822
  }) {
903
- return o === "pills" ? /* @__PURE__ */ n("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ n("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((i) => {
904
- const u = i === t, r = a[i], s = ["cat-pill"];
905
- return u && s.push("active"), /* @__PURE__ */ p(
823
+ return l === "pills" ? /* @__PURE__ */ n("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ n("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((i) => {
824
+ const u = i === t, o = a[i], s = ["cat-pill"];
825
+ return u && s.push("active"), /* @__PURE__ */ f(
906
826
  "button",
907
827
  {
908
828
  type: "button",
@@ -911,28 +831,28 @@ function _e({
911
831
  className: s.join(" "),
912
832
  "data-lens": i,
913
833
  onClick: () => {
914
- u || l(i);
834
+ u || r(i);
915
835
  },
916
836
  children: [
917
837
  i,
918
- r?.beta && /* @__PURE__ */ n("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
838
+ o?.beta && /* @__PURE__ */ n("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
919
839
  ]
920
840
  },
921
841
  i
922
842
  );
923
- }) }) }) : /* @__PURE__ */ n(et, { lenses: e, activeLens: t, onLensChange: l });
843
+ }) }) }) : /* @__PURE__ */ n(je, { lenses: e, activeLens: t, onLensChange: r });
924
844
  }
925
- function et({
845
+ function je({
926
846
  lenses: e,
927
847
  activeLens: t,
928
- onLensChange: l
848
+ onLensChange: r
929
849
  }) {
930
- const [o, a] = x(!1), i = V(null), u = () => {
850
+ const [l, a] = x(!1), i = K(null), u = () => {
931
851
  i.current != null && (window.clearTimeout(i.current), i.current = null);
932
- }, r = () => {
852
+ }, o = () => {
933
853
  u(), i.current = window.setTimeout(() => a(!1), 100);
934
854
  }, s = e.filter((c) => c !== t);
935
- return /* @__PURE__ */ n("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ p("div", { className: "cat-segmented", children: [
855
+ return /* @__PURE__ */ n("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ f("div", { className: "cat-segmented", children: [
936
856
  /* @__PURE__ */ n(
937
857
  "button",
938
858
  {
@@ -943,23 +863,23 @@ function et({
943
863
  children: t
944
864
  }
945
865
  ),
946
- /* @__PURE__ */ p(
866
+ /* @__PURE__ */ f(
947
867
  "div",
948
868
  {
949
869
  className: "cat-seg-more",
950
870
  onMouseEnter: () => {
951
871
  u(), a(!0);
952
872
  },
953
- onMouseLeave: r,
873
+ onMouseLeave: o,
954
874
  children: [
955
- /* @__PURE__ */ n("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": o, children: "More ▾" }),
956
- o && /* @__PURE__ */ n(
875
+ /* @__PURE__ */ n("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": l, children: "More ▾" }),
876
+ l && /* @__PURE__ */ n(
957
877
  "div",
958
878
  {
959
879
  className: "cat-seg-overflow",
960
880
  role: "menu",
961
881
  onMouseEnter: u,
962
- onMouseLeave: r,
882
+ onMouseLeave: o,
963
883
  children: s.map((c) => /* @__PURE__ */ n(
964
884
  "button",
965
885
  {
@@ -967,7 +887,7 @@ function et({
967
887
  "data-lens": c,
968
888
  role: "menuitem",
969
889
  onClick: () => {
970
- l(c), a(!1);
890
+ r(c), a(!1);
971
891
  },
972
892
  children: c
973
893
  },
@@ -980,23 +900,23 @@ function et({
980
900
  )
981
901
  ] }) });
982
902
  }
983
- function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
903
+ function te({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
984
904
  return /* @__PURE__ */ n("div", { className: "cat-tiles", children: e.map((a) => {
985
905
  const i = a.id === t, u = a.subStats != null && a.subStats.length > 0;
986
- let r = null;
987
- u ? a.subStats.length === 5 ? r = "span-5" : a.subStats.length === 3 ? r = "span-3" : r = "span-2" : a.stack === !0 && (r = "span-2");
906
+ let o = null;
907
+ u ? a.subStats.length === 5 ? o = "span-5" : a.subStats.length === 3 ? o = "span-3" : o = "span-2" : a.stack === !0 && (o = "span-2");
988
908
  const s = ["cat-tile"];
989
- r && s.push(r), i && s.push("selected"), a.isNew && s.push("is-new"), a.startHere && s.push("start-here"), a.donut && s.push("has-donut");
909
+ o && s.push(o), i && s.push("selected"), a.isNew && s.push("is-new"), a.startHere && s.push("start-here"), a.donut && s.push("has-donut");
990
910
  const c = 1;
991
911
  let d = 0.7;
992
912
  if (a.donut) {
993
- const h = /([\d.]+)\s*%/.exec(a.value);
994
- if (h) {
995
- const f = parseFloat(h[1]);
996
- Number.isFinite(f) && (d = Math.max(0, Math.min(1, f / 100)));
913
+ const m = /([\d.]+)\s*%/.exec(a.value);
914
+ if (m) {
915
+ const h = parseFloat(m[1]);
916
+ Number.isFinite(h) && (d = Math.max(0, Math.min(1, h / 100)));
997
917
  }
998
918
  }
999
- return /* @__PURE__ */ p(
919
+ return /* @__PURE__ */ f(
1000
920
  "button",
1001
921
  {
1002
922
  type: "button",
@@ -1007,11 +927,11 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
1007
927
  "data-donut": a.donut ? "true" : void 0,
1008
928
  "data-accent": a.accent,
1009
929
  "aria-pressed": i,
1010
- onClick: () => l(a.id, a.desc),
930
+ onClick: () => r(a.id, a.desc),
1011
931
  style: a.accent ? { "--cat-tile-accent": a.accent } : void 0,
1012
932
  children: [
1013
933
  a.startHere && /* @__PURE__ */ n("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
1014
- o ? o(a) : /* @__PURE__ */ n(
934
+ l ? l(a) : /* @__PURE__ */ n(
1015
935
  "div",
1016
936
  {
1017
937
  className: "cat-tile-primitive-wrapper gloss-metric-card",
@@ -1019,7 +939,7 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
1019
939
  style: { pointerEvents: "none", width: "100%", height: "100%" },
1020
940
  "aria-hidden": "true",
1021
941
  children: a.donut ? /* @__PURE__ */ n(
1022
- ce,
942
+ de,
1023
943
  {
1024
944
  variant: "donut",
1025
945
  label: a.label,
@@ -1030,7 +950,7 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
1030
950
  colSpan: c
1031
951
  }
1032
952
  ) : /* @__PURE__ */ n(
1033
- ce,
953
+ de,
1034
954
  {
1035
955
  variant: "standard",
1036
956
  label: a.label,
@@ -1040,7 +960,7 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
1040
960
  )
1041
961
  }
1042
962
  ),
1043
- a.variants && a.variants.length > 0 && /* @__PURE__ */ n("span", { className: "cat-tile-variants", "aria-hidden": "true", children: a.variants.map((h) => /* @__PURE__ */ n("span", { children: h }, h)) }),
963
+ a.variants && a.variants.length > 0 && /* @__PURE__ */ n("span", { className: "cat-tile-variants", "aria-hidden": "true", children: a.variants.map((m) => /* @__PURE__ */ n("span", { children: m }, m)) }),
1044
964
  a.isNew && /* @__PURE__ */ n("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
1045
965
  ]
1046
966
  },
@@ -1048,17 +968,17 @@ function te({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: o }) {
1048
968
  );
1049
969
  }) });
1050
970
  }
1051
- const se = fe(null);
1052
- function tt() {
1053
- return ge(se);
971
+ const se = ge(null);
972
+ function re() {
973
+ return be(se);
1054
974
  }
1055
- function nt({ mode: e, dispatch: t }) {
1056
- const l = tt();
1057
- if (l == null && e == null) return null;
1058
- const o = l?.mode ?? e ?? "add", a = l?.selectedTileId ?? null, i = l?.description ?? null, u = a == null;
1059
- return /* @__PURE__ */ p("div", { className: "panel-footer catalog", children: [
975
+ function xt({ mode: e, dispatch: t }) {
976
+ const r = re();
977
+ if (r == null && e == null) return null;
978
+ const l = r?.mode ?? e ?? "add", a = r?.selectedTileId ?? null, i = r?.description ?? null, u = a == null;
979
+ return /* @__PURE__ */ f("div", { className: "panel-footer catalog", children: [
1060
980
  /* @__PURE__ */ n("div", { className: "cat-description", id: "cat-desc", children: i ?? /* @__PURE__ */ n("em", { children: "Tap a metric to see its description" }) }),
1061
- /* @__PURE__ */ p("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
981
+ /* @__PURE__ */ f("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
1062
982
  /* @__PURE__ */ n("div", { className: "spacer", style: { flex: 1 } }),
1063
983
  /* @__PURE__ */ n(
1064
984
  "button",
@@ -1070,7 +990,7 @@ function nt({ mode: e, dispatch: t }) {
1070
990
  children: "Cancel"
1071
991
  }
1072
992
  ),
1073
- o === "add" && /* @__PURE__ */ n(
993
+ l === "add" && /* @__PURE__ */ n(
1074
994
  "button",
1075
995
  {
1076
996
  id: "btn-cat-add",
@@ -1081,7 +1001,7 @@ function nt({ mode: e, dispatch: t }) {
1081
1001
  children: "Add metric"
1082
1002
  }
1083
1003
  ),
1084
- o === "replace" && /* @__PURE__ */ n(
1004
+ l === "replace" && /* @__PURE__ */ n(
1085
1005
  "button",
1086
1006
  {
1087
1007
  id: "btn-cat-replace",
@@ -1095,155 +1015,199 @@ function nt({ mode: e, dispatch: t }) {
1095
1015
  ] })
1096
1016
  ] });
1097
1017
  }
1098
- function de(e, t) {
1018
+ function ue(e, t) {
1099
1019
  if (t.length === 0) return !0;
1100
- const l = t.toLowerCase();
1101
- if (e.label.toLowerCase().includes(l) || e.value.toLowerCase().includes(l)) return !0;
1020
+ const r = t.toLowerCase();
1021
+ if (e.label.toLowerCase().includes(r) || e.value.toLowerCase().includes(r)) return !0;
1102
1022
  if (e.subStats) {
1103
- for (const o of e.subStats)
1104
- if (o.label.toLowerCase().includes(l) || o.value.toLowerCase().includes(l)) return !0;
1023
+ for (const l of e.subStats)
1024
+ if (l.label.toLowerCase().includes(r) || l.value.toLowerCase().includes(r)) return !0;
1105
1025
  }
1106
1026
  return !1;
1107
1027
  }
1108
- function It({
1028
+ function Ze() {
1029
+ const t = re()?.description ?? null;
1030
+ return t == null ? /* @__PURE__ */ n("span", { style: { fontStyle: "italic" }, children: "Tap a metric to see its description" }) : /* @__PURE__ */ n("span", { children: t });
1031
+ }
1032
+ function At({
1109
1033
  isOpen: e,
1110
- lenses: t = be,
1111
- defaultLens: l = ve,
1112
- tilesByLens: o = ye,
1034
+ lenses: t = ve,
1035
+ defaultLens: r = ye,
1036
+ tilesByLens: l = _e,
1113
1037
  lensMeta: a = ae,
1114
- footerSlot: i,
1115
- renderTile: u
1038
+ renderTile: i
1116
1039
  }) {
1117
- const [r, s] = x(l), [c, d] = x(null), [h, f] = x(null), [b, m] = x(""), v = o[r] ?? { primary: [] }, w = a[r], S = oe(
1118
- () => v.primary.filter((y) => de(y, b)),
1119
- [v.primary, b]
1120
- ), C = oe(
1121
- () => (v.secondary ?? []).filter((y) => de(y, b)),
1122
- [v.secondary, b]
1123
- );
1124
- return /* @__PURE__ */ p(
1040
+ const u = O(), [o, s] = x(r), [c, d] = x(null), [m, h] = x(null), [b, p] = x(""), y = l[o] ?? { primary: [] }, E = a[o], T = ie(
1041
+ () => y.primary.filter((w) => ue(w, b)),
1042
+ [y.primary, b]
1043
+ ), v = ie(
1044
+ () => (y.secondary ?? []).filter((w) => ue(w, b)),
1045
+ [y.secondary, b]
1046
+ ), N = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), I = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), $ = c == null;
1047
+ return /* @__PURE__ */ n(
1125
1048
  se.Provider,
1126
1049
  {
1127
- value: { mode: "add", selectedTileId: c, description: h },
1128
- children: [
1129
- /* @__PURE__ */ p("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
1130
- /* @__PURE__ */ n("div", { className: "cat-search", children: /* @__PURE__ */ n(
1131
- "input",
1132
- {
1133
- type: "search",
1134
- className: "cat-search-input",
1135
- placeholder: "Search metrics",
1136
- "aria-label": "Search metrics",
1137
- value: b,
1138
- onChange: (y) => m(y.target.value)
1139
- }
1140
- ) }),
1141
- /* @__PURE__ */ n(
1142
- _e,
1143
- {
1144
- lenses: t,
1145
- activeLens: r,
1146
- lensMeta: a,
1147
- variant: "pills",
1148
- onLensChange: (y) => {
1149
- s(y), d(null), f(null), m("");
1050
+ value: { mode: "add", selectedTileId: c, description: m },
1051
+ children: /* @__PURE__ */ n(
1052
+ V,
1053
+ {
1054
+ variant: "no-stage",
1055
+ title: "Add a metric",
1056
+ onClose: I,
1057
+ footer: {
1058
+ left: /* @__PURE__ */ n(Ze, {}),
1059
+ right: /* @__PURE__ */ n(
1060
+ "button",
1061
+ {
1062
+ id: "btn-cat-add",
1063
+ type: "button",
1064
+ className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
1065
+ disabled: $,
1066
+ onClick: N,
1067
+ children: "Add metric"
1150
1068
  }
1151
- }
1152
- ),
1153
- w && /* @__PURE__ */ p("div", { className: "cat-lens-meta", children: [
1154
- /* @__PURE__ */ n("h3", { className: "cat-lens-headline", children: w.headline }),
1155
- /* @__PURE__ */ n("p", { className: "cat-lens-helper", children: w.helper })
1156
- ] }),
1157
- /* @__PURE__ */ n(
1158
- te,
1159
- {
1160
- tiles: S,
1161
- selectedTileId: c,
1162
- onSelectTile: (y, D) => {
1163
- d(y), f(D);
1164
- },
1165
- renderTile: u
1166
- }
1167
- ),
1168
- C.length > 0 && /* @__PURE__ */ p("div", { className: "cat-more-in-lens", children: [
1169
- /* @__PURE__ */ n("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
1069
+ )
1070
+ },
1071
+ children: /* @__PURE__ */ f("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
1072
+ /* @__PURE__ */ n("div", { className: "cat-search", children: /* @__PURE__ */ n(
1073
+ "input",
1074
+ {
1075
+ type: "search",
1076
+ className: "cat-search-input",
1077
+ placeholder: "Search metrics",
1078
+ "aria-label": "Search metrics",
1079
+ value: b,
1080
+ onChange: (w) => p(w.target.value)
1081
+ }
1082
+ ) }),
1083
+ /* @__PURE__ */ n(
1084
+ Ce,
1085
+ {
1086
+ lenses: t,
1087
+ activeLens: o,
1088
+ lensMeta: a,
1089
+ variant: "pills",
1090
+ onLensChange: (w) => {
1091
+ s(w), d(null), h(null), p("");
1092
+ }
1093
+ }
1094
+ ),
1095
+ E && /* @__PURE__ */ f("div", { className: "cat-lens-meta", children: [
1096
+ /* @__PURE__ */ n("h3", { className: "cat-lens-headline", children: E.headline }),
1097
+ /* @__PURE__ */ n("p", { className: "cat-lens-helper", children: E.helper })
1098
+ ] }),
1170
1099
  /* @__PURE__ */ n(
1171
1100
  te,
1172
1101
  {
1173
- tiles: C,
1102
+ tiles: T,
1174
1103
  selectedTileId: c,
1175
- onSelectTile: (y, D) => {
1176
- d(y), f(D);
1104
+ onSelectTile: (w, A) => {
1105
+ d(w), h(A);
1177
1106
  },
1178
- renderTile: u
1107
+ renderTile: i
1179
1108
  }
1180
- )
1181
- ] }),
1182
- S.length === 0 && C.length === 0 && b.length > 0 && /* @__PURE__ */ p("div", { className: "cat-empty", children: [
1183
- 'No metrics match "',
1184
- b,
1185
- '".'
1109
+ ),
1110
+ v.length > 0 && /* @__PURE__ */ f("div", { className: "cat-more-in-lens", children: [
1111
+ /* @__PURE__ */ n("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
1112
+ /* @__PURE__ */ n(
1113
+ te,
1114
+ {
1115
+ tiles: v,
1116
+ selectedTileId: c,
1117
+ onSelectTile: (w, A) => {
1118
+ d(w), h(A);
1119
+ },
1120
+ renderTile: i
1121
+ }
1122
+ )
1123
+ ] }),
1124
+ T.length === 0 && v.length === 0 && b.length > 0 && /* @__PURE__ */ f("div", { className: "cat-empty", children: [
1125
+ 'No metrics match "',
1126
+ b,
1127
+ '".'
1128
+ ] })
1186
1129
  ] })
1187
- ] }),
1188
- i
1189
- ]
1130
+ }
1131
+ )
1190
1132
  }
1191
1133
  );
1192
1134
  }
1193
- function Mt({
1135
+ function Xe() {
1136
+ const t = re()?.description ?? null;
1137
+ return t == null ? /* @__PURE__ */ n("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ n(B, { children: t });
1138
+ }
1139
+ function kt({
1194
1140
  isOpen: e,
1195
1141
  replacingLabel: t,
1196
- lenses: l = be,
1197
- defaultLens: o = ve,
1198
- tilesByLens: a = ye,
1199
- footerSlot: i,
1200
- renderTile: u
1142
+ lenses: r = ve,
1143
+ defaultLens: l = ye,
1144
+ tilesByLens: a = _e,
1145
+ renderTile: i
1201
1146
  }) {
1202
- const [r, s] = x(o), [c, d] = x(null), [h, f] = x(null), b = a[r] ?? { primary: [] }, m = [...b.primary, ...b.secondary ?? []];
1203
- return /* @__PURE__ */ p(
1147
+ const u = O(), [o, s] = x(l), [c, d] = x(null), [m, h] = x(null), b = a[o] ?? { primary: [] }, p = [...b.primary, ...b.secondary ?? []], y = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), E = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), T = c == null;
1148
+ return /* @__PURE__ */ n(
1204
1149
  se.Provider,
1205
1150
  {
1206
- value: { mode: "replace", selectedTileId: c, description: h },
1207
- children: [
1208
- /* @__PURE__ */ p("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
1209
- t && /* @__PURE__ */ p("p", { className: "cat-subtitle", children: [
1210
- "replacing ",
1211
- t
1212
- ] }),
1213
- /* @__PURE__ */ n(
1214
- _e,
1215
- {
1216
- lenses: l,
1217
- activeLens: r,
1218
- onLensChange: (v) => {
1219
- s(v), d(null), f(null);
1151
+ value: { mode: "replace", selectedTileId: c, description: m },
1152
+ children: /* @__PURE__ */ n(
1153
+ V,
1154
+ {
1155
+ variant: "no-stage",
1156
+ title: "Replace metric",
1157
+ onClose: E,
1158
+ footer: {
1159
+ left: /* @__PURE__ */ n(Xe, {}),
1160
+ right: /* @__PURE__ */ n(
1161
+ "button",
1162
+ {
1163
+ id: "btn-cat-replace",
1164
+ type: "button",
1165
+ className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
1166
+ disabled: T,
1167
+ onClick: y,
1168
+ children: "Replace metric"
1220
1169
  }
1221
- }
1222
- ),
1223
- /* @__PURE__ */ n(
1224
- te,
1225
- {
1226
- tiles: m,
1227
- selectedTileId: c,
1228
- onSelectTile: (v, w) => {
1229
- d(v), f(w);
1230
- },
1231
- renderTile: u
1232
- }
1233
- )
1234
- ] }),
1235
- i
1236
- ]
1170
+ )
1171
+ },
1172
+ children: /* @__PURE__ */ f("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
1173
+ t && /* @__PURE__ */ f("p", { className: "cat-subtitle", children: [
1174
+ "replacing ",
1175
+ t
1176
+ ] }),
1177
+ /* @__PURE__ */ n(
1178
+ Ce,
1179
+ {
1180
+ lenses: r,
1181
+ activeLens: o,
1182
+ onLensChange: (v) => {
1183
+ s(v), d(null), h(null);
1184
+ }
1185
+ }
1186
+ ),
1187
+ /* @__PURE__ */ n(
1188
+ te,
1189
+ {
1190
+ tiles: p,
1191
+ selectedTileId: c,
1192
+ onSelectTile: (v, N) => {
1193
+ d(v), h(N);
1194
+ },
1195
+ renderTile: i
1196
+ }
1197
+ )
1198
+ ] })
1199
+ }
1200
+ )
1237
1201
  }
1238
1202
  );
1239
1203
  }
1240
- const Ce = fe(null);
1241
- function Ne() {
1242
- return ge(Ce);
1204
+ const Ne = ge(null);
1205
+ function Te() {
1206
+ return be(Ne);
1243
1207
  }
1244
- function at(e = {}) {
1245
- const t = Ne(), l = t?.createPage, o = t?.setPages;
1246
- return /* @__PURE__ */ p(
1208
+ function Je(e = {}) {
1209
+ const t = Te(), r = t?.createPage, l = t?.setPages;
1210
+ return /* @__PURE__ */ f(
1247
1211
  "div",
1248
1212
  {
1249
1213
  className: "panel-footer pm",
@@ -1257,11 +1221,11 @@ function at(e = {}) {
1257
1221
  type: "button",
1258
1222
  className: "btn btn-primary",
1259
1223
  onClick: () => {
1260
- if (l) {
1261
- l();
1224
+ if (r) {
1225
+ r();
1262
1226
  return;
1263
1227
  }
1264
- o && o((a) => [
1228
+ l && l((a) => [
1265
1229
  ...a,
1266
1230
  { id: `new-${Date.now()}`, name: "Untitled", active: !1 }
1267
1231
  ]);
@@ -1273,34 +1237,34 @@ function at(e = {}) {
1273
1237
  }
1274
1238
  );
1275
1239
  }
1276
- function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a }) {
1277
- const i = Ne(), [u, r] = x(!1), s = V(null);
1278
- I(() => {
1240
+ function pe({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: a }) {
1241
+ const i = Te(), [u, o] = x(!1), s = K(null);
1242
+ R(() => {
1279
1243
  if (!u) return;
1280
- const m = (v) => {
1281
- s.current && (s.current.contains(v.target) || r(!1));
1244
+ const p = (y) => {
1245
+ s.current && (s.current.contains(y.target) || o(!1));
1282
1246
  };
1283
- return document.addEventListener("mousedown", m, !0), () => document.removeEventListener("mousedown", m, !0);
1247
+ return document.addEventListener("mousedown", p, !0), () => document.removeEventListener("mousedown", p, !0);
1284
1248
  }, [u]);
1285
1249
  const c = () => {
1286
- if (r(!1), t) return t(e.id);
1250
+ if (o(!1), t) return t(e.id);
1287
1251
  if (!i?.renamePage) return;
1288
- const m = window.prompt("Rename page", e.name);
1289
- m != null && m.trim().length > 0 && i.renamePage(e.id, m.trim());
1252
+ const p = window.prompt("Rename page", e.name);
1253
+ p != null && p.trim().length > 0 && i.renamePage(e.id, p.trim());
1290
1254
  }, d = () => {
1291
- r(!1), i?.duplicatePage?.(e.id);
1292
- }, h = () => {
1293
- r(!1), i?.deletePage?.(e.id);
1294
- }, f = (m) => {
1295
- m.stopPropagation(), a && !e.active && a(e.id);
1255
+ o(!1), i?.duplicatePage?.(e.id);
1256
+ }, m = () => {
1257
+ o(!1), i?.deletePage?.(e.id);
1258
+ }, h = (p) => {
1259
+ p.stopPropagation(), a && !e.active && a(e.id);
1296
1260
  }, b = ["pm-row"];
1297
- return e.active && b.push("active"), /* @__PURE__ */ p("div", { ref: s, className: b.join(" "), "data-page-id": e.id, role: "listitem", children: [
1261
+ return e.active && b.push("active"), /* @__PURE__ */ f("div", { ref: s, className: b.join(" "), "data-page-id": e.id, role: "listitem", children: [
1298
1262
  /* @__PURE__ */ n(
1299
1263
  "div",
1300
1264
  {
1301
1265
  className: "pm-handle",
1302
1266
  "aria-hidden": "true",
1303
- onMouseDown: () => o?.(e.id),
1267
+ onMouseDown: () => l?.(e.id),
1304
1268
  children: "⋮⋮"
1305
1269
  }
1306
1270
  ),
@@ -1310,9 +1274,9 @@ function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a
1310
1274
  className: "pm-name",
1311
1275
  role: a && !e.active ? "button" : void 0,
1312
1276
  tabIndex: a && !e.active ? 0 : void 0,
1313
- onClick: a ? f : void 0,
1314
- onKeyDown: (m) => {
1315
- !a || e.active || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), m.stopPropagation(), a(e.id));
1277
+ onClick: a ? h : void 0,
1278
+ onKeyDown: (p) => {
1279
+ !a || e.active || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), p.stopPropagation(), a(e.id));
1316
1280
  },
1317
1281
  "aria-label": a && !e.active ? `Switch to ${e.name}` : void 0,
1318
1282
  children: e.name
@@ -1326,23 +1290,23 @@ function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a
1326
1290
  "aria-label": "Page options",
1327
1291
  "aria-haspopup": "menu",
1328
1292
  "aria-expanded": u,
1329
- onPointerDown: (m) => m.stopPropagation(),
1330
- onMouseDown: (m) => m.stopPropagation(),
1331
- onClick: (m) => {
1332
- if (m.stopPropagation(), l) return l(e.id);
1333
- r((v) => !v);
1293
+ onPointerDown: (p) => p.stopPropagation(),
1294
+ onMouseDown: (p) => p.stopPropagation(),
1295
+ onClick: (p) => {
1296
+ if (p.stopPropagation(), r) return r(e.id);
1297
+ o((y) => !y);
1334
1298
  },
1335
1299
  children: "⋯"
1336
1300
  }
1337
1301
  ),
1338
- u && /* @__PURE__ */ p(
1302
+ u && /* @__PURE__ */ f(
1339
1303
  "div",
1340
1304
  {
1341
1305
  className: "pm-kebab-menu",
1342
1306
  role: "menu",
1343
1307
  "data-page-id": e.id,
1344
- onPointerDown: (m) => m.stopPropagation(),
1345
- onMouseDown: (m) => m.stopPropagation(),
1308
+ onPointerDown: (p) => p.stopPropagation(),
1309
+ onMouseDown: (p) => p.stopPropagation(),
1346
1310
  children: [
1347
1311
  /* @__PURE__ */ n("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: c, children: "Rename" }),
1348
1312
  /* @__PURE__ */ n("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: d, children: "Duplicate" }),
@@ -1352,7 +1316,7 @@ function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a
1352
1316
  type: "button",
1353
1317
  role: "menuitem",
1354
1318
  className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
1355
- onClick: h,
1319
+ onClick: m,
1356
1320
  children: "Delete"
1357
1321
  }
1358
1322
  )
@@ -1361,116 +1325,121 @@ function ue({ page: e, onRename: t, onKebab: l, onDragStart: o, onSwitchPage: a
1361
1325
  )
1362
1326
  ] });
1363
1327
  }
1364
- const st = [
1328
+ const et = [
1365
1329
  { id: "p-pipeline", name: "My Pipeline", active: !0 },
1366
1330
  { id: "p-numbers", name: "My Numbers", active: !1 },
1367
1331
  { id: "p-morning", name: "My Morning", active: !1 },
1368
1332
  { id: "p-accounts", name: "My Accounts", active: !1 }
1369
1333
  ];
1370
- function $t({
1334
+ function Dt({
1371
1335
  isOpen: e,
1372
- pages: t = st,
1373
- footerSlot: l,
1374
- externalPages: o,
1375
- activePageId: a,
1376
- onRename: i,
1377
- onDuplicate: u,
1378
- onDelete: r,
1379
- onReorder: s,
1380
- onCreatePage: c,
1381
- onSwitchPage: d
1336
+ pages: t = et,
1337
+ externalPages: r,
1338
+ activePageId: l,
1339
+ onRename: a,
1340
+ onDuplicate: i,
1341
+ onDelete: u,
1342
+ onReorder: o,
1343
+ onCreatePage: s,
1344
+ onSwitchPage: c
1382
1345
  }) {
1383
- const [h, f] = x(() => [...t]), b = k((g, N) => {
1384
- f((T) => T.map((E) => E.id === g ? { ...E, name: N } : E));
1385
- }, []), m = k((g) => {
1386
- f((N) => {
1387
- const T = N.find((M) => M.id === g);
1388
- if (!T) return N;
1389
- const E = {
1390
- id: `${T.id}-copy-${Date.now()}`,
1391
- name: `${T.name} copy`,
1346
+ const d = O(), [m, h] = x(() => [...t]), b = L((g, C) => {
1347
+ h((S) => S.map((k) => k.id === g ? { ...k, name: C } : k));
1348
+ }, []), p = L((g) => {
1349
+ h((C) => {
1350
+ const S = C.find((F) => F.id === g);
1351
+ if (!S) return C;
1352
+ const k = {
1353
+ id: `${S.id}-copy-${Date.now()}`,
1354
+ name: `${S.name} copy`,
1392
1355
  active: !1
1393
- }, A = N.findIndex((M) => M.id === g);
1394
- return [...N.slice(0, A + 1), E, ...N.slice(A + 1)];
1356
+ }, D = C.findIndex((F) => F.id === g);
1357
+ return [...C.slice(0, D + 1), k, ...C.slice(D + 1)];
1395
1358
  });
1396
- }, []), v = k((g) => {
1397
- f((N) => N.filter((T) => T.id !== g));
1398
- }, []), w = k((g) => {
1399
- f((N) => {
1400
- const T = new Map(N.map((A) => [A.id, A])), E = g.map((A) => T.get(A)).filter(Boolean);
1401
- return E.length === N.length ? E : N;
1359
+ }, []), y = L((g) => {
1360
+ h((C) => C.filter((S) => S.id !== g));
1361
+ }, []), E = L((g) => {
1362
+ h((C) => {
1363
+ const S = new Map(C.map((D) => [D.id, D])), k = g.map((D) => S.get(D)).filter(Boolean);
1364
+ return k.length === C.length ? k : C;
1402
1365
  });
1403
- }, []), S = o != null, C = S ? o : h, y = a != null ? C.map((g) => ({ ...g, active: g.id === a })) : [...C], D = i ?? (S ? void 0 : b), B = u ?? (S ? void 0 : m), K = r ?? (S ? void 0 : v), O = s ?? (S ? void 0 : w), Y = k(
1366
+ }, []), T = r != null, v = T ? r : m, N = l != null ? v.map((g) => ({ ...g, active: g.id === l })) : [...v], I = a ?? (T ? void 0 : b), $ = i ?? (T ? void 0 : p), w = u ?? (T ? void 0 : y), A = o ?? (T ? void 0 : E), Y = L(
1404
1367
  (g) => {
1405
- S || f(g);
1368
+ T || h(g);
1406
1369
  },
1407
- [S]
1408
- ), W = k(
1370
+ [T]
1371
+ ), W = L(
1409
1372
  (g) => {
1410
- const N = g[0]?.items.map((T) => T.id) ?? [];
1411
- N.length > 0 && O && O(N);
1373
+ const C = g[0]?.items.map((S) => S.id) ?? [];
1374
+ C.length > 0 && A && A(C);
1412
1375
  },
1413
- [O]
1414
- ), G = y.map((g) => `${g.id}:${g.name}`).join("|"), Q = O != null && y.length > 1 ? /* @__PURE__ */ n(
1415
- we,
1376
+ [A]
1377
+ ), G = N.map((g) => `${g.id}:${g.name}`).join("|"), Q = A != null && N.length > 1 ? /* @__PURE__ */ n(
1378
+ Ee,
1416
1379
  {
1417
1380
  zones: [
1418
1381
  {
1419
1382
  zoneKey: "pm-pages",
1420
- items: y.map((g) => ({ ...g, id: g.id }))
1383
+ items: N.map((g) => ({ ...g, id: g.id }))
1421
1384
  }
1422
1385
  ],
1423
1386
  onZoneChange: W,
1424
- renderZone: (g, N, T) => /* @__PURE__ */ n("div", { className: "pm-list", role: "list", children: T }),
1387
+ renderZone: (g, C, S) => /* @__PURE__ */ n("div", { className: "pm-list", role: "list", children: S }),
1425
1388
  renderItem: (g) => /* @__PURE__ */ n(
1426
- ue,
1389
+ pe,
1427
1390
  {
1428
1391
  page: g,
1429
- onSwitchPage: d
1392
+ onSwitchPage: c
1430
1393
  },
1431
1394
  g.id
1432
1395
  )
1433
1396
  },
1434
1397
  G
1435
- ) : /* @__PURE__ */ n("div", { className: "pm-list", role: "list", children: y.map((g) => /* @__PURE__ */ n(
1436
- ue,
1398
+ ) : /* @__PURE__ */ n("div", { className: "pm-list", role: "list", children: N.map((g) => /* @__PURE__ */ n(
1399
+ pe,
1437
1400
  {
1438
1401
  page: g,
1439
- onSwitchPage: d
1402
+ onSwitchPage: c
1440
1403
  },
1441
1404
  g.id
1442
- )) });
1405
+ )) }), q = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
1443
1406
  return /* @__PURE__ */ n(
1444
- Ce.Provider,
1407
+ Ne.Provider,
1445
1408
  {
1446
1409
  value: {
1447
- pages: y,
1410
+ pages: N,
1448
1411
  setPages: Y,
1449
- renamePage: D,
1450
- duplicatePage: B,
1451
- deletePage: K,
1412
+ renamePage: I,
1413
+ duplicatePage: $,
1414
+ deletePage: w,
1452
1415
  // Sprint 2026-05-20 — propagate live create binding for footer.
1453
- createPage: c
1416
+ createPage: s
1454
1417
  },
1455
- children: /* @__PURE__ */ p("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
1456
- Q,
1457
- l != null && /* @__PURE__ */ n("div", { className: "pm-footer-pin", children: l })
1458
- ] })
1418
+ children: /* @__PURE__ */ n(
1419
+ V,
1420
+ {
1421
+ variant: "no-stage",
1422
+ title: "Manage pages",
1423
+ onClose: q,
1424
+ footer: { right: /* @__PURE__ */ n(Je, {}) },
1425
+ children: /* @__PURE__ */ n("div", { "data-shell": "page-management", "aria-hidden": !e, children: Q })
1426
+ }
1427
+ )
1459
1428
  }
1460
1429
  );
1461
1430
  }
1462
- const Rt = {
1431
+ const Lt = {
1463
1432
  SETTINGS: "settings",
1464
1433
  CATALOG_ADD: "catalog-add",
1465
1434
  CATALOG_REPLACE: "catalog-replace",
1466
1435
  PAGE_MGMT: "page-management",
1467
1436
  NOTIFICATION_CENTER: "notification-center"
1468
- }, rt = {
1437
+ }, tt = {
1469
1438
  position: "fixed",
1470
1439
  inset: 0,
1471
1440
  pointerEvents: "none",
1472
1441
  zIndex: 55
1473
- }, lt = {
1442
+ }, nt = {
1474
1443
  position: "absolute",
1475
1444
  inset: 0,
1476
1445
  zIndex: 1,
@@ -1479,235 +1448,192 @@ const Rt = {
1479
1448
  pointerEvents: "none",
1480
1449
  background: "rgba(0, 0, 0, 0.04)"
1481
1450
  };
1482
- function Ft() {
1483
- const { state: e, dispatch: t, getCloseLog: l } = Ee();
1484
- I(() => {
1451
+ function Ot() {
1452
+ const { state: e, dispatch: t, getCloseLog: r } = Pe();
1453
+ R(() => {
1485
1454
  if (e.activePanelId == null) return;
1486
1455
  function i(u) {
1487
1456
  u.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
1488
1457
  }
1489
1458
  return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
1490
1459
  }, [e.activePanelId, t]);
1491
- const o = V(e);
1492
- Pe(() => {
1493
- o.current = e;
1494
- }), I(() => {
1460
+ const l = K(e);
1461
+ Ae(() => {
1462
+ l.current = e;
1463
+ }), R(() => {
1495
1464
  if (process.env.NODE_ENV === "production") return;
1496
1465
  const i = window;
1497
1466
  return i.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), i.__panelsHostHandle = {
1498
1467
  dispatch: t,
1499
- getState: () => o.current,
1500
- getCloseLog: l
1468
+ getState: () => l.current,
1469
+ getCloseLog: r
1501
1470
  }, () => {
1502
1471
  i.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
1503
1472
  };
1504
- }, [t, l]);
1505
- const a = k(() => {
1473
+ }, [t, r]);
1474
+ const a = L(() => {
1506
1475
  t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
1507
1476
  }, [t]);
1508
- return /* @__PURE__ */ n("div", { "data-panel-host": "true", style: rt, children: e.activePanelId != null && /* @__PURE__ */ n(
1477
+ return /* @__PURE__ */ n("div", { "data-panel-host": "true", style: tt, children: e.activePanelId != null && /* @__PURE__ */ n(
1509
1478
  "div",
1510
1479
  {
1511
1480
  "data-panel-scrim": "true",
1512
- style: lt,
1481
+ style: nt,
1513
1482
  onClick: a
1514
1483
  }
1515
1484
  ) });
1516
1485
  }
1517
- const ot = 700;
1518
- function it(e) {
1519
- const [t, l] = x(null), o = V(null);
1520
- return I(() => {
1486
+ const at = 700;
1487
+ function st(e) {
1488
+ const [t, r] = x(null), l = K(null);
1489
+ return R(() => {
1521
1490
  if (e != null) {
1522
- o.current != null && (clearTimeout(o.current), o.current = null), l(null);
1491
+ l.current != null && (clearTimeout(l.current), l.current = null), r(null);
1523
1492
  return;
1524
1493
  }
1525
- return l((a) => a), o.current = setTimeout(() => {
1526
- l(null), o.current = null;
1527
- }, ot), () => {
1528
- o.current != null && (clearTimeout(o.current), o.current = null);
1494
+ return r((a) => a), l.current = setTimeout(() => {
1495
+ r(null), l.current = null;
1496
+ }, at), () => {
1497
+ l.current != null && (clearTimeout(l.current), l.current = null);
1529
1498
  };
1530
- }, [e]), I(() => {
1531
- e != null && l(e);
1499
+ }, [e]), R(() => {
1500
+ e != null && r(e);
1532
1501
  }, [e]), e != null ? { panelId: e, isOpen: !0 } : t != null ? { panelId: t, isOpen: !1 } : { panelId: null, isOpen: !1 };
1533
1502
  }
1534
- function Ut({ panelComponents: e, children: t }) {
1535
- const l = H();
1536
- if (l == null) return null;
1537
- const { state: o, dispatch: a } = l, i = it(o.activePanelId);
1538
- if (i.panelId == null) return null;
1539
- const u = i.panelId, r = i.isOpen, s = e?.[u];
1540
- if (s == null && t == null)
1541
- return process.env.NODE_ENV !== "production" && console.error(
1542
- "[panels] No panel component registered for activePanelId:",
1543
- u
1544
- ), null;
1545
- if (u === "settings")
1546
- return /* @__PURE__ */ n($, { isOpen: r, children: s != null ? /* @__PURE__ */ n(s, { isOpen: r }) : t });
1547
- if (u === "catalog-add" || u === "catalog-replace") {
1548
- if (s == null) return null;
1549
- const c = u === "catalog-replace" ? "replace" : "add";
1550
- return /* @__PURE__ */ n($, { isOpen: r, children: /* @__PURE__ */ n(
1551
- q,
1552
- {
1553
- isOpen: r,
1554
- onClose: () => a({ type: "CLOSE_PANEL", reason: "header-x" }),
1555
- footer: null,
1556
- title: c === "replace" ? "Replace metric" : "Add a metric",
1557
- children: /* @__PURE__ */ n(
1558
- s,
1559
- {
1560
- isOpen: r,
1561
- footerSlot: /* @__PURE__ */ n(nt, { mode: c, dispatch: a })
1562
- }
1563
- )
1564
- }
1565
- ) });
1566
- }
1567
- return u === "page-management" ? s == null ? null : /* @__PURE__ */ n($, { isOpen: r, children: /* @__PURE__ */ n(
1568
- q,
1569
- {
1570
- isOpen: r,
1571
- onClose: () => a({ type: "CLOSE_PANEL", reason: "header-x" }),
1572
- footer: null,
1573
- title: "Manage pages",
1574
- children: /* @__PURE__ */ n(s, { isOpen: r, footerSlot: /* @__PURE__ */ n(at, {}) })
1575
- }
1576
- ) }) : /* @__PURE__ */ n($, { isOpen: r, children: /* @__PURE__ */ n(
1577
- q,
1578
- {
1579
- isOpen: !0,
1580
- onClose: () => a({ type: "CLOSE_PANEL", reason: "header-x" }),
1581
- footer: null,
1582
- children: s != null ? /* @__PURE__ */ n(s, { isOpen: r }) : t
1583
- }
1584
- ) });
1503
+ function Mt({ panelComponents: e, children: t }) {
1504
+ const r = O(), l = st(r?.state.activePanelId ?? null);
1505
+ if (r == null || l.panelId == null) return null;
1506
+ const a = l.panelId, i = l.isOpen, u = e?.[a];
1507
+ return u == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
1508
+ "[panels] No panel component registered for activePanelId:",
1509
+ a
1510
+ ), null) : /* @__PURE__ */ n(xe, { isOpen: i, children: u != null ? /* @__PURE__ */ n(u, { isOpen: i }) : t });
1585
1511
  }
1586
- function pe(e) {
1512
+ function me(e) {
1587
1513
  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;
1588
1514
  }
1589
- const ct = 685, me = 627, dt = "cubic-bezier(0.22, 1, 0.36, 1)", ut = 200;
1590
- function Te(e, t) {
1515
+ const rt = 685, he = 627, ot = "cubic-bezier(0.22, 1, 0.36, 1)", lt = 200;
1516
+ function Se(e, t) {
1591
1517
  if (typeof window > "u") return t;
1592
- const l = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1593
- if (!l) return t;
1594
- const o = parseFloat(l);
1595
- return Number.isNaN(o) ? t : l.endsWith("s") && !l.endsWith("ms") ? o * 1e3 : o;
1518
+ const r = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1519
+ if (!r) return t;
1520
+ const l = parseFloat(r);
1521
+ return Number.isNaN(l) ? t : r.endsWith("s") && !r.endsWith("ms") ? l * 1e3 : l;
1596
1522
  }
1597
- function pt(e, t) {
1523
+ function it(e, t) {
1598
1524
  return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
1599
1525
  }
1600
- function U(e) {
1526
+ function z(e) {
1601
1527
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1602
1528
  }
1603
- function mt(e) {
1604
- const { mountEl: t, chromeEl: l, reducedMotion: o, onAssert: a } = e;
1605
- if (t == null || l == null) {
1606
- U(e), a?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1529
+ function ct(e) {
1530
+ const { mountEl: t, chromeEl: r, reducedMotion: l, onAssert: a } = e;
1531
+ if (t == null || r == null) {
1532
+ z(e), a?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1607
1533
  return;
1608
1534
  }
1609
- if (o) {
1535
+ if (l) {
1610
1536
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), a?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
1611
1537
  return;
1612
1538
  }
1613
- if (typeof l.animate != "function") {
1614
- U(e), a?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1539
+ if (typeof r.animate != "function") {
1540
+ z(e), a?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1615
1541
  return;
1616
1542
  }
1617
- const i = l.cloneNode(!0);
1618
- 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), l.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1619
- const u = Te("--panel-open-dur", ct), r = pt("--panel-easing", dt), s = l.animate(
1543
+ const i = r.cloneNode(!0);
1544
+ 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 });
1545
+ const u = Se("--panel-open-dur", rt), o = it("--panel-easing", ot), s = r.animate(
1620
1546
  [{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
1621
- { duration: u, easing: r, fill: "forwards" }
1547
+ { duration: u, easing: o, fill: "forwards" }
1622
1548
  );
1623
1549
  s.addEventListener(
1624
1550
  "finish",
1625
1551
  () => {
1626
- i.remove(), l.style.zIndex = "", s.cancel(), a?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1552
+ i.remove(), r.style.zIndex = "", s.cancel(), a?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1627
1553
  },
1628
1554
  { once: !0 }
1629
1555
  );
1630
1556
  }
1631
- function ht(e) {
1632
- const { mountEl: t, onAssert: l } = e;
1557
+ function dt(e) {
1558
+ const { mountEl: t, onAssert: r } = e;
1633
1559
  if (t == null) {
1634
- e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => U(e), me), l?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1560
+ e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => z(e), he), r?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1635
1561
  return;
1636
1562
  }
1637
- const o = Te("--panel-close-dur", me);
1563
+ const l = Se("--panel-close-dur", he);
1638
1564
  let a = !1, i = null;
1639
1565
  const u = (s) => {
1640
- s.target !== t || s.propertyName !== "max-height" || a || (a = !0, i != null && clearTimeout(i), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "handoff-complete", timestamp: Date.now() }));
1641
- }, r = () => {
1642
- a || (a = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "handoff-forced", timestamp: Date.now() }));
1566
+ s.target !== t || s.propertyName !== "max-height" || a || (a = !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() }));
1567
+ }, o = () => {
1568
+ a || (a = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-forced", timestamp: Date.now() }));
1643
1569
  };
1644
- t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(r, o + ut);
1570
+ t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(o, l + lt);
1645
1571
  }
1646
- function ft(e) {
1647
- const { state: t, onAssert: l } = e;
1572
+ function ut(e) {
1573
+ const { state: t, onAssert: r } = e;
1648
1574
  if (t.activePanelId && t.isDirty) {
1649
- e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "blocked-dirty", timestamp: Date.now() });
1575
+ e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "blocked-dirty", timestamp: Date.now() });
1650
1576
  return;
1651
1577
  }
1652
- const o = pe(t.activeTrigger), a = pe(e.trigger);
1653
- if (!!t.activePanelId && o != null && o === a) {
1654
- mt(e);
1578
+ const l = me(t.activeTrigger), a = me(e.trigger);
1579
+ if (!!t.activePanelId && l != null && l === a) {
1580
+ ct(e);
1655
1581
  return;
1656
1582
  }
1657
1583
  if (t.activePanelId) {
1658
- ht(e);
1584
+ dt(e);
1659
1585
  return;
1660
1586
  }
1661
- U(e), l?.({ branch: "fresh-open", timestamp: Date.now() });
1587
+ z(e), r?.({ branch: "fresh-open", timestamp: Date.now() });
1662
1588
  }
1663
- function gt() {
1589
+ function pt() {
1664
1590
  if (!(typeof window > "u"))
1665
1591
  return window.__panelsAsserter;
1666
1592
  }
1667
- function zt() {
1668
- const e = H(), t = he();
1669
- return k(
1670
- (l, o) => {
1593
+ function It() {
1594
+ const e = O(), t = fe();
1595
+ return L(
1596
+ (r, l) => {
1671
1597
  if (!e)
1672
1598
  return;
1673
1599
  const a = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, i = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
1674
- panelId: l,
1675
- trigger: o,
1600
+ panelId: r,
1601
+ trigger: l,
1676
1602
  state: e.state,
1677
1603
  dispatch: e.dispatch,
1678
1604
  mountEl: a,
1679
1605
  chromeEl: i,
1680
1606
  reducedMotion: t,
1681
- onAssert: (r) => {
1682
- gt()?.recordTransition?.(r);
1607
+ onAssert: (o) => {
1608
+ pt()?.recordTransition?.(o);
1683
1609
  }
1684
1610
  };
1685
- ft(u);
1611
+ ut(u);
1686
1612
  },
1687
1613
  [e, t]
1688
1614
  );
1689
1615
  }
1690
- function Ht({ children: e }) {
1616
+ function $t({ children: e }) {
1691
1617
  return /* @__PURE__ */ n("div", { className: "clone-stage", children: e });
1692
1618
  }
1693
- let z = !1, j = null;
1619
+ let H = !1, j = null;
1694
1620
  function ne() {
1695
1621
  const e = [];
1696
1622
  let t = "cleaned";
1697
1623
  document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
1698
- const o = document.querySelectorAll(".gloss-panel-mount");
1699
- o.length > 1 && e.push(`mount-count=${o.length}`);
1700
- const a = o[0] ?? null, i = a ? a.querySelectorAll(".gloss-panel-chrome") : [];
1624
+ const l = document.querySelectorAll(".gloss-panel-mount");
1625
+ l.length > 1 && e.push(`mount-count=${l.length}`);
1626
+ const a = l[0] ?? null, i = a ? a.querySelectorAll(".gloss-panel-chrome") : [];
1701
1627
  i.length > 1 && e.push(`chrome-count=${i.length}`);
1702
1628
  const u = i[0] ?? null;
1703
1629
  if (u) {
1704
1630
  const d = u.style.zIndex;
1705
1631
  d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
1706
1632
  }
1707
- const r = a ? "present" : "absent", s = u ? "present" : "absent";
1633
+ const o = a ? "present" : "absent", s = u ? "present" : "absent";
1708
1634
  return {
1709
1635
  valid: e.length === 0,
1710
- mount: r,
1636
+ mount: o,
1711
1637
  chrome: s,
1712
1638
  frozen: t,
1713
1639
  orphans: e,
@@ -1715,24 +1641,24 @@ function ne() {
1715
1641
  };
1716
1642
  }
1717
1643
  const Z = "8px 8px 0px", X = "64px", J = "inset(0px 0px 60px 0px)", ee = "inset(0px -40px -40px -40px)";
1718
- function _(e, t, l, o, a) {
1719
- return { id: e, constraint: t, expected: l, actual: o, pass: a };
1644
+ function _(e, t, r, l, a) {
1645
+ return { id: e, constraint: t, expected: r, actual: l, pass: a };
1720
1646
  }
1721
- function L(e) {
1647
+ function M(e) {
1722
1648
  const t = parseInt(e, 10);
1723
1649
  return Number.isFinite(t) ? t : NaN;
1724
1650
  }
1725
- function re() {
1726
- const e = [], t = document.querySelector(".gloss-panel-mount"), l = t?.querySelector(".gloss-panel-chrome") ?? null, o = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), a = document.querySelector(".bell-cutout"), i = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
1651
+ function oe() {
1652
+ 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]"), a = document.querySelector(".bell-cutout"), i = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
1727
1653
  if (!t)
1728
1654
  e.push(_("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1729
1655
  else {
1730
- const r = getComputedStyle(t), s = r.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = r.clipPath || t.style.clipPath || "", d = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), h = d ? parseInt(d[1], 10) : NaN, f = L(s), b = Number.isFinite(h) && Number.isFinite(f) && h === f;
1656
+ 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 = M(s), b = Number.isFinite(m) && Number.isFinite(h) && m === h;
1731
1657
  e.push(
1732
1658
  _(
1733
1659
  "C1",
1734
1660
  "mount --reveal-y matches clip-path inset-bottom Npx",
1735
- `inset(0 0 ${f}px 0) === --reveal-y(${f}px)`,
1661
+ `inset(0 0 ${h}px 0) === --reveal-y(${h}px)`,
1736
1662
  `--reveal-y=${s || "n/a"} clip-path=${c || "n/a"}`,
1737
1663
  b
1738
1664
  )
@@ -1741,7 +1667,7 @@ function re() {
1741
1667
  if (!t)
1742
1668
  e.push(_("C2", "mount padding constant", Z, "absent", !1));
1743
1669
  else {
1744
- const r = t.style.padding, s = getComputedStyle(t), c = r || s.padding || "", d = c === Z || c === "8px 8px 0px 8px";
1670
+ const o = t.style.padding, s = getComputedStyle(t), c = o || s.padding || "", d = c === Z || c === "8px 8px 0px 8px";
1745
1671
  e.push(_("C2", "mount padding constant", Z, c || "n/a", d));
1746
1672
  }
1747
1673
  if (!t)
@@ -1750,48 +1676,48 @@ function re() {
1750
1676
  const s = getComputedStyle(t).bottom || t.style.bottom || "", c = s === X;
1751
1677
  e.push(_("C3", "mount.bottom resolves to var(--tb-h)=64px", X, s || "n/a", c));
1752
1678
  }
1753
- if (!l)
1679
+ if (!r)
1754
1680
  e.push(_("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1755
1681
  else {
1756
- const r = getComputedStyle(l), s = L(
1757
- r.getPropertyValue("--row-h").trim() || l.style.getPropertyValue("--row-h").trim() || "0"
1758
- ), c = L(
1759
- r.getPropertyValue("--row-gap").trim() || l.style.getPropertyValue("--row-gap").trim() || "0"
1760
- ), d = s * 3 + c * 3 - 8, h = L(r.height || l.style.height || ""), f = Number.isFinite(s) && Number.isFinite(c) && Number.isFinite(h) && Number.isFinite(d) && h === d;
1682
+ const o = getComputedStyle(r), s = M(
1683
+ o.getPropertyValue("--row-h").trim() || r.style.getPropertyValue("--row-h").trim() || "0"
1684
+ ), c = M(
1685
+ o.getPropertyValue("--row-gap").trim() || r.style.getPropertyValue("--row-gap").trim() || "0"
1686
+ ), d = s * 3 + c * 3 - 8, m = M(o.height || r.style.height || ""), h = Number.isFinite(s) && Number.isFinite(c) && Number.isFinite(m) && Number.isFinite(d) && m === d;
1761
1687
  e.push(
1762
1688
  _(
1763
1689
  "C4",
1764
1690
  "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
1765
1691
  `${d}px (rh=${s} rg=${c})`,
1766
- `${h}px`,
1767
- f
1692
+ `${m}px`,
1693
+ h
1768
1694
  )
1769
1695
  );
1770
1696
  }
1771
- if (!o || !l)
1697
+ if (!l || !r)
1772
1698
  e.push(
1773
1699
  _(
1774
1700
  "C5",
1775
1701
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1776
1702
  "present",
1777
- `coordinator=${o ? "present" : "absent"} chrome=${l ? "present" : "absent"}`,
1703
+ `coordinator=${l ? "present" : "absent"} chrome=${r ? "present" : "absent"}`,
1778
1704
  !1
1779
1705
  )
1780
1706
  );
1781
1707
  else {
1782
- const r = getComputedStyle(o), s = getComputedStyle(l), c = r.perspective || o.style.perspective || "", d = (r.perspectiveOrigin || o.style.perspectiveOrigin || "").trim(), h = s.perspectiveStyle || l.style.perspectiveStyle || "", v = c !== "" && c !== "none" && (d === "center bottom" || d === "50% 100%") && h === "flat";
1708
+ 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 || "", y = c !== "" && c !== "none" && (d === "center bottom" || d === "50% 100%") && m === "flat";
1783
1709
  e.push(
1784
1710
  _(
1785
1711
  "C5",
1786
1712
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1787
1713
  "perspective:not-none, origin:center bottom, chrome-style:flat",
1788
- `perspective=${c} origin=${d} chrome-style=${h}`,
1789
- v
1714
+ `perspective=${c} origin=${d} chrome-style=${m}`,
1715
+ y
1790
1716
  )
1791
1717
  );
1792
1718
  }
1793
1719
  {
1794
- let r = !1, s = "absent";
1720
+ let o = !1, s = "absent";
1795
1721
  try {
1796
1722
  for (const c of Array.from(document.styleSheets)) {
1797
1723
  let d = [];
@@ -1800,10 +1726,10 @@ function re() {
1800
1726
  } catch {
1801
1727
  continue;
1802
1728
  }
1803
- for (const h of d)
1804
- if (h.name === "stage-spin") {
1805
- const b = Array.from(h.cssRules), m = b.find((y) => y.keyText === "0%" || y.keyText === "from"), v = b.find((y) => y.keyText === "100%" || y.keyText === "to"), w = m?.style.transform ?? "", S = v?.style.transform ?? "", C = /rotateY\(\s*0(?:deg)?\s*\)/;
1806
- r = C.test(w) && C.test(S), s = `0%=${w || "n/a"} 100%=${S || "n/a"}`;
1729
+ for (const m of d)
1730
+ if (m.name === "stage-spin") {
1731
+ const b = Array.from(m.cssRules), p = b.find((N) => N.keyText === "0%" || N.keyText === "from"), y = b.find((N) => N.keyText === "100%" || N.keyText === "to"), E = p?.style.transform ?? "", T = y?.style.transform ?? "", v = /rotateY\(\s*0(?:deg)?\s*\)/;
1732
+ o = v.test(E) && v.test(T), s = `0%=${E || "n/a"} 100%=${T || "n/a"}`;
1807
1733
  break;
1808
1734
  }
1809
1735
  if (s !== "absent") break;
@@ -1817,12 +1743,12 @@ function re() {
1817
1743
  "@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
1818
1744
  "both frames rotateY(0)",
1819
1745
  s,
1820
- r
1746
+ o
1821
1747
  )
1822
1748
  );
1823
1749
  }
1824
1750
  {
1825
- const r = document.documentElement, s = getComputedStyle(r), c = s.getPropertyValue("--panel-open-dur").trim() || r.style.getPropertyValue("--panel-open-dur").trim(), d = s.getPropertyValue("--panel-close-dur").trim() || r.style.getPropertyValue("--panel-close-dur").trim(), h = L(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), f = L(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), b = Number.isFinite(h) && Number.isFinite(f) && h > f;
1751
+ 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 = M(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), h = M(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), b = Number.isFinite(m) && Number.isFinite(h) && m > h;
1826
1752
  e.push(
1827
1753
  _("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${d || "n/a"}`, b)
1828
1754
  );
@@ -1830,7 +1756,7 @@ function re() {
1830
1756
  if (!a)
1831
1757
  e.push(_("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1832
1758
  else {
1833
- const r = getComputedStyle(a), s = r.animationName || "", c = r.transitionProperty || "", d = (s === "" || s === "none") && (c === "" || c === "none" || c === "all");
1759
+ const o = getComputedStyle(a), s = o.animationName || "", c = o.transitionProperty || "", d = (s === "" || s === "none") && (c === "" || c === "none" || c === "all");
1834
1760
  e.push(
1835
1761
  _(
1836
1762
  "C8",
@@ -1844,33 +1770,33 @@ function re() {
1844
1770
  if (!t)
1845
1771
  e.push(_("C9", "mount closed-state clipPath", J, "absent", !1));
1846
1772
  else {
1847
- const r = t.style.clipPath, s = getComputedStyle(t), c = r || s.clipPath || "", d = c === J;
1773
+ const o = t.style.clipPath, s = getComputedStyle(t), c = o || s.clipPath || "", d = c === J;
1848
1774
  e.push(_("C9", "mount closed-state clipPath", J, c || "n/a", d));
1849
1775
  }
1850
1776
  if (!i)
1851
1777
  e.push(_("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1852
1778
  else {
1853
- const r = i.parentElement, s = r === document.body;
1779
+ const o = i.parentElement, s = o === document.body;
1854
1780
  e.push(
1855
1781
  _(
1856
1782
  "C10",
1857
1783
  "bell-popover parentElement === document.body (open)",
1858
1784
  "body",
1859
- r === document.body ? "body" : r?.tagName ?? "n/a",
1785
+ o === document.body ? "body" : o?.tagName ?? "n/a",
1860
1786
  s
1861
1787
  )
1862
1788
  );
1863
1789
  }
1864
- if (!o)
1790
+ if (!l)
1865
1791
  e.push(_("C11", "coordinator overflow === visible", "visible", "absent", !1));
1866
1792
  else {
1867
- const s = getComputedStyle(o).overflow || o.style.overflow || "", c = s === "visible";
1793
+ const s = getComputedStyle(l).overflow || l.style.overflow || "", c = s === "visible";
1868
1794
  e.push(_("C11", "coordinator overflow === visible", "visible", s || "n/a", c));
1869
1795
  }
1870
1796
  if (!u)
1871
1797
  e.push(_("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ee, "absent", !1));
1872
1798
  else {
1873
- const r = u.style.clipPath, s = getComputedStyle(u), c = r || s.clipPath || "", d = c === ee;
1799
+ const o = u.style.clipPath, s = getComputedStyle(u), c = o || s.clipPath || "", d = c === ee;
1874
1800
  e.push(_("C12", "toolbar clipPath = inset(0 -40 -40 -40)", ee, c || "n/a", d));
1875
1801
  }
1876
1802
  return e.push(
@@ -1891,10 +1817,10 @@ function re() {
1891
1817
  )
1892
1818
  ), e;
1893
1819
  }
1894
- function bt(e) {
1895
- return re().find((t) => t.id === e);
1820
+ function mt(e) {
1821
+ return oe().find((t) => t.id === e);
1896
1822
  }
1897
- function vt() {
1823
+ function ht() {
1898
1824
  const e = ne();
1899
1825
  return { q12: [
1900
1826
  {
@@ -1904,83 +1830,84 @@ function vt() {
1904
1830
  actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
1905
1831
  pass: e.valid
1906
1832
  }
1907
- ], cc: re() };
1833
+ ], cc: oe() };
1908
1834
  }
1909
- function yt() {
1835
+ function ft() {
1910
1836
  return {
1911
- enable: _t,
1912
- disable: Ct,
1913
- isEnabled: () => z,
1837
+ enable: gt,
1838
+ disable: bt,
1839
+ isEnabled: () => H,
1914
1840
  getLastReport: () => j,
1915
1841
  recordTransition: (e) => {
1916
- z && (j = { ...e, ...ne() });
1842
+ H && (j = { ...e, ...ne() });
1917
1843
  },
1918
1844
  assertOnce: () => {
1919
1845
  const e = ne();
1920
1846
  return j = e, e;
1921
1847
  },
1922
- assertCcOnly: re,
1923
- getCcRowById: bt,
1924
- assertPanelTruths: vt
1848
+ assertCcOnly: oe,
1849
+ getCcRowById: mt,
1850
+ assertPanelTruths: ht
1925
1851
  };
1926
1852
  }
1927
- function _t() {
1928
- if (z = !0, typeof window > "u") return;
1929
- window.__panelsAsserter || (window.__panelsAsserter = yt(), console.info(
1853
+ function gt() {
1854
+ if (H = !0, typeof window > "u") return;
1855
+ window.__panelsAsserter || (window.__panelsAsserter = ft(), console.info(
1930
1856
  "[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
1931
1857
  ));
1932
1858
  }
1933
- function Ct() {
1934
- z = !1;
1859
+ function bt() {
1860
+ H = !1;
1935
1861
  }
1936
1862
  export {
1937
- Kt as COMMITS,
1938
- It as CatalogAddShell,
1939
- nt as CatalogFooter,
1940
- Mt as CatalogReplaceShell,
1863
+ Ut as COMMITS,
1864
+ At as CatalogAddShell,
1865
+ xt as CatalogFooter,
1866
+ kt as CatalogReplaceShell,
1941
1867
  se as CatalogStateContext,
1942
- Ue as CloneCard,
1943
- Ht as CloneStage,
1944
- ve as MOCK_DEFAULT_LENS,
1945
- be as MOCK_LENSES,
1868
+ He as CloneCard,
1869
+ $t as CloneStage,
1870
+ ye as MOCK_DEFAULT_LENS,
1871
+ ve as MOCK_LENSES,
1946
1872
  ae as MOCK_LENS_META,
1947
- st as MOCK_PAGES,
1948
- ye as MOCK_TILES_BY_LENS,
1949
- Rt as PANEL_IDS,
1950
- at as PageMgmtFooter,
1951
- $t as PageMgmtShell,
1952
- Ce as PageMgmtStateContext,
1953
- Be as PanelBody,
1954
- q as PanelChrome,
1955
- Ye as PanelChromeV2,
1956
- Ke as PanelFooter,
1957
- Ot as PanelFooterMessage,
1958
- ze as PanelHeader,
1873
+ et as MOCK_PAGES,
1874
+ _e as MOCK_TILES_BY_LENS,
1875
+ zt as NotificationCenterShell,
1876
+ Lt as PANEL_IDS,
1877
+ Je as PageMgmtFooter,
1878
+ Dt as PageMgmtShell,
1879
+ Ne as PageMgmtStateContext,
1880
+ Ht as PanelBody,
1881
+ Vt as PanelChrome,
1882
+ V as PanelChromeV2,
1883
+ Bt as PanelFooter,
1884
+ Et as PanelFooterMessage,
1885
+ Kt as PanelHeader,
1959
1886
  Yt as PanelHost,
1960
- Ft as PanelHostShell,
1961
- $ as PanelMount,
1962
- Ve as PanelNavigation,
1963
- Wt as PanelProvider,
1964
- Ut as PanelSlot,
1965
- He as PanelStage,
1966
- Lt as SettingsShell,
1967
- re as assertCcOnly,
1887
+ Ot as PanelHostShell,
1888
+ xe as PanelMount,
1889
+ Wt as PanelNavigation,
1890
+ Gt as PanelProvider,
1891
+ Mt as PanelSlot,
1892
+ Qt as PanelStage,
1893
+ Pt as SettingsShell,
1894
+ oe as assertCcOnly,
1968
1895
  ne as assertPanelDomShape,
1969
- vt as assertPanelTruths,
1970
- Gt as deriveSurfaceState,
1971
- Ct as disablePanelAsserter,
1972
- _t as enablePanelAsserter,
1973
- bt as getCcRowById,
1974
- Qt as initialState,
1975
- pe as positionKey,
1976
- qt as reducer,
1977
- ft as transitionToPanel,
1978
- tt as useCatalogState,
1979
- Dt as useEditingCardId,
1980
- Ne as usePageMgmtState,
1981
- Ee as usePanelContext,
1982
- H as usePanelContextOptional,
1983
- jt as usePanelCoordinator,
1984
- he as useReducedMotionPanel,
1985
- zt as useTransitionToPanel
1896
+ ht as assertPanelTruths,
1897
+ qt as deriveSurfaceState,
1898
+ bt as disablePanelAsserter,
1899
+ gt as enablePanelAsserter,
1900
+ mt as getCcRowById,
1901
+ jt as initialState,
1902
+ me as positionKey,
1903
+ Zt as reducer,
1904
+ ut as transitionToPanel,
1905
+ re as useCatalogState,
1906
+ wt as useEditingCardId,
1907
+ Te as usePageMgmtState,
1908
+ Pe as usePanelContext,
1909
+ O as usePanelContextOptional,
1910
+ Xt as usePanelCoordinator,
1911
+ fe as useReducedMotionPanel,
1912
+ It as useTransitionToPanel
1986
1913
  };