@umriss-ui/table 0.40.0 → 0.40.1

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.
package/dist/table.js CHANGED
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import "./table.css";
3
- import { useState as I, useCallback as fe, useMemo as H, useRef as q, useId as be, useContext as _e, createContext as rt, useSyncExternalStore as st, useLayoutEffect as Z, useEffect as xe } from "react";
4
- import { DEFAULT_FORMATS as xn, treeModel as rn, useVirtual as Ro, useFormats as ke, useWording as ie, Checkbox as We, DateRangePicker as Oo, FormField as vt, NumberInput as yt, separatorsOf as Eo, Tooltip as tt, Popover as it, Button as Q, TagGroup as An, Tag as Vt, Menu as Nn, MenuItem as nt, MenuSeparator as Mo, ControlSizeProvider as Tn, Select as Rn, VisuallyHidden as Oe, DatePicker as Lo, Input as On, announce as Fo, usePortalTarget as Do, IconButton as Bo, AngleGlyph as Vo, useDensityFor as Po, assess as Io, verdictWeight as _t, allBranches as $o, duplicateKey as zo } from "@umriss-ui/core";
5
- import { jsx as f, jsxs as T, Fragment as re } from "react/jsx-runtime";
6
- import { createPortal as En } from "react-dom";
7
- function Ko(e) {
8
- const [t, n] = I(/* @__PURE__ */ new Set()), o = fe((a) => t.has(a), [t]), r = fe((a) => {
3
+ import { useState as P, useCallback as fe, useMemo as H, useRef as q, useId as be, useContext as _e, createContext as rt, useSyncExternalStore as st, useLayoutEffect as Z, useEffect as xe } from "react";
4
+ import { DEFAULT_FORMATS as xn, treeModel as rn, useVirtual as To, useFormats as ke, useWording as ie, Checkbox as We, DateRangePicker as Ro, FormField as vt, NumberInput as yt, separatorsOf as Oo, Tooltip as tt, Popover as it, Button as Q, TagGroup as An, Tag as Bt, Menu as Nn, MenuItem as nt, MenuSeparator as Eo, ControlSizeProvider as jn, Select as Tn, VisuallyHidden as Re, DatePicker as Mo, Input as Rn, announce as Lo, usePortalTarget as Fo, IconButton as Do, AngleGlyph as Bo, useDensityFor as Vo, assess as Po, verdictWeight as _t, allBranches as Io, duplicateKey as $o } from "@umriss-ui/core";
5
+ import { jsx as f, jsxs as j, Fragment as re } from "react/jsx-runtime";
6
+ import { createPortal as On } from "react-dom";
7
+ function zo(e) {
8
+ const [t, n] = P(/* @__PURE__ */ new Set()), o = fe((a) => t.has(a), [t]), r = fe((a) => {
9
9
  n((u) => {
10
10
  const d = new Set(u);
11
11
  return d.has(a) ? d.delete(a) : d.add(a), d;
@@ -28,15 +28,15 @@ const se = (e) => e == null || typeof e == "number" && Number.isNaN(e);
28
28
  function lt(e) {
29
29
  return se(e) ? "empty" : typeof e == "string" ? "text" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : e instanceof Date ? Number.isNaN(e.getTime()) ? "empty" : "date" : "other";
30
30
  }
31
- function Mn(e, t) {
31
+ function En(e, t) {
32
32
  for (const n of e) {
33
33
  const o = lt(t(n));
34
34
  if (o !== "empty") return o;
35
35
  }
36
36
  return "empty";
37
37
  }
38
- const Pt = (e, t) => t ?? e === "number";
39
- function Ve(e, t, n, o) {
38
+ const Vt = (e, t) => t ?? e === "number";
39
+ function Be(e, t, n, o) {
40
40
  switch (lt(e)) {
41
41
  case "text":
42
42
  return e;
@@ -71,9 +71,9 @@ function kt(e, t) {
71
71
  }
72
72
  }
73
73
  }
74
- function It(e, t) {
74
+ function Pt(e, t) {
75
75
  if (!se(e)) {
76
- if (t) return It(t(e));
76
+ if (t) return Pt(t(e));
77
77
  switch (lt(e)) {
78
78
  case "text":
79
79
  return e;
@@ -88,8 +88,8 @@ function It(e, t) {
88
88
  }
89
89
  }
90
90
  }
91
- const $t = "absent", Ce = (e) => se(e) ? $t : e instanceof Date ? `value:${e.getTime()}` : `value:${String(e)}`, sn = (e) => e instanceof Date ? e.getTime() : typeof e == "number" && !Number.isNaN(e) ? e : void 0;
92
- function zt(e, t) {
91
+ const It = "absent", Ce = (e) => se(e) ? It : e instanceof Date ? `value:${e.getTime()}` : `value:${String(e)}`, sn = (e) => e instanceof Date ? e.getTime() : typeof e == "number" && !Number.isNaN(e) ? e : void 0;
92
+ function $t(e, t) {
93
93
  const n = t.map(e.read).filter((u) => !se(u) && !(u instanceof Date && Number.isNaN(u.getTime()))), o = e.aggregate;
94
94
  if (typeof o == "function") return o(n, t);
95
95
  if (o === "count") return n.length;
@@ -113,7 +113,7 @@ function zt(e, t) {
113
113
  return [l(c), l(a)];
114
114
  }
115
115
  }
116
- const Kt = 3, He = (e) => {
116
+ const zt = 3, He = (e) => {
117
117
  if (!se(e))
118
118
  return e instanceof Date ? e.getTime() : typeof e == "boolean" ? e ? 1 : 0 : typeof e == "number" ? e : String(e);
119
119
  };
@@ -121,7 +121,7 @@ function pt(e, t, n) {
121
121
  const o = He(e), r = He(t);
122
122
  return o === void 0 || r === void 0 ? o === r ? 0 : o === void 0 ? 1 : -1 : typeof o == "number" && typeof r == "number" ? o - r : n(String(o), String(r));
123
123
  }
124
- function Go(e, t) {
124
+ function Ko(e, t) {
125
125
  const n = t.compareText ?? xn.compareText, o = (r, s, i) => {
126
126
  const l = /* @__PURE__ */ new Map(), c = t.levels[s];
127
127
  if (!c) return [];
@@ -139,7 +139,7 @@ function Go(e, t) {
139
139
  }, a.set(x, y), l.set(y, [...i, x])), y.rows.push(g);
140
140
  }
141
141
  for (const g of a.values())
142
- for (const v of t.aggregates ?? []) g.aggregates[v.id] = zt(v, g.rows);
142
+ for (const v of t.aggregates ?? []) g.aggregates[v.id] = $t(v, g.rows);
143
143
  const u = t.sort?.find(
144
144
  (g) => g.column === c.id || t.aggregates?.some((v) => v.id === g.column)
145
145
  ), d = u?.direction === "desc" ? -1 : 1, b = u !== void 0 && u.column !== c.id ? u.column : void 0, p = (g) => {
@@ -164,7 +164,7 @@ function Go(e, t) {
164
164
  };
165
165
  return o(e, 0, []);
166
166
  }
167
- function jo(e, t) {
167
+ function Go(e, t) {
168
168
  const n = /* @__PURE__ */ new Set(), o = (r) => {
169
169
  for (const s of r)
170
170
  n.add(s.path), o(s.groups);
@@ -189,7 +189,7 @@ function qo(e, t, n, o) {
189
189
  }
190
190
  return n.date(t);
191
191
  }
192
- function Ln(e, t) {
192
+ function Mn(e, t) {
193
193
  const n = [], o = (r, s) => {
194
194
  for (const i of r) {
195
195
  const l = t.has(i.path);
@@ -207,10 +207,10 @@ function Yo(e, t, n) {
207
207
  for (let l = 0; l += Math.max(1, n - (e[l]?.parents.length ?? 0)), !(l >= e.length); )
208
208
  o.push(l);
209
209
  const r = o.length, s = Math.min(Math.max(1, t), r), i = n > 0 ? e.slice(o[s - 1], o[s] ?? e.length) : [...e];
210
- return { lines: Dn(i), page: s, pageCount: r };
210
+ return { lines: Fn(i), page: s, pageCount: r };
211
211
  }
212
- const Fn = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
213
- function Dn(e) {
212
+ const Ln = (e) => e.flatMap((t) => t.kind === "row" ? [t.row] : []);
213
+ function Fn(e) {
214
214
  const t = e[0];
215
215
  if (!t) return [...e];
216
216
  const n = t.parents.map((r, s) => ({
@@ -221,28 +221,28 @@ function Dn(e) {
221
221
  })), o = t.kind === "row" && t.span && !t.first ? { ...t, first: !0, continued: !0 } : t;
222
222
  return [...n, o, ...e.slice(1)];
223
223
  }
224
- function Bn(e, t) {
224
+ function Dn(e, t) {
225
225
  return t?.length ? [
226
226
  ...t.map((n) => e.find((o) => o.id === n)).filter((n) => n !== void 0),
227
227
  ...e.filter((n) => !t.includes(n.id))
228
228
  ] : e;
229
229
  }
230
- const De = (e) => e == null || typeof e == "number" && Number.isNaN(e), Uo = (e, t) => typeof e == "number" && typeof t == "number" ? e - t : xn.compareText(String(e), String(t));
231
- function Vn(e, t, n) {
230
+ const Fe = (e) => e == null || typeof e == "number" && Number.isNaN(e), Uo = (e, t) => typeof e == "number" && typeof t == "number" ? e - t : xn.compareText(String(e), String(t));
231
+ function Bn(e, t, n) {
232
232
  const o = (t ?? "").trim().toLowerCase(), r = e.filter((i) => i.searchable && i.value), s = (i) => !o || r.some((l) => {
233
233
  const c = l.value(i);
234
- return !De(c) && String(c).toLowerCase().includes(o);
234
+ return !Fe(c) && String(c).toLowerCase().includes(o);
235
235
  });
236
236
  return { term: o, matches: (i) => s(i) && (n ? n(i) : !0) };
237
237
  }
238
- function Pn(e, t) {
238
+ function Vn(e, t) {
239
239
  const n = Array.isArray(t) ? t : t ? [t] : [], o = [], r = n.map((i) => {
240
240
  const l = e.find((b) => b.id === i.column);
241
241
  if (!l || !l.compare && !l.value) return null;
242
242
  const c = i.direction === "asc" ? 1 : -1, a = l.compare, u = l.value, d = o.length;
243
243
  return o.push(u), u ? (b, p) => {
244
244
  const m = b.keys[d], w = p.keys[d];
245
- return De(m) || De(w) ? De(m) === De(w) ? 0 : De(m) ? 1 : -1 : (a ? a(b.row, p.row) : Uo(m, w)) * c;
245
+ return Fe(m) || Fe(w) ? Fe(m) === Fe(w) ? 0 : Fe(m) ? 1 : -1 : (a ? a(b.row, p.row) : Uo(m, w)) * c;
246
246
  } : (b, p) => a(b.row, p.row) * c;
247
247
  }).filter((i) => i !== null);
248
248
  return { levels: n, sorted: (i) => (
@@ -256,12 +256,12 @@ function Pn(e, t) {
256
256
  }).map((l) => l.row)
257
257
  ) };
258
258
  }
259
- function In(e, t, n) {
260
- const { matches: o } = Vn(t, n.search, n.filter), { levels: r, sorted: s } = Pn(t, n.sort);
259
+ function Pn(e, t, n) {
260
+ const { matches: o } = Bn(t, n.search, n.filter), { levels: r, sorted: s } = Vn(t, n.sort);
261
261
  return { filtered: s(e.filter(o)), levels: r };
262
262
  }
263
- function $n(e, t, n) {
264
- return Go(e, { levels: n.levels, aggregates: n.aggregates, compareText: n.compareText, sort: t });
263
+ function In(e, t, n) {
264
+ return Ko(e, { levels: n.levels, aggregates: n.aggregates, compareText: n.compareText, sort: t });
265
265
  }
266
266
  function St(e, t, n, o) {
267
267
  const { page: r = 1, pageSize: s, hidden: i, order: l } = t, c = Ct(e, i, l);
@@ -270,7 +270,7 @@ function St(e, t, n, o) {
270
270
  return {
271
271
  columns: c,
272
272
  filtered: n,
273
- visible: Fn(b.lines),
273
+ visible: Ln(b.lines),
274
274
  groups: o.groups,
275
275
  lines: o.lines,
276
276
  visibleLines: b.lines,
@@ -290,10 +290,10 @@ function St(e, t, n, o) {
290
290
  };
291
291
  }
292
292
  const Ct = (e, t, n) => {
293
- const o = Bn(e, n);
293
+ const o = Dn(e, n);
294
294
  return t?.length ? o.filter((r) => r.hideable === !1 || !t.includes(r.id)) : o;
295
295
  };
296
- function zn(e, t, n) {
296
+ function $n(e, t, n) {
297
297
  const { page: o = 1, pageSize: r, hidden: s, order: i } = n;
298
298
  if (n.server) {
299
299
  const u = Ct(t, s, i), { rowCount: d } = n.server, b = r && r > 0 ? r : Math.max(d, 1), p = Math.max(1, Math.ceil(d / b)), m = d > 0 ? Math.min(Math.max(1, o), p) : Math.max(1, o);
@@ -307,13 +307,13 @@ function zn(e, t, n) {
307
307
  };
308
308
  }
309
309
  if (n.tree) {
310
- const { term: u, matches: d } = Vn(t, n.search, n.filter), { sorted: b } = Pn(t, n.sort);
310
+ const { term: u, matches: d } = Bn(t, n.search, n.filter), { sorted: b } = Vn(t, n.sort);
311
311
  return Jo(e, n.tree, b, u || n.filter ? d : void 0, Ct(t, s, i));
312
312
  }
313
- const { filtered: l, levels: c } = In(e, t, n);
313
+ const { filtered: l, levels: c } = Pn(e, t, n);
314
314
  if (!n.grouping?.levels.length) return St(t, n, l);
315
- const a = $n(l, c, n.grouping);
316
- return St(t, n, l, { groups: a, lines: Ln(a, n.grouping.folded) });
315
+ const a = In(l, c, n.grouping);
316
+ return St(t, n, l, { groups: a, lines: Mn(a, n.grouping.folded) });
317
317
  }
318
318
  function Jo(e, t, n, o, r) {
319
319
  const { admit: s } = t, i = (v) => n(s ? v.filter(s) : v), l = /* @__PURE__ */ new Map(), c = {
@@ -357,113 +357,113 @@ function xt(e) {
357
357
  for (const n of e) n.width !== void 0 && (t[n.id] = n.width);
358
358
  return t;
359
359
  }
360
- function Kn(e, t, n) {
360
+ function zn(e, t, n) {
361
361
  if (!e.lines) return { ...e, visible: (e.shown ?? e.filtered).slice(t, n) };
362
362
  const o = e.lines.slice(t, n);
363
- return { ...e, visibleLines: o, visible: Fn(o) };
363
+ return { ...e, visibleLines: o, visible: Ln(o) };
364
364
  }
365
365
  function Xo(e, t, n) {
366
- const { rowKey: o, filter: r, defaultSort: s = null, initialView: i, virtual: l, grouping: c, server: a, tree: u } = n, d = (P) => P?.sort?.length ? [...P.sort] : s ? Array.isArray(s) ? [...s] : [s] : [], b = (P) => P?.widths ? { ...P.widths } : xt(t), [p, m] = I(i?.search ?? ""), [w, g] = I(() => d(i)), [v, x] = I(i?.page ?? 1), [y, _] = I(
366
+ const { rowKey: o, filter: r, defaultSort: s = null, initialView: i, virtual: l, grouping: c, server: a, tree: u } = n, d = (V) => V?.sort?.length ? [...V.sort] : s ? Array.isArray(s) ? [...s] : [s] : [], b = (V) => V?.widths ? { ...V.widths } : xt(t), [p, m] = P(i?.search ?? ""), [w, g] = P(() => d(i)), [v, x] = P(i?.page ?? 1), [y, _] = P(
367
367
  i?.pageSize ?? n.pageSize ?? 10
368
- ), [S, C] = I([]), [A, L] = I(i?.hidden ?? []), [k, O] = I(i?.order ?? []), [M, R] = I(() => b(i)), E = (P) => {
369
- m(P.search ?? ""), g(d(P)), x(P.page ?? 1), _(P.pageSize ?? n.pageSize ?? 10), L(P.hidden ?? []), O(P.order ?? []), R(b(P));
370
- }, B = l || u ? 0 : y, $ = !a && !u, V = H(
371
- () => $ ? In(e, t, { search: p, filter: r, sort: w }) : null,
372
- [$, e, t, p, r, w]
373
- ), K = c?.levels.length ? c : void 0, Y = H(
374
- () => V && K ? $n(V.filtered, V.levels, K) : void 0,
368
+ ), [S, C] = P([]), [A, M] = P(i?.hidden ?? []), [k, R] = P(i?.order ?? []), [E, T] = P(() => b(i)), O = (V) => {
369
+ m(V.search ?? ""), g(d(V)), x(V.page ?? 1), _(V.pageSize ?? n.pageSize ?? 10), M(V.hidden ?? []), R(V.order ?? []), T(b(V));
370
+ }, D = l || u ? 0 : y, I = !a && !u, B = H(
371
+ () => I ? Pn(e, t, { search: p, filter: r, sort: w }) : null,
372
+ [I, e, t, p, r, w]
373
+ ), z = c?.levels.length ? c : void 0, Y = H(
374
+ () => B && z ? In(B.filtered, B.levels, z) : void 0,
375
375
  // The fold is not an input of the grouping: it only chooses lines.
376
376
  // eslint-disable-next-line react-hooks/exhaustive-deps
377
- [V, K?.levels, K?.aggregates, K?.compareText]
377
+ [B, z?.levels, z?.aggregates, z?.compareText]
378
378
  ), ce = H(
379
- () => Y && K ? Ln(Y, K.folded) : void 0,
379
+ () => Y && z ? Mn(Y, z.folded) : void 0,
380
380
  // eslint-disable-next-line react-hooks/exhaustive-deps
381
- [Y, K?.folded]
382
- ), j = H(
383
- () => V ? St(t, { page: v, pageSize: B, hidden: A, order: k }, V.filtered, Y && ce ? { groups: Y, lines: ce } : void 0) : zn(e, t, { search: p, filter: r, sort: w, page: v, pageSize: B, hidden: A, order: k, grouping: c, server: a, tree: u }),
384
- [V, Y, ce, t, v, B, A, k, e, p, r, w, c, a, u]
385
- ), [ne, de] = I(36), le = Ro(l ? (j.lines ?? j.shown ?? j.filtered).length : 0, {
381
+ [Y, z?.folded]
382
+ ), G = H(
383
+ () => B ? St(t, { page: v, pageSize: D, hidden: A, order: k }, B.filtered, Y && ce ? { groups: Y, lines: ce } : void 0) : $n(e, t, { search: p, filter: r, sort: w, page: v, pageSize: D, hidden: A, order: k, grouping: c, server: a, tree: u }),
384
+ [B, Y, ce, t, v, D, A, k, e, p, r, w, c, a, u]
385
+ ), [ne, de] = P(36), le = To(l ? (G.lines ?? G.shown ?? G.filtered).length : 0, {
386
386
  rowHeight: l ? ne : 0,
387
387
  overscan: typeof l == "object" ? l.overscan : void 0
388
388
  }), ee = H(
389
- () => l ? Kn(j, le.from, le.to) : j,
390
- [l, j, le.from, le.to]
391
- ), oe = ee.visibleLines, W = ee.visible, ge = H(() => j.filtered.map(o), [j.filtered, o]), F = Ko(ge), ae = fe((P) => {
392
- m(P), x(1);
393
- }, []), Ae = fe((P) => {
394
- _(P), x(1);
395
- }, []), ue = fe((P, J = !1) => {
389
+ () => l ? zn(G, le.from, le.to) : G,
390
+ [l, G, le.from, le.to]
391
+ ), oe = ee.visibleLines, W = ee.visible, ge = H(() => G.filtered.map(o), [G.filtered, o]), L = zo(ge), ae = fe((V) => {
392
+ m(V), x(1);
393
+ }, []), Ae = fe((V) => {
394
+ _(V), x(1);
395
+ }, []), ue = fe((V, J = !1) => {
396
396
  g((te) => {
397
- const me = te.find((we) => we.column === P);
397
+ const me = te.find((we) => we.column === V);
398
398
  if (!J) {
399
399
  const we = te.length === 1 && me?.direction === "asc" ? "desc" : "asc";
400
- return [{ column: P, direction: we }];
400
+ return [{ column: V, direction: we }];
401
401
  }
402
402
  return me ? me.direction === "asc" ? te.map(
403
- (we) => we.column === P ? { column: P, direction: "desc" } : we
404
- ) : te.filter((we) => we.column !== P) : [...te, { column: P, direction: "asc" }];
403
+ (we) => we.column === V ? { column: V, direction: "desc" } : we
404
+ ) : te.filter((we) => we.column !== V) : [...te, { column: V, direction: "asc" }];
405
405
  }), x(1);
406
- }, []), Ne = fe((P) => {
406
+ }, []), Ne = fe((V) => {
407
407
  C(
408
- (J) => J.includes(P) ? J.filter((te) => te !== P) : [...J, P]
408
+ (J) => J.includes(V) ? J.filter((te) => te !== V) : [...J, V]
409
409
  );
410
- }, []), Me = fe((P) => {
411
- L(
412
- (J) => J.includes(P) ? J.filter((te) => te !== P) : [...J, P]
410
+ }, []), Ee = fe((V) => {
411
+ M(
412
+ (J) => J.includes(V) ? J.filter((te) => te !== V) : [...J, V]
413
413
  );
414
- }, []), pe = fe((P, J) => {
415
- R((te) => {
414
+ }, []), pe = fe((V, J) => {
415
+ T((te) => {
416
416
  if (J === void 0) {
417
- if (!(P in te)) return te;
417
+ if (!(V in te)) return te;
418
418
  const me = { ...te };
419
- return delete me[P], me;
419
+ return delete me[V], me;
420
420
  }
421
- return { ...te, [P]: J };
421
+ return { ...te, [V]: J };
422
422
  });
423
- }, []), U = n.pageSize ?? 10, Se = H(() => xt(t), [t]), Le = H(() => {
424
- const P = {};
425
- for (const [J, te] of Object.entries(M))
426
- Se[J] !== te && (P[J] = te);
427
- return P;
428
- }, [M, Se]), Ie = H(
423
+ }, []), U = n.pageSize ?? 10, Se = H(() => xt(t), [t]), Me = H(() => {
424
+ const V = {};
425
+ for (const [J, te] of Object.entries(E))
426
+ Se[J] !== te && (V[J] = te);
427
+ return V;
428
+ }, [E, Se]), Pe = H(
429
429
  () => s ? Array.isArray(s) ? s : [s] : [],
430
430
  [s]
431
- ), Fe = w.length === Ie.length && w.every(
432
- (P, J) => P.column === Ie[J]?.column && P.direction === Ie[J]?.direction
431
+ ), Le = w.length === Pe.length && w.every(
432
+ (V, J) => V.column === Pe[J]?.column && V.direction === Pe[J]?.direction
433
433
  ), Je = H(
434
434
  () => ({
435
435
  ...p ? { search: p } : {},
436
- ...w.length && !Fe ? { sort: w } : {},
436
+ ...w.length && !Le ? { sort: w } : {},
437
437
  /* Without paging there is no page a view could carry - a page three in
438
438
  the view of a virtualised table would be a promise nobody redeems on
439
439
  opening. */
440
- ...!l && j.page > 1 ? { page: j.page } : {},
440
+ ...!l && G.page > 1 ? { page: G.page } : {},
441
441
  ...!l && y !== U ? { pageSize: y } : {},
442
442
  ...A.length ? { hidden: A } : {},
443
443
  ...k.length ? { order: k } : {},
444
- ...Object.keys(Le).length ? { widths: Le } : {}
444
+ ...Object.keys(Me).length ? { widths: Me } : {}
445
445
  }),
446
446
  [
447
447
  l,
448
448
  p,
449
449
  w,
450
- Fe,
451
- j.page,
450
+ Le,
451
+ G.page,
452
452
  y,
453
453
  U,
454
454
  A,
455
455
  k,
456
- Le
456
+ Me
457
457
  ]
458
458
  );
459
459
  return {
460
- ...j,
460
+ ...G,
461
461
  visible: W,
462
462
  visibleLines: oe,
463
463
  virtual: l ? le : void 0,
464
464
  setPitch: de,
465
465
  server: a,
466
- restart: E,
466
+ restart: O,
467
467
  view: Je,
468
468
  search: p,
469
469
  setSearch: ae,
@@ -475,12 +475,12 @@ function Xo(e, t, n) {
475
475
  expanded: S,
476
476
  toggleRow: Ne,
477
477
  hidden: A,
478
- toggleColumn: Me,
478
+ toggleColumn: Ee,
479
479
  order: k,
480
- setOrder: O,
481
- widths: M,
480
+ setOrder: R,
481
+ widths: E,
482
482
  setWidth: pe,
483
- selection: F
483
+ selection: L
484
484
  };
485
485
  }
486
486
  function Qo(e, t) {
@@ -536,11 +536,11 @@ function cr() {
536
536
  const e = import.meta;
537
537
  return typeof e.env?.DEV == "boolean" ? e.env.DEV : typeof process < "u" && process?.env ? process.env.NODE_ENV !== "production" : !1;
538
538
  }
539
- const Gt = cr(), ln = /* @__PURE__ */ new Set();
539
+ const Kt = cr(), ln = /* @__PURE__ */ new Set();
540
540
  function X(e, t) {
541
- !Gt || ln.has(e) || (ln.add(e), console.warn(`@umriss-ui/table: ${t}`));
541
+ !Kt || ln.has(e) || (ln.add(e), console.warn(`@umriss-ui/table: ${t}`));
542
542
  }
543
- const dr = "_frame_12rhl_11 _text_18806_22", ur = "_children_12rhl_24", fr = "_scroll_12rhl_33 _scroll_18806_96", hr = "_footerTarget_12rhl_62", gr = "_table_12rhl_74", pr = "_th_12rhl_86 _ring_18806_125", mr = "_sticky_12rhl_103", wr = "_td_12rhl_111", br = "_rowHeader_12rhl_125", vr = "_compact_12rhl_146 _dense_18806_38", yr = "_numeric_12rhl_177", _r = "_value_12rhl_197", kr = "_valueText_12rhl_207", Sr = "_sized_12rhl_211", Cr = "_cutTip_12rhl_228 _text_18806_22", xr = "_absent_12rhl_270", Ar = "_striped_12rhl_274", Nr = "_pinned_12rhl_299", Tr = "_pinStartEdge_12rhl_315", Rr = "_pinEndEdge_12rhl_316", Or = "_sortButton_12rhl_346 _ring_18806_125", Er = "_sortIndicator_12rhl_371", Mr = "_sortArrow_12rhl_378", Lr = "_sortArrowDesc_12rhl_382", Fr = "_sortActive_12rhl_390", Dr = "_sortRank_12rhl_396", Br = "_thFlex_12rhl_404", Vr = "_headLine_12rhl_424", Pr = "_headLabel_12rhl_447", Ir = "_footerKind_12rhl_463", $r = "_emptyCell_12rhl_481", zr = "_emptyTitle_12rhl_503", Kr = "_skeleton_12rhl_512", Gr = "_toolbar_12rhl_544 _text_18806_22", jr = "_toolbarGroup_12rhl_560", Hr = "_toolbarGroupIdle_12rhl_576", Wr = "_searchGrow_12rhl_583", qr = "_toolbarMd_12rhl_593", Yr = "_toolbarInfo_12rhl_597", Ur = "_pagination_12rhl_603 _text_18806_22", Jr = "_paginationControls_12rhl_616", Xr = "_pageSize_12rhl_623", Qr = "_pageSteps_12rhl_631", Zr = "_paginationStatus_12rhl_637", es = "_filterButton_12rhl_646 _ring_18806_125", ts = "_filterActive_12rhl_673", ns = "_filterPanel_12rhl_678", os = "_filterContent_12rhl_692 _scroll_18806_96", rs = "_filterFooter_12rhl_703", ss = "_filterLabel_12rhl_717", is = "_filterValue_12rhl_727", ls = "_filteredCount_12rhl_733", as = "_rangeFields_12rhl_744", cs = "_rangePeriod_12rhl_754", ds = "_conditions_12rhl_760", us = "_conditionButton_12rhl_766", fs = "_condition_12rhl_760", hs = "_columnsPanel_12rhl_791", gs = "_columnsList_12rhl_800", ps = "_columnsEntry_12rhl_809", ms = "_move_12rhl_821", ws = "_pinOn_12rhl_859", bs = "_groupingChoice_12rhl_869", vs = "_groupingHeading_12rhl_877", ys = "_groupingOptions_12rhl_886", _s = "_groupingOption_12rhl_886 _ring_18806_125", ks = "_groupingLevel_12rhl_929", Ss = "_groupingTag_12rhl_934", Cs = "_groupingTrigger_12rhl_941", xs = "_groupingPrefix_12rhl_947", As = "_groupingPath_12rhl_952", Ns = "_groupingSeparator_12rhl_956", Ts = "_groupHeader_12rhl_973", Rs = "_spanCell_12rhl_1016", Os = "_groupFolded_12rhl_1097", Es = "_spanValue_12rhl_1101", Ms = "_groupLabel_12rhl_1102", Ls = "_spanText_12rhl_1115", Fs = "_groupValue_12rhl_1116", Ds = "_groupCount_12rhl_1123", Bs = "_continued_12rhl_1137", Vs = "_spanSelect_12rhl_1168", Ps = "_treeCell_12rhl_1184", Is = "_treeText_12rhl_1192", $s = "_foldSlot_12rhl_1196", zs = "_treeRow_12rhl_1206", Ks = "_branchRow_12rhl_1210", Gs = "_detailCell_12rhl_1222", js = "_pathRow_12rhl_1228", Hs = "_fold_12rhl_1196", Ws = "_foldClosed_12rhl_1269", qs = "_foldedCount_12rhl_1279", Ys = "_shareHost_12rhl_1287", Us = "_shareBar_12rhl_1294", Js = "_expander_12rhl_1306", Xs = "_expanderOpen_12rhl_1341", Qs = "_detailRow_12rhl_1345", Zs = "_treeDetail_12rhl_1354", ei = "_treeDetailRail_12rhl_1359", ti = "_actionsCell_12rhl_1374", ni = "_actions_12rhl_1374", oi = "_decision_12rhl_1393", ri = "_reserve_12rhl_1412", si = "_grip_12rhl_1422", ii = "_virtualBody_12rhl_1463", li = "_virtualRow_12rhl_1479", ai = "_fillerRow_12rhl_1503", ci = "_grid_12rhl_1516", di = "_editing_12rhl_1532", ui = "_editingValue_12rhl_1536", fi = "_editor_12rhl_1542", hi = "_editorField_12rhl_1555", gi = "_draftButtons_12rhl_1587", pi = "_held_12rhl_1595", mi = "_deleteAsk_12rhl_1599", wi = "_newRowBar_12rhl_1606", bi = "_draftMessage_12rhl_1613", vi = "_editorMessage_12rhl_1638", yi = "_control_12rhl_287", _i = "_empty_12rhl_481", ki = "_toned_12rhl_1399", h = {
543
+ const dr = "_frame_r82ej_11 _text_18806_22", ur = "_children_r82ej_24", fr = "_scroll_r82ej_33 _scroll_18806_96", hr = "_footerTarget_r82ej_62", gr = "_table_r82ej_74", pr = "_th_r82ej_86 _ring_18806_125", mr = "_sticky_r82ej_106", wr = "_td_r82ej_126", br = "_rowHeader_r82ej_140", vr = "_compact_r82ej_161 _dense_18806_38", yr = "_numeric_r82ej_192", _r = "_value_r82ej_212", kr = "_valueText_r82ej_222", Sr = "_sized_r82ej_226", Cr = "_cutTip_r82ej_243 _text_18806_22", xr = "_absent_r82ej_285", Ar = "_striped_r82ej_289", Nr = "_pinned_r82ej_314", jr = "_pinStartEdge_r82ej_330", Tr = "_pinEndEdge_r82ej_331", Rr = "_sortButton_r82ej_361 _ring_18806_125", Or = "_sortIndicator_r82ej_386", Er = "_sortArrow_r82ej_393", Mr = "_sortArrowDesc_r82ej_397", Lr = "_sortActive_r82ej_405", Fr = "_sortRank_r82ej_411", Dr = "_thFlex_r82ej_419", Br = "_headLine_r82ej_439", Vr = "_headLabel_r82ej_462", Pr = "_footerKind_r82ej_478", Ir = "_emptyCell_r82ej_496", $r = "_emptyTitle_r82ej_518", zr = "_skeleton_r82ej_527", Kr = "_toolbar_r82ej_559 _text_18806_22", Gr = "_toolbarGroup_r82ej_575", Hr = "_toolbarGroupIdle_r82ej_591", Wr = "_searchGrow_r82ej_598", qr = "_toolbarMd_r82ej_608", Yr = "_toolbarInfo_r82ej_612", Ur = "_pagination_r82ej_618 _text_18806_22", Jr = "_paginationControls_r82ej_631", Xr = "_pageSize_r82ej_638", Qr = "_pageSteps_r82ej_646", Zr = "_paginationStatus_r82ej_652", es = "_filterButton_r82ej_661 _ring_18806_125", ts = "_filterActive_r82ej_688", ns = "_filterPanel_r82ej_693", os = "_filterContent_r82ej_707 _scroll_18806_96", rs = "_filterFooter_r82ej_718", ss = "_filterLabel_r82ej_732", is = "_filterValue_r82ej_742", ls = "_filteredCount_r82ej_748", as = "_rangeFields_r82ej_759", cs = "_rangePeriod_r82ej_769", ds = "_conditions_r82ej_775", us = "_conditionButton_r82ej_781", fs = "_condition_r82ej_775", hs = "_columnsPanel_r82ej_806", gs = "_columnsList_r82ej_815", ps = "_columnsEntry_r82ej_824", ms = "_move_r82ej_836", ws = "_pinOn_r82ej_874", bs = "_groupingChoice_r82ej_884", vs = "_groupingHeading_r82ej_892", ys = "_groupingOptions_r82ej_901", _s = "_groupingOption_r82ej_901 _ring_18806_125", ks = "_groupingLevel_r82ej_944", Ss = "_groupingTag_r82ej_949", Cs = "_groupingTrigger_r82ej_956", xs = "_groupingPrefix_r82ej_962", As = "_groupingPath_r82ej_967", Ns = "_groupingSeparator_r82ej_971", js = "_groupHeader_r82ej_988", Ts = "_spanCell_r82ej_1031", Rs = "_groupFolded_r82ej_1112", Os = "_spanValue_r82ej_1116", Es = "_groupLabel_r82ej_1117", Ms = "_spanText_r82ej_1130", Ls = "_groupValue_r82ej_1131", Fs = "_groupCount_r82ej_1138", Ds = "_continued_r82ej_1152", Bs = "_spanSelect_r82ej_1183", Vs = "_treeCell_r82ej_1199", Ps = "_treeText_r82ej_1207", Is = "_foldSlot_r82ej_1211", $s = "_treeRow_r82ej_1221", zs = "_branchRow_r82ej_1225", Ks = "_detailCell_r82ej_1237", Gs = "_pathRow_r82ej_1243", Hs = "_fold_r82ej_1211", Ws = "_foldClosed_r82ej_1284", qs = "_foldedCount_r82ej_1294", Ys = "_shareHost_r82ej_1302", Us = "_shareBar_r82ej_1309", Js = "_expander_r82ej_1321", Xs = "_expanderOpen_r82ej_1356", Qs = "_detailRow_r82ej_1360", Zs = "_treeDetail_r82ej_1369", ei = "_treeDetailRail_r82ej_1374", ti = "_actionsCell_r82ej_1389", ni = "_actions_r82ej_1389", oi = "_decision_r82ej_1408", ri = "_reserve_r82ej_1427", si = "_grip_r82ej_1437", ii = "_virtualBody_r82ej_1478", li = "_virtualRow_r82ej_1494", ai = "_fillerRow_r82ej_1518", ci = "_grid_r82ej_1531", di = "_editing_r82ej_1547", ui = "_editingValue_r82ej_1551", fi = "_editor_r82ej_1557", hi = "_editorField_r82ej_1570", gi = "_draftButtons_r82ej_1602", pi = "_held_r82ej_1610", mi = "_deleteAsk_r82ej_1614", wi = "_newRowBar_r82ej_1621", bi = "_draftMessage_r82ej_1628", vi = "_editorMessage_r82ej_1653", yi = "_control_r82ej_302", _i = "_empty_r82ej_496", ki = "_toned_r82ej_1414", h = {
544
544
  frame: dr,
545
545
  children: ur,
546
546
  scroll: fr,
@@ -559,23 +559,23 @@ const dr = "_frame_12rhl_11 _text_18806_22", ur = "_children_12rhl_24", fr = "_s
559
559
  absent: xr,
560
560
  striped: Ar,
561
561
  pinned: Nr,
562
- pinStartEdge: Tr,
563
- pinEndEdge: Rr,
564
- sortButton: Or,
565
- sortIndicator: Er,
566
- sortArrow: Mr,
567
- sortArrowDesc: Lr,
568
- sortActive: Fr,
569
- sortRank: Dr,
570
- thFlex: Br,
571
- headLine: Vr,
572
- headLabel: Pr,
573
- footerKind: Ir,
574
- emptyCell: $r,
575
- emptyTitle: zr,
576
- skeleton: Kr,
577
- toolbar: Gr,
578
- toolbarGroup: jr,
562
+ pinStartEdge: jr,
563
+ pinEndEdge: Tr,
564
+ sortButton: Rr,
565
+ sortIndicator: Or,
566
+ sortArrow: Er,
567
+ sortArrowDesc: Mr,
568
+ sortActive: Lr,
569
+ sortRank: Fr,
570
+ thFlex: Dr,
571
+ headLine: Br,
572
+ headLabel: Vr,
573
+ footerKind: Pr,
574
+ emptyCell: Ir,
575
+ emptyTitle: $r,
576
+ skeleton: zr,
577
+ toolbar: Kr,
578
+ toolbarGroup: Gr,
579
579
  toolbarGroupIdle: Hr,
580
580
  searchGrow: Wr,
581
581
  toolbarMd: qr,
@@ -613,23 +613,23 @@ const dr = "_frame_12rhl_11 _text_18806_22", ur = "_children_12rhl_24", fr = "_s
613
613
  groupingPrefix: xs,
614
614
  groupingPath: As,
615
615
  groupingSeparator: Ns,
616
- groupHeader: Ts,
617
- spanCell: Rs,
618
- groupFolded: Os,
619
- spanValue: Es,
620
- groupLabel: Ms,
621
- spanText: Ls,
622
- groupValue: Fs,
623
- groupCount: Ds,
624
- continued: Bs,
625
- spanSelect: Vs,
626
- treeCell: Ps,
627
- treeText: Is,
628
- foldSlot: $s,
629
- treeRow: zs,
630
- branchRow: Ks,
631
- detailCell: Gs,
632
- pathRow: js,
616
+ groupHeader: js,
617
+ spanCell: Ts,
618
+ groupFolded: Rs,
619
+ spanValue: Os,
620
+ groupLabel: Es,
621
+ spanText: Ms,
622
+ groupValue: Ls,
623
+ groupCount: Fs,
624
+ continued: Ds,
625
+ spanSelect: Bs,
626
+ treeCell: Vs,
627
+ treeText: Ps,
628
+ foldSlot: Is,
629
+ treeRow: $s,
630
+ branchRow: zs,
631
+ detailCell: Ks,
632
+ pathRow: Gs,
633
633
  fold: Hs,
634
634
  foldClosed: Ws,
635
635
  foldedCount: qs,
@@ -663,18 +663,18 @@ const dr = "_frame_12rhl_11 _text_18806_22", ur = "_children_12rhl_24", fr = "_s
663
663
  empty: _i,
664
664
  toned: ki
665
665
  };
666
- function Pa(e) {
666
+ function Va(e) {
667
667
  return e;
668
668
  }
669
669
  const qe = /* @__PURE__ */ new WeakMap();
670
- function Gn(e, t) {
670
+ function Kn(e, t) {
671
671
  return qe.set(e, t), e;
672
672
  }
673
673
  const Si = (e) => qe.has(e);
674
- function Ee(e) {
675
- return e === "list" ? Ni : e === "range" ? Di : typeof e == "object" && e !== null ? e : void 0;
674
+ function Oe(e) {
675
+ return e === "list" ? Ni : e === "range" ? Fi : typeof e == "object" && e !== null ? e : void 0;
676
676
  }
677
- function jn(e, t) {
677
+ function Gn(e, t) {
678
678
  if (t == null) return "empty";
679
679
  const n = qe.get(e);
680
680
  return n ? n.isCondition(t) ? n.isEmpty(t) ? "empty" : "effective" : "foreign" : "effective";
@@ -709,7 +709,7 @@ function Nt(e) {
709
709
  let t = cn.get(e);
710
710
  return t || (t = new Set(e.map(Ce)), cn.set(e, t)), t;
711
711
  }
712
- const Tt = (e, t) => se(e) ? t.wording.cellAbsentValue : Ve(e, t.format, t.formats, t.wording) ?? String(e);
712
+ const jt = (e, t) => se(e) ? t.wording.cellAbsentValue : Be(e, t.format, t.formats, t.wording) ?? String(e);
713
713
  function Ai({
714
714
  condition: e,
715
715
  setCondition: t,
@@ -718,9 +718,9 @@ function Ai({
718
718
  format: r
719
719
  }) {
720
720
  const s = ke(), i = ie(), l = H(() => e ?? [], [e]), c = H(() => {
721
- const d = { formats: s, wording: i, format: r }, b = n.map((g) => ({ key: Ce(g), text: Tt(g, d), value: g }));
721
+ const d = { formats: s, wording: i, format: r }, b = n.map((g) => ({ key: Ce(g), text: jt(g, d), value: g }));
722
722
  b.sort(Hn(s));
723
- const p = new Set(b.map((g) => g.key)), m = l.filter((g) => !se(g) && !p.has(Ce(g))).map((g) => ({ key: Ce(g), text: Tt(g, d), value: g })), w = o || l.some(se) ? [{ key: $t, text: i.cellAbsentValue, value: null }] : [];
723
+ const p = new Set(b.map((g) => g.key)), m = l.filter((g) => !se(g) && !p.has(Ce(g))).map((g) => ({ key: Ce(g), text: jt(g, d), value: g })), w = o || l.some(se) ? [{ key: It, text: i.cellAbsentValue, value: null }] : [];
724
724
  return [...b, ...m, ...w];
725
725
  }, [n, l, o, r, s, i]), a = Nt(l), u = (d) => {
726
726
  const b = a.has(d.key) ? l.filter((p) => Ce(p) !== d.key) : [...l, d.value];
@@ -736,7 +736,7 @@ function Ai({
736
736
  d.key
737
737
  )) });
738
738
  }
739
- const Ni = /* @__PURE__ */ Gn(
739
+ const Ni = /* @__PURE__ */ Kn(
740
740
  {
741
741
  matches: (e, t) => Nt(t).has(Ce(e)),
742
742
  Input: Ai,
@@ -745,19 +745,19 @@ const Ni = /* @__PURE__ */ Gn(
745
745
  {
746
746
  isCondition: (e) => Array.isArray(e),
747
747
  isEmpty: (e) => e.length === 0,
748
- absentMatches: (e) => Nt(e).has($t),
748
+ absentMatches: (e) => Nt(e).has(It),
749
749
  /* From three values on the first two and how many more: a condition is one
750
750
  line in the table toolbar, not a list. */
751
751
  describeIn: (e, t) => {
752
- const n = e.map((r) => Tt(r, t));
752
+ const n = e.map((r) => jt(r, t));
753
753
  if (n.length <= 2) return n.join(", ");
754
754
  const o = n.length - 2;
755
755
  return `${n.slice(0, 2).join(", ")} ${t.wording.moreValues(o, t.formats.count(o))}`;
756
756
  }
757
757
  }
758
- ), Ti = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), Ri = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + 1).getTime(), Be = (e) => typeof e == "number" && Number.isFinite(e), ye = (e) => e instanceof Date && !Number.isNaN(e.getTime()), Oi = (e) => ye(e) ? Ti(e) : Be(e) ? e : void 0, Ei = (e) => ye(e) ? { value: Ri(e), open: !0 } : Be(e) ? { value: e, open: !1 } : void 0, Qe = (e, t) => ye(e) ? t.formats.date(e) : Ve(e, t.format, t.formats, t.wording) ?? String(e);
759
- function Mi({ condition: e, setCondition: t }) {
760
- const n = ie(), [o, r] = I(null), s = o !== null, i = o ? o.from : Be(e?.from) ? e.from : null, l = o ? o.to : Be(e?.to) ? e.to : null, c = (a, u) => {
758
+ ), ji = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), Ti = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + 1).getTime(), De = (e) => typeof e == "number" && Number.isFinite(e), ye = (e) => e instanceof Date && !Number.isNaN(e.getTime()), Ri = (e) => ye(e) ? ji(e) : De(e) ? e : void 0, Oi = (e) => ye(e) ? { value: Ti(e), open: !0 } : De(e) ? { value: e, open: !1 } : void 0, Qe = (e, t) => ye(e) ? t.formats.date(e) : Be(e, t.format, t.formats, t.wording) ?? String(e);
759
+ function Ei({ condition: e, setCondition: t }) {
760
+ const n = ie(), [o, r] = P(null), s = o !== null, i = o ? o.from : De(e?.from) ? e.from : null, l = o ? o.to : De(e?.to) ? e.to : null, c = (a, u) => {
761
761
  const d = { from: i, to: l, [a]: u };
762
762
  if (d.from !== null && d.to !== null && d.from > d.to) {
763
763
  r(d);
@@ -772,15 +772,15 @@ function Mi({ condition: e, setCondition: t }) {
772
772
  ...d.to !== null ? { to: d.to } : {}
773
773
  });
774
774
  };
775
- return /* @__PURE__ */ T("div", { className: h.rangeFields, children: [
775
+ return /* @__PURE__ */ j("div", { className: h.rangeFields, children: [
776
776
  /* @__PURE__ */ f(vt, { label: n.filterFrom, children: /* @__PURE__ */ f(yt, { size: "sm", value: i, invalid: s, onChange: (a) => c("from", a) }) }),
777
777
  /* @__PURE__ */ f(vt, { label: n.filterTo, error: s ? n.rangeInvalid : void 0, children: /* @__PURE__ */ f(yt, { size: "sm", value: l, onChange: (a) => c("to", a) }) })
778
778
  ] });
779
779
  }
780
- function Li({ condition: e, setCondition: t }) {
780
+ function Mi({ condition: e, setCondition: t }) {
781
781
  const n = ye(e?.from) && ye(e?.to) ? { from: e.from, to: e.to } : null;
782
782
  return /* @__PURE__ */ f("div", { className: h.rangePeriod, children: /* @__PURE__ */ f(
783
- Oo,
783
+ Ro,
784
784
  {
785
785
  size: "sm",
786
786
  clearable: !0,
@@ -789,23 +789,23 @@ function Li({ condition: e, setCondition: t }) {
789
789
  }
790
790
  ) });
791
791
  }
792
- function Fi(e) {
793
- return e.kind === "date" ? /* @__PURE__ */ f(Li, { ...e }) : /* @__PURE__ */ f(Mi, { ...e });
792
+ function Li(e) {
793
+ return e.kind === "date" ? /* @__PURE__ */ f(Mi, { ...e }) : /* @__PURE__ */ f(Ei, { ...e });
794
794
  }
795
- const Di = /* @__PURE__ */ Gn(
795
+ const Fi = /* @__PURE__ */ Kn(
796
796
  {
797
797
  matches: (e, t) => {
798
- const n = ye(e) ? e.getTime() : Be(e) ? e : void 0;
798
+ const n = ye(e) ? e.getTime() : De(e) ? e : void 0;
799
799
  if (n === void 0) return !1;
800
- const o = Oi(t.from), r = Ei(t.to);
800
+ const o = Ri(t.from), r = Oi(t.to);
801
801
  return !(o !== void 0 && n < o || r !== void 0 && (r.open ? n >= r.value : n > r.value));
802
802
  },
803
- Input: Fi,
803
+ Input: Li,
804
804
  describe: (e) => [e.from, e.to].map((t) => t === void 0 ? "" : String(t)).join("–")
805
805
  },
806
806
  {
807
807
  isCondition: (e) => typeof e != "object" || e === null || Array.isArray(e) || e instanceof Date ? !1 : Object.entries(e).every(
808
- ([n, o]) => (n === "from" || n === "to") && (o === void 0 || Be(o) || ye(o))
808
+ ([n, o]) => (n === "from" || n === "to") && (o === void 0 || De(o) || ye(o))
809
809
  ),
810
810
  isEmpty: (e) => e.from === void 0 && e.to === void 0,
811
811
  absentMatches: () => !1,
@@ -875,13 +875,13 @@ const dn = (e) => JSON.stringify([
875
875
  /* Whether a column edits, and how - not its editor or its check, which
876
876
  are new functions on every render and are read when an edit starts. */
877
877
  typeof e.edit == "function" ? "ƒ" : e.edit
878
- ]), Bi = (e, t) => e?.[t], un = (e, t) => {
878
+ ]), Di = (e, t) => e?.[t], un = (e, t) => {
879
879
  const n = {
880
880
  key: e,
881
881
  spec: t,
882
882
  read: (o) => {
883
883
  const r = n.spec.value;
884
- return typeof r == "string" ? Bi(o, r) : r(o);
884
+ return typeof r == "string" ? Di(o, r) : r(o);
885
885
  }
886
886
  };
887
887
  return n;
@@ -896,7 +896,7 @@ function fn(e, t) {
896
896
  const n = ot(e.value, t.value) ? e.value : t.value, o = ot(e.ownSortValue, t.ownSortValue) ? e.ownSortValue : t.ownSortValue, r = ot(e.ownGroupValue, t.ownGroupValue) ? e.ownGroupValue : t.ownGroupValue;
897
897
  return n === t.value && o === t.ownSortValue && r === t.ownGroupValue ? t : { ...t, value: n, ownSortValue: o, ownGroupValue: r };
898
898
  }
899
- class Vi {
899
+ class Bi {
900
900
  columns = new wt("data-umriss-column");
901
901
  actions = new wt("data-umriss-action");
902
902
  /** The group keys: values to group by that are no column. */
@@ -1081,7 +1081,7 @@ class Vi {
1081
1081
  each once. */
1082
1082
  effectiveGrouping(t, n) {
1083
1083
  const o = new Set(this.groupingEntries(n).map((r) => r.spec.id));
1084
- return [...new Set(t)].filter((r) => o.has(r)).slice(0, Kt);
1084
+ return [...new Set(t)].filter((r) => o.has(r)).slice(0, zt);
1085
1085
  }
1086
1086
  groupingCache = null;
1087
1087
  /** The levels and aggregates for the model - the same identity as long as
@@ -1124,7 +1124,7 @@ class Vi {
1124
1124
  kindOf(t, n) {
1125
1125
  const o = this.kinds.get(t.key);
1126
1126
  if (o && o.rows === n && o.value === t.spec.value) return o.kind;
1127
- const r = Mn(n, t.read);
1127
+ const r = En(n, t.read);
1128
1128
  return this.kinds.set(t.key, { rows: n, value: t.spec.value, kind: r }), r;
1129
1129
  }
1130
1130
  /** Can it be sorted by this column? Without a statement: when its value is
@@ -1189,7 +1189,7 @@ class Vi {
1189
1189
  grouping: this.groupingFor(t),
1190
1190
  server: o.server,
1191
1191
  tree: t.tree
1192
- }, s = zn(t.admitted, n, r), i = o.virtual ? Kn(s, o.virtual.from, o.virtual.to) : s;
1192
+ }, s = $n(t.admitted, n, r), i = o.virtual ? zn(s, o.virtual.from, o.virtual.to) : s;
1193
1193
  return this.projectionCache = { hook: t, columns: n, projection: i }, i;
1194
1194
  }
1195
1195
  /* --- The hook's snapshot ---------------------------------------------------------- */
@@ -1237,7 +1237,7 @@ class Vi {
1237
1237
  /** Whether the table puts up a table toolbar of its own - also while it is
1238
1238
  grouped: the tag that names and removes the grouping needs a place. */
1239
1239
  needsOwnToolbar() {
1240
- return this.count("toolbar") > 0 ? !1 : this.count("search") > 0 || this.orderedColumns().some((t) => Ee(t.spec.filter) !== void 0) || (this.hook?.rowFilters.size ?? 0) > 0 || (this.hook?.publicSnapshot.grouping.length ?? 0) > 0;
1240
+ return this.count("toolbar") > 0 ? !1 : this.count("search") > 0 || this.orderedColumns().some((t) => Oe(t.spec.filter) !== void 0) || (this.hook?.rowFilters.size ?? 0) > 0 || (this.hook?.publicSnapshot.grouping.length ?? 0) > 0;
1241
1241
  }
1242
1242
  /* --- Row detail ------------------------------------------------------------------- */
1243
1243
  registerDetail(t, n) {
@@ -1277,20 +1277,20 @@ class Vi {
1277
1277
  this.actions.entries.delete(t) && this.structure++;
1278
1278
  }
1279
1279
  }
1280
- const Wn = /* @__PURE__ */ new WeakMap(), Pi = (e, t) => {
1280
+ const Wn = /* @__PURE__ */ new WeakMap(), Vi = (e, t) => {
1281
1281
  Wn.set(e, t);
1282
- }, Ii = (e) => typeof e == "function" || typeof e == "object" && e !== null ? Wn.get(e) : void 0, D = (...e) => e.filter(Boolean).join(" "), qn = { separator: ",", decimal: ".", yes: "yes", no: "no" }, $i = `\r
1283
- `, zi = "\uFEFF", Yn = (e, t) => typeof e == "number" ? String(e).replace(".", t.decimal) : typeof e == "boolean" ? e ? t.yes : t.no : e, Un = (e, t) => e.includes(t) || /["\r\n]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e, Ki = (e, t, n) => {
1282
+ }, Pi = (e) => typeof e == "function" || typeof e == "object" && e !== null ? Wn.get(e) : void 0, F = (...e) => e.filter(Boolean).join(" "), qn = { separator: ",", decimal: ".", yes: "yes", no: "no" }, Ii = `\r
1283
+ `, $i = "\uFEFF", Yn = (e, t) => typeof e == "number" ? String(e).replace(".", t.decimal) : typeof e == "boolean" ? e ? t.yes : t.no : e, Un = (e, t) => e.includes(t) || /["\r\n]/.test(e) ? `"${e.replace(/"/g, '""')}"` : e, zi = (e, t, n) => {
1284
1284
  const o = t.value?.(e);
1285
1285
  return o == null ? "" : Un(Yn(o, n), n.separator);
1286
1286
  }, Jn = (e, t, n) => [
1287
1287
  t.map((o) => Un(o.label ?? o.id, n.separator)).join(n.separator),
1288
- ...e.map((o) => t.map((r) => Ki(o, r, n)).join(n.separator))
1288
+ ...e.map((o) => t.map((r) => zi(o, r, n)).join(n.separator))
1289
1289
  ];
1290
1290
  function hn(e, t, n = qn) {
1291
- return zi + Jn(e, t, n).join($i);
1291
+ return $i + Jn(e, t, n).join(Ii);
1292
1292
  }
1293
- function Gi(e, t, n = qn) {
1293
+ function Ki(e, t, n = qn) {
1294
1294
  return Jn(e, t, { ...n, separator: " " }).join(`
1295
1295
  `);
1296
1296
  }
@@ -1302,8 +1302,8 @@ function Qn(e) {
1302
1302
  e.setSearch("");
1303
1303
  for (const t of Object.keys(e.filter)) e.setFilter(t, null);
1304
1304
  }
1305
- function jt(e, t) {
1306
- const { decimal: n } = Eo(e);
1305
+ function Gt(e, t) {
1306
+ const { decimal: n } = Oo(e);
1307
1307
  return {
1308
1308
  separator: n === "," ? ";" : ",",
1309
1309
  decimal: n,
@@ -1316,14 +1316,14 @@ function Zn(e, t) {
1316
1316
  (n) => ({
1317
1317
  id: n.spec.id,
1318
1318
  label: n.spec.label,
1319
- value: (o) => It(n.read(o), n.spec.ownExportValue)
1319
+ value: (o) => Pt(n.read(o), n.spec.ownExportValue)
1320
1320
  })
1321
1321
  );
1322
1322
  }
1323
- function ji(e, t, n, o) {
1323
+ function Gi(e, t, n, o) {
1324
1324
  const r = e.hook;
1325
1325
  if (!r) return "";
1326
- const s = Zn(e, r.rows), i = jt(n, o), { exported: l, filtered: c } = e.projection();
1326
+ const s = Zn(e, r.rows), i = Gt(n, o), { exported: l, filtered: c } = e.projection();
1327
1327
  if (!l) return hn(c, s, i);
1328
1328
  const a = new Map(l.map((d) => [d.node, d.level + 1])), u = { id: "#level", label: t, value: (d) => a.get(d) };
1329
1329
  return hn(l.map((d) => d.node), [u, ...s], i);
@@ -1336,14 +1336,14 @@ function eo(e) {
1336
1336
  }
1337
1337
  function to(e, t, n) {
1338
1338
  const o = e.hook, r = eo(e);
1339
- return !o || r.length === 0 ? "" : Gi(r, Zn(e, o.rows), jt(t, n));
1339
+ return !o || r.length === 0 ? "" : Ki(r, Zn(e, o.rows), Gt(t, n));
1340
1340
  }
1341
1341
  function Hi(e, t, n, o) {
1342
1342
  return no(e, e.read(t), n, o);
1343
1343
  }
1344
1344
  function no(e, t, n, o) {
1345
- const r = It(t, e.spec.ownExportValue);
1346
- return r === void 0 ? "" : Yn(r, jt(n, o));
1345
+ const r = Pt(t, e.spec.ownExportValue);
1346
+ return r === void 0 ? "" : Yn(r, Gt(n, o));
1347
1347
  }
1348
1348
  function oo({
1349
1349
  entry: e,
@@ -1359,7 +1359,7 @@ function oo({
1359
1359
  const a = ie(), u = ke(), { id: d, label: b, format: p } = e.spec, { filterOptions: m } = n, w = m?.(d), { values: g, absent: v } = H(
1360
1360
  () => w ? At(w, (A) => A, u) : At(n.admitted, e.read, u),
1361
1361
  [w, n.admitted, e, u]
1362
- ), x = Ee(e.spec.filter);
1362
+ ), x = Oe(e.spec.filter);
1363
1363
  if (n.publicSnapshot.server && !w && e.spec.filter === "list" && X(
1364
1364
  `server-filter-options:${d}`,
1365
1365
  `The list filter of "${d}" offers only the values of the page in server mode; \`filterOptions\` gives it the server's.`
@@ -1367,7 +1367,7 @@ function oo({
1367
1367
  const y = n.publicSnapshot, _ = x.Input, S = Si(x) ? { absentOccurs: v, format: p, kind: t.kindOf(e, n.rows) } : {}, C = () => {
1368
1368
  l(!1), (s ?? o).current?.focus();
1369
1369
  };
1370
- return /* @__PURE__ */ T(
1370
+ return /* @__PURE__ */ j(
1371
1371
  it,
1372
1372
  {
1373
1373
  open: i,
@@ -1389,7 +1389,7 @@ function oo({
1389
1389
  ...S
1390
1390
  }
1391
1391
  ),
1392
- /* @__PURE__ */ T("div", { className: h.filterFooter, children: [
1392
+ /* @__PURE__ */ j("div", { className: h.filterFooter, children: [
1393
1393
  /* @__PURE__ */ f(Q, { size: "sm", variant: "ghost", onClick: () => y.setFilter(d, null), children: a.filterReset }),
1394
1394
  /* @__PURE__ */ f(Q, { size: "sm", onClick: C, children: a.filterDone })
1395
1395
  ] })
@@ -1402,13 +1402,13 @@ function Wi({
1402
1402
  registry: t,
1403
1403
  hook: n
1404
1404
  }) {
1405
- const o = ie(), [r, s] = I(!1), i = q(null), l = be(), { id: c, label: a } = e.spec, u = c in n.publicSnapshot.filter;
1406
- return /* @__PURE__ */ T(re, { children: [
1405
+ const o = ie(), [r, s] = P(!1), i = q(null), l = be(), { id: c, label: a } = e.spec, u = c in n.publicSnapshot.filter;
1406
+ return /* @__PURE__ */ j(re, { children: [
1407
1407
  /* @__PURE__ */ f(tt, { content: o.filterHint, children: /* @__PURE__ */ f(
1408
1408
  "button",
1409
1409
  {
1410
1410
  type: "button",
1411
- className: D(h.filterButton, u && h.filterActive),
1411
+ className: F(h.filterButton, u && h.filterActive),
1412
1412
  "aria-label": o.filterColumn(a),
1413
1413
  "aria-haspopup": "dialog",
1414
1414
  "aria-expanded": r,
@@ -1448,14 +1448,14 @@ function qi({ registry: e, hook: t }) {
1448
1448
  const n = ie(), o = ke(), r = Object.entries(t.publicSnapshot.filter).flatMap(([s, i]) => {
1449
1449
  const l = t.rowFilters.get(s);
1450
1450
  if (l) return l.describe ? [{ id: s, rowFilter: l, text: l.describe(i) }] : [];
1451
- const c = e.columnById(s), a = c ? Ee(c.spec.filter) : void 0;
1451
+ const c = e.columnById(s), a = c ? Oe(c.spec.filter) : void 0;
1452
1452
  if (!c || !a) return [];
1453
1453
  const u = { formats: o, wording: n, format: c.spec.format, kind: e.kindOf(c, t.rows) };
1454
1454
  return [{ id: s, entry: c, text: xi(a, i, u) }];
1455
1455
  });
1456
1456
  return r.length === 0 ? null : /* @__PURE__ */ f(An, { "aria-label": n.conditions, className: h.conditions, children: r.map(
1457
- (s) => "rowFilter" in s ? /* @__PURE__ */ T(
1458
- Vt,
1457
+ (s) => "rowFilter" in s ? /* @__PURE__ */ j(
1458
+ Bt,
1459
1459
  {
1460
1460
  className: h.condition,
1461
1461
  onRemove: () => t.publicSnapshot.setFilter(s.id, null),
@@ -1475,16 +1475,16 @@ function Yi({
1475
1475
  registry: n,
1476
1476
  hook: o
1477
1477
  }) {
1478
- const r = ie(), [s, i] = I(!1), l = q(null), c = q(null), a = be(), { id: u, label: d } = e.spec;
1479
- return /* @__PURE__ */ T(re, { children: [
1478
+ const r = ie(), [s, i] = P(!1), l = q(null), c = q(null), a = be(), { id: u, label: d } = e.spec;
1479
+ return /* @__PURE__ */ j(re, { children: [
1480
1480
  /* @__PURE__ */ f(
1481
- Vt,
1481
+ Bt,
1482
1482
  {
1483
1483
  ref: l,
1484
1484
  className: h.condition,
1485
1485
  onRemove: () => o.publicSnapshot.setFilter(u, null),
1486
1486
  removeLabel: r.removeConditionNamed(d, t),
1487
- children: /* @__PURE__ */ T(
1487
+ children: /* @__PURE__ */ j(
1488
1488
  "button",
1489
1489
  {
1490
1490
  ref: c,
@@ -1524,18 +1524,18 @@ function Ji({ registry: e, hook: t }) {
1524
1524
  const n = ie(), o = e.groupingEntries(t.rows);
1525
1525
  if (o.length === 0) return null;
1526
1526
  const { grouping: r, setGrouping: s } = t.publicSnapshot;
1527
- return /* @__PURE__ */ T("section", { className: h.groupingChoice, "aria-label": n.grouping, children: [
1527
+ return /* @__PURE__ */ j("section", { className: h.groupingChoice, "aria-label": n.grouping, children: [
1528
1528
  /* @__PURE__ */ f("h3", { className: h.groupingHeading, children: n.grouping }),
1529
1529
  /* @__PURE__ */ f("div", { className: h.groupingOptions, children: o.map((i) => {
1530
1530
  const { id: l, label: c } = i.spec, a = r.indexOf(l), u = a !== -1;
1531
- return /* @__PURE__ */ T(
1531
+ return /* @__PURE__ */ j(
1532
1532
  "button",
1533
1533
  {
1534
1534
  type: "button",
1535
1535
  className: h.groupingOption,
1536
1536
  "aria-label": n.groupBy(c),
1537
1537
  "aria-pressed": u,
1538
- disabled: !u && r.length >= Kt,
1538
+ disabled: !u && r.length >= zt,
1539
1539
  onClick: () => s(u ? r.filter((d) => d !== l) : [...r, l]),
1540
1540
  children: [
1541
1541
  u && /* @__PURE__ */ f("span", { className: h.groupingLevel, "aria-hidden": "true", children: a + 1 }),
@@ -1551,7 +1551,7 @@ function Xi({ registry: e, hook: t }) {
1551
1551
  const n = ie();
1552
1552
  if (!e.tree) return null;
1553
1553
  const o = t.publicSnapshot;
1554
- return /* @__PURE__ */ T("div", { className: D(h.groupingChoice, h.groupingOptions), children: [
1554
+ return /* @__PURE__ */ j("div", { className: F(h.groupingChoice, h.groupingOptions), children: [
1555
1555
  /* @__PURE__ */ f("button", { type: "button", className: h.groupingOption, onClick: o.unfoldAllBranches, children: n.unfoldAll }),
1556
1556
  /* @__PURE__ */ f("button", { type: "button", className: h.groupingOption, onClick: o.foldAllBranches, children: n.foldAll })
1557
1557
  ] });
@@ -1563,19 +1563,19 @@ function Qi({ registry: e, hook: t }) {
1563
1563
  return (
1564
1564
  /* In a tag group, as the conditions stand: the tag is one stop, its button
1565
1565
  the thing one tabs to, and the ring stands on the tag. */
1566
- /* @__PURE__ */ f(An, { "aria-label": n.groupedBy, className: h.groupingTag, children: /* @__PURE__ */ f(Vt, { onRemove: () => o.setGrouping([]), removeLabel: n.removeGrouping, children: /* @__PURE__ */ T(
1566
+ /* @__PURE__ */ f(An, { "aria-label": n.groupedBy, className: h.groupingTag, children: /* @__PURE__ */ f(Bt, { onRemove: () => o.setGrouping([]), removeLabel: n.removeGrouping, children: /* @__PURE__ */ j(
1567
1567
  Nn,
1568
1568
  {
1569
- trigger: /* @__PURE__ */ T("button", { type: "button", className: D(h.conditionButton, h.groupingTrigger), children: [
1569
+ trigger: /* @__PURE__ */ j("button", { type: "button", className: F(h.conditionButton, h.groupingTrigger), children: [
1570
1570
  /* @__PURE__ */ f("span", { className: h.groupingPrefix, children: n.groupedBy }),
1571
- s.map((i, l) => /* @__PURE__ */ T("span", { className: h.groupingPath, children: [
1571
+ s.map((i, l) => /* @__PURE__ */ j("span", { className: h.groupingPath, children: [
1572
1572
  l > 0 && /* @__PURE__ */ f("span", { className: h.groupingSeparator, "aria-hidden": "true", children: "›" }),
1573
1573
  i
1574
1574
  ] }, r[l]))
1575
1575
  ] }),
1576
1576
  children: [
1577
1577
  r.map((i, l) => /* @__PURE__ */ f(nt, { onSelect: () => o.setGrouping(r.filter((c) => c !== i)), children: n.removeGroupingLevel(s[l]) }, i)),
1578
- /* @__PURE__ */ f(Mo, {}),
1578
+ /* @__PURE__ */ f(Eo, {}),
1579
1579
  /* @__PURE__ */ f(nt, { onSelect: o.unfoldAll, children: n.unfoldAll }),
1580
1580
  /* @__PURE__ */ f(nt, { onSelect: o.foldAll, children: n.foldAll })
1581
1581
  ]
@@ -1603,18 +1603,18 @@ function io({
1603
1603
  let c = null, a = null;
1604
1604
  if (e && l) {
1605
1605
  const u = l.publicSnapshot, d = u.search !== "" || Object.keys(u.filter).length > 0, b = o || u.selection.count === 0 ? [] : l.selectedRows ?? u.filtered.filter((w) => u.selection.isSelected(l.rowKey(w))), p = e.hasRowActions() ? e.actions.ordered().filter((w) => w.spec.bulk) : [];
1606
- c = /* @__PURE__ */ T(re, { children: [
1606
+ c = /* @__PURE__ */ j(re, { children: [
1607
1607
  /* @__PURE__ */ f(Qi, { registry: e, hook: l }),
1608
1608
  /* @__PURE__ */ f(qi, { registry: e, hook: l })
1609
1609
  ] });
1610
1610
  const m = !d && b.length === 0 && !e.rowAdding;
1611
- a = /* @__PURE__ */ T("div", { className: D(h.toolbarGroup, m && h.toolbarGroupIdle), children: [
1611
+ a = /* @__PURE__ */ j("div", { className: F(h.toolbarGroup, m && h.toolbarGroupIdle), children: [
1612
1612
  /* @__PURE__ */ f("span", { role: "status", className: h.filteredCount, children: d ? u.server ? (
1613
1613
  /* The server counts the matches only; a total beside them would be a second request. */
1614
1614
  s.entries(u.rowCount, i.count(u.rowCount))
1615
1615
  ) : s.filteredOfTotal(i.count(u.filtered.length), i.count(l.tableState.total ?? l.admitted.length)) : "" }),
1616
1616
  d && /* @__PURE__ */ f(Q, { size: r, variant: "ghost", onClick: () => Qn(u), children: s.resetAll }),
1617
- b.length > 0 && /* @__PURE__ */ T(re, { children: [
1617
+ b.length > 0 && /* @__PURE__ */ j(re, { children: [
1618
1618
  /* @__PURE__ */ f("span", { className: h.toolbarInfo, children: s.selectedCount(b.length, i.count(b.length)) }),
1619
1619
  p.map(({ key: w, spec: g }) => /* @__PURE__ */ f(
1620
1620
  Q,
@@ -1630,18 +1630,18 @@ function io({
1630
1630
  e.rowAdding && /* @__PURE__ */ f(so, { registry: e })
1631
1631
  ] });
1632
1632
  }
1633
- return /* @__PURE__ */ f(ro, { value: r, children: /* @__PURE__ */ f(Tn, { size: r, children: /* @__PURE__ */ T("div", { className: D(h.toolbar, r === "md" && h.toolbarMd, t), children: [
1634
- /* @__PURE__ */ T("div", { className: h.toolbarGroup, children: [
1633
+ return /* @__PURE__ */ f(ro, { value: r, children: /* @__PURE__ */ f(jn, { size: r, children: /* @__PURE__ */ j("div", { className: F(h.toolbar, r === "md" && h.toolbarMd, t), children: [
1634
+ /* @__PURE__ */ j("div", { className: h.toolbarGroup, children: [
1635
1635
  n,
1636
1636
  c
1637
1637
  ] }),
1638
1638
  a
1639
1639
  ] }) }) });
1640
1640
  }
1641
- const Rt = /* @__PURE__ */ rt(null), Zi = () => () => {
1641
+ const Tt = /* @__PURE__ */ rt(null), Zi = () => () => {
1642
1642
  }, gn = () => 0;
1643
1643
  function Ye(e) {
1644
- const t = _e(Rt), n = e ? Ii(e.Table) ?? null : t?.registry ?? null;
1644
+ const t = _e(Tt), n = e ? Pi(e.Table) ?? null : t?.registry ?? null;
1645
1645
  st(
1646
1646
  n ? n.subscribe : Zi,
1647
1647
  n ? n.bodyVersion : gn,
@@ -1736,16 +1736,16 @@ function co(e, t) {
1736
1736
  }
1737
1737
  return { index: 0, start: 0 };
1738
1738
  }
1739
- const je = (e, t) => e.slice(0, t).reduce((n, o) => n + o, 0);
1739
+ const Ge = (e, t) => e.slice(0, t).reduce((n, o) => n + o, 0);
1740
1740
  function il(e, t, n, o) {
1741
1741
  const r = e.length - 1, s = e[t.line];
1742
1742
  if (!s) return t;
1743
1743
  const { index: i } = co(s.cells, t.column), l = (c) => ({ line: Math.max(0, Math.min(r, c)), column: t.column });
1744
1744
  switch (n) {
1745
1745
  case "left":
1746
- return i > 0 ? { line: t.line, column: je(s.cells, i - 1) } : t;
1746
+ return i > 0 ? { line: t.line, column: Ge(s.cells, i - 1) } : t;
1747
1747
  case "right":
1748
- return i < s.cells.length - 1 ? { line: t.line, column: je(s.cells, i + 1) } : t;
1748
+ return i < s.cells.length - 1 ? { line: t.line, column: Ge(s.cells, i + 1) } : t;
1749
1749
  case "up":
1750
1750
  return l(t.line - 1);
1751
1751
  case "down":
@@ -1757,15 +1757,15 @@ function il(e, t, n, o) {
1757
1757
  case "lineStart":
1758
1758
  return { line: t.line, column: 0 };
1759
1759
  case "lineEnd":
1760
- return { line: t.line, column: je(s.cells, s.cells.length - 1) };
1760
+ return { line: t.line, column: Ge(s.cells, s.cells.length - 1) };
1761
1761
  case "first":
1762
1762
  return { line: 0, column: 0 };
1763
1763
  case "last":
1764
- return { line: r, column: je(e[r].cells, e[r].cells.length - 1) };
1764
+ return { line: r, column: Ge(e[r].cells, e[r].cells.length - 1) };
1765
1765
  }
1766
1766
  }
1767
1767
  function ll(e, t, n, o) {
1768
- const r = e.flatMap((l, c) => l.cells.map((a, u) => ({ line: c, column: je(l.cells, u) }))), s = r.findIndex((l) => l.line === t.line && l.column === co(e[t.line].cells, t.column).start);
1768
+ const r = e.flatMap((l, c) => l.cells.map((a, u) => ({ line: c, column: Ge(l.cells, u) }))), s = r.findIndex((l) => l.line === t.line && l.column === co(e[t.line].cells, t.column).start);
1769
1769
  return (n ? r.slice(0, Math.max(0, s)).reverse() : r.slice(s + 1)).find(o) ?? null;
1770
1770
  }
1771
1771
  function pn(e, t, n) {
@@ -1786,7 +1786,7 @@ class al {
1786
1786
  }
1787
1787
  }
1788
1788
  function cl() {
1789
- const [e, t] = I({ active: null, widget: !1, editing: null }), [n] = I(() => new al());
1789
+ const [e, t] = P({ active: null, widget: !1, editing: null }), [n] = P(() => new al());
1790
1790
  return { state: e, setState: t, focus: n };
1791
1791
  }
1792
1792
  const mn = (e) => e?.spec.edit !== void 0;
@@ -1795,68 +1795,68 @@ function uo(e, t) {
1795
1795
  return Object.is(n(e), n(t));
1796
1796
  }
1797
1797
  function dl(e) {
1798
- const { grid: t, lines: n, ids: o, columnById: r, rowKey: s, onCellEdit: i, rowMode: l, onRowSave: c, onRowAdd: a, newRow: u } = e, { setState: d } = t, b = n.map((k) => k.key), p = t.state.editing, m = (k) => k === he ? p?.fresh : n.find((O) => O.key === k)?.row, w = (k) => {
1799
- const O = n[k.line];
1800
- return O?.key === he ? { row: O.row } : O?.row !== void 0 && O.key === Ue(s(O.row)) ? { row: O.row } : null;
1801
- }, g = (k) => w(k) !== null && mn(r(o[k.column] ?? "")), v = () => o.map(r).filter(mn), x = (k, O, M = !1) => {
1802
- const R = n[k.line], E = r(o[k.column] ?? ""), B = l ? Object.fromEntries(v().map(($) => [$.spec.id, $.read(R.row)])) : {};
1803
- B[E.spec.id] = O === void 0 ? E.read(R.row) : O, t.focus.want(M ? "open" : "editor"), d(($) => ({
1804
- ...$,
1805
- active: { line: R.key, column: E.spec.id, lineIndex: k.line, columnIndex: k.column },
1806
- editing: { line: R.key, column: E.spec.id, row: l, drafts: B, errors: {}, refused: !1 }
1798
+ const { grid: t, lines: n, ids: o, columnById: r, rowKey: s, onCellEdit: i, rowMode: l, onRowSave: c, onRowAdd: a, newRow: u } = e, { setState: d } = t, b = n.map((k) => k.key), p = t.state.editing, m = (k) => k === he ? p?.fresh : n.find((R) => R.key === k)?.row, w = (k) => {
1799
+ const R = n[k.line];
1800
+ return R?.key === he ? { row: R.row } : R?.row !== void 0 && R.key === Ue(s(R.row)) ? { row: R.row } : null;
1801
+ }, g = (k) => w(k) !== null && mn(r(o[k.column] ?? "")), v = () => o.map(r).filter(mn), x = (k, R, E = !1) => {
1802
+ const T = n[k.line], O = r(o[k.column] ?? ""), D = l ? Object.fromEntries(v().map((I) => [I.spec.id, I.read(T.row)])) : {};
1803
+ D[O.spec.id] = R === void 0 ? O.read(T.row) : R, t.focus.want(E ? "open" : "editor"), d((I) => ({
1804
+ ...I,
1805
+ active: { line: T.key, column: O.spec.id, lineIndex: k.line, columnIndex: k.column },
1806
+ editing: { line: T.key, column: O.spec.id, row: l, drafts: D, errors: {}, refused: !1 }
1807
1807
  }));
1808
- }, y = (k = {}, O = !0) => {
1808
+ }, y = (k = {}, R = !0) => {
1809
1809
  if (!p) return !0;
1810
- const M = { ...p.drafts, ...k }, R = m(p.line);
1811
- if (R === void 0)
1812
- return d((V) => ({ ...V, editing: null })), !0;
1813
- const E = {};
1814
- for (const [V, K] of Object.entries(M)) {
1815
- const Y = r(V)?.spec.validate?.(K, R);
1816
- Y && (E[V] = Y);
1810
+ const E = { ...p.drafts, ...k }, T = m(p.line);
1811
+ if (T === void 0)
1812
+ return d((B) => ({ ...B, editing: null })), !0;
1813
+ const O = {};
1814
+ for (const [B, z] of Object.entries(E)) {
1815
+ const Y = r(B)?.spec.validate?.(z, T);
1816
+ Y && (O[B] = Y);
1817
1817
  }
1818
- const B = Object.keys(M).find((V) => E[V] !== void 0);
1819
- if (B !== void 0) {
1820
- const V = p.row ? B : p.column;
1821
- return O && t.focus.want("editor"), d((K) => ({
1822
- ...K,
1823
- active: { line: p.line, column: V, lineIndex: Math.max(0, b.indexOf(p.line)), columnIndex: o.indexOf(V) },
1824
- editing: K.editing && { ...K.editing, column: V, drafts: M, errors: E, refused: !1 }
1818
+ const D = Object.keys(E).find((B) => O[B] !== void 0);
1819
+ if (D !== void 0) {
1820
+ const B = p.row ? D : p.column;
1821
+ return R && t.focus.want("editor"), d((z) => ({
1822
+ ...z,
1823
+ active: { line: p.line, column: B, lineIndex: Math.max(0, b.indexOf(p.line)), columnIndex: o.indexOf(B) },
1824
+ editing: z.editing && { ...z.editing, column: B, drafts: E, errors: O, refused: !1 }
1825
1825
  })), !1;
1826
1826
  }
1827
- const $ = Object.keys(M).filter((V) => !uo(M[V], r(V)?.read(R)));
1828
- return p.line === he ? a?.({ values: M }) : p.row ? $.length > 0 && c?.({ rowKey: s(R), changes: Object.fromEntries($.map((V) => [V, M[V]])), row: R }) : $.length > 0 && i?.({ rowKey: s(R), columnId: p.column, value: M[p.column], row: R }), O && t.focus.want("cell"), d((V) => ({ ...V, editing: null })), !0;
1829
- }, _ = (k, O) => y({ [k]: O }), S = () => {
1827
+ const I = Object.keys(E).filter((B) => !uo(E[B], r(B)?.read(T)));
1828
+ return p.line === he ? a?.({ values: E }) : p.row ? I.length > 0 && c?.({ rowKey: s(T), changes: Object.fromEntries(I.map((B) => [B, E[B]])), row: T }) : I.length > 0 && i?.({ rowKey: s(T), columnId: p.column, value: E[p.column], row: T }), R && t.focus.want("cell"), d((B) => ({ ...B, editing: null })), !0;
1829
+ }, _ = (k, R) => y({ [k]: R }), S = () => {
1830
1830
  t.focus.want("cell"), d((k) => ({ ...k, editing: null }));
1831
1831
  }, C = () => {
1832
1832
  t.focus.want("editor"), d((k) => k.editing ? { ...k, editing: { ...k.editing, refused: !0 } } : k);
1833
1833
  };
1834
- return { rowAt: w, editable: g, startEdit: x, save: y, commit: _, discard: S, refuse: C, setDraft: (k, O) => d((M) => {
1835
- if (!M.editing) return M;
1836
- const R = { ...M.editing.errors };
1837
- if (R[k] !== void 0) {
1838
- const E = r(k)?.spec.validate?.(O, m(M.editing.line));
1839
- E ? R[k] = E : delete R[k];
1834
+ return { rowAt: w, editable: g, startEdit: x, save: y, commit: _, discard: S, refuse: C, setDraft: (k, R) => d((E) => {
1835
+ if (!E.editing) return E;
1836
+ const T = { ...E.editing.errors };
1837
+ if (T[k] !== void 0) {
1838
+ const O = r(k)?.spec.validate?.(R, m(E.editing.line));
1839
+ O ? T[k] = O : delete T[k];
1840
1840
  }
1841
- return { ...M, editing: { ...M.editing, drafts: { ...M.editing.drafts, [k]: O }, errors: R, refused: !1 } };
1841
+ return { ...E, editing: { ...E.editing, drafts: { ...E.editing.drafts, [k]: R }, errors: T, refused: !1 } };
1842
1842
  }), addRow: () => {
1843
1843
  if (p && (p.row || !y())) return C();
1844
- const k = v(), O = k[0];
1845
- if (!O) return;
1846
- const M = u?.() ?? {};
1847
- t.focus.want("editor"), d((R) => ({
1848
- ...R,
1844
+ const k = v(), R = k[0];
1845
+ if (!R) return;
1846
+ const E = u?.() ?? {};
1847
+ t.focus.want("editor"), d((T) => ({
1848
+ ...T,
1849
1849
  widget: !1,
1850
- active: { line: he, column: O.spec.id, lineIndex: 1, columnIndex: o.indexOf(O.spec.id) },
1850
+ active: { line: he, column: R.spec.id, lineIndex: 1, columnIndex: o.indexOf(R.spec.id) },
1851
1851
  editing: {
1852
1852
  line: he,
1853
- column: O.spec.id,
1853
+ column: R.spec.id,
1854
1854
  row: !0,
1855
1855
  /* What `newRow` leaves out is empty - `null`, as an emptied field says it. */
1856
- drafts: Object.fromEntries(k.map((E) => [E.spec.id, E.read(M) ?? null])),
1856
+ drafts: Object.fromEntries(k.map((O) => [O.spec.id, O.read(E) ?? null])),
1857
1857
  errors: {},
1858
1858
  refused: !1,
1859
- fresh: M
1859
+ fresh: E
1860
1860
  }
1861
1861
  }));
1862
1862
  } };
@@ -2004,18 +2004,18 @@ function bl(e) {
2004
2004
  outside: p
2005
2005
  };
2006
2006
  }
2007
- const Pe = /* @__PURE__ */ rt(null);
2007
+ const Ve = /* @__PURE__ */ rt(null);
2008
2008
  function vl(e, t) {
2009
- const n = _e(Pe), o = n?.editing;
2009
+ const n = _e(Ve), o = n?.editing;
2010
2010
  return o && o.line === e && t in o.drafts ? n : null;
2011
2011
  }
2012
- const Ke = "data-grid-tabindex";
2012
+ const ze = "data-grid-tabindex";
2013
2013
  function yl(e, t) {
2014
- if (t && !e.hasAttribute(Ke))
2015
- e.setAttribute(Ke, e.getAttribute("tabindex") ?? ""), e.tabIndex = -1;
2016
- else if (!t && e.hasAttribute(Ke)) {
2017
- const n = e.getAttribute(Ke);
2018
- n === "" ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", n), e.removeAttribute(Ke);
2014
+ if (t && !e.hasAttribute(ze))
2015
+ e.setAttribute(ze, e.getAttribute("tabindex") ?? ""), e.tabIndex = -1;
2016
+ else if (!t && e.hasAttribute(ze)) {
2017
+ const n = e.getAttribute(ze);
2018
+ n === "" ? e.removeAttribute("tabindex") : e.setAttribute("tabindex", n), e.removeAttribute(ze);
2019
2019
  }
2020
2020
  }
2021
2021
  function _l({
@@ -2047,11 +2047,11 @@ function _l({
2047
2047
  let w = null, g = null;
2048
2048
  for (const y of Array.from(c.querySelectorAll("tr[data-grid-line]"))) {
2049
2049
  const _ = y.dataset.gridLine, S = Wt(y);
2050
- for (const { cell: C, start: A, end: L } of S) {
2051
- const k = b.column >= A && b.column < L || C === S.at(-1).cell && b.column >= L;
2050
+ for (const { cell: C, start: A, end: M } of S) {
2051
+ const k = b.column >= A && b.column < M || C === S.at(-1).cell && b.column >= M;
2052
2052
  k && _ === p && (w = C), k && g === null && _ !== "head" && (g = C), C.tabIndex = -1, r && _ !== "head" && !r({ line: m.get(_) ?? -1, column: A }) ? C.setAttribute("aria-readonly", "true") : C.removeAttribute("aria-readonly");
2053
- const O = d?.row === !0 && d.line === _ || C === w && (u || d !== null && d.line === _);
2054
- for (const M of Array.from(C.querySelectorAll(Ht))) yl(M, !O);
2053
+ const R = d?.row === !0 && d.line === _ || C === w && (u || d !== null && d.line === _);
2054
+ for (const E of Array.from(C.querySelectorAll(Ht))) yl(E, !R);
2055
2055
  }
2056
2056
  }
2057
2057
  const v = w ?? g ?? c.querySelector("tr[data-grid-line] > *");
@@ -2093,25 +2093,25 @@ function Sl({ entry: e, row: t, rowName: n, grid: o }) {
2093
2093
  else if (i.edit === "number")
2094
2094
  p = /* @__PURE__ */ f(yt, { size: "sm", value: typeof a == "number" ? a : null, onChange: d });
2095
2095
  else if (i.edit === "date")
2096
- p = /* @__PURE__ */ f(Lo, { size: "sm", value: a instanceof Date ? a : null, onChange: (m) => l.row ? d(m) : o.commit(c, m) });
2096
+ p = /* @__PURE__ */ f(Mo, { size: "sm", value: a instanceof Date ? a : null, onChange: (m) => l.row ? d(m) : o.commit(c, m) });
2097
2097
  else if (i.edit === "select") {
2098
2098
  const m = i.editOptions ?? At(o.hook.admitted, e.read, r).values, w = m.findIndex((g) => uo(g, a));
2099
- p = /* @__PURE__ */ T(Rn, { size: "sm", value: w < 0 ? "" : String(w), onChange: (g) => d(m[Number(g.target.value)]), children: [
2099
+ p = /* @__PURE__ */ j(Tn, { size: "sm", value: w < 0 ? "" : String(w), onChange: (g) => d(m[Number(g.target.value)]), children: [
2100
2100
  w < 0 && /* @__PURE__ */ f("option", { value: "" }),
2101
2101
  m.map((g, v) => /* @__PURE__ */ f("option", { value: v, children: g instanceof Date ? r.date(g) : String(g) }, v))
2102
2102
  ] });
2103
2103
  } else
2104
- p = /* @__PURE__ */ f(On, { size: "sm", value: se(a) ? "" : String(a), onChange: (m) => d(m.target.value) });
2105
- return /* @__PURE__ */ T("div", { ref: s, className: h.editor, children: [
2106
- /* @__PURE__ */ f(vt, { className: h.editorField, label: /* @__PURE__ */ f(Oe, { children: b }), error: u ?? void 0, children: p }),
2104
+ p = /* @__PURE__ */ f(Rn, { size: "sm", value: se(a) ? "" : String(a), onChange: (m) => d(m.target.value) });
2105
+ return /* @__PURE__ */ j("div", { ref: s, className: h.editor, children: [
2106
+ /* @__PURE__ */ f(vt, { className: h.editorField, label: /* @__PURE__ */ f(Re, { children: b }), error: u ?? void 0, children: p }),
2107
2107
  /* @__PURE__ */ f(it, { open: u !== null, onOpenChange: () => {
2108
2108
  }, anchorRef: s, restoreFocus: !1, offset: 4, className: h.editorMessage, children: /* @__PURE__ */ f("span", { "aria-hidden": "true", children: u }) })
2109
2109
  ] });
2110
2110
  }
2111
2111
  function ho({ wording: e }) {
2112
- return /* @__PURE__ */ T(re, { children: [
2112
+ return /* @__PURE__ */ j(re, { children: [
2113
2113
  /* @__PURE__ */ f("span", { "aria-hidden": "true", className: h.absent, children: "—" }),
2114
- /* @__PURE__ */ f(Oe, { children: e.cellAbsentValue })
2114
+ /* @__PURE__ */ f(Re, { children: e.cellAbsentValue })
2115
2115
  ] });
2116
2116
  }
2117
2117
  const Cl = { sum: "Σ", avg: "⌀", min: "min", max: "max" }, xl = (e, t) => ({
@@ -2129,17 +2129,17 @@ function go(e, t, n) {
2129
2129
  r || wn.set(t, r = /* @__PURE__ */ new Map());
2130
2130
  const s = r.get(e), i = e.spec.value, l = e.spec.rightAligned;
2131
2131
  if (s && s.spec === o && s.reader === i && s.aligned === l) return s;
2132
- const c = n ? n.value : zt({ id: e.spec.id, read: e.read, aggregate: o }, t);
2132
+ const c = n ? n.value : $t({ id: e.spec.id, read: e.read, aggregate: o }, t);
2133
2133
  let a = 0;
2134
2134
  if ((o === "sum" || o === "avg") && typeof c == "number")
2135
2135
  for (const b of t) {
2136
2136
  const p = e.read(b);
2137
2137
  Al(p) && (a = Math.max(a, Nl(p)));
2138
2138
  }
2139
- const u = o === "count" || o === "distinct" || (l ?? Mn(t, e.read) === "number"), d = { spec: o, reader: i, aligned: l, value: c, places: a, numeric: u };
2139
+ const u = o === "count" || o === "distinct" || (l ?? En(t, e.read) === "number"), d = { spec: o, reader: i, aligned: l, value: c, places: a, numeric: u };
2140
2140
  return r.set(e, d), d;
2141
2141
  }
2142
- function Ot({
2142
+ function Rt({
2143
2143
  entry: e,
2144
2144
  rows: t,
2145
2145
  formats: n,
@@ -2149,12 +2149,12 @@ function Ot({
2149
2149
  }) {
2150
2150
  const { aggregate: i, format: l, presentation: c } = e.spec;
2151
2151
  if (!i) return null;
2152
- const a = typeof i == "function" ? "own" : i, { value: u, places: d } = go(e, t, s), b = (w) => Ve(w, l, n, o);
2152
+ const a = typeof i == "function" ? "own" : i, { value: u, places: d } = go(e, t, s), b = (w) => Be(w, l, n, o);
2153
2153
  let p;
2154
2154
  if (se(u)) p = /* @__PURE__ */ f(ho, { wording: o });
2155
2155
  else if ((a === "sum" || a === "avg") && l === void 0 && typeof u == "number")
2156
2156
  p = n.number(u, Math.min(10, a === "avg" ? d + 1 : d));
2157
- else if (a === "range" && l === "date" && Tl(u)) {
2157
+ else if (a === "range" && l === "date" && jl(u)) {
2158
2158
  const [w, g] = u;
2159
2159
  p = w.getTime() === g.getTime() ? n.date(w) : o.rangeFromTo(n.dateShort(w), n.dateShort(g));
2160
2160
  } else if (a === "count" || a === "distinct") p = n.count(u);
@@ -2163,9 +2163,9 @@ function Ot({
2163
2163
  p = b(w) === b(g) ? b(w) : o.rangeFromTo(b(w) ?? "", b(g) ?? "");
2164
2164
  } else a === "own" && c ? p = c(u, t[0]) : p = b(u);
2165
2165
  const m = Cl[a];
2166
- return /* @__PURE__ */ T(re, { children: [
2166
+ return /* @__PURE__ */ j(re, { children: [
2167
2167
  r && m && /* @__PURE__ */ f("span", { "aria-hidden": "true", className: h.footerKind, children: m }),
2168
- r && /* @__PURE__ */ T(Oe, { children: [
2168
+ r && /* @__PURE__ */ j(Re, { children: [
2169
2169
  xl(a, o),
2170
2170
  " "
2171
2171
  ] }),
@@ -2175,7 +2175,7 @@ function Ot({
2175
2175
  const Al = (e) => typeof e == "number" && Number.isFinite(e), Nl = (e) => {
2176
2176
  const [t = "", n = "0"] = e.toExponential().split("e");
2177
2177
  return Math.max(0, (t.split(".")[1]?.length ?? 0) - Number(n));
2178
- }, Tl = ([e, t]) => e instanceof Date && t instanceof Date && e.getFullYear() === t.getFullYear();
2178
+ }, jl = ([e, t]) => e instanceof Date && t instanceof Date && e.getFullYear() === t.getFullYear();
2179
2179
  function po(e, t, n) {
2180
2180
  return e.spec.aggregate ? go(e, t, n).numeric : !1;
2181
2181
  }
@@ -2185,7 +2185,7 @@ function ct(e, t, n = t) {
2185
2185
  if (!o) return mo;
2186
2186
  const r = o.side === "start";
2187
2187
  return {
2188
- className: D(h.pinned, o.edge && (r ? h.pinStartEdge : h.pinEndEdge)),
2188
+ className: F(h.pinned, o.edge && (r ? h.pinStartEdge : h.pinEndEdge)),
2189
2189
  /* The scroll area keeps a padding as wide as the block for the browser's
2190
2190
  scroll into view; a pinned cell lies inside it and would scroll the
2191
2191
  table back to its start when focused. Its target is shifted out of the
@@ -2206,13 +2206,13 @@ function dt(e, t, n, o) {
2206
2206
  const r = e?.spec;
2207
2207
  if (r?.group && t instanceof Date) return qo(r.group, t, n, o);
2208
2208
  const s = r?.ownGroupValue ? void 0 : r?.format;
2209
- return Ve(t, s, n, o) ?? String(t);
2209
+ return Be(t, s, n, o) ?? String(t);
2210
2210
  }
2211
- function Et({ entry: e, group: t, formats: n, wording: o }) {
2211
+ function Ot({ entry: e, group: t, formats: n, wording: o }) {
2212
2212
  const r = e?.spec;
2213
2213
  return t.value !== void 0 && r?.presentation && !r.ownGroupValue && !r.group ? /* @__PURE__ */ f(re, { children: r.presentation(t.value, t.rows[0]) }) : /* @__PURE__ */ f(re, { children: dt(e, t.value, n, o) });
2214
2214
  }
2215
- function Mt({
2215
+ function Et({
2216
2216
  group: e,
2217
2217
  parent: t,
2218
2218
  entry: n,
@@ -2242,7 +2242,7 @@ function Mt({
2242
2242
  "button",
2243
2243
  {
2244
2244
  type: "button",
2245
- className: D(h.fold, !o && h.foldClosed),
2245
+ className: F(h.fold, !o && h.foldClosed),
2246
2246
  "data-fold-path": e.path,
2247
2247
  "aria-expanded": o,
2248
2248
  "aria-label": o ? i.foldGroup(l, c) : i.unfoldGroup(l, c),
@@ -2255,11 +2255,11 @@ function Mt({
2255
2255
  }
2256
2256
  );
2257
2257
  }
2258
- function Rl({ value: e, formats: t }) {
2258
+ function Tl({ value: e, formats: t }) {
2259
2259
  const n = q(null);
2260
2260
  return ol(n, e, t.count), /* @__PURE__ */ f("span", { ref: n, className: h.groupCount, children: t.count(e) });
2261
2261
  }
2262
- function Lt({ group: e, entry: t, hook: n, formats: o, wording: r }) {
2262
+ function Mt({ group: e, entry: t, hook: n, formats: o, wording: r }) {
2263
2263
  const { selection: s } = n.publicSnapshot, i = e.rows.map(n.rowKey), l = i.filter((a) => s.isSelected(a)).length, c = l === i.length;
2264
2264
  return /* @__PURE__ */ f(
2265
2265
  We,
@@ -2282,7 +2282,7 @@ function bn(e, t, n) {
2282
2282
  for (const i of r)
2283
2283
  o.folded.includes(i.path) !== t && o.toggleFold(i.path);
2284
2284
  }
2285
- function Ol({
2285
+ function Rl({
2286
2286
  line: e,
2287
2287
  entry: t,
2288
2288
  selectable: n,
@@ -2292,17 +2292,17 @@ function Ol({
2292
2292
  wording: i
2293
2293
  }) {
2294
2294
  const l = e.span;
2295
- return /* @__PURE__ */ f("td", { className: D(h.td, h.spanCell, o.className), style: o.style, children: e.first && /* @__PURE__ */ T("span", { className: h.spanValue, children: [
2296
- n && /* @__PURE__ */ f("span", { className: h.spanSelect, children: /* @__PURE__ */ f(Lt, { group: l, entry: t, hook: r, formats: s, wording: i }) }),
2297
- /* @__PURE__ */ f(Mt, { group: l, parent: e.parents.at(-1), entry: t, open: !0, hook: r, formats: s, wording: i }),
2298
- /* @__PURE__ */ T("span", { className: h.spanText, title: dt(t, l.value, s, i), children: [
2299
- /* @__PURE__ */ f(Et, { entry: t, group: l, formats: s, wording: i }),
2295
+ return /* @__PURE__ */ f("td", { className: F(h.td, h.spanCell, o.className), style: o.style, children: e.first && /* @__PURE__ */ j("span", { className: h.spanValue, children: [
2296
+ n && /* @__PURE__ */ f("span", { className: h.spanSelect, children: /* @__PURE__ */ f(Mt, { group: l, entry: t, hook: r, formats: s, wording: i }) }),
2297
+ /* @__PURE__ */ f(Et, { group: l, parent: e.parents.at(-1), entry: t, open: !0, hook: r, formats: s, wording: i }),
2298
+ /* @__PURE__ */ j("span", { className: h.spanText, title: dt(t, l.value, s, i), children: [
2299
+ /* @__PURE__ */ f(Ot, { entry: t, group: l, formats: s, wording: i }),
2300
2300
  e.continued && /* @__PURE__ */ f("span", { className: h.continued, children: i.groupContinued })
2301
2301
  ] }),
2302
2302
  /* @__PURE__ */ f("span", { className: h.groupCount, children: s.count(l.rows.length) })
2303
2303
  ] }) });
2304
2304
  }
2305
- function El({
2305
+ function Ol({
2306
2306
  line: e,
2307
2307
  index: t,
2308
2308
  absolute: n,
@@ -2324,19 +2324,19 @@ function El({
2324
2324
  const { group: v } = e, x = e.kind === "header", y = x && !p.publicSnapshot.folded.includes(v.path), { lead: _, labelColumns: S, countColumns: C } = ao({
2325
2325
  controls: i,
2326
2326
  span: o !== void 0,
2327
- aggregates: s.map((B) => B.spec.aggregate !== void 0),
2327
+ aggregates: s.map((D) => D.spec.aggregate !== void 0),
2328
2328
  actions: a,
2329
2329
  blocks: l
2330
- }), A = s.slice(_), L = i + (o ? 1 : 0), k = (B, $ = B) => ct(l, B, $), O = (B) => _ - B > 0 && /* @__PURE__ */ f("td", { className: h.td, colSpan: _ - B }), M = s.find((B) => B.spec.aggregate === "sum" && B.spec.share !== !1), R = n !== void 0, E = /* @__PURE__ */ T("span", { className: h.groupLabel, children: [
2331
- /* @__PURE__ */ f(Mt, { group: v, parent: e.parents.at(-1), entry: r, open: y, hook: p, formats: m, wording: w }),
2332
- /* @__PURE__ */ f("span", { className: h.groupValue, children: /* @__PURE__ */ f(Et, { entry: r, group: v, formats: m, wording: w }) }),
2333
- /* @__PURE__ */ f(Rl, { value: v.rows.length, formats: m }),
2330
+ }), A = s.slice(_), M = i + (o ? 1 : 0), k = (D, I = D) => ct(l, D, I), R = (D) => _ - D > 0 && /* @__PURE__ */ f("td", { className: h.td, colSpan: _ - D }), E = s.find((D) => D.spec.aggregate === "sum" && D.spec.share !== !1), T = n !== void 0, O = /* @__PURE__ */ j("span", { className: h.groupLabel, children: [
2331
+ /* @__PURE__ */ f(Et, { group: v, parent: e.parents.at(-1), entry: r, open: y, hook: p, formats: m, wording: w }),
2332
+ /* @__PURE__ */ f("span", { className: h.groupValue, children: /* @__PURE__ */ f(Ot, { entry: r, group: v, formats: m, wording: w }) }),
2333
+ /* @__PURE__ */ f(Tl, { value: v.rows.length, formats: m }),
2334
2334
  x && e.continued && /* @__PURE__ */ f("span", { className: h.continued, children: w.groupContinued })
2335
2335
  ] });
2336
- return /* @__PURE__ */ T(
2336
+ return /* @__PURE__ */ j(
2337
2337
  "tr",
2338
2338
  {
2339
- className: D(x ? h.groupHeader : h.groupFolded, R && h.virtualRow),
2339
+ className: F(x ? h.groupHeader : h.groupFolded, T && h.virtualRow),
2340
2340
  "data-line": e.kind,
2341
2341
  "data-level": v.level,
2342
2342
  "data-motion": n !== void 0 || !(x && e.continued) ? `${e.kind}:${v.path}` : void 0,
@@ -2344,8 +2344,8 @@ function El({
2344
2344
  "data-group-first": x ? void 0 : "",
2345
2345
  "data-group": v.path,
2346
2346
  "data-grid-line": g ? `${e.kind}:${v.path}` : void 0,
2347
- "data-row": R ? n : void 0,
2348
- "aria-rowindex": R ? n + 2 : void 0,
2347
+ "data-row": T ? n : void 0,
2348
+ "aria-rowindex": T ? n + 2 : void 0,
2349
2349
  "data-index": t,
2350
2350
  style: x ? { "--u-header-level": v.level } : void 0,
2351
2351
  "aria-level": x ? v.level + 1 : b,
@@ -2353,65 +2353,65 @@ function El({
2353
2353
  "aria-posinset": d.indexOf(v) + 1 || void 0,
2354
2354
  "aria-setsize": d.length || void 0,
2355
2355
  children: [
2356
- Array.from({ length: i }, (B, $) => /* @__PURE__ */ f("td", { className: D(h.td, h.control, k($).className), style: k($).style, children: $ === 0 && c && x && /* @__PURE__ */ f(Lt, { group: v, entry: r, hook: p, formats: m, wording: w }) }, `c${$}`)),
2357
- x ? /* @__PURE__ */ T(re, { children: [
2356
+ Array.from({ length: i }, (D, I) => /* @__PURE__ */ f("td", { className: F(h.td, h.control, k(I).className), style: k(I).style, children: I === 0 && c && x && /* @__PURE__ */ f(Mt, { group: v, entry: r, hook: p, formats: m, wording: w }) }, `c${I}`)),
2357
+ x ? /* @__PURE__ */ j(re, { children: [
2358
2358
  /* @__PURE__ */ f(
2359
2359
  "td",
2360
2360
  {
2361
- className: D(h.td, k(i, L + S - 1).className),
2361
+ className: F(h.td, k(i, M + S - 1).className),
2362
2362
  colSpan: (o ? 1 : 0) + S,
2363
2363
  style: {
2364
- ...k(i, L + S - 1).style,
2364
+ ...k(i, M + S - 1).style,
2365
2365
  paddingLeft: `calc(var(--u-space-3) + ${v.level * 20}px)`
2366
2366
  },
2367
- children: E
2367
+ children: O
2368
2368
  }
2369
2369
  ),
2370
- O(S)
2371
- ] }) : /* @__PURE__ */ T(re, { children: [
2372
- /* @__PURE__ */ f("td", { className: D(h.td, h.spanCell, k(i).className), style: k(i).style, children: /* @__PURE__ */ T("span", { className: h.spanValue, children: [
2373
- c && /* @__PURE__ */ f("span", { className: h.spanSelect, children: /* @__PURE__ */ f(Lt, { group: v, entry: o, hook: p, formats: m, wording: w }) }),
2374
- /* @__PURE__ */ f(Mt, { group: v, parent: e.parents.at(-1), entry: o, open: !1, hook: p, formats: m, wording: w }),
2375
- /* @__PURE__ */ f("span", { className: h.spanText, children: /* @__PURE__ */ f(Et, { entry: o, group: v, formats: m, wording: w }) }),
2370
+ R(S)
2371
+ ] }) : /* @__PURE__ */ j(re, { children: [
2372
+ /* @__PURE__ */ f("td", { className: F(h.td, h.spanCell, k(i).className), style: k(i).style, children: /* @__PURE__ */ j("span", { className: h.spanValue, children: [
2373
+ c && /* @__PURE__ */ f("span", { className: h.spanSelect, children: /* @__PURE__ */ f(Mt, { group: v, entry: o, hook: p, formats: m, wording: w }) }),
2374
+ /* @__PURE__ */ f(Et, { group: v, parent: e.parents.at(-1), entry: o, open: !1, hook: p, formats: m, wording: w }),
2375
+ /* @__PURE__ */ f("span", { className: h.spanText, children: /* @__PURE__ */ f(Ot, { entry: o, group: v, formats: m, wording: w }) }),
2376
2376
  /* @__PURE__ */ f("span", { className: h.groupCount, children: m.count(v.rows.length) })
2377
2377
  ] }) }),
2378
2378
  C > 0 && /* @__PURE__ */ f(
2379
2379
  "td",
2380
2380
  {
2381
- className: D(h.td, h.foldedCount, k(L, L + C - 1).className),
2382
- style: k(L, L + C - 1).style,
2381
+ className: F(h.td, h.foldedCount, k(M, M + C - 1).className),
2382
+ style: k(M, M + C - 1).style,
2383
2383
  colSpan: C,
2384
2384
  children: w.entries(v.rows.length, m.count(v.rows.length))
2385
2385
  }
2386
2386
  ),
2387
- O(C)
2387
+ R(C)
2388
2388
  ] }),
2389
- A.map((B, $) => /* @__PURE__ */ f(
2390
- Ll,
2389
+ A.map((D, I) => /* @__PURE__ */ f(
2390
+ Ml,
2391
2391
  {
2392
- pin: k(L + _ + $),
2393
- entry: B,
2392
+ pin: k(M + _ + I),
2393
+ entry: D,
2394
2394
  group: v,
2395
- share: x && B === M,
2395
+ share: x && D === E,
2396
2396
  total: u,
2397
2397
  formats: m,
2398
2398
  wording: w
2399
2399
  },
2400
- B.key
2400
+ D.key
2401
2401
  )),
2402
- a && /* @__PURE__ */ f("td", { className: D(h.td, k(l.count - 1).className), style: k(l.count - 1).style })
2402
+ a && /* @__PURE__ */ f("td", { className: F(h.td, k(l.count - 1).className), style: k(l.count - 1).style })
2403
2403
  ]
2404
2404
  }
2405
2405
  );
2406
2406
  }
2407
2407
  const vn = /* @__PURE__ */ new WeakMap();
2408
- function Ml(e, t) {
2408
+ function El(e, t) {
2409
2409
  let n = vn.get(t);
2410
2410
  n || vn.set(t, n = /* @__PURE__ */ new Map());
2411
2411
  let o = n.get(e);
2412
- return (!o || o.reader !== e.spec.value) && (o = { reader: e.spec.value, sum: zt({ id: e.spec.id, read: e.read, aggregate: "sum" }, t) }, n.set(e, o)), o.sum;
2412
+ return (!o || o.reader !== e.spec.value) && (o = { reader: e.spec.value, sum: $t({ id: e.spec.id, read: e.read, aggregate: "sum" }, t) }, n.set(e, o)), o.sum;
2413
2413
  }
2414
- function Ll({
2414
+ function Ml({
2415
2415
  entry: e,
2416
2416
  pin: t,
2417
2417
  group: n,
@@ -2421,19 +2421,19 @@ function Ll({
2421
2421
  wording: i
2422
2422
  }) {
2423
2423
  const { spec: l } = e;
2424
- if (!l.aggregate) return /* @__PURE__ */ f("td", { className: D(h.td, t.className), style: t.style });
2424
+ if (!l.aggregate) return /* @__PURE__ */ f("td", { className: F(h.td, t.className), style: t.style });
2425
2425
  let c = null;
2426
2426
  if (o && l.aggregate === "sum" && l.share !== !1) {
2427
- const a = Ml(e, r), u = n.aggregates[l.id];
2427
+ const a = El(e, r), u = n.aggregates[l.id];
2428
2428
  if (typeof a == "number" && a > 0 && typeof u == "number" && u > 0) {
2429
2429
  const d = Math.min(1, u / a);
2430
2430
  c = /* @__PURE__ */ f("span", { className: h.shareBar, style: { width: `${Math.max(2, Math.round(d * 64))}px` }, "aria-hidden": "true" });
2431
2431
  }
2432
2432
  }
2433
- return /* @__PURE__ */ f("td", { className: D(h.td, po(e, n.rows, { value: n.aggregates[l.id] }) && h.numeric, h.aggregateCell, t.className), style: t.style, "data-aggregate": typeof l.aggregate == "function" ? "own" : l.aggregate, children: c ? /* @__PURE__ */ T("span", { className: h.shareHost, children: [
2434
- /* @__PURE__ */ f(Ot, { entry: e, rows: n.rows, known: { value: n.aggregates[l.id] }, formats: s, wording: i }),
2433
+ return /* @__PURE__ */ f("td", { className: F(h.td, po(e, n.rows, { value: n.aggregates[l.id] }) && h.numeric, h.aggregateCell, t.className), style: t.style, "data-aggregate": typeof l.aggregate == "function" ? "own" : l.aggregate, children: c ? /* @__PURE__ */ j("span", { className: h.shareHost, children: [
2434
+ /* @__PURE__ */ f(Rt, { entry: e, rows: n.rows, known: { value: n.aggregates[l.id] }, formats: s, wording: i }),
2435
2435
  c
2436
- ] }) : /* @__PURE__ */ f(Ot, { entry: e, rows: n.rows, known: { value: n.aggregates[l.id] }, formats: s, wording: i }) });
2436
+ ] }) : /* @__PURE__ */ f(Rt, { entry: e, rows: n.rows, known: { value: n.aggregates[l.id] }, formats: s, wording: i }) });
2437
2437
  }
2438
2438
  function wo() {
2439
2439
  return /* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "12", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ f("path", { d: "M2.5 3.75 5 6.25 7.5 3.75", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) });
@@ -2444,7 +2444,7 @@ function bo(e, t, n, o, r) {
2444
2444
  const i = r !== void 0 && r.branch && !r.empty;
2445
2445
  return { content: s, open: i ? t.branches.includes(o) : t.expanded.includes(o) };
2446
2446
  }
2447
- function Fl(e, t, n, o, r) {
2447
+ function Ll(e, t, n, o, r) {
2448
2448
  const s = /* @__PURE__ */ new Set([...t.expanded, ...t.branches]), i = /* @__PURE__ */ new Set();
2449
2449
  for (const l of n) {
2450
2450
  const c = o(l);
@@ -2452,7 +2452,7 @@ function Fl(e, t, n, o, r) {
2452
2452
  }
2453
2453
  return i;
2454
2454
  }
2455
- function Dl({
2455
+ function Fl({
2456
2456
  setup: e,
2457
2457
  entry: t,
2458
2458
  detail: n,
@@ -2474,12 +2474,12 @@ function Dl({
2474
2474
  }
2475
2475
  }
2476
2476
  };
2477
- return /* @__PURE__ */ T("span", { className: h.treeCell, style: { "--tree-level": t.level }, children: [
2477
+ return /* @__PURE__ */ j("span", { className: h.treeCell, style: { "--tree-level": t.level }, children: [
2478
2478
  l ? /* @__PURE__ */ f(
2479
2479
  "button",
2480
2480
  {
2481
2481
  type: "button",
2482
- className: D(h.fold, !c && h.foldClosed),
2482
+ className: F(h.fold, !c && h.foldClosed),
2483
2483
  "data-branch-key": t.key,
2484
2484
  "aria-expanded": c,
2485
2485
  "aria-label": c ? r.foldBranch(o) : r.unfoldBranch(o),
@@ -2488,13 +2488,13 @@ function Dl({
2488
2488
  children: /* @__PURE__ */ f(wo, {})
2489
2489
  }
2490
2490
  ) : /* @__PURE__ */ f("span", { className: h.foldSlot }),
2491
- /* @__PURE__ */ T("span", { className: h.treeText, children: [
2491
+ /* @__PURE__ */ j("span", { className: h.treeText, children: [
2492
2492
  s,
2493
- t.pathOnly && /* @__PURE__ */ f(Oe, { children: `, ${r.pathRow}` })
2493
+ t.pathOnly && /* @__PURE__ */ f(Re, { children: `, ${r.pathRow}` })
2494
2494
  ] })
2495
2495
  ] });
2496
2496
  }
2497
- function Bl(e, t, n, o) {
2497
+ function Dl(e, t, n, o) {
2498
2498
  const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), l = [];
2499
2499
  return e.forEach((c, a) => {
2500
2500
  r.set(c.key, c), l.length = c.level, s.set(c.key, l.at(-1)), l.push(c.key), e[a + 1]?.level === 0 && i.add(c.key);
@@ -2517,7 +2517,7 @@ function Bl(e, t, n, o) {
2517
2517
  }
2518
2518
  };
2519
2519
  }
2520
- function Vl({
2520
+ function Bl({
2521
2521
  registry: e,
2522
2522
  hook: t,
2523
2523
  props: n,
@@ -2525,10 +2525,10 @@ function Vl({
2525
2525
  grid: r
2526
2526
  }) {
2527
2527
  const { selectable: s = !1, loading: i = !1, grid: l = !1 } = n, { snapshot: c, projection: a, virtual: u, lines: d, spanEntry: b, dataColumns: p, expanderColumn: m, controlColumns: w, trailing: g, blocks: v, rows: x, footerShown: y } = o, _ = l ? sl({
2528
- layout: { controls: w, span: b !== void 0, aggregates: p.map((L) => L.spec.aggregate !== void 0), actions: g, blocks: v },
2528
+ layout: { controls: w, span: b !== void 0, aggregates: p.map((M) => M.spec.aggregate !== void 0), actions: g, blocks: v },
2529
2529
  body: i ? { rows: [] } : d ? { lines: u ? a.lines : d } : { rows: u ? a.shown ?? a.filtered : x },
2530
2530
  rowKey: t.rowKey,
2531
- expanded: o.detail ? Fl(e, c, a.shown ?? a.filtered, t.rowKey, o.tree) : /* @__PURE__ */ new Set(),
2531
+ expanded: o.detail ? Ll(e, c, a.shown ?? a.filtered, t.rowKey, o.tree) : /* @__PURE__ */ new Set(),
2532
2532
  foot: y
2533
2533
  }) : [], S = r.state.editing?.line === he ? r.state.editing : null;
2534
2534
  S && _[0] && _.splice(1, 0, { key: he, cells: _[0].cells, at: -1, row: S.fresh });
@@ -2536,13 +2536,13 @@ function Vl({
2536
2536
  ...s ? ["#select"] : [],
2537
2537
  ...m ? ["#detail"] : [],
2538
2538
  ...b ? ["#span"] : [],
2539
- ...p.map((L) => L.spec.id),
2539
+ ...p.map((M) => M.spec.id),
2540
2540
  ...g ? ["#actions"] : []
2541
2541
  ], A = l ? bl({
2542
2542
  grid: r,
2543
2543
  lines: _,
2544
2544
  ids: C,
2545
- columnById: (L) => p.find((k) => k.spec.id === L),
2545
+ columnById: (M) => p.find((k) => k.spec.id === M),
2546
2546
  rowKey: t.rowKey,
2547
2547
  virtual: u,
2548
2548
  onCellEdit: n.onCellEdit,
@@ -2551,16 +2551,16 @@ function Vl({
2551
2551
  onRowAdd: n.onRowAdd,
2552
2552
  newRow: n.newRow,
2553
2553
  onRowDelete: n.onRowDelete,
2554
- select: s ? (L) => c.selection.toggle(t.rowKey(L)) : void 0
2554
+ select: s ? (M) => c.selection.toggle(t.rowKey(M)) : void 0
2555
2555
  }) : void 0;
2556
2556
  return { lines: _, fresh: S, ids: C, events: A };
2557
2557
  }
2558
- function Pl(e) {
2558
+ function Vl(e) {
2559
2559
  for (const t of e) t.removeAttribute("data-copied");
2560
2560
  document.body.offsetWidth;
2561
2561
  for (const t of e) t.setAttribute("data-copied", "");
2562
2562
  }
2563
- function Il({
2563
+ function Pl({
2564
2564
  registry: e,
2565
2565
  hook: t,
2566
2566
  grid: n,
@@ -2572,7 +2572,7 @@ function Il({
2572
2572
  tableElement: c
2573
2573
  }) {
2574
2574
  return (a) => {
2575
- const u = (A) => Fo(A, c());
2575
+ const u = (A) => Lo(A, c());
2576
2576
  if (a.defaultPrevented || a.altKey || a.shiftKey || a.ctrlKey === a.metaKey || a.key.toLowerCase() !== "c") return;
2577
2577
  const { target: d, currentTarget: b } = a;
2578
2578
  if (!(d instanceof Element)) return;
@@ -2584,25 +2584,25 @@ function Il({
2584
2584
  v = w instanceof HTMLInputElement || w instanceof HTMLTextAreaElement ? w.value : no(S, n.state.editing?.drafts[S.spec.id], i, l), x = l.copiedCell;
2585
2585
  else if (_.length > 0) {
2586
2586
  v = to(e, i, l), x = l.copiedRows(_.length, i.count(_.length));
2587
- const A = new Set(_.map((L) => t.rowKey(L)));
2588
- y = Array.from(b.querySelectorAll("tr[data-motion]")).filter((L) => A.has(L.dataset.motion)).flatMap((L) => Array.from(L.children));
2587
+ const A = new Set(_.map((M) => t.rowKey(M)));
2588
+ y = Array.from(b.querySelectorAll("tr[data-motion]")).filter((M) => A.has(M.dataset.motion)).flatMap((M) => Array.from(M.children));
2589
2589
  } else if (o && n.state.active) {
2590
- const { line: A, column: L } = n.state.active, k = r.find((R) => R.key === A), O = s.find((R) => R.spec.id === L);
2591
- if (!k || k.row === void 0 || k.key !== Ue(t.rowKey(k.row)) || !O) return;
2592
- const M = Array.from(b.querySelectorAll("tr[data-grid-line]")).find((R) => R.dataset.gridLine === A)?.children[n.state.active.columnIndex];
2593
- M && (y = [M]), v = Hi(O, k.row, i, l), x = l.copiedCell;
2590
+ const { line: A, column: M } = n.state.active, k = r.find((T) => T.key === A), R = s.find((T) => T.spec.id === M);
2591
+ if (!k || k.row === void 0 || k.key !== Ue(t.rowKey(k.row)) || !R) return;
2592
+ const E = Array.from(b.querySelectorAll("tr[data-grid-line]")).find((T) => T.dataset.gridLine === A)?.children[n.state.active.columnIndex];
2593
+ E && (y = [E]), v = Hi(R, k.row, i, l), x = l.copiedCell;
2594
2594
  } else return;
2595
2595
  a.preventDefault();
2596
2596
  const C = (A) => {
2597
2597
  X("copy-failed", `The clipboard refused the copy (${String(A)}). It needs a secure context and a focused document.`), u(l.copyFailed);
2598
2598
  };
2599
2599
  Promise.resolve().then(() => navigator.clipboard.writeText(v)).then(() => {
2600
- Pl(y), u(x);
2600
+ Vl(y), u(x);
2601
2601
  }, C);
2602
2602
  };
2603
2603
  }
2604
- function $l({ table: e }) {
2605
- const [t, n] = I(null), o = Do(), r = q(null);
2604
+ function Il({ table: e }) {
2605
+ const [t, n] = P(null), o = Fo(), r = q(null);
2606
2606
  xe(() => {
2607
2607
  const i = e.current;
2608
2608
  if (!i) return;
@@ -2637,12 +2637,12 @@ function $l({ table: e }) {
2637
2637
  if (!t || !i) return;
2638
2638
  const l = 4, c = t.cell.bottom + l + i.offsetHeight <= window.innerHeight;
2639
2639
  i.style.top = `${c ? t.cell.bottom + l : t.cell.top - l - i.offsetHeight}px`, i.style.left = `${Math.max(8, Math.min(t.cell.left, window.innerWidth - 8 - i.offsetWidth))}px`, i.style.visibility = "";
2640
- }, [t]), t ? En(
2640
+ }, [t]), t ? On(
2641
2641
  /* @__PURE__ */ f("div", { ref: r, role: "tooltip", popover: s ? "manual" : void 0, className: h.cutTip, style: { visibility: "hidden", top: 0, left: 0 }, children: t.text }),
2642
2642
  t.target
2643
2643
  ) : null;
2644
2644
  }
2645
- function Ft(e, t) {
2645
+ function Lt(e, t) {
2646
2646
  const n = e.scrollWidth - e.clientWidth;
2647
2647
  e.toggleAttribute("data-beyond-start", !t.start && e.scrollLeft > 0.5), e.toggleAttribute("data-beyond-end", !t.end && e.scrollLeft < n - 0.5);
2648
2648
  }
@@ -2656,14 +2656,14 @@ function yo(e) {
2656
2656
  t.toggleAttribute("data-stuck", o);
2657
2657
  }
2658
2658
  }
2659
- function zl(e, t) {
2659
+ function $l(e, t) {
2660
2660
  const n = t.state.editing?.line;
2661
2661
  Z(() => {
2662
2662
  const o = e.hook;
2663
2663
  !o || n === void 0 || n === he || o.rows.some((r) => Ue(o.rowKey(r)) === n) || t.setState((r) => ({ ...r, editing: null }));
2664
2664
  });
2665
2665
  }
2666
- function Kl(e, t) {
2666
+ function zl(e, t) {
2667
2667
  Z(() => {
2668
2668
  const n = e.current;
2669
2669
  if (n?.parentElement && !t && n.parentElement.style.removeProperty("scroll-padding-top"), !n || !t) return;
@@ -2671,7 +2671,7 @@ function Kl(e, t) {
2671
2671
  n.style.setProperty("--u-table-head", `${o}px`), n.style.setProperty("--u-table-group-header", `${r}px`), n.parentElement?.style.setProperty("scroll-padding-top", `${o}px`), n.parentElement && yo(n.parentElement);
2672
2672
  });
2673
2673
  }
2674
- function Gl(e, t) {
2674
+ function Kl(e, t) {
2675
2675
  Z(() => {
2676
2676
  const n = e.takeFocusBeforeFold(), o = t.current;
2677
2677
  if (!n || !o || n.table !== o || n.element.isConnected) return;
@@ -2682,7 +2682,7 @@ function Gl(e, t) {
2682
2682
  }
2683
2683
  });
2684
2684
  }
2685
- function jl(e, t, n) {
2685
+ function Gl(e, t, n) {
2686
2686
  const o = q(null);
2687
2687
  Z(() => {
2688
2688
  const r = t.current?.tBodies[0];
@@ -2699,7 +2699,7 @@ function jl(e, t, n) {
2699
2699
  function Hl(e) {
2700
2700
  xe(() => {
2701
2701
  const t = e.current;
2702
- if (!(!Gt || !t)) {
2702
+ if (!(!Kt || !t)) {
2703
2703
  for (const n of Array.from(t.querySelectorAll(`tbody .${h.value}`))) {
2704
2704
  if (n.scrollHeight <= n.clientHeight + 1) continue;
2705
2705
  const o = n.closest("td, th"), r = o?.parentElement ? Array.from(o.parentElement.children).indexOf(o) : -1, s = t.tHead?.rows[0]?.cells[r]?.textContent?.trim() || `column ${r + 1}`;
@@ -2732,14 +2732,14 @@ function ql({
2732
2732
  drafting: o,
2733
2733
  sticking: r
2734
2734
  }) {
2735
- const { selectable: s = !1, loading: i = !1, grid: l = !1 } = n, c = t.publicSnapshot, a = e.projection(), u = e.rowHeader(), d = Xn(e), b = e.detail, p = e.hasRowActions() ? e.actions.ordered() : [], m = t.tableState.virtual, w = c.grouping, g = w.length > 0 ? a.visibleLines : void 0, v = g ? e.groupingEntries(t.rows) : [], x = (oe) => v.find((W) => W.spec.id === oe), y = g && w.length > 1 ? x(w.at(-1)) : void 0, _ = g ? d.filter((oe) => !w.includes(oe.spec.id)) : d, S = a.entries, C = S ? Bl(S, t, c, _[0]) : void 0, A = b !== null && !S, L = (s ? 1 : 0) + (A ? 1 : 0), k = L + (y ? 1 : 0), O = l && n.editMode === "row", M = l && (O || n.onRowAdd !== void 0 || n.onRowDelete !== void 0), R = p.length > 0 || M, E = k + _.length + (R ? 1 : 0), B = e.pins(), $ = _.filter((oe) => B[oe.spec.id] === "start").length, V = _.filter((oe) => B[oe.spec.id] === "end").length, K = y !== void 0 && B[y.spec.id] === "start", Y = p.length > 0 || n.onRowDelete !== void 0 || o, ce = e.actionsPinned() ? Y : o && M, j = {
2736
- start: $ > 0 || K ? k + $ : 0,
2737
- end: V > 0 ? V + (R ? 1 : 0) : R && ce ? 1 : 0,
2738
- count: E
2735
+ const { selectable: s = !1, loading: i = !1, grid: l = !1 } = n, c = t.publicSnapshot, a = e.projection(), u = e.rowHeader(), d = Xn(e), b = e.detail, p = e.hasRowActions() ? e.actions.ordered() : [], m = t.tableState.virtual, w = c.grouping, g = w.length > 0 ? a.visibleLines : void 0, v = g ? e.groupingEntries(t.rows) : [], x = (oe) => v.find((W) => W.spec.id === oe), y = g && w.length > 1 ? x(w.at(-1)) : void 0, _ = g ? d.filter((oe) => !w.includes(oe.spec.id)) : d, S = a.entries, C = S ? Dl(S, t, c, _[0]) : void 0, A = b !== null && !S, M = (s ? 1 : 0) + (A ? 1 : 0), k = M + (y ? 1 : 0), R = l && n.editMode === "row", E = l && (R || n.onRowAdd !== void 0 || n.onRowDelete !== void 0), T = p.length > 0 || E, O = k + _.length + (T ? 1 : 0), D = e.pins(), I = _.filter((oe) => D[oe.spec.id] === "start").length, B = _.filter((oe) => D[oe.spec.id] === "end").length, z = y !== void 0 && D[y.spec.id] === "start", Y = p.length > 0 || n.onRowDelete !== void 0 || o, ce = e.actionsPinned() ? Y : o && E, G = {
2736
+ start: I > 0 || z ? k + I : 0,
2737
+ end: B > 0 ? B + (T ? 1 : 0) : T && ce ? 1 : 0,
2738
+ count: O
2739
2739
  }, ne = {
2740
- start: r.start ? j.start : 0,
2741
- end: r.end || o && M ? j.end : 0,
2742
- count: E
2740
+ start: r.start ? G.start : 0,
2741
+ end: r.end || o && E ? G.end : 0,
2742
+ count: O
2743
2743
  }, de = a.visible, le = !i && !c.server && _.some((oe) => oe.spec.aggregate), ee = c.search !== "" || Object.keys(c.filter).length > 0;
2744
2744
  return {
2745
2745
  snapshot: c,
@@ -2756,14 +2756,14 @@ function ql({
2756
2756
  entries: S,
2757
2757
  tree: C,
2758
2758
  expanderColumn: A,
2759
- controlColumns: L,
2759
+ controlColumns: M,
2760
2760
  leading: k,
2761
- rowMode: O,
2762
- rowTools: M,
2763
- trailing: R,
2764
- columnCount: E,
2765
- pins: B,
2766
- pinned: j,
2761
+ rowMode: R,
2762
+ rowTools: E,
2763
+ trailing: T,
2764
+ columnCount: O,
2765
+ pins: D,
2766
+ pinned: G,
2767
2767
  blocks: ne,
2768
2768
  rows: de,
2769
2769
  footerShown: le,
@@ -2778,7 +2778,7 @@ function yn({
2778
2778
  wording: o,
2779
2779
  line: r
2780
2780
  }) {
2781
- const s = _e(Pe), i = s?.editing?.row === !0 && s.editing.line !== r, l = s?.remove, [c, a] = I(!1), u = q(!1), d = q(null), b = q(null);
2781
+ const s = _e(Ve), i = s?.editing?.row === !0 && s.editing.line !== r, l = s?.remove, [c, a] = P(!1), u = q(!1), d = q(null), b = q(null);
2782
2782
  xe(() => {
2783
2783
  c ? b.current?.focus() : u.current && d.current?.focus(), u.current = c;
2784
2784
  }, [c]);
@@ -2786,14 +2786,14 @@ function yn({
2786
2786
  if (i) return;
2787
2787
  const g = w.onSelect;
2788
2788
  g(w.bulk ? [t] : t);
2789
- }, m = l && (c ? /* @__PURE__ */ T(re, { children: [
2789
+ }, m = l && (c ? /* @__PURE__ */ j(re, { children: [
2790
2790
  /* @__PURE__ */ f("span", { className: h.deleteAsk, children: o.deleteRowAsk }),
2791
2791
  /* @__PURE__ */ f(Q, { className: h.toned, size: "sm", variant: "danger", "aria-label": o.rowAction(o.deleteRow, n), onClick: () => {
2792
2792
  a(!1), l(t);
2793
2793
  }, children: o.deleteRow }),
2794
2794
  /* @__PURE__ */ f(Q, { ref: b, size: "sm", variant: "ghost", "aria-label": o.rowAction(o.keepRow, n), onClick: () => a(!1), children: o.keepRow })
2795
2795
  ] }) : /* @__PURE__ */ f(Q, { ref: d, size: "sm", variant: "ghost", "aria-label": o.rowAction(o.deleteRow, n), onClick: () => !i && a(!0), children: o.deleteRow }));
2796
- return e.length <= Yl ? /* @__PURE__ */ T("div", { className: D(h.actions, c && h.decision), children: [
2796
+ return e.length <= Yl ? /* @__PURE__ */ j("div", { className: F(h.actions, c && h.decision), children: [
2797
2797
  !c && e.map(({ key: w, spec: g }) => /* @__PURE__ */ f(
2798
2798
  Q,
2799
2799
  {
@@ -2806,12 +2806,12 @@ function yn({
2806
2806
  w
2807
2807
  )),
2808
2808
  m
2809
- ] }) : /* @__PURE__ */ T("div", { className: D(h.actions, c && h.decision), children: [
2809
+ ] }) : /* @__PURE__ */ j("div", { className: F(h.actions, c && h.decision), children: [
2810
2810
  !c && /* @__PURE__ */ f(
2811
2811
  Nn,
2812
2812
  {
2813
2813
  align: "end",
2814
- trigger: /* @__PURE__ */ f(Bo, { size: "sm", variant: "ghost", "aria-label": o.rowActionsMenu(n), children: "⋯" }),
2814
+ trigger: /* @__PURE__ */ f(Do, { size: "sm", variant: "ghost", "aria-label": o.rowActionsMenu(n), children: "⋯" }),
2815
2815
  children: e.map(({ key: w, spec: g }) => /* @__PURE__ */ f(nt, { tone: g.tone, onSelect: () => p(g), children: g.label }, w))
2816
2816
  }
2817
2817
  ),
@@ -2819,8 +2819,8 @@ function yn({
2819
2819
  ] });
2820
2820
  }
2821
2821
  function Ul({ name: e, wording: t }) {
2822
- const n = _e(Pe), o = q(null);
2823
- return /* @__PURE__ */ T("div", { ref: o, className: D(h.actions, h.decision, h.draftButtons), children: [
2822
+ const n = _e(Ve), o = q(null);
2823
+ return /* @__PURE__ */ j("div", { ref: o, className: F(h.actions, h.decision, h.draftButtons), children: [
2824
2824
  /* @__PURE__ */ f(Q, { className: h.toned, size: "sm", variant: "primary", "aria-label": t.rowAction(t.saveRow, e), onClick: n.save, children: t.saveRow }),
2825
2825
  /* @__PURE__ */ f(Q, { size: "sm", variant: "ghost", "aria-label": t.rowAction(t.discardRow, e), onClick: n.discard, children: t.discardRow }),
2826
2826
  /* @__PURE__ */ f(
@@ -2840,10 +2840,10 @@ function Ul({ name: e, wording: t }) {
2840
2840
  }
2841
2841
  function Jl({ columns: e, rightAligned: t = [], rows: n = 4 }) {
2842
2842
  const o = [72, 48, 60, 40, 56, 64];
2843
- return /* @__PURE__ */ f(re, { children: Array.from({ length: n }, (r, s) => /* @__PURE__ */ f("tr", { "aria-hidden": "true", children: Array.from({ length: e }, (i, l) => /* @__PURE__ */ f("td", { className: D(h.td, t[l] && h.numeric), children: /* @__PURE__ */ f("span", { className: h.skeleton, style: { width: `${o[(s + l) % o.length]}%` } }) }, l)) }, s)) });
2843
+ return /* @__PURE__ */ f(re, { children: Array.from({ length: n }, (r, s) => /* @__PURE__ */ f("tr", { "aria-hidden": "true", children: Array.from({ length: e }, (i, l) => /* @__PURE__ */ f("td", { className: F(h.td, t[l] && h.numeric), children: /* @__PURE__ */ f("span", { className: h.skeleton, style: { width: `${o[(s + l) % o.length]}%` } }) }, l)) }, s)) });
2844
2844
  }
2845
2845
  const _o = /* @__PURE__ */ rt(0);
2846
- function Dt({ height: e, colSpan: t }) {
2846
+ function Ft({ height: e, colSpan: t }) {
2847
2847
  return typeof e == "number" && e <= 0 ? null : /* @__PURE__ */ f("tr", { "aria-hidden": "true", "data-filler": "", className: h.fillerRow, children: /* @__PURE__ */ f("td", { colSpan: t, style: { height: e } }) });
2848
2848
  }
2849
2849
  function ko({
@@ -2851,7 +2851,7 @@ function ko({
2851
2851
  colSpan: t,
2852
2852
  children: n
2853
2853
  }) {
2854
- const { count: o, fillerBefore: r, fillerAfter: s, showRow: i } = e, l = q(null), [c, a] = I(0), u = (p, m) => {
2854
+ const { count: o, fillerBefore: r, fillerAfter: s, showRow: i } = e, l = q(null), [c, a] = P(0), u = (p, m) => {
2855
2855
  l.current = m, a(m), i(m), requestAnimationFrame(() => {
2856
2856
  p.querySelector(`[data-row="${m}"]`)?.focus();
2857
2857
  });
@@ -2872,10 +2872,10 @@ function ko({
2872
2872
  const m = p.target.closest("[data-row]");
2873
2873
  m && a(Number(m.dataset.row));
2874
2874
  },
2875
- children: /* @__PURE__ */ T(_o, { value: d, children: [
2876
- /* @__PURE__ */ f(Dt, { height: r, colSpan: t }),
2875
+ children: /* @__PURE__ */ j(_o, { value: d, children: [
2876
+ /* @__PURE__ */ f(Ft, { height: r, colSpan: t }),
2877
2877
  n,
2878
- /* @__PURE__ */ f(Dt, { height: s, colSpan: t })
2878
+ /* @__PURE__ */ f(Ft, { height: s, colSpan: t })
2879
2879
  ] })
2880
2880
  }
2881
2881
  );
@@ -2883,7 +2883,7 @@ function ko({
2883
2883
  function Xl(e, t, n, o, r) {
2884
2884
  if (!t) return n.rowKey(e);
2885
2885
  const s = t.read(e);
2886
- return se(s) ? r.cellAbsentValue : Ve(s, t.spec.format, o, r) ?? n.rowKey(e);
2886
+ return se(s) ? r.cellAbsentValue : Be(s, t.spec.format, o, r) ?? n.rowKey(e);
2887
2887
  }
2888
2888
  function So({
2889
2889
  row: e,
@@ -2908,60 +2908,60 @@ function So({
2908
2908
  trailing: y,
2909
2909
  fresh: _ = !1
2910
2910
  }) {
2911
- const S = _e(_o), C = r.publicSnapshot, A = _ ? he : r.rowKey(e), L = _ ? m.newRow : Xl(e, i, r, p, m), k = _ ? he : Ue(A), O = _e(Pe)?.editing, M = O?.row === !0 && O.line === k, R = o.detail, E = _ ? void 0 : g?.entry(e), B = _ ? null : bo(o, C, e, A, E), $ = B !== null, V = B?.open ?? !1, K = B?.content, Y = `${b}-detail-${t}`, { className: ce, ...j } = d?.(e) ?? {}, ne = n !== void 0, de = w ? w.span ?? w.parents.at(-1) : void 0, le = R !== null && !g, ee = (l ? 1 : 0) + (le ? 1 : 0), oe = ee + (v ? 1 : 0), W = (F) => ct(a, F), ge = E !== void 0 && E.branch && !E.empty;
2912
- return /* @__PURE__ */ T(re, { children: [
2913
- /* @__PURE__ */ T(
2911
+ const S = _e(_o), C = r.publicSnapshot, A = _ ? he : r.rowKey(e), M = _ ? m.newRow : Xl(e, i, r, p, m), k = _ ? he : Ue(A), R = _e(Ve)?.editing, E = R?.row === !0 && R.line === k, T = o.detail, O = _ ? void 0 : g?.entry(e), D = _ ? null : bo(o, C, e, A, O), I = D !== null, B = D?.open ?? !1, z = D?.content, Y = `${b}-detail-${t}`, { className: ce, ...G } = d?.(e) ?? {}, ne = n !== void 0, de = w ? w.span ?? w.parents.at(-1) : void 0, le = T !== null && !g, ee = (l ? 1 : 0) + (le ? 1 : 0), oe = ee + (v ? 1 : 0), W = (L) => ct(a, L), ge = O !== void 0 && O.branch && !O.empty;
2912
+ return /* @__PURE__ */ j(re, { children: [
2913
+ /* @__PURE__ */ j(
2914
2914
  "tr",
2915
2915
  {
2916
- ...j,
2917
- className: D(
2916
+ ...G,
2917
+ className: F(
2918
2918
  ce,
2919
2919
  ne && h.virtualRow,
2920
- E && h.treeRow,
2920
+ O && h.treeRow,
2921
2921
  ge && h.branchRow,
2922
- E?.pathOnly && h.pathRow
2922
+ O?.pathOnly && h.pathRow
2923
2923
  ),
2924
- "data-before-root": E && !V && g?.beforeRoot(A) ? "" : void 0,
2924
+ "data-before-root": O && !B && g?.beforeRoot(A) ? "" : void 0,
2925
2925
  "data-row": ne ? n : void 0,
2926
2926
  "data-line": w ? "row" : void 0,
2927
2927
  "data-motion": A,
2928
2928
  "data-selected": l && C.selection.isSelected(A) ? "" : void 0,
2929
2929
  "data-group-first": w?.first ? "" : void 0,
2930
2930
  "data-group": de?.path,
2931
- "aria-level": w ? w.parents.length + 1 : E ? E.level + 1 : void 0,
2932
- "aria-posinset": de ? de.rows.indexOf(e) + 1 : E?.position,
2933
- "aria-setsize": de ? de.rows.length : E?.siblings,
2934
- "aria-expanded": ge ? E.expanded : void 0,
2935
- "data-branch": ge ? E.expanded ? "open" : "closed" : void 0,
2931
+ "aria-level": w ? w.parents.length + 1 : O ? O.level + 1 : void 0,
2932
+ "aria-posinset": de ? de.rows.indexOf(e) + 1 : O?.position,
2933
+ "aria-setsize": de ? de.rows.length : O?.siblings,
2934
+ "aria-expanded": ge ? O.expanded : void 0,
2935
+ "data-branch": ge ? O.expanded ? "open" : "closed" : void 0,
2936
2936
  tabIndex: ne && !x ? n === S ? 0 : -1 : void 0,
2937
2937
  "data-grid-line": x ? k : void 0,
2938
- "data-draft": M ? "" : void 0,
2938
+ "data-draft": E ? "" : void 0,
2939
2939
  "data-even": ne && n % 2 === 1 ? "" : void 0,
2940
2940
  "aria-rowindex": ne ? n + 2 : void 0,
2941
2941
  children: [
2942
- _ && Array.from({ length: ee + (v ? 1 : 0) }, (F, ae) => /* @__PURE__ */ f("td", { className: D(h.td, ae < ee && h.control, W(ae).className), style: W(ae).style }, ae)),
2943
- !_ && l && /* @__PURE__ */ f("td", { className: D(h.td, h.control, W(0).className), style: W(0).style, children: /* @__PURE__ */ f(
2942
+ _ && Array.from({ length: ee + (v ? 1 : 0) }, (L, ae) => /* @__PURE__ */ f("td", { className: F(h.td, ae < ee && h.control, W(ae).className), style: W(ae).style }, ae)),
2943
+ !_ && l && /* @__PURE__ */ f("td", { className: F(h.td, h.control, W(0).className), style: W(0).style, children: /* @__PURE__ */ f(
2944
2944
  We,
2945
2945
  {
2946
- "aria-label": m.selectRow(L),
2946
+ "aria-label": m.selectRow(M),
2947
2947
  checked: C.selection.isSelected(A),
2948
2948
  onChange: () => C.selection.toggle(A)
2949
2949
  }
2950
2950
  ) }),
2951
- !_ && le && /* @__PURE__ */ f("td", { className: D(h.td, h.control, W(ee - 1).className), style: W(ee - 1).style, children: $ && /* @__PURE__ */ f(
2951
+ !_ && le && /* @__PURE__ */ f("td", { className: F(h.td, h.control, W(ee - 1).className), style: W(ee - 1).style, children: I && /* @__PURE__ */ f(
2952
2952
  "button",
2953
2953
  {
2954
2954
  type: "button",
2955
- "aria-expanded": V,
2956
- "aria-controls": V ? Y : void 0,
2957
- "aria-label": V ? m.collapseRowNamed(L) : m.expandRowNamed(L),
2958
- className: D(h.expander, V && h.expanderOpen),
2955
+ "aria-expanded": B,
2956
+ "aria-controls": B ? Y : void 0,
2957
+ "aria-label": B ? m.collapseRowNamed(M) : m.expandRowNamed(M),
2958
+ className: F(h.expander, B && h.expanderOpen),
2959
2959
  onClick: () => C.toggleRow(A),
2960
- children: /* @__PURE__ */ f(Vo, {})
2960
+ children: /* @__PURE__ */ f(Bo, {})
2961
2961
  }
2962
2962
  ) }),
2963
2963
  w && w.span && /* @__PURE__ */ f(
2964
- Ol,
2964
+ Rl,
2965
2965
  {
2966
2966
  line: { ...w, span: w.span },
2967
2967
  entry: v,
@@ -2972,29 +2972,29 @@ function So({
2972
2972
  wording: m
2973
2973
  }
2974
2974
  ),
2975
- s.map((F, ae) => /* @__PURE__ */ f(
2975
+ s.map((L, ae) => /* @__PURE__ */ f(
2976
2976
  ea,
2977
2977
  {
2978
- entry: F,
2978
+ entry: L,
2979
2979
  row: e,
2980
- kind: o.kindOf(F, r.rows),
2980
+ kind: o.kindOf(L, r.rows),
2981
2981
  pin: W(oe + ae),
2982
2982
  formats: p,
2983
2983
  wording: m,
2984
2984
  line: k,
2985
- rowName: L,
2986
- width: C.widths[F.spec.id],
2987
- tree: E && F === g?.column ? { setup: g, entry: E, detail: $ && !ge ? { open: V, toggle: () => C.toggleRow(A) } : void 0 } : void 0
2985
+ rowName: M,
2986
+ width: C.widths[L.spec.id],
2987
+ tree: O && L === g?.column ? { setup: g, entry: O, detail: I && !ge ? { open: B, toggle: () => C.toggleRow(A) } : void 0 } : void 0
2988
2988
  },
2989
- F.key
2989
+ L.key
2990
2990
  )),
2991
2991
  y && /* @__PURE__ */ f(
2992
2992
  Ql,
2993
2993
  {
2994
- draft: M,
2994
+ draft: E,
2995
2995
  actions: _ ? [] : c,
2996
2996
  row: e,
2997
- name: L,
2997
+ name: M,
2998
2998
  wording: m,
2999
2999
  line: k,
3000
3000
  pin: W(u - 1)
@@ -3003,16 +3003,16 @@ function So({
3003
3003
  ]
3004
3004
  }
3005
3005
  ),
3006
- V && /* @__PURE__ */ f(
3006
+ B && /* @__PURE__ */ f(
3007
3007
  Zl,
3008
3008
  {
3009
3009
  id: Y,
3010
3010
  group: de?.path,
3011
3011
  gridLine: x ? `detail:${A}` : void 0,
3012
- beforeRoot: E && g?.beforeRoot(A) ? "" : void 0,
3012
+ beforeRoot: O && g?.beforeRoot(A) ? "" : void 0,
3013
3013
  colSpan: u,
3014
- entry: E,
3015
- children: K
3014
+ entry: O,
3015
+ children: z
3016
3016
  }
3017
3017
  )
3018
3018
  ] });
@@ -3026,7 +3026,7 @@ function Ql({
3026
3026
  line: s,
3027
3027
  pin: i
3028
3028
  }) {
3029
- return /* @__PURE__ */ f("td", { className: D(h.td, h.actionsCell, i.className, e && h.editing), style: i.style, children: e ? /* @__PURE__ */ T(re, { children: [
3029
+ return /* @__PURE__ */ f("td", { className: F(h.td, h.actionsCell, i.className, e && h.editing), style: i.style, children: e ? /* @__PURE__ */ j(re, { children: [
3030
3030
  /* @__PURE__ */ f(Ul, { name: o, wording: r }),
3031
3031
  /* @__PURE__ */ f("span", { className: h.held, "aria-hidden": "true", children: /* @__PURE__ */ f(yn, { actions: t, row: n, name: o, wording: r, line: s }) })
3032
3032
  ] }) : /* @__PURE__ */ f(yn, { actions: t, row: n, name: o, wording: r, line: s }) });
@@ -3044,7 +3044,7 @@ function Zl({
3044
3044
  "td",
3045
3045
  {
3046
3046
  colSpan: r,
3047
- className: D(h.detailCell, s && h.treeDetail),
3047
+ className: F(h.detailCell, s && h.treeDetail),
3048
3048
  style: s ? { "--tree-level": s.level } : void 0,
3049
3049
  children: s ? /* @__PURE__ */ f("div", { className: h.treeDetailRail, children: i }) : i
3050
3050
  }
@@ -3062,25 +3062,25 @@ function ea({
3062
3062
  tree: c,
3063
3063
  width: a
3064
3064
  }) {
3065
- const { spec: u } = e, d = e.read(t), b = Pt(n, u.rightAligned), p = vl(i, u.id), w = !(_e(Pe) !== null) || u.edit === void 0 ? void 0 : u.edit === "text" || u.edit === "number" ? "type" : "pick";
3065
+ const { spec: u } = e, d = e.read(t), b = Vt(n, u.rightAligned), p = vl(i, u.id), w = !(_e(Ve) !== null) || u.edit === void 0 ? void 0 : u.edit === "text" || u.edit === "number" ? "type" : "pick";
3066
3066
  let g;
3067
- se(d) ? g = /* @__PURE__ */ f(ho, { wording: s }) : u.presentation ? g = u.presentation(d, t) : g = Ve(d, u.format, r, s);
3067
+ se(d) ? g = /* @__PURE__ */ f(ho, { wording: s }) : u.presentation ? g = u.presentation(d, t) : g = Be(d, u.format, r, s);
3068
3068
  const v = typeof g == "string";
3069
3069
  g = /* @__PURE__ */ f(
3070
3070
  "div",
3071
3071
  {
3072
- className: D(h.value, v && h.valueText, a !== void 0 && h.sized, p && h.editingValue),
3072
+ className: F(h.value, v && h.valueText, a !== void 0 && h.sized, p && h.editingValue),
3073
3073
  style: a !== void 0 ? { "--_width": `${a}px` } : void 0,
3074
3074
  "aria-hidden": p ? !0 : void 0,
3075
3075
  children: g
3076
3076
  }
3077
- ), c && (g = /* @__PURE__ */ f(Dl, { ...c, name: l, wording: s, children: g }));
3077
+ ), c && (g = /* @__PURE__ */ f(Fl, { ...c, name: l, wording: s, children: g }));
3078
3078
  const x = u.rowHeader ? "th" : "td";
3079
- return /* @__PURE__ */ T(
3079
+ return /* @__PURE__ */ j(
3080
3080
  x,
3081
3081
  {
3082
3082
  scope: u.rowHeader ? "row" : void 0,
3083
- className: D(h.td, b && h.numeric, u.rowHeader && h.rowHeader, o.className, p && h.editing),
3083
+ className: F(h.td, b && h.numeric, u.rowHeader && h.rowHeader, o.className, p && h.editing),
3084
3084
  style: o.style,
3085
3085
  "data-edit": w,
3086
3086
  "data-editing": p ? u.id : void 0,
@@ -3091,7 +3091,7 @@ function ea({
3091
3091
  }
3092
3092
  );
3093
3093
  }
3094
- function Bt(e, t, n, o, r) {
3094
+ function Dt(e, t, n, o, r) {
3095
3095
  const { registry: s, hook: i, layout: l } = e;
3096
3096
  return /* @__PURE__ */ f(
3097
3097
  So,
@@ -3158,7 +3158,7 @@ function na(e) {
3158
3158
  rows: e.pageSize ? e.heldLines || e.pageSize : void 0,
3159
3159
  rightAligned: [
3160
3160
  ...Array.from({ length: o.controlColumns + (o.spanEntry ? 1 : 0) }, () => !1),
3161
- ...o.dataColumns.map((r) => Pt(t.kindOf(r, n.rows), r.spec.rightAligned))
3161
+ ...o.dataColumns.map((r) => Vt(t.kindOf(r, n.rows), r.spec.rightAligned))
3162
3162
  ]
3163
3163
  }
3164
3164
  ) });
@@ -3171,7 +3171,7 @@ function oa(e) {
3171
3171
  colSpan: n.columnCount,
3172
3172
  className: h.emptyCell,
3173
3173
  style: e.pageSize && e.heldLines ? { height: `calc(var(--_pitch) * ${e.heldLines})`, verticalAlign: "top" } : void 0,
3174
- children: /* @__PURE__ */ f("div", { className: h.empty, children: (r.server || t.admitted.length > 0) && n.restricted ? /* @__PURE__ */ T(re, { children: [
3174
+ children: /* @__PURE__ */ f("div", { className: h.empty, children: (r.server || t.admitted.length > 0) && n.restricted ? /* @__PURE__ */ j(re, { children: [
3175
3175
  /* @__PURE__ */ f("p", { className: h.emptyTitle, children: o.nothingMatchesFilters }),
3176
3176
  /* @__PURE__ */ f(Q, { size: "sm", variant: "ghost", onClick: () => Qn(r), children: o.resetAll })
3177
3177
  ] }) : e.empty ?? /* @__PURE__ */ f("p", { className: h.emptyTitle, children: o.noEntries }) })
@@ -3179,8 +3179,8 @@ function oa(e) {
3179
3179
  ) }) });
3180
3180
  }
3181
3181
  function ra(e, t) {
3182
- const { hook: n, layout: o, wording: r, formats: s } = e, { virtual: i, grouping: l, projection: c } = o, a = i ? Dn(t).map((m) => m.kind === "folded" || !m.continued ? m : { ...m, continued: !1 }) : t, u = a.length - t.length, d = i && i.from > 0 ? i.fillerBefore / i.from : 0, b = (m, w, g, v) => /* @__PURE__ */ f(
3183
- El,
3182
+ const { hook: n, layout: o, wording: r, formats: s } = e, { virtual: i, grouping: l, projection: c } = o, a = i ? Fn(t).map((m) => m.kind === "folded" || !m.continued ? m : { ...m, continued: !1 }) : t, u = a.length - t.length, d = i && i.from > 0 ? i.fillerBefore / i.from : 0, b = (m, w, g, v) => /* @__PURE__ */ f(
3183
+ Ol,
3184
3184
  {
3185
3185
  line: m,
3186
3186
  index: g,
@@ -3203,7 +3203,7 @@ function ra(e, t) {
3203
3203
  w
3204
3204
  ), p = (m, w) => {
3205
3205
  const g = w - u, v = i ? i.from + g : g;
3206
- return g < 0 ? m.kind === "row" ? null : b(m, `${m.kind}:${m.group.path}:repeated`, w, void 0) : m.kind === "row" ? Bt(e, m.row, g, v, m) : b(
3206
+ return g < 0 ? m.kind === "row" ? null : b(m, `${m.kind}:${m.group.path}:repeated`, w, void 0) : m.kind === "row" ? Dt(e, m.row, g, v, m) : b(
3207
3207
  m,
3208
3208
  `${m.kind}:${m.group.path}${m.kind === "header" && m.continued ? ":continued" : ""}`,
3209
3209
  g,
@@ -3217,22 +3217,22 @@ function ra(e, t) {
3217
3217
  colSpan: o.columnCount,
3218
3218
  children: a.map(p)
3219
3219
  }
3220
- ) : /* @__PURE__ */ T("tbody", { children: [
3220
+ ) : /* @__PURE__ */ j("tbody", { children: [
3221
3221
  t.map(p),
3222
3222
  e.filler
3223
3223
  ] });
3224
3224
  }
3225
3225
  function sa(e, t, n, o) {
3226
- return n && t > 0 && t < e ? /* @__PURE__ */ f(Dt, { height: `calc(var(--_pitch) * ${e - t})`, colSpan: o }) : null;
3226
+ return n && t > 0 && t < e ? /* @__PURE__ */ f(Ft, { height: `calc(var(--_pitch) * ${e - t})`, colSpan: o }) : null;
3227
3227
  }
3228
3228
  function ia(e, t, n) {
3229
3229
  const { layout: o } = e, { virtual: r, lines: s, rows: i, projection: l } = o;
3230
3230
  return t && !n ? { body: na(e), empty: !1 } : l.filtered.length === 0 ? { body: oa(e), empty: !0 } : s ? { body: ra(e, s), empty: !1 } : r ? {
3231
- body: /* @__PURE__ */ f(ko, { virtual: r, colSpan: o.columnCount, children: i.map((c, a) => Bt(e, c, a, r.from + a)) }),
3231
+ body: /* @__PURE__ */ f(ko, { virtual: r, colSpan: o.columnCount, children: i.map((c, a) => Dt(e, c, a, r.from + a)) }),
3232
3232
  empty: !1
3233
3233
  } : {
3234
- body: /* @__PURE__ */ T("tbody", { children: [
3235
- i.map((c, a) => Bt(e, c, a, a)),
3234
+ body: /* @__PURE__ */ j("tbody", { children: [
3235
+ i.map((c, a) => Dt(e, c, a, a)),
3236
3236
  e.filler
3237
3237
  ] }),
3238
3238
  empty: !1
@@ -3244,62 +3244,62 @@ function _n({
3244
3244
  hook: n,
3245
3245
  pin: o
3246
3246
  }) {
3247
- const { spec: r } = e, s = n.publicSnapshot, i = t.kindOf(e, n.rows), l = Pt(i, r.rightAligned), c = t.isSortable(e, n.rows), a = r.id, u = s.sort.findIndex((S) => S.column === a), d = u === -1 ? void 0 : s.sort[u].direction, b = s.sort.length > 1 && u !== -1 ? u + 1 : void 0, p = s.widths[a], m = 48, w = (S) => {
3247
+ const { spec: r } = e, s = n.publicSnapshot, i = t.kindOf(e, n.rows), l = Vt(i, r.rightAligned), c = t.isSortable(e, n.rows), a = r.id, u = s.sort.findIndex((S) => S.column === a), d = u === -1 ? void 0 : s.sort[u].direction, b = s.sort.length > 1 && u !== -1 ? u + 1 : void 0, p = s.widths[a], m = 48, w = (S) => {
3248
3248
  S.stopPropagation(), S.preventDefault();
3249
3249
  const C = S.currentTarget, A = C.closest("th");
3250
3250
  if (!A) return;
3251
- const L = S.clientX, k = A.getBoundingClientRect().width, O = S.pointerId;
3252
- C.setPointerCapture(O);
3253
- const M = (E) => {
3254
- E.pointerId === O && s.setWidth(a, Math.max(m, k + (E.clientX - L)));
3255
- }, R = (E) => {
3256
- E.pointerId === O && (C.removeEventListener("pointermove", M), C.removeEventListener("pointerup", R), C.removeEventListener("pointercancel", R), C.hasPointerCapture(O) && C.releasePointerCapture(O));
3251
+ const M = S.clientX, k = A.getBoundingClientRect().width, R = S.pointerId;
3252
+ C.setPointerCapture(R);
3253
+ const E = (O) => {
3254
+ O.pointerId === R && s.setWidth(a, Math.max(m, k + (O.clientX - M)));
3255
+ }, T = (O) => {
3256
+ O.pointerId === R && (C.removeEventListener("pointermove", E), C.removeEventListener("pointerup", T), C.removeEventListener("pointercancel", T), C.hasPointerCapture(R) && C.releasePointerCapture(R));
3257
3257
  };
3258
- C.addEventListener("pointermove", M), C.addEventListener("pointerup", R), C.addEventListener("pointercancel", R);
3258
+ C.addEventListener("pointermove", E), C.addEventListener("pointerup", T), C.addEventListener("pointercancel", T);
3259
3259
  }, g = (S) => {
3260
3260
  const C = S?.parentElement, A = S?.closest("table");
3261
3261
  if (!S || !C || !A) return;
3262
- const L = Array.from(C.children).indexOf(S), k = C.children.length, O = { cell: S.style.width, table: A.style.width };
3262
+ const M = Array.from(C.children).indexOf(S), k = C.children.length, R = { cell: S.style.width, table: A.style.width };
3263
3263
  S.style.width = "", A.style.width = "auto";
3264
- let M = 0;
3265
- for (const R of Array.from(A.rows)) {
3266
- if (R.cells.length !== k) continue;
3267
- const E = R.cells[L];
3268
- if (!E) continue;
3269
- const B = E.querySelector(`.${h.value}`), $ = getComputedStyle(E), V = (parseFloat($.paddingLeft) || 0) + (parseFloat($.paddingRight) || 0), K = E.querySelector(`.${h.headLabel}`), Y = K ? K.scrollWidth - K.clientWidth : 0;
3270
- M = Math.max(M, E.scrollWidth + Y, B ? B.scrollWidth + V : 0);
3264
+ let E = 0;
3265
+ for (const T of Array.from(A.rows)) {
3266
+ if (T.cells.length !== k) continue;
3267
+ const O = T.cells[M];
3268
+ if (!O) continue;
3269
+ const D = O.querySelector(`.${h.value}`), I = getComputedStyle(O), B = (parseFloat(I.paddingLeft) || 0) + (parseFloat(I.paddingRight) || 0), z = O.querySelector(`.${h.headLabel}`), Y = z ? z.scrollWidth - z.clientWidth : 0;
3270
+ E = Math.max(E, O.scrollWidth + Y, D ? D.scrollWidth + B : 0);
3271
3271
  }
3272
- S.style.width = O.cell, A.style.width = O.table, M > 0 && s.setWidth(a, Math.max(m, M + 1));
3272
+ S.style.width = R.cell, A.style.width = R.table, E > 0 && s.setWidth(a, Math.max(m, E + 1));
3273
3273
  }, v = (S) => {
3274
3274
  if (!r.resizable || !S.altKey) return;
3275
- const C = S.key === "ArrowRight", A = S.key === "ArrowLeft", L = S.key === "Home";
3276
- if (!C && !A && !L) return;
3275
+ const C = S.key === "ArrowRight", A = S.key === "ArrowLeft", M = S.key === "Home";
3276
+ if (!C && !A && !M) return;
3277
3277
  S.preventDefault();
3278
3278
  const k = S.currentTarget;
3279
- if (L) {
3279
+ if (M) {
3280
3280
  g(k);
3281
3281
  return;
3282
3282
  }
3283
- const O = k.getBoundingClientRect().width, M = S.shiftKey ? 32 : 8;
3284
- s.setWidth(a, Math.max(m, O + (C ? M : -M)));
3285
- }, x = c ? /* @__PURE__ */ T(
3283
+ const R = k.getBoundingClientRect().width, E = S.shiftKey ? 32 : 8;
3284
+ s.setWidth(a, Math.max(m, R + (C ? E : -E)));
3285
+ }, x = c ? /* @__PURE__ */ j(
3286
3286
  "button",
3287
3287
  {
3288
3288
  type: "button",
3289
- className: D(h.sortButton, h.headLine),
3289
+ className: F(h.sortButton, h.headLine),
3290
3290
  onClick: (S) => s.toggleSort(a, S.shiftKey || S.metaKey),
3291
3291
  children: [
3292
3292
  /* @__PURE__ */ f("span", { className: h.headLabel, children: r.label }),
3293
3293
  b !== void 0 && /* @__PURE__ */ f("span", { className: h.sortRank, "aria-hidden": "true", children: b }),
3294
- /* @__PURE__ */ f("span", { className: D(h.sortIndicator, d && h.sortActive), "aria-hidden": "true", children: d ? /* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", className: D(h.sortArrow, d === "desc" && h.sortArrowDesc), children: /* @__PURE__ */ f("path", { d: "M2.2 6.2 5 3.4l2.8 2.8", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) }) : (
3294
+ /* @__PURE__ */ f("span", { className: F(h.sortIndicator, d && h.sortActive), "aria-hidden": "true", children: d ? /* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", className: F(h.sortArrow, d === "desc" && h.sortArrowDesc), children: /* @__PURE__ */ f("path", { d: "M2.2 6.2 5 3.4l2.8 2.8", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) }) : (
3295
3295
  /* Drawn in the nominal box and set in the 12 pixels the indicator
3296
3296
  takes, so that the head does not move. */
3297
3297
  /* @__PURE__ */ f("svg", { viewBox: "0 0 10 10", width: "10", height: "12", "aria-hidden": "true", children: /* @__PURE__ */ f("path", { d: "M2.8 3.7 5 1.5l2.2 2.2M2.8 6.3 5 8.5l2.2-2.2", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }) })
3298
3298
  ) })
3299
3299
  ]
3300
3300
  }
3301
- ) : /* @__PURE__ */ f("span", { className: h.headLine, children: /* @__PURE__ */ f("span", { className: h.headLabel, children: r.label }) }), y = d === "asc" ? "ascending" : d === "desc" ? "descending" : "none", _ = Ee(r.filter) !== void 0 && !(r.filter === "list" && i === "other");
3302
- return /* @__PURE__ */ T(
3301
+ ) : /* @__PURE__ */ f("span", { className: h.headLine, children: /* @__PURE__ */ f("span", { className: h.headLabel, children: r.label }) }), y = d === "asc" ? "ascending" : d === "desc" ? "descending" : "none", _ = Oe(r.filter) !== void 0 && !(r.filter === "list" && i === "other");
3302
+ return /* @__PURE__ */ j(
3303
3303
  "th",
3304
3304
  {
3305
3305
  scope: "col",
@@ -3307,13 +3307,13 @@ function _n({
3307
3307
  "aria-sort": c ? y : void 0,
3308
3308
  tabIndex: r.resizable && !c ? 0 : void 0,
3309
3309
  onKeyDown: v,
3310
- className: D(h.th, l && h.numeric, p !== void 0 && h.sized, o.className),
3310
+ className: F(h.th, l && h.numeric, p !== void 0 && h.sized, o.className),
3311
3311
  style: {
3312
3312
  ...p !== void 0 ? { width: p } : {},
3313
3313
  ...o.style
3314
3314
  },
3315
3315
  children: [
3316
- _ ? /* @__PURE__ */ T("span", { className: h.thFlex, children: [
3316
+ _ ? /* @__PURE__ */ j("span", { className: h.thFlex, children: [
3317
3317
  x,
3318
3318
  /* @__PURE__ */ f(Wi, { entry: e, registry: t, hook: n })
3319
3319
  ] }) : x,
@@ -3341,8 +3341,8 @@ function la({
3341
3341
  wording: r
3342
3342
  }) {
3343
3343
  const { selectable: s = !1, grid: i = !1 } = o, { snapshot: l, virtual: c, spanEntry: a, dataColumns: u, expanderColumn: d, controlColumns: b, leading: p, rowMode: m, rowTools: w, trailing: g, columnCount: v, blocks: x } = n, y = (_, S = _) => ct(x, _, S);
3344
- return /* @__PURE__ */ f("thead", { children: /* @__PURE__ */ T("tr", { "aria-rowindex": c ? 1 : void 0, "data-grid-line": Yt(i, "head"), children: [
3345
- s && /* @__PURE__ */ f("th", { scope: "col", className: D(h.th, h.control, y(0).className), style: y(0).style, children: /* @__PURE__ */ f(
3344
+ return /* @__PURE__ */ f("thead", { children: /* @__PURE__ */ j("tr", { "aria-rowindex": c ? 1 : void 0, "data-grid-line": Yt(i, "head"), children: [
3345
+ s && /* @__PURE__ */ f("th", { scope: "col", className: F(h.th, h.control, y(0).className), style: y(0).style, children: /* @__PURE__ */ f(
3346
3346
  We,
3347
3347
  {
3348
3348
  "aria-label": l.server ? r.selectAllOnPage : r.selectAllRows,
@@ -3354,26 +3354,26 @@ function la({
3354
3354
  d && /* @__PURE__ */ f(
3355
3355
  "td",
3356
3356
  {
3357
- className: D(h.th, h.control, y(b - 1).className),
3357
+ className: F(h.th, h.control, y(b - 1).className),
3358
3358
  style: y(b - 1).style
3359
3359
  }
3360
3360
  ),
3361
- a && (e.columnById(a.spec.id) === a ? /* @__PURE__ */ f(_n, { entry: a, registry: e, hook: t, pin: y(b) }) : /* @__PURE__ */ f("th", { scope: "col", className: D(h.th, y(b).className), style: y(b).style, children: a.spec.label })),
3361
+ a && (e.columnById(a.spec.id) === a ? /* @__PURE__ */ f(_n, { entry: a, registry: e, hook: t, pin: y(b) }) : /* @__PURE__ */ f("th", { scope: "col", className: F(h.th, y(b).className), style: y(b).style, children: a.spec.label })),
3362
3362
  u.map((_, S) => /* @__PURE__ */ f(_n, { entry: _, registry: e, hook: t, pin: y(p + S) }, _.key)),
3363
- g && /* @__PURE__ */ T(
3363
+ g && /* @__PURE__ */ j(
3364
3364
  "th",
3365
3365
  {
3366
3366
  scope: "col",
3367
- className: D(h.th, h.actionsCell, y(v - 1).className),
3367
+ className: F(h.th, h.actionsCell, y(v - 1).className),
3368
3368
  style: y(v - 1).style,
3369
3369
  children: [
3370
- /* @__PURE__ */ f(Oe, { children: r.rowActions }),
3371
- w && /* @__PURE__ */ T("span", { className: h.reserve, "aria-hidden": "true", children: [
3372
- (m || o.onRowAdd) && /* @__PURE__ */ T("span", { className: D(h.actions, h.decision), children: [
3370
+ /* @__PURE__ */ f(Re, { children: r.rowActions }),
3371
+ w && /* @__PURE__ */ j("span", { className: h.reserve, "aria-hidden": "true", children: [
3372
+ (m || o.onRowAdd) && /* @__PURE__ */ j("span", { className: F(h.actions, h.decision), children: [
3373
3373
  /* @__PURE__ */ f(Q, { tabIndex: -1, size: "sm", children: r.saveRow }),
3374
3374
  /* @__PURE__ */ f(Q, { tabIndex: -1, size: "sm", children: r.discardRow })
3375
3375
  ] }),
3376
- o.onRowDelete && /* @__PURE__ */ T("span", { className: D(h.actions, h.decision), children: [
3376
+ o.onRowDelete && /* @__PURE__ */ j("span", { className: F(h.actions, h.decision), children: [
3377
3377
  /* @__PURE__ */ f("span", { className: h.deleteAsk, children: r.deleteRowAsk }),
3378
3378
  /* @__PURE__ */ f(Q, { tabIndex: -1, size: "sm", children: r.deleteRow }),
3379
3379
  /* @__PURE__ */ f(Q, { tabIndex: -1, size: "sm", children: r.keepRow })
@@ -3391,9 +3391,9 @@ function aa({
3391
3391
  wording: o
3392
3392
  }) {
3393
3393
  const { projection: r, virtual: s, spanEntry: i, dataColumns: l, controlColumns: c, leading: a, trailing: u, columnCount: d, blocks: b } = e, p = (m, w = m) => ct(b, m, w);
3394
- return /* @__PURE__ */ f("tfoot", { children: /* @__PURE__ */ T("tr", { "aria-rowindex": s ? (r.lines ?? r.shown ?? r.filtered).length + 2 : void 0, "data-grid-line": Yt(t, "foot"), children: [
3395
- Array.from({ length: c }, (m, w) => /* @__PURE__ */ f("td", { className: D(h.td, h.control, p(w).className), style: p(w).style }, w)),
3396
- i && /* @__PURE__ */ f("td", { className: D(h.td, p(c).className), style: p(c).style }),
3394
+ return /* @__PURE__ */ f("tfoot", { children: /* @__PURE__ */ j("tr", { "aria-rowindex": s ? (r.lines ?? r.shown ?? r.filtered).length + 2 : void 0, "data-grid-line": Yt(t, "foot"), children: [
3395
+ Array.from({ length: c }, (m, w) => /* @__PURE__ */ f("td", { className: F(h.td, h.control, p(w).className), style: p(w).style }, w)),
3396
+ i && /* @__PURE__ */ f("td", { className: F(h.td, p(c).className), style: p(c).style }),
3397
3397
  l.map((m, w) => /* @__PURE__ */ f(
3398
3398
  ca,
3399
3399
  {
@@ -3406,7 +3406,7 @@ function aa({
3406
3406
  },
3407
3407
  m.key
3408
3408
  )),
3409
- u && /* @__PURE__ */ f("td", { className: D(h.td, p(d - 1).className), style: p(d - 1).style })
3409
+ u && /* @__PURE__ */ f("td", { className: F(h.td, p(d - 1).className), style: p(d - 1).style })
3410
3410
  ] }) });
3411
3411
  }
3412
3412
  function ca({
@@ -3417,18 +3417,18 @@ function ca({
3417
3417
  pin: r = mo,
3418
3418
  topLevel: s = !1
3419
3419
  }) {
3420
- if (!e.spec.aggregate) return /* @__PURE__ */ f("td", { className: D(h.td, r.className), style: r.style });
3420
+ if (!e.spec.aggregate) return /* @__PURE__ */ f("td", { className: F(h.td, r.className), style: r.style });
3421
3421
  const i = typeof e.spec.aggregate == "function" ? "own" : e.spec.aggregate;
3422
- return /* @__PURE__ */ T(
3422
+ return /* @__PURE__ */ j(
3423
3423
  "td",
3424
3424
  {
3425
- className: D(h.td, po(e, t) && h.numeric, r.className),
3425
+ className: F(h.td, po(e, t) && h.numeric, r.className),
3426
3426
  style: r.style,
3427
3427
  "data-footer": i,
3428
3428
  title: s ? o.footerTopLevel : void 0,
3429
3429
  children: [
3430
- /* @__PURE__ */ f(Ot, { entry: e, rows: t, formats: n, wording: o, signed: !0 }),
3431
- s && /* @__PURE__ */ f(Oe, { children: ` (${o.footerTopLevel})` })
3430
+ /* @__PURE__ */ f(Rt, { entry: e, rows: t, formats: n, wording: o, signed: !0 }),
3431
+ s && /* @__PURE__ */ f(Re, { children: ` (${o.footerTopLevel})` })
3432
3432
  ]
3433
3433
  }
3434
3434
  );
@@ -3482,11 +3482,11 @@ function fa({ table: e, blocks: t }) {
3482
3482
  return Z(() => {
3483
3483
  n.current = t;
3484
3484
  const o = e.current?.parentElement;
3485
- o && Ft(o, t);
3485
+ o && Lt(o, t);
3486
3486
  }), xe(() => {
3487
3487
  const o = e.current, r = o?.parentElement;
3488
3488
  if (!o || !r || typeof ResizeObserver > "u") return;
3489
- const s = new ResizeObserver(() => Ft(r, n.current));
3489
+ const s = new ResizeObserver(() => Lt(r, n.current));
3490
3490
  return s.observe(r), s.observe(o), () => s.disconnect();
3491
3491
  }, [e]), null;
3492
3492
  }
@@ -3504,17 +3504,17 @@ function ha({ registry: e, props: t }) {
3504
3504
  grid: d = !1
3505
3505
  } = t;
3506
3506
  st(e.subscribe, e.bodyVersion, e.bodyVersion);
3507
- const b = ie(), p = ke(), m = Po(s, "regular"), w = be(), g = q(null), [v, x] = I(0), y = cl(), [_, S] = I({ start: !0, end: !0 });
3508
- zl(e, y), Kl(g, o), Gl(e, g), jl(e, g, c), Hl(g), Wl(e, g);
3507
+ const b = ie(), p = ke(), m = Vo(s, "regular"), w = be(), g = q(null), [v, x] = P(0), y = cl(), [_, S] = P({ start: !0, end: !0 });
3508
+ $l(e, y), zl(g, o), Kl(e, g), Gl(e, g, c), Hl(g), Wl(e, g);
3509
3509
  const C = e.hook && !e.hook.tableState.virtual ? e.hook.publicSnapshot : null;
3510
3510
  nl(g, C ? `${C.grouping.join("|")}#${C.folded.join("|")}` : "");
3511
3511
  const A = e.hook;
3512
3512
  if (!A) return null;
3513
- const L = y.state.editing?.row === !0, k = ql({ registry: e, hook: A, props: t, drafting: L, sticking: _ }), { snapshot: O, projection: M, virtual: R, lines: E, entries: B, grouping: $, dataColumns: V, columnCount: K, pins: Y, pinned: ce, blocks: j, rows: ne, footerShown: de } = k, { lines: le, fresh: ee, ids: oe, events: W } = Vl({ registry: e, hook: A, props: t, layout: k, grid: y }), ge = Il({ registry: e, hook: A, grid: y, gridMode: d, gridLines: le, dataColumns: V, formats: p, wording: b, tableElement: () => g.current });
3513
+ const M = y.state.editing?.row === !0, k = ql({ registry: e, hook: A, props: t, drafting: M, sticking: _ }), { snapshot: R, projection: E, virtual: T, lines: O, entries: D, grouping: I, dataColumns: B, columnCount: z, pins: Y, pinned: ce, blocks: G, rows: ne, footerShown: de } = k, { lines: le, fresh: ee, ids: oe, events: W } = Bl({ registry: e, hook: A, props: t, layout: k, grid: y }), ge = Pl({ registry: e, hook: A, grid: y, gridMode: d, gridLines: le, dataColumns: B, formats: p, wording: b, tableElement: () => g.current });
3514
3514
  e.setAddRow(W?.addRow ?? null);
3515
- const F = (e.paginates() || O.server) && !R ? O.pageSize : 0, ae = E ? E.length : ne.length, Ae = F && !c ? Math.min(ae, F) : 0;
3515
+ const L = (e.paginates() || R.server) && !T ? R.pageSize : 0, ae = O ? O.length : ne.length, Ae = L && !c ? Math.min(ae, L) : 0;
3516
3516
  Ae > v && x(Ae);
3517
- const ue = Math.min(Math.max(Ae, v, O.pageCount > 1 ? F : 0), F), Ne = c && ae > 0, Me = {
3517
+ const ue = Math.min(Math.max(Ae, v, R.pageCount > 1 ? L : 0), L), Ne = c && ae > 0, Ee = {
3518
3518
  registry: e,
3519
3519
  hook: A,
3520
3520
  layout: k,
@@ -3525,40 +3525,40 @@ function ha({ registry: e, props: t }) {
3525
3525
  baseId: w,
3526
3526
  formats: p,
3527
3527
  wording: b,
3528
- pageSize: F,
3528
+ pageSize: L,
3529
3529
  heldLines: ue,
3530
- filler: sa(ue, ae, F, K)
3531
- }, pe = ia(Me, c, Ne);
3532
- return /* @__PURE__ */ T(re, { children: [
3533
- /* @__PURE__ */ T(
3530
+ filler: sa(ue, ae, L, z)
3531
+ }, pe = ia(Ee, c, Ne);
3532
+ return /* @__PURE__ */ j(re, { children: [
3533
+ /* @__PURE__ */ j(
3534
3534
  "div",
3535
3535
  {
3536
- ref: R?.scrollRef,
3536
+ ref: T?.scrollRef,
3537
3537
  onScroll: (U) => {
3538
- R?.onScroll(), E && o && yo(U.currentTarget), (j.start || j.end) && vo(U.currentTarget), Ft(U.currentTarget, j);
3538
+ T?.onScroll(), O && o && yo(U.currentTarget), (G.start || G.end) && vo(U.currentTarget), Lt(U.currentTarget, G);
3539
3539
  },
3540
3540
  onKeyDown: ge,
3541
3541
  onAnimationEnd: (U) => U.target.removeAttribute("data-copied"),
3542
3542
  className: h.scroll,
3543
3543
  style: i ? { maxHeight: i } : void 0,
3544
3544
  children: [
3545
- /* @__PURE__ */ f(Tn, { size: "sm", children: /* @__PURE__ */ T(
3545
+ /* @__PURE__ */ f(jn, { size: "sm", children: /* @__PURE__ */ j(
3546
3546
  "table",
3547
3547
  {
3548
3548
  ref: g,
3549
- role: E || B ? "treegrid" : d ? "grid" : void 0,
3550
- "aria-readonly": d && !V.some((U) => U.spec.edit !== void 0) ? !0 : void 0,
3549
+ role: O || D ? "treegrid" : d ? "grid" : void 0,
3550
+ "aria-readonly": d && !B.some((U) => U.spec.edit !== void 0) ? !0 : void 0,
3551
3551
  onKeyDown: W?.onKeyDown,
3552
3552
  onFocus: W?.onFocus,
3553
3553
  onClick: W?.onClick,
3554
3554
  onBlur: W?.onBlur,
3555
- "data-depth": E ? $.length : void 0,
3556
- style: E ? { "--u-header-levels": $.length - 1 } : void 0,
3555
+ "data-depth": O ? I.length : void 0,
3556
+ style: O ? { "--u-header-levels": I.length - 1 } : void 0,
3557
3557
  "aria-label": u,
3558
- "aria-rowcount": R ? (M.lines ?? M.shown ?? M.filtered).length + 1 + (de ? 1 : 0) : void 0,
3558
+ "aria-rowcount": T ? (E.lines ?? E.shown ?? E.filtered).length + 1 + (de ? 1 : 0) : void 0,
3559
3559
  "aria-busy": c || void 0,
3560
3560
  "data-stale": Ne || void 0,
3561
- className: D(
3561
+ className: F(
3562
3562
  h.table,
3563
3563
  m === "compact" && h.compact,
3564
3564
  o && h.sticky,
@@ -3567,8 +3567,8 @@ function ha({ registry: e, props: t }) {
3567
3567
  ),
3568
3568
  children: [
3569
3569
  /* @__PURE__ */ f(la, { registry: e, hook: A, layout: k, props: t, wording: b }),
3570
- /* @__PURE__ */ T(Pe, { value: W ? { ...W.context, hook: A, wording: b } : null, children: [
3571
- ee && ta(Me, ee),
3570
+ /* @__PURE__ */ j(Ve, { value: W ? { ...W.context, hook: A, wording: b } : null, children: [
3571
+ ee && ta(Ee, ee),
3572
3572
  pe.body
3573
3573
  ] }),
3574
3574
  de && /* @__PURE__ */ f(aa, { layout: k, gridMode: d, formats: p, wording: b })
@@ -3576,15 +3576,15 @@ function ha({ registry: e, props: t }) {
3576
3576
  }
3577
3577
  ) }),
3578
3578
  pe.empty && /* @__PURE__ */ f(ua, { table: g }),
3579
- /* @__PURE__ */ f(fa, { table: g, blocks: j }),
3580
- /* @__PURE__ */ f($l, { table: g }),
3579
+ /* @__PURE__ */ f(fa, { table: g, blocks: G }),
3580
+ /* @__PURE__ */ f(Il, { table: g }),
3581
3581
  /* @__PURE__ */ f(
3582
3582
  da,
3583
3583
  {
3584
3584
  table: g,
3585
3585
  blocks: ce,
3586
3586
  onSticking: (U) => S((Se) => Se.start === U.start && Se.end === U.end ? Se : U),
3587
- pinnedKeys: V.filter((U) => Y[U.spec.id]).map((U) => U.key).join("|")
3587
+ pinnedKeys: B.filter((U) => Y[U.spec.id]).map((U) => U.key).join("|")
3588
3588
  }
3589
3589
  ),
3590
3590
  d && /* @__PURE__ */ f(
@@ -3594,7 +3594,7 @@ function ha({ registry: e, props: t }) {
3594
3594
  grid: y,
3595
3595
  lines: le,
3596
3596
  ids: oe,
3597
- editable: V.some((U) => U.spec.edit !== void 0) ? W?.editable : void 0,
3597
+ editable: B.some((U) => U.spec.edit !== void 0) ? W?.editable : void 0,
3598
3598
  outside: W?.outside
3599
3599
  }
3600
3600
  )
@@ -3633,7 +3633,7 @@ function ga(e) {
3633
3633
  validate: e.validate
3634
3634
  };
3635
3635
  }
3636
- function Ge(e, t, n, o, r) {
3636
+ function Ke(e, t, n, o, r) {
3637
3637
  Z(
3638
3638
  () => () => {
3639
3639
  n(), e.commit();
@@ -3646,23 +3646,23 @@ function Ge(e, t, n, o, r) {
3646
3646
  }
3647
3647
  function pa(e) {
3648
3648
  function t(c) {
3649
- const a = be(), u = _e(Rt), d = ga(c);
3650
- return e.registerColumn(a, d), Ge(e, a, () => e.removeColumn(a), () => {
3649
+ const a = be(), u = _e(Tt), d = ga(c);
3650
+ return e.registerColumn(a, d), Ke(e, a, () => e.removeColumn(a), () => {
3651
3651
  e.ensureColumn(a, d);
3652
- }, !0), Gt && u && u.registry !== e && X(
3652
+ }, !0), Kt && u && u.registry !== e && X(
3653
3653
  `foreign:${d.id}`,
3654
3654
  `The column "${d.id}" comes from a different useTable call than the table it stands in. It reads the rows of its own hook.`
3655
3655
  ), /* @__PURE__ */ f("span", { hidden: !0, "data-umriss-column": a });
3656
3656
  }
3657
3657
  function n({ children: c }) {
3658
3658
  const a = be();
3659
- return e.registerDetail(a, c), Ge(e, a, () => e.removeDetail(a), () => {
3659
+ return e.registerDetail(a, c), Ke(e, a, () => e.removeDetail(a), () => {
3660
3660
  e.detail || e.registerDetail(a, c);
3661
3661
  }, !1), null;
3662
3662
  }
3663
3663
  function o({ children: c, pin: a = !0 }) {
3664
3664
  const u = be();
3665
- return e.registerActionGroup(u, a), Ge(e, u, () => e.removeActionGroup(u), () => {
3665
+ return e.registerActionGroup(u, a), Ke(e, u, () => e.removeActionGroup(u), () => {
3666
3666
  e.registerActionGroup(u, a);
3667
3667
  }, !1), /* @__PURE__ */ f(re, { children: c });
3668
3668
  }
@@ -3673,7 +3673,7 @@ function pa(e) {
3673
3673
  tone: c.tone ?? "default",
3674
3674
  onSelect: c.onSelect
3675
3675
  };
3676
- return e.registerAction(a, u), Ge(e, a, () => e.removeAction(a), () => {
3676
+ return e.registerAction(a, u), Ke(e, a, () => e.removeAction(a), () => {
3677
3677
  e.ensureAction(a, u);
3678
3678
  }, !0), /* @__PURE__ */ f("span", { hidden: !0, "data-umriss-action": a });
3679
3679
  }
@@ -3688,18 +3688,18 @@ function pa(e) {
3688
3688
  group: c.group,
3689
3689
  groupable: !0
3690
3690
  };
3691
- return e.registerGroupKey(a, b), Ge(e, a, () => e.removeGroupKey(a), () => {
3691
+ return e.registerGroupKey(a, b), Ke(e, a, () => e.removeGroupKey(a), () => {
3692
3692
  e.ensureGroupKey(a, b);
3693
3693
  }, !0), /* @__PURE__ */ f("span", { hidden: !0, "data-umriss-groupkey": a });
3694
3694
  }
3695
3695
  function i(c) {
3696
3696
  e.beginPass(), e.setStickyRowHeader(c.stickyRowHeader === !0), e.setTableGroupable(c.groupable !== !1), e.setRowAdding(c.grid === !0 && c.onRowAdd !== void 0), e.server && c.groupable === !0 && X("server-groupable", "`groupable` is passed over in server mode: the groups would be the page's, not the server's.");
3697
- const a = q(null), [u, d] = I(null);
3697
+ const a = q(null), [u, d] = P(null);
3698
3698
  Z(() => {
3699
3699
  e.children = a.current, e.checkOrder(), e.commit();
3700
3700
  });
3701
3701
  const b = H(() => ({ registry: e, footerTarget: u }), [u]);
3702
- return /* @__PURE__ */ f(Rt, { value: b, children: /* @__PURE__ */ T("div", { className: D(h.frame, c.className), children: [
3702
+ return /* @__PURE__ */ f(Tt, { value: b, children: /* @__PURE__ */ j("div", { className: F(h.frame, c.className), children: [
3703
3703
  /* @__PURE__ */ f("div", { ref: a, className: h.children, children: c.children }),
3704
3704
  /* @__PURE__ */ f(ma, { registry: e }),
3705
3705
  /* @__PURE__ */ f(ha, { registry: e, props: c }),
@@ -3707,7 +3707,7 @@ function pa(e) {
3707
3707
  ] }) });
3708
3708
  }
3709
3709
  const l = { Table: i, Column: t, RowDetail: n, RowActions: o, Action: r, GroupBy: s };
3710
- return Pi(i, e), l;
3710
+ return Vi(i, e), l;
3711
3711
  }
3712
3712
  function ma({ registry: e }) {
3713
3713
  return st(e.subscribe, e.bodyVersion, e.bodyVersion), !e.hook || !e.needsOwnToolbar() ? null : /* @__PURE__ */ f(io, { registry: e, own: !0 });
@@ -3725,14 +3725,14 @@ const wa = "_verdict_1mxfd_6", ba = "_glyph_1mxfd_13", va = "_value_1mxfd_23", y
3725
3725
  };
3726
3726
  function Sa({ reading: e, format: t }) {
3727
3727
  const n = ke(), o = ie(), { measured: r, assessment: s } = e, i = _a(s.verdict, o);
3728
- return /* @__PURE__ */ T("span", { className: Ze.verdict, "data-verdict": s.verdict, title: i, children: [
3728
+ return /* @__PURE__ */ j("span", { className: Ze.verdict, "data-verdict": s.verdict, title: i, children: [
3729
3729
  /* @__PURE__ */ f("span", { "aria-hidden": "true", className: Ze.glyph, children: ka[s.verdict] }),
3730
3730
  /* @__PURE__ */ f("span", { className: Ze.value, children: r === null ? o.statAbsentValue : kn(r, t, n) }),
3731
- s.excess !== void 0 && /* @__PURE__ */ T("span", { className: Ze.excess, children: [
3731
+ s.excess !== void 0 && /* @__PURE__ */ j("span", { className: Ze.excess, children: [
3732
3732
  "+",
3733
3733
  kn(s.excess, t, n)
3734
3734
  ] }),
3735
- /* @__PURE__ */ f(Oe, { children: i })
3735
+ /* @__PURE__ */ f(Re, { children: i })
3736
3736
  ] });
3737
3737
  }
3738
3738
  const Ca = (e) => e.measured, xa = (e) => e.reduce(
@@ -3747,7 +3747,7 @@ function Aa(e) {
3747
3747
  const v = typeof o == "string" ? g?.[o] : o(g);
3748
3748
  return {
3749
3749
  measured: typeof v == "number" && Number.isFinite(v) ? v : null,
3750
- assessment: Io(v, w)
3750
+ assessment: Po(v, w)
3751
3751
  };
3752
3752
  };
3753
3753
  }, [o, b]), m = fe(
@@ -3777,12 +3777,12 @@ const Na = [], Co = (e) => X(
3777
3777
  `The condition for "${e}" is not of the kind of its filter and is passed over.`
3778
3778
  );
3779
3779
  function xo(e, t, n) {
3780
- const o = e.columnById(t), r = o ? Ee(o.spec.filter) : void 0;
3780
+ const o = e.columnById(t), r = o ? Oe(o.spec.filter) : void 0;
3781
3781
  if (!r) return !1;
3782
- const s = jn(r, n);
3782
+ const s = Gn(r, n);
3783
3783
  return s === "foreign" && Co(t), s === "effective";
3784
3784
  }
3785
- function Ta(e, t, n) {
3785
+ function ja(e, t, n) {
3786
3786
  if (e.length === 0) return;
3787
3787
  let o = -1, r = [];
3788
3788
  return (s) => {
@@ -3796,7 +3796,7 @@ function Ta(e, t, n) {
3796
3796
  }
3797
3797
  const a = t.columnById(i);
3798
3798
  a && xo(t, i, l) && r.push((u) => {
3799
- const d = Ee(a.spec.filter);
3799
+ const d = Oe(a.spec.filter);
3800
3800
  return !d || Ci(d, a.read(u), l);
3801
3801
  });
3802
3802
  }
@@ -3804,17 +3804,17 @@ function Ta(e, t, n) {
3804
3804
  return r.every((i) => i(s));
3805
3805
  };
3806
3806
  }
3807
- function Ra(e) {
3808
- const [t, n] = I({ fn: e });
3807
+ function Ta(e) {
3808
+ const [t, n] = P({ fn: e });
3809
3809
  return ot(t.fn, e) ? t.fn : (n({ fn: e }), e);
3810
3810
  }
3811
- function Oa(e, t) {
3812
- const n = H(() => t ? e.filter((i) => t(i)) : e, [e, t]), [o, r] = I(n);
3811
+ function Ra(e, t) {
3812
+ const n = H(() => t ? e.filter((i) => t(i)) : e, [e, t]), [o, r] = P(n);
3813
3813
  if (!t) return e;
3814
3814
  const s = o === n || o.length === n.length && o.every((i, l) => i === n[l]);
3815
3815
  return s || r(n), s ? o : n;
3816
3816
  }
3817
- const et = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e], Ea = (e, t) => e.length === t.length && e.every((n, o) => n === t[o]);
3817
+ const et = (e) => e === void 0 ? [] : typeof e == "string" ? [e] : [...e], Oa = (e, t) => e.length === t.length && e.every((n, o) => n === t[o]);
3818
3818
  function Sn(e) {
3819
3819
  const t = [], n = (o) => {
3820
3820
  for (const r of o)
@@ -3822,7 +3822,7 @@ function Sn(e) {
3822
3822
  };
3823
3823
  return n(e ?? []), t;
3824
3824
  }
3825
- function Ma(e, t, n) {
3825
+ function Ea(e, t, n) {
3826
3826
  const o = [], r = (s, i) => {
3827
3827
  if (!(i >= n))
3828
3828
  for (const l of s) {
@@ -3833,59 +3833,59 @@ function Ma(e, t, n) {
3833
3833
  return r(e, 0), o;
3834
3834
  }
3835
3835
  const Cn = (e, t) => e.size === t.size && [...e].every((n) => t.has(n));
3836
- function La(e, t) {
3836
+ function Ma(e, t) {
3837
3837
  return { ...xt(e), ...t };
3838
3838
  }
3839
- function Ia(e, t) {
3840
- const [n] = I(() => new Vi()), [o] = I(() => {
3839
+ function Pa(e, t) {
3840
+ const [n] = P(() => new Bi()), [o] = P(() => {
3841
3841
  const N = pa(n);
3842
3842
  return { ...N, VerdictColumn: Aa(N.Column) };
3843
3843
  });
3844
3844
  st(n.subscribe, n.structureVersion, n.structureVersion);
3845
- const r = ke(), s = ie(), i = e, l = n.modelColumns(i, r), [c] = I(() => t.initialView), a = t.server === !0, u = t.server ? t.rowCount : 0, d = H(() => a ? { rowCount: u } : void 0, [a, u]);
3845
+ const r = ke(), s = ie(), i = e, l = n.modelColumns(i, r), [c] = P(() => t.initialView), a = t.server === !0, u = t.server ? t.rowCount : 0, d = H(() => a ? { rowCount: u } : void 0, [a, u]);
3846
3846
  n.setServer(a), a && (t.preFilter && X("server-prefilter", "`preFilter` is passed over in server mode: the server decides which rows the table has."), t.virtual && X("server-virtual", "`virtual` is passed over in server mode: the table pages instead."), (t.defaultGrouping !== void 0 || c?.grouping?.length) && X("server-grouping", "A grouping is passed over in server mode: the groups would be the page's, not the server's."));
3847
- const [b, p] = I(() => Object.entries(c?.conditions ?? {})), m = t.rowFilters ?? Na, w = m.map((N) => N.id).join("\0"), g = H(
3847
+ const [b, p] = P(() => Object.entries(c?.conditions ?? {})), m = t.rowFilters ?? Na, w = m.map((N) => N.id).join("\0"), g = H(
3848
3848
  () => new Map(m.map((N) => [N.id, N])),
3849
3849
  // eslint-disable-next-line react-hooks/exhaustive-deps -- the filters by their ids; they are defined outside the component
3850
3850
  [w]
3851
3851
  );
3852
3852
  for (const N of m)
3853
3853
  n.columnById(N.id) && X(`row-filter-column:${N.id}`, `The row filter "${N.id}" has the id of a column; a condition under that id is the row filter's, and the column's filter cannot hold one of its own.`);
3854
- const v = H(() => Ta(b, n, g), [b, n, g]), x = t.preFilter, y = Oa(i, a ? void 0 : x), [_, S] = I(
3854
+ const v = H(() => ja(b, n, g), [b, n, g]), x = t.preFilter, y = Ra(i, a ? void 0 : x), [_, S] = P(
3855
3855
  () => c?.grouping ? [...c.grouping] : et(t.defaultGrouping)
3856
- ), [C, A] = I(() => c?.folded ?? []), [L, k] = I(() => c?.pinned ? { ...c.pinned } : null), O = Ra(t.rowKey), M = t.server ? void 0 : t.childRows, R = M !== void 0;
3857
- n.setTree(R);
3858
- const E = q({ children: M, key: O });
3856
+ ), [C, A] = P(() => c?.folded ?? []), [M, k] = P(() => c?.pinned ? { ...c.pinned } : null), R = Ta(t.rowKey), E = t.server ? void 0 : t.childRows, T = E !== void 0;
3857
+ n.setTree(T);
3858
+ const O = q({ children: E, key: R });
3859
3859
  Z(() => {
3860
- E.current = { children: M, key: O };
3860
+ O.current = { children: E, key: R };
3861
3861
  });
3862
- const [B] = I(() => ({
3863
- key: (N) => E.current.key(N),
3864
- children: (N) => E.current.children?.(N),
3862
+ const [D] = P(() => ({
3863
+ key: (N) => O.current.key(N),
3864
+ children: (N) => O.current.children?.(N),
3865
3865
  label: () => ""
3866
- })), [$] = I(() => {
3866
+ })), [I] = P(() => {
3867
3867
  const N = t.server ? void 0 : t.defaultBranches;
3868
- return !R || N === void 0 ? [] : typeof N == "number" ? Ma(i, B, N) : [...N];
3869
- }), [V, K] = I(() => c?.branches ?? $), Y = H(() => R ? new Set($o(i, B)) : /* @__PURE__ */ new Set(), [R, i, B]), ce = R ? V.filter((N) => Y.has(N)) : [];
3868
+ return !T || N === void 0 ? [] : typeof N == "number" ? Ea(i, D, N) : [...N];
3869
+ }), [B, z] = P(() => c?.branches ?? I), Y = H(() => T ? new Set(Io(i, D)) : /* @__PURE__ */ new Set(), [T, i, D]), ce = T ? B.filter((N) => Y.has(N)) : [];
3870
3870
  H(() => {
3871
- if (!R) return;
3872
- const N = zo(i, B);
3871
+ if (!T) return;
3872
+ const N = $o(i, D);
3873
3873
  N !== null && X(`tree-duplicate:${N}`, `The row key "${N}" occurs twice in the tree: its fold and its selection would act on both rows.`);
3874
- }, [R, i, B]), R && (t.defaultGrouping !== void 0 || c?.grouping?.length) && X("tree-grouping", "A grouping is passed over with `childRows`: tree rows and grouping both build levels.");
3875
- const j = n.orderedColumns().length + n.groupKeys.entries.size > 0, ne = a || R ? [] : j ? n.effectiveGrouping(_, i) : _.slice(0, Kt), de = ne.join("|"), le = H(() => new Set(C), [C]), ee = ne.length ? n.groupingModel(ne, i) : null, oe = H(
3874
+ }, [T, i, D]), T && (t.defaultGrouping !== void 0 || c?.grouping?.length) && X("tree-grouping", "A grouping is passed over with `childRows`: tree rows and grouping both build levels.");
3875
+ const G = n.orderedColumns().length + n.groupKeys.entries.size > 0, ne = a || T ? [] : G ? n.effectiveGrouping(_, i) : _.slice(0, zt), de = ne.join("|"), le = H(() => new Set(C), [C]), ee = ne.length ? n.groupingModel(ne, i) : null, oe = H(
3876
3876
  () => ee && ee.levels.length ? { ...ee, folded: le, compareText: r.compareText } : void 0,
3877
3877
  // eslint-disable-next-line react-hooks/exhaustive-deps -- the model's identity carries the ids and the columns
3878
3878
  [ee, le, r.compareText, de]
3879
3879
  ), W = ce.join("\0"), ge = H(
3880
- () => R ? { key: O, children: B.children, open: new Set(ce), admit: x } : void 0,
3880
+ () => T ? { key: R, children: D.children, open: new Set(ce), admit: x } : void 0,
3881
3881
  /* ponytail: the pre-filter is read through the roots it admits - a new
3882
3882
  pre-filter that only drops children takes hold with the next change of
3883
3883
  rows or branches. Compare its admitted children, as useAdmitted does
3884
3884
  the roots, if a caller needs that live. */
3885
3885
  // eslint-disable-next-line react-hooks/exhaustive-deps -- the open keys by value; the rows the pre-filter admits stand for it
3886
- [R, W, y, B]
3887
- ), F = Xo(y, l, {
3888
- rowKey: O,
3886
+ [T, W, y, D]
3887
+ ), L = Xo(y, l, {
3888
+ rowKey: R,
3889
3889
  pageSize: t.pageSize,
3890
3890
  defaultSort: t.defaultSort,
3891
3891
  filter: v,
@@ -3894,156 +3894,156 @@ function Ia(e, t) {
3894
3894
  grouping: oe,
3895
3895
  server: d,
3896
3896
  tree: ge
3897
- }), { setPage: ae } = F, Ae = fe(
3898
- (N, z) => {
3899
- const G = typeof N == "string" ? N : N.id;
3900
- let ze = z == null;
3901
- const on = g.has(G);
3897
+ }), { setPage: ae } = L, Ae = fe(
3898
+ (N, $) => {
3899
+ const K = typeof N == "string" ? N : N.id;
3900
+ let $e = $ == null;
3901
+ const on = g.has(K);
3902
3902
  if (typeof N != "string" && !on) {
3903
3903
  X(
3904
- `row-filter-unknown:${G}`,
3905
- `The row filter "${G}" is not among the table's \`rowFilters\`; its condition is passed over.`
3904
+ `row-filter-unknown:${K}`,
3905
+ `The row filter "${K}" is not among the table's \`rowFilters\`; its condition is passed over.`
3906
3906
  );
3907
3907
  return;
3908
3908
  }
3909
- if (!ze && !on && n.orderedColumns().length > 0) {
3910
- const ve = n.columnById(G), Te = ve ? Ee(ve.spec.filter) : void 0;
3911
- if (!Te) {
3909
+ if (!$e && !on && n.orderedColumns().length > 0) {
3910
+ const ve = n.columnById(K), je = ve ? Oe(ve.spec.filter) : void 0;
3911
+ if (!je) {
3912
3912
  X(
3913
- `condition-without-filter:${G}`,
3914
- ve ? `The column "${G}" has no filter; its condition is passed over.` : `No column is called "${G}"; its condition is passed over.`
3913
+ `condition-without-filter:${K}`,
3914
+ ve ? `The column "${K}" has no filter; its condition is passed over.` : `No column is called "${K}"; its condition is passed over.`
3915
3915
  );
3916
3916
  return;
3917
3917
  }
3918
- const Re = jn(Te, z);
3919
- if (Re === "foreign") {
3920
- Co(G);
3918
+ const Te = Gn(je, $);
3919
+ if (Te === "foreign") {
3920
+ Co(K);
3921
3921
  return;
3922
3922
  }
3923
- ze = Re === "empty";
3923
+ $e = Te === "empty";
3924
3924
  }
3925
3925
  p((ve) => {
3926
- const Te = ve.findIndex(([Re]) => Re === G);
3927
- return ze ? Te === -1 ? ve : ve.filter((Re, gt) => gt !== Te) : Te === -1 ? [...ve, [G, z]] : ve.map((Re, gt) => gt === Te ? [G, z] : Re);
3926
+ const je = ve.findIndex(([Te]) => Te === K);
3927
+ return $e ? je === -1 ? ve : ve.filter((Te, gt) => gt !== je) : je === -1 ? [...ve, [K, $]] : ve.map((Te, gt) => gt === je ? [K, $] : Te);
3928
3928
  }), ae(1);
3929
3929
  },
3930
3930
  [n, ae, g]
3931
- ), ue = new Set(n.orderedColumns().map((N) => N.spec.id)), [Ne, Me] = I(() => /* @__PURE__ */ new Set());
3931
+ ), ue = new Set(n.orderedColumns().map((N) => N.spec.id)), [Ne, Ee] = P(() => /* @__PURE__ */ new Set());
3932
3932
  if (!Cn(Ne, ue)) {
3933
- const N = new Set([...Ne].filter((G) => !ue.has(G)));
3934
- Me(ue);
3935
- const z = (G) => N.has(G) && !g.has(G);
3936
- b.some(([G]) => z(G)) && p((G) => G.filter(([ze]) => !z(ze)));
3933
+ const N = new Set([...Ne].filter((K) => !ue.has(K)));
3934
+ Ee(ue);
3935
+ const $ = (K) => N.has(K) && !g.has(K);
3936
+ b.some(([K]) => $(K)) && p((K) => K.filter(([$e]) => !$($e)));
3937
3937
  }
3938
- const pe = ue.size === 0 ? b : b.filter(([N, z]) => g.has(N) || xo(n, N, z)), U = ar(F.view, ue), Se = pe.length > 0 ? { ...U, conditions: Object.fromEntries(pe) } : U, Le = ue.size === 0 ? F.sort : F.sort.filter((N) => ue.has(N.column)), Ie = a || R ? [] : j ? n.effectiveGrouping(et(t.defaultGrouping), i) : et(t.defaultGrouping), Fe = F.groups ? jo(F.groups, C) : j ? [] : [...C], Je = n.declaredPins(), P = nr(L, Je, ue), J = {
3938
+ const pe = ue.size === 0 ? b : b.filter(([N, $]) => g.has(N) || xo(n, N, $)), U = ar(L.view, ue), Se = pe.length > 0 ? { ...U, conditions: Object.fromEntries(pe) } : U, Me = ue.size === 0 ? L.sort : L.sort.filter((N) => ue.has(N.column)), Pe = a || T ? [] : G ? n.effectiveGrouping(et(t.defaultGrouping), i) : et(t.defaultGrouping), Le = L.groups ? Go(L.groups, C) : G ? [] : [...C], Je = n.declaredPins(), V = nr(M, Je, ue), J = {
3939
3939
  ...Se,
3940
- ...Ea(ne, Ie) ? {} : { grouping: ne },
3941
- ...Fe.length ? { folded: Fe } : {},
3942
- ...P ? { pinned: P } : {},
3943
- ...R && !Cn(new Set(ce), new Set($.filter((N) => Y.has(N)))) ? { branches: ce } : {}
3944
- }, te = (N, z) => k((G) => er(G ?? n.declaredPins(), N, z)), [me, we] = I(0), Ao = (N) => {
3945
- F.restart(N), p(Object.entries(N.conditions ?? {})), S(N.grouping ? [...N.grouping] : et(t.defaultGrouping)), A(N.folded ?? []), k(N.pinned ? { ...N.pinned } : null), K(N.branches ?? $), we((z) => z + 1);
3940
+ ...Oa(ne, Pe) ? {} : { grouping: ne },
3941
+ ...Le.length ? { folded: Le } : {},
3942
+ ...V ? { pinned: V } : {},
3943
+ ...T && !Cn(new Set(ce), new Set(I.filter((N) => Y.has(N)))) ? { branches: ce } : {}
3944
+ }, te = (N, $) => k((K) => er(K ?? n.declaredPins(), N, $)), [me, we] = P(0), Ao = (N) => {
3945
+ L.restart(N), p(Object.entries(N.conditions ?? {})), S(N.grouping ? [...N.grouping] : et(t.defaultGrouping)), A(N.folded ?? []), k(N.pinned ? { ...N.pinned } : null), z(N.branches ?? I), we(($) => $ + 1);
3946
3946
  }, No = (N) => {
3947
3947
  S([...N]), ae(1);
3948
- }, To = (N) => {
3949
- Sn(F.groups).includes(N) && (n.noteFocusBeforeFold(), A((z) => z.includes(N) ? z.filter((G) => G !== N) : [...z, N]));
3950
- }, Jt = !a && !!t.virtual, ut = !R && n.paginates() || Jt, ft = t.selection ?? F.selection, Xe = lr(J), Xt = q(Xe), Qt = q(0);
3948
+ }, jo = (N) => {
3949
+ Sn(L.groups).includes(N) && (n.noteFocusBeforeFold(), A(($) => $.includes(N) ? $.filter((K) => K !== N) : [...$, N]));
3950
+ }, Jt = !a && !!t.virtual, ut = !T && n.paginates() || Jt, ft = t.selection ?? L.selection, Xe = lr(J), Xt = q(Xe), Qt = q(0);
3951
3951
  xe(() => {
3952
3952
  const N = Qt.current !== me;
3953
3953
  Qt.current = me, Xt.current !== Xe && (Xt.current = Xe, N || t.onViewChange?.(J));
3954
3954
  }, [Xe, me]);
3955
3955
  const Zt = {
3956
- search: F.search,
3956
+ search: L.search,
3957
3957
  conditions: Object.fromEntries(pe),
3958
- sort: Le,
3959
- page: F.page,
3960
- pageSize: F.pageSize
3958
+ sort: Me,
3959
+ page: L.page,
3960
+ pageSize: L.pageSize
3961
3961
  }, ht = a ? ir(Zt) : "", en = q(null);
3962
3962
  xe(() => {
3963
3963
  !a || en.current === ht || (en.current = ht, t.onRequest?.(Zt));
3964
3964
  }, [ht]);
3965
- const [$e] = I(() => /* @__PURE__ */ new Map());
3965
+ const [Ie] = P(() => /* @__PURE__ */ new Map());
3966
3966
  let tn;
3967
3967
  if (a) {
3968
3968
  const N = /* @__PURE__ */ new Set();
3969
- for (const z of i) {
3970
- const G = O(z);
3971
- N.add(G), $e.set(G, z);
3969
+ for (const $ of i) {
3970
+ const K = R($);
3971
+ N.add(K), Ie.set(K, $);
3972
3972
  }
3973
- for (const z of [...$e.keys()])
3974
- !N.has(z) && !ft.isSelected(z) && $e.delete(z);
3975
- tn = [...ft.selected].filter((z) => $e.has(z)).map((z) => $e.get(z));
3973
+ for (const $ of [...Ie.keys()])
3974
+ !N.has($) && !ft.isSelected($) && Ie.delete($);
3975
+ tn = [...ft.selected].filter(($) => Ie.has($)).map(($) => Ie.get($));
3976
3976
  }
3977
3977
  const nn = {
3978
3978
  rows: e,
3979
- filtered: F.filtered,
3980
- visible: ut || R ? F.visible : F.filtered,
3981
- page: ut ? F.page : 1,
3982
- pageCount: ut ? F.pageCount : 1,
3983
- pageSize: F.pageSize,
3984
- setPage: F.setPage,
3985
- setPageSize: F.setPageSize,
3986
- search: F.search,
3987
- setSearch: F.setSearch,
3988
- sort: Le,
3989
- toggleSort: F.toggleSort,
3990
- hidden: F.hidden,
3991
- toggleColumn: F.toggleColumn,
3992
- order: F.order,
3993
- setOrder: F.setOrder,
3994
- pinned: L ?? Je,
3979
+ filtered: L.filtered,
3980
+ visible: ut || T ? L.visible : L.filtered,
3981
+ page: ut ? L.page : 1,
3982
+ pageCount: ut ? L.pageCount : 1,
3983
+ pageSize: L.pageSize,
3984
+ setPage: L.setPage,
3985
+ setPageSize: L.setPageSize,
3986
+ search: L.search,
3987
+ setSearch: L.setSearch,
3988
+ sort: Me,
3989
+ toggleSort: L.toggleSort,
3990
+ hidden: L.hidden,
3991
+ toggleColumn: L.toggleColumn,
3992
+ order: L.order,
3993
+ setOrder: L.setOrder,
3994
+ pinned: M ?? Je,
3995
3995
  setPin: te,
3996
- widths: La(l, F.widths),
3997
- setWidth: F.setWidth,
3998
- expanded: F.expanded,
3999
- toggleRow: F.toggleRow,
3996
+ widths: Ma(l, L.widths),
3997
+ setWidth: L.setWidth,
3998
+ expanded: L.expanded,
3999
+ toggleRow: L.toggleRow,
4000
4000
  filter: Object.fromEntries(pe),
4001
4001
  setFilter: Ae,
4002
- conditionOf: (N) => pe.find(([z]) => z === N.id)?.[1] ?? null,
4002
+ conditionOf: (N) => pe.find(([$]) => $ === N.id)?.[1] ?? null,
4003
4003
  selection: ft,
4004
4004
  view: J,
4005
4005
  grouping: ne,
4006
4006
  setGrouping: No,
4007
4007
  setView: Ao,
4008
- folded: Fe,
4009
- toggleFold: To,
4008
+ folded: Le,
4009
+ toggleFold: jo,
4010
4010
  foldAll: () => {
4011
- n.noteFocusBeforeFold(), A(Sn(F.groups));
4011
+ n.noteFocusBeforeFold(), A(Sn(L.groups));
4012
4012
  },
4013
4013
  unfoldAll: () => {
4014
4014
  n.noteFocusBeforeFold(), A([]);
4015
4015
  },
4016
4016
  branches: ce,
4017
4017
  toggleBranch: (N) => {
4018
- Y.has(N) && K((z) => z.includes(N) ? z.filter((G) => G !== N) : [...z, N]);
4018
+ Y.has(N) && z(($) => $.includes(N) ? $.filter((K) => K !== N) : [...$, N]);
4019
4019
  },
4020
- unfoldAllBranches: () => K([...Y]),
4021
- foldAllBranches: () => K([]),
4022
- asCsv: () => ji(n, s.levelColumn, r, s),
4020
+ unfoldAllBranches: () => z([...Y]),
4021
+ foldAllBranches: () => z([]),
4022
+ asCsv: () => Gi(n, s.levelColumn, r, s),
4023
4023
  selectionAsText: () => to(n, r, s),
4024
4024
  virtual: Jt,
4025
- rowCount: a ? u : F.filtered.length,
4025
+ rowCount: a ? u : L.filtered.length,
4026
4026
  server: a
4027
4027
  };
4028
4028
  return n.setHook({
4029
4029
  rows: i,
4030
4030
  admitted: y,
4031
4031
  modelColumns: l,
4032
- tableState: F,
4032
+ tableState: L,
4033
4033
  filter: v,
4034
4034
  grouping: oe,
4035
4035
  tree: ge,
4036
4036
  folded: le,
4037
4037
  publicSnapshot: nn,
4038
- rowKey: O,
4038
+ rowKey: R,
4039
4039
  formats: r,
4040
- pins: L,
4040
+ pins: M,
4041
4041
  filterOptions: a ? t.filterOptions : void 0,
4042
4042
  selectedRows: tn,
4043
4043
  rowFilters: g
4044
4044
  }), { ...nn, ...o };
4045
4045
  }
4046
- function $a(e) {
4046
+ function Ia(e) {
4047
4047
  return e;
4048
4048
  }
4049
4049
  function Ut(e, t) {
@@ -4055,22 +4055,22 @@ function Ut(e, t) {
4055
4055
  };
4056
4056
  }, [e, t, n]);
4057
4057
  }
4058
- function za({ children: e, className: t, size: n = "sm", of: o }) {
4058
+ function $a({ children: e, className: t, size: n = "sm", of: o }) {
4059
4059
  const r = Ye(o);
4060
4060
  Ut(r?.registry, "toolbar");
4061
4061
  const s = r?.registry;
4062
4062
  return /* @__PURE__ */ f(io, { registry: s ?? null, className: t, size: n, children: e });
4063
4063
  }
4064
- function Ka({ placeholder: e, "aria-label": t, className: n, size: o, grow: r, of: s }) {
4064
+ function za({ placeholder: e, "aria-label": t, className: n, size: o, grow: r, of: s }) {
4065
4065
  const i = Ye(s), l = at(o), c = ie();
4066
4066
  if (Ut(i?.registry, "search"), !i) return null;
4067
4067
  const { snapshot: a } = i;
4068
4068
  return /* @__PURE__ */ f(
4069
- On,
4069
+ Rn,
4070
4070
  {
4071
4071
  size: l,
4072
4072
  type: "search",
4073
- className: D(r && h.searchGrow, n),
4073
+ className: F(r && h.searchGrow, n),
4074
4074
  value: a.search,
4075
4075
  onChange: (u) => a.setSearch(u.target.value),
4076
4076
  clearable: !0,
@@ -4080,8 +4080,8 @@ function Ka({ placeholder: e, "aria-label": t, className: n, size: o, grow: r, o
4080
4080
  }
4081
4081
  );
4082
4082
  }
4083
- function Ga({ size: e, of: t }) {
4084
- const n = Ye(t), o = at(e), r = ie(), [s, i] = I(!1), l = q(null), c = q(null), a = be(), [u, d] = I(null);
4083
+ function Ka({ size: e, of: t }) {
4084
+ const n = Ye(t), o = at(e), r = ie(), [s, i] = P(!1), l = q(null), c = q(null), a = be(), [u, d] = P(null);
4085
4085
  if (Z(() => {
4086
4086
  if (!u || !c.current) return;
4087
4087
  const _ = Array.from(c.current.children).find(
@@ -4089,22 +4089,22 @@ function Ga({ size: e, of: t }) {
4089
4089
  ), S = _?.querySelector(u.key), C = u.otherwise ? _?.querySelector(u.otherwise) : void 0;
4090
4090
  (S && !S.disabled ? S : C)?.focus();
4091
4091
  }, [u]), !n) return null;
4092
- const { registry: b, snapshot: p } = n, m = b.hook, w = b.inPinOrder(Bn(b.modelColumns(m.rows, m.formats), p.order)), g = b.pins(), v = (_, S) => {
4092
+ const { registry: b, snapshot: p } = n, m = b.hook, w = b.inPinOrder(Dn(b.modelColumns(m.rows, m.formats), p.order)), g = b.pins(), v = (_, S) => {
4093
4093
  const C = w[_ + S];
4094
4094
  return C !== void 0 && g[C.id] === g[w[_].id];
4095
4095
  }, x = (_, S) => {
4096
- const C = w.map((O) => O.id), A = _ + S;
4096
+ const C = w.map((R) => R.id), A = _ + S;
4097
4097
  if (!v(_, S)) return;
4098
4098
  [C[_], C[A]] = [C[A], C[_]], p.setOrder(C);
4099
- const [L, k] = S < 0 ? ["forward", "backward"] : ["backward", "forward"];
4100
- d({ id: w[_].id, key: `[data-direction="${L}"]`, otherwise: `[data-direction="${k}"]` });
4099
+ const [M, k] = S < 0 ? ["forward", "backward"] : ["backward", "forward"];
4100
+ d({ id: w[_].id, key: `[data-direction="${M}"]`, otherwise: `[data-direction="${k}"]` });
4101
4101
  }, y = (_, S, C) => {
4102
4102
  const A = g[_] === C;
4103
4103
  return /* @__PURE__ */ f(tt, { content: A ? r.unpinHint : C === "start" ? r.pinToStartHint : r.pinToEndHint, children: /* @__PURE__ */ f(
4104
4104
  "button",
4105
4105
  {
4106
4106
  type: "button",
4107
- className: D(h.move, A && h.pinOn),
4107
+ className: F(h.move, A && h.pinOn),
4108
4108
  "data-pin": C,
4109
4109
  "aria-label": A ? r.unpinColumn(S) : C === "start" ? r.pinColumnToStart(S) : r.pinColumnToEnd(S),
4110
4110
  onClick: () => {
@@ -4124,7 +4124,7 @@ function Ga({ size: e, of: t }) {
4124
4124
  }
4125
4125
  ) });
4126
4126
  };
4127
- return /* @__PURE__ */ T(re, { children: [
4127
+ return /* @__PURE__ */ j(re, { children: [
4128
4128
  /* @__PURE__ */ f(
4129
4129
  Q,
4130
4130
  {
@@ -4137,7 +4137,7 @@ function Ga({ size: e, of: t }) {
4137
4137
  children: r.columns
4138
4138
  }
4139
4139
  ),
4140
- /* @__PURE__ */ T(
4140
+ /* @__PURE__ */ j(
4141
4141
  it,
4142
4142
  {
4143
4143
  open: s,
@@ -4151,7 +4151,7 @@ function Ga({ size: e, of: t }) {
4151
4151
  children: [
4152
4152
  /* @__PURE__ */ f("ul", { ref: c, className: h.columnsList, "aria-label": r.arrangeColumns, children: w.map((_, S) => {
4153
4153
  const C = _.label ?? _.id;
4154
- return /* @__PURE__ */ T("li", { className: h.columnsEntry, "data-column": _.id, children: [
4154
+ return /* @__PURE__ */ j("li", { className: h.columnsEntry, "data-column": _.id, children: [
4155
4155
  /* @__PURE__ */ f(
4156
4156
  We,
4157
4157
  {
@@ -4196,7 +4196,7 @@ function Ga({ size: e, of: t }) {
4196
4196
  )
4197
4197
  ] });
4198
4198
  }
4199
- function ja({ filename: e, onExport: t, size: n, of: o }) {
4199
+ function Ga({ filename: e, onExport: t, size: n, of: o }) {
4200
4200
  const r = Ye(o), s = at(n), i = ie();
4201
4201
  if (!r) return null;
4202
4202
  const { snapshot: l } = r;
@@ -4213,13 +4213,13 @@ function ja({ filename: e, onExport: t, size: n, of: o }) {
4213
4213
  function Ha({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
4214
4214
  const o = Ye(n), r = ie(), s = ke();
4215
4215
  if (Ut(o?.registry, "pagination"), o?.registry.tree && X("tree-pagination", "`Pagination` is passed over with `childRows`: a page cut through a branch tears rows from their parent. A large tree uses `virtual`."), !o || o.snapshot.virtual || o.registry.tree) return null;
4216
- const { snapshot: i } = o, l = i.rowCount, c = e.includes(i.pageSize) ? e : [...e, i.pageSize].sort((u, d) => u - d), a = /* @__PURE__ */ T("nav", { "aria-label": r.pagination, className: D(h.pagination, t), children: [
4216
+ const { snapshot: i } = o, l = i.rowCount, c = e.includes(i.pageSize) ? e : [...e, i.pageSize].sort((u, d) => u - d), a = /* @__PURE__ */ j("nav", { "aria-label": r.pagination, className: F(h.pagination, t), children: [
4217
4217
  /* @__PURE__ */ f("span", { children: r.entries(l, s.count(l)) }),
4218
- /* @__PURE__ */ T("div", { className: h.paginationControls, children: [
4219
- /* @__PURE__ */ T("label", { className: h.pageSize, children: [
4218
+ /* @__PURE__ */ j("div", { className: h.paginationControls, children: [
4219
+ /* @__PURE__ */ j("label", { className: h.pageSize, children: [
4220
4220
  r.rows,
4221
4221
  /* @__PURE__ */ f(
4222
- Rn,
4222
+ Tn,
4223
4223
  {
4224
4224
  size: "sm",
4225
4225
  chars: Math.max(...c.map((u) => String(u).length)),
@@ -4230,7 +4230,7 @@ function Ha({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
4230
4230
  }
4231
4231
  )
4232
4232
  ] }),
4233
- /* @__PURE__ */ T("span", { className: h.pageSteps, children: [
4233
+ /* @__PURE__ */ j("span", { className: h.pageSteps, children: [
4234
4234
  /* @__PURE__ */ f("span", { className: h.paginationStatus, children: r.pageOfPages(i.page, i.pageCount, {
4235
4235
  page: s.count(i.page),
4236
4236
  total: s.count(i.pageCount)
@@ -4240,20 +4240,20 @@ function Ha({ pageSizes: e = [10, 25, 50], className: t, of: n }) {
4240
4240
  ] })
4241
4241
  ] })
4242
4242
  ] });
4243
- return o.inside ? o.footerTarget ? En(a, o.footerTarget) : null : a;
4243
+ return o.inside ? o.footerTarget ? On(a, o.footerTarget) : null : a;
4244
4244
  }
4245
4245
  function Wa(e) {
4246
4246
  return e;
4247
4247
  }
4248
4248
  export {
4249
- Ga as ColumnMenu,
4250
- ja as Export,
4249
+ Ka as ColumnMenu,
4250
+ Ga as Export,
4251
4251
  Ha as Pagination,
4252
- Ka as Search,
4253
- za as Toolbar,
4254
- $a as column,
4255
- Pa as columnFilter,
4252
+ za as Search,
4253
+ $a as Toolbar,
4254
+ Ia as column,
4255
+ Va as columnFilter,
4256
4256
  Wa as rowFilter,
4257
- Ia as useTable,
4258
- Ko as useTableSelection
4257
+ Pa as useTable,
4258
+ zo as useTableSelection
4259
4259
  };