@mt-gloss/ui 0.1.109 → 0.1.111

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,29 +1,29 @@
1
- import { u as k, f as X, S as fe, a as ge, g as x, c as T } from "./COMMITS-DG0Q_9DU.js";
2
- import { C as Et, b as At, P as xt, e as Tt, i as Ot, r as Lt, d as kt } from "./COMMITS-DG0Q_9DU.js";
3
- import { jsx as a, jsxs as h, Fragment as J } from "react/jsx-runtime";
4
- import B, { useState as C, useRef as I, createContext as Z, useContext as ee, useMemo as Y, useEffect as A, useCallback as E, useLayoutEffect as ve } from "react";
5
- import { useSensors as be, useSensor as W, PointerSensor as ye, KeyboardSensor as Se, DndContext as Ce, closestCenter as _e } from "@dnd-kit/core";
6
- import { sortableKeyboardCoordinates as Ne, SortableContext as we, horizontalListSortingStrategy as Pe, arrayMove as Ee, useSortable as Ae } from "@dnd-kit/sortable";
7
- import { CSS as xe } from "@dnd-kit/utilities";
8
- import { M as G } from "./MetricCard-Cyoxhb_S.js";
1
+ import { u as L, f as J, S as fe, a as ge, g as E, c as k } from "./COMMITS-DG0Q_9DU.js";
2
+ import { C as Pt, b as xt, P as At, e as Et, i as kt, r as Dt, d as Ot } from "./COMMITS-DG0Q_9DU.js";
3
+ import { jsx as s, jsxs as h, Fragment as Z } from "react/jsx-runtime";
4
+ import B, { useState as T, useRef as I, createContext as ee, useContext as te, useMemo as W, useEffect as A, useCallback as x, useLayoutEffect as be } from "react";
5
+ import { useSensors as ye, useSensor as G, PointerSensor as ve, KeyboardSensor as Ce, DndContext as Se, closestCenter as Te } from "@dnd-kit/core";
6
+ import { sortableKeyboardCoordinates as _e, SortableContext as we, horizontalListSortingStrategy as Ne, arrayMove as Pe, useSortable as xe } from "@dnd-kit/sortable";
7
+ import { CSS as Ae } from "@dnd-kit/utilities";
8
+ import { M as Q } from "./MetricCard-Cyoxhb_S.js";
9
9
  function ft() {
10
- const e = k();
10
+ const e = L();
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 Te({ children: e }) {
16
- return /* @__PURE__ */ a("div", { className: "clone-stage", children: e });
15
+ function Ee({ children: e }) {
16
+ return /* @__PURE__ */ s("div", { className: "clone-stage", children: e });
17
17
  }
18
- function Oe({ span: e, rotating: t = !0, children: r }) {
19
- const n = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), d = r != null ? "full" : "fallback";
20
- return /* @__PURE__ */ a("div", { className: n, "data-clone-fidelity": d, children: r });
18
+ function ke({ span: e, rotating: t = !0, children: l }) {
19
+ const i = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = l != null ? "full" : "fallback";
20
+ return /* @__PURE__ */ s("div", { className: i, "data-clone-fidelity": n, children: l });
21
21
  }
22
- function Le({ value: e, onChange: t }) {
22
+ function De({ value: e, onChange: t }) {
23
23
  return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
24
- /* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
24
+ /* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
25
25
  /* @__PURE__ */ h("div", { className: "settings-shell__slider-row", children: [
26
- /* @__PURE__ */ a(
26
+ /* @__PURE__ */ s(
27
27
  "input",
28
28
  {
29
29
  id: "settings-threshold-input",
@@ -46,11 +46,11 @@ function Le({ value: e, onChange: t }) {
46
46
  ] })
47
47
  ] });
48
48
  }
49
- function ke({ value: e, onChange: t }) {
49
+ function Oe({ value: e, onChange: t }) {
50
50
  return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
51
- /* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
51
+ /* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
52
52
  /* @__PURE__ */ h("div", { className: "settings-shell__slider-row", children: [
53
- /* @__PURE__ */ a(
53
+ /* @__PURE__ */ s(
54
54
  "input",
55
55
  {
56
56
  id: "settings-timeframe-input",
@@ -73,32 +73,32 @@ function ke({ value: e, onChange: t }) {
73
73
  ] })
74
74
  ] });
75
75
  }
76
- function Ie({ id: e, onRemove: t }) {
77
- const { attributes: r, listeners: n, setNodeRef: d, transform: i, transition: u, isDragging: l } = Ae({ id: e }), s = {
78
- transform: xe.Transform.toString(i),
76
+ function Le({ id: e, onRemove: t }) {
77
+ const { attributes: l, listeners: i, setNodeRef: n, transform: c, transition: u, isDragging: r } = xe({ id: e }), a = {
78
+ transform: Ae.Transform.toString(c),
79
79
  transition: u,
80
- opacity: l ? 0.6 : 1
80
+ opacity: r ? 0.6 : 1
81
81
  };
82
82
  return /* @__PURE__ */ h(
83
83
  "li",
84
84
  {
85
- ref: d,
86
- style: s,
87
- className: `settings-shell__slot-pill${l ? " settings-shell__slot-pill--dragging" : ""}`,
85
+ ref: n,
86
+ style: a,
87
+ className: `settings-shell__slot-pill${r ? " settings-shell__slot-pill--dragging" : ""}`,
88
88
  children: [
89
- /* @__PURE__ */ a(
89
+ /* @__PURE__ */ s(
90
90
  "button",
91
91
  {
92
92
  type: "button",
93
93
  className: "settings-shell__slot-pill__handle",
94
94
  "aria-label": `Reorder ${e}`,
95
- ...r,
96
- ...n,
97
- children: /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
95
+ ...l,
96
+ ...i,
97
+ children: /* @__PURE__ */ s("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
98
98
  }
99
99
  ),
100
- /* @__PURE__ */ a("span", { className: "settings-shell__slot-pill__label", children: e }),
101
- /* @__PURE__ */ a(
100
+ /* @__PURE__ */ s("span", { className: "settings-shell__slot-pill__label", children: e }),
101
+ /* @__PURE__ */ s(
102
102
  "button",
103
103
  {
104
104
  type: "button",
@@ -112,42 +112,42 @@ function Ie({ id: e, onRemove: t }) {
112
112
  }
113
113
  );
114
114
  }
115
- function De({ value: e, onChange: t }) {
116
- const r = be(
117
- W(ye, { activationConstraint: { distance: 4 } }),
118
- W(Se, { coordinateGetter: Ne })
119
- ), n = (i) => {
120
- const { active: u, over: l } = i;
121
- if (!l || u.id === l.id) return;
122
- const s = e.findIndex((c) => c === u.id), o = e.findIndex((c) => c === l.id);
123
- s === -1 || o === -1 || t(Ee([...e], s, o));
124
- }, d = (i) => {
125
- t(e.filter((u) => u !== i));
115
+ function Ie({ value: e, onChange: t }) {
116
+ const l = ye(
117
+ G(ve, { activationConstraint: { distance: 4 } }),
118
+ G(Ce, { coordinateGetter: _e })
119
+ ), i = (c) => {
120
+ const { active: u, over: r } = c;
121
+ if (!r || u.id === r.id) return;
122
+ const a = e.findIndex((d) => d === u.id), o = e.findIndex((d) => d === r.id);
123
+ a === -1 || o === -1 || t(Pe([...e], a, o));
124
+ }, n = (c) => {
125
+ t(e.filter((u) => u !== c));
126
126
  };
127
127
  return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
128
- /* @__PURE__ */ a("span", { className: "settings-shell__label", children: "Stack slots" }),
129
- /* @__PURE__ */ a(Ce, { sensors: r, collisionDetection: _e, onDragEnd: n, children: /* @__PURE__ */ a(we, { items: [...e], strategy: Pe, children: /* @__PURE__ */ a("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((i) => /* @__PURE__ */ a(Ie, { id: i, onRemove: () => d(i) }, i)) }) }) }),
130
- e.length === 0 && /* @__PURE__ */ a("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
131
- /* @__PURE__ */ a("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
128
+ /* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Stack slots" }),
129
+ /* @__PURE__ */ s(Se, { sensors: l, collisionDetection: Te, onDragEnd: i, children: /* @__PURE__ */ s(we, { items: [...e], strategy: Ne, children: /* @__PURE__ */ s("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((c) => /* @__PURE__ */ s(Le, { id: c, onRemove: () => n(c) }, c)) }) }) }),
130
+ e.length === 0 && /* @__PURE__ */ s("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
131
+ /* @__PURE__ */ s("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
132
132
  ] });
133
133
  }
134
134
  const Me = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
135
135
  function $e({ value: e, onSelect: t }) {
136
136
  return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
137
- /* @__PURE__ */ a("span", { className: "settings-shell__label", children: "Accent color" }),
138
- /* @__PURE__ */ a("div", { className: "settings-shell__swatch-row", children: Me.map((r) => {
139
- const n = e === r;
140
- return /* @__PURE__ */ a(
137
+ /* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Accent color" }),
138
+ /* @__PURE__ */ s("div", { className: "settings-shell__swatch-row", children: Me.map((l) => {
139
+ const i = e === l;
140
+ return /* @__PURE__ */ s(
141
141
  "button",
142
142
  {
143
143
  type: "button",
144
- "aria-pressed": n,
145
- "aria-label": `Accent ${r}`,
146
- className: `settings-shell__swatch${n ? " settings-shell__swatch--active" : ""}`,
147
- style: { backgroundColor: r },
148
- onClick: () => t(r)
144
+ "aria-pressed": i,
145
+ "aria-label": `Accent ${l}`,
146
+ className: `settings-shell__swatch${i ? " settings-shell__swatch--active" : ""}`,
147
+ style: { backgroundColor: l },
148
+ onClick: () => t(l)
149
149
  },
150
- r
150
+ l
151
151
  );
152
152
  }) })
153
153
  ] });
@@ -156,37 +156,37 @@ const Re = ["Orders", "Quota", "Unassigned"], Fe = ["threshold", "timeframe", "c
156
156
  function gt({
157
157
  isOpen: e,
158
158
  cardSpan: t,
159
- cardLabel: r = "Metric",
160
- cardValue: n = "—",
161
- previewSlot: d,
162
- dimensions: i = Fe,
159
+ cardLabel: l = "Metric",
160
+ cardValue: i = "—",
161
+ previewSlot: n,
162
+ dimensions: c = Fe,
163
163
  initialTab: u,
164
- initialValues: l
164
+ initialValues: r
165
165
  }) {
166
- const s = k(), o = s?.state.activeTrigger, c = o?.kind === "card-overflow" ? o.cardId : null, p = X(), m = o?.span, v = t ?? m ?? 1, y = i[0] ?? "threshold", [b, _] = B.useState(u ?? y);
166
+ const a = L(), o = a?.state.activeTrigger, d = o?.kind === "card-overflow" ? o.cardId : null, p = J(), m = o?.span, f = t ?? m ?? 1, C = c[0] ?? "threshold", [b, S] = B.useState(u ?? C);
167
167
  B.useEffect(() => {
168
- i.includes(b) || _(y);
169
- }, [i, b, y]);
170
- const g = c != null ? s?.state?.bufferByCard?.[c]?.changes ?? {} : {}, S = typeof g.threshold == "number" ? g.threshold : typeof l?.threshold == "number" ? l.threshold : 80, ie = typeof g.timeframe == "number" ? g.timeframe : typeof l?.timeframe == "number" ? l.timeframe : 30, ce = typeof g.accent == "string" ? g.accent : typeof l?.accent == "string" ? l.accent : null, de = Array.isArray(g.slots) ? g.slots : Array.isArray(l?.slots) ? l.slots : Re, ue = (w) => {
171
- c == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: c, key: "threshold", value: Number(w.target.value) });
172
- }, pe = (w) => {
173
- c == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: c, key: "timeframe", value: Number(w.target.value) });
174
- }, me = (w) => {
175
- c == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: c, key: "accent", value: w });
176
- }, he = (w) => {
177
- c == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: c, key: "slots", value: w });
168
+ c.includes(b) || S(C);
169
+ }, [c, b, C]);
170
+ const v = d != null ? a?.state?.bufferByCard?.[d]?.changes ?? {} : {}, y = typeof v.threshold == "number" ? v.threshold : typeof r?.threshold == "number" ? r.threshold : 80, P = typeof v.timeframe == "number" ? v.timeframe : typeof r?.timeframe == "number" ? r.timeframe : 30, ce = typeof v.accent == "string" ? v.accent : typeof r?.accent == "string" ? r.accent : null, de = Array.isArray(v.slots) ? v.slots : Array.isArray(r?.slots) ? r.slots : Re, ue = (_) => {
171
+ d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(_.target.value) });
172
+ }, pe = (_) => {
173
+ d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(_.target.value) });
174
+ }, me = (_) => {
175
+ d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: _ });
176
+ }, he = (_) => {
177
+ d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: _ });
178
178
  };
179
179
  return /* @__PURE__ */ h("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: [
180
- /* @__PURE__ */ a("div", { "aria-hidden": "true", children: /* @__PURE__ */ a(Te, { children: /* @__PURE__ */ a(Oe, { span: v, rotating: !p, children: d ?? /* @__PURE__ */ h(J, { children: [
181
- /* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: r }),
182
- /* @__PURE__ */ a("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: n })
180
+ /* @__PURE__ */ s("div", { "aria-hidden": "true", children: /* @__PURE__ */ s(Ee, { children: /* @__PURE__ */ s(ke, { span: f, rotating: !p, children: n ?? /* @__PURE__ */ h(Z, { children: [
181
+ /* @__PURE__ */ s("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: l }),
182
+ /* @__PURE__ */ s("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: i })
183
183
  ] }) }) }) }),
184
- /* @__PURE__ */ a(
184
+ /* @__PURE__ */ s(
185
185
  fe,
186
186
  {
187
- dimensions: i,
187
+ dimensions: c,
188
188
  activeTab: b,
189
- onSelect: _,
189
+ onSelect: S,
190
190
  reduced: p
191
191
  }
192
192
  ),
@@ -199,16 +199,16 @@ function gt({
199
199
  tabIndex: 0,
200
200
  className: "settings-shell__tabpanel",
201
201
  children: [
202
- b === "threshold" && /* @__PURE__ */ a(Le, { value: S, onChange: ue }),
203
- b === "timeframe" && /* @__PURE__ */ a(ke, { value: ie, onChange: pe }),
204
- b === "slots" && /* @__PURE__ */ a(De, { value: de, onChange: he }),
205
- b === "color" && /* @__PURE__ */ a($e, { value: ce, onSelect: me })
202
+ b === "threshold" && /* @__PURE__ */ s(De, { value: y, onChange: ue }),
203
+ b === "timeframe" && /* @__PURE__ */ s(Oe, { value: P, onChange: pe }),
204
+ b === "slots" && /* @__PURE__ */ s(Ie, { value: de, onChange: he }),
205
+ b === "color" && /* @__PURE__ */ s($e, { value: ce, onSelect: me })
206
206
  ]
207
207
  }
208
208
  )
209
209
  ] });
210
210
  }
211
- const te = [
211
+ const ne = [
212
212
  "Overbought",
213
213
  "What's selling",
214
214
  "On track vs plan",
@@ -216,7 +216,7 @@ const te = [
216
216
  "Vendor performance",
217
217
  "Assortment mix",
218
218
  "Customer retention"
219
- ], ne = "Overbought", z = {
219
+ ], ae = "Overbought", z = {
220
220
  Overbought: {
221
221
  headline: "Am I overbought?",
222
222
  helper: "Find slow-moving inventory before discount cycles eat margin."
@@ -257,14 +257,16 @@ const se = {
257
257
  desc: "Inventory units flagged as overbought relative to forward demand.",
258
258
  variants: ["1×1"],
259
259
  startHere: !0,
260
- isNew: !0
260
+ isNew: !0,
261
+ cardType: "standard"
261
262
  },
262
263
  {
263
264
  id: "ob-weeks-of-supply",
264
265
  label: "Weeks of supply",
265
266
  value: "18.4",
266
267
  desc: "Weighted average weeks of forward cover across the assortment.",
267
- variants: ["1×1"]
268
+ variants: ["1×1"],
269
+ cardType: "standard"
268
270
  },
269
271
  {
270
272
  id: "ob-discount-exposure",
@@ -276,7 +278,9 @@ const se = {
276
278
  { label: "MTD", value: "$48K" },
277
279
  { label: "QTD", value: "$112K" },
278
280
  { label: "YTD", value: "$184K" }
279
- ]
281
+ ],
282
+ cardType: "stacked-group",
283
+ stackedTimeframes: ["MTD", "QTD", "YTD"]
280
284
  }
281
285
  ],
282
286
  secondary: [
@@ -284,7 +288,8 @@ const se = {
284
288
  id: "ob-sku-coverage",
285
289
  label: "SKUs over plan",
286
290
  value: "342",
287
- desc: "SKUs exceeding planned forward cover."
291
+ desc: "SKUs exceeding planned forward cover.",
292
+ cardType: "standard"
288
293
  },
289
294
  {
290
295
  id: "ob-vendor-share",
@@ -292,7 +297,10 @@ const se = {
292
297
  value: "38%",
293
298
  desc: "Share of overbought inventory concentrated in the top vendor.",
294
299
  donut: !0,
295
- accent: "#7c3aed"
300
+ accent: "#7c3aed",
301
+ cardType: "donut",
302
+ donutValue: 0.38,
303
+ accentColor: "#7c3aed"
296
304
  }
297
305
  ]
298
306
  },
@@ -303,14 +311,17 @@ const se = {
303
311
  label: "Top SKU",
304
312
  value: "SKU-9241",
305
313
  desc: "Highest-velocity SKU over the trailing 7 days.",
306
- startHere: !0
314
+ startHere: !0,
315
+ cardType: "name"
307
316
  },
308
317
  {
309
318
  id: "ws-velocity",
310
319
  label: "Velocity Δ",
311
320
  value: "+12.4%",
312
321
  desc: "Rolling 7-day velocity change versus the prior comparable period.",
313
- variants: ["1×1"]
322
+ variants: ["1×1"],
323
+ cardType: "sparkline",
324
+ sparklineData: [10, 12, 15, 14, 18, 21, 19, 23, 25, 28]
314
325
  },
315
326
  {
316
327
  id: "ws-sellthrough",
@@ -324,7 +335,9 @@ const se = {
324
335
  { label: "LYTD", value: "62%" },
325
336
  { label: "7D", value: "74%" }
326
337
  ],
327
- desc: "Sell-through across multiple windows."
338
+ desc: "Sell-through across multiple windows.",
339
+ cardType: "stacked-group",
340
+ stackedTimeframes: ["MTD", "QTD", "YTD", "LYTD", "7D"]
328
341
  }
329
342
  ],
330
343
  secondary: [
@@ -333,7 +346,9 @@ const se = {
333
346
  label: "New arrival lift",
334
347
  value: "+8.1%",
335
348
  desc: "Velocity boost from new-arrival SKUs versus the assortment mean.",
336
- isNew: !0
349
+ isNew: !0,
350
+ cardType: "sparkline",
351
+ sparklineData: [3, 4, 5, 6, 6, 7, 8, 8]
337
352
  }
338
353
  ]
339
354
  },
@@ -346,7 +361,10 @@ const se = {
346
361
  desc: "Revenue pace versus plan, period-to-date.",
347
362
  donut: !0,
348
363
  accent: "#16a34a",
349
- startHere: !0
364
+ startHere: !0,
365
+ cardType: "donut",
366
+ donutValue: 1.02,
367
+ accentColor: "#16a34a"
350
368
  },
351
369
  {
352
370
  id: "pl-units-pace",
@@ -354,7 +372,10 @@ const se = {
354
372
  value: "94%",
355
373
  desc: "Units pace versus plan, period-to-date.",
356
374
  donut: !0,
357
- accent: "#f59e0b"
375
+ accent: "#f59e0b",
376
+ cardType: "donut",
377
+ donutValue: 0.94,
378
+ accentColor: "#f59e0b"
358
379
  },
359
380
  {
360
381
  id: "pl-margin-pace",
@@ -366,87 +387,129 @@ const se = {
366
387
  { label: "QTD", value: "37.9%" },
367
388
  { label: "YTD", value: "38.1%" }
368
389
  ],
369
- desc: "Gross margin pace across multiple windows."
390
+ desc: "Gross margin pace across multiple windows.",
391
+ cardType: "stacked-group",
392
+ stackedTimeframes: ["MTD", "QTD", "YTD"]
370
393
  },
371
394
  // PHASE 17 D1 — agency-revenue port (J1) + commission-economics port (J6)
372
395
  {
373
396
  id: "agency-sales",
374
397
  label: "Sales",
375
398
  value: "$892,450",
376
- desc: "Agency total sales with trend sparkline"
399
+ desc: "Agency total sales with trend sparkline",
400
+ cardType: "sparkline",
401
+ sparklineData: [620, 640, 680, 700, 740, 760, 790, 820, 850, 892],
402
+ prefix: "$"
377
403
  },
378
404
  {
379
405
  id: "agency-commission",
380
406
  label: "Commissions",
381
407
  value: "$133,868",
382
- desc: "Total commission earned by the agency"
408
+ desc: "Total commission earned by the agency",
409
+ cardType: "standard",
410
+ prefix: "$"
383
411
  },
384
412
  {
385
413
  id: "agency-growth",
386
414
  label: "Sales Growth",
387
415
  value: "+18%",
388
- desc: "Year-over-year agency sales growth rate"
416
+ desc: "Year-over-year agency sales growth rate",
417
+ cardType: "standard",
418
+ suffix: "%",
419
+ trend: { value: 18, direction: "up" }
389
420
  },
390
421
  {
391
422
  id: "agency-aov",
392
423
  label: "Avg Order",
393
424
  value: "$2,340",
394
- desc: "Average order value with trend sparkline"
425
+ desc: "Average order value with trend sparkline",
426
+ cardType: "sparkline",
427
+ sparklineData: [2100, 2150, 2200, 2180, 2250, 2280, 2300, 2320, 2335, 2340],
428
+ prefix: "$"
395
429
  },
396
430
  {
397
431
  id: "agency-conversion",
398
432
  label: "Conversion",
399
433
  value: "68%",
400
- desc: "Order completion rate vs cancellations"
434
+ desc: "Order completion rate vs cancellations",
435
+ cardType: "donut",
436
+ donutValue: 0.68,
437
+ accentColor: "#10b981",
438
+ suffix: "%"
401
439
  },
402
440
  {
403
441
  id: "agency-revenue-compact",
404
442
  label: "Total Revenue",
405
443
  value: "$892,450",
406
- desc: "Agency revenue with sparkline trend"
444
+ desc: "Agency revenue with sparkline trend",
445
+ cardType: "sparkline",
446
+ sparklineData: [620, 660, 700, 740, 780, 820, 860, 892],
447
+ prefix: "$"
407
448
  },
408
449
  // degrade-to-standard: stacked-group with MTD segment shown at span-1
409
450
  {
410
451
  id: "agency-sales-stacked",
411
452
  label: "Sales",
412
453
  value: "$892,450",
413
- desc: "Agency sales across three timeframes at a glance (MTD shown)"
454
+ desc: "Agency sales across three timeframes at a glance (MTD shown)",
455
+ cardType: "stacked-group",
456
+ stackedTimeframes: ["MTD", "QTD", "YTD"]
414
457
  },
415
458
  {
416
459
  id: "agency-aov-stacked",
417
460
  label: "Avg Order",
418
461
  value: "$2,340",
419
- desc: "Average order value across three timeframes (MTD shown)"
462
+ desc: "Average order value across three timeframes (MTD shown)",
463
+ cardType: "stacked-group",
464
+ stackedTimeframes: ["MTD", "QTD", "YTD"]
420
465
  },
421
466
  {
422
467
  id: "agency-yoy-versus",
423
468
  label: "YoY Comparison",
424
469
  value: "$892K",
425
- desc: "TY vs LY sales side-by-side"
470
+ desc: "TY vs LY sales side-by-side",
471
+ cardType: "versus",
472
+ comparison: {
473
+ current: { value: "$892K", label: "This year" },
474
+ prior: { value: "$724K", label: "Last year" }
475
+ }
426
476
  },
427
477
  {
428
478
  id: "agency-revenue-by-mfr",
429
479
  label: "Mfr Revenue",
430
480
  value: "$892K",
431
- desc: "Revenue mix across top manufacturers"
481
+ desc: "Revenue mix across top manufacturers",
482
+ cardType: "segmented",
483
+ segments: [
484
+ { label: "A", value: 35, color: "#7c3aed" },
485
+ { label: "B", value: 28, color: "#1d6fd8" },
486
+ { label: "C", value: 22, color: "#10b981" },
487
+ { label: "D", value: 15, color: "#f59e0b" }
488
+ ]
432
489
  },
433
490
  {
434
491
  id: "agency-outstanding",
435
492
  label: "Outstanding",
436
493
  value: "$24,500",
437
- desc: "Unpaid order balance across all accounts"
494
+ desc: "Unpaid order balance across all accounts",
495
+ cardType: "standard",
496
+ prefix: "$"
438
497
  },
439
498
  {
440
499
  id: "agency-commission-rate",
441
500
  label: "Commission",
442
501
  value: "8.4%",
443
- desc: "Effective commission rate %"
502
+ desc: "Effective commission rate %",
503
+ cardType: "standard",
504
+ suffix: "%"
444
505
  },
445
506
  {
446
507
  id: "agency-commission-aging",
447
508
  label: "Commission Aging",
448
509
  value: "$24K",
449
- desc: "Unpaid commission aging by buckets"
510
+ desc: "Unpaid commission aging by buckets",
511
+ cardType: "bars",
512
+ barData: [4, 8, 7, 5]
450
513
  }
451
514
  ]
452
515
  },
@@ -457,52 +520,70 @@ const se = {
457
520
  label: "On-time rate",
458
521
  value: "94.2%",
459
522
  desc: "Share of orders shipped within SLA.",
460
- startHere: !0
523
+ startHere: !0,
524
+ cardType: "donut",
525
+ donutValue: 0.942,
526
+ accentColor: "#16a34a",
527
+ suffix: "%"
461
528
  },
462
529
  {
463
530
  id: "ot-at-risk",
464
531
  label: "At-risk shipments",
465
532
  value: "18",
466
533
  desc: "Open shipments projected to miss SLA.",
467
- isNew: !0
534
+ isNew: !0,
535
+ cardType: "highlight",
536
+ highlightColor: "#f59e0b"
468
537
  },
469
538
  // PHASE 17 D1 — agency-order-flow port (J5)
470
539
  {
471
540
  id: "agency-activity",
472
541
  label: "Orders",
473
542
  value: "47 Orders",
474
- desc: "Daily team order count with bar chart"
543
+ desc: "Daily team order count with bar chart",
544
+ cardType: "bars",
545
+ barData: [12, 18, 15, 22, 19, 25, 28]
475
546
  },
476
547
  {
477
548
  id: "agency-unassigned-orders",
478
549
  label: "Unassigned",
479
550
  value: "0",
480
- desc: "Orders awaiting salesperson assignment"
551
+ desc: "Orders awaiting salesperson assignment",
552
+ cardType: "standard"
481
553
  },
482
554
  {
483
555
  id: "agency-orders-compact",
484
556
  label: "Order Count",
485
557
  value: "156",
486
- desc: "Total order count with bar chart trend"
558
+ desc: "Total order count with bar chart trend",
559
+ cardType: "bars",
560
+ barData: [18, 22, 19, 24, 26, 23, 28]
487
561
  },
488
562
  // degrade-to-standard: stacked-group with MTD segment shown at span-1
489
563
  {
490
564
  id: "agency-orders-stacked",
491
565
  label: "Orders",
492
566
  value: "156",
493
- desc: "Order count across three timeframes at a glance (MTD shown)"
567
+ desc: "Order count across three timeframes at a glance (MTD shown)",
568
+ cardType: "stacked-group",
569
+ stackedTimeframes: ["MTD", "QTD", "YTD"]
494
570
  },
495
571
  {
496
572
  id: "agency-order-pipeline-value",
497
573
  label: "Pipeline Value",
498
574
  value: "$284,500",
499
- desc: "Open + transmitted order $ pipeline"
575
+ desc: "Open + transmitted order $ pipeline",
576
+ cardType: "standard",
577
+ prefix: "$"
500
578
  },
501
579
  {
502
580
  id: "agency-cancel-rate",
503
581
  label: "Cancel Rate",
504
582
  value: "4.2%",
505
- desc: "Order cancel-rate percentage (warn-tinted highlight)"
583
+ desc: "Order cancel-rate percentage (warn-tinted highlight)",
584
+ cardType: "highlight",
585
+ highlightColor: "#f59e0b",
586
+ suffix: "%"
506
587
  }
507
588
  ]
508
589
  },
@@ -513,7 +594,8 @@ const se = {
513
594
  label: "Top vendor",
514
595
  value: "Acme Co.",
515
596
  desc: "Highest sell-through vendor over the trailing 30 days.",
516
- startHere: !0
597
+ startHere: !0,
598
+ cardType: "name"
517
599
  },
518
600
  {
519
601
  id: "vp-fill-rate",
@@ -521,20 +603,32 @@ const se = {
521
603
  value: "97.1%",
522
604
  desc: "Vendor fill rate against placed orders.",
523
605
  donut: !0,
524
- accent: "#2563eb"
606
+ accent: "#2563eb",
607
+ cardType: "donut",
608
+ donutValue: 0.971,
609
+ accentColor: "#2563eb",
610
+ suffix: "%"
525
611
  },
526
612
  // PHASE 17 D1 — agency-brand-portfolio port (J3)
527
613
  {
528
614
  id: "agency-mfr-mix",
529
615
  label: "Mfr Mix",
530
616
  value: "$892K",
531
- desc: "Revenue mix by manufacturer (segmented bar)"
617
+ desc: "Revenue mix by manufacturer (segmented bar)",
618
+ cardType: "segmented",
619
+ segments: [
620
+ { label: "A", value: 35, color: "#7c3aed" },
621
+ { label: "B", value: 28, color: "#1d6fd8" },
622
+ { label: "C", value: 22, color: "#10b981" },
623
+ { label: "D", value: 15, color: "#f59e0b" }
624
+ ]
532
625
  },
533
626
  {
534
627
  id: "agency-mfr-new-line",
535
628
  label: "New Mfrs",
536
629
  value: "3",
537
- desc: "New manufacturer count for the period"
630
+ desc: "New manufacturer count for the period",
631
+ cardType: "standard"
538
632
  }
539
633
  ]
540
634
  },
@@ -551,7 +645,13 @@ const se = {
551
645
  { label: "Test", value: "15%" }
552
646
  ],
553
647
  desc: "Assortment mix across brand tiers.",
554
- startHere: !0
648
+ startHere: !0,
649
+ cardType: "segmented",
650
+ segments: [
651
+ { label: "Core", value: 58, color: "#7c3aed" },
652
+ { label: "Growth", value: 27, color: "#10b981" },
653
+ { label: "Test", value: 15, color: "#f59e0b" }
654
+ ]
555
655
  }
556
656
  ]
557
657
  },
@@ -563,83 +663,96 @@ const se = {
563
663
  value: "62.4%",
564
664
  desc: "Share of buyers placing two or more orders in the period.",
565
665
  startHere: !0,
566
- isNew: !0
666
+ isNew: !0,
667
+ cardType: "donut",
668
+ donutValue: 0.624,
669
+ accentColor: "#1d6fd8",
670
+ suffix: "%"
567
671
  },
568
672
  {
569
673
  id: "cr-lapsed",
570
674
  label: "Lapsed accounts",
571
675
  value: "47",
572
- desc: "Accounts with zero orders in the last 90 days."
676
+ desc: "Accounts with zero orders in the last 90 days.",
677
+ cardType: "highlight",
678
+ highlightColor: "#f59e0b"
573
679
  },
574
680
  // PHASE 17 D1 — agency-account-coverage port (J4)
575
681
  {
576
682
  id: "agency-new-accounts",
577
683
  label: "New Accounts",
578
684
  value: "12",
579
- desc: "New customer accounts opened this period"
685
+ desc: "New customer accounts opened this period",
686
+ cardType: "standard"
580
687
  },
581
688
  {
582
689
  id: "agency-customers-compact",
583
690
  label: "Customers",
584
691
  value: "287",
585
- desc: "Active customer count with bar chart trend"
692
+ desc: "Active customer count with bar chart trend",
693
+ cardType: "bars",
694
+ barData: [240, 250, 260, 270, 275, 280, 287]
586
695
  },
587
696
  {
588
697
  id: "agency-inactive-accounts",
589
698
  label: "Inactive Act",
590
699
  value: "5",
591
- desc: "Inactive customer-account count (warn-tinted)"
700
+ desc: "Inactive customer-account count (warn-tinted)",
701
+ cardType: "highlight",
702
+ highlightColor: "#f59e0b"
592
703
  },
593
704
  {
594
705
  id: "agency-account-churn",
595
706
  label: "Account Churn",
596
707
  value: "8%",
597
- desc: "Customer churn rate (LY-active not TY-active)"
708
+ desc: "Customer churn rate (LY-active not TY-active)",
709
+ cardType: "standard",
710
+ suffix: "%"
598
711
  }
599
712
  ]
600
713
  }
601
714
  };
602
- function ae({
715
+ function re({
603
716
  lenses: e,
604
717
  activeLens: t,
605
- onLensChange: r,
606
- variant: n = "pills",
607
- lensMeta: d = z
718
+ onLensChange: l,
719
+ variant: i = "pills",
720
+ lensMeta: n = z
608
721
  }) {
609
- return n === "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) => {
610
- const u = i === t, l = d[i], s = ["cat-pill"];
611
- return u && s.push("active"), /* @__PURE__ */ h(
722
+ return i === "pills" ? /* @__PURE__ */ s("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ s("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((c) => {
723
+ const u = c === t, r = n[c], a = ["cat-pill"];
724
+ return u && a.push("active"), /* @__PURE__ */ h(
612
725
  "button",
613
726
  {
614
727
  type: "button",
615
728
  role: "tab",
616
729
  "aria-selected": u,
617
- className: s.join(" "),
618
- "data-lens": i,
730
+ className: a.join(" "),
731
+ "data-lens": c,
619
732
  onClick: () => {
620
- u || r(i);
733
+ u || l(c);
621
734
  },
622
735
  children: [
623
- i,
624
- l?.beta && /* @__PURE__ */ a("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
736
+ c,
737
+ r?.beta && /* @__PURE__ */ s("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
625
738
  ]
626
739
  },
627
- i
740
+ c
628
741
  );
629
- }) }) }) : /* @__PURE__ */ a(Ue, { lenses: e, activeLens: t, onLensChange: r });
742
+ }) }) }) : /* @__PURE__ */ s(Ue, { lenses: e, activeLens: t, onLensChange: l });
630
743
  }
631
744
  function Ue({
632
745
  lenses: e,
633
746
  activeLens: t,
634
- onLensChange: r
747
+ onLensChange: l
635
748
  }) {
636
- const [n, d] = C(!1), i = I(null), u = () => {
637
- i.current != null && (window.clearTimeout(i.current), i.current = null);
638
- }, l = () => {
639
- u(), i.current = window.setTimeout(() => d(!1), 100);
640
- }, s = e.filter((o) => o !== t);
641
- return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ h("div", { className: "cat-segmented", children: [
642
- /* @__PURE__ */ a(
749
+ const [i, n] = T(!1), c = I(null), u = () => {
750
+ c.current != null && (window.clearTimeout(c.current), c.current = null);
751
+ }, r = () => {
752
+ u(), c.current = window.setTimeout(() => n(!1), 100);
753
+ }, a = e.filter((o) => o !== t);
754
+ return /* @__PURE__ */ s("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ h("div", { className: "cat-segmented", children: [
755
+ /* @__PURE__ */ s(
643
756
  "button",
644
757
  {
645
758
  type: "button",
@@ -654,26 +767,26 @@ function Ue({
654
767
  {
655
768
  className: "cat-seg-more",
656
769
  onMouseEnter: () => {
657
- u(), d(!0);
770
+ u(), n(!0);
658
771
  },
659
- onMouseLeave: l,
772
+ onMouseLeave: r,
660
773
  children: [
661
- /* @__PURE__ */ a("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": n, children: "More ▾" }),
662
- n && /* @__PURE__ */ a(
774
+ /* @__PURE__ */ s("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": i, children: "More ▾" }),
775
+ i && /* @__PURE__ */ s(
663
776
  "div",
664
777
  {
665
778
  className: "cat-seg-overflow",
666
779
  role: "menu",
667
780
  onMouseEnter: u,
668
- onMouseLeave: l,
669
- children: s.map((o) => /* @__PURE__ */ a(
781
+ onMouseLeave: r,
782
+ children: a.map((o) => /* @__PURE__ */ s(
670
783
  "button",
671
784
  {
672
785
  type: "button",
673
786
  "data-lens": o,
674
787
  role: "menuitem",
675
788
  onClick: () => {
676
- r(o), d(!1);
789
+ l(o), n(!1);
677
790
  },
678
791
  children: o
679
792
  },
@@ -686,86 +799,87 @@ function Ue({
686
799
  )
687
800
  ] }) });
688
801
  }
689
- function U({ tiles: e, selectedTileId: t, onSelectTile: r }) {
690
- return /* @__PURE__ */ a("div", { className: "cat-tiles", children: e.map((n) => {
691
- const d = n.id === t, i = n.subStats != null && n.subStats.length > 0;
692
- let u = null;
693
- i ? n.subStats.length === 5 ? u = "span-5" : n.subStats.length === 3 ? u = "span-3" : u = "span-2" : n.stack === !0 && (u = "span-2");
694
- const l = ["cat-tile"];
695
- u && l.push(u), d && l.push("selected"), n.isNew && l.push("is-new"), n.startHere && l.push("start-here"), n.donut && l.push("has-donut");
696
- const s = 1;
697
- let o = 0.7;
802
+ function V({ tiles: e, selectedTileId: t, onSelectTile: l, renderTile: i }) {
803
+ return /* @__PURE__ */ s("div", { className: "cat-tiles", children: e.map((n) => {
804
+ const c = n.id === t, u = n.subStats != null && n.subStats.length > 0;
805
+ let r = null;
806
+ u ? n.subStats.length === 5 ? r = "span-5" : n.subStats.length === 3 ? r = "span-3" : r = "span-2" : n.stack === !0 && (r = "span-2");
807
+ const a = ["cat-tile"];
808
+ r && a.push(r), c && a.push("selected"), n.isNew && a.push("is-new"), n.startHere && a.push("start-here"), n.donut && a.push("has-donut");
809
+ const o = 1;
810
+ let d = 0.7;
698
811
  if (n.donut) {
699
- const c = /([\d.]+)\s*%/.exec(n.value);
700
- if (c) {
701
- const p = parseFloat(c[1]);
702
- Number.isFinite(p) && (o = Math.max(0, Math.min(1, p / 100)));
812
+ const p = /([\d.]+)\s*%/.exec(n.value);
813
+ if (p) {
814
+ const m = parseFloat(p[1]);
815
+ Number.isFinite(m) && (d = Math.max(0, Math.min(1, m / 100)));
703
816
  }
704
817
  }
705
818
  return /* @__PURE__ */ h(
706
819
  "button",
707
820
  {
708
821
  type: "button",
709
- className: l.join(" "),
822
+ className: a.join(" "),
710
823
  "data-metric": n.id,
711
824
  "data-desc": n.desc,
712
- "data-col-span": String(s),
825
+ "data-col-span": String(o),
713
826
  "data-donut": n.donut ? "true" : void 0,
714
827
  "data-accent": n.accent,
715
- "aria-pressed": d,
716
- onClick: () => r(n.id, n.desc),
828
+ "aria-pressed": c,
829
+ onClick: () => l(n.id, n.desc),
717
830
  style: n.accent ? { "--cat-tile-accent": n.accent } : void 0,
718
831
  children: [
719
- n.startHere && /* @__PURE__ */ a("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
720
- /* @__PURE__ */ a(
832
+ n.startHere && /* @__PURE__ */ s("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
833
+ i ? i(n) : /* @__PURE__ */ s(
721
834
  "div",
722
835
  {
723
836
  className: "cat-tile-primitive-wrapper gloss-metric-card",
837
+ "data-col-span": "1",
724
838
  style: { pointerEvents: "none", width: "100%", height: "100%" },
725
839
  "aria-hidden": "true",
726
- children: n.donut ? /* @__PURE__ */ a(
727
- G,
840
+ children: n.donut ? /* @__PURE__ */ s(
841
+ Q,
728
842
  {
729
843
  variant: "donut",
730
844
  label: n.label,
731
845
  value: n.value,
732
- donutValue: o,
846
+ donutValue: d,
733
847
  donutMax: 1,
734
848
  accentColor: n.accent,
735
- colSpan: s
849
+ colSpan: o
736
850
  }
737
- ) : /* @__PURE__ */ a(
738
- G,
851
+ ) : /* @__PURE__ */ s(
852
+ Q,
739
853
  {
740
854
  variant: "standard",
741
855
  label: n.label,
742
856
  value: n.value,
743
- colSpan: s
857
+ colSpan: o
744
858
  }
745
859
  )
746
860
  }
747
861
  ),
748
- n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((c) => /* @__PURE__ */ a("span", { children: c }, c)) }),
749
- n.isNew && /* @__PURE__ */ a("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
862
+ n.variants && n.variants.length > 0 && /* @__PURE__ */ s("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((p) => /* @__PURE__ */ s("span", { children: p }, p)) }),
863
+ n.isNew && /* @__PURE__ */ s("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
750
864
  ]
751
865
  },
752
866
  n.id
753
867
  );
754
868
  }) });
755
869
  }
756
- const V = Z(null);
757
- function He() {
758
- return ee(V);
870
+ const Y = ee(null);
871
+ function Ve() {
872
+ return te(Y);
759
873
  }
760
- function ze({ mode: e, dispatch: t }) {
761
- const r = He();
762
- if (r == null && e == null) return null;
763
- const n = r?.mode ?? e ?? "add", d = r?.selectedTileId ?? null, i = r?.description ?? null, u = d == null;
874
+ function He({ mode: e, dispatch: t }) {
875
+ const l = Ve();
876
+ if (l == null && e == null) return null;
877
+ const i = l?.mode ?? e ?? "add", n = l?.selectedTileId ?? null, c = l?.description ?? null, u = n == null;
764
878
  return /* @__PURE__ */ h("div", { className: "panel-footer catalog", children: [
765
- /* @__PURE__ */ a("div", { className: "cat-description", id: "cat-desc", children: i ?? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) }),
879
+ /* @__PURE__ */ s("div", { className: "cat-description", id: "cat-desc", children: c ?? /* @__PURE__ */ s("em", { children: "Tap a metric to see its description" }) }),
766
880
  /* @__PURE__ */ h("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
767
- /* @__PURE__ */ a("div", { className: "spacer", style: { flex: 1 } }),
768
- /* @__PURE__ */ a(
881
+ /* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
882
+ /* @__PURE__ */ s(
769
883
  "button",
770
884
  {
771
885
  id: "btn-cat-cancel",
@@ -775,7 +889,7 @@ function ze({ mode: e, dispatch: t }) {
775
889
  children: "Cancel"
776
890
  }
777
891
  ),
778
- n === "add" && /* @__PURE__ */ a(
892
+ i === "add" && /* @__PURE__ */ s(
779
893
  "button",
780
894
  {
781
895
  id: "btn-cat-add",
@@ -786,7 +900,7 @@ function ze({ mode: e, dispatch: t }) {
786
900
  children: "Add metric"
787
901
  }
788
902
  ),
789
- n === "replace" && /* @__PURE__ */ a(
903
+ i === "replace" && /* @__PURE__ */ s(
790
904
  "button",
791
905
  {
792
906
  id: "btn-cat-replace",
@@ -802,163 +916,168 @@ function ze({ mode: e, dispatch: t }) {
802
916
  }
803
917
  function q(e, t) {
804
918
  if (t.length === 0) return !0;
805
- const r = t.toLowerCase();
806
- if (e.label.toLowerCase().includes(r) || e.value.toLowerCase().includes(r)) return !0;
919
+ const l = t.toLowerCase();
920
+ if (e.label.toLowerCase().includes(l) || e.value.toLowerCase().includes(l)) return !0;
807
921
  if (e.subStats) {
808
- for (const n of e.subStats)
809
- if (n.label.toLowerCase().includes(r) || n.value.toLowerCase().includes(r)) return !0;
922
+ for (const i of e.subStats)
923
+ if (i.label.toLowerCase().includes(l) || i.value.toLowerCase().includes(l)) return !0;
810
924
  }
811
925
  return !1;
812
926
  }
813
- function vt({
927
+ function bt({
814
928
  isOpen: e,
815
- lenses: t = te,
816
- defaultLens: r = ne,
817
- tilesByLens: n = se,
818
- lensMeta: d = z,
819
- footerSlot: i
929
+ lenses: t = ne,
930
+ defaultLens: l = ae,
931
+ tilesByLens: i = se,
932
+ lensMeta: n = z,
933
+ footerSlot: c,
934
+ renderTile: u
820
935
  }) {
821
- const [u, l] = C(r), [s, o] = C(null), [c, p] = C(null), [m, v] = C(""), y = n[u] ?? { primary: [] }, b = d[u], _ = Y(
822
- () => y.primary.filter((g) => q(g, m)),
823
- [y.primary, m]
824
- ), N = Y(
825
- () => (y.secondary ?? []).filter((g) => q(g, m)),
826
- [y.secondary, m]
936
+ const [r, a] = T(l), [o, d] = T(null), [p, m] = T(null), [f, C] = T(""), b = i[r] ?? { primary: [] }, S = n[r], w = W(
937
+ () => b.primary.filter((y) => q(y, f)),
938
+ [b.primary, f]
939
+ ), v = W(
940
+ () => (b.secondary ?? []).filter((y) => q(y, f)),
941
+ [b.secondary, f]
827
942
  );
828
943
  return /* @__PURE__ */ h(
829
- V.Provider,
944
+ Y.Provider,
830
945
  {
831
- value: { mode: "add", selectedTileId: s, description: c },
946
+ value: { mode: "add", selectedTileId: o, description: p },
832
947
  children: [
833
948
  /* @__PURE__ */ h("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
834
- /* @__PURE__ */ a("div", { className: "cat-search", children: /* @__PURE__ */ a(
949
+ /* @__PURE__ */ s("div", { className: "cat-search", children: /* @__PURE__ */ s(
835
950
  "input",
836
951
  {
837
952
  type: "search",
838
953
  className: "cat-search-input",
839
954
  placeholder: "Search metrics",
840
955
  "aria-label": "Search metrics",
841
- value: m,
842
- onChange: (g) => v(g.target.value)
956
+ value: f,
957
+ onChange: (y) => C(y.target.value)
843
958
  }
844
959
  ) }),
845
- /* @__PURE__ */ a(
846
- ae,
960
+ /* @__PURE__ */ s(
961
+ re,
847
962
  {
848
963
  lenses: t,
849
- activeLens: u,
850
- lensMeta: d,
964
+ activeLens: r,
965
+ lensMeta: n,
851
966
  variant: "pills",
852
- onLensChange: (g) => {
853
- l(g), o(null), p(null), v("");
967
+ onLensChange: (y) => {
968
+ a(y), d(null), m(null), C("");
854
969
  }
855
970
  }
856
971
  ),
857
- b && /* @__PURE__ */ h("div", { className: "cat-lens-meta", children: [
858
- /* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: b.headline }),
859
- /* @__PURE__ */ a("p", { className: "cat-lens-helper", children: b.helper })
972
+ S && /* @__PURE__ */ h("div", { className: "cat-lens-meta", children: [
973
+ /* @__PURE__ */ s("h3", { className: "cat-lens-headline", children: S.headline }),
974
+ /* @__PURE__ */ s("p", { className: "cat-lens-helper", children: S.helper })
860
975
  ] }),
861
- /* @__PURE__ */ a(
862
- U,
976
+ /* @__PURE__ */ s(
977
+ V,
863
978
  {
864
- tiles: _,
865
- selectedTileId: s,
866
- onSelectTile: (g, S) => {
867
- o(g), p(S);
868
- }
979
+ tiles: w,
980
+ selectedTileId: o,
981
+ onSelectTile: (y, P) => {
982
+ d(y), m(P);
983
+ },
984
+ renderTile: u
869
985
  }
870
986
  ),
871
- N.length > 0 && /* @__PURE__ */ h("div", { className: "cat-more-in-lens", children: [
872
- /* @__PURE__ */ a("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
873
- /* @__PURE__ */ a(
874
- U,
987
+ v.length > 0 && /* @__PURE__ */ h("div", { className: "cat-more-in-lens", children: [
988
+ /* @__PURE__ */ s("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
989
+ /* @__PURE__ */ s(
990
+ V,
875
991
  {
876
- tiles: N,
877
- selectedTileId: s,
878
- onSelectTile: (g, S) => {
879
- o(g), p(S);
880
- }
992
+ tiles: v,
993
+ selectedTileId: o,
994
+ onSelectTile: (y, P) => {
995
+ d(y), m(P);
996
+ },
997
+ renderTile: u
881
998
  }
882
999
  )
883
1000
  ] }),
884
- _.length === 0 && N.length === 0 && m.length > 0 && /* @__PURE__ */ h("div", { className: "cat-empty", children: [
1001
+ w.length === 0 && v.length === 0 && f.length > 0 && /* @__PURE__ */ h("div", { className: "cat-empty", children: [
885
1002
  'No metrics match "',
886
- m,
1003
+ f,
887
1004
  '".'
888
1005
  ] })
889
1006
  ] }),
890
- i
1007
+ c
891
1008
  ]
892
1009
  }
893
1010
  );
894
1011
  }
895
- function bt({
1012
+ function yt({
896
1013
  isOpen: e,
897
1014
  replacingLabel: t,
898
- lenses: r = te,
899
- defaultLens: n = ne,
900
- tilesByLens: d = se,
901
- footerSlot: i
1015
+ lenses: l = ne,
1016
+ defaultLens: i = ae,
1017
+ tilesByLens: n = se,
1018
+ footerSlot: c,
1019
+ renderTile: u
902
1020
  }) {
903
- const [u, l] = C(n), [s, o] = C(null), [c, p] = C(null), m = d[u] ?? { primary: [] }, v = [...m.primary, ...m.secondary ?? []];
1021
+ const [r, a] = T(i), [o, d] = T(null), [p, m] = T(null), f = n[r] ?? { primary: [] }, C = [...f.primary, ...f.secondary ?? []];
904
1022
  return /* @__PURE__ */ h(
905
- V.Provider,
1023
+ Y.Provider,
906
1024
  {
907
- value: { mode: "replace", selectedTileId: s, description: c },
1025
+ value: { mode: "replace", selectedTileId: o, description: p },
908
1026
  children: [
909
1027
  /* @__PURE__ */ h("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
910
1028
  t && /* @__PURE__ */ h("p", { className: "cat-subtitle", children: [
911
1029
  "replacing ",
912
1030
  t
913
1031
  ] }),
914
- /* @__PURE__ */ a(
915
- ae,
1032
+ /* @__PURE__ */ s(
1033
+ re,
916
1034
  {
917
- lenses: r,
918
- activeLens: u,
919
- onLensChange: (y) => {
920
- l(y), o(null), p(null);
1035
+ lenses: l,
1036
+ activeLens: r,
1037
+ onLensChange: (b) => {
1038
+ a(b), d(null), m(null);
921
1039
  }
922
1040
  }
923
1041
  ),
924
- /* @__PURE__ */ a(
925
- U,
1042
+ /* @__PURE__ */ s(
1043
+ V,
926
1044
  {
927
- tiles: v,
928
- selectedTileId: s,
929
- onSelectTile: (y, b) => {
930
- o(y), p(b);
931
- }
1045
+ tiles: C,
1046
+ selectedTileId: o,
1047
+ onSelectTile: (b, S) => {
1048
+ d(b), m(S);
1049
+ },
1050
+ renderTile: u
932
1051
  }
933
1052
  )
934
1053
  ] }),
935
- i
1054
+ c
936
1055
  ]
937
1056
  }
938
1057
  );
939
1058
  }
940
- const re = Z(null);
941
- function le() {
942
- return ee(re);
1059
+ const le = ee(null);
1060
+ function oe() {
1061
+ return te(le);
943
1062
  }
944
- function Ve(e = {}) {
945
- const r = le()?.setPages;
1063
+ function ze(e = {}) {
1064
+ const l = oe()?.setPages;
946
1065
  return /* @__PURE__ */ h(
947
1066
  "div",
948
1067
  {
949
1068
  className: "panel-footer pm",
950
1069
  style: { display: "flex", justifyContent: "flex-end", padding: "10px 14px" },
951
1070
  children: [
952
- /* @__PURE__ */ a("div", { className: "spacer", style: { flex: 1 } }),
953
- /* @__PURE__ */ a(
1071
+ /* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
1072
+ /* @__PURE__ */ s(
954
1073
  "button",
955
1074
  {
956
1075
  id: "btn-new-page",
957
1076
  type: "button",
958
1077
  className: "btn btn-primary",
959
1078
  onClick: () => {
960
- r && r((n) => [
961
- ...n,
1079
+ l && l((i) => [
1080
+ ...i,
962
1081
  { id: `new-${Date.now()}`, name: "Untitled", active: !1 }
963
1082
  ]);
964
1083
  },
@@ -969,61 +1088,61 @@ function Ve(e = {}) {
969
1088
  }
970
1089
  );
971
1090
  }
972
- function Ke({ page: e, onRename: t, onKebab: r, onDragStart: n }) {
973
- const d = le(), [i, u] = C(!1), l = I(null);
1091
+ function Ye({ page: e, onRename: t, onKebab: l, onDragStart: i }) {
1092
+ const n = oe(), [c, u] = T(!1), r = I(null);
974
1093
  A(() => {
975
- if (!i) return;
976
- const m = (v) => {
977
- l.current && (l.current.contains(v.target) || u(!1));
1094
+ if (!c) return;
1095
+ const m = (f) => {
1096
+ r.current && (r.current.contains(f.target) || u(!1));
978
1097
  };
979
1098
  return document.addEventListener("mousedown", m, !0), () => document.removeEventListener("mousedown", m, !0);
980
- }, [i]);
981
- const s = () => {
1099
+ }, [c]);
1100
+ const a = () => {
982
1101
  if (u(!1), t) return t(e.id);
983
- if (!d?.renamePage) return;
1102
+ if (!n?.renamePage) return;
984
1103
  const m = window.prompt("Rename page", e.name);
985
- m != null && m.trim().length > 0 && d.renamePage(e.id, m.trim());
1104
+ m != null && m.trim().length > 0 && n.renamePage(e.id, m.trim());
986
1105
  }, o = () => {
987
- u(!1), d?.duplicatePage?.(e.id);
988
- }, c = () => {
989
- u(!1), !e.active && d?.deletePage?.(e.id);
1106
+ u(!1), n?.duplicatePage?.(e.id);
1107
+ }, d = () => {
1108
+ u(!1), !e.active && n?.deletePage?.(e.id);
990
1109
  }, p = ["pm-row"];
991
- return e.active && p.push("active"), /* @__PURE__ */ h("div", { ref: l, className: p.join(" "), "data-page-id": e.id, role: "listitem", children: [
992
- /* @__PURE__ */ a(
1110
+ return e.active && p.push("active"), /* @__PURE__ */ h("div", { ref: r, className: p.join(" "), "data-page-id": e.id, role: "listitem", children: [
1111
+ /* @__PURE__ */ s(
993
1112
  "div",
994
1113
  {
995
1114
  className: "pm-handle",
996
1115
  "aria-hidden": "true",
997
- onMouseDown: () => n?.(e.id),
1116
+ onMouseDown: () => i?.(e.id),
998
1117
  children: "⋮⋮"
999
1118
  }
1000
1119
  ),
1001
- /* @__PURE__ */ a("div", { className: "pm-name", children: e.name }),
1002
- /* @__PURE__ */ a(
1120
+ /* @__PURE__ */ s("div", { className: "pm-name", children: e.name }),
1121
+ /* @__PURE__ */ s(
1003
1122
  "button",
1004
1123
  {
1005
1124
  type: "button",
1006
1125
  className: "pm-kebab",
1007
1126
  "aria-label": "Page options",
1008
1127
  "aria-haspopup": "menu",
1009
- "aria-expanded": i,
1128
+ "aria-expanded": c,
1010
1129
  onClick: (m) => {
1011
- if (m.stopPropagation(), r) return r(e.id);
1012
- u((v) => !v);
1130
+ if (m.stopPropagation(), l) return l(e.id);
1131
+ u((f) => !f);
1013
1132
  },
1014
1133
  children: "⋯"
1015
1134
  }
1016
1135
  ),
1017
- i && /* @__PURE__ */ h("div", { className: "pm-kebab-menu", role: "menu", "data-page-id": e.id, children: [
1018
- /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: s, children: "Rename" }),
1019
- /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: o, children: "Duplicate" }),
1020
- /* @__PURE__ */ a(
1136
+ c && /* @__PURE__ */ h("div", { className: "pm-kebab-menu", role: "menu", "data-page-id": e.id, children: [
1137
+ /* @__PURE__ */ s("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: a, children: "Rename" }),
1138
+ /* @__PURE__ */ s("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: o, children: "Duplicate" }),
1139
+ /* @__PURE__ */ s(
1021
1140
  "button",
1022
1141
  {
1023
1142
  type: "button",
1024
1143
  role: "menuitem",
1025
1144
  className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
1026
- onClick: c,
1145
+ onClick: d,
1027
1146
  "aria-disabled": e.active,
1028
1147
  children: "Delete"
1029
1148
  }
@@ -1031,45 +1150,45 @@ function Ke({ page: e, onRename: t, onKebab: r, onDragStart: n }) {
1031
1150
  ] })
1032
1151
  ] });
1033
1152
  }
1034
- const Be = [
1153
+ const Ke = [
1035
1154
  { id: "p-pipeline", name: "My Pipeline", active: !0 },
1036
1155
  { id: "p-numbers", name: "My Numbers", active: !1 },
1037
1156
  { id: "p-morning", name: "My Morning", active: !1 },
1038
1157
  { id: "p-accounts", name: "My Accounts", active: !1 }
1039
1158
  ];
1040
- function yt({
1159
+ function vt({
1041
1160
  isOpen: e,
1042
- pages: t = Be,
1043
- footerSlot: r
1161
+ pages: t = Ke,
1162
+ footerSlot: l
1044
1163
  }) {
1045
- const [n, d] = C(() => [...t]), i = E((s, o) => {
1046
- d((c) => c.map((p) => p.id === s ? { ...p, name: o } : p));
1047
- }, []), u = E((s) => {
1048
- d((o) => {
1049
- const c = o.find((v) => v.id === s);
1050
- if (!c) return o;
1164
+ const [i, n] = T(() => [...t]), c = x((a, o) => {
1165
+ n((d) => d.map((p) => p.id === a ? { ...p, name: o } : p));
1166
+ }, []), u = x((a) => {
1167
+ n((o) => {
1168
+ const d = o.find((f) => f.id === a);
1169
+ if (!d) return o;
1051
1170
  const p = {
1052
- id: `${c.id}-copy-${Date.now()}`,
1053
- name: `${c.name} copy`,
1171
+ id: `${d.id}-copy-${Date.now()}`,
1172
+ name: `${d.name} copy`,
1054
1173
  active: !1
1055
- }, m = o.findIndex((v) => v.id === s);
1174
+ }, m = o.findIndex((f) => f.id === a);
1056
1175
  return [...o.slice(0, m + 1), p, ...o.slice(m + 1)];
1057
1176
  });
1058
- }, []), l = E((s) => {
1059
- d((o) => o.filter((c) => c.id !== s));
1177
+ }, []), r = x((a) => {
1178
+ n((o) => o.filter((d) => d.id !== a));
1060
1179
  }, []);
1061
- return /* @__PURE__ */ a(re.Provider, { value: { pages: n, setPages: d, renamePage: i, duplicatePage: u, deletePage: l }, children: /* @__PURE__ */ h("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
1062
- /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: n.map((s) => /* @__PURE__ */ a(Ke, { page: s }, s.id)) }),
1063
- r != null && /* @__PURE__ */ a("div", { className: "pm-footer-pin", children: r })
1180
+ return /* @__PURE__ */ s(le.Provider, { value: { pages: i, setPages: n, renamePage: c, duplicatePage: u, deletePage: r }, children: /* @__PURE__ */ h("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
1181
+ /* @__PURE__ */ s("div", { className: "pm-list", role: "list", children: i.map((a) => /* @__PURE__ */ s(Ye, { page: a }, a.id)) }),
1182
+ l != null && /* @__PURE__ */ s("div", { className: "pm-footer-pin", children: l })
1064
1183
  ] }) });
1065
1184
  }
1066
- const St = {
1185
+ const Ct = {
1067
1186
  SETTINGS: "settings",
1068
1187
  CATALOG_ADD: "catalog-add",
1069
1188
  CATALOG_REPLACE: "catalog-replace",
1070
1189
  PAGE_MGMT: "page-management",
1071
1190
  NOTIFICATION_CENTER: "notification-center"
1072
- }, Ye = {
1191
+ }, Be = {
1073
1192
  position: "fixed",
1074
1193
  inset: 0,
1075
1194
  pointerEvents: "none",
@@ -1083,80 +1202,80 @@ const St = {
1083
1202
  pointerEvents: "none",
1084
1203
  background: "rgba(0, 0, 0, 0.04)"
1085
1204
  };
1086
- function Ct() {
1087
- const { state: e, dispatch: t, getCloseLog: r } = ge();
1205
+ function St() {
1206
+ const { state: e, dispatch: t, getCloseLog: l } = ge();
1088
1207
  A(() => {
1089
1208
  if (e.activePanelId == null) return;
1090
- function i(u) {
1209
+ function c(u) {
1091
1210
  u.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
1092
1211
  }
1093
- return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
1212
+ return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
1094
1213
  }, [e.activePanelId, t]);
1095
- const n = I(e);
1096
- ve(() => {
1097
- n.current = e;
1214
+ const i = I(e);
1215
+ be(() => {
1216
+ i.current = e;
1098
1217
  }), A(() => {
1099
1218
  if (process.env.NODE_ENV === "production") return;
1100
- const i = window;
1101
- return i.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), i.__panelsHostHandle = {
1219
+ const c = window;
1220
+ return c.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), c.__panelsHostHandle = {
1102
1221
  dispatch: t,
1103
- getState: () => n.current,
1104
- getCloseLog: r
1222
+ getState: () => i.current,
1223
+ getCloseLog: l
1105
1224
  }, () => {
1106
- i.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
1225
+ c.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
1107
1226
  };
1108
- }, [t, r]);
1109
- const d = E(() => {
1227
+ }, [t, l]);
1228
+ const n = x(() => {
1110
1229
  t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
1111
1230
  }, [t]);
1112
- return /* @__PURE__ */ a("div", { "data-panel-host": "true", style: Ye, children: e.activePanelId != null && /* @__PURE__ */ a(
1231
+ return /* @__PURE__ */ s("div", { "data-panel-host": "true", style: Be, children: e.activePanelId != null && /* @__PURE__ */ s(
1113
1232
  "div",
1114
1233
  {
1115
1234
  "data-panel-scrim": "true",
1116
1235
  style: We,
1117
- onClick: d
1236
+ onClick: n
1118
1237
  }
1119
1238
  ) });
1120
1239
  }
1121
1240
  const Ge = 700;
1122
- function qe(e) {
1123
- const [t, r] = C(null), n = I(null);
1241
+ function Qe(e) {
1242
+ const [t, l] = T(null), i = I(null);
1124
1243
  return A(() => {
1125
1244
  if (e != null) {
1126
- n.current != null && (clearTimeout(n.current), n.current = null), r(null);
1245
+ i.current != null && (clearTimeout(i.current), i.current = null), l(null);
1127
1246
  return;
1128
1247
  }
1129
- return r((d) => d), n.current = setTimeout(() => {
1130
- r(null), n.current = null;
1248
+ return l((n) => n), i.current = setTimeout(() => {
1249
+ l(null), i.current = null;
1131
1250
  }, Ge), () => {
1132
- n.current != null && (clearTimeout(n.current), n.current = null);
1251
+ i.current != null && (clearTimeout(i.current), i.current = null);
1133
1252
  };
1134
1253
  }, [e]), A(() => {
1135
- e != null && r(e);
1254
+ e != null && l(e);
1136
1255
  }, [e]), e != null ? { panelId: e, isOpen: !0 } : t != null ? { panelId: t, isOpen: !1 } : { panelId: null, isOpen: !1 };
1137
1256
  }
1138
- function _t({ panelComponents: e, children: t }) {
1139
- const r = k();
1140
- if (r == null) return null;
1141
- const { state: n, dispatch: d } = r, i = qe(n.activePanelId);
1142
- if (i.panelId == null) return null;
1143
- const u = i.panelId, l = i.isOpen, s = e?.[u];
1144
- if (s == null && t == null)
1257
+ function Tt({ panelComponents: e, children: t }) {
1258
+ const l = L();
1259
+ if (l == null) return null;
1260
+ const { state: i, dispatch: n } = l, c = Qe(i.activePanelId);
1261
+ if (c.panelId == null) return null;
1262
+ const u = c.panelId, r = c.isOpen, a = e?.[u];
1263
+ if (a == null && t == null)
1145
1264
  return process.env.NODE_ENV !== "production" && console.error(
1146
1265
  "[panels] No panel component registered for activePanelId:",
1147
1266
  u
1148
1267
  ), null;
1149
1268
  if (u === "settings") {
1150
- const o = n.isDirty, c = n.activeTrigger, p = c?.kind === "card-overflow" ? c.cardId : null;
1151
- return /* @__PURE__ */ a(x, { isOpen: l, children: /* @__PURE__ */ a(
1152
- T,
1269
+ const o = i.isDirty, d = i.activeTrigger, p = d?.kind === "card-overflow" ? d.cardId : null;
1270
+ return /* @__PURE__ */ s(E, { isOpen: r, children: /* @__PURE__ */ s(
1271
+ k,
1153
1272
  {
1154
- isOpen: l,
1273
+ isOpen: r,
1155
1274
  title: "Configure metric",
1156
1275
  variant: "merged-stage",
1157
- onClose: () => d({ type: "CLOSE_PANEL", reason: "header-x" }),
1158
- footer: /* @__PURE__ */ h(J, { children: [
1159
- /* @__PURE__ */ a(
1276
+ onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
1277
+ footer: /* @__PURE__ */ h(Z, { children: [
1278
+ /* @__PURE__ */ s(
1160
1279
  "button",
1161
1280
  {
1162
1281
  id: "btn-reset",
@@ -1164,145 +1283,145 @@ function _t({ panelComponents: e, children: t }) {
1164
1283
  className: "gloss-panel-chrome__footer-btn",
1165
1284
  disabled: !o,
1166
1285
  onClick: () => {
1167
- p != null && d({ type: "CLEAR_BUFFER", cardId: p });
1286
+ p != null && n({ type: "CLEAR_BUFFER", cardId: p });
1168
1287
  },
1169
1288
  children: "Reset"
1170
1289
  }
1171
1290
  ),
1172
- /* @__PURE__ */ a("span", { style: { flex: 1 } }),
1173
- /* @__PURE__ */ a(
1291
+ /* @__PURE__ */ s("span", { style: { flex: 1 } }),
1292
+ /* @__PURE__ */ s(
1174
1293
  "button",
1175
1294
  {
1176
1295
  id: "settings-cancel",
1177
1296
  type: "button",
1178
1297
  className: "gloss-panel-chrome__footer-btn",
1179
- onClick: () => d({ type: "CLOSE_PANEL", reason: "cancel-button" }),
1298
+ onClick: () => n({ type: "CLOSE_PANEL", reason: "cancel-button" }),
1180
1299
  children: "Cancel"
1181
1300
  }
1182
1301
  ),
1183
- /* @__PURE__ */ a(
1302
+ /* @__PURE__ */ s(
1184
1303
  "button",
1185
1304
  {
1186
1305
  id: "settings-apply",
1187
1306
  type: "button",
1188
1307
  className: "gloss-panel-chrome__footer-btn gloss-panel-chrome__footer-btn--primary",
1189
1308
  disabled: !o,
1190
- onClick: () => d({ type: "CLOSE_PANEL", reason: "apply-button" }),
1309
+ onClick: () => n({ type: "CLOSE_PANEL", reason: "apply-button" }),
1191
1310
  children: "Apply"
1192
1311
  }
1193
1312
  )
1194
1313
  ] }),
1195
- children: s != null ? /* @__PURE__ */ a(s, { isOpen: l }) : t
1314
+ children: a != null ? /* @__PURE__ */ s(a, { isOpen: r }) : t
1196
1315
  }
1197
1316
  ) });
1198
1317
  }
1199
1318
  if (u === "catalog-add" || u === "catalog-replace") {
1200
- if (s == null) return null;
1319
+ if (a == null) return null;
1201
1320
  const o = u === "catalog-replace" ? "replace" : "add";
1202
- return /* @__PURE__ */ a(x, { isOpen: l, children: /* @__PURE__ */ a(
1203
- T,
1321
+ return /* @__PURE__ */ s(E, { isOpen: r, children: /* @__PURE__ */ s(
1322
+ k,
1204
1323
  {
1205
- isOpen: l,
1206
- onClose: () => d({ type: "CLOSE_PANEL", reason: "header-x" }),
1324
+ isOpen: r,
1325
+ onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
1207
1326
  footer: null,
1208
1327
  title: o === "replace" ? "Replace metric" : "Add a metric",
1209
- children: /* @__PURE__ */ a(
1210
- s,
1328
+ children: /* @__PURE__ */ s(
1329
+ a,
1211
1330
  {
1212
- isOpen: l,
1213
- footerSlot: /* @__PURE__ */ a(ze, { mode: o, dispatch: d })
1331
+ isOpen: r,
1332
+ footerSlot: /* @__PURE__ */ s(He, { mode: o, dispatch: n })
1214
1333
  }
1215
1334
  )
1216
1335
  }
1217
1336
  ) });
1218
1337
  }
1219
- return u === "page-management" ? s == null ? null : /* @__PURE__ */ a(x, { isOpen: l, children: /* @__PURE__ */ a(
1220
- T,
1338
+ return u === "page-management" ? a == null ? null : /* @__PURE__ */ s(E, { isOpen: r, children: /* @__PURE__ */ s(
1339
+ k,
1221
1340
  {
1222
- isOpen: l,
1223
- onClose: () => d({ type: "CLOSE_PANEL", reason: "header-x" }),
1341
+ isOpen: r,
1342
+ onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
1224
1343
  footer: null,
1225
1344
  title: "Manage pages",
1226
- children: /* @__PURE__ */ a(s, { isOpen: l, footerSlot: /* @__PURE__ */ a(Ve, {}) })
1345
+ children: /* @__PURE__ */ s(a, { isOpen: r, footerSlot: /* @__PURE__ */ s(ze, {}) })
1227
1346
  }
1228
- ) }) : /* @__PURE__ */ a(x, { isOpen: l, children: /* @__PURE__ */ a(
1229
- T,
1347
+ ) }) : /* @__PURE__ */ s(E, { isOpen: r, children: /* @__PURE__ */ s(
1348
+ k,
1230
1349
  {
1231
1350
  isOpen: !0,
1232
- onClose: () => d({ type: "CLOSE_PANEL", reason: "header-x" }),
1351
+ onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
1233
1352
  footer: null,
1234
- children: s != null ? /* @__PURE__ */ a(s, { isOpen: l }) : t
1353
+ children: a != null ? /* @__PURE__ */ s(a, { isOpen: r }) : t
1235
1354
  }
1236
1355
  ) });
1237
1356
  }
1238
1357
  function j(e) {
1239
1358
  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;
1240
1359
  }
1241
- const je = 685, Q = 627, Qe = "cubic-bezier(0.22, 1, 0.36, 1)", Xe = 200;
1242
- function oe(e, t) {
1360
+ const qe = 685, X = 627, je = "cubic-bezier(0.22, 1, 0.36, 1)", Xe = 200;
1361
+ function ie(e, t) {
1243
1362
  if (typeof window > "u") return t;
1244
- const r = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1245
- if (!r) return t;
1246
- const n = parseFloat(r);
1247
- return Number.isNaN(n) ? t : r.endsWith("s") && !r.endsWith("ms") ? n * 1e3 : n;
1363
+ const l = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1364
+ if (!l) return t;
1365
+ const i = parseFloat(l);
1366
+ return Number.isNaN(i) ? t : l.endsWith("s") && !l.endsWith("ms") ? i * 1e3 : i;
1248
1367
  }
1249
1368
  function Je(e, t) {
1250
1369
  return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
1251
1370
  }
1252
- function O(e) {
1371
+ function D(e) {
1253
1372
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1254
1373
  }
1255
1374
  function Ze(e) {
1256
- const { mountEl: t, chromeEl: r, reducedMotion: n, onAssert: d } = e;
1257
- if (t == null || r == null) {
1258
- O(e), d?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1375
+ const { mountEl: t, chromeEl: l, reducedMotion: i, onAssert: n } = e;
1376
+ if (t == null || l == null) {
1377
+ D(e), n?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1259
1378
  return;
1260
1379
  }
1261
- if (n) {
1262
- e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), d?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
1380
+ if (i) {
1381
+ e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), n?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
1263
1382
  return;
1264
1383
  }
1265
- if (typeof r.animate != "function") {
1266
- O(e), d?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1384
+ if (typeof l.animate != "function") {
1385
+ D(e), n?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1267
1386
  return;
1268
1387
  }
1269
- const i = r.cloneNode(!0);
1270
- 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 });
1271
- const u = oe("--panel-open-dur", je), l = Je("--panel-easing", Qe), s = r.animate(
1388
+ const c = l.cloneNode(!0);
1389
+ 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), l.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1390
+ const u = ie("--panel-open-dur", qe), r = Je("--panel-easing", je), a = l.animate(
1272
1391
  [{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
1273
- { duration: u, easing: l, fill: "forwards" }
1392
+ { duration: u, easing: r, fill: "forwards" }
1274
1393
  );
1275
- s.addEventListener(
1394
+ a.addEventListener(
1276
1395
  "finish",
1277
1396
  () => {
1278
- i.remove(), r.style.zIndex = "", s.cancel(), d?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1397
+ c.remove(), l.style.zIndex = "", a.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1279
1398
  },
1280
1399
  { once: !0 }
1281
1400
  );
1282
1401
  }
1283
1402
  function et(e) {
1284
- const { mountEl: t, onAssert: r } = e;
1403
+ const { mountEl: t, onAssert: l } = e;
1285
1404
  if (t == null) {
1286
- e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => O(e), Q), r?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1405
+ e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => D(e), X), l?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1287
1406
  return;
1288
1407
  }
1289
- const n = oe("--panel-close-dur", Q);
1290
- let d = !1, i = null;
1291
- const u = (s) => {
1292
- s.target !== t || s.propertyName !== "max-height" || d || (d = !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() }));
1293
- }, l = () => {
1294
- d || (d = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-forced", timestamp: Date.now() }));
1408
+ const i = ie("--panel-close-dur", X);
1409
+ let n = !1, c = null;
1410
+ const u = (a) => {
1411
+ a.target !== t || a.propertyName !== "max-height" || n || (n = !0, c != null && clearTimeout(c), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "handoff-complete", timestamp: Date.now() }));
1412
+ }, r = () => {
1413
+ n || (n = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "handoff-forced", timestamp: Date.now() }));
1295
1414
  };
1296
- t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(l, n + Xe);
1415
+ t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), c = setTimeout(r, i + Xe);
1297
1416
  }
1298
1417
  function tt(e) {
1299
- const { state: t, onAssert: r } = e;
1418
+ const { state: t, onAssert: l } = e;
1300
1419
  if (t.activePanelId && t.isDirty) {
1301
- e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "blocked-dirty", timestamp: Date.now() });
1420
+ e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "blocked-dirty", timestamp: Date.now() });
1302
1421
  return;
1303
1422
  }
1304
- const n = j(t.activeTrigger), d = j(e.trigger);
1305
- if (!!t.activePanelId && n != null && n === d) {
1423
+ const i = j(t.activeTrigger), n = j(e.trigger);
1424
+ if (!!t.activePanelId && i != null && i === n) {
1306
1425
  Ze(e);
1307
1426
  return;
1308
1427
  }
@@ -1310,28 +1429,28 @@ function tt(e) {
1310
1429
  et(e);
1311
1430
  return;
1312
1431
  }
1313
- O(e), r?.({ branch: "fresh-open", timestamp: Date.now() });
1432
+ D(e), l?.({ branch: "fresh-open", timestamp: Date.now() });
1314
1433
  }
1315
1434
  function nt() {
1316
1435
  if (!(typeof window > "u"))
1317
1436
  return window.__panelsAsserter;
1318
1437
  }
1319
- function Nt() {
1320
- const e = k(), t = X();
1321
- return E(
1322
- (r, n) => {
1438
+ function _t() {
1439
+ const e = L(), t = J();
1440
+ return x(
1441
+ (l, i) => {
1323
1442
  if (!e)
1324
1443
  return;
1325
- const d = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, i = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
1326
- panelId: r,
1327
- trigger: n,
1444
+ const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, c = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
1445
+ panelId: l,
1446
+ trigger: i,
1328
1447
  state: e.state,
1329
1448
  dispatch: e.dispatch,
1330
- mountEl: d,
1331
- chromeEl: i,
1449
+ mountEl: n,
1450
+ chromeEl: c,
1332
1451
  reducedMotion: t,
1333
- onAssert: (l) => {
1334
- nt()?.recordTransition?.(l);
1452
+ onAssert: (r) => {
1453
+ nt()?.recordTransition?.(r);
1335
1454
  }
1336
1455
  };
1337
1456
  tt(u);
@@ -1339,191 +1458,191 @@ function Nt() {
1339
1458
  [e, t]
1340
1459
  );
1341
1460
  }
1342
- let L = !1, D = null;
1461
+ let O = !1, M = null;
1343
1462
  function H() {
1344
1463
  const e = [];
1345
1464
  let t = "cleaned";
1346
1465
  document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
1347
- const n = document.querySelectorAll(".gloss-panel-mount");
1348
- n.length > 1 && e.push(`mount-count=${n.length}`);
1349
- const d = n[0] ?? null, i = d ? d.querySelectorAll(".gloss-panel-chrome") : [];
1350
- i.length > 1 && e.push(`chrome-count=${i.length}`);
1351
- const u = i[0] ?? null;
1466
+ const i = document.querySelectorAll(".gloss-panel-mount");
1467
+ i.length > 1 && e.push(`mount-count=${i.length}`);
1468
+ const n = i[0] ?? null, c = n ? n.querySelectorAll(".gloss-panel-chrome") : [];
1469
+ c.length > 1 && e.push(`chrome-count=${c.length}`);
1470
+ const u = c[0] ?? null;
1352
1471
  if (u) {
1353
- const c = u.style.zIndex;
1354
- c !== "" && c !== "2" && e.push(`chrome-zindex=${c}`);
1472
+ const d = u.style.zIndex;
1473
+ d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
1355
1474
  }
1356
- const l = d ? "present" : "absent", s = u ? "present" : "absent";
1475
+ const r = n ? "present" : "absent", a = u ? "present" : "absent";
1357
1476
  return {
1358
1477
  valid: e.length === 0,
1359
- mount: l,
1360
- chrome: s,
1478
+ mount: r,
1479
+ chrome: a,
1361
1480
  frozen: t,
1362
1481
  orphans: e,
1363
1482
  timestamp: Date.now()
1364
1483
  };
1365
1484
  }
1366
- const M = "8px 8px 0px", $ = "64px", R = "inset(0px 0px 60px 0px)", F = "inset(0px -40px -40px -40px)";
1367
- function f(e, t, r, n, d) {
1368
- return { id: e, constraint: t, expected: r, actual: n, pass: d };
1485
+ const $ = "8px 8px 0px", R = "64px", F = "inset(0px 0px 60px 0px)", U = "inset(0px -40px -40px -40px)";
1486
+ function g(e, t, l, i, n) {
1487
+ return { id: e, constraint: t, expected: l, actual: i, pass: n };
1369
1488
  }
1370
- function P(e) {
1489
+ function N(e) {
1371
1490
  const t = parseInt(e, 10);
1372
1491
  return Number.isFinite(t) ? t : NaN;
1373
1492
  }
1374
1493
  function K() {
1375
- const e = [], t = document.querySelector(".gloss-panel-mount"), r = t?.querySelector(".gloss-panel-chrome") ?? null, n = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), d = document.querySelector(".bell-cutout"), i = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
1494
+ const e = [], t = document.querySelector(".gloss-panel-mount"), l = t?.querySelector(".gloss-panel-chrome") ?? null, i = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), n = document.querySelector(".bell-cutout"), c = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
1376
1495
  if (!t)
1377
- e.push(f("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1496
+ e.push(g("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1378
1497
  else {
1379
- const l = getComputedStyle(t), s = l.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), o = l.clipPath || t.style.clipPath || "", c = o.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), p = c ? parseInt(c[1], 10) : NaN, m = P(s), v = Number.isFinite(p) && Number.isFinite(m) && p === m;
1498
+ const r = getComputedStyle(t), a = r.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), o = r.clipPath || t.style.clipPath || "", d = o.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), p = d ? parseInt(d[1], 10) : NaN, m = N(a), f = Number.isFinite(p) && Number.isFinite(m) && p === m;
1380
1499
  e.push(
1381
- f(
1500
+ g(
1382
1501
  "C1",
1383
1502
  "mount --reveal-y matches clip-path inset-bottom Npx",
1384
1503
  `inset(0 0 ${m}px 0) === --reveal-y(${m}px)`,
1385
- `--reveal-y=${s || "n/a"} clip-path=${o || "n/a"}`,
1386
- v
1504
+ `--reveal-y=${a || "n/a"} clip-path=${o || "n/a"}`,
1505
+ f
1387
1506
  )
1388
1507
  );
1389
1508
  }
1390
1509
  if (!t)
1391
- e.push(f("C2", "mount padding constant", M, "absent", !1));
1510
+ e.push(g("C2", "mount padding constant", $, "absent", !1));
1392
1511
  else {
1393
- const l = t.style.padding, s = getComputedStyle(t), o = l || s.padding || "", c = o === M || o === "8px 8px 0px 8px";
1394
- e.push(f("C2", "mount padding constant", M, o || "n/a", c));
1512
+ const r = t.style.padding, a = getComputedStyle(t), o = r || a.padding || "", d = o === $ || o === "8px 8px 0px 8px";
1513
+ e.push(g("C2", "mount padding constant", $, o || "n/a", d));
1395
1514
  }
1396
1515
  if (!t)
1397
- e.push(f("C3", "mount.bottom resolves to var(--tb-h)=64px", $, "absent", !1));
1516
+ e.push(g("C3", "mount.bottom resolves to var(--tb-h)=64px", R, "absent", !1));
1398
1517
  else {
1399
- const s = getComputedStyle(t).bottom || t.style.bottom || "", o = s === $;
1400
- e.push(f("C3", "mount.bottom resolves to var(--tb-h)=64px", $, s || "n/a", o));
1518
+ const a = getComputedStyle(t).bottom || t.style.bottom || "", o = a === R;
1519
+ e.push(g("C3", "mount.bottom resolves to var(--tb-h)=64px", R, a || "n/a", o));
1401
1520
  }
1402
- if (!r)
1403
- e.push(f("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1521
+ if (!l)
1522
+ e.push(g("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1404
1523
  else {
1405
- const l = getComputedStyle(r), s = P(
1406
- l.getPropertyValue("--row-h").trim() || r.style.getPropertyValue("--row-h").trim() || "0"
1407
- ), o = P(
1408
- l.getPropertyValue("--row-gap").trim() || r.style.getPropertyValue("--row-gap").trim() || "0"
1409
- ), c = s * 3 + o * 3 - 8, p = P(l.height || r.style.height || ""), m = Number.isFinite(s) && Number.isFinite(o) && Number.isFinite(p) && Number.isFinite(c) && p === c;
1524
+ const r = getComputedStyle(l), a = N(
1525
+ r.getPropertyValue("--row-h").trim() || l.style.getPropertyValue("--row-h").trim() || "0"
1526
+ ), o = N(
1527
+ r.getPropertyValue("--row-gap").trim() || l.style.getPropertyValue("--row-gap").trim() || "0"
1528
+ ), d = a * 3 + o * 3 - 8, p = N(r.height || l.style.height || ""), m = Number.isFinite(a) && Number.isFinite(o) && Number.isFinite(p) && Number.isFinite(d) && p === d;
1410
1529
  e.push(
1411
- f(
1530
+ g(
1412
1531
  "C4",
1413
1532
  "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
1414
- `${c}px (rh=${s} rg=${o})`,
1533
+ `${d}px (rh=${a} rg=${o})`,
1415
1534
  `${p}px`,
1416
1535
  m
1417
1536
  )
1418
1537
  );
1419
1538
  }
1420
- if (!n || !r)
1539
+ if (!i || !l)
1421
1540
  e.push(
1422
- f(
1541
+ g(
1423
1542
  "C5",
1424
1543
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1425
1544
  "present",
1426
- `coordinator=${n ? "present" : "absent"} chrome=${r ? "present" : "absent"}`,
1545
+ `coordinator=${i ? "present" : "absent"} chrome=${l ? "present" : "absent"}`,
1427
1546
  !1
1428
1547
  )
1429
1548
  );
1430
1549
  else {
1431
- const l = getComputedStyle(n), s = getComputedStyle(r), o = l.perspective || n.style.perspective || "", c = (l.perspectiveOrigin || n.style.perspectiveOrigin || "").trim(), p = s.perspectiveStyle || r.style.perspectiveStyle || "", b = o !== "" && o !== "none" && (c === "center bottom" || c === "50% 100%") && p === "flat";
1550
+ const r = getComputedStyle(i), a = getComputedStyle(l), o = r.perspective || i.style.perspective || "", d = (r.perspectiveOrigin || i.style.perspectiveOrigin || "").trim(), p = a.perspectiveStyle || l.style.perspectiveStyle || "", b = o !== "" && o !== "none" && (d === "center bottom" || d === "50% 100%") && p === "flat";
1432
1551
  e.push(
1433
- f(
1552
+ g(
1434
1553
  "C5",
1435
1554
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1436
1555
  "perspective:not-none, origin:center bottom, chrome-style:flat",
1437
- `perspective=${o} origin=${c} chrome-style=${p}`,
1556
+ `perspective=${o} origin=${d} chrome-style=${p}`,
1438
1557
  b
1439
1558
  )
1440
1559
  );
1441
1560
  }
1442
1561
  {
1443
- let l = !1, s = "absent";
1562
+ let r = !1, a = "absent";
1444
1563
  try {
1445
1564
  for (const o of Array.from(document.styleSheets)) {
1446
- let c = [];
1565
+ let d = [];
1447
1566
  try {
1448
- c = Array.from(o.cssRules ?? []);
1567
+ d = Array.from(o.cssRules ?? []);
1449
1568
  } catch {
1450
1569
  continue;
1451
1570
  }
1452
- for (const p of c)
1571
+ for (const p of d)
1453
1572
  if (p.name === "stage-spin") {
1454
- const v = Array.from(p.cssRules), y = v.find((S) => S.keyText === "0%" || S.keyText === "from"), b = v.find((S) => S.keyText === "100%" || S.keyText === "to"), _ = y?.style.transform ?? "", N = b?.style.transform ?? "", g = /rotateY\(\s*0(?:deg)?\s*\)/;
1455
- l = g.test(_) && g.test(N), s = `0%=${_ || "n/a"} 100%=${N || "n/a"}`;
1573
+ const f = Array.from(p.cssRules), C = f.find((y) => y.keyText === "0%" || y.keyText === "from"), b = f.find((y) => y.keyText === "100%" || y.keyText === "to"), S = C?.style.transform ?? "", w = b?.style.transform ?? "", v = /rotateY\(\s*0(?:deg)?\s*\)/;
1574
+ r = v.test(S) && v.test(w), a = `0%=${S || "n/a"} 100%=${w || "n/a"}`;
1456
1575
  break;
1457
1576
  }
1458
- if (s !== "absent") break;
1577
+ if (a !== "absent") break;
1459
1578
  }
1460
1579
  } catch {
1461
- s = "inspection-error";
1580
+ a = "inspection-error";
1462
1581
  }
1463
1582
  e.push(
1464
- f(
1583
+ g(
1465
1584
  "C6",
1466
1585
  "@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
1467
1586
  "both frames rotateY(0)",
1468
- s,
1469
- l
1587
+ a,
1588
+ r
1470
1589
  )
1471
1590
  );
1472
1591
  }
1473
1592
  {
1474
- const l = document.documentElement, s = getComputedStyle(l), o = s.getPropertyValue("--panel-open-dur").trim() || l.style.getPropertyValue("--panel-open-dur").trim(), c = s.getPropertyValue("--panel-close-dur").trim() || l.style.getPropertyValue("--panel-close-dur").trim(), p = P(o) || parseFloat(o) * (o.endsWith("s") && !o.endsWith("ms") ? 1e3 : 1), m = P(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), v = Number.isFinite(p) && Number.isFinite(m) && p > m;
1593
+ const r = document.documentElement, a = getComputedStyle(r), o = a.getPropertyValue("--panel-open-dur").trim() || r.style.getPropertyValue("--panel-open-dur").trim(), d = a.getPropertyValue("--panel-close-dur").trim() || r.style.getPropertyValue("--panel-close-dur").trim(), p = N(o) || parseFloat(o) * (o.endsWith("s") && !o.endsWith("ms") ? 1e3 : 1), m = N(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), f = Number.isFinite(p) && Number.isFinite(m) && p > m;
1475
1594
  e.push(
1476
- f("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${o || "n/a"} close=${c || "n/a"}`, v)
1595
+ g("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${o || "n/a"} close=${d || "n/a"}`, f)
1477
1596
  );
1478
1597
  }
1479
- if (!d)
1480
- e.push(f("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1598
+ if (!n)
1599
+ e.push(g("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1481
1600
  else {
1482
- const l = getComputedStyle(d), s = l.animationName || "", o = l.transitionProperty || "", c = (s === "" || s === "none") && (o === "" || o === "none" || o === "all");
1601
+ const r = getComputedStyle(n), a = r.animationName || "", o = r.transitionProperty || "", d = (a === "" || a === "none") && (o === "" || o === "none" || o === "all");
1483
1602
  e.push(
1484
- f(
1603
+ g(
1485
1604
  "C8",
1486
1605
  "BellCutout zero computed animation/transition",
1487
1606
  "animation:none AND transition:none",
1488
- `animation=${s || "n/a"} transition=${o || "n/a"}`,
1489
- c
1607
+ `animation=${a || "n/a"} transition=${o || "n/a"}`,
1608
+ d
1490
1609
  )
1491
1610
  );
1492
1611
  }
1493
1612
  if (!t)
1494
- e.push(f("C9", "mount closed-state clipPath", R, "absent", !1));
1613
+ e.push(g("C9", "mount closed-state clipPath", F, "absent", !1));
1495
1614
  else {
1496
- const l = t.style.clipPath, s = getComputedStyle(t), o = l || s.clipPath || "", c = o === R;
1497
- e.push(f("C9", "mount closed-state clipPath", R, o || "n/a", c));
1615
+ const r = t.style.clipPath, a = getComputedStyle(t), o = r || a.clipPath || "", d = o === F;
1616
+ e.push(g("C9", "mount closed-state clipPath", F, o || "n/a", d));
1498
1617
  }
1499
- if (!i)
1500
- e.push(f("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1618
+ if (!c)
1619
+ e.push(g("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1501
1620
  else {
1502
- const l = i.parentElement, s = l === document.body;
1621
+ const r = c.parentElement, a = r === document.body;
1503
1622
  e.push(
1504
- f(
1623
+ g(
1505
1624
  "C10",
1506
1625
  "bell-popover parentElement === document.body (open)",
1507
1626
  "body",
1508
- l === document.body ? "body" : l?.tagName ?? "n/a",
1509
- s
1627
+ r === document.body ? "body" : r?.tagName ?? "n/a",
1628
+ a
1510
1629
  )
1511
1630
  );
1512
1631
  }
1513
- if (!n)
1514
- e.push(f("C11", "coordinator overflow === visible", "visible", "absent", !1));
1632
+ if (!i)
1633
+ e.push(g("C11", "coordinator overflow === visible", "visible", "absent", !1));
1515
1634
  else {
1516
- const s = getComputedStyle(n).overflow || n.style.overflow || "", o = s === "visible";
1517
- e.push(f("C11", "coordinator overflow === visible", "visible", s || "n/a", o));
1635
+ const a = getComputedStyle(i).overflow || i.style.overflow || "", o = a === "visible";
1636
+ e.push(g("C11", "coordinator overflow === visible", "visible", a || "n/a", o));
1518
1637
  }
1519
1638
  if (!u)
1520
- e.push(f("C12", "toolbar clipPath = inset(0 -40 -40 -40)", F, "absent", !1));
1639
+ e.push(g("C12", "toolbar clipPath = inset(0 -40 -40 -40)", U, "absent", !1));
1521
1640
  else {
1522
- const l = u.style.clipPath, s = getComputedStyle(u), o = l || s.clipPath || "", c = o === F;
1523
- e.push(f("C12", "toolbar clipPath = inset(0 -40 -40 -40)", F, o || "n/a", c));
1641
+ const r = u.style.clipPath, a = getComputedStyle(u), o = r || a.clipPath || "", d = o === U;
1642
+ e.push(g("C12", "toolbar clipPath = inset(0 -40 -40 -40)", U, o || "n/a", d));
1524
1643
  }
1525
1644
  return e.push(
1526
- f(
1645
+ g(
1527
1646
  "C13",
1528
1647
  "same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
1529
1648
  "WAAPI driver wired in orchestrator (source-proof)",
@@ -1531,7 +1650,7 @@ function K() {
1531
1650
  "wiring_only"
1532
1651
  )
1533
1652
  ), e.push(
1534
- f(
1653
+ g(
1535
1654
  "C14",
1536
1655
  'cross-position handoff transitionend filtered by propertyName="max-height"',
1537
1656
  "transitionend filter wired in orchestrator (source-proof)",
@@ -1540,10 +1659,10 @@ function K() {
1540
1659
  )
1541
1660
  ), e;
1542
1661
  }
1543
- function st(e) {
1662
+ function at(e) {
1544
1663
  return K().find((t) => t.id === e);
1545
1664
  }
1546
- function at() {
1665
+ function st() {
1547
1666
  const e = H();
1548
1667
  return { q12: [
1549
1668
  {
@@ -1559,70 +1678,70 @@ function rt() {
1559
1678
  return {
1560
1679
  enable: lt,
1561
1680
  disable: ot,
1562
- isEnabled: () => L,
1563
- getLastReport: () => D,
1681
+ isEnabled: () => O,
1682
+ getLastReport: () => M,
1564
1683
  recordTransition: (e) => {
1565
- L && (D = { ...e, ...H() });
1684
+ O && (M = { ...e, ...H() });
1566
1685
  },
1567
1686
  assertOnce: () => {
1568
1687
  const e = H();
1569
- return D = e, e;
1688
+ return M = e, e;
1570
1689
  },
1571
1690
  assertCcOnly: K,
1572
- getCcRowById: st,
1573
- assertPanelTruths: at
1691
+ getCcRowById: at,
1692
+ assertPanelTruths: st
1574
1693
  };
1575
1694
  }
1576
1695
  function lt() {
1577
- if (L = !0, typeof window > "u") return;
1696
+ if (O = !0, typeof window > "u") return;
1578
1697
  window.__panelsAsserter || (window.__panelsAsserter = rt(), console.info(
1579
1698
  "[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
1580
1699
  ));
1581
1700
  }
1582
1701
  function ot() {
1583
- L = !1;
1702
+ O = !1;
1584
1703
  }
1585
1704
  export {
1586
- Et as COMMITS,
1587
- vt as CatalogAddShell,
1588
- ze as CatalogFooter,
1589
- bt as CatalogReplaceShell,
1590
- V as CatalogStateContext,
1591
- Oe as CloneCard,
1592
- Te as CloneStage,
1593
- ne as MOCK_DEFAULT_LENS,
1594
- te as MOCK_LENSES,
1705
+ Pt as COMMITS,
1706
+ bt as CatalogAddShell,
1707
+ He as CatalogFooter,
1708
+ yt as CatalogReplaceShell,
1709
+ Y as CatalogStateContext,
1710
+ ke as CloneCard,
1711
+ Ee as CloneStage,
1712
+ ae as MOCK_DEFAULT_LENS,
1713
+ ne as MOCK_LENSES,
1595
1714
  z as MOCK_LENS_META,
1596
- Be as MOCK_PAGES,
1715
+ Ke as MOCK_PAGES,
1597
1716
  se as MOCK_TILES_BY_LENS,
1598
- St as PANEL_IDS,
1599
- Ve as PageMgmtFooter,
1600
- yt as PageMgmtShell,
1601
- re as PageMgmtStateContext,
1602
- T as PanelChrome,
1603
- At as PanelHost,
1604
- Ct as PanelHostShell,
1605
- x as PanelMount,
1606
- xt as PanelProvider,
1607
- _t as PanelSlot,
1717
+ Ct as PANEL_IDS,
1718
+ ze as PageMgmtFooter,
1719
+ vt as PageMgmtShell,
1720
+ le as PageMgmtStateContext,
1721
+ k as PanelChrome,
1722
+ xt as PanelHost,
1723
+ St as PanelHostShell,
1724
+ E as PanelMount,
1725
+ At as PanelProvider,
1726
+ Tt as PanelSlot,
1608
1727
  gt as SettingsShell,
1609
1728
  K as assertCcOnly,
1610
1729
  H as assertPanelDomShape,
1611
- at as assertPanelTruths,
1612
- Tt as deriveSurfaceState,
1730
+ st as assertPanelTruths,
1731
+ Et as deriveSurfaceState,
1613
1732
  ot as disablePanelAsserter,
1614
1733
  lt as enablePanelAsserter,
1615
- st as getCcRowById,
1616
- Ot as initialState,
1734
+ at as getCcRowById,
1735
+ kt as initialState,
1617
1736
  j as positionKey,
1618
- Lt as reducer,
1737
+ Dt as reducer,
1619
1738
  tt as transitionToPanel,
1620
- He as useCatalogState,
1739
+ Ve as useCatalogState,
1621
1740
  ft as useEditingCardId,
1622
- le as usePageMgmtState,
1741
+ oe as usePageMgmtState,
1623
1742
  ge as usePanelContext,
1624
- k as usePanelContextOptional,
1625
- kt as usePanelCoordinator,
1626
- X as useReducedMotionPanel,
1627
- Nt as useTransitionToPanel
1743
+ L as usePanelContextOptional,
1744
+ Ot as usePanelCoordinator,
1745
+ J as useReducedMotionPanel,
1746
+ _t as useTransitionToPanel
1628
1747
  };