@ninebone/table 0.0.715 β†’ 0.0.717

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.
@@ -2,16 +2,16 @@ var ns = Object.defineProperty;
2
2
  var rs = (q) => {
3
3
  throw TypeError(q);
4
4
  };
5
- var as = (q, s, e) => s in q ? ns(q, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[s] = e;
6
- var h = (q, s) => ns(q, "name", { value: s, configurable: !0 });
7
- var A = (q, s, e) => as(q, typeof s != "symbol" ? s + "" : s, e), fe = (q, s, e) => s.has(q) || rs("Cannot " + e);
8
- var t = (q, s, e) => (fe(q, s, "read from private field"), e ? e.call(q) : s.get(q)), d = (q, s, e) => s.has(q) ? rs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(q) : s.set(q, e), p = (q, s, e, n) => (fe(q, s, "write to private field"), n ? n.call(q, e) : s.set(q, e), e), dt = (q, s, e) => (fe(q, s, "access private method"), e);
9
- var os = (q, s, e, n) => ({
5
+ var as = (q, n, e) => n in q ? ns(q, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[n] = e;
6
+ var h = (q, n) => ns(q, "name", { value: n, configurable: !0 });
7
+ var A = (q, n, e) => as(q, typeof n != "symbol" ? n + "" : n, e), fe = (q, n, e) => n.has(q) || rs("Cannot " + e);
8
+ var t = (q, n, e) => (fe(q, n, "read from private field"), e ? e.call(q) : n.get(q)), d = (q, n, e) => n.has(q) ? rs("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(q) : n.set(q, e), p = (q, n, e, s) => (fe(q, n, "write to private field"), s ? s.call(q, e) : n.set(q, e), e), dt = (q, n, e) => (fe(q, n, "access private method"), e);
9
+ var os = (q, n, e, s) => ({
10
10
  set _(r) {
11
- p(q, s, r, e);
11
+ p(q, n, r, e);
12
12
  },
13
13
  get _() {
14
- return t(q, s, n);
14
+ return t(q, n, s);
15
15
  }
16
16
  });
17
17
  import { trace as ls } from "@ninebone/util";
@@ -23,28 +23,28 @@ const We = class We extends ls.constructor {
23
23
  h(We, "Trace");
24
24
  let ue = We;
25
25
  const E = new ue();
26
- var D, Y, R, K, Z, G, Dt, J, Pt;
26
+ var D, V, R, Z, G, J, Dt, Q, Pt;
27
27
  const Be = class Be extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  d(this, D);
31
- d(this, Y, !1);
31
+ d(this, V, !1);
32
32
  d(this, R);
33
- d(this, K);
34
33
  d(this, Z);
35
34
  d(this, G);
35
+ d(this, J);
36
36
  d(this, Dt, /* @__PURE__ */ h(() => {
37
37
  if (!t(this, D)) return;
38
38
  const e = t(this, D).querySelector(".ng-container-body .ng-part-body");
39
- e && (p(this, G, new ResizeObserver(() => {
39
+ e && (p(this, J, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, G).observe(e));
41
+ })), t(this, J).observe(e));
42
42
  }, "#observeResize"));
43
43
  A(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!t(this, D) || !t(this, R) || t(this, Y)) return;
45
- const e = t(this, R).container, n = e.querySelector("table");
46
- if (!n) return;
47
- const r = t(this, R).track, o = t(this, R).thumb, i = t(this, D).querySelector(".ng-container-bottom"), a = e.clientWidth, c = n.scrollWidth;
44
+ if (!t(this, D) || !t(this, R) || t(this, V)) return;
45
+ const e = t(this, R).container, s = e.querySelector("table");
46
+ if (!s) return;
47
+ const r = t(this, R).track, o = t(this, R).thumb, i = t(this, D).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
49
  i && (i.style.display = "flex");
50
50
  else {
@@ -61,33 +61,33 @@ const Be = class Be extends HTMLElement {
61
61
  const y = l - f;
62
62
  g > y && (g = y), o.style.left = `${g}px`, t(this, R).left.disabled = g === 0, t(this, R).right.disabled = g >= y - 1;
63
63
  }, "refresh"));
64
- d(this, J, /* @__PURE__ */ h((e) => {
64
+ d(this, Q, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, R)) return !1;
66
- const n = t(this, R).container, r = n.querySelector("table");
66
+ const s = t(this, R).container, r = s.querySelector("table");
67
67
  if (!r) return !1;
68
68
  const o = t(this, R).track.getBoundingClientRect(), i = t(this, R).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
71
  const c = o.width - i;
72
72
  a > c && (a = c), a = parseInt(a, 10), t(this, R).thumb.style.left = `${a}px`, t(this, R).left.disabled = a === 0, t(this, R).right.disabled = a >= c - 1;
73
- const l = n.clientWidth, u = r.scrollWidth - l;
74
- return c > 0 && u > 0 && (n.scrollLeft = a / c * u), a > 0 && a < c - 1;
73
+ const l = s.clientWidth, u = r.scrollWidth - l;
74
+ return c > 0 && u > 0 && (s.scrollLeft = a / c * u), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, Pt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
- clearInterval(t(this, K)), clearInterval(t(this, Z));
78
+ clearInterval(t(this, Z)), clearInterval(t(this, G));
79
79
  const o = parseInt(t(this, R).thumb.style.left || 0, 10);
80
- t(this, J).call(this, o + r), p(this, K, setInterval(() => {
81
- clearInterval(t(this, K)), p(this, Z, setInterval(() => {
80
+ t(this, Q).call(this, o + r), p(this, Z, setInterval(() => {
81
+ clearInterval(t(this, Z)), p(this, G, setInterval(() => {
82
82
  const i = parseInt(t(this, R).thumb.style.left || 0, 10);
83
- t(this, J).call(this, i + r) || clearInterval(t(this, Z));
83
+ t(this, Q).call(this, i + r) || clearInterval(t(this, G));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), n = /* @__PURE__ */ h(() => {
87
- clearInterval(t(this, K)), clearInterval(t(this, Z));
86
+ }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
+ clearInterval(t(this, Z)), clearInterval(t(this, G));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, R).left.addEventListener(r, n), t(this, R).right.addEventListener(r, n), t(this, R).track.addEventListener(r, n);
90
+ t(this, R).left.addEventListener(r, s), t(this, R).right.addEventListener(r, s), t(this, R).track.addEventListener(r, s);
91
91
  }), t(this, R).left.addEventListener("mousedown", (r) => {
92
92
  r.button === 0 && e(-20);
93
93
  }), t(this, R).right.addEventListener("mousedown", (r) => {
@@ -96,16 +96,16 @@ const Be = class Be extends HTMLElement {
96
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
98
  const o = t(this, R).track.getBoundingClientRect(), i = t(this, R).thumb.clientWidth;
99
- t(this, J).call(this, r.clientX - o.left - i / 2);
99
+ t(this, Q).call(this, r.clientX - o.left - i / 2);
100
100
  }), t(this, R).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
- r.stopPropagation(), r.preventDefault(), p(this, Y, !0), this.shiftX = r.clientX - t(this, R).thumb.getBoundingClientRect().left;
102
+ r.stopPropagation(), r.preventDefault(), p(this, V, !0), this.shiftX = r.clientX - t(this, R).thumb.getBoundingClientRect().left;
103
103
  const o = /* @__PURE__ */ h((a) => {
104
- if (!t(this, Y)) return;
104
+ if (!t(this, V)) return;
105
105
  const c = t(this, R).track.getBoundingClientRect();
106
- t(this, J).call(this, a.clientX - c.left - this.shiftX);
106
+ t(this, Q).call(this, a.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
108
- p(this, Y, !1), n(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
108
+ p(this, V, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
111
111
  });
@@ -177,49 +177,49 @@ const Be = class Be extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ h(() => {
180
- const n = t(this, D).querySelector(".ng-container-body .ng-part-body");
181
- if (!n) {
180
+ const s = t(this, D).querySelector(".ng-container-body .ng-part-body");
181
+ if (!s) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
185
  p(this, R, {
186
- container: n,
186
+ container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
- }), n.addEventListener("scroll", () => {
192
- t(this, Y) || this.refresh();
191
+ }), s.addEventListener("scroll", () => {
192
+ t(this, V) || this.refresh();
193
193
  }), t(this, Pt).call(this), t(this, Dt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, G) && t(this, G).disconnect();
198
+ t(this, J) && t(this, J).disconnect();
199
199
  }
200
200
  };
201
- D = new WeakMap(), Y = new WeakMap(), R = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), Dt = new WeakMap(), J = new WeakMap(), Pt = new WeakMap(), h(Be, "NineTableHScrollBar");
201
+ D = new WeakMap(), V = new WeakMap(), R = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), J = new WeakMap(), Dt = new WeakMap(), Q = new WeakMap(), Pt = new WeakMap(), h(Be, "NineTableHScrollBar");
202
202
  let ge = Be;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ge);
204
- var Q, tt, ft, C, Et, At, Ft;
204
+ var tt, et, ft, C, Et, At, Ft;
205
205
  const De = class De extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, Q);
209
208
  d(this, tt);
209
+ d(this, et);
210
210
  d(this, ft, !1);
211
211
  d(this, C);
212
212
  d(this, Et, 0);
213
213
  d(this, At, 0);
214
214
  A(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (E.log("vscrollbar.refresh"), !t(this, Q) || !t(this, C)) return;
216
- const e = t(this, C).container, n = t(this, C).track, r = t(this, C).thumb, o = e.clientHeight, i = t(this, Q).data.length, a = t(this, tt).getRowHeight(), c = i * a;
215
+ if (E.log("vscrollbar.refresh"), !t(this, tt) || !t(this, C)) return;
216
+ const e = t(this, C).container, s = t(this, C).track, r = t(this, C).thumb, o = e.clientHeight, i = t(this, tt).data.length, a = t(this, et).getRowHeight(), c = i * a;
217
217
  if (c <= o || i === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
221
221
  this.style.display = "flex";
222
- const l = n.clientHeight;
222
+ const l = s.clientHeight;
223
223
  if (l <= 0) return;
224
224
  const f = Math.max(Math.min(l * (o / c), l), 20);
225
225
  r.style.height = `${f}px`;
@@ -232,8 +232,8 @@ const De = class De extends HTMLElement {
232
232
  }, "refresh"));
233
233
  d(this, Ft, /* @__PURE__ */ h(() => {
234
234
  E.log("nine-table-vscrollbar.#init");
235
- const e = t(this, C).container, n = /* @__PURE__ */ h(() => {
236
- const o = (t(this, Q).data.get() || []).length, i = t(this, tt).getRowHeight();
235
+ const e = t(this, C).container, s = /* @__PURE__ */ h(() => {
236
+ const o = (t(this, tt).data.get() || []).length, i = t(this, et).getRowHeight();
237
237
  return o * i;
238
238
  }, "getContentHeight");
239
239
  t(this, C).thumb.addEventListener("mousedown", (r) => {
@@ -241,12 +241,12 @@ const De = class De extends HTMLElement {
241
241
  r.stopPropagation(), r.preventDefault(), p(this, ft, !0), p(this, Et, r.clientY), p(this, At, e.scrollTop);
242
242
  const o = /* @__PURE__ */ h((a) => {
243
243
  if (!t(this, ft)) return;
244
- const c = t(this, C).track.getBoundingClientRect(), l = t(this, C).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Et), g = e.clientHeight, y = n(), v = Math.max(y - g, 1);
244
+ const c = t(this, C).track.getBoundingClientRect(), l = t(this, C).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Et), g = e.clientHeight, y = s(), v = Math.max(y - g, 1);
245
245
  if (u > 0 && v > 0) {
246
246
  const w = b / u * v;
247
247
  let m = t(this, At) + w;
248
- const M = Math.max(0, y - g);
249
- m < 0 && (m = 0), m > M && (m = M), e.scrollTop = m;
248
+ const _ = Math.max(0, y - g);
249
+ m < 0 && (m = 0), m > _ && (m = _), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
@@ -255,7 +255,7 @@ const De = class De extends HTMLElement {
255
255
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
256
256
  }), t(this, C).track.addEventListener("mousedown", (r) => {
257
257
  if (r.button !== 0 || r.target === t(this, C).thumb) return;
258
- const o = t(this, C).track.getBoundingClientRect(), i = t(this, C).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, u = n(), b = Math.max(u - f, 1);
258
+ const o = t(this, C).track.getBoundingClientRect(), i = t(this, C).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const g = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = g * b;
@@ -269,7 +269,7 @@ const De = class De extends HTMLElement {
269
269
  }, "#init"));
270
270
  }
271
271
  connectedCallback() {
272
- p(this, Q, this.getRootNode().host), p(this, tt, this.closest("nine-table-sheet")), this.innerHTML = `
272
+ p(this, tt, this.getRootNode().host), p(this, et, this.closest("nine-table-sheet")), this.innerHTML = `
273
273
  <style>
274
274
  nine-table-vscrollbar {
275
275
  display: flex;
@@ -334,13 +334,13 @@ const De = class De extends HTMLElement {
334
334
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
335
335
  `;
336
336
  const e = /* @__PURE__ */ h(() => {
337
- const n = t(this, tt).querySelector(".ng-container-body .ng-part-body");
338
- if (!n) {
337
+ const s = t(this, et).querySelector(".ng-container-body .ng-part-body");
338
+ if (!s) {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
342
  p(this, C, {
343
- container: n,
343
+ container: s,
344
344
  track: this.querySelector(".ng-scroll-track"),
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
346
346
  top: this.querySelector(".ng-scroll-top"),
@@ -350,19 +350,19 @@ const De = class De extends HTMLElement {
350
350
  e();
351
351
  }
352
352
  };
353
- Q = new WeakMap(), tt = new WeakMap(), ft = new WeakMap(), C = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Ft = new WeakMap(), h(De, "NineTableVScrollBar");
353
+ tt = new WeakMap(), et = new WeakMap(), ft = new WeakMap(), C = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Ft = new WeakMap(), h(De, "NineTableVScrollBar");
354
354
  let be = De;
355
355
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", be);
356
- var F, S, et, P, N, V, st, qt, Le, He, jt, Yt, Tt, Ct, kt, Vt, Ut, Lt, Ie, ut, Ht, Xt;
356
+ var F, S, st, P, z, U, nt, qt, Le, He, jt, Yt, Tt, Ct, kt, Vt, Ut, Lt, Ie, ut, Ht, Xt;
357
357
  const Pe = class Pe {
358
- constructor(s) {
358
+ constructor(n) {
359
359
  d(this, F);
360
360
  d(this, S);
361
- d(this, et);
361
+ d(this, st);
362
362
  d(this, P, /* @__PURE__ */ new Map());
363
- d(this, N, null);
364
- d(this, V, null);
365
- d(this, st, 0);
363
+ d(this, z, null);
364
+ d(this, U, null);
365
+ d(this, nt, 0);
366
366
  d(this, qt, 40);
367
367
  d(this, Le, !1);
368
368
  d(this, He, !1);
@@ -371,14 +371,14 @@ const Pe = class Pe {
371
371
  A(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  E.log("rowManager.refresh");
374
- const s = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
- s && (t(this, Tt).call(this), t(this, Ct).call(this), t(this, ut).call(this, s.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
374
+ const n = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
+ n && (t(this, Tt).call(this), t(this, Ct).call(this), t(this, ut).call(this, n.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  A(this, "initialize", /* @__PURE__ */ h(() => {
378
- E.log("rowManager.initialize"), p(this, et, {
378
+ E.log("rowManager.initialize"), p(this, st, {
379
379
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), p(this, N, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
381
+ }), p(this, z, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
382
382
  const a = t(this, S).querySelector(i);
383
383
  if (!a) return;
384
384
  const c = a.querySelector(".ng-part-body table");
@@ -388,56 +388,56 @@ const Pe = class Pe {
388
388
  const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
389
  t(this, P).set(i, u);
390
390
  });
391
- const s = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), n = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), o = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
- if (s) {
393
- t(this, Tt).call(this), t(this, Lt).call(this), t(this, Ct).call(this), t(this, ut).call(this, s.scrollTop);
391
+ const n = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), o = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
+ if (n) {
393
+ t(this, Tt).call(this), t(this, Lt).call(this), t(this, Ct).call(this), t(this, ut).call(this, n.scrollTop);
394
394
  let i = !1;
395
395
  const a = /* @__PURE__ */ h((c) => {
396
396
  var u;
397
397
  if (i) return;
398
398
  i = !0;
399
399
  const l = c.scrollTop, f = c.scrollLeft;
400
- s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), n && n.scrollTop !== l && (n.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, ut).call(this, l), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
400
+ n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, ut).call(this, l), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
401
401
  }, "handleContainerScroll");
402
- [s, e, n].forEach((c) => {
402
+ [n, e, s].forEach((c) => {
403
403
  c == null || c.addEventListener("scroll", () => {
404
404
  a(c);
405
405
  });
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
- d(this, Yt, /* @__PURE__ */ h((s, e) => {
409
+ d(this, Yt, /* @__PURE__ */ h((n, e) => {
410
410
  E.log("rowManager.#renderRows");
411
- const n = t(this, P).get(e);
412
- if (!n || n.length === 0) return;
413
- const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
411
+ const s = t(this, P).get(e);
412
+ if (!s || s.length === 0) return;
413
+ const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
414
414
  if (!r) return;
415
415
  r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
416
  const o = r.querySelector("tr.nodata"), i = document.createDocumentFragment();
417
417
  for (let a = 0; a < t(this, qt); a++)
418
- n.forEach((c) => {
418
+ s.forEach((c) => {
419
419
  i.appendChild(c.cloneNode(!0));
420
420
  });
421
- o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, et).firstTr = r.querySelector("tr:not(.nodata)"));
421
+ o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, st).firstTr = r.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
423
  d(this, Tt, /* @__PURE__ */ h(() => {
424
- if (t(this, N) !== null && t(this, N) > 0)
425
- return t(this, N);
426
- const s = t(this, S).querySelector(".ng-container-body .ng-part-body");
424
+ if (t(this, z) !== null && t(this, z) > 0)
425
+ return t(this, z);
426
+ const n = t(this, S).querySelector(".ng-container-body .ng-part-body");
427
427
  E.log("rowManager.#measureAndCacheHeight");
428
428
  const e = t(this, P).get(".ng-container-body");
429
429
  if (!e || e.length === 0) throw new Error("invalid dom");
430
- const n = s.querySelector("tbody.bindable-tbody");
431
- if (E.log(n), !n) throw new Error("invalid dom");
432
- n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
- const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
430
+ const s = n.querySelector("tbody.bindable-tbody");
431
+ if (E.log(s), !s) throw new Error("invalid dom");
432
+ s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
+ const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
434
434
  e.forEach((b) => {
435
435
  o.appendChild(b.cloneNode(!0));
436
- }), r ? r.before(o) : n.appendChild(o);
436
+ }), r ? r.before(o) : s.appendChild(o);
437
437
  const i = t(this, S), a = i.style.display, c = i.style.visibility, l = i.style.position;
438
438
  (a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
439
439
  let f = 0;
440
- const u = n.querySelectorAll("tr");
440
+ const u = s.querySelectorAll("tr");
441
441
  return u.forEach((b) => {
442
442
  let g = b.offsetHeight || b.getBoundingClientRect().height;
443
443
  if (g === 0) {
@@ -445,12 +445,12 @@ const Pe = class Pe {
445
445
  g = parseFloat(y.height) || parseFloat(y.minHeight) || 0;
446
446
  }
447
447
  f += g;
448
- }), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, N, f), t(this, kt).call(this), t(this, N));
448
+ }), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, z, f), t(this, kt).call(this), t(this, z));
449
449
  }, "#measureAndCacheHeight"));
450
450
  d(this, Ct, /* @__PURE__ */ h(() => {
451
451
  E.log("rowManager.#updateVirtualScrollHeight");
452
- const e = (t(this, F).data.get() || []).length, n = t(this, N), r = e * n;
453
- E.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: n, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
452
+ const e = (t(this, F).data.get() || []).length, s = t(this, z), r = e * s;
453
+ E.log("πŸ” [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
454
454
  const i = t(this, S).querySelector(o);
455
455
  if (!i) return;
456
456
  const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
@@ -458,22 +458,22 @@ const Pe = class Pe {
458
458
  });
459
459
  }, "#updateVirtualScrollHeight"));
460
460
  d(this, kt, /* @__PURE__ */ h(() => {
461
- if (t(this, st) > 0 && t(this, N) > 0) {
462
- const s = Math.ceil(t(this, st) / t(this, N));
463
- p(this, qt, s + t(this, jt));
461
+ if (t(this, nt) > 0 && t(this, z) > 0) {
462
+ const n = Math.ceil(t(this, nt) / t(this, z));
463
+ p(this, qt, n + t(this, jt));
464
464
  }
465
465
  }, "#updateRowCount"));
466
466
  d(this, Vt, /* @__PURE__ */ h(() => {
467
467
  var a, c, l, f, u, b;
468
- const s = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), n = t(this, S).querySelector(".ng-container-right .ng-part-body table");
468
+ const n = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
- const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = n ? Array.from(n.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, y.length, v.length);
470
+ const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, y.length, v.length);
471
471
  for (let m = 0; m < w; m++) {
472
- const M = [
472
+ const _ = [
473
473
  ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
474
  ((c = y[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
475
  ((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
- ], T = Math.max(...M);
476
+ ], T = Math.max(..._);
477
477
  T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`));
478
478
  }
479
479
  }
@@ -481,47 +481,47 @@ const Pe = class Pe {
481
481
  if (o) {
482
482
  const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, y.length, v.length);
483
483
  for (let m = 0; m < w; m++) {
484
- const M = [
484
+ const _ = [
485
485
  ((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
486
  ((u = y[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
487
  ((b = v[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
- ], T = Math.max(...M);
488
+ ], T = Math.max(..._);
489
489
  T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`));
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
493
493
  d(this, Ut, /* @__PURE__ */ h(() => {
494
- !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, V, new ResizeObserver((s) => {
495
- for (const e of s) {
496
- const n = e.target;
497
- if (!n.classList.contains("active")) continue;
494
+ !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, U, new ResizeObserver((n) => {
495
+ for (const e of n) {
496
+ const s = e.target;
497
+ if (!s.classList.contains("active")) continue;
498
498
  const r = e.contentRect.height;
499
499
  if (r > 0) {
500
500
  let o = 0;
501
- const i = n.querySelector(".ng-part-header"), a = n.querySelector(".ng-part-footer");
501
+ const i = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
502
502
  i && (o += i.offsetHeight), a && (o += a.offsetHeight);
503
503
  const c = Math.max(r - o, 100);
504
- t(this, st) !== c && (p(this, st, c), t(this, kt).call(this), t(this, N) !== null && (t(this, Lt).call(this), this.refresh()));
504
+ t(this, nt) !== c && (p(this, nt, c), t(this, kt).call(this), t(this, z) !== null && (t(this, Lt).call(this), this.refresh()));
505
505
  }
506
506
  }
507
- })), t(this, V).observe(t(this, S)));
507
+ })), t(this, U).observe(t(this, S)));
508
508
  }, "#initResizeObserver"));
509
509
  d(this, Lt, /* @__PURE__ */ h(() => {
510
- E.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
511
- const e = t(this, S).querySelector(s);
512
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Yt).call(this, e, s);
510
+ E.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
+ const e = t(this, S).querySelector(n);
512
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Yt).call(this, e, n);
513
513
  }), t(this, Xt).call(this), t(this, Vt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, Ie, /* @__PURE__ */ h((s) => {
515
+ d(this, Ie, /* @__PURE__ */ h((n) => {
516
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
517
  var l;
518
- const n = t(this, S).querySelector(e);
519
- if (!n) return;
520
- const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
518
+ const s = t(this, S).querySelector(e);
519
+ if (!s) return;
520
+ const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
521
521
  if (!r) return;
522
522
  const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, F).data.get() || []).length;
523
523
  o.forEach((f, u) => {
524
- const b = s + Math.floor(u / i);
524
+ const b = n + Math.floor(u / i);
525
525
  if (b >= c) {
526
526
  f.style.visibility = "hidden";
527
527
  return;
@@ -531,33 +531,33 @@ const Pe = class Pe {
531
531
  });
532
532
  });
533
533
  }, "#adjustBufferRows"));
534
- d(this, ut, /* @__PURE__ */ h((s) => {
534
+ d(this, ut, /* @__PURE__ */ h((n) => {
535
535
  var u, b;
536
- const e = t(this, N);
536
+ const e = t(this, z);
537
537
  if (!e || e <= 0) return;
538
- const n = t(this, F).data.length;
539
- if (n === 0) return;
538
+ const s = t(this, F).data.length;
539
+ if (s === 0) return;
540
540
  const r = ((u = t(this, P).get(".ng-container-body")) == null ? void 0 : u.length) || 1, o = t(this, S).querySelector(".ng-container-body .ng-part-body");
541
541
  E.log("bodyContainer.clientHeight", o.clientHeight);
542
- const i = Math.max(0, n - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(s / e)));
542
+ const i = Math.max(0, s - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
543
543
  let c = Math.floor(a * e);
544
- E.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && E.log(`πŸ“œ [Scroll Inspect] scrollTop: ${s}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
- const l = t(this, et).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
- (b = t(this, et)) == null || b.scrollTables.forEach((g) => {
544
+ E.log(`πŸ“œ [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && E.log(`πŸ“œ [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
+ const l = t(this, st).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
+ (b = t(this, st)) == null || b.scrollTables.forEach((g) => {
547
547
  g.style.transform = `translate3d(0, ${c}px, 0)`;
548
548
  }), f !== a && (E.log(`πŸ”„ [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
549
549
  const y = t(this, S).querySelector(g);
550
550
  if (!y) return;
551
551
  const v = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
552
  if (!v) return;
553
- Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((m, M) => {
554
- const T = a + Math.floor(M / r);
555
- if (T >= n) {
553
+ Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((m, _) => {
554
+ const T = a + Math.floor(_ / r);
555
+ if (T >= s) {
556
556
  m.style.display = "none";
557
557
  return;
558
558
  }
559
- const _ = t(this, F).data.get(T);
560
- m.style.display = "", t(this, Ht).call(this, m, _, T);
559
+ const N = t(this, F).data.get(T);
560
+ m.style.display = "", t(this, Ht).call(this, m, N, T);
561
561
  });
562
562
  }));
563
563
  }, "#handleScroll"));
@@ -575,9 +575,9 @@ const Pe = class Pe {
575
575
  cell.dataset.row = dataIndex;
576
576
  });
577
577
  }; */
578
- d(this, Ht, /* @__PURE__ */ h((s, e, n) => {
579
- s.dataset.row = n, s.data = e, Array.from(s.cells).forEach((r, o) => {
580
- r.dataset.row = n;
578
+ d(this, Ht, /* @__PURE__ */ h((n, e, s) => {
579
+ n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, o) => {
580
+ r.dataset.row = s;
581
581
  const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
582
582
  i && typeof i.refresh == "function" && i.refresh();
583
583
  });
@@ -585,9 +585,9 @@ const Pe = class Pe {
585
585
  d(this, Xt, /* @__PURE__ */ h(() => {
586
586
  var c, l, f;
587
587
  E.log("rowManager.#syncHeaderHeights");
588
- const s = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), n = t(this, S).querySelector(".ng-container-right .ng-part-header table");
588
+ const n = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
589
589
  if (!e) return;
590
- const r = s ? Array.from(s.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = n ? Array.from(n.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
590
+ const r = n ? Array.from(n.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
591
591
  for (let u = 0; u < a; u++) {
592
592
  const b = [
593
593
  ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
@@ -598,32 +598,32 @@ const Pe = class Pe {
598
598
  }
599
599
  }, "#syncHeaderHeights"));
600
600
  A(this, "destroy", /* @__PURE__ */ h(() => {
601
- t(this, V) && (t(this, V).disconnect(), p(this, V, null));
601
+ t(this, U) && (t(this, U).disconnect(), p(this, U, null));
602
602
  }, "destroy"));
603
- p(this, F, s.getRootNode().host), p(this, S, s), t(this, Ut).call(this);
603
+ p(this, F, n.getRootNode().host), p(this, S, n), t(this, Ut).call(this);
604
604
  }
605
605
  getRowHeight() {
606
- return t(this, N);
606
+ return t(this, z);
607
607
  }
608
- templateLength(s = ".ng-container-body") {
608
+ templateLength(n = ".ng-container-body") {
609
609
  var e;
610
- return ((e = t(this, P).get(s)) == null ? void 0 : e.length) || 1;
610
+ return ((e = t(this, P).get(n)) == null ? void 0 : e.length) || 1;
611
611
  }
612
612
  };
613
- F = new WeakMap(), S = new WeakMap(), et = new WeakMap(), P = new WeakMap(), N = new WeakMap(), V = new WeakMap(), st = new WeakMap(), qt = new WeakMap(), Le = new WeakMap(), He = new WeakMap(), jt = new WeakMap(), Yt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), kt = new WeakMap(), Vt = new WeakMap(), Ut = new WeakMap(), Lt = new WeakMap(), Ie = new WeakMap(), ut = new WeakMap(), Ht = new WeakMap(), Xt = new WeakMap(), h(Pe, "RowManager");
613
+ F = new WeakMap(), S = new WeakMap(), st = new WeakMap(), P = new WeakMap(), z = new WeakMap(), U = new WeakMap(), nt = new WeakMap(), qt = new WeakMap(), Le = new WeakMap(), He = new WeakMap(), jt = new WeakMap(), Yt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), kt = new WeakMap(), Vt = new WeakMap(), Ut = new WeakMap(), Lt = new WeakMap(), Ie = new WeakMap(), ut = new WeakMap(), Ht = new WeakMap(), Xt = new WeakMap(), h(Pe, "RowManager");
614
614
  let pe = Pe;
615
615
  const Kt = class Kt {
616
616
  /**
617
617
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
618
618
  */
619
- static compileAll(s) {
620
- return Array.isArray(s) ? s.map((e) => Kt.compile(e)) : [];
619
+ static compileAll(n) {
620
+ return Array.isArray(n) ? n.map((e) => Kt.compile(e)) : [];
621
621
  }
622
622
  /**
623
623
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
624
624
  */
625
- static compile(s) {
626
- if (!s) return null;
625
+ static compile(n) {
626
+ if (!n) return null;
627
627
  const e = /* @__PURE__ */ h((a) => {
628
628
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
629
629
  const f = l.getAttribute("cell-type") || "renderer";
@@ -633,7 +633,7 @@ const Kt = class Kt {
633
633
  let w = [];
634
634
  b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), y && w.push(`maxbyte="${y}"`), v && w.push(`type="${v}"`), l.innerHTML = `<${u} ${w.join(" ")}></${u}>`;
635
635
  });
636
- }, "processCellTypes"), n = /* @__PURE__ */ h((a) => {
636
+ }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
637
637
  if (!a.querySelector("colgroup")) {
638
638
  const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
639
639
  for (let b = 0; b < l; b++) {
@@ -659,15 +659,15 @@ const Kt = class Kt {
659
659
  const v = y.sectionRowIndex;
660
660
  let w = 0;
661
661
  Array.from(y.querySelectorAll("th,td")).forEach((m) => {
662
- for (let _ = 0; _ < g[v].length; _++)
663
- if (g[v][_] === null) {
664
- w = _;
662
+ for (let N = 0; N < g[v].length; N++)
663
+ if (g[v][N] === null) {
664
+ w = N;
665
665
  break;
666
666
  }
667
- const M = m.rowSpan || 1, T = m.colSpan || 1;
668
- for (let _ = 0; _ < M; _++)
667
+ const _ = m.rowSpan || 1, T = m.colSpan || 1;
668
+ for (let N = 0; N < _; N++)
669
669
  for (let ht = 0; ht < T; ht++)
670
- v + _ < u && w + ht < b && (g[v + _][w + ht] = _ === 0 && ht === 0 ? "1" : "0");
670
+ v + N < u && w + ht < b && (g[v + N][w + ht] = N === 0 && ht === 0 ? "1" : "0");
671
671
  });
672
672
  }), l.forEach((y) => {
673
673
  const v = y.sectionRowIndex;
@@ -679,8 +679,8 @@ const Kt = class Kt {
679
679
  }
680
680
  });
681
681
  });
682
- }, "resetColIndex"), o = s.cloneNode(!0);
683
- return n(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
682
+ }, "resetColIndex"), o = n.cloneNode(!0);
683
+ return s(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
684
684
  const l = a.getAttribute("fixed");
685
685
  l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
686
686
  f.setAttribute("fixed", l);
@@ -691,23 +691,23 @@ const Kt = class Kt {
691
691
  };
692
692
  h(Kt, "TableCompiler");
693
693
  let ye = Kt;
694
- var z, nt, j, wt, is;
694
+ var I, j, Y, wt, is;
695
695
  const Fe = class Fe {
696
- constructor(s) {
697
- d(this, j);
698
- d(this, z);
699
- d(this, nt, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
696
+ constructor(n) {
697
+ d(this, Y);
698
+ d(this, I);
699
+ d(this, j, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
700
  A(this, "render", /* @__PURE__ */ h(() => {
701
- const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, nt);
702
- E.log("🎨 [CellSelection.render] Rendering range ->", t(this, nt));
703
- const o = t(this, z).querySelectorAll(
701
+ const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, j);
702
+ E.log("🎨 [CellSelection.render] Rendering range ->", t(this, j));
703
+ const o = t(this, I).querySelectorAll(
704
704
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
705
705
  );
706
706
  if (o.forEach((a) => {
707
707
  a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
708
708
  c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
709
709
  });
710
- }), s < 0 || e < 0) {
710
+ }), n < 0 || e < 0) {
711
711
  E.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
712
712
  return;
713
713
  }
@@ -715,22 +715,28 @@ const Fe = class Fe {
715
715
  o.forEach((a) => {
716
716
  a.querySelectorAll("tbody tr").forEach((c) => {
717
717
  if (c.classList.contains("nodata")) return;
718
- const { matrixRow: l } = dt(this, j, wt).call(this, c);
718
+ const { matrixRow: l } = dt(this, Y, wt).call(this, c);
719
719
  l < 0 || c.querySelectorAll("td, th").forEach((f) => {
720
720
  const u = parseInt(f.dataset.col, 10);
721
721
  if (isNaN(u)) return;
722
722
  const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), y = l + b - 1, v = u + g - 1;
723
- y >= s && l <= n && v >= e && u <= r && (i++, f.classList.add("selected"), l === s && f.classList.add("selected-top"), y === n && f.classList.add("selected-bottom"), u === e && f.classList.add("selected-left"), v === r && f.classList.add("selected-right"));
723
+ y >= n && l <= s && v >= e && u <= r && (i++, f.classList.add("selected"), l <= n && f.classList.add("selected-top"), y >= s && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), v >= r && f.classList.add("selected-right"));
724
724
  });
725
725
  });
726
726
  }), E.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
727
727
  }, "render"));
728
- p(this, z, s), dt(this, j, is).call(this), E.log("🎯 [CellSelection] Initialized");
728
+ p(this, I, n), dt(this, Y, is).call(this), t(this, I).querySelectorAll(
729
+ ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
730
+ ).forEach((s) => {
731
+ s.addEventListener("scroll", () => {
732
+ t(this, j).startRow >= 0 && t(this, j).startCol >= 0 && this.render();
733
+ });
734
+ }), E.log("🎯 [CellSelection] Initialized");
729
735
  }
730
- setRange(s, e, n, r) {
731
- E.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
732
- let o = Math.min(s, n), i = Math.max(s, n), a = Math.min(e, r), c = Math.max(e, r);
733
- const l = t(this, z).querySelectorAll(
736
+ setRange(n, e, s, r) {
737
+ E.log(`πŸ” [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
738
+ let o = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
739
+ const l = t(this, I).querySelectorAll(
734
740
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
735
741
  );
736
742
  let f = !0, u = 0;
@@ -738,49 +744,49 @@ const Fe = class Fe {
738
744
  f = !1, u++, l.forEach((b) => {
739
745
  b.querySelectorAll("tbody tr").forEach((g) => {
740
746
  if (g.classList.contains("nodata")) return;
741
- const { matrixRow: y } = dt(this, j, wt).call(this, g);
747
+ const { matrixRow: y } = dt(this, Y, wt).call(this, g);
742
748
  y < 0 || g.querySelectorAll("td, th").forEach((v) => {
743
749
  const w = parseInt(v.dataset.col, 10);
744
750
  if (isNaN(w)) return;
745
- const m = parseInt(v.rowSpan || 1, 10), M = parseInt(v.colSpan || 1, 10), T = y + m - 1, _ = w + M - 1;
746
- if (T >= o && y <= i && _ >= a && w <= c) {
747
- const Qe = Math.min(o, y), ts = Math.max(i, T), es = Math.min(a, w), ss = Math.max(c, _);
751
+ const m = parseInt(v.rowSpan || 1, 10), _ = parseInt(v.colSpan || 1, 10), T = y + m - 1, N = w + _ - 1;
752
+ if (T >= o && y <= i && N >= a && w <= c) {
753
+ const Qe = Math.min(o, y), ts = Math.max(i, T), es = Math.min(a, w), ss = Math.max(c, N);
748
754
  (Qe !== o || ts !== i || es !== a || ss !== c) && (o = Qe, i = ts, a = es, c = ss, f = !0);
749
755
  }
750
756
  });
751
757
  });
752
758
  });
753
- p(this, nt, { startRow: o, startCol: a, endRow: i, endCol: c }), E.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, nt)), this.render();
759
+ p(this, j, { startRow: o, startCol: a, endRow: i, endCol: c }), E.log("πŸ“¦ [CellSelection.setRange] Final Range ->", t(this, j)), this.render();
754
760
  }
755
761
  };
756
- z = new WeakMap(), nt = new WeakMap(), j = new WeakSet(), wt = /* @__PURE__ */ h(function(s) {
757
- if (!s || s.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
758
- const e = parseInt(s.dataset.row, 10);
762
+ I = new WeakMap(), j = new WeakMap(), Y = new WeakSet(), wt = /* @__PURE__ */ h(function(n) {
763
+ if (!n || n.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
764
+ const e = parseInt(n.dataset.row, 10);
759
765
  if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
760
- const n = s.closest("tbody"), o = Array.from(n.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(s), a = o.length > 0 ? o.length : 1, c = e * a + (i >= 0 ? i : s.sectionRowIndex % a);
766
+ const s = n.closest("tbody"), o = Array.from(s.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(n), a = o.length > 0 ? o.length : 1, c = e * a + (i >= 0 ? i : n.sectionRowIndex % a);
761
767
  return { dataRow: e, subRowIndex: i, matrixRow: c };
762
768
  }, "#getMatrixRow"), is = /* @__PURE__ */ h(function() {
763
- const s = t(this, z).querySelector(".ng-container-top");
764
- if (!s) {
769
+ const n = t(this, I).querySelector(".ng-container-top");
770
+ if (!n) {
765
771
  E.log("❌ [CellSelection] .ng-container-top not found!");
766
772
  return;
767
773
  }
768
- s.addEventListener("mousedown", (e) => {
774
+ n.addEventListener("mousedown", (e) => {
769
775
  if (e.button !== 0) return;
770
- const n = e.target.closest("td, th");
771
- if (!n || n.dataset.row === void 0 || n.dataset.col === void 0 || n.closest("tr").classList.contains("nodata")) return;
772
- t(this, z).style.userSelect = "none", t(this, z).style.webkitUserSelect = "none";
773
- const r = n.closest("tr"), { matrixRow: o } = dt(this, j, wt).call(this, r), i = parseInt(n.dataset.col, 10);
776
+ const s = e.target.closest("td, th");
777
+ if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
778
+ t(this, I).style.userSelect = "none", t(this, I).style.webkitUserSelect = "none";
779
+ const r = s.closest("tr"), { matrixRow: o } = dt(this, Y, wt).call(this, r), i = parseInt(s.dataset.col, 10);
774
780
  if (o < 0) {
775
- t(this, z).style.userSelect = "", t(this, z).style.webkitUserSelect = "";
781
+ t(this, I).style.userSelect = "", t(this, I).style.webkitUserSelect = "";
776
782
  return;
777
783
  }
778
784
  E.log(`πŸ–±οΈ [MouseDown Success] startRow: ${o}, startCol: ${i}`), this.setRange(o, i, o, i);
779
785
  const a = /* @__PURE__ */ h((l) => {
780
786
  const f = document.elementFromPoint(l.clientX, l.clientY);
781
787
  let u = f == null ? void 0 : f.closest("td, th");
782
- if (!u || !t(this, z).contains(u)) {
783
- const v = t(this, z).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
788
+ if (!u || !t(this, I).contains(u)) {
789
+ const v = t(this, I).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
784
790
  for (const w of v) {
785
791
  const m = w.getBoundingClientRect();
786
792
  if (l.clientX >= m.left && l.clientX <= m.right && l.clientY >= m.top && l.clientY <= m.bottom) {
@@ -790,10 +796,10 @@ z = new WeakMap(), nt = new WeakMap(), j = new WeakSet(), wt = /* @__PURE__ */ h
790
796
  }
791
797
  }
792
798
  if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
793
- const b = u.closest("tr"), { matrixRow: g } = dt(this, j, wt).call(this, b), y = parseInt(u.dataset.col, 10);
799
+ const b = u.closest("tr"), { matrixRow: g } = dt(this, Y, wt).call(this, b), y = parseInt(u.dataset.col, 10);
794
800
  g < 0 || this.setRange(o, i, g, y);
795
801
  }, "onMouseMove"), c = /* @__PURE__ */ h(() => {
796
- E.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, z).style.userSelect = "", t(this, z).style.webkitUserSelect = "", document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
802
+ E.log("πŸ–±οΈ [MouseUp] Drag ended."), t(this, I).style.userSelect = "", t(this, I).style.webkitUserSelect = "", document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
797
803
  }, "onMouseUp");
798
804
  document.addEventListener("mousemove", a), document.addEventListener("mouseup", c);
799
805
  });
@@ -813,8 +819,8 @@ const St = class St extends HTMLElement {
813
819
  A(this, "generate", /* @__PURE__ */ h((e) => {
814
820
  if (E.log("sheet.generate()"), !e) return;
815
821
  p(this, rt, ye.compile(e)), t(this, Gt).call(this), t(this, Jt).call(this);
816
- const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
817
- n && o && (o.style.top = `${n.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ot).initialize(), setTimeout(() => {
822
+ const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
823
+ s && o && (o.style.top = `${s.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ot).initialize(), setTimeout(() => {
818
824
  var i;
819
825
  (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
820
826
  }, 0);
@@ -824,23 +830,23 @@ const St = class St extends HTMLElement {
824
830
  { selector: ".ng-container-body", type: null },
825
831
  { selector: ".ng-container-left", type: "left" },
826
832
  { selector: ".ng-container-right", type: "right" }
827
- ].forEach(({ selector: n, type: r }) => {
833
+ ].forEach(({ selector: s, type: r }) => {
828
834
  var o, i, a;
829
- (o = this.querySelector(`${n} .ng-part-header`)) == null || o.appendChild(t(this, gt).call(this, t(this, rt), r, "header")), (i = this.querySelector(`${n} .ng-virtual-spacer`)) == null || i.before(t(this, gt).call(this, t(this, rt), r, "body")), (a = this.querySelector(`${n} .ng-part-footer`)) == null || a.appendChild(t(this, gt).call(this, t(this, rt), r, "footer"));
835
+ (o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, gt).call(this, t(this, rt), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, gt).call(this, t(this, rt), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, gt).call(this, t(this, rt), r, "footer"));
830
836
  });
831
837
  }, "#renderSplitContainers"));
832
838
  d(this, Jt, /* @__PURE__ */ h(() => {
833
839
  ["left", "right", "body"].forEach((e) => {
834
- const n = this.querySelector(`.ng-container-${e}`), r = n == null ? void 0 : n.querySelectorAll("table");
835
- if (!n || !r || r.length === 0) return;
840
+ const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
841
+ if (!s || !r || r.length === 0) return;
836
842
  let o = 0;
837
843
  r[0].querySelectorAll("col").forEach((i) => {
838
844
  const a = parseInt(i.getAttribute("width"), 10);
839
845
  isNaN(o) || (o += a);
840
- }), e === "body" ? n.style.flex = "1" : (n.style.flex = `0 0 ${o}px`, n.style.width = `${o}px`);
846
+ }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`);
841
847
  });
842
848
  }, "#updateContainerWidths"));
843
- d(this, gt, /* @__PURE__ */ h((e, n, r) => {
849
+ d(this, gt, /* @__PURE__ */ h((e, s, r) => {
844
850
  const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
845
851
  if (r === "header") {
846
852
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
@@ -848,9 +854,9 @@ const St = class St extends HTMLElement {
848
854
  f.className = "fixed-tbody", o.appendChild(f);
849
855
  }
850
856
  } else r === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
851
- return n === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
857
+ return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
852
858
  l.getAttribute("fixed") !== "left" && l.remove();
853
- }) : n === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
859
+ }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
854
860
  l.getAttribute("fixed") !== "right" && l.remove();
855
861
  }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
856
862
  l.remove();
@@ -858,12 +864,12 @@ const St = class St extends HTMLElement {
858
864
  }, "#createSplitTable"));
859
865
  A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, ot).getRowHeight(), "getRowHeight"));
860
866
  A(this, "scrollToX", /* @__PURE__ */ h((e) => {
861
- const n = this.querySelector(".ng-container-body .ng-part-body");
862
- n && (n.scrollLeft = e);
867
+ const s = this.querySelector(".ng-container-body .ng-part-body");
868
+ s && (s.scrollLeft = e);
863
869
  }, "scrollToX"));
864
870
  A(this, "scrollToY", /* @__PURE__ */ h((e) => {
865
- const n = this.querySelector(".ng-container-body .ng-part-body");
866
- n && (n.scrollTop = e);
871
+ const s = this.querySelector(".ng-container-body .ng-part-body");
872
+ s && (s.scrollTop = e);
867
873
  }, "scrollToY"));
868
874
  d(this, Qt, /* @__PURE__ */ h(() => {
869
875
  t(this, te).call(this), p(this, It, new me(this));
@@ -1090,13 +1096,13 @@ const je = class je extends HTMLElement {
1090
1096
  super();
1091
1097
  d(this, ee, /* @__PURE__ */ h(() => {
1092
1098
  var e;
1093
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
1099
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1094
1100
  var i;
1095
- const r = n.ctrlKey || n.metaKey || n.shiftKey, o = parseInt((i = n.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1101
+ const r = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1096
1102
  t(this, Mt).call(this, o, r);
1097
1103
  }), t(this, Mt).call(this, 0, !1);
1098
1104
  }, "#init"));
1099
- d(this, Mt, /* @__PURE__ */ h((e, n = !1) => {
1105
+ d(this, Mt, /* @__PURE__ */ h((e, s = !1) => {
1100
1106
  const r = /* @__PURE__ */ h(() => {
1101
1107
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
1102
1108
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
@@ -1107,7 +1113,7 @@ const je = class je extends HTMLElement {
1107
1113
  });
1108
1114
  }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1109
1115
  if (!a[e]) return;
1110
- if (!n)
1116
+ if (!s)
1111
1117
  a.forEach((f, u) => {
1112
1118
  f.classList.toggle("active", u === e);
1113
1119
  }), c.forEach((f, u) => {
@@ -1135,36 +1141,36 @@ const je = class je extends HTMLElement {
1135
1141
  ee = new WeakMap(), Mt = new WeakMap(), h(je, "NineTableSheets");
1136
1142
  let xe = je;
1137
1143
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", xe);
1138
- var I, se, $t, ne;
1144
+ var M, se, $t, ne;
1139
1145
  const Ye = class Ye {
1140
- constructor(s) {
1141
- d(this, I);
1146
+ constructor(n) {
1147
+ d(this, M);
1142
1148
  d(this, se, /* @__PURE__ */ h(() => {
1143
- t(this, ne).call(this), new ResizeObserver((s) => {
1144
- for (let e of s)
1145
- t(this, I).getAttribute("auto-height") === "true" && t(this, $t).call(this);
1146
- }).observe(t(this, I));
1149
+ t(this, ne).call(this), new ResizeObserver((n) => {
1150
+ for (let e of n)
1151
+ t(this, M).getAttribute("auto-height") === "true" && t(this, $t).call(this);
1152
+ }).observe(t(this, M));
1147
1153
  }, "#init"));
1148
1154
  d(this, $t, /* @__PURE__ */ h(() => {
1149
1155
  var c, l;
1150
- const s = Array.from(t(this, I).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1151
- if (s.length === 0) return;
1152
- const e = parseInt(t(this, I).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((f) => f.getRowHeight())), r = (c = t(this, I).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, I).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Bt.SCROLLBAR_SIZE, a = e * n + r + o + i;
1153
- t(this, I).style.height = `${a}px`;
1156
+ const n = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1157
+ if (n.length === 0) return;
1158
+ const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Bt.SCROLLBAR_SIZE, a = e * s + r + o + i;
1159
+ t(this, M).style.height = `${a}px`;
1154
1160
  }, "#applyAutoHeight"));
1155
1161
  d(this, ne, /* @__PURE__ */ h(() => {
1156
- const e = Array.from(t(this, I).children).filter((c) => c.tagName === "TABLE"), n = t(this, I).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1162
+ const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1157
1163
  const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1158
1164
  return u + b;
1159
1165
  }).join(""), i = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1160
- t(this, I).shadowRoot.innerHTML = `
1166
+ t(this, M).shadowRoot.innerHTML = `
1161
1167
  <style>
1162
1168
  :host {
1163
1169
  display: flex;
1164
1170
  flex-direction: column;
1165
1171
  position: relative;
1166
1172
  overflow: hidden;
1167
- height: ${n ? "auto" : "100%"};
1173
+ height: ${s ? "auto" : "100%"};
1168
1174
  background: #fff;
1169
1175
  }
1170
1176
 
@@ -1277,151 +1283,151 @@ const Ye = class Ye {
1277
1283
  <nine-table-analysis></nine-table-analysis>
1278
1284
  </nine-table-body>
1279
1285
  <nine-table-footer></nine-table-footer>
1280
- `, t(this, I).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1281
- const a = t(this, I).shadowRoot.querySelectorAll("nine-table-sheet");
1286
+ `, t(this, M).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1287
+ const a = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1282
1288
  a == null || a.forEach((c, l) => {
1283
1289
  e[l] && setTimeout(() => {
1284
- c.generate(e[l]), n && t(this, $t).call(this);
1290
+ c.generate(e[l]), s && t(this, $t).call(this);
1285
1291
  });
1286
1292
  });
1287
1293
  }, "#render"));
1288
- p(this, I, s), t(this, se).call(this);
1294
+ p(this, M, n), t(this, se).call(this);
1289
1295
  }
1290
1296
  };
1291
- I = new WeakMap(), se = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), h(Ye, "LayoutManager");
1297
+ M = new WeakMap(), se = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), h(Ye, "LayoutManager");
1292
1298
  let ve = Ye;
1293
1299
  var _t, bt;
1294
1300
  const Ve = class Ve {
1295
- constructor(s) {
1301
+ constructor(n) {
1296
1302
  d(this, _t);
1297
1303
  d(this, bt, -1);
1298
1304
  A(this, "count", /* @__PURE__ */ h(() => t(this, _t).rawRecords.length, "count"));
1299
- p(this, _t, s);
1305
+ p(this, _t, n);
1300
1306
  }
1301
1307
  get at() {
1302
1308
  return t(this, bt);
1303
1309
  }
1304
- set at(s) {
1305
- p(this, bt, parseInt(s, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, bt)}"]`) && setTimeout(() => {
1310
+ set at(n) {
1311
+ p(this, bt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, bt)}"]`) && setTimeout(() => {
1306
1312
  });
1307
1313
  }
1308
1314
  };
1309
1315
  _t = new WeakMap(), bt = new WeakMap(), h(Ve, "ngRow");
1310
1316
  let we = Ve;
1311
- var O, k, W, pt, re, U, oe, it, Nt, ie, ae, yt;
1317
+ var O, k, W, pt, re, X, oe, it, Nt, ie, ae, yt;
1312
1318
  const B = class B {
1313
- constructor(s, e) {
1319
+ constructor(n, e) {
1314
1320
  d(this, O);
1315
1321
  d(this, k);
1316
1322
  d(this, W, []);
1317
1323
  d(this, pt, []);
1318
1324
  d(this, re, 0);
1319
- d(this, U, []);
1325
+ d(this, X, []);
1320
1326
  d(this, oe, /* @__PURE__ */ h(() => {
1321
- p(this, U, []);
1322
- const s = t(this, O).template || [];
1323
- Array.from(s).forEach((e) => {
1324
- var n;
1325
- t(this, U).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1327
+ p(this, X, []);
1328
+ const n = t(this, O).template || [];
1329
+ Array.from(n).forEach((e) => {
1330
+ var s;
1331
+ t(this, X).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1326
1332
  }), (t(this, k).rawRecords || []).forEach((e) => {
1327
- e.__ng || (e.__ng = t(this, Nt).call(this)), e.__ng.height = t(this, U).slice();
1333
+ e.__ng || (e.__ng = t(this, Nt).call(this)), e.__ng.height = t(this, X).slice();
1328
1334
  });
1329
1335
  }, "#initialize"));
1330
1336
  d(this, it, /* @__PURE__ */ h(() => {
1331
- const s = t(this, O).shadowRoot.querySelector("nine-table-sheets");
1332
- s == null || s.classList.toggle("nodata", this.length === 0), t(this, O).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1337
+ const n = t(this, O).shadowRoot.querySelector("nine-table-sheets");
1338
+ n == null || n.classList.toggle("nodata", this.length === 0), t(this, O).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1333
1339
  e.invalidate();
1334
1340
  });
1335
1341
  }, "#invalidate"));
1336
- A(this, "get", /* @__PURE__ */ h((s, e) => {
1342
+ A(this, "get", /* @__PURE__ */ h((n, e) => {
1337
1343
  var o;
1338
- const n = this.getValidData();
1339
- if (!n || n.length <= 0) return;
1340
- if (s == null) return t(this, yt).call(this, n);
1341
- if (s < 0 || s >= n.length) return null;
1344
+ const s = this.getValidData();
1345
+ if (!s || s.length <= 0) return;
1346
+ if (n == null) return t(this, yt).call(this, s);
1347
+ if (n < 0 || n >= s.length) return null;
1342
1348
  const r = typeof ((o = t(this, O).fields) == null ? void 0 : o.get) == "function" ? t(this, O).fields.get() : [];
1343
1349
  if (e != null) {
1344
1350
  const i = r.indexOf(e);
1345
- return i >= 0 ? n[s].v[i] : null;
1351
+ return i >= 0 ? s[n].v[i] : null;
1346
1352
  }
1347
- return t(this, yt).call(this, n[s]);
1353
+ return t(this, yt).call(this, s[n]);
1348
1354
  }, "get"));
1349
- A(this, "set", /* @__PURE__ */ h((s) => {
1350
- this.clear(), this.add(s, !1), t(this, it).call(this);
1355
+ A(this, "set", /* @__PURE__ */ h((n) => {
1356
+ this.clear(), this.add(n, !1), t(this, it).call(this);
1351
1357
  }, "set"));
1352
1358
  d(this, Nt, /* @__PURE__ */ h(() => ({
1353
1359
  rowState: B.ROW_STATE.EMPTY,
1354
1360
  deleted: !1,
1355
1361
  filtered: !1,
1356
- height: t(this, U).slice(),
1362
+ height: t(this, X).slice(),
1357
1363
  o: {},
1358
1364
  c: {},
1359
- _: [0, 0, 0, 0, B.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, U).slice(), -1, {}, {}]
1365
+ _: [0, 0, 0, 0, B.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, X).slice(), -1, {}, {}]
1360
1366
  }), "#getDefaultMeta"));
1361
1367
  A(this, "reset", /* @__PURE__ */ h(() => {
1362
1368
  p(this, W, []), p(this, pt, []), t(this, it).call(this);
1363
1369
  }, "reset"));
1364
1370
  A(this, "clear", /* @__PURE__ */ h(() => {
1365
- var s;
1366
- t(this, k).rawRecords = [], p(this, W, []), p(this, pt, []), (s = t(this, k).viewRecords) != null && s.reset && t(this, k).viewRecords.reset();
1371
+ var n;
1372
+ t(this, k).rawRecords = [], p(this, W, []), p(this, pt, []), (n = t(this, k).viewRecords) != null && n.reset && t(this, k).viewRecords.reset();
1367
1373
  }, "clear"));
1368
- d(this, ie, /* @__PURE__ */ h((s) => {
1374
+ d(this, ie, /* @__PURE__ */ h((n) => {
1369
1375
  var r;
1370
- Array.isArray(s) || (s = [s]);
1371
- const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(s[0] || {}), n = [];
1372
- return s.forEach((o) => {
1376
+ Array.isArray(n) || (n = [n]);
1377
+ const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(n[0] || {}), s = [];
1378
+ return n.forEach((o) => {
1373
1379
  const i = { v: [] };
1374
1380
  e.forEach((a) => {
1375
1381
  i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
1376
- }), n.push(i);
1377
- }), n;
1382
+ }), s.push(i);
1383
+ }), s;
1378
1384
  }, "#json2Array"));
1379
- d(this, ae, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1385
+ d(this, ae, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1380
1386
  e.__ng = t(this, Nt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = B.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1381
- }), s), "#defaultInsert"));
1382
- A(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1383
- s === void 0 && (s = {});
1384
- const n = t(this, ie).call(this, s);
1385
- t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ae).call(this, n)), this.resetRecords();
1387
+ }), n), "#defaultInsert"));
1388
+ A(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1389
+ n === void 0 && (n = {});
1390
+ const s = t(this, ie).call(this, n);
1391
+ t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ae).call(this, s)), this.resetRecords();
1386
1392
  const r = this.count() - 1;
1387
- return e || n.forEach((o, i) => {
1393
+ return e || s.forEach((o, i) => {
1388
1394
  const a = t(this, k).rawRecords[r - i];
1389
1395
  a && (a.__ng.rowState = B.ROW_STATE.EMPTY);
1390
1396
  }), t(this, it).call(this), r;
1391
1397
  }, "add"));
1392
- A(this, "delete", /* @__PURE__ */ h((s) => {
1398
+ A(this, "delete", /* @__PURE__ */ h((n) => {
1393
1399
  let e = [];
1394
- Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(s, 10)], e.sort((n, r) => r - n).forEach((n) => {
1395
- if (t(this, W)[n]) {
1396
- const r = t(this, W)[n].__ng.rowid;
1397
- t(this, W)[n].__ng.rowState === B.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, k).rawRecords.forEach((o) => {
1400
+ Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
1401
+ if (t(this, W)[s]) {
1402
+ const r = t(this, W)[s].__ng.rowid;
1403
+ t(this, W)[s].__ng.rowState === B.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, k).rawRecords.forEach((o) => {
1398
1404
  o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = B.ROW_STATE.DELETE);
1399
1405
  });
1400
1406
  }
1401
1407
  }), this.resetRecords(), t(this, it).call(this);
1402
1408
  }, "delete"));
1403
- A(this, "setValue", /* @__PURE__ */ h((s, e, n) => {
1409
+ A(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1404
1410
  var c;
1405
- s = parseInt(s, 10);
1411
+ n = parseInt(n, 10);
1406
1412
  const o = (typeof ((c = t(this, O).fields) == null ? void 0 : c.get) == "function" ? t(this, O).fields.get() : []).indexOf(e);
1407
1413
  if (o < 0) return;
1408
- const i = this.getValidData()[s];
1414
+ const i = this.getValidData()[n];
1409
1415
  if (!i) return;
1410
1416
  const a = i.v[o];
1411
- a !== n && i.__ng.rowState !== B.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = B.ROW_STATE.UPDATE), i.v[o] = n;
1417
+ a !== s && i.__ng.rowState !== B.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = B.ROW_STATE.UPDATE), i.v[o] = s;
1412
1418
  }, "setValue"));
1413
1419
  A(this, "resetRecords", /* @__PURE__ */ h(() => {
1414
- p(this, pt, t(this, k).rawRecords.filter((s) => !s.__ng.deleted)), p(this, W, t(this, k).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, k).rawRecords.forEach((s, e) => {
1415
- s.__ng.rowidx = e;
1416
- }), t(this, W).forEach((s, e) => {
1417
- s.__ng.i = e;
1420
+ p(this, pt, t(this, k).rawRecords.filter((n) => !n.__ng.deleted)), p(this, W, t(this, k).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, k).rawRecords.forEach((n, e) => {
1421
+ n.__ng.rowidx = e;
1422
+ }), t(this, W).forEach((n, e) => {
1423
+ n.__ng.i = e;
1418
1424
  });
1419
1425
  }, "resetRecords"));
1420
1426
  A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, W).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1421
- d(this, yt, /* @__PURE__ */ h((s) => {
1427
+ d(this, yt, /* @__PURE__ */ h((n) => {
1422
1428
  var i;
1423
- if (!s) return s;
1424
- const e = !Array.isArray(s), n = e ? [s] : s, r = typeof ((i = t(this, O).fields) == null ? void 0 : i.get) == "function" ? t(this, O).fields.get() : [], o = n.filter((a) => !a.__ng.deleted).map((a) => {
1429
+ if (!n) return n;
1430
+ const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, O).fields) == null ? void 0 : i.get) == "function" ? t(this, O).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
1425
1431
  const c = {};
1426
1432
  return r.forEach((l, f) => {
1427
1433
  c[l] = a.v ? a.v[f] : a[l];
@@ -1430,13 +1436,13 @@ const B = class B {
1430
1436
  return e ? o[0] : o;
1431
1437
  }, "#conv"));
1432
1438
  A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1433
- p(this, O, s), p(this, k, e), t(this, oe).call(this);
1439
+ p(this, O, n), p(this, k, e), t(this, oe).call(this);
1434
1440
  }
1435
1441
  get source() {
1436
1442
  return t(this, yt).call(this, t(this, k).rawRecords);
1437
1443
  }
1438
- set source(s) {
1439
- this.clear(), this.add(s, !1);
1444
+ set source(n) {
1445
+ this.clear(), this.add(n, !1);
1440
1446
  }
1441
1447
  get nextId() {
1442
1448
  return ++os(this, re)._;
@@ -1451,7 +1457,7 @@ const B = class B {
1451
1457
  return this.length;
1452
1458
  }
1453
1459
  };
1454
- O = new WeakMap(), k = new WeakMap(), W = new WeakMap(), pt = new WeakMap(), re = new WeakMap(), U = new WeakMap(), oe = new WeakMap(), it = new WeakMap(), Nt = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), yt = new WeakMap(), h(B, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1460
+ O = new WeakMap(), k = new WeakMap(), W = new WeakMap(), pt = new WeakMap(), re = new WeakMap(), X = new WeakMap(), oe = new WeakMap(), it = new WeakMap(), Nt = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), yt = new WeakMap(), h(B, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1455
1461
  A(B, "ROW_STATE", {
1456
1462
  EMPTY: "EMPTY",
1457
1463
  NORMAL: "NORMAL",
@@ -1462,22 +1468,22 @@ A(B, "ROW_STATE", {
1462
1468
  let Se = B;
1463
1469
  var at;
1464
1470
  const Ue = class Ue {
1465
- constructor(s) {
1471
+ constructor(n) {
1466
1472
  d(this, at);
1467
- p(this, at, s), this.row = new we(this), this.data = new Se(t(this, at), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1473
+ p(this, at, n), this.row = new we(this), this.data = new Se(t(this, at), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1468
1474
  var e;
1469
1475
  (e = t(this, at).view) != null && e.redraw && t(this, at).view.redraw();
1470
1476
  }, this.setDataSource = (e) => {
1471
1477
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1472
1478
  }, this.getRowState = (e) => {
1473
1479
  var r, o;
1474
- const n = parseInt(e, 10);
1475
- if (!(n >= this.data.count()))
1476
- return (o = (r = this.data.getValidData()[n]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1480
+ const s = parseInt(e, 10);
1481
+ if (!(s >= this.data.count()))
1482
+ return (o = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1477
1483
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1478
1484
  this.row.at = e;
1479
- }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, n) => this.data.get(e, n), this.setColumn = (e, n, r) => {
1480
- e = parseInt(e, 10), this.data.setValue(e, n, r);
1485
+ }, this.scrollTo_V1 = (e) => (e < 0 && (e = 0), e >= this.rawRecords.length && (e = this.rawRecords.length - 1), this.viewRecords.rawIndex = e, this.viewRecords.reset && this.viewRecords.reset(), !(e <= 0 || e >= this.rawRecords.length - 1)), this.getColumn = (e, s) => this.data.get(e, s), this.setColumn = (e, s, r) => {
1486
+ e = parseInt(e, 10), this.data.setValue(e, s, r);
1481
1487
  }, this.setDataSource([]);
1482
1488
  }
1483
1489
  };
@@ -1486,31 +1492,31 @@ let Re = Ue;
1486
1492
  var mt, H, zt, le;
1487
1493
  const Xe = class Xe {
1488
1494
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1489
- constructor(s) {
1495
+ constructor(n) {
1490
1496
  d(this, mt);
1491
1497
  d(this, H, []);
1492
- A(this, "add", /* @__PURE__ */ h((s, e = "string") => {
1493
- s.forEach((n) => {
1494
- t(this, H).some((r) => r.name === n) || t(this, H).push({ name: n, type: e });
1498
+ A(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1499
+ n.forEach((s) => {
1500
+ t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
1495
1501
  }), t(this, zt).call(this);
1496
1502
  }, "add"));
1497
1503
  d(this, zt, /* @__PURE__ */ h(() => {
1498
- const s = /* @__PURE__ */ new Map();
1504
+ const n = /* @__PURE__ */ new Map();
1499
1505
  t(this, H).forEach((e) => {
1500
- s.set(e.name, e.type);
1501
- }), p(this, H, Array.from(s, ([e, n]) => ({ name: e, type: n }))), p(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1506
+ n.set(e.name, e.type);
1507
+ }), p(this, H, Array.from(n, ([e, s]) => ({ name: e, type: s }))), p(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1502
1508
  }, "#adjust"));
1503
1509
  d(this, le, /* @__PURE__ */ h(() => {
1504
1510
  p(this, H, []), E.log(t(this, mt).querySelectorAll("table"));
1505
- const s = Array.from(t(this, mt).querySelectorAll("table"));
1506
- if (!(!s || s.length === 0)) {
1507
- for (const e of s)
1508
- E.log(e), $("[data-bind]", e).each((n, r) => {
1511
+ const n = Array.from(t(this, mt).querySelectorAll("table"));
1512
+ if (!(!n || n.length === 0)) {
1513
+ for (const e of n)
1514
+ E.log(e), $("[data-bind]", e).each((s, r) => {
1509
1515
  const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
1510
1516
  o && t(this, H).push({ name: o, type: i });
1511
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1512
- $(`[${n}]`, e).each((r, o) => {
1513
- var i = o.getAttribute(n);
1517
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1518
+ $(`[${s}]`, e).each((r, o) => {
1519
+ var i = o.getAttribute(s);
1514
1520
  if (i.indexOf("data.") < 0) {
1515
1521
  const a = i.search(/[(]/g);
1516
1522
  if (a > 0)
@@ -1532,26 +1538,26 @@ const Xe = class Xe {
1532
1538
  t(this, zt).call(this);
1533
1539
  }
1534
1540
  }, "#init"));
1535
- p(this, mt, s), t(this, le).call(this);
1541
+ p(this, mt, n), t(this, le).call(this);
1536
1542
  }
1537
1543
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1538
1544
  get() {
1539
- return t(this, H).map((s) => s.name);
1545
+ return t(this, H).map((n) => n.name);
1540
1546
  }
1541
1547
  // 🎯 λ‚΄λΆ€ 객체 ν†΅μ§Έλ‘œ μ–»κΈ°
1542
1548
  getFields() {
1543
1549
  return t(this, H);
1544
1550
  }
1545
1551
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1546
- getType(s) {
1547
- const e = t(this, H).find((n) => n.name === s);
1552
+ getType(n) {
1553
+ const e = t(this, H).find((s) => s.name === n);
1548
1554
  return e ? e.type : "string";
1549
1555
  }
1550
- indexOf(s) {
1551
- return t(this, H).findIndex((e) => e.name === s);
1556
+ indexOf(n) {
1557
+ return t(this, H).findIndex((e) => e.name === n);
1552
1558
  }
1553
- includes(s) {
1554
- return t(this, H).some((e) => e.name === s);
1559
+ includes(n) {
1560
+ return t(this, H).some((e) => e.name === n);
1555
1561
  }
1556
1562
  };
1557
1563
  mt = new WeakMap(), H = new WeakMap(), zt = new WeakMap(), le = new WeakMap(), h(Xe, "ngFields");
@@ -1617,15 +1623,15 @@ const Ze = class Ze extends qe {
1617
1623
  A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1618
1624
  if (t(this, x))
1619
1625
  if (t(this, x).closest("tbody")) {
1620
- const n = t(this, x).closest("tr").data, r = parseInt(t(this, x).dataset.row);
1621
- if (!n) return "";
1626
+ const s = t(this, x).closest("tr").data, r = parseInt(t(this, x).dataset.row);
1627
+ if (!s) return "";
1622
1628
  if (ninegrid.isNull(t(this, x).dataset.expr)) {
1623
1629
  if (!ninegrid.isNull(t(this, x).dataset.bind))
1624
- return n[t(this, x).dataset.bind] || ninegrid.nvl(e, "");
1630
+ return s[t(this, x).dataset.bind] || ninegrid.nvl(e, "");
1625
1631
  } else try {
1626
- return this.getExprValue(t(this, x).dataset.expr, n, r, t(this, x));
1632
+ return this.getExprValue(t(this, x).dataset.expr, s, r, t(this, x));
1627
1633
  } catch {
1628
- console.error(t(this, x).dataset.expr, n, t(this, x).dataset.row);
1634
+ console.error(t(this, x).dataset.expr, s, t(this, x).dataset.row);
1629
1635
  }
1630
1636
  return ninegrid.nvl(e, "");
1631
1637
  } else
@@ -1638,13 +1644,13 @@ const Ze = class Ze extends qe {
1638
1644
  if (!(!t(this, L) || !t(this, L).template || !t(this, x).closest("tbody.bindable"))) {
1639
1645
  var e = ninegrid.j.querySelectorAll(t(this, x)).attr("suppress");
1640
1646
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1641
- var n = t(this, x).closest("tr"), r = [];
1642
- $("th,td", n).each((m, M) => {
1643
- var T = ninegrid.j.querySelectorAll(M).attr("suppress");
1644
- T && M.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
1647
+ var s = t(this, x).closest("tr"), r = [];
1648
+ $("th,td", s).each((m, _) => {
1649
+ var T = ninegrid.j.querySelectorAll(_).attr("suppress");
1650
+ T && _.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
1645
1651
  }), r.sort();
1646
1652
  var o = !1;
1647
- if (parseInt(n.sectionRowIndex / t(this, L).template.length) > 0)
1653
+ if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1648
1654
  for (var i of r) {
1649
1655
  if (i > e) break;
1650
1656
  var a = parseInt(t(this, x).dataset.row), c = a - 1, l = t(this, x).closest("tr").data, f = t(this, L).data.get(c);
@@ -1663,12 +1669,12 @@ const Ze = class Ze extends qe {
1663
1669
  }
1664
1670
  }
1665
1671
  }, "#resetSuppress"));
1666
- A(this, "getExprValue", /* @__PURE__ */ h((e, n, r, o) => {
1672
+ A(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
1667
1673
  if (typeof e < "u")
1668
1674
  try {
1669
1675
  r = parseInt(r);
1670
1676
  const i = e.replace("()", "");
1671
- return t(this, L)[i] ? t(this, L)[i].call(this, n, r, t(this, x)) : t(this, L).exprFunction(e).call(this, n, r, t(this, L).data);
1677
+ return t(this, L)[i] ? t(this, L)[i].call(this, s, r, t(this, x)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1672
1678
  } catch {
1673
1679
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1674
1680
  }
@@ -1684,9 +1690,9 @@ const Ze = class Ze extends qe {
1684
1690
  return e ?? "";
1685
1691
  }
1686
1692
  set value(e) {
1687
- var n = parseInt(t(this, x).dataset.row);
1693
+ var s = parseInt(t(this, x).dataset.row);
1688
1694
  const r = this.getAttribute("update-row-state") != "false";
1689
- n < 0 ? t(this, L).data.setValueNF(parseInt(t(this, x).dataset.index), t(this, x).dataset.bind, e, r) : t(this, L).data.setValue(n, t(this, x).dataset.bind, e, r);
1695
+ s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, x).dataset.index), t(this, x).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, x).dataset.bind, e, r);
1690
1696
  }
1691
1697
  get row() {
1692
1698
  return parseInt(t(this, x).dataset.row);
@@ -1714,7 +1720,7 @@ const Ge = class Ge extends Te {
1714
1720
  };
1715
1721
  h(Ge, "EditableCellElement");
1716
1722
  let Ce = Ge;
1717
- var Wt, ct, xt, vt, de, X, Oe;
1723
+ var Wt, ct, xt, vt, de, K, Oe;
1718
1724
  const Je = class Je extends Ce {
1719
1725
  constructor() {
1720
1726
  super();
@@ -1723,7 +1729,7 @@ const Je = class Je extends Ce {
1723
1729
  d(this, xt);
1724
1730
  d(this, vt);
1725
1731
  d(this, de);
1726
- d(this, X);
1732
+ d(this, K);
1727
1733
  A(this, "refresh", /* @__PURE__ */ h(() => {
1728
1734
  const e = super.refresh();
1729
1735
  t(this, Wt).value = e;
@@ -1762,22 +1768,22 @@ const Je = class Je extends Ce {
1762
1768
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1763
1769
  if (t(this, ct) == "number") {
1764
1770
  let o = [];
1765
- if (t(this, X) && Number(t(this, X)) > 0 && o.push("."), t(this, vt) && Number(t(this, vt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, X) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1766
- var n = e.target.value, r = n.indexOf(".");
1771
+ if (t(this, K) && Number(t(this, K)) > 0 && o.push("."), t(this, vt) && Number(t(this, vt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, K) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1772
+ var s = e.target.value, r = s.indexOf(".");
1767
1773
  if (r >= 0) {
1768
- var n = n.substr(r + 1, n.length);
1769
- n.length >= Number(t(this, X)) && e.preventDefault();
1774
+ var s = s.substr(r + 1, s.length);
1775
+ s.length >= Number(t(this, K)) && e.preventDefault();
1770
1776
  }
1771
1777
  }
1772
1778
  }
1773
1779
  t(this, xt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, xt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1774
1780
  }
1775
1781
  }, "#onKeyDown"));
1776
- if (this.applyBaseStyle(), p(this, ct, this.getAttribute("type") || "text"), p(this, xt, this.getAttribute("maxbyte")), p(this, vt, this.getAttribute("min")), p(this, de, this.getAttribute("max")), p(this, X, this.getAttribute("scale")), !["text", "number"].includes(t(this, ct))) throw `invalid type : ${t(this, ct)}`;
1782
+ if (this.applyBaseStyle(), p(this, ct, this.getAttribute("type") || "text"), p(this, xt, this.getAttribute("maxbyte")), p(this, vt, this.getAttribute("min")), p(this, de, this.getAttribute("max")), p(this, K, this.getAttribute("scale")), !["text", "number"].includes(t(this, ct))) throw `invalid type : ${t(this, ct)}`;
1777
1783
  }
1778
1784
  connectedCallback() {
1779
- for (var e = [], n = 0; n < this.attributes.length; n++)
1780
- ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[n].name) && e.push(`${this.attributes[n].name}="${this.attributes[n].value}"`);
1785
+ for (var e = [], s = 0; s < this.attributes.length; s++)
1786
+ ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[s].name) && e.push(`${this.attributes[s].name}="${this.attributes[s].value}"`);
1781
1787
  this.innerHTML = `
1782
1788
  <input type="text"
1783
1789
  ${e.join(" ")}
@@ -1786,7 +1792,7 @@ const Je = class Je extends Ce {
1786
1792
  `, super.connectedCallback(), p(this, Wt, this.querySelector("input"));
1787
1793
  }
1788
1794
  };
1789
- Wt = new WeakMap(), ct = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), de = new WeakMap(), X = new WeakMap(), Oe = new WeakMap(), h(Je, "CellInputText");
1795
+ Wt = new WeakMap(), ct = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), de = new WeakMap(), K = new WeakMap(), Oe = new WeakMap(), h(Je, "CellInputText");
1790
1796
  let ke = Je;
1791
1797
  customElements.get("cell-input-text");
1792
1798
  customElements.get("cell-input") || customElements.define("cell-input", ke);