@toolbox-web/grid 1.19.3 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +40 -14
  2. package/all.js +25 -23
  3. package/all.js.map +1 -1
  4. package/index.js +410 -365
  5. package/index.js.map +1 -1
  6. package/lib/core/grid.d.ts +81 -12
  7. package/lib/core/grid.d.ts.map +1 -1
  8. package/lib/core/internal/event-delegation.d.ts.map +1 -1
  9. package/lib/core/internal/row-animation.d.ts +6 -6
  10. package/lib/core/internal/row-animation.d.ts.map +1 -1
  11. package/lib/core/internal/sorting.d.ts +6 -0
  12. package/lib/core/internal/sorting.d.ts.map +1 -1
  13. package/lib/core/types.d.ts +10 -6
  14. package/lib/core/types.d.ts.map +1 -1
  15. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
  16. package/lib/plugins/clipboard/index.js +54 -54
  17. package/lib/plugins/clipboard/index.js.map +1 -1
  18. package/lib/plugins/column-virtualization/index.js.map +1 -1
  19. package/lib/plugins/context-menu/index.js.map +1 -1
  20. package/lib/plugins/editing/index.js.map +1 -1
  21. package/lib/plugins/export/index.js.map +1 -1
  22. package/lib/plugins/filtering/index.js.map +1 -1
  23. package/lib/plugins/grouping-columns/index.js.map +1 -1
  24. package/lib/plugins/grouping-rows/index.js.map +1 -1
  25. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +1 -1
  26. package/lib/plugins/master-detail/index.js +1 -1
  27. package/lib/plugins/master-detail/index.js.map +1 -1
  28. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts +8 -0
  29. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +1 -1
  30. package/lib/plugins/multi-sort/index.js +23 -12
  31. package/lib/plugins/multi-sort/index.js.map +1 -1
  32. package/lib/plugins/pinned-columns/index.js.map +1 -1
  33. package/lib/plugins/pinned-rows/index.js.map +1 -1
  34. package/lib/plugins/pivot/index.js.map +1 -1
  35. package/lib/plugins/print/index.js.map +1 -1
  36. package/lib/plugins/reorder/index.js.map +1 -1
  37. package/lib/plugins/responsive/index.js.map +1 -1
  38. package/lib/plugins/row-reorder/index.js.map +1 -1
  39. package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
  40. package/lib/plugins/selection/index.js +93 -95
  41. package/lib/plugins/selection/index.js.map +1 -1
  42. package/lib/plugins/server-side/index.js.map +1 -1
  43. package/lib/plugins/tree/index.js.map +1 -1
  44. package/lib/plugins/undo-redo/index.js.map +1 -1
  45. package/lib/plugins/visibility/index.js.map +1 -1
  46. package/package.json +1 -1
  47. package/umd/grid.all.umd.js +20 -20
  48. package/umd/grid.all.umd.js.map +1 -1
  49. package/umd/grid.umd.js +15 -15
  50. package/umd/grid.umd.js.map +1 -1
  51. package/umd/plugins/clipboard.umd.js +4 -4
  52. package/umd/plugins/clipboard.umd.js.map +1 -1
  53. package/umd/plugins/master-detail.umd.js +1 -1
  54. package/umd/plugins/master-detail.umd.js.map +1 -1
  55. package/umd/plugins/multi-sort.umd.js +1 -1
  56. package/umd/plugins/multi-sort.umd.js.map +1 -1
  57. package/umd/plugins/selection.umd.js +1 -1
  58. package/umd/plugins/selection.umd.js.map +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- function dt() {
1
+ function ht() {
2
2
  return {
3
3
  rowCount: -1,
4
4
  colCount: -1,
@@ -6,28 +6,28 @@ function dt() {
6
6
  ariaDescribedBy: void 0
7
7
  };
8
8
  }
9
- function ht(t, e, i, o, n) {
9
+ function ut(t, e, i, o, n) {
10
10
  if (o === t.rowCount && n === t.colCount)
11
11
  return !1;
12
12
  const r = t.rowCount;
13
13
  return t.rowCount = o, t.colCount = n, e && (e.setAttribute("aria-rowcount", String(o)), e.setAttribute("aria-colcount", String(n))), o !== r && i && (o > 0 ? i.setAttribute("role", "rowgroup") : i.removeAttribute("role")), !0;
14
14
  }
15
- function ut(t, e) {
15
+ function ft(t, e) {
16
16
  const i = t?.gridAriaLabel;
17
17
  return i || (t?.shell?.header?.title ?? e?.lightDomTitle ?? void 0);
18
18
  }
19
- function ft(t, e, i, o) {
19
+ function gt(t, e, i, o) {
20
20
  if (!e) return !1;
21
21
  let n = !1;
22
- const r = ut(i, o);
22
+ const r = ft(i, o);
23
23
  r !== t.ariaLabel && (t.ariaLabel = r, r ? e.setAttribute("aria-label", r) : e.removeAttribute("aria-label"), n = !0);
24
24
  const s = i?.gridAriaDescribedBy;
25
25
  return s !== t.ariaDescribedBy && (t.ariaDescribedBy = s, s ? e.setAttribute("aria-describedby", s) : e.removeAttribute("aria-describedby"), n = !0), n;
26
26
  }
27
- const G = {
27
+ const X = {
28
28
  STRETCH: "stretch",
29
29
  FIXED: "fixed"
30
- }, gt = {
30
+ }, pt = {
31
31
  mode: "reduced-motion",
32
32
  duration: 200,
33
33
  easing: "ease-out"
@@ -44,7 +44,7 @@ const G = {
44
44
  filterActive: Re,
45
45
  print: "🖨️"
46
46
  };
47
- function pt(t) {
47
+ function wt(t) {
48
48
  return Array.from(t.querySelectorAll("tbw-grid-column")).map((i) => {
49
49
  const o = i.getAttribute("field") || "";
50
50
  if (!o) return null;
@@ -114,8 +114,8 @@ function Ye(t, e) {
114
114
  i ? i.split(/\s+/).includes(e) || t.setAttribute("part", i + " " + e) : t.setAttribute("part", e);
115
115
  }
116
116
  function Te(t) {
117
- const e = t.effectiveConfig?.fitMode || t.fitMode || G.STRETCH;
118
- if (e !== G.STRETCH && e !== G.FIXED || t.__didInitialAutoSize || !t.isConnected) return;
117
+ const e = t.effectiveConfig?.fitMode || t.fitMode || X.STRETCH;
118
+ if (e !== X.STRETCH && e !== X.FIXED || t.__didInitialAutoSize || !t.isConnected) return;
119
119
  const i = Array.from(t._headerRowEl?.children || []);
120
120
  if (!i.length) return;
121
121
  let o = !1;
@@ -131,36 +131,36 @@ function Te(t) {
131
131
  }
132
132
  }
133
133
  l > 0 && (n.width = l + 2, n.__autoSized = !0, o = !0);
134
- }), o && V(t), t.__didInitialAutoSize = !0;
134
+ }), o && B(t), t.__didInitialAutoSize = !0;
135
135
  }
136
- const wt = /^(?:\d+(?:\.\d+)?(?:px|%|fr|em|rem|ch|vw|vh|vmin|vmax)|calc\(.+\)|min-content|max-content|minmax\(.+\)|fit-content\(.+\)|auto)$/i;
136
+ const bt = /^(?:\d+(?:\.\d+)?(?:px|%|fr|em|rem|ch|vw|vh|vmin|vmax)|calc\(.+\)|min-content|max-content|minmax\(.+\)|fit-content\(.+\)|auto)$/i;
137
137
  function xe(t, e) {
138
- return typeof t == "number" ? `${t}px` : (wt.test(t) || console.warn(`[tbw-grid] Column '${e ?? "?"}' has an invalid CSS width value: '${t}'. Expected a number (px) or a valid CSS unit string (e.g. '30%', '2fr', 'calc(...)').`), t);
138
+ return typeof t == "number" ? `${t}px` : (bt.test(t) || console.warn(`[tbw-grid] Column '${e ?? "?"}' has an invalid CSS width value: '${t}'. Expected a number (px) or a valid CSS unit string (e.g. '30%', '2fr', 'calc(...)').`), t);
139
139
  }
140
- function V(t) {
141
- (t.effectiveConfig?.fitMode || t.fitMode || G.STRETCH) === G.STRETCH ? t._gridTemplate = t._visibleColumns.map((i) => {
140
+ function B(t) {
141
+ (t.effectiveConfig?.fitMode || t.fitMode || X.STRETCH) === X.STRETCH ? t._gridTemplate = t._visibleColumns.map((i) => {
142
142
  if (i.width != null) return xe(i.width, i.field);
143
143
  const o = i.minWidth;
144
144
  return o != null ? `minmax(${o}px, 1fr)` : "1fr";
145
145
  }).join(" ").trim() : t._gridTemplate = t._visibleColumns.map((i) => i.width != null ? xe(i.width, i.field) : "max-content").join(" "), t.style.setProperty("--tbw-column-template", t._gridTemplate);
146
146
  }
147
- function bt(t) {
147
+ function mt(t) {
148
148
  return t == null ? "string" : typeof t == "number" ? "number" : typeof t == "boolean" ? "boolean" : t instanceof Date || typeof t == "string" && /\d{4}-\d{2}-\d{2}/.test(t) && !isNaN(Date.parse(t)) ? "date" : "string";
149
149
  }
150
- function mt(t, e) {
150
+ function vt(t, e) {
151
151
  const i = t[0] || {}, o = Object.keys(i).map((r) => {
152
- const s = i[r], l = bt(s);
152
+ const s = i[r], l = mt(s);
153
153
  return { field: r, header: r.charAt(0).toUpperCase() + r.slice(1), type: l };
154
154
  }), n = {};
155
155
  return o.forEach((r) => {
156
156
  n[r.field] = r.type || "string";
157
157
  }), { columns: o, typeMap: n };
158
158
  }
159
- const vt = /{{\s*([^}]+)\s*}}/g, z = "__DG_EMPTY__", Ct = /^[\w$. '?+\-*/%:()!<>=,&|]+$/, yt = /__(proto|defineGetter|defineSetter)|constructor|window|globalThis|global|process|Function|import|eval|Reflect|Proxy|Error|arguments|document|location|cookie|localStorage|sessionStorage|indexedDB|fetch|XMLHttpRequest|WebSocket|Worker|SharedWorker|ServiceWorker|opener|parent|top|frames|self|this\b/;
160
- function _t(t) {
159
+ const Ct = /{{\s*([^}]+)\s*}}/g, z = "__DG_EMPTY__", yt = /^[\w$. '?+\-*/%:()!<>=,&|]+$/, _t = /__(proto|defineGetter|defineSetter)|constructor|window|globalThis|global|process|Function|import|eval|Reflect|Proxy|Error|arguments|document|location|cookie|localStorage|sessionStorage|indexedDB|fetch|XMLHttpRequest|WebSocket|Worker|SharedWorker|ServiceWorker|opener|parent|top|frames|self|this\b/;
160
+ function Et(t) {
161
161
  return !t || typeof t != "string" ? "" : t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
162
162
  }
163
- const Et = /* @__PURE__ */ new Set([
163
+ const St = /* @__PURE__ */ new Set([
164
164
  "script",
165
165
  "iframe",
166
166
  "object",
@@ -185,18 +185,18 @@ const Et = /* @__PURE__ */ new Set([
185
185
  "plaintext",
186
186
  "xmp",
187
187
  "listing"
188
- ]), He = /^on\w+$/i, St = /* @__PURE__ */ new Set(["href", "src", "action", "formaction", "data", "srcdoc", "xlink:href", "poster", "srcset"]), Rt = /^\s*(javascript|vbscript|data|blob):/i;
188
+ ]), He = /^on\w+$/i, Rt = /* @__PURE__ */ new Set(["href", "src", "action", "formaction", "data", "srcdoc", "xlink:href", "poster", "srcset"]), At = /^\s*(javascript|vbscript|data|blob):/i;
189
189
  function k(t) {
190
190
  if (!t || typeof t != "string") return "";
191
191
  if (t.indexOf("<") === -1) return t;
192
192
  const e = document.createElement("template");
193
- return e.innerHTML = t, At(e.content), e.innerHTML;
193
+ return e.innerHTML = t, Tt(e.content), e.innerHTML;
194
194
  }
195
- function At(t) {
195
+ function Tt(t) {
196
196
  const e = [], i = t.querySelectorAll("*");
197
197
  for (const o of i) {
198
198
  const n = o.tagName.toLowerCase();
199
- if (Et.has(n)) {
199
+ if (St.has(n)) {
200
200
  e.push(o);
201
201
  continue;
202
202
  }
@@ -213,7 +213,7 @@ function At(t) {
213
213
  r.push(s.name);
214
214
  continue;
215
215
  }
216
- if (St.has(l) && Rt.test(s.value)) {
216
+ if (Rt.has(l) && At.test(s.value)) {
217
217
  r.push(s.name);
218
218
  continue;
219
219
  }
@@ -228,20 +228,20 @@ function At(t) {
228
228
  }
229
229
  function Ce(t, e) {
230
230
  if (!t || t.indexOf("{{") === -1) return t;
231
- const i = [], o = t.replace(vt, (l, a) => {
232
- const c = Tt(a, e);
231
+ const i = [], o = t.replace(Ct, (l, a) => {
232
+ const c = xt(a, e);
233
233
  return i.push({ expr: a.trim(), result: c }), c;
234
- }), n = xt(o), r = i.length && i.every((l) => l.result === "" || l.result === z);
234
+ }), n = Ht(o), r = i.length && i.every((l) => l.result === "" || l.result === z);
235
235
  return $.test(t) || r ? "" : n;
236
236
  }
237
- function Tt(t, e) {
237
+ function xt(t, e) {
238
238
  if (t = (t || "").trim(), !t || $.test(t)) return z;
239
239
  if (t === "value") return e.value == null ? z : String(e.value);
240
240
  if (t.startsWith("row.") && !/[()?]/.test(t) && !t.includes(":")) {
241
241
  const o = t.slice(4), n = e.row ? e.row[o] : void 0;
242
242
  return n == null ? z : String(n);
243
243
  }
244
- if (t.length > 80 || !Ct.test(t) || yt.test(t)) return z;
244
+ if (t.length > 80 || !yt.test(t) || _t.test(t)) return z;
245
245
  const i = t.match(/\./g);
246
246
  if (i && i.length > 1) return z;
247
247
  try {
@@ -252,7 +252,7 @@ function Tt(t, e) {
252
252
  }
253
253
  }
254
254
  const $ = /Reflect|Proxy|ownKeys/;
255
- function xt(t) {
255
+ function Ht(t) {
256
256
  return t && t.replace(new RegExp(z, "g"), "").replace(/Reflect\.[^<>{}\s]+|\bProxy\b|ownKeys\([^)]*\)/g, "");
257
257
  }
258
258
  function ge(t) {
@@ -266,14 +266,14 @@ function Le(t) {
266
266
  const e = $.test(t), i = ((o) => e ? "" : Ce(t, o));
267
267
  return i.__blocked = e, i;
268
268
  }
269
- const Ht = 100;
270
- class Lt {
271
- #l;
269
+ const Lt = 100;
270
+ class Pt {
271
+ #a;
272
272
  #n;
273
273
  #u;
274
274
  #d;
275
275
  #h;
276
- #a = {};
276
+ #l = {};
277
277
  #o = {};
278
278
  #f = !0;
279
279
  #w = [];
@@ -286,7 +286,7 @@ class Lt {
286
286
  this.#r = e;
287
287
  }
288
288
  get original() {
289
- return this.#a;
289
+ return this.#l;
290
290
  }
291
291
  get effective() {
292
292
  return this.#o;
@@ -328,10 +328,10 @@ class Lt {
328
328
  this.#f = !0;
329
329
  }
330
330
  setGridConfig(e) {
331
- this.#l = e, this.#f = !0, this.#d = void 0;
331
+ this.#a = e, this.#f = !0, this.#d = void 0;
332
332
  }
333
333
  getGridConfig() {
334
- return this.#l;
334
+ return this.#a;
335
335
  }
336
336
  setColumns(e) {
337
337
  this.#n = e, this.#f = !0;
@@ -349,8 +349,8 @@ class Lt {
349
349
  const e = (this.#o.columns?.length ?? 0) > 0;
350
350
  if (!this.#f && e)
351
351
  return;
352
- const i = this.#I();
353
- this.#f = !1, this.#a = i, Object.freeze(this.#a), this.#a.columns && Object.freeze(this.#a.columns), this.#o = this.#x(this.#a), this.#m();
352
+ const i = this.#N();
353
+ this.#f = !1, this.#l = i, Object.freeze(this.#l), this.#l.columns && Object.freeze(this.#l.columns), this.#o = this.#x(this.#l), this.#m();
354
354
  }
355
355
  #x(e) {
356
356
  const i = { ...e };
@@ -364,11 +364,11 @@ class Lt {
364
364
  }
365
365
  #m() {
366
366
  const e = this.#o;
367
- this.#z(), typeof e.rowHeight == "number" && e.rowHeight > 0 && this.#r.setRowHeight(e.rowHeight), e.fitMode === "fixed" && this.columns.forEach((o) => {
367
+ this.#O(), typeof e.rowHeight == "number" && e.rowHeight > 0 && this.#r.setRowHeight(e.rowHeight), e.fitMode === "fixed" && this.columns.forEach((o) => {
368
368
  o.width == null && (o.width = 80);
369
369
  }), this.#r.applyAnimationConfig(e);
370
370
  }
371
- #z() {
371
+ #O() {
372
372
  const e = this.#o.typeDefaults;
373
373
  if (!e) return;
374
374
  const i = this.columns;
@@ -378,8 +378,8 @@ class Lt {
378
378
  n && (!o.renderer && !o.viewRenderer && n.renderer && (o.renderer = n.renderer), !o.format && n.format && (o.format = n.format), !o.editor && n.editor && (o.editor = n.editor), !o.editorParams && n.editorParams && (o.editorParams = n.editorParams));
379
379
  }
380
380
  }
381
- #I() {
382
- const e = this.#l ? { ...this.#l } : {}, i = Array.isArray(e.columns) ? [...e.columns] : [], o = (this.#d ?? []).map((s) => ({
381
+ #N() {
382
+ const e = this.#a ? { ...this.#a } : {}, i = Array.isArray(e.columns) ? [...e.columns] : [], o = (this.#d ?? []).map((s) => ({
383
383
  ...s
384
384
  }));
385
385
  let n = Ae(
@@ -391,7 +391,7 @@ class Lt {
391
391
  o
392
392
  ));
393
393
  const r = this.#r.getRows();
394
- return n.length === 0 && r.length && (n = mt(r).columns), n.length && (n.forEach((s) => {
394
+ return n.length === 0 && r.length && (n = vt(r).columns), n.length && (n.forEach((s) => {
395
395
  s.sortable === void 0 && (s.sortable = !0), s.resizable === void 0 && (s.resizable = !0), s.__originalWidth === void 0 && typeof s.width == "number" && (s.__originalWidth = s.width);
396
396
  }), n.forEach((s) => {
397
397
  s.__viewTemplate && !s.__compiledView && (s.__compiledView = Le(s.__viewTemplate.innerHTML)), s.__editorTemplate && !s.__compiledEditor && (s.__compiledEditor = Le(s.__editorTemplate.innerHTML));
@@ -413,7 +413,7 @@ class Lt {
413
413
  const f = Array.from(r.values());
414
414
  f.sort((p, g) => (p.order ?? 100) - (g.order ?? 100)), e.shell.headerContents = f;
415
415
  }
416
- const s = this.#r.getShellToolbarContents(), l = Array.from(s.values()), a = this.#l?.shell?.header?.toolbarContents ?? [], c = new Set(a.map((f) => f.id)), h = [...a];
416
+ const s = this.#r.getShellToolbarContents(), l = Array.from(s.values()), a = this.#a?.shell?.header?.toolbarContents ?? [], c = new Set(a.map((f) => f.id)), h = [...a];
417
417
  for (const f of l)
418
418
  c.has(f.id) || h.push(f);
419
419
  h.sort((f, p) => (f.order ?? 0) - (p.order ?? 0)), e.shell.header.toolbarContents = h;
@@ -466,7 +466,7 @@ class Lt {
466
466
  l.applyColumnState(a.field, a);
467
467
  }
468
468
  resetState(e) {
469
- this.#C = void 0, this.#r.setSortState(null), this.#o = this.#x(this.#a), this.#m();
469
+ this.#C = void 0, this.#r.setSortState(null), this.#o = this.#x(this.#l), this.#m();
470
470
  for (const i of e)
471
471
  if (i.applyColumnState)
472
472
  for (const o of this.columns)
@@ -489,7 +489,7 @@ class Lt {
489
489
  this.#s = void 0;
490
490
  const i = this.collectState(e);
491
491
  this.#r.emit("column-state-change", i);
492
- }, Ht);
492
+ }, Lt);
493
493
  }
494
494
  setColumnVisible(e, i) {
495
495
  const o = this.columns, n = o.find((s) => s.field === e);
@@ -537,7 +537,7 @@ class Lt {
537
537
  this.columns = o, this.#r.renderHeader(), this.#r.updateTemplate(), this.#r.refreshVirtualWindow();
538
538
  }
539
539
  parseLightDomColumns(e) {
540
- this.#d || (this.#h = Array.from(e.querySelectorAll("tbw-grid-column")), this.#d = this.#h.length ? pt(e) : []);
540
+ this.#d || (this.#h = Array.from(e.querySelectorAll("tbw-grid-column")), this.#d = this.#h.length ? wt(e) : []);
541
541
  }
542
542
  clearLightDomCache() {
543
543
  this.#d = void 0;
@@ -624,7 +624,7 @@ function Qe(t) {
624
624
  if (n[r] === i) return r;
625
625
  return -1;
626
626
  }
627
- function Pt(t) {
627
+ function zt(t) {
628
628
  if (!t) return -1;
629
629
  const e = t.getAttribute("data-col");
630
630
  return e ? parseInt(e, 10) : -1;
@@ -632,7 +632,7 @@ function Pt(t) {
632
632
  function _e(t) {
633
633
  t && t.querySelectorAll(".cell-focus").forEach((e) => e.classList.remove("cell-focus"));
634
634
  }
635
- function zt(t) {
635
+ function Ot(t) {
636
636
  try {
637
637
  if (getComputedStyle(t).direction === "rtl") return "rtl";
638
638
  } catch {
@@ -644,9 +644,9 @@ function zt(t) {
644
644
  return "ltr";
645
645
  }
646
646
  function Pe(t) {
647
- return zt(t) === "rtl";
647
+ return Ot(t) === "rtl";
648
648
  }
649
- function no(t, e) {
649
+ function ro(t, e) {
650
650
  return t === "left" || t === "right" ? t : e === "rtl" ? t === "start" ? "right" : "left" : t === "start" ? "left" : "right";
651
651
  }
652
652
  function Ze(t, e) {
@@ -684,17 +684,17 @@ it.innerHTML = '<div class="data-grid-row" role="row" part="row"></div>';
684
684
  function Dt() {
685
685
  return tt.content.firstElementChild.cloneNode(!0);
686
686
  }
687
- function Ot() {
687
+ function Mt() {
688
688
  return it.content.firstElementChild.cloneNode(!0);
689
689
  }
690
- function Y(t) {
690
+ function W(t) {
691
691
  t.__cellDisplayCache = void 0, t.__cellCacheEpoch = void 0, t.__hasSpecialColumns = void 0;
692
692
  }
693
- function Mt(t, e, i, o, n) {
693
+ function kt(t, e, i, o, n) {
694
694
  const r = Math.max(0, i - e), s = t._bodyEl, l = t._visibleColumns, a = l.length;
695
695
  let c = t.__cachedHeaderRowCount;
696
696
  for (c === void 0 && (c = t.querySelector(".header-group-row") ? 2 : 1, t.__cachedHeaderRowCount = c); t._rowPool.length < r; ) {
697
- const p = Ot();
697
+ const p = Mt();
698
698
  t._rowPool.push(p);
699
699
  }
700
700
  if (t._rowPool.length > r) {
@@ -725,13 +725,13 @@ function Mt(t, e, i, o, n) {
725
725
  }
726
726
  if (!R || y) {
727
727
  const S = se(d), L = x || t._activeEditRows === g;
728
- S && !L ? (d.__isCustomRow && (d.className = "data-grid-row", d.setAttribute("role", "row"), d.__isCustomRow = !1), le(d), B(t, d, u, g), d.__epoch = o, d.__rowDataRef = u) : S && L ? (ae(t, d, u, g), d.__rowDataRef = u) : (d.__isCustomRow && (d.className = "data-grid-row", d.setAttribute("role", "row"), d.__isCustomRow = !1), B(t, d, u, g), d.__epoch = o, d.__rowDataRef = u);
728
+ S && !L ? (d.__isCustomRow && (d.className = "data-grid-row", d.setAttribute("role", "row"), d.__isCustomRow = !1), le(d), G(t, d, u, g), d.__epoch = o, d.__rowDataRef = u) : S && L ? (ae(t, d, u, g), d.__rowDataRef = u) : (d.__isCustomRow && (d.className = "data-grid-row", d.setAttribute("role", "row"), d.__isCustomRow = !1), G(t, d, u, g), d.__epoch = o, d.__rowDataRef = u);
729
729
  } else if (E) {
730
730
  const S = se(d), L = x || t._activeEditRows === g;
731
- S && !L ? (le(d), B(t, d, u, g), d.__epoch = o, d.__rowDataRef = u) : (ae(t, d, u, g), d.__rowDataRef = u);
731
+ S && !L ? (le(d), G(t, d, u, g), d.__epoch = o, d.__rowDataRef = u) : (ae(t, d, u, g), d.__rowDataRef = u);
732
732
  } else {
733
733
  const S = se(d), L = x || t._activeEditRows === g;
734
- S && !L ? (le(d), B(t, d, u, g), d.__epoch = o, d.__rowDataRef = u) : ae(t, d, u, g);
734
+ S && !L ? (le(d), G(t, d, u, g), d.__epoch = o, d.__rowDataRef = u) : ae(t, d, u, g);
735
735
  }
736
736
  let v = !1;
737
737
  const b = t.changedRowIds;
@@ -750,8 +750,8 @@ function Mt(t, e, i, o, n) {
750
750
  try {
751
751
  const L = N(u);
752
752
  if (L && L.length > 0) {
753
- const re = L.filter((X) => X && typeof X == "string");
754
- re.forEach((X) => d.classList.add(X)), d.setAttribute("data-dynamic-classes", re.join(" "));
753
+ const re = L.filter((Y) => Y && typeof Y == "string");
754
+ re.forEach((Y) => d.classList.add(Y)), d.setAttribute("data-dynamic-classes", re.join(" "));
755
755
  } else
756
756
  d.removeAttribute("data-dynamic-classes");
757
757
  } catch (L) {
@@ -803,7 +803,7 @@ function ae(t, e, i, o) {
803
803
  }
804
804
  for (let u = 0; u < a; u++)
805
805
  if (r[u].externalView && !n[u].querySelector("[data-external-view]")) {
806
- B(t, e, i, o);
806
+ G(t, e, i, o);
807
807
  return;
808
808
  }
809
809
  for (let u = 0; u < a; u++) {
@@ -898,7 +898,7 @@ function ae(t, e, i, o) {
898
898
  });
899
899
  }
900
900
  }
901
- function B(t, e, i, o) {
901
+ function G(t, e, i, o) {
902
902
  e.classList.remove("tbw-row-loading"), e.removeAttribute("aria-busy");
903
903
  const n = t.__frameworkAdapter;
904
904
  if (n?.releaseCell) {
@@ -1009,11 +1009,11 @@ function ze(t, e, i) {
1009
1009
  }
1010
1010
  return;
1011
1011
  }
1012
- W(t);
1012
+ F(t);
1013
1013
  }
1014
1014
  }
1015
1015
  }
1016
- function kt(t, e) {
1016
+ function It(t, e) {
1017
1017
  if (t._dispatchKeyDown?.(e))
1018
1018
  return;
1019
1019
  const i = t._rows.length - 1, o = t._visibleColumns.length - 1, n = t._activeEditRows !== void 0 && t._activeEditRows !== -1, s = t._visibleColumns[t._focusCol]?.type, l = e.composedPath?.() ?? [], a = l.length ? l[0] : e.target, c = (h) => {
@@ -1024,7 +1024,7 @@ function kt(t, e) {
1024
1024
  if (!(c(a) && (e.key === "Home" || e.key === "End")) && !(c(a) && (e.key === "ArrowUp" || e.key === "ArrowDown") && a.tagName === "INPUT" && a.type === "number") && !(c(a) && (e.key === "ArrowLeft" || e.key === "ArrowRight")) && !(c(a) && (e.key === "Enter" || e.key === "Escape")) && !(n && s === "select" && (e.key === "ArrowDown" || e.key === "ArrowUp"))) {
1025
1025
  switch (e.key) {
1026
1026
  case "Tab": {
1027
- e.preventDefault(), !e.shiftKey ? t._focusCol < o ? t._focusCol += 1 : (typeof t.commitActiveRowEdit == "function" && t.commitActiveRowEdit(), t._focusRow < i && (t._focusRow += 1, t._focusCol = 0)) : t._focusCol > 0 ? t._focusCol -= 1 : t._focusRow > 0 && (typeof t.commitActiveRowEdit == "function" && t._activeEditRows === t._focusRow && t.commitActiveRowEdit(), t._focusRow -= 1, t._focusCol = o), W(t);
1027
+ e.preventDefault(), !e.shiftKey ? t._focusCol < o ? t._focusCol += 1 : (typeof t.commitActiveRowEdit == "function" && t.commitActiveRowEdit(), t._focusRow < i && (t._focusRow += 1, t._focusCol = 0)) : t._focusCol > 0 ? t._focusCol -= 1 : t._focusRow > 0 && (typeof t.commitActiveRowEdit == "function" && t._activeEditRows === t._focusRow && t.commitActiveRowEdit(), t._focusRow -= 1, t._focusCol = o), F(t);
1028
1028
  return;
1029
1029
  }
1030
1030
  case "ArrowDown":
@@ -1042,10 +1042,10 @@ function kt(t, e) {
1042
1042
  break;
1043
1043
  }
1044
1044
  case "Home":
1045
- (e.ctrlKey || e.metaKey) && (n && typeof t.commitActiveRowEdit == "function" && t.commitActiveRowEdit(), t._focusRow = 0), t._focusCol = 0, e.preventDefault(), W(t, { forceScrollLeft: !0 });
1045
+ (e.ctrlKey || e.metaKey) && (n && typeof t.commitActiveRowEdit == "function" && t.commitActiveRowEdit(), t._focusRow = 0), t._focusCol = 0, e.preventDefault(), F(t, { forceScrollLeft: !0 });
1046
1046
  return;
1047
1047
  case "End":
1048
- (e.ctrlKey || e.metaKey) && (n && typeof t.commitActiveRowEdit == "function" && t.commitActiveRowEdit(), t._focusRow = i), t._focusCol = o, e.preventDefault(), W(t, { forceScrollRight: !0 });
1048
+ (e.ctrlKey || e.metaKey) && (n && typeof t.commitActiveRowEdit == "function" && t.commitActiveRowEdit(), t._focusRow = i), t._focusCol = o, e.preventDefault(), F(t, { forceScrollRight: !0 });
1049
1049
  return;
1050
1050
  case "PageDown":
1051
1051
  t._focusRow = Math.min(i, t._focusRow + 20), e.preventDefault();
@@ -1084,10 +1084,10 @@ function kt(t, e) {
1084
1084
  default:
1085
1085
  return;
1086
1086
  }
1087
- W(t);
1087
+ F(t);
1088
1088
  }
1089
1089
  }
1090
- function W(t, e) {
1090
+ function F(t, e) {
1091
1091
  if (t._virtualization?.enabled) {
1092
1092
  const { rowHeight: s, container: l, viewportEl: a } = t._virtualization, c = l, h = a?.clientHeight ?? c?.clientHeight ?? 0;
1093
1093
  if (c && h > 0) {
@@ -1139,8 +1139,8 @@ function W(t, e) {
1139
1139
  }
1140
1140
  }
1141
1141
  const ie = /* @__PURE__ */ new WeakMap();
1142
- function It(t, e) {
1143
- const i = Qe(e), o = Pt(e);
1142
+ function Nt(t, e) {
1143
+ const i = Qe(e), o = zt(e);
1144
1144
  if (i < 0 || o < 0) return;
1145
1145
  t._focusRow = i, t._focusCol = o, _e(t._bodyEl), e.classList.add("cell-focus"), e.setAttribute("aria-selected", "true");
1146
1146
  const n = e.closest("tbw-grid");
@@ -1155,7 +1155,7 @@ function Ee(t, e, i, o) {
1155
1155
  }
1156
1156
  const s = n?.closest?.("[data-col]"), l = n?.closest?.(".data-grid-row"), a = n?.closest?.(".header-row");
1157
1157
  let c, h, f, p, g, u;
1158
- return s && (c = parseInt(s.getAttribute("data-row") ?? "-1", 10), h = parseInt(s.getAttribute("data-col") ?? "-1", 10), c >= 0 && h >= 0 && (f = t._rows[c], u = t._columns[h], p = u?.field, g = f && p ? f[p] : void 0)), {
1158
+ return s && (c = parseInt(s.getAttribute("data-row") ?? "-1", 10), h = parseInt(s.getAttribute("data-col") ?? "-1", 10), c >= 0 && h >= 0 && (f = t._rows[c], u = t._visibleColumns[h], p = u?.field, g = f && p ? f[p] : void 0)), {
1159
1159
  type: o,
1160
1160
  row: f,
1161
1161
  rowIndex: c !== void 0 && c >= 0 ? c : void 0,
@@ -1170,26 +1170,26 @@ function Ee(t, e, i, o) {
1170
1170
  cell: c !== void 0 && h !== void 0 && c >= 0 && h >= 0 ? { row: c, col: h } : void 0
1171
1171
  };
1172
1172
  }
1173
- function Nt(t, e, i) {
1173
+ function qt(t, e, i) {
1174
1174
  const o = Ee(t, e, i, "mousedown");
1175
1175
  (t._dispatchCellMouseDown?.(o) ?? !1) && ie.set(t, !0);
1176
1176
  }
1177
- function qt(t, e, i) {
1177
+ function $t(t, e, i) {
1178
1178
  if (!ie.get(t)) return;
1179
1179
  const o = Ee(t, e, i, "mousemove");
1180
1180
  t._dispatchCellMouseMove?.(o);
1181
1181
  }
1182
- function $t(t, e, i) {
1182
+ function Wt(t, e, i) {
1183
1183
  if (!ie.get(t)) return;
1184
1184
  const o = Ee(t, e, i, "mouseup");
1185
1185
  t._dispatchCellMouseUp?.(o), ie.set(t, !1);
1186
1186
  }
1187
- function Wt(t, e, i) {
1187
+ function Ft(t, e, i) {
1188
1188
  e.addEventListener(
1189
1189
  "mousedown",
1190
1190
  (o) => {
1191
1191
  const n = o.target.closest(".cell[data-col]");
1192
- n && (n.classList.contains("editing") || (o.preventDefault(), It(t, n)));
1192
+ n && (n.classList.contains("editing") || (o.preventDefault(), Nt(t, n)));
1193
1193
  },
1194
1194
  { signal: i }
1195
1195
  ), e.addEventListener(
@@ -1211,49 +1211,55 @@ function Wt(t, e, i) {
1211
1211
  { signal: i }
1212
1212
  );
1213
1213
  }
1214
- function Ft(t, e, i, o) {
1215
- e.addEventListener("keydown", (n) => kt(t, n), { signal: o }), i.addEventListener("mousedown", (n) => Nt(t, i, n), { signal: o }), document.addEventListener("mousemove", (n) => qt(t, i, n), { signal: o }), document.addEventListener("mouseup", (n) => $t(t, i, n), { signal: o });
1214
+ function Vt(t, e, i, o) {
1215
+ e.addEventListener("keydown", (n) => It(t, n), { signal: o }), i.addEventListener("mousedown", (n) => qt(t, i, n), { signal: o }), document.addEventListener("mousemove", (n) => $t(t, i, n), { signal: o }), document.addEventListener("mouseup", (n) => Wt(t, i, n), { signal: o });
1216
1216
  }
1217
1217
  function Ut(t, e) {
1218
1218
  return t == null && e == null ? 0 : t == null ? -1 : e == null || t > e ? 1 : t < e ? -1 : 0;
1219
1219
  }
1220
- function Vt(t, e, i) {
1220
+ function ot(t, e, i) {
1221
1221
  const n = i.find((l) => l.field === e.field)?.sortComparator ?? Ut, { field: r, direction: s } = e;
1222
1222
  return [...t].sort((l, a) => n(l[r], a[r], l, a) * s);
1223
1223
  }
1224
- function De(t, e, i, o) {
1224
+ function Oe(t, e, i, o) {
1225
1225
  t._rows = e, t.__rowRenderEpoch++, t._rowPool.forEach((n) => n.__epoch = -1), oe(t), t.refreshVirtualWindow(!0), t.dispatchEvent(
1226
1226
  new CustomEvent("sort-change", { detail: { field: i.field, direction: o } })
1227
1227
  ), t.requestStateChange?.();
1228
1228
  }
1229
- function Oe(t, e) {
1229
+ function De(t, e) {
1230
1230
  !t._sortState || t._sortState.field !== e.field ? (t._sortState || (t.__originalOrder = t._rows.slice()), Me(t, e, 1)) : t._sortState.direction === 1 ? Me(t, e, -1) : (t._sortState = null, t.__rowRenderEpoch++, t._rowPool.forEach((o) => o.__epoch = -1), t._rows = t.__originalOrder.slice(), oe(t), t._headerRowEl?.querySelectorAll('[role="columnheader"].sortable')?.forEach((o) => {
1231
1231
  o.getAttribute("aria-sort") ? (o.getAttribute("aria-sort") === "ascending" || o.getAttribute("aria-sort") === "descending") && (t._sortState || o.setAttribute("aria-sort", "none")) : o.setAttribute("aria-sort", "none");
1232
1232
  }), t.refreshVirtualWindow(!0), t.dispatchEvent(
1233
1233
  new CustomEvent("sort-change", { detail: { field: e.field, direction: 0 } })
1234
1234
  ), t.requestStateChange?.());
1235
1235
  }
1236
+ function Bt(t, e) {
1237
+ if (!t._sortState) return e;
1238
+ t.__originalOrder = [...e];
1239
+ const o = (t.effectiveConfig?.sortHandler ?? ot)(e, t._sortState, t._columns);
1240
+ return o && typeof o.then == "function" ? e : o;
1241
+ }
1236
1242
  function Me(t, e, i) {
1237
1243
  t._sortState = { field: e.field, direction: i };
1238
- const o = { field: e.field, direction: i }, n = t._columns, s = (t.effectiveConfig?.sortHandler ?? Vt)(t._rows, o, n);
1244
+ const o = { field: e.field, direction: i }, n = t._columns, s = (t.effectiveConfig?.sortHandler ?? ot)(t._rows, o, n);
1239
1245
  s && typeof s.then == "function" ? s.then((l) => {
1240
- De(t, l, e, i);
1241
- }) : De(t, s, e, i);
1246
+ Oe(t, l, e, i);
1247
+ }) : Oe(t, s, e, i);
1242
1248
  }
1243
- function F(t, e) {
1249
+ function V(t, e) {
1244
1250
  return t.effectiveConfig?.sortable !== !1 && e.sortable === !0;
1245
1251
  }
1246
1252
  function j(t, e) {
1247
1253
  return t.effectiveConfig?.resizable !== !1 && e.resizable !== !1;
1248
1254
  }
1249
- function Bt(t, e) {
1255
+ function Gt(t, e) {
1250
1256
  typeof e == "string" ? t.textContent = e : e instanceof HTMLElement && (t.innerHTML = "", t.appendChild(e.cloneNode(!0)));
1251
1257
  }
1252
1258
  function K(t, e) {
1253
1259
  const i = document.createElement("span");
1254
1260
  Ye(i, "sort-indicator");
1255
1261
  const o = t._sortState?.field === e.field ? t._sortState.direction : 0, n = { ...M, ...t.icons }, r = o === 1 ? n.sortAsc : o === -1 ? n.sortDesc : n.sortNone;
1256
- return Bt(i, r), i;
1262
+ return Gt(i, r), i;
1257
1263
  }
1258
1264
  function Q(t, e, i) {
1259
1265
  const o = document.createElement("div");
@@ -1267,15 +1273,15 @@ function Z(t, e, i, o) {
1267
1273
  o.classList.add("sortable"), o.tabIndex = 0;
1268
1274
  const n = t._sortState?.field === e.field ? t._sortState.direction : 0;
1269
1275
  o.setAttribute("aria-sort", n === 0 ? "none" : n === 1 ? "ascending" : "descending"), o.addEventListener("click", (r) => {
1270
- t._resizeController?.isResizing || t._dispatchHeaderClick?.(r, e, o) || Oe(t, e);
1276
+ t._resizeController?.isResizing || t._dispatchHeaderClick?.(r, e, o) || De(t, e);
1271
1277
  }), o.addEventListener("keydown", (r) => {
1272
1278
  if (r.key === "Enter" || r.key === " ") {
1273
1279
  if (r.preventDefault(), t._dispatchHeaderClick?.(r, e, o)) return;
1274
- Oe(t, e);
1280
+ De(t, e);
1275
1281
  }
1276
1282
  });
1277
1283
  }
1278
- function Gt(t, e) {
1284
+ function Xt(t, e) {
1279
1285
  if (e != null)
1280
1286
  if (typeof e == "string") {
1281
1287
  const i = document.createElement("span");
@@ -1297,30 +1303,30 @@ function oe(t) {
1297
1303
  sortState: l,
1298
1304
  filterActive: !1,
1299
1305
  cellEl: n,
1300
- renderSortIcon: () => F(t, i) ? K(t, i) : null,
1306
+ renderSortIcon: () => V(t, i) ? K(t, i) : null,
1301
1307
  renderFilterButton: () => null
1302
1308
  }, c = i.headerRenderer(a);
1303
- Gt(n, c), F(t, i) && Z(t, i, o, n), j(t, i) && (n.classList.add("resizable"), n.appendChild(Q(t, o, n)));
1309
+ Xt(n, c), V(t, i) && Z(t, i, o, n), j(t, i) && (n.classList.add("resizable"), n.appendChild(Q(t, o, n)));
1304
1310
  } else if (i.headerLabelRenderer) {
1305
1311
  const a = {
1306
1312
  column: i,
1307
1313
  value: r
1308
1314
  }, c = i.headerLabelRenderer(a), h = document.createElement("span");
1309
- c == null ? h.textContent = r : typeof c == "string" ? h.innerHTML = k(c) : c instanceof Node && h.appendChild(c), n.appendChild(h), F(t, i) && (Z(t, i, o, n), n.appendChild(K(t, i))), j(t, i) && (n.classList.add("resizable"), n.appendChild(Q(t, o, n)));
1315
+ c == null ? h.textContent = r : typeof c == "string" ? h.innerHTML = k(c) : c instanceof Node && h.appendChild(c), n.appendChild(h), V(t, i) && (Z(t, i, o, n), n.appendChild(K(t, i))), j(t, i) && (n.classList.add("resizable"), n.appendChild(Q(t, o, n)));
1310
1316
  } else if (i.__headerTemplate)
1311
- Array.from(i.__headerTemplate.childNodes).forEach((a) => n.appendChild(a.cloneNode(!0))), F(t, i) && (Z(t, i, o, n), n.appendChild(K(t, i))), j(t, i) && (n.classList.add("resizable"), n.appendChild(Q(t, o, n)));
1317
+ Array.from(i.__headerTemplate.childNodes).forEach((a) => n.appendChild(a.cloneNode(!0))), V(t, i) && (Z(t, i, o, n), n.appendChild(K(t, i))), j(t, i) && (n.classList.add("resizable"), n.appendChild(Q(t, o, n)));
1312
1318
  else {
1313
1319
  const a = document.createElement("span");
1314
- a.textContent = r, n.appendChild(a), F(t, i) && (Z(t, i, o, n), n.appendChild(K(t, i))), j(t, i) && (n.classList.add("resizable"), n.appendChild(Q(t, o, n)));
1320
+ a.textContent = r, n.appendChild(a), V(t, i) && (Z(t, i, o, n), n.appendChild(K(t, i))), j(t, i) && (n.classList.add("resizable"), n.appendChild(Q(t, o, n)));
1315
1321
  }
1316
1322
  e.appendChild(n);
1317
1323
  }), e.querySelectorAll(".cell.sortable").forEach((i) => {
1318
1324
  i.getAttribute("aria-sort") || i.setAttribute("aria-sort", "none");
1319
1325
  }), e.children.length > 0 ? (e.setAttribute("role", "row"), e.setAttribute("aria-rowindex", "1")) : (e.removeAttribute("role"), e.removeAttribute("aria-rowindex")));
1320
1326
  }
1321
- const ot = typeof requestIdleCallback == "function";
1322
- function Xt(t, e) {
1323
- return ot ? requestIdleCallback(t, e) : window.setTimeout(() => {
1327
+ const nt = typeof requestIdleCallback == "function";
1328
+ function Yt(t, e) {
1329
+ return nt ? requestIdleCallback(t, e) : window.setTimeout(() => {
1324
1330
  const i = Date.now();
1325
1331
  t({
1326
1332
  didTimeout: !1,
@@ -1329,13 +1335,13 @@ function Xt(t, e) {
1329
1335
  }, 1);
1330
1336
  }
1331
1337
  function ke(t) {
1332
- ot ? cancelIdleCallback(t) : clearTimeout(t);
1338
+ nt ? cancelIdleCallback(t) : clearTimeout(t);
1333
1339
  }
1334
- function Yt(t) {
1340
+ function jt(t) {
1335
1341
  const e = document.createElement("div");
1336
1342
  return e.className = `tbw-spinner tbw-spinner--${t}`, e.setAttribute("role", "progressbar"), e.setAttribute("aria-label", "Loading"), e;
1337
1343
  }
1338
- function jt(t, e) {
1344
+ function Kt(t, e) {
1339
1345
  if (e) {
1340
1346
  const o = e({ size: t });
1341
1347
  if (typeof o == "string") {
@@ -1344,19 +1350,19 @@ function jt(t, e) {
1344
1350
  }
1345
1351
  return o;
1346
1352
  }
1347
- return Yt(t);
1353
+ return jt(t);
1348
1354
  }
1349
- function Kt(t) {
1355
+ function Qt(t) {
1350
1356
  const e = document.createElement("div");
1351
- return e.className = "tbw-loading-overlay", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.appendChild(jt("large", t)), e;
1357
+ return e.className = "tbw-loading-overlay", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.appendChild(Kt("large", t)), e;
1352
1358
  }
1353
- function Qt(t, e) {
1359
+ function Zt(t, e) {
1354
1360
  t.appendChild(e);
1355
1361
  }
1356
- function Zt(t) {
1362
+ function Jt(t) {
1357
1363
  t?.remove();
1358
1364
  }
1359
- function Jt(t, e) {
1365
+ function ei(t, e) {
1360
1366
  if (e) {
1361
1367
  if (t.classList.add("tbw-row-loading"), t.setAttribute("aria-busy", "true"), !t.querySelector(".tbw-row-loading-overlay")) {
1362
1368
  const i = document.createElement("div");
@@ -1367,20 +1373,20 @@ function Jt(t, e) {
1367
1373
  } else
1368
1374
  t.classList.remove("tbw-row-loading"), t.removeAttribute("aria-busy"), t.querySelector(".tbw-row-loading-overlay")?.remove();
1369
1375
  }
1370
- function ei(t, e) {
1376
+ function ti(t, e) {
1371
1377
  e ? (t.classList.add("tbw-cell-loading"), t.setAttribute("aria-busy", "true")) : (t.classList.remove("tbw-cell-loading"), t.removeAttribute("aria-busy"));
1372
1378
  }
1373
1379
  var A = ((t) => (t[t.STYLE = 1] = "STYLE", t[t.VIRTUALIZATION = 2] = "VIRTUALIZATION", t[t.HEADER = 3] = "HEADER", t[t.ROWS = 4] = "ROWS", t[t.COLUMNS = 5] = "COLUMNS", t[t.FULL = 6] = "FULL", t))(A || {});
1374
- class ti {
1375
- #l;
1380
+ class ii {
1381
+ #a;
1376
1382
  #n = 0;
1377
1383
  #u = 0;
1378
1384
  #d = null;
1379
1385
  #h = null;
1380
- #a = null;
1386
+ #l = null;
1381
1387
  #o = !1;
1382
1388
  constructor(e) {
1383
- this.#l = e;
1389
+ this.#a = e;
1384
1390
  }
1385
1391
  requestPhase(e, i) {
1386
1392
  e > this.#n && (this.#n = e), this.#u === 0 && (this.#f(), this.#u = requestAnimationFrame(() => this.#w()));
@@ -1389,7 +1395,7 @@ class ti {
1389
1395
  return this.#d ? this.#d : Promise.resolve();
1390
1396
  }
1391
1397
  setInitialReadyResolver(e) {
1392
- this.#a = e;
1398
+ this.#l = e;
1393
1399
  }
1394
1400
  cancel() {
1395
1401
  this.#u !== 0 && (cancelAnimationFrame(this.#u), this.#u = 0), this.#n = 0, this.#h && (this.#h(), this.#h = null, this.#d = null);
@@ -1406,12 +1412,12 @@ class ti {
1406
1412
  }));
1407
1413
  }
1408
1414
  #w() {
1409
- if (this.#u = 0, !this.#l.isConnected()) {
1415
+ if (this.#u = 0, !this.#a.isConnected()) {
1410
1416
  this.#n = 0, this.#h && (this.#h(), this.#h = null, this.#d = null);
1411
1417
  return;
1412
1418
  }
1413
1419
  const e = this.#n;
1414
- this.#n = 0, e >= 5 && this.#l.mergeConfig(), e >= 4 && this.#l.processRows(), e >= 5 && (this.#l.processColumns(), this.#l.updateTemplate()), e >= 3 && this.#l.renderHeader(), e >= 2 && this.#l.renderVirtualWindow(), e >= 1 && this.#l.afterRender(), !this.#o && this.#a && (this.#o = !0, this.#a()), this.#h && (this.#h(), this.#h = null, this.#d = null);
1420
+ this.#n = 0, e >= 5 && this.#a.mergeConfig(), e >= 4 && this.#a.processRows(), e >= 5 && (this.#a.processColumns(), this.#a.updateTemplate()), e >= 3 && this.#a.renderHeader(), e >= 2 && this.#a.renderVirtualWindow(), e >= 1 && this.#a.afterRender(), !this.#o && this.#l && (this.#o = !0, this.#l()), this.#h && (this.#h(), this.#h = null, this.#d = null);
1415
1421
  }
1416
1422
  }
1417
1423
  function Ie(t) {
@@ -1452,51 +1458,52 @@ function Ie(t) {
1452
1458
  }
1453
1459
  };
1454
1460
  }
1455
- const ce = "data-animating", ii = {
1461
+ const ce = "data-animating", oi = {
1456
1462
  change: "--tbw-row-change-duration",
1457
1463
  insert: "--tbw-row-insert-duration",
1458
1464
  remove: "--tbw-row-remove-duration"
1459
- }, oi = {
1465
+ }, ni = {
1460
1466
  change: 500,
1461
1467
  insert: 300,
1462
1468
  remove: 200
1463
1469
  };
1464
- function ni(t) {
1470
+ function ri(t) {
1465
1471
  const e = t.trim().toLowerCase();
1466
1472
  return e.endsWith("ms") ? parseFloat(e) : e.endsWith("s") ? parseFloat(e) * 1e3 : parseFloat(e);
1467
1473
  }
1468
- function ri(t, e) {
1469
- const i = ii[e], o = getComputedStyle(t).getPropertyValue(i);
1474
+ function si(t, e) {
1475
+ const i = oi[e], o = getComputedStyle(t).getPropertyValue(i);
1470
1476
  if (o) {
1471
- const n = ni(o);
1477
+ const n = ri(o);
1472
1478
  if (!isNaN(n) && n > 0)
1473
1479
  return n;
1474
1480
  }
1475
- return oi[e];
1481
+ return ni[e];
1476
1482
  }
1477
- function si(t, e, i) {
1483
+ function li(t, e, i) {
1478
1484
  t.removeAttribute(ce), t.offsetWidth, t.setAttribute(ce, e);
1479
- const o = ri(t, e);
1485
+ const o = si(t, e);
1480
1486
  setTimeout(() => {
1481
- e !== "remove" && t.removeAttribute(ce);
1487
+ e !== "remove" && t.removeAttribute(ce), i?.();
1482
1488
  }, o);
1483
1489
  }
1484
1490
  function Se(t, e, i) {
1485
1491
  if (e < 0)
1486
- return !1;
1492
+ return Promise.resolve(!1);
1487
1493
  const o = t.findRenderedRowElement?.(e);
1488
- return o ? (si(o, i), !0) : !1;
1489
- }
1490
- function li(t, e, i) {
1491
- let o = 0;
1492
- for (const n of e)
1493
- Se(t, n, i) && o++;
1494
- return o;
1494
+ return o ? new Promise((n) => {
1495
+ li(o, i, () => n(!0));
1496
+ }) : Promise.resolve(!1);
1495
1497
  }
1496
1498
  function ai(t, e, i) {
1499
+ return Promise.all(e.map((o) => Se(t, o, i))).then(
1500
+ (o) => o.filter(Boolean).length
1501
+ );
1502
+ }
1503
+ function ci(t, e, i) {
1497
1504
  const o = t._rows ?? [], n = t.getRowId;
1498
1505
  if (!n)
1499
- return !1;
1506
+ return Promise.resolve(!1);
1500
1507
  const r = o.findIndex((s) => {
1501
1508
  if (s == null) return !1;
1502
1509
  try {
@@ -1505,7 +1512,7 @@ function ai(t, e, i) {
1505
1512
  return !1;
1506
1513
  }
1507
1514
  });
1508
- return r < 0 ? !1 : Se(t, r, i);
1515
+ return r < 0 ? Promise.resolve(!1) : Se(t, r, i);
1509
1516
  }
1510
1517
  function J(t, e, i) {
1511
1518
  const o = document.createElement(t);
@@ -1525,7 +1532,7 @@ function P(t, e) {
1525
1532
  }
1526
1533
  return i;
1527
1534
  }
1528
- function nt(t, e, i) {
1535
+ function rt(t, e, i) {
1529
1536
  const o = document.createElement("button");
1530
1537
  if (t && (o.className = t), e)
1531
1538
  for (const n in e) {
@@ -1534,8 +1541,8 @@ function nt(t, e, i) {
1534
1541
  }
1535
1542
  return o;
1536
1543
  }
1537
- const rt = document.createElement("template");
1538
- rt.innerHTML = `
1544
+ const st = document.createElement("template");
1545
+ st.innerHTML = `
1539
1546
  <div class="tbw-scroll-area">
1540
1547
  <div class="rows-body-wrapper">
1541
1548
  <div class="rows-body" role="grid">
@@ -1554,8 +1561,8 @@ rt.innerHTML = `
1554
1561
  <div class="faux-vscroll-spacer"></div>
1555
1562
  </div>
1556
1563
  `;
1557
- function st() {
1558
- return rt.content.cloneNode(!0);
1564
+ function lt() {
1565
+ return st.content.cloneNode(!0);
1559
1566
  }
1560
1567
  function Ne(t) {
1561
1568
  const e = document.createDocumentFragment(), i = P(t.hasShell ? "tbw-grid-root has-shell" : "tbw-grid-root");
@@ -1563,11 +1570,11 @@ function Ne(t) {
1563
1570
  i.appendChild(t.shellHeader), i.appendChild(t.shellBody);
1564
1571
  else {
1565
1572
  const o = P("tbw-grid-content");
1566
- o.appendChild(st()), i.appendChild(o);
1573
+ o.appendChild(lt()), i.appendChild(o);
1567
1574
  }
1568
1575
  return e.appendChild(i), e;
1569
1576
  }
1570
- function ci(t) {
1577
+ function di(t) {
1571
1578
  const e = P("tbw-shell-header", { part: "shell-header", role: "presentation" });
1572
1579
  if (t.title) {
1573
1580
  const r = P("tbw-shell-title");
@@ -1585,7 +1592,7 @@ function ci(t) {
1585
1592
  for (const r of t.apiButtons)
1586
1593
  r.hasRender && o.appendChild(P("tbw-toolbar-content-slot", { "data-toolbar-content": r.id }));
1587
1594
  if ((t.configButtons.some((r) => r.hasRender) || t.apiButtons.some((r) => r.hasRender)) && t.hasPanels && o.appendChild(P("tbw-toolbar-separator")), t.hasPanels) {
1588
- const r = nt(t.isPanelOpen ? "tbw-toolbar-btn active" : "tbw-toolbar-btn", {
1595
+ const r = rt(t.isPanelOpen ? "tbw-toolbar-btn active" : "tbw-toolbar-btn", {
1589
1596
  "data-panel-toggle": "",
1590
1597
  title: "Settings",
1591
1598
  "aria-label": "Toggle settings panel",
@@ -1596,9 +1603,9 @@ function ci(t) {
1596
1603
  }
1597
1604
  return e.appendChild(o), e;
1598
1605
  }
1599
- function di(t) {
1606
+ function hi(t) {
1600
1607
  const e = P("tbw-shell-body"), i = t.panels.length > 0, o = t.panels.length === 1, n = P("tbw-grid-content");
1601
- n.appendChild(st());
1608
+ n.appendChild(lt());
1602
1609
  let r = null;
1603
1610
  if (i) {
1604
1611
  r = J("aside", {
@@ -1618,7 +1625,7 @@ function di(t) {
1618
1625
  );
1619
1626
  const l = P("tbw-tool-panel-content", { role: "presentation" }), a = P("tbw-accordion");
1620
1627
  for (const c of t.panels) {
1621
- const h = `tbw-accordion-section${c.isExpanded ? " expanded" : ""}${o ? " single" : ""}`, f = P(h, { "data-section": c.id }), p = nt("tbw-accordion-header", {
1628
+ const h = `tbw-accordion-section${c.isExpanded ? " expanded" : ""}${o ? " single" : ""}`, f = P(h, { "data-section": c.id }), p = rt("tbw-accordion-header", {
1622
1629
  "aria-expanded": String(c.isExpanded),
1623
1630
  "aria-controls": `tbw-section-${c.id}`
1624
1631
  });
@@ -1645,7 +1652,7 @@ function di(t) {
1645
1652
  function q(t) {
1646
1653
  return t ? typeof t == "string" ? t : t.outerHTML : "";
1647
1654
  }
1648
- function hi() {
1655
+ function ui() {
1649
1656
  return {
1650
1657
  toolPanels: /* @__PURE__ */ new Map(),
1651
1658
  headerContents: /* @__PURE__ */ new Map(),
@@ -1664,10 +1671,10 @@ function hi() {
1664
1671
  lightDomContentMoved: !1
1665
1672
  };
1666
1673
  }
1667
- function lt(t) {
1674
+ function at(t) {
1668
1675
  return !!(t?.header?.title || t?.header?.toolbarContents?.length || t?.toolPanels?.length || t?.headerContents?.length || t?.header?.lightDomContent?.length || t?.header?.hasToolButtonsContainer);
1669
1676
  }
1670
- function ui(t, e, i = "☰") {
1677
+ function fi(t, e, i = "☰") {
1671
1678
  const o = t?.header?.title ?? e.lightDomTitle ?? "", n = !!o, r = q(i), s = t?.header?.toolbarContents ?? [], l = [...e.toolbarContents.values()], a = new Set(s.map((d) => d.id)), c = [...s];
1672
1679
  for (const d of l)
1673
1680
  a.has(d.id) || c.push(d);
@@ -1681,7 +1688,7 @@ function ui(t, e, i = "☰") {
1681
1688
  }
1682
1689
  return `
1683
1690
  <div class="tbw-shell-header" part="shell-header" role="presentation">
1684
- ${n ? `<div class="tbw-shell-title">${_t(o)}</div>` : ""}
1691
+ ${n ? `<div class="tbw-shell-title">${Et(o)}</div>` : ""}
1685
1692
  <div class="tbw-shell-content" part="shell-content" role="presentation" data-light-dom-header-content></div>
1686
1693
  <div class="tbw-shell-toolbar" part="shell-toolbar" role="presentation">
1687
1694
  ${u}
@@ -1760,7 +1767,7 @@ function We(t, e, i) {
1760
1767
  e.toolPanels.set(s, u), e.lightDomToolPanelIds.add(s), r.style.display = "none";
1761
1768
  });
1762
1769
  }
1763
- function fi(t, e, i, o) {
1770
+ function gi(t, e, i, o) {
1764
1771
  const n = t.querySelector(".tbw-shell-toolbar");
1765
1772
  n && n.addEventListener("click", (s) => {
1766
1773
  if (s.target.closest("[data-panel-toggle]")) {
@@ -1777,7 +1784,7 @@ function fi(t, e, i, o) {
1777
1784
  }
1778
1785
  });
1779
1786
  }
1780
- function gi(t, e, i, o) {
1787
+ function pi(t, e, i, o) {
1781
1788
  if (!e?.toolPanel?.closeOnClickOutside)
1782
1789
  return () => {
1783
1790
  };
@@ -1788,7 +1795,7 @@ function gi(t, e, i, o) {
1788
1795
  };
1789
1796
  return t.addEventListener("mousedown", n), () => t.removeEventListener("mousedown", n);
1790
1797
  }
1791
- function pi(t, e, i) {
1798
+ function wi(t, e, i) {
1792
1799
  const o = t.querySelector(".tbw-tool-panel"), n = t.querySelector("[data-resize-handle]"), r = t.querySelector(".tbw-shell-body");
1793
1800
  if (!o || !n || !r)
1794
1801
  return () => {
@@ -1844,7 +1851,7 @@ function pe(t, e) {
1844
1851
  c && e.headerContentCleanups.set(s.id, c);
1845
1852
  }
1846
1853
  }
1847
- function wi(t, e, i) {
1854
+ function bi(t, e, i) {
1848
1855
  if (!e.isPanelOpen) return;
1849
1856
  const o = q(i?.expand ?? M.expand), n = q(i?.collapse ?? M.collapse);
1850
1857
  for (const [r, s] of e.toolPanels) {
@@ -1869,7 +1876,7 @@ function Fe(t, e) {
1869
1876
  const i = t.querySelector("[data-panel-toggle]");
1870
1877
  i && (i.classList.toggle("active", e.isPanelOpen), i.setAttribute("aria-pressed", String(e.isPanelOpen)));
1871
1878
  }
1872
- function Ue(t, e) {
1879
+ function Ve(t, e) {
1873
1880
  const i = t.querySelector(".tbw-tool-panel");
1874
1881
  i && (i.classList.toggle("open", e.isPanelOpen), e.isPanelOpen || (i.style.width = ""));
1875
1882
  }
@@ -1878,7 +1885,7 @@ function he(t) {
1878
1885
  e();
1879
1886
  t.toolbarContentCleanups.clear();
1880
1887
  }
1881
- function bi(t) {
1888
+ function mi(t) {
1882
1889
  for (const e of t.headerContentCleanups.values())
1883
1890
  e();
1884
1891
  t.headerContentCleanups.clear();
@@ -1895,7 +1902,7 @@ function bi(t) {
1895
1902
  t.toolPanels.get(e)?.onClose?.();
1896
1903
  t.isPanelOpen = !1, t.expandedSections.clear(), t.toolPanels.clear(), t.headerContents.clear(), t.toolbarContents.clear(), t.lightDomHeaderContent = [], t.lightDomToolPanelIds.clear(), t.lightDomToolbarContentIds.clear(), t.lightDomContentMoved = !1;
1897
1904
  }
1898
- function mi(t, e) {
1905
+ function vi(t, e) {
1899
1906
  let i = !1;
1900
1907
  const o = {
1901
1908
  get isInitialized() {
@@ -1924,7 +1931,7 @@ function mi(t, e) {
1924
1931
  s && t.expandedSections.add(s.id);
1925
1932
  }
1926
1933
  const n = e.getShadow();
1927
- Fe(n, t), Ue(n, t), wi(n, t, e.getAccordionIcons()), e.emit("tool-panel-open", { sections: o.expandedSections });
1934
+ Fe(n, t), Ve(n, t), bi(n, t, e.getAccordionIcons()), e.emit("tool-panel-open", { sections: o.expandedSections });
1928
1935
  },
1929
1936
  closeToolPanel() {
1930
1937
  if (!t.isPanelOpen) return;
@@ -1935,7 +1942,7 @@ function mi(t, e) {
1935
1942
  r.onClose?.();
1936
1943
  t.isPanelOpen = !1;
1937
1944
  const n = e.getShadow();
1938
- Fe(n, t), Ue(n, t), e.emit("tool-panel-close", {});
1945
+ Fe(n, t), Ve(n, t), e.emit("tool-panel-close", {});
1939
1946
  },
1940
1947
  toggleToolPanel() {
1941
1948
  t.isPanelOpen ? o.closeToolPanel() : o.openToolPanel();
@@ -1960,7 +1967,7 @@ function mi(t, e) {
1960
1967
  const f = s.querySelector(`[data-section="${a}"] .tbw-accordion-content`);
1961
1968
  f && (f.innerHTML = "");
1962
1969
  }
1963
- t.expandedSections.add(n), ue(s, n, !0), vi(s, t, n);
1970
+ t.expandedSections.add(n), ue(s, n, !0), Ci(s, t, n);
1964
1971
  }
1965
1972
  e.emit("tool-panel-section-toggle", { id: n, expanded: !l });
1966
1973
  },
@@ -2018,7 +2025,7 @@ function ue(t, e, i) {
2018
2025
  const o = t.querySelector(`[data-section="${e}"]`);
2019
2026
  o && o.classList.toggle("expanded", i);
2020
2027
  }
2021
- function vi(t, e, i) {
2028
+ function Ci(t, e, i) {
2022
2029
  const o = e.toolPanels.get(i);
2023
2030
  if (!o?.render) return;
2024
2031
  const n = t.querySelector(`[data-section="${i}"] .tbw-accordion-content`);
@@ -2026,8 +2033,8 @@ function vi(t, e, i) {
2026
2033
  const r = o.render(n);
2027
2034
  r && e.panelCleanups.set(i, r);
2028
2035
  }
2029
- function Ci(t, e, i, o) {
2030
- const n = lt(e), r = [], s = [
2036
+ function yi(t, e, i, o) {
2037
+ const n = at(e), r = [], s = [
2031
2038
  "tbw-grid-header",
2032
2039
  "tbw-grid-tool-buttons",
2033
2040
  "tbw-grid-tool-panel",
@@ -2063,7 +2070,7 @@ function Ci(t, e, i, o) {
2063
2070
  icon: q(_.icon),
2064
2071
  isExpanded: i.expandedSections.has(_.id)
2065
2072
  }))
2066
- }, w = ci(u), C = di(d), m = Ne({
2073
+ }, w = di(u), C = hi(d), m = Ne({
2067
2074
  hasShell: !0,
2068
2075
  shellHeader: w,
2069
2076
  shellBody: C
@@ -2075,28 +2082,28 @@ function Ci(t, e, i, o) {
2075
2082
  }
2076
2083
  return n;
2077
2084
  }
2078
- const Ve = "tbw-grid-styles";
2085
+ const Ue = "tbw-grid-styles";
2079
2086
  let te = "";
2080
2087
  const we = /* @__PURE__ */ new Map();
2081
- function yi() {
2082
- let t = document.getElementById(Ve);
2083
- return t || (t = document.createElement("style"), t.id = Ve, t.setAttribute("data-tbw-grid", "true"), document.head.appendChild(t)), t;
2088
+ function _i() {
2089
+ let t = document.getElementById(Ue);
2090
+ return t || (t = document.createElement("style"), t.id = Ue, t.setAttribute("data-tbw-grid", "true"), document.head.appendChild(t)), t;
2084
2091
  }
2085
2092
  function be() {
2086
- const t = yi(), e = Array.from(we.values()).join(`
2093
+ const t = _i(), e = Array.from(we.values()).join(`
2087
2094
  `);
2088
2095
  t.textContent = `${te}
2089
2096
 
2090
2097
  /* Plugin Styles */
2091
2098
  ${e}`;
2092
2099
  }
2093
- function _i(t) {
2100
+ function Ei(t) {
2094
2101
  let e = !1;
2095
2102
  for (const { name: i, styles: o } of t)
2096
2103
  we.has(i) || (we.set(i, o), e = !0);
2097
2104
  return e && be(), e;
2098
2105
  }
2099
- function Ei() {
2106
+ function Si() {
2100
2107
  try {
2101
2108
  for (const t of Array.from(document.styleSheets))
2102
2109
  try {
@@ -2112,7 +2119,7 @@ function Ei() {
2112
2119
  }
2113
2120
  return null;
2114
2121
  }
2115
- async function Si(t) {
2122
+ async function Ri(t) {
2116
2123
  if (te)
2117
2124
  return;
2118
2125
  if (typeof t == "string" && t.length > 0) {
@@ -2120,14 +2127,14 @@ async function Si(t) {
2120
2127
  return;
2121
2128
  }
2122
2129
  await new Promise((i) => setTimeout(i, 50));
2123
- const e = Ei();
2130
+ const e = Si();
2124
2131
  e ? (te = e, be()) : (typeof process > "u" || process.env?.NODE_ENV !== "test") && console.warn(
2125
2132
  "[tbw-grid] Could not find grid.css in document.styleSheets. Grid styling will not work.",
2126
2133
  "Available stylesheets:",
2127
2134
  Array.from(document.styleSheets).map((i) => i.href || "(inline)")
2128
2135
  );
2129
2136
  }
2130
- function Ri() {
2137
+ function Ai() {
2131
2138
  return {
2132
2139
  startY: null,
2133
2140
  startX: null,
@@ -2141,19 +2148,19 @@ function Ri() {
2141
2148
  momentumRaf: 0
2142
2149
  };
2143
2150
  }
2144
- function Ai(t) {
2151
+ function Ti(t) {
2145
2152
  t.startY = null, t.startX = null, t.scrollTop = null, t.scrollLeft = null, t.lastY = null, t.lastX = null, t.lastTime = null;
2146
2153
  }
2147
- function at(t) {
2154
+ function ct(t) {
2148
2155
  t.momentumRaf && (cancelAnimationFrame(t.momentumRaf), t.momentumRaf = 0);
2149
2156
  }
2150
- function Ti(t, e, i) {
2157
+ function xi(t, e, i) {
2151
2158
  if (t.touches.length !== 1) return;
2152
- at(e);
2159
+ ct(e);
2153
2160
  const o = t.touches[0];
2154
2161
  e.startY = o.clientY, e.startX = o.clientX, e.lastY = o.clientY, e.lastX = o.clientX, e.lastTime = performance.now(), e.scrollTop = i.fauxScrollbar.scrollTop, e.scrollLeft = i.scrollArea?.scrollLeft ?? 0, e.velocityY = 0, e.velocityX = 0;
2155
2162
  }
2156
- function xi(t, e, i) {
2163
+ function Hi(t, e, i) {
2157
2164
  if (t.touches.length !== 1 || e.startY === null || e.startX === null || e.scrollTop === null || e.scrollLeft === null)
2158
2165
  return !1;
2159
2166
  const o = t.touches[0], n = o.clientY, r = o.clientX, s = performance.now(), l = e.startY - n, a = e.startX - r;
@@ -2170,10 +2177,10 @@ function xi(t, e, i) {
2170
2177
  }
2171
2178
  return g && (i.fauxScrollbar.scrollTop = e.scrollTop + l), u && i.scrollArea && (i.scrollArea.scrollLeft = e.scrollLeft + a), g || u;
2172
2179
  }
2173
- function Hi(t, e) {
2174
- (Math.abs(t.velocityY) > 0.1 || Math.abs(t.velocityX) > 0.1) && Li(t, e), Ai(t);
2175
- }
2176
2180
  function Li(t, e) {
2181
+ (Math.abs(t.velocityY) > 0.1 || Math.abs(t.velocityX) > 0.1) && Pi(t, e), Ti(t);
2182
+ }
2183
+ function Pi(t, e) {
2177
2184
  const n = () => {
2178
2185
  t.velocityY *= 0.95, t.velocityX *= 0.95;
2179
2186
  const r = t.velocityY * 16, s = t.velocityX * 16;
@@ -2181,19 +2188,19 @@ function Li(t, e) {
2181
2188
  };
2182
2189
  t.momentumRaf = requestAnimationFrame(n);
2183
2190
  }
2184
- function Pi(t, e, i, o) {
2185
- t.addEventListener("touchstart", (n) => Ti(n, e, i), {
2191
+ function zi(t, e, i, o) {
2192
+ t.addEventListener("touchstart", (n) => xi(n, e, i), {
2186
2193
  passive: !0,
2187
2194
  signal: o
2188
2195
  }), t.addEventListener(
2189
2196
  "touchmove",
2190
2197
  (n) => {
2191
- xi(n, e, i) && n.preventDefault();
2198
+ Hi(n, e, i) && n.preventDefault();
2192
2199
  },
2193
2200
  { passive: !1, signal: o }
2194
- ), t.addEventListener("touchend", () => Hi(e, i), { passive: !0, signal: o });
2201
+ ), t.addEventListener("touchend", () => Li(e, i), { passive: !0, signal: o });
2195
2202
  }
2196
- const zi = [
2203
+ const Oi = [
2197
2204
  {
2198
2205
  property: "editable",
2199
2206
  pluginName: "editing",
@@ -2242,20 +2249,20 @@ const zi = [
2242
2249
  isUsed: (t) => Array.isArray(t) && t.length > 0
2243
2250
  }
2244
2251
  ];
2245
- function Oi(t) {
2252
+ function Mi(t) {
2246
2253
  return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
2247
2254
  }
2248
2255
  function me(t) {
2249
- return `import { ${D(t)}Plugin } from '@toolbox-web/grid/plugins/${Oi(t)}';`;
2256
+ return `import { ${O(t)}Plugin } from '@toolbox-web/grid/plugins/${Mi(t)}';`;
2250
2257
  }
2251
- function D(t) {
2258
+ function O(t) {
2252
2259
  return t.charAt(0).toUpperCase() + t.slice(1);
2253
2260
  }
2254
2261
  function Be(t, e) {
2255
2262
  return t.some((i) => i.name === e);
2256
2263
  }
2257
- function Mi(t, e) {
2258
- const i = zi, o = Di, n = /* @__PURE__ */ new Map();
2264
+ function ki(t, e) {
2265
+ const i = Oi, o = Di, n = /* @__PURE__ */ new Map();
2259
2266
  function r(l, a, c, h, f = !1) {
2260
2267
  n.has(l) || n.set(l, { description: a, importHint: c, fields: [], isConfigProperty: f });
2261
2268
  const p = n.get(l);
@@ -2283,7 +2290,7 @@ function Mi(t, e) {
2283
2290
  `Config uses ${c}, but the required plugin is not loaded.
2284
2291
  → Add the plugin to your gridConfig.plugins array:
2285
2292
  ${h}
2286
- plugins: [new ${D(a)}Plugin(), ...]`
2293
+ plugins: [new ${O(a)}Plugin(), ...]`
2287
2294
  );
2288
2295
  else {
2289
2296
  const g = f.slice(0, 3).join(", ") + (f.length > 3 ? `, ... (${f.length} total)` : "");
@@ -2291,7 +2298,7 @@ function Mi(t, e) {
2291
2298
  `Column(s) [${g}] use ${c}, but the required plugin is not loaded.
2292
2299
  → Add the plugin to your gridConfig.plugins array:
2293
2300
  ${h}
2294
- plugins: [new ${D(a)}Plugin(), ...]`
2301
+ plugins: [new ${O(a)}Plugin(), ...]`
2295
2302
  );
2296
2303
  }
2297
2304
  throw new Error(
@@ -2305,7 +2312,7 @@ This validation helps catch misconfigurations early. The properties listed above
2305
2312
  );
2306
2313
  }
2307
2314
  }
2308
- function ki(t) {
2315
+ function Ii(t) {
2309
2316
  const e = [], i = [];
2310
2317
  for (const o of t) {
2311
2318
  const r = o.constructor.manifest;
@@ -2313,7 +2320,7 @@ function ki(t) {
2313
2320
  for (const s of r.configRules) {
2314
2321
  const l = o.config;
2315
2322
  if (s.check(l)) {
2316
- const c = `${`[tbw-grid:${D(o.name)}Plugin]`} Configuration warning: ${s.message}`;
2323
+ const c = `${`[tbw-grid:${O(o.name)}Plugin]`} Configuration warning: ${s.message}`;
2317
2324
  s.severity === "error" ? e.push(c) : i.push(c);
2318
2325
  }
2319
2326
  }
@@ -2328,29 +2335,29 @@ ${e.join(`
2328
2335
 
2329
2336
  `)}`);
2330
2337
  }
2331
- function Ii(t, e) {
2338
+ function Ni(t, e) {
2332
2339
  const i = t.name, n = t.constructor.dependencies ?? [];
2333
2340
  for (const r of n) {
2334
2341
  const s = r.name, l = r.required ?? !0, a = r.reason;
2335
2342
  if (!e.some((h) => h.name === s)) {
2336
- const h = a ?? `${D(i)}Plugin requires ${D(s)}Plugin`, f = me(s);
2343
+ const h = a ?? `${O(i)}Plugin requires ${O(s)}Plugin`, f = me(s);
2337
2344
  if (l)
2338
2345
  throw new Error(
2339
2346
  `[tbw-grid] Plugin dependency error:
2340
2347
 
2341
2348
  ${h}.
2342
2349
 
2343
- → Add the plugin to your gridConfig.plugins array BEFORE ${D(i)}Plugin:
2350
+ → Add the plugin to your gridConfig.plugins array BEFORE ${O(i)}Plugin:
2344
2351
  ${f}
2345
- plugins: [new ${D(s)}Plugin(), new ${D(i)}Plugin()]`
2352
+ plugins: [new ${O(s)}Plugin(), new ${O(i)}Plugin()]`
2346
2353
  );
2347
2354
  console.info(
2348
- `[tbw-grid] ${D(i)}Plugin: Optional "${s}" plugin not found. Some features may be unavailable.`
2355
+ `[tbw-grid] ${O(i)}Plugin: Optional "${s}" plugin not found. Some features may be unavailable.`
2349
2356
  );
2350
2357
  }
2351
2358
  }
2352
2359
  }
2353
- function Ni(t) {
2360
+ function qi(t) {
2354
2361
  if (!ye()) return;
2355
2362
  const e = new Set(t.map((o) => o.name)), i = /* @__PURE__ */ new Set();
2356
2363
  for (const o of t) {
@@ -2363,7 +2370,7 @@ function Ni(t) {
2363
2370
  i.add(l), console.warn(
2364
2371
  `[tbw-grid] Plugin incompatibility warning:
2365
2372
 
2366
- ${D(o.name)}Plugin and ${D(s.name)}Plugin are both loaded, but they are currently incompatible.
2373
+ ${O(o.name)}Plugin and ${O(s.name)}Plugin are both loaded, but they are currently incompatible.
2367
2374
 
2368
2375
  → ${s.reason}
2369
2376
 
@@ -2373,27 +2380,27 @@ ${D(o.name)}Plugin and ${D(s.name)}Plugin are both loaded, but they are currentl
2373
2380
  }
2374
2381
  }
2375
2382
  }
2376
- function ct(t, e) {
2383
+ function dt(t, e) {
2377
2384
  return !t || typeof t != "object" ? t : "__rowCacheKey" in t ? t.__rowCacheKey : "rowId" in t && t.rowId != null ? `id:${t.rowId}` : e ? `id:${e(t)}` : t;
2378
2385
  }
2379
- function qi(t, e, i) {
2380
- const o = ct(e, i);
2386
+ function $i(t, e, i) {
2387
+ const o = dt(e, i);
2381
2388
  if (typeof o == "string")
2382
2389
  return t.byKey.get(o);
2383
2390
  if (o && typeof o == "object")
2384
2391
  return t.byRef.get(o);
2385
2392
  }
2386
- function $i(t, e, i, o) {
2387
- const n = ct(e, o);
2393
+ function Wi(t, e, i, o) {
2394
+ const n = dt(e, o);
2388
2395
  typeof n == "string" ? t.byKey.set(n, i) : n && typeof n == "object" && t.byRef.set(n, i);
2389
2396
  }
2390
- function Wi(t, e, i, o, n) {
2397
+ function Fi(t, e, i, o, n) {
2391
2398
  const r = new Array(t.length);
2392
2399
  let s = 0;
2393
2400
  for (let l = 0; l < t.length; l++) {
2394
2401
  const a = t[l];
2395
2402
  let c = n?.(a, l), h = c !== void 0;
2396
- c === void 0 && (c = qi(e, a, o.rowId), h = c !== void 0), c === void 0 && (c = i, h = !1), r[l] = { offset: s, height: c, measured: h }, s += c;
2403
+ c === void 0 && (c = $i(e, a, o.rowId), h = c !== void 0), c === void 0 && (c = i, h = !1), r[l] = { offset: s, height: c, measured: h }, s += c;
2397
2404
  }
2398
2405
  return r;
2399
2406
  }
@@ -2406,7 +2413,7 @@ function ve(t, e, i) {
2406
2413
  t[r].offset += n;
2407
2414
  }
2408
2415
  }
2409
- function Fi(t) {
2416
+ function Vi(t) {
2410
2417
  if (t.length === 0) return 0;
2411
2418
  const e = t[t.length - 1];
2412
2419
  return e.offset + e.height;
@@ -2432,13 +2439,13 @@ function Ui(t, e) {
2432
2439
  n.measured && (i += n.height, o++);
2433
2440
  return o > 0 ? i / o : e;
2434
2441
  }
2435
- function Vi(t) {
2442
+ function Bi(t) {
2436
2443
  let e = 0;
2437
2444
  for (const i of t)
2438
2445
  i.measured && e++;
2439
2446
  return e;
2440
2447
  }
2441
- function Bi(t, e) {
2448
+ function Gi(t, e) {
2442
2449
  const { positionCache: i, heightCache: o, rows: n, start: r, end: s, getPluginHeight: l, getRowId: a } = t;
2443
2450
  let c = !1;
2444
2451
  e.forEach((p) => {
@@ -2455,13 +2462,13 @@ function Bi(t, e) {
2455
2462
  const C = p.offsetHeight;
2456
2463
  if (C > 0) {
2457
2464
  const m = i[u];
2458
- (!m.measured || Math.abs(m.height - C) > 1) && (ve(i, u, C), $i(o, d, C, a), c = !0);
2465
+ (!m.measured || Math.abs(m.height - C) > 1) && (ve(i, u, C), Wi(o, d, C, a), c = !0);
2459
2466
  }
2460
2467
  });
2461
- const h = c ? Vi(i) : 0, f = c ? Ui(i, t.defaultHeight) : 0;
2468
+ const h = c ? Bi(i) : 0, f = c ? Ui(i, t.defaultHeight) : 0;
2462
2469
  return { hasChanges: c, measuredCount: h, averageHeight: f };
2463
2470
  }
2464
- function Gi(t, e, i, o) {
2471
+ function Xi(t, e, i, o) {
2465
2472
  let n = 0, r = 0;
2466
2473
  for (let s = 0; s < t.length; s++) {
2467
2474
  const l = t[s];
@@ -2472,7 +2479,7 @@ function Gi(t, e, i, o) {
2472
2479
  averageHeight: n > 0 ? r / n : i
2473
2480
  };
2474
2481
  }
2475
- function ro(t) {
2482
+ function so(t) {
2476
2483
  const { totalRows: e, viewportHeight: i, scrollTop: o, rowHeight: n, overscan: r } = t, s = Math.ceil(i / n);
2477
2484
  let l = Math.floor(o / n) - r;
2478
2485
  l < 0 && (l = 0);
@@ -2484,7 +2491,7 @@ function ro(t) {
2484
2491
  totalHeight: e * n
2485
2492
  };
2486
2493
  }
2487
- function so(t, e) {
2494
+ function lo(t, e) {
2488
2495
  return t <= e;
2489
2496
  }
2490
2497
  class ne {
@@ -2507,7 +2514,7 @@ class ne {
2507
2514
  this.attach(i);
2508
2515
  }
2509
2516
  attach(e) {
2510
- if (Ii(e, this.plugins), this.pluginMap.set(e.constructor, e), this.plugins.push(e), e.cellRenderers)
2517
+ if (Ni(e, this.plugins), this.pluginMap.set(e.constructor, e), this.plugins.push(e), e.cellRenderers)
2511
2518
  for (const [i, o] of Object.entries(e.cellRenderers))
2512
2519
  this.cellRenderers.set(i, o);
2513
2520
  if (e.headerRenderers)
@@ -2772,7 +2779,7 @@ class ne {
2772
2779
  return e.sort((i, o) => (i.content.order ?? 0) - (o.content.order ?? 0));
2773
2780
  }
2774
2781
  }
2775
- const Xi = "@layer tbw-base{tbw-grid{.tbw-expanding{animation:tbw-expand var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}.tbw-collapsing{animation:tbw-collapse var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}&[data-animation-mode=off]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}tbw-grid .data-grid-row[data-animating=change]{animation:tbw-row-change var(--tbw-row-change-duration) ease-out}tbw-grid .data-grid-row[data-animating=insert]{animation:tbw-row-insert var(--tbw-row-insert-duration) ease-out;will-change:max-height,opacity}tbw-grid .data-grid-row[data-animating=remove]{animation:tbw-row-remove var(--tbw-row-remove-duration) ease-out forwards;will-change:max-height,opacity,transform;pointer-events:none}}@keyframes tbw-expand{0%{opacity:0;max-height:0;transform:translateY(-8px)}to{opacity:1;max-height:500px;transform:translateY(0)}}@keyframes tbw-collapse{0%{opacity:1;max-height:500px;transform:translateY(0)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-row-change{0%{background-color:transparent}20%{background-color:var(--tbw-row-change-color)}to{background-color:transparent}}@keyframes tbw-row-insert{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:var(--tbw-row-height, 28px);overflow:hidden}}@keyframes tbw-row-remove{0%{opacity:1;transform:translateY(0);max-height:var(--tbw-row-height, 28px)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-spin{to{transform:rotate(360deg)}}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}", Yi = '@layer tbw-base{tbw-grid{color-scheme:inherit;position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);font-feature-settings:"tnum","lnum";background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{box-sizing:border-box}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}&:has(.selected){user-select:none}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}.faux-vscroll-spacer{width:1px}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}}}', ji = '@layer tbw-base{tbw-grid{.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}.header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0;.resize-handle{right:0;width:calc(var(--tbw-resize-handle-width) / 2)}}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.sortable{cursor:pointer;user-select:none}.resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}}}', Ki = '@layer tbw-base{.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none}.tbw-row-loading-overlay{position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out;pointer-events:none;display:flex;align-items:center}.tbw-row-loading-spinner{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);margin-left:var(--tbw-spacing-md);width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:27}}}', Qi = "@layer tbw-base{@media(forced-colors:active){tbw-grid{--tbw-color-border: CanvasText;--tbw-color-border-strong: CanvasText;--tbw-color-border-cell: CanvasText;--tbw-color-border-header: CanvasText;--tbw-color-fg: CanvasText;--tbw-color-bg: Canvas;--tbw-color-panel-bg: Canvas;--tbw-color-header-bg: Canvas;--tbw-color-header-fg: CanvasText;--tbw-color-accent: Highlight;--tbw-color-accent-fg: HighlightText;--tbw-color-selection: Highlight;--tbw-color-row-hover: Highlight;--tbw-focus-outline: 2px solid Highlight;--tbw-range-border-color: Highlight;.cell:focus,.cell.active-cell{outline:2px solid Highlight!important;outline-offset:-2px}.data-grid-row[aria-selected=true]{background:Highlight!important;color:HighlightText!important}}}@media(prefers-reduced-motion:reduce){tbw-grid[data-animation-mode=reduced-motion]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}}", Zi = "@layer tbw-base{tbw-grid{.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);align-content:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}}}", Ji = "@layer tbw-base{tbw-grid{.tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}.tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}}}", eo = "@layer tbw-base{tbw-grid{.tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow);&[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:start;cursor:pointer;user-select:none;&:hover{background:var(--tbw-color-row-hover)}}.tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}.tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}.tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tbw-accordion-content{display:none}}}", to = "@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #666666);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-v: var(--tbw-spacing-xs);--tbw-cell-padding-h: var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-cell-padding-v) var(--tbw-cell-padding-h);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--tbw-border-width: 1px;--tbw-border-style: solid;--tbw-border-input: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-strong);--tbw-border-header: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-header);--tbw-row-divider: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline-width: 2px;--tbw-focus-outline: var(--tbw-focus-outline-width) var(--tbw-border-style) var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm)}}", io = `/**
2782
+ const Yi = "@layer tbw-base{tbw-grid{.tbw-expanding{animation:tbw-expand var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}.tbw-collapsing{animation:tbw-collapse var(--tbw-animation-duration) var(--tbw-animation-easing) forwards;overflow:hidden}&[data-animation-mode=off]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}tbw-grid .data-grid-row[data-animating=change]{animation:tbw-row-change var(--tbw-row-change-duration) ease-out}tbw-grid .data-grid-row[data-animating=insert]{animation:tbw-row-insert var(--tbw-row-insert-duration) ease-out;will-change:max-height,opacity}tbw-grid .data-grid-row[data-animating=remove]{animation:tbw-row-remove var(--tbw-row-remove-duration) ease-out forwards;will-change:max-height,opacity,transform;pointer-events:none}}@keyframes tbw-expand{0%{opacity:0;max-height:0;transform:translateY(-8px)}to{opacity:1;max-height:500px;transform:translateY(0)}}@keyframes tbw-collapse{0%{opacity:1;max-height:500px;transform:translateY(0)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-row-change{0%{background-color:transparent}20%{background-color:var(--tbw-row-change-color)}to{background-color:transparent}}@keyframes tbw-row-insert{0%{opacity:0;max-height:0;overflow:hidden}to{opacity:1;max-height:var(--tbw-row-height, 28px);overflow:hidden}}@keyframes tbw-row-remove{0%{opacity:1;transform:translateY(0);max-height:var(--tbw-row-height, 28px)}to{opacity:0;max-height:0;transform:translateY(-8px)}}@keyframes tbw-spin{to{transform:rotate(360deg)}}@keyframes tbw-fade-in{0%{opacity:0}to{opacity:1}}", ji = '@layer tbw-base{tbw-grid{color-scheme:inherit;position:relative;display:block;width:100%;height:100%;min-height:0;contain:content;font-family:var(--tbw-font-family);font-size:var(--tbw-font-size);font-feature-settings:"tnum","lnum";background:var(--tbw-color-bg);color:var(--tbw-color-fg);border:1px solid var(--tbw-color-border);border-radius:var(--tbw-border-radius);overflow:clip;outline:none;&,*{box-sizing:border-box}.tbw-grid-root{position:relative;display:flex;flex-direction:column;height:100%;&.has-shell{display:flex;flex-direction:column;height:100%}&:has(.selected){user-select:none}}.rows-body-wrapper{flex:1;min-height:0;display:flex;flex-direction:row;width:100%;min-width:fit-content}.rows-body{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:visible}.rows-container{display:flex;flex-direction:row;flex:1;min-height:0;overflow:visible}.rows-viewport{flex:1;min-width:0;position:relative;display:block;overflow:clip;.rows{position:absolute;top:0;left:0;min-width:100%;will-change:transform;z-index:var(--tbw-z-layer-rows, 1)}}.faux-vscroll{position:sticky;inset-inline-end:0;flex-shrink:0;width:auto;overflow-y:auto;overflow-x:hidden;z-index:var(--tbw-z-layer-header, 30)}.faux-vscroll-spacer{width:1px}&[data-has-focus]{.cell-focus,.row-focus{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}}.sticky-left,.sticky-right{position:sticky;z-index:25}.sticky-left{box-shadow:1px 0 0 var(--tbw-color-border)}.sticky-right{box-shadow:-1px 0 0 var(--tbw-color-border)}}}', Ki = '@layer tbw-base{tbw-grid{.header{display:block;flex-shrink:0;z-index:var(--tbw-z-layer-header, 30);background:var(--tbw-color-header-bg);overflow:visible}.header-group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-color-header-bg);z-index:var(--tbw-z-layer-header, 30)}.header-group-cell{display:flex;align-items:center;justify-content:flex-start;padding:var(--tbw-cell-padding-header, 2px 8px);color:var(--tbw-color-header-group-fg, var(--tbw-color-header-fg));font-weight:var(--tbw-font-weight-header-group, var(--tbw-font-weight-header));justify-content:var(--tbw-align-header-group, var(--tbw-align-header, flex-start));&:not(:last-child){border-right:2px solid var(--tbw-color-border)}}.header-row{display:grid;grid-template-columns:var(--tbw-column-template);color:var(--tbw-color-header-fg);font-size:var(--tbw-font-size-header);min-height:var(--tbw-header-height);border-bottom:var(--tbw-border-header);z-index:var(--tbw-z-layer-header, 30);text-transform:var(--tbw-header-text-transform);letter-spacing:var(--tbw-header-letter-spacing);>.cell{display:flex;align-items:center;gap:4px;padding:var(--tbw-cell-padding-header, 2px 8px);background-color:var(--tbw-color-header-bg);font-weight:var(--tbw-font-weight-header);border-right:1px solid var(--tbw-color-border-cell);overflow:visible;min-width:0;>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:inherit}>span[part~=sort-indicator]{flex-shrink:0;opacity:.6;color:var(--tbw-sort-indicator-color);display:var(--tbw-sort-indicator-display, inline-flex);visibility:var(--tbw-sort-indicator-visibility, visible);transition:opacity .15s,visibility 0s,display 0s allow-discrete;transition-behavior:allow-discrete}&:hover>span[part~=sort-indicator]{display:inline-flex;visibility:visible}&[aria-sort=ascending]>span[part~=sort-indicator],&[aria-sort=descending]>span[part~=sort-indicator]{display:inline-flex;visibility:visible;opacity:1;color:var(--tbw-sort-indicator-active-color)}&:last-child{border-right:0;.resize-handle{right:0;width:calc(var(--tbw-resize-handle-width) / 2)}}&.grouped.group-end:not(:last-child){border-right:2px solid var(--tbw-color-border)}&.resizable{position:relative}&.sticky-left,&.sticky-right{background:var(--tbw-color-header-bg);z-index:35}}}.sortable{cursor:pointer;user-select:none}.resize-handle{position:absolute;top:0;right:calc(var(--tbw-resize-handle-width) / -2);width:var(--tbw-resize-handle-width);height:100%;cursor:e-resize;user-select:none;touch-action:none;z-index:20;background:var(--tbw-resize-handle-color);transition:background .12s ease;border-radius:var(--tbw-resize-handle-border-radius);&:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);width:var(--tbw-resize-indicator-width, 2px);height:0;background:var(--tbw-resize-indicator-color, var(--tbw-color-accent));opacity:0;pointer-events:none;transition:opacity .12s ease,height 0s .12s;z-index:1000}&:hover{background:var(--tbw-resize-handle-color-hover);&:after{height:100vh;opacity:var(--tbw-resize-indicator-opacity, .6);transition:opacity .12s ease,height 0s}}}}}', Qi = '@layer tbw-base{.tbw-loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:1000;pointer-events:all;animation:tbw-fade-in .15s ease-out}.tbw-spinner{--tbw-spinner-size: 48px;--tbw-spinner-border-width: 3px;--tbw-spinner-color: var(--tbw-color-accent);--tbw-spinner-track-color: var(--tbw-color-border);width:var(--tbw-spinner-size);height:var(--tbw-spinner-size);border:var(--tbw-spinner-border-width) solid var(--tbw-spinner-track-color);border-top-color:var(--tbw-spinner-color);border-radius:50%;animation:tbw-spin .8s linear infinite}.tbw-spinner--large{--tbw-spinner-size: min(48px, calc(100% - 16px) )}.tbw-spinner--small{--tbw-spinner-size: calc(var(--tbw-row-height, 28px) * .6);--tbw-spinner-border-width: 2px}.data-grid-row.tbw-row-loading{position:relative;pointer-events:none}.tbw-row-loading-overlay{position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out;pointer-events:none;display:flex;align-items:center}.tbw-row-loading-spinner{--_spinner-size: calc(var(--tbw-row-height, 28px) * .6);margin-left:var(--tbw-spacing-md);width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite}.cell.tbw-cell-loading{position:relative;pointer-events:none;&:before{content:"";position:absolute;inset:0;background:light-dark(rgba(255,255,255,.7),rgba(0,0,0,.5));z-index:26;animation:tbw-fade-in .15s ease-out}&:after{--_spinner-size: calc(var(--tbw-row-height, 28px) * .5);content:"";position:absolute;left:var(--tbw-spacing-sm);top:0;bottom:0;margin:auto 0;width:var(--_spinner-size);height:var(--_spinner-size);border:2px solid var(--tbw-spinner-track-color, var(--tbw-color-border));border-top-color:var(--tbw-spinner-color, var(--tbw-color-accent));border-radius:50%;animation:tbw-spin .8s linear infinite;z-index:27}}}', Zi = "@layer tbw-base{@media(forced-colors:active){tbw-grid{--tbw-color-border: CanvasText;--tbw-color-border-strong: CanvasText;--tbw-color-border-cell: CanvasText;--tbw-color-border-header: CanvasText;--tbw-color-fg: CanvasText;--tbw-color-bg: Canvas;--tbw-color-panel-bg: Canvas;--tbw-color-header-bg: Canvas;--tbw-color-header-fg: CanvasText;--tbw-color-accent: Highlight;--tbw-color-accent-fg: HighlightText;--tbw-color-selection: Highlight;--tbw-color-row-hover: Highlight;--tbw-focus-outline: 2px solid Highlight;--tbw-range-border-color: Highlight;.cell:focus,.cell.active-cell{outline:2px solid Highlight!important;outline-offset:-2px}.data-grid-row[aria-selected=true]{background:Highlight!important;color:HighlightText!important}}}@media(prefers-reduced-motion:reduce){tbw-grid[data-animation-mode=reduced-motion]{--tbw-animation-enabled: 0;--tbw-animation-duration: 0ms;.data-grid-row[data-animating]{animation:none}}}}", Ji = "@layer tbw-base{tbw-grid{.data-grid-row{display:grid;grid-template-columns:var(--tbw-column-template);contain:layout style;&:nth-child(2n){background:var(--tbw-color-row-alt)}&:hover{background:var(--tbw-color-row-hover)}>.cell{display:block;padding:var(--tbw-cell-padding, 2px 8px);border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height);align-content:center;border-right:1px solid var(--tbw-color-border-cell);overflow:hidden;min-width:0;white-space:var(--tbw-cell-white-space, nowrap);text-overflow:ellipsis;>*{overflow:hidden;text-overflow:ellipsis;white-space:inherit;min-width:0}&:last-child{border-right:0}&[data-type=boolean]{text-align:center;input[type=checkbox]{margin:0;width:var(--tbw-checkbox-size);height:var(--tbw-checkbox-size);vertical-align:middle}}&.selected:focus-visible,&:focus-visible:not(.cell-focus){outline:none}&.sticky-left,&.sticky-right{background:var(--tbw-color-panel-bg)}}}.selecting .data-grid-row>.cell{user-select:none}}}", eo = "@layer tbw-base{tbw-grid{.tbw-shell-header{display:flex;align-items:center;gap:8px;min-height:var(--tbw-shell-header-height);padding:0 8px;background:var(--tbw-shell-header-bg);border-bottom:1px solid var(--tbw-shell-header-border);flex-shrink:0}.tbw-shell-title{font-size:var(--tbw-shell-title-font-size);font-weight:var(--tbw-shell-title-font-weight);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-shell-content{flex:1;display:flex;align-items:center;gap:12px;min-width:0;overflow:hidden}.tbw-shell-toolbar{display:flex;align-items:center;gap:var(--tbw-toolbar-button-gap);flex-shrink:0}.tbw-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toolbar-button-size);height:var(--tbw-toolbar-button-size);padding:0;border:1px solid transparent;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg);cursor:pointer;font-size:16px;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease),border-color var(--tbw-transition-duration) var(--tbw-transition-ease);&:hover{background:var(--tbw-color-row-hover)}&:focus-visible{outline:var(--tbw-focus-outline);outline-offset:var(--tbw-focus-outline-offset)}&.active{background:var(--tbw-focus-background);border-color:var(--tbw-color-accent)}&:disabled{opacity:.5;cursor:not-allowed}}.tbw-toolbar-separator{width:1px;height:20px;background:var(--tbw-color-border);margin:0 4px}.tbw-shell-body{position:relative;display:flex;flex:1;min-height:0;overflow:visible}.tbw-grid-content{flex:1;min-width:0;min-height:0;display:flex;flex-direction:row;overflow:hidden}.tbw-scroll-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow-x:auto;overflow-y:hidden;overflow-anchor:none}}}", to = "@layer tbw-base{tbw-grid{.tbw-tool-panel{position:absolute;top:0;bottom:0;right:0;width:0;overflow:hidden;background:var(--tbw-tool-panel-bg);border-left:1px solid var(--tbw-tool-panel-border);transition:width var(--tbw-tool-panel-transition);display:flex;flex-direction:column;z-index:30;box-shadow:-2px 0 8px var(--tbw-color-shadow);&[data-position=left]{right:auto;left:0;border-left:none;border-right:1px solid var(--tbw-tool-panel-border);box-shadow:2px 0 8px var(--tbw-color-shadow)}&.open{width:var(--tbw-tool-panel-width)}}.tbw-tool-panel-resize{position:absolute;top:0;bottom:0;width:6px;cursor:col-resize;background:transparent;z-index:10;transition:background var(--tbw-transition-duration) var(--tbw-transition-ease);&[data-handle-position=left]{left:0}&[data-handle-position=right]{right:0}&:hover,&.resizing{background:var(--tbw-color-accent)}}.tbw-tool-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:var(--tbw-tool-panel-header-height);padding:0 12px;border-bottom:1px solid var(--tbw-tool-panel-border);flex-shrink:0}.tbw-tool-panel-title{font-weight:600;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tbw-tool-panel-close{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tbw-border-radius);background:transparent;color:var(--tbw-color-fg-muted);cursor:pointer;font-size:14px;&:hover{background:var(--tbw-color-row-hover);color:var(--tbw-color-fg)}}.tbw-tool-panel-content{flex:1;overflow:auto}.tbw-accordion{display:flex;flex-direction:column;gap:0}.tbw-accordion-section{border-bottom:1px solid var(--tbw-tool-panel-border);&:last-child{border-bottom:none}&.single .tbw-accordion-header{cursor:default;&:hover{background:transparent}}&.expanded{.tbw-accordion-chevron{transform:rotate(90deg)}.tbw-accordion-content{display:block}}}.tbw-accordion-header{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:none;background:transparent;color:var(--tbw-color-fg);font-size:13px;font-weight:600;text-align:start;cursor:pointer;user-select:none;&:hover{background:var(--tbw-color-row-hover)}}.tbw-accordion-chevron{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:10px;color:var(--tbw-color-fg-muted);transition:transform .15s ease;flex-shrink:0}.tbw-accordion-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;font-size:14px;flex-shrink:0}.tbw-accordion-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tbw-accordion-content{display:none}}}", io = "@layer tbw-base{tbw-grid{--tbw-base-icon-size: 1em;--tbw-base-radius: .25em;--tbw-font-size: 1em;--tbw-font-size-sm: .9285em;--tbw-font-size-xs: .7857em;--tbw-font-size-2xs: .7142em;--tbw-spacing-xs: .25em;--tbw-spacing-sm: .375em;--tbw-spacing-md: .5em;--tbw-spacing-lg: .75em;--tbw-spacing-xl: 1em;--tbw-icon-size: var(--tbw-base-icon-size);--tbw-icon-size-sm: .875em;--tbw-checkbox-size: var(--tbw-base-icon-size);--tbw-toggle-size: 1.25em;--tbw-border-radius: var(--tbw-base-radius);--tbw-color-bg: transparent;--tbw-color-panel-bg: light-dark(#eeeeee, #222222);--tbw-color-fg: light-dark(#222222, #eeeeee);--tbw-color-fg-muted: light-dark(#555555, #aaaaaa);--tbw-color-accent: light-dark(#3b82f6, #3b82f6);--tbw-color-accent-fg: light-dark(#ffffff, #000000);--tbw-color-success: light-dark(hsl(122, 39%, 40%), hsl(122, 39%, 49%));--tbw-color-warning: light-dark(hsl(38, 92%, 50%), hsl(38, 92%, 50%));--tbw-color-error: light-dark(hsl(0, 65%, 51%), hsl(0, 65%, 55%));--tbw-color-danger: var(--tbw-color-error);--tbw-color-selection: light-dark(#fff7d6, #333333);--tbw-color-row-alt: var(--tbw-color-bg);--tbw-color-row-hover: light-dark(#f0f6ff, #1c1c1c);--tbw-color-header-bg: color-mix(in hsl, var(--tbw-color-panel-bg) 85%, var(--tbw-color-fg));--tbw-color-header-fg: color-mix(in hsl, var(--tbw-color-fg) 75%, var(--tbw-color-panel-bg));--tbw-color-border: light-dark(#d0d0d4, #454545);--tbw-color-border-strong: light-dark(#777777, #666666);--tbw-color-border-cell: var(--tbw-color-border);--tbw-color-border-header: var(--tbw-color-border);--tbw-color-shadow: light-dark(rgba(0, 0, 0, .1), rgba(0, 0, 0, .3));--tbw-font-family: inherit;--tbw-font-size-header: var(--tbw-font-size);--tbw-font-weight-header: bold;--tbw-cell-padding-header: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-cell-padding-v: var(--tbw-spacing-xs);--tbw-cell-padding-h: var(--tbw-spacing-md);--tbw-cell-padding: var(--tbw-cell-padding-v) var(--tbw-cell-padding-h);--tbw-cell-padding-input: var(--tbw-spacing-xs) var(--tbw-spacing-sm);--tbw-row-height: 1.75em;--tbw-header-height: 1.875em;--tbw-cell-white-space: nowrap;--tbw-border-width: 1px;--tbw-border-style: solid;--tbw-border-input: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-strong);--tbw-border-header: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-header);--tbw-row-divider: var(--tbw-border-width) var(--tbw-border-style) var(--tbw-color-border-cell);--tbw-row-hover-outline: 0;--tbw-color-active-row-bg: var(--tbw-color-selection);--tbw-active-row-outline: 0;--tbw-focus-outline-width: 2px;--tbw-focus-outline: var(--tbw-focus-outline-width) var(--tbw-border-style) var(--tbw-color-accent);--tbw-focus-outline-offset: -2px;--tbw-focus-background: rgba(from var(--tbw-color-accent) r g b / 12%);--tbw-range-border-color: var(--tbw-color-accent);--tbw-range-selection-bg: rgba(from var(--tbw-range-border-color) r g b / 12%);--tbw-resize-handle-width: var(--tbw-spacing-sm);--tbw-resize-handle-color: transparent;--tbw-resize-handle-color-hover: var(--tbw-color-accent);--tbw-resize-handle-border-radius: 0;--tbw-resize-indicator-width: 2px;--tbw-resize-indicator-color: var(--tbw-color-accent);--tbw-resize-indicator-opacity: .6;--tbw-transition-duration: .12s;--tbw-transition-ease: ease;--tbw-animation-duration: .2s;--tbw-animation-easing: ease-out;--tbw-animation-enabled: 1;--tbw-row-change-duration: .5s;--tbw-row-insert-duration: .3s;--tbw-row-remove-duration: .2s;--tbw-row-change-color: rgba(from var(--tbw-color-accent) r g b / 25%);--tbw-sort-indicator-color: var(--tbw-color-fg-muted);--tbw-sort-indicator-active-color: var(--tbw-color-accent);--tbw-sort-indicator-display: inline-flex;--tbw-sort-indicator-visibility: visible;--tbw-header-text-transform: none;--tbw-header-letter-spacing: normal;--tbw-color-header-separator: var(--tbw-color-border-cell);--tbw-density-scale: 1;--tbw-shell-header-height: 2.75em;--tbw-shell-header-bg: var(--tbw-color-panel-bg);--tbw-shell-header-border: var(--tbw-color-border);--tbw-shell-title-font-size: var(--tbw-font-size);--tbw-shell-title-font-weight: 600;--tbw-tool-panel-width: 17.5em;--tbw-tool-panel-bg: var(--tbw-color-panel-bg);--tbw-tool-panel-border: var(--tbw-color-border);--tbw-tool-panel-header-height: 2.5em;--tbw-tool-panel-transition: var(--tbw-animation-duration) var(--tbw-animation-easing);--tbw-toolbar-button-size: 2em;--tbw-toolbar-button-gap: var(--tbw-spacing-xs);--tbw-panel-padding: var(--tbw-spacing-lg);--tbw-panel-gap: var(--tbw-spacing-md);--tbw-menu-item-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-menu-item-gap: var(--tbw-spacing-md);--tbw-menu-min-width: 10rem;--tbw-button-padding: var(--tbw-spacing-sm) var(--tbw-spacing-lg);--tbw-button-padding-sm: var(--tbw-spacing-xs) var(--tbw-spacing-md);--tbw-input-height: var(--tbw-row-height);--tbw-input-padding: 0 var(--tbw-spacing-md);--tbw-detail-padding: var(--tbw-spacing-xl);--tbw-detail-max-height: 31.25rem;--tbw-indicator-size: var(--tbw-spacing-sm)}}", oo = `/**
2776
2783
  * tbw-grid Light DOM Styles
2777
2784
  *
2778
2785
  * This stylesheet uses CSS nesting to scope all styles to the tbw-grid element.
@@ -2791,20 +2798,20 @@ const Xi = "@layer tbw-base{tbw-grid{.tbw-expanding{animation:tbw-expand var(--t
2791
2798
  /* Declare layer order - earlier layers have lower priority */
2792
2799
  @layer tbw-base, tbw-plugins, tbw-theme;
2793
2800
 
2794
- ${to}
2795
- ${Yi}
2801
+ ${io}
2796
2802
  ${ji}
2797
- ${Zi}
2803
+ ${Ki}
2798
2804
  ${Ji}
2799
2805
  ${eo}
2800
- ${Ki}
2801
- ${Xi}
2806
+ ${to}
2802
2807
  ${Qi}
2808
+ ${Yi}
2809
+ ${Zi}
2803
2810
  `;
2804
2811
  class I extends HTMLElement {
2805
2812
  static tagName = "tbw-grid";
2806
- static version = "1.19.3";
2807
- static #l = 0;
2813
+ static version = "1.21.0";
2814
+ static #a = 0;
2808
2815
  static adapters = [];
2809
2816
  static registerAdapter(e) {
2810
2817
  this.adapters.push(e);
@@ -2824,7 +2831,7 @@ class I extends HTMLElement {
2824
2831
  #u = !1;
2825
2832
  #d;
2826
2833
  #h;
2827
- #a = [];
2834
+ #l = [];
2828
2835
  get #o() {
2829
2836
  return this.#i?.effective ?? {};
2830
2837
  }
@@ -2842,8 +2849,8 @@ class I extends HTMLElement {
2842
2849
  #g = !1;
2843
2850
  #x = !1;
2844
2851
  #m = 0;
2845
- #z;
2846
- #I = Ri();
2852
+ #O;
2853
+ #N = Ai();
2847
2854
  #b;
2848
2855
  #y;
2849
2856
  #p;
@@ -2858,19 +2865,19 @@ class I extends HTMLElement {
2858
2865
  };
2859
2866
  #t;
2860
2867
  #_;
2861
- #N = !1;
2868
+ #q = !1;
2862
2869
  #D;
2863
2870
  #G;
2864
- #O;
2871
+ #M;
2865
2872
  #i;
2866
- #e = hi();
2873
+ #e = ui();
2867
2874
  #c;
2868
- #q;
2869
2875
  #$;
2870
- #M = !1;
2876
+ #W;
2877
+ #k = !1;
2871
2878
  #E = /* @__PURE__ */ new Set();
2872
2879
  #H = /* @__PURE__ */ new Map();
2873
- #W;
2880
+ #F;
2874
2881
  #S = /* @__PURE__ */ new Map();
2875
2882
  _rows = [];
2876
2883
  #X = [];
@@ -2935,39 +2942,39 @@ class I extends HTMLElement {
2935
2942
  return this._rows;
2936
2943
  }
2937
2944
  set rows(e) {
2938
- const i = this.#a;
2939
- this.#a = e, i !== e && this.#V("rows");
2945
+ const i = this.#l;
2946
+ this.#l = e, i !== e && this.#B("rows");
2940
2947
  }
2941
2948
  get sourceRows() {
2942
- return this.#a;
2949
+ return this.#l;
2943
2950
  }
2944
2951
  get columns() {
2945
2952
  return [...this._columns];
2946
2953
  }
2947
2954
  set columns(e) {
2948
2955
  const i = this.#i?.getColumns();
2949
- this.#i?.setColumns(e), i !== e && this.#V("columns");
2956
+ this.#i?.setColumns(e), i !== e && this.#B("columns");
2950
2957
  }
2951
2958
  get gridConfig() {
2952
2959
  return this.#o;
2953
2960
  }
2954
2961
  set gridConfig(e) {
2955
2962
  const i = this.#i?.getGridConfig();
2956
- this.#i?.setGridConfig(e), i !== e && (this.#i.clearLightDomCache(), this.#V("gridConfig"));
2963
+ this.#i?.setGridConfig(e), i !== e && (this.#i.clearLightDomCache(), this.#B("gridConfig"));
2957
2964
  }
2958
2965
  get fitMode() {
2959
2966
  return this.#o.fitMode ?? "stretch";
2960
2967
  }
2961
2968
  set fitMode(e) {
2962
2969
  const i = this.#i?.getFitMode();
2963
- this.#i?.setFitMode(e), i !== e && this.#V("fitMode");
2970
+ this.#i?.setFitMode(e), i !== e && this.#B("fitMode");
2964
2971
  }
2965
2972
  get loading() {
2966
- return this.#M;
2973
+ return this.#k;
2967
2974
  }
2968
2975
  set loading(e) {
2969
- const i = this.#M;
2970
- this.#M = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), i !== e && this.#ue();
2976
+ const i = this.#k;
2977
+ this.#k = e, e ? this.setAttribute("loading", "") : this.removeAttribute("loading"), i !== e && this.#ue();
2971
2978
  }
2972
2979
  setRowLoading(e, i) {
2973
2980
  const o = this.#E.has(e);
@@ -3001,28 +3008,28 @@ class I extends HTMLElement {
3001
3008
  return this.#b || (this.#b = new AbortController()), this.#b.signal;
3002
3009
  }
3003
3010
  constructor() {
3004
- super(), this.#me(), this.#d = new Promise((e) => this.#h = e), this.#s = new ti({
3011
+ super(), this.#me(), this.#d = new Promise((e) => this.#h = e), this.#s = new ii({
3005
3012
  mergeConfig: () => {
3006
- this.#i.parseLightDomColumns(this), this.#i.merge(), this.#ie(), Mi(this.#o, this.#t?.getPlugins() ?? []), ki(this.#t?.getPlugins() ?? []), Ni(this.#t?.getPlugins() ?? []), this.#De(), this.#X = [...this._columns];
3013
+ this.#i.parseLightDomColumns(this), this.#i.merge(), this.#ie(), ki(this.#o, this.#t?.getPlugins() ?? []), Ii(this.#t?.getPlugins() ?? []), qi(this.#t?.getPlugins() ?? []), this.#Oe(), this.#X = [...this._columns];
3007
3014
  },
3008
3015
  processColumns: () => this.#He(),
3009
3016
  processRows: () => this.#Pe(),
3010
3017
  renderHeader: () => oe(this),
3011
- updateTemplate: () => V(this),
3018
+ updateTemplate: () => B(this),
3012
3019
  renderVirtualWindow: () => this.refreshVirtualWindow(!0, !0),
3013
3020
  afterRender: () => {
3014
3021
  this.#t?.afterRender(), this._virtualization.enabled && this._virtualization.totalHeightEl && queueMicrotask(() => {
3015
3022
  if (!this._virtualization.totalHeightEl) return;
3016
3023
  const i = this.#T(this._rows.length);
3017
3024
  this._virtualization.totalHeightEl.style.height = `${i}px`;
3018
- }), this.#o.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, Te(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, W(this)), this._virtualization.enabled && !this.#U && this.#ye(), this.#x && (this.#x = !1, requestAnimationFrame(() => {
3025
+ }), this.#o.fitMode === "fixed" && !this.__didInitialAutoSize && (this.__didInitialAutoSize = !0, Te(this)), this._restoreFocusAfterRender && (this._restoreFocusAfterRender = !1, F(this)), this._virtualization.enabled && !this.#U && this.#ye(), this.#x && (this.#x = !1, requestAnimationFrame(() => {
3019
3026
  requestAnimationFrame(() => {
3020
3027
  this.#Ce();
3021
3028
  });
3022
- })), this.#M && this.#ue();
3029
+ })), this.#k && this.#ue();
3023
3030
  },
3024
3031
  isConnected: () => this.isConnected && this.#f
3025
- }), this.#s.setInitialReadyResolver(() => this.#h?.()), this.#c = mi(this.#e, {
3032
+ }), this.#s.setInitialReadyResolver(() => this.#h?.()), this.#c = vi(this.#e, {
3026
3033
  getShadow: () => this.#n,
3027
3034
  getShellConfig: () => this.#o?.shell,
3028
3035
  getAccordionIcons: () => ({
@@ -3031,8 +3038,8 @@ class I extends HTMLElement {
3031
3038
  }),
3032
3039
  emit: (e, i) => this.#L(e, i),
3033
3040
  refreshShellHeader: () => this.refreshShellHeader()
3034
- }), this.#i = new Lt({
3035
- getRows: () => this.#a,
3041
+ }), this.#i = new Pt({
3042
+ getRows: () => this.#l,
3036
3043
  getSortState: () => this._sortState,
3037
3044
  setSortState: (e) => {
3038
3045
  this._sortState = e;
@@ -3044,9 +3051,9 @@ class I extends HTMLElement {
3044
3051
  clearRowPool: () => {
3045
3052
  this._rowPool.length = 0, this._bodyEl && (this._bodyEl.innerHTML = ""), this.__rowRenderEpoch++;
3046
3053
  },
3047
- setup: () => this.#P(),
3054
+ setup: () => this.#z(),
3048
3055
  renderHeader: () => oe(this),
3049
- updateTemplate: () => V(this),
3056
+ updateTemplate: () => B(this),
3050
3057
  refreshVirtualWindow: () => this.#s.requestPhase(A.VIRTUALIZATION, "configManager"),
3051
3058
  getVirtualization: () => this._virtualization,
3052
3059
  setRowHeight: (e) => {
@@ -3062,7 +3069,7 @@ class I extends HTMLElement {
3062
3069
  });
3063
3070
  }
3064
3071
  async #me() {
3065
- await Si(io);
3072
+ await Ri(oo);
3066
3073
  }
3067
3074
  getPlugin(e) {
3068
3075
  return this.#t?.getPlugin(e);
@@ -3080,7 +3087,7 @@ class I extends HTMLElement {
3080
3087
  this._restoreFocusAfterRender = !0, this.#s.requestPhase(A.ROWS, "plugin:requestRenderWithFocus");
3081
3088
  }
3082
3089
  updateTemplate() {
3083
- V(this);
3090
+ B(this);
3084
3091
  }
3085
3092
  requestAfterRender() {
3086
3093
  this.#s.requestPhase(A.STYLE, "plugin:requestAfterRender");
@@ -3090,9 +3097,9 @@ class I extends HTMLElement {
3090
3097
  const e = this.#o?.plugins, i = Array.isArray(e) ? e : [];
3091
3098
  this.#t.attachAll(i);
3092
3099
  }
3093
- #F() {
3100
+ #V() {
3094
3101
  const e = this.#t?.getPluginStyles() ?? [];
3095
- _i(e);
3102
+ Ei(e);
3096
3103
  }
3097
3104
  #ie() {
3098
3105
  const e = this.#o?.plugins, i = Array.isArray(e) ? e : [];
@@ -3114,7 +3121,7 @@ class I extends HTMLElement {
3114
3121
  const r = this.#e.headerContentCleanups.get(n);
3115
3122
  r && (r(), this.#e.headerContentCleanups.delete(n)), this.#e.headerContents.delete(n);
3116
3123
  }
3117
- this.#te(), this.#F(), this.#_ = i, this.#se(), this.#oe();
3124
+ this.#te(), this.#V(), this.#_ = i, this.#se(), this.#oe();
3118
3125
  const o = this.#g;
3119
3126
  if (this.#g = this.#t?.getAll().some((n) => n.onScroll) ?? !1, !o && this.#g) {
3120
3127
  const r = this.#n.querySelector(".tbw-grid-content") ?? this.#n.querySelector(".tbw-grid-root");
@@ -3150,9 +3157,9 @@ class I extends HTMLElement {
3150
3157
  };
3151
3158
  }
3152
3159
  connectedCallback() {
3153
- this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", I.version), this.id || (this.id = `tbw-grid-${++I.#l}`), this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#b && (this.#b.abort(), this.#N = !1), this.#b = new AbortController(), this.#R && (ke(this.#R), this.#R = void 0), this.#k(), this.#i.parseLightDomColumns(this), this.#i.merge(), this.#te();
3160
+ this.hasAttribute("tabindex") || (this.tabIndex = 0), this.hasAttribute("version") || this.setAttribute("version", I.version), this.id || (this.id = `tbw-grid-${++I.#a}`), this._rows = Array.isArray(this.#l) ? [...this.#l] : [], this.#b && (this.#b.abort(), this.#q = !1), this.#b = new AbortController(), this.#R && (ke(this.#R), this.#R = void 0), this.#I(), this.#i.parseLightDomColumns(this), this.#i.merge(), this.#te();
3154
3161
  const e = this.#o?.plugins;
3155
- this.#_ = Array.isArray(e) ? e : [], this.#oe(), this.#u || (this.#J(), this.#F(), this.#u = !0), this.#re(), this.#R = Xt(
3162
+ this.#_ = Array.isArray(e) ? e : [], this.#oe(), this.#u || (this.#J(), this.#V(), this.#u = !0), this.#re(), this.#R = Yt(
3156
3163
  () => {
3157
3164
  this.#Ie();
3158
3165
  },
@@ -3160,7 +3167,7 @@ class I extends HTMLElement {
3160
3167
  );
3161
3168
  }
3162
3169
  disconnectedCallback() {
3163
- this.#R && (ke(this.#R), this.#R = void 0), this.#m && (clearTimeout(this.#m), this.#m = 0), this.#ve(), bi(this.#e), this.#c.setInitialized(!1), this.#q?.(), this.#q = void 0, this.#$?.(), this.#$ = void 0, at(this.#I), this.#b && (this.#b.abort(), this.#b = void 0), this.#D?.abort(), this.#D = void 0, this.#N = !1, this._resizeController && this._resizeController.dispose(), this.#y && (this.#y.disconnect(), this.#y = void 0), this.#p && (this.#p.disconnect(), this.#p = void 0, this.#U = !1), Y(this), this.#A.clear(), this.#_ = void 0;
3170
+ this.#R && (ke(this.#R), this.#R = void 0), this.#m && (clearTimeout(this.#m), this.#m = 0), this.#ve(), mi(this.#e), this.#c.setInitialized(!1), this.#$?.(), this.#$ = void 0, this.#W?.(), this.#W = void 0, ct(this.#N), this.#b && (this.#b.abort(), this.#b = void 0), this.#D?.abort(), this.#D = void 0, this.#q = !1, this._resizeController && this._resizeController.dispose(), this.#y && (this.#y.disconnect(), this.#y = void 0), this.#p && (this.#p.disconnect(), this.#p = void 0, this.#U = !1), W(this), this.#A.clear(), this.#_ = void 0;
3164
3171
  for (const e of this._rowPool)
3165
3172
  e.remove();
3166
3173
  this._rowPool.length = 0, this.__rowsBodyEl = null, this.#f = !1;
@@ -3188,11 +3195,11 @@ class I extends HTMLElement {
3188
3195
  const n = this.#o?.shell?.toolPanel?.defaultOpen;
3189
3196
  n && this.#e.toolPanels.has(n) && (this.openToolPanel(), this.#e.expandedSections.add(n));
3190
3197
  }
3191
- if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = Ie(this), this.#P(), this.#Y(i), this.#N)
3198
+ if (this.setAttribute("data-upgraded", ""), this.#f = !0, this._resizeController = Ie(this), this.#z(), this.#Y(i), this.#q)
3192
3199
  return;
3193
- this.#N = !0;
3200
+ this.#q = !0;
3194
3201
  const o = this.disconnectSignal;
3195
- Ft(this, this, this.#n, o), this.#se(), queueMicrotask(() => this.#_e()), this.#s.requestPhase(A.FULL, "afterConnect");
3202
+ Vt(this, this, this.#n, o), this.#se(), queueMicrotask(() => this.#_e()), this.#s.requestPhase(A.FULL, "afterConnect");
3196
3203
  }
3197
3204
  #se() {
3198
3205
  const e = this.#o.rowHeight, i = this.#t.hasRowHeightPlugin();
@@ -3251,7 +3258,7 @@ class I extends HTMLElement {
3251
3258
  n.style.transform = `translateY(${g}px)`;
3252
3259
  }
3253
3260
  this.#r = a, this.#C || (this.#C = requestAnimationFrame(() => {
3254
- this.#C = 0, this.#r !== null && (this.#Oe(this.#r), this.#r = null);
3261
+ this.#C = 0, this.#r !== null && (this.#De(this.#r), this.#r = null);
3255
3262
  }));
3256
3263
  },
3257
3264
  { passive: !0, signal: i }
@@ -3279,14 +3286,14 @@ class I extends HTMLElement {
3279
3286
  }
3280
3287
  },
3281
3288
  { passive: !1, signal: i }
3282
- ), Pi(
3289
+ ), zi(
3283
3290
  s,
3284
- this.#I,
3291
+ this.#N,
3285
3292
  { fauxScrollbar: o, scrollArea: l },
3286
3293
  i
3287
3294
  ));
3288
3295
  }
3289
- this._bodyEl && Wt(this, this._bodyEl, i), this.#y?.disconnect(), this._virtualization.viewportEl && (this.#y = new ResizeObserver(() => {
3296
+ this._bodyEl && Ft(this, this._bodyEl, i), this.#y?.disconnect(), this._virtualization.viewportEl && (this.#y = new ResizeObserver(() => {
3290
3297
  this.#Ne(), this.#s.requestPhase(A.VIRTUALIZATION, "resize-observer");
3291
3298
  }), this.#y.observe(this._virtualization.viewportEl)), this.#n.addEventListener(
3292
3299
  "focusin",
@@ -3328,7 +3335,7 @@ class I extends HTMLElement {
3328
3335
  });
3329
3336
  });
3330
3337
  }
3331
- #V(e) {
3338
+ #B(e) {
3332
3339
  this.#v[e] = !0, !this.#w && (this.#w = !0, queueMicrotask(() => this.#Ee()));
3333
3340
  }
3334
3341
  #Ee() {
@@ -3349,9 +3356,9 @@ class I extends HTMLElement {
3349
3356
  e.columns && this.#Re(), e.rows && this.#ae(), e.fitMode && this.#Ae();
3350
3357
  }
3351
3358
  #ae() {
3352
- this._rows = Array.isArray(this.#a) ? [...this.#a] : [], this.#B(), this.#s.requestPhase(A.ROWS, "applyRowsUpdate");
3359
+ this._rows = Array.isArray(this.#l) ? [...this.#l] : [], this.#P(), this.#s.requestPhase(A.ROWS, "applyRowsUpdate");
3353
3360
  }
3354
- #B() {
3361
+ #P() {
3355
3362
  this.#S.clear();
3356
3363
  const e = this.#o.getRowId;
3357
3364
  this._rows.forEach((i, o) => {
@@ -3375,23 +3382,23 @@ class I extends HTMLElement {
3375
3382
  return o;
3376
3383
  }
3377
3384
  #Re() {
3378
- Y(this), this.#i.merge(), this.#P();
3385
+ W(this), this.#i.merge(), this.#z();
3379
3386
  }
3380
3387
  #Ae() {
3381
3388
  this.#i.merge(), this.#o.fitMode === "fixed" ? (this.__didInitialAutoSize = !1, Te(this)) : (this._columns.forEach((i) => {
3382
3389
  !i.__userResized && i.__autoSized && delete i.width;
3383
- }), V(this));
3390
+ }), B(this));
3384
3391
  }
3385
3392
  #Te() {
3386
3393
  qe(this, this.#e), $e(this, this.#e);
3387
3394
  const e = !!this.#n.querySelector(".has-shell"), i = !!this.#n.querySelector(".tbw-tool-panel"), o = this.#n.querySelectorAll(".tbw-accordion-section").length;
3388
3395
  this.#i.parseLightDomColumns(this), this.#i.merge(), this.#ie(), We(this, this.#e, this.#ne()), this.#i.markSourcesChanged(), this.#i.merge();
3389
- const n = lt(this.#o?.shell), r = (this.#o?.shell?.toolPanels?.length ?? 0) > 0, s = this.#o?.shell?.toolPanels?.length ?? 0;
3396
+ const n = at(this.#o?.shell), r = (this.#o?.shell?.toolPanels?.length ?? 0) > 0, s = this.#o?.shell?.toolPanels?.length ?? 0;
3390
3397
  if (e !== n || !i && r || i && s !== o) {
3391
- he(this.#e), this.#J(), this.#F(), this.#re(), this.#B();
3398
+ he(this.#e), this.#J(), this.#V(), this.#re(), this.#P();
3392
3399
  return;
3393
3400
  }
3394
- e && this.#xe(), this.#B(), this.#s.requestPhase(A.COLUMNS, "applyGridConfigUpdate");
3401
+ e && this.#xe(), this.#P(), this.#s.requestPhase(A.COLUMNS, "applyGridConfigUpdate");
3395
3402
  }
3396
3403
  #xe() {
3397
3404
  const e = this.#n.querySelector(".tbw-shell-header");
@@ -3430,39 +3437,39 @@ class I extends HTMLElement {
3430
3437
  return l.push(...s), l;
3431
3438
  }
3432
3439
  #Pe() {
3433
- Y(this);
3434
- const e = Array.isArray(this.#a) ? [...this.#a] : [], i = this.#t?.processRows(e) ?? e;
3435
- this._rows = i, this.#B(), this._virtualization.variableHeights && this.#Z();
3440
+ W(this);
3441
+ const e = Array.isArray(this.#l) ? [...this.#l] : [], i = Bt(this, e), o = this.#t?.processRows(i) ?? i;
3442
+ this._rows = o, this.#P(), this._virtualization.variableHeights && this.#Z();
3436
3443
  }
3437
3444
  #ze(e) {
3438
3445
  const i = {
3439
- ...gt,
3446
+ ...pt,
3440
3447
  ...e.animation
3441
3448
  }, o = i.mode ?? "reduced-motion";
3442
3449
  let n = 1;
3443
3450
  o === !1 || o === "off" ? n = 0 : (o === !0 || o === "on") && (n = 1), this.style.setProperty("--tbw-animation-duration", `${i.duration}ms`), this.style.setProperty("--tbw-animation-easing", i.easing ?? "ease-out"), this.style.setProperty("--tbw-animation-enabled", String(n)), this.dataset.animationMode = typeof o == "boolean" ? o ? "on" : "off" : o;
3444
3451
  }
3445
3452
  #j(e, i, o = this.__rowRenderEpoch) {
3446
- if (this.#z || (this.#z = (n, r, s) => this.#t?.renderRow(n, r, s) ?? !1), Mt(this, e, i, o, this.#z), this.#E.size > 0)
3453
+ if (this.#O || (this.#O = (n, r, s) => this.#t?.renderRow(n, r, s) ?? !1), kt(this, e, i, o, this.#O), this.#E.size > 0)
3447
3454
  for (const n of this.#E)
3448
3455
  this.#K(n, !0);
3449
3456
  }
3450
- #de = dt();
3457
+ #de = ht();
3451
3458
  #he(e, i) {
3452
- ht(this.#de, this.__rowsBodyEl, this._bodyEl, e, i);
3459
+ ut(this.#de, this.__rowsBodyEl, this._bodyEl, e, i);
3453
3460
  }
3454
- #De() {
3455
- ft(this.#de, this.__rowsBodyEl, this.#o, this.#e);
3461
+ #Oe() {
3462
+ gt(this.#de, this.__rowsBodyEl, this.#o, this.#e);
3456
3463
  }
3457
3464
  #ue() {
3458
3465
  const e = this.querySelector(".tbw-grid-root");
3459
- e && (this.#M ? (this.#W || (this.#W = Kt(this.#o?.loadingRenderer)), Qt(e, this.#W)) : Zt(this.#W));
3466
+ e && (this.#k ? (this.#F || (this.#F = Qt(this.#o?.loadingRenderer)), Zt(e, this.#F)) : Jt(this.#F));
3460
3467
  }
3461
3468
  #K(e, i) {
3462
3469
  const o = this.#S.get(e);
3463
3470
  if (!o) return;
3464
3471
  const n = this.findRenderedRowElement?.(o.index);
3465
- n && Jt(n, i);
3472
+ n && ei(n, i);
3466
3473
  }
3467
3474
  #fe(e, i, o) {
3468
3475
  const n = this.#S.get(e);
@@ -3472,20 +3479,20 @@ class I extends HTMLElement {
3472
3479
  const s = this._visibleColumns.findIndex((a) => a.field === i);
3473
3480
  if (s < 0) return;
3474
3481
  const l = r.children[s];
3475
- l && ei(l, o);
3482
+ l && ti(l, o);
3476
3483
  }
3477
- #P() {
3484
+ #z() {
3478
3485
  if (this.isConnected && !(!this._headerRowEl || !this._bodyEl)) {
3479
- if (this.#i.parseLightDomColumns(this), this.#O) {
3480
- const e = this.#O;
3481
- this.#O = void 0, this.#i.merge();
3486
+ if (this.#i.parseLightDomColumns(this), this.#M) {
3487
+ const e = this.#M;
3488
+ this.#M = void 0, this.#i.merge();
3482
3489
  const i = this.#t?.getAll() ?? [];
3483
3490
  this.#i.applyState(e, i);
3484
3491
  }
3485
3492
  this._bodyEl && (this._bodyEl.style.display = "", this._bodyEl.style.gridTemplateColumns = ""), this.#s.requestPhase(A.FULL, "setup");
3486
3493
  }
3487
3494
  }
3488
- #Oe(e) {
3495
+ #De(e) {
3489
3496
  let i = 0, o = 0, n = 0, r = 0, s = 0;
3490
3497
  if (this.#g) {
3491
3498
  const a = this._virtualization.container, c = this.#G;
@@ -3508,7 +3515,7 @@ class I extends HTMLElement {
3508
3515
  }) || null;
3509
3516
  }
3510
3517
  _dispatchCellClick(e, i, o, n) {
3511
- const r = this._rows[i], s = this._columns[o];
3518
+ const r = this._rows[i], s = this._visibleColumns[o];
3512
3519
  if (!r || !s) return !1;
3513
3520
  const l = s.field, a = r[l], c = new CustomEvent("cell-activate", {
3514
3521
  cancelable: !0,
@@ -3662,13 +3669,51 @@ class I extends HTMLElement {
3662
3669
  o && this.#s.requestPhase(A.ROWS, "updateRows");
3663
3670
  }
3664
3671
  animateRow(e, i) {
3665
- Se(this, e, i);
3672
+ return Se(this, e, i);
3666
3673
  }
3667
3674
  animateRows(e, i) {
3668
- li(this, e, i);
3675
+ return ai(this, e, i);
3669
3676
  }
3670
3677
  animateRowById(e, i) {
3671
- return ai(this, e, i);
3678
+ return ci(this, e, i);
3679
+ }
3680
+ async insertRow(e, i, o = !0) {
3681
+ const n = Math.max(0, Math.min(e, this._rows.length));
3682
+ this.#l = [...this.#l, i];
3683
+ const r = [...this._rows];
3684
+ r.splice(n, 0, i), this._rows = r, this._sortState && (this.__originalOrder = [...this.__originalOrder, i]), W(this), this.#P(), this.__rowRenderEpoch++;
3685
+ for (const s of this._rowPool) s.__epoch = -1;
3686
+ this.refreshVirtualWindow(!0), o && (await new Promise((s) => requestAnimationFrame(() => s())), await this.animateRow(n, "insert"));
3687
+ }
3688
+ async removeRow(e, i = !0) {
3689
+ const o = this._rows[e];
3690
+ if (!o) return;
3691
+ i && await this.animateRow(e, "remove");
3692
+ const n = this._rows.indexOf(o);
3693
+ if (n < 0) return o;
3694
+ const r = [...this._rows];
3695
+ r.splice(n, 1), this._rows = r;
3696
+ const s = this.#l.indexOf(o);
3697
+ if (s >= 0) {
3698
+ const l = [...this.#l];
3699
+ l.splice(s, 1), this.#l = l;
3700
+ }
3701
+ if (this._sortState) {
3702
+ const l = this.__originalOrder.indexOf(o);
3703
+ if (l >= 0) {
3704
+ const a = [...this.__originalOrder];
3705
+ a.splice(l, 1), this.__originalOrder = a;
3706
+ }
3707
+ }
3708
+ W(this), this.#P(), this.__rowRenderEpoch++;
3709
+ for (const l of this._rowPool) l.__epoch = -1;
3710
+ return this.refreshVirtualWindow(!0), i && requestAnimationFrame(() => {
3711
+ this.querySelectorAll('[data-animating="remove"]').forEach((l) => {
3712
+ l.removeAttribute("data-animating");
3713
+ });
3714
+ }), o;
3715
+ }
3716
+ suspendProcessing() {
3672
3717
  }
3673
3718
  setColumnVisible(e, i) {
3674
3719
  const o = this.#i.setColumnVisible(e, i);
@@ -3698,23 +3743,23 @@ class I extends HTMLElement {
3698
3743
  return this.#i.collectState(e);
3699
3744
  }
3700
3745
  set columnState(e) {
3701
- e && (this.#O = e, this.#i.initialColumnState = e, this.#u && this.#Me(e));
3746
+ e && (this.#M = e, this.#i.initialColumnState = e, this.#u && this.#Me(e));
3702
3747
  }
3703
3748
  get columnState() {
3704
3749
  return this.getColumnState();
3705
3750
  }
3706
3751
  #Me(e) {
3707
3752
  const i = this.#t?.getAll() ?? [];
3708
- this.#i.applyState(e, i), this.#P();
3753
+ this.#i.applyState(e, i), this.#z();
3709
3754
  }
3710
3755
  requestStateChange() {
3711
3756
  const e = this.#t?.getAll() ?? [];
3712
3757
  this.#i.requestStateChange(e);
3713
3758
  }
3714
3759
  resetColumnState() {
3715
- this.#O = void 0, this.__originalOrder = [];
3760
+ this.#M = void 0, this.__originalOrder = [];
3716
3761
  const e = this.#t?.getAll() ?? [];
3717
- this.#i.resetState(e), this.#i.merge(), this.#P();
3762
+ this.#i.resetState(e), this.#i.merge(), this.#z();
3718
3763
  }
3719
3764
  get isToolPanelOpen() {
3720
3765
  return this.#c.isPanelOpen;
@@ -3767,7 +3812,7 @@ class I extends HTMLElement {
3767
3812
  #Q = !1;
3768
3813
  refreshShellHeader() {
3769
3814
  this.#Q || (this.#Q = !0, queueMicrotask(() => {
3770
- this.#Q = !1, this.isConnected && (this.#k(), this.#i.markSourcesChanged(), this.#i.merge(), he(this.#e), this.#J(), this.#F(), this.#ke());
3815
+ this.#Q = !1, this.isConnected && (this.#I(), this.#i.markSourcesChanged(), this.#i.merge(), he(this.#e), this.#J(), this.#V(), this.#ke());
3771
3816
  }));
3772
3817
  }
3773
3818
  #ke() {
@@ -3796,14 +3841,14 @@ class I extends HTMLElement {
3796
3841
  );
3797
3842
  document.adoptedStyleSheets = [...i, ...e];
3798
3843
  }
3799
- #k() {
3844
+ #I() {
3800
3845
  qe(this, this.#e), $e(this, this.#e), We(this, this.#e, this.#ne());
3801
3846
  }
3802
3847
  #pe() {
3803
3848
  const e = this.#n.querySelector(".tbw-shell-header");
3804
3849
  if (!e) return;
3805
3850
  he(this.#e);
3806
- const i = ui(
3851
+ const i = fi(
3807
3852
  this.#o.shell,
3808
3853
  this.#e,
3809
3854
  this.#o.icons?.toolPanel
@@ -3815,18 +3860,18 @@ class I extends HTMLElement {
3815
3860
  #Ie() {
3816
3861
  const e = () => {
3817
3862
  const o = this.#e.lightDomTitle, n = this.#e.hasToolButtonsContainer;
3818
- this.#k();
3863
+ this.#I();
3819
3864
  const r = this.#e.lightDomTitle, s = this.#e.hasToolButtonsContainer;
3820
3865
  (r && !o || s && !n) && (this.#i.markSourcesChanged(), this.#i.merge(), this.#pe());
3821
3866
  }, i = () => {
3822
- this.__lightDomColumnsCache = void 0, this.#P();
3867
+ this.__lightDomColumnsCache = void 0, this.#z();
3823
3868
  };
3824
3869
  this.#i.registerLightDomHandler("tbw-grid-header", e), this.#i.registerLightDomHandler("tbw-grid-tool-buttons", e), this.#i.registerLightDomHandler("tbw-grid-tool-panel", e), this.#i.registerLightDomHandler("tbw-grid-column", i), this.#i.registerLightDomHandler("tbw-grid-detail", i), this.#i.observeLightDOM(this);
3825
3870
  }
3826
3871
  refreshColumns() {
3827
- this.__lightDomColumnsCache = void 0, Y(this), this.#i.parseLightDomColumns(this);
3872
+ this.__lightDomColumnsCache = void 0, W(this), this.#i.parseLightDomColumns(this);
3828
3873
  const e = this.#e.lightDomTitle, i = this.#e.hasToolButtonsContainer;
3829
- this.#k();
3874
+ this.#I();
3830
3875
  const o = this.#e.lightDomTitle, n = this.#e.hasToolButtonsContainer;
3831
3876
  (o && !e || n && !i) && (this.#i.markSourcesChanged(), this.#i.merge(), this.#pe()), this.#s.requestPhase(A.COLUMNS, "refreshColumns");
3832
3877
  }
@@ -3846,12 +3891,12 @@ class I extends HTMLElement {
3846
3891
  n = o.cachedFauxHeight, r = o.cachedViewportHeight, s = o.cachedScrollAreaHeight || n;
3847
3892
  const l = s - r, a = Math.max(0, n - s);
3848
3893
  let c, h = 0;
3849
- return o.variableHeights && o.positionCache ? c = Fi(o.positionCache) : (c = e * o.rowHeight, h = this.#t?.getExtraHeight() ?? 0), c + l + h + a;
3894
+ return o.variableHeights && o.positionCache ? c = Vi(o.positionCache) : (c = e * o.rowHeight, h = this.#t?.getExtraHeight() ?? 0), c + l + h + a;
3850
3895
  }
3851
3896
  #Z() {
3852
3897
  if (!this._virtualization.variableHeights) return;
3853
3898
  const e = this._rows, i = this._virtualization.rowHeight || 28, o = this.#o.rowHeight, n = this.#o.getRowId, r = n ? (l) => n(l) : void 0;
3854
- this._virtualization.positionCache = Wi(
3899
+ this._virtualization.positionCache = Fi(
3855
3900
  e,
3856
3901
  this._virtualization.heightCache,
3857
3902
  i,
@@ -3865,7 +3910,7 @@ class I extends HTMLElement {
3865
3910
  }
3866
3911
  }
3867
3912
  );
3868
- const s = Gi(
3913
+ const s = Xi(
3869
3914
  this._virtualization.positionCache,
3870
3915
  e,
3871
3916
  i,
@@ -3886,7 +3931,7 @@ class I extends HTMLElement {
3886
3931
  }
3887
3932
  #we(e, i) {
3888
3933
  if (!this._virtualization.variableHeights || !this._virtualization.positionCache || !this._bodyEl) return;
3889
- const o = this._bodyEl.querySelectorAll(".data-grid-row"), n = this.#o.getRowId, r = Bi(
3934
+ const o = this._bodyEl.querySelectorAll(".data-grid-row"), n = this.#o.getRowId, r = Gi(
3890
3935
  {
3891
3936
  positionCache: this._virtualization.positionCache,
3892
3937
  heightCache: this._virtualization.heightCache,
@@ -3972,9 +4017,9 @@ class I extends HTMLElement {
3972
4017
  })), !0;
3973
4018
  }
3974
4019
  #J() {
3975
- this.#k(), this.#i.markSourcesChanged(), this.#i.merge();
4020
+ this.#I(), this.#i.markSourcesChanged(), this.#i.merge();
3976
4021
  const e = this.#o?.shell;
3977
- Ci(
4022
+ yi(
3978
4023
  this.#n,
3979
4024
  e,
3980
4025
  { isPanelOpen: this.#e.isPanelOpen, expandedSections: this.#e.expandedSections },
@@ -3982,12 +4027,12 @@ class I extends HTMLElement {
3982
4027
  ) && (this.#be(), this.#c.setInitialized(!0));
3983
4028
  }
3984
4029
  #be() {
3985
- fi(this.#n, this.#o?.shell, this.#e, {
4030
+ gi(this.#n, this.#o?.shell, this.#e, {
3986
4031
  onPanelToggle: () => this.toggleToolPanel(),
3987
4032
  onSectionToggle: (e) => this.toggleToolPanelSection(e)
3988
- }), this.#q?.(), this.#q = pi(this.#n, this.#o?.shell, (e) => {
4033
+ }), this.#$?.(), this.#$ = wi(this.#n, this.#o?.shell, (e) => {
3989
4034
  this.style.setProperty("--tbw-tool-panel-width", `${e}px`);
3990
- }), this.#$?.(), this.#$ = gi(
4035
+ }), this.#W?.(), this.#W = pi(
3991
4036
  this,
3992
4037
  this.#o?.shell,
3993
4038
  this.#e,
@@ -3997,14 +4042,14 @@ class I extends HTMLElement {
3997
4042
  }
3998
4043
  customElements.get(I.tagName) || customElements.define(I.tagName, I);
3999
4044
  globalThis.DataGridElement = I;
4000
- const lo = {
4045
+ const ao = {
4001
4046
  CAN_MOVE_COLUMN: "canMoveColumn",
4002
4047
  GET_CONTEXT_MENU_ITEMS: "getContextMenuItems"
4003
4048
  };
4004
- class ao {
4049
+ class co {
4005
4050
  static dependencies;
4006
4051
  static manifest;
4007
- version = "1.19.3";
4052
+ version = "1.21.0";
4008
4053
  styles;
4009
4054
  cellRenderers;
4010
4055
  headerRenderers;
@@ -4012,7 +4057,7 @@ class ao {
4012
4057
  grid;
4013
4058
  config;
4014
4059
  userConfig;
4015
- #l;
4060
+ #a;
4016
4061
  get defaultConfig() {
4017
4062
  return {};
4018
4063
  }
@@ -4020,10 +4065,10 @@ class ao {
4020
4065
  this.userConfig = e;
4021
4066
  }
4022
4067
  attach(e) {
4023
- this.#l?.abort(), this.#l = new AbortController(), this.grid = e, this.config = { ...this.defaultConfig, ...this.userConfig };
4068
+ this.#a?.abort(), this.#a = new AbortController(), this.grid = e, this.config = { ...this.defaultConfig, ...this.userConfig };
4024
4069
  }
4025
4070
  detach() {
4026
- this.#l?.abort(), this.#l = void 0;
4071
+ this.#a?.abort(), this.#a = void 0;
4027
4072
  }
4028
4073
  getPlugin(e) {
4029
4074
  return this.grid?.getPlugin(e);
@@ -4072,7 +4117,7 @@ class ao {
4072
4117
  return this.grid;
4073
4118
  }
4074
4119
  get disconnectSignal() {
4075
- return this.#l?.signal ?? this.grid?.disconnectSignal;
4120
+ return this.#a?.signal ?? this.grid?.disconnectSignal;
4076
4121
  }
4077
4122
  get gridIcons() {
4078
4123
  const e = this.grid?.gridConfig?.icons ?? {};
@@ -4143,7 +4188,7 @@ const H = {
4143
4188
  GROUP_KEY: "data-group-key",
4144
4189
  TREE_LEVEL: "data-tree-level",
4145
4190
  STICKY: "data-sticky"
4146
- }, co = {
4191
+ }, ho = {
4147
4192
  ROOT: `.${H.ROOT}`,
4148
4193
  HEADER: `.${H.HEADER}`,
4149
4194
  HEADER_ROW: `.${H.HEADER_ROW}`,
@@ -4158,7 +4203,7 @@ const H = {
4158
4203
  CELL_AT: (t, e) => `.${H.DATA_ROW}[${ee.ROW_INDEX}="${t}"] .${H.DATA_CELL}[${ee.COL_INDEX}="${e}"]`,
4159
4204
  SELECTED_ROWS: `.${H.DATA_ROW}.${H.SELECTED}`,
4160
4205
  EDITING_CELL: `.${H.DATA_CELL}.${H.EDITING}`
4161
- }, ho = {
4206
+ }, uo = {
4162
4207
  COLOR_BG: "--tbw-color-bg",
4163
4208
  COLOR_FG: "--tbw-color-fg",
4164
4209
  COLOR_FG_MUTED: "--tbw-color-fg-muted",
@@ -4177,14 +4222,14 @@ const H = {
4177
4222
  BORDER_RADIUS: "--tbw-border-radius",
4178
4223
  FOCUS_OUTLINE: "--tbw-focus-outline"
4179
4224
  };
4180
- function uo(t) {
4225
+ function fo(t) {
4181
4226
  const e = document.createElement("tbw-grid");
4182
4227
  return t && (e.gridConfig = t), e;
4183
4228
  }
4184
- function fo(t, e = document) {
4229
+ function go(t, e = document) {
4185
4230
  return e.querySelector(t);
4186
4231
  }
4187
- const go = {
4232
+ const po = {
4188
4233
  CELL_CHANGE: "cell-change",
4189
4234
  CELL_COMMIT: "cell-commit",
4190
4235
  ROW_COMMIT: "row-commit",
@@ -4199,7 +4244,7 @@ const go = {
4199
4244
  CELL_ACTIVATE: "cell-activate",
4200
4245
  GROUP_TOGGLE: "group-toggle",
4201
4246
  COLUMN_STATE_CHANGE: "column-state-change"
4202
- }, po = {
4247
+ }, wo = {
4203
4248
  SELECTION_CHANGE: "selection-change",
4204
4249
  TREE_EXPAND: "tree-expand",
4205
4250
  FILTER_CHANGE: "filter-change",
@@ -4228,7 +4273,7 @@ const go = {
4228
4273
  max: (t, e) => t.length ? Math.max(...t.map((i) => Number(i[e]) || -1 / 0)) : 0,
4229
4274
  first: (t, e) => t[0]?.[e],
4230
4275
  last: (t, e) => t[t.length - 1]?.[e]
4231
- }, U = /* @__PURE__ */ new Map(), O = {
4276
+ }, U = /* @__PURE__ */ new Map(), D = {
4232
4277
  register(t, e) {
4233
4278
  U.set(t, e);
4234
4279
  },
@@ -4258,50 +4303,50 @@ const go = {
4258
4303
  first: (t) => t[0] ?? 0,
4259
4304
  last: (t) => t[t.length - 1] ?? 0
4260
4305
  };
4261
- function oo(t) {
4306
+ function no(t) {
4262
4307
  return Xe[t] ?? Xe.sum;
4263
4308
  }
4264
- function wo(t, e) {
4265
- return oo(t)(e);
4309
+ function bo(t, e) {
4310
+ return no(t)(e);
4266
4311
  }
4267
- const bo = O.register.bind(O), mo = O.unregister.bind(O), vo = O.get.bind(O), Co = O.run.bind(O), yo = O.list.bind(O);
4312
+ const mo = D.register.bind(D), vo = D.unregister.bind(D), Co = D.get.bind(D), yo = D.run.bind(D), _o = D.list.bind(D);
4268
4313
  export {
4269
- ao as BaseGridPlugin,
4270
- gt as DEFAULT_ANIMATION_CONFIG,
4314
+ co as BaseGridPlugin,
4315
+ pt as DEFAULT_ANIMATION_CONFIG,
4271
4316
  M as DEFAULT_GRID_ICONS,
4272
- go as DGEvents,
4317
+ po as DGEvents,
4273
4318
  I as DataGridElement,
4274
4319
  et as F,
4275
- G as FitModeEnum,
4276
- ho as GridCSSVars,
4320
+ X as FitModeEnum,
4321
+ uo as GridCSSVars,
4277
4322
  H as GridClasses,
4278
4323
  ee as GridDataAttrs,
4279
4324
  I as GridElement,
4280
- co as GridSelectors,
4281
- lo as PLUGIN_QUERIES,
4282
- po as PluginEvents,
4325
+ ho as GridSelectors,
4326
+ ao as PLUGIN_QUERIES,
4327
+ wo as PluginEvents,
4283
4328
  ne as PluginManager,
4284
4329
  A as RenderPhase,
4285
4330
  Ce as a,
4286
- O as aggregatorRegistry,
4331
+ D as aggregatorRegistry,
4287
4332
  k as b,
4288
- Vt as builtInSort,
4289
- ro as c,
4290
- uo as createGrid,
4333
+ ot as builtInSort,
4334
+ so as c,
4335
+ fo as createGrid,
4291
4336
  Qe as d,
4292
4337
  Ut as defaultComparator,
4293
- W as e,
4338
+ F as e,
4294
4339
  _e as f,
4295
- zt as g,
4296
- vo as getAggregator,
4297
- oo as getValueAggregator,
4298
- yo as listAggregators,
4299
- fo as queryGrid,
4300
- no as r,
4301
- bo as registerAggregator,
4302
- Co as runAggregator,
4303
- wo as runValueAggregator,
4304
- so as s,
4305
- mo as unregisterAggregator
4340
+ Ot as g,
4341
+ Co as getAggregator,
4342
+ no as getValueAggregator,
4343
+ _o as listAggregators,
4344
+ go as queryGrid,
4345
+ ro as r,
4346
+ mo as registerAggregator,
4347
+ yo as runAggregator,
4348
+ bo as runValueAggregator,
4349
+ lo as s,
4350
+ vo as unregisterAggregator
4306
4351
  };
4307
4352
  //# sourceMappingURL=index.js.map