@ninebone/table 0.0.796 → 0.0.798

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
1
  var ys = Object.defineProperty;
2
- var ms = (C) => {
3
- throw TypeError(C);
2
+ var ms = (T) => {
3
+ throw TypeError(T);
4
4
  };
5
- var Ss = (C, n, e) => n in C ? ys(C, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : C[n] = e;
6
- var h = (C, n) => ys(C, "name", { value: n, configurable: !0 });
7
- var q = (C, n, e) => Ss(C, typeof n != "symbol" ? n + "" : n, e), Ee = (C, n, e) => n.has(C) || ms("Cannot " + e);
8
- var t = (C, n, e) => (Ee(C, n, "read from private field"), e ? e.call(C) : n.get(C)), d = (C, n, e) => n.has(C) ? ms("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(C) : n.set(C, e), y = (C, n, e, s) => (Ee(C, n, "write to private field"), s ? s.call(C, e) : n.set(C, e), e), V = (C, n, e) => (Ee(C, n, "access private method"), e);
9
- var xs = (C, n, e, s) => ({
5
+ var Ss = (T, s, e) => s in T ? ys(T, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[s] = e;
6
+ var h = (T, s) => ys(T, "name", { value: s, configurable: !0 });
7
+ var q = (T, s, e) => Ss(T, typeof s != "symbol" ? s + "" : s, e), Ee = (T, s, e) => s.has(T) || ms("Cannot " + e);
8
+ var t = (T, s, e) => (Ee(T, s, "read from private field"), e ? e.call(T) : s.get(T)), d = (T, s, e) => s.has(T) ? ms("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(T) : s.set(T, e), y = (T, s, e, n) => (Ee(T, s, "write to private field"), n ? n.call(T, e) : s.set(T, e), e), V = (T, s, e) => (Ee(T, s, "access private method"), e);
9
+ var xs = (T, s, e, n) => ({
10
10
  set _(r) {
11
- y(C, n, r, e);
11
+ y(T, s, r, e);
12
12
  },
13
13
  get _() {
14
- return t(C, n, s);
14
+ return t(T, s, n);
15
15
  }
16
16
  });
17
17
  import { trace as Rs } from "@ninebone/util";
@@ -42,52 +42,52 @@ const es = class es extends HTMLElement {
42
42
  }, "#observeResize"));
43
43
  q(this, "refresh", /* @__PURE__ */ h(() => {
44
44
  if (!t(this, j) || !t(this, E) || t(this, G)) return;
45
- const e = t(this, E).container, s = e.querySelector("table");
46
- if (!s) return;
47
- const r = t(this, E).track, o = t(this, E).thumb, i = t(this, j).querySelector(".ng-container-bottom"), a = e.clientWidth, l = s.scrollWidth;
48
- if (a !== 0 && l > a)
49
- i && (i.style.display = "flex");
45
+ const e = t(this, E).container, n = e.querySelector("table");
46
+ if (!n) return;
47
+ const r = t(this, E).track, i = t(this, E).thumb, o = t(this, j).querySelector(".ng-container-bottom"), a = e.clientWidth, c = n.scrollWidth;
48
+ if (a !== 0 && c > a)
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- i && (i.style.display = "none");
51
+ o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
- const c = r.clientWidth;
55
- if (c <= 0) return;
56
- const u = Math.max(Math.min(c * (a / l), c), 20);
57
- o.style.width = `${u}px`;
58
- const f = e.scrollLeft, b = l - a;
54
+ const l = r.clientWidth;
55
+ if (l <= 0) return;
56
+ const u = Math.max(Math.min(l * (a / c), l), 20);
57
+ i.style.width = `${u}px`;
58
+ const f = e.scrollLeft, b = c - a;
59
59
  let g = 0;
60
- b > 0 && (g = parseInt(f / b * (c - u), 10)), g < 0 && (g = 0);
61
- const p = c - u;
62
- g > p && (g = p), o.style.left = `${g}px`, t(this, E).left.disabled = g === 0, t(this, E).right.disabled = g >= p - 1;
60
+ b > 0 && (g = parseInt(f / b * (l - u), 10)), g < 0 && (g = 0);
61
+ const p = l - u;
62
+ g > p && (g = p), i.style.left = `${g}px`, t(this, E).left.disabled = g === 0, t(this, E).right.disabled = g >= p - 1;
63
63
  }, "refresh"));
64
64
  d(this, nt, /* @__PURE__ */ h((e) => {
65
65
  if (!t(this, E)) return !1;
66
- const s = t(this, E).container, r = s.querySelector("table");
66
+ const n = t(this, E).container, r = n.querySelector("table");
67
67
  if (!r) return !1;
68
- const o = t(this, E).track.getBoundingClientRect(), i = t(this, E).thumb.clientWidth;
68
+ const i = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
- const l = o.width - i;
72
- a > l && (a = l), a = parseInt(a, 10), t(this, E).thumb.style.left = `${a}px`, S.log("1111=========="), t(this, E).left.disabled = a === 0, t(this, E).right.disabled = a >= l - 1;
73
- const c = s.clientWidth, f = r.scrollWidth - c;
74
- return l > 0 && f > 0 && (s.scrollLeft = a / l * f), a > 0 && a < l - 1;
71
+ const c = i.width - o;
72
+ a > c && (a = c), a = parseInt(a, 10), t(this, E).thumb.style.left = `${a}px`, S.log("1111=========="), t(this, E).left.disabled = a === 0, t(this, E).right.disabled = a >= c - 1;
73
+ const l = n.clientWidth, f = r.scrollWidth - l;
74
+ return c > 0 && f > 0 && (n.scrollLeft = a / c * f), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  d(this, Qt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
78
  clearInterval(t(this, tt)), clearInterval(t(this, et));
79
- const o = parseInt(t(this, E).thumb.style.left || 0, 10);
80
- t(this, nt).call(this, o + r), y(this, tt, setInterval(() => {
79
+ const i = parseInt(t(this, E).thumb.style.left || 0, 10);
80
+ t(this, nt).call(this, i + r), y(this, tt, setInterval(() => {
81
81
  clearInterval(t(this, tt)), y(this, et, setInterval(() => {
82
- const i = parseInt(t(this, E).thumb.style.left || 0, 10);
83
- t(this, nt).call(this, i + r) || clearInterval(t(this, et));
82
+ const o = parseInt(t(this, E).thumb.style.left || 0, 10);
83
+ t(this, nt).call(this, o + r) || clearInterval(t(this, et));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ h(() => {
86
+ }, "delayScroll"), n = /* @__PURE__ */ h(() => {
87
87
  clearInterval(t(this, tt)), clearInterval(t(this, et));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, E).left.addEventListener(r, s), t(this, E).right.addEventListener(r, s), t(this, E).track.addEventListener(r, s);
90
+ t(this, E).left.addEventListener(r, n), t(this, E).right.addEventListener(r, n), t(this, E).track.addEventListener(r, n);
91
91
  }), t(this, E).left.addEventListener("mousedown", (r) => {
92
92
  r.button === 0 && e(-20);
93
93
  }), t(this, E).right.addEventListener("mousedown", (r) => {
@@ -95,19 +95,19 @@ const es = class es extends HTMLElement {
95
95
  }), t(this, E).left.addEventListener("touchstart", () => e(-20)), t(this, E).right.addEventListener("touchstart", () => e(20)), t(this, E).track.addEventListener("mousedown", (r) => {
96
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
- const o = t(this, E).track.getBoundingClientRect(), i = t(this, E).thumb.clientWidth;
99
- t(this, nt).call(this, r.clientX - o.left - i / 2);
98
+ const i = t(this, E).track.getBoundingClientRect(), o = t(this, E).thumb.clientWidth;
99
+ t(this, nt).call(this, r.clientX - i.left - o / 2);
100
100
  }), t(this, E).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
102
  r.stopPropagation(), r.preventDefault(), y(this, G, !0), this.shiftX = r.clientX - t(this, E).thumb.getBoundingClientRect().left;
103
- const o = /* @__PURE__ */ h((a) => {
103
+ const i = /* @__PURE__ */ h((a) => {
104
104
  if (!t(this, G)) return;
105
- const l = t(this, E).track.getBoundingClientRect();
106
- t(this, nt).call(this, a.clientX - l.left - this.shiftX);
107
- }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
108
- y(this, G, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
105
+ const c = t(this, E).track.getBoundingClientRect();
106
+ t(this, nt).call(this, a.clientX - c.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
108
+ y(this, G, !1), n(), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
110
+ document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
@@ -177,18 +177,18 @@ const es = class es 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 s = t(this, j).querySelector(".ng-container-body .ng-part-body");
181
- if (!s) {
180
+ const n = t(this, j).querySelector(".ng-container-body .ng-part-body");
181
+ if (!n) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
185
  y(this, E, {
186
- container: s,
186
+ container: n,
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
- }), s.addEventListener("scroll", () => {
191
+ }), n.addEventListener("scroll", () => {
192
192
  t(this, G) || this.refresh();
193
193
  }), t(this, Qt).call(this), t(this, Jt).call(this), this.refresh();
194
194
  }, "initWhenReady");
@@ -199,8 +199,8 @@ const es = class es extends HTMLElement {
199
199
  }
200
200
  };
201
201
  j = new WeakMap(), G = new WeakMap(), E = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Jt = new WeakMap(), nt = new WeakMap(), Qt = new WeakMap(), h(es, "NineTableHScrollBar");
202
- let Ce = es;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ce);
202
+ let Te = es;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Te);
204
204
  var rt, ot, yt, k, kt, It, te;
205
205
  const ss = class ss extends HTMLElement {
206
206
  constructor() {
@@ -213,51 +213,51 @@ const ss = class ss extends HTMLElement {
213
213
  d(this, It, 0);
214
214
  q(this, "refresh", /* @__PURE__ */ h(() => {
215
215
  if (S.log("vscrollbar.refresh"), !t(this, rt) || !t(this, k)) return;
216
- const e = t(this, k).container, s = t(this, k).track, r = t(this, k).thumb, o = e.clientHeight, i = t(this, rt).data.length, a = t(this, ot).getRowHeight(), l = i * a;
217
- if (l <= o || i === 0) {
216
+ const e = t(this, k).container, n = t(this, k).track, r = t(this, k).thumb, i = e.clientHeight, o = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = o * a;
217
+ if (c <= i || o === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
221
221
  this.style.display = "flex";
222
- const c = s.clientHeight;
223
- if (c <= 0) return;
224
- const u = Math.max(Math.min(c * (o / l), c), 20);
222
+ const l = n.clientHeight;
223
+ if (l <= 0) return;
224
+ const u = Math.max(Math.min(l * (i / c), l), 20);
225
225
  r.style.height = `${u}px`;
226
- const f = e.scrollTop, b = Math.max(l - o, 1);
226
+ const f = e.scrollTop, b = Math.max(c - i, 1);
227
227
  S.log(e, f, b);
228
228
  let g = 0;
229
- b > 0 && (g = f / b * (c - u));
230
- const p = c - u;
229
+ b > 0 && (g = f / b * (l - u));
230
+ const p = l - u;
231
231
  g < 0 && (g = 0), g > p && (g = p), r.style.top = `${g}px`, t(this, k).top.disabled = f <= 0, t(this, k).bottom.disabled = f >= b - 1;
232
232
  }, "refresh"));
233
233
  d(this, te, /* @__PURE__ */ h(() => {
234
234
  S.log("nine-table-vscrollbar.#init");
235
- const e = t(this, k).container, s = /* @__PURE__ */ h(() => {
236
- const o = (t(this, rt).data.get() || []).length, i = t(this, ot).getRowHeight();
237
- return o * i;
235
+ const e = t(this, k).container, n = /* @__PURE__ */ h(() => {
236
+ const i = (t(this, rt).data.get() || []).length, o = t(this, ot).getRowHeight();
237
+ return i * o;
238
238
  }, "getContentHeight");
239
239
  t(this, k).thumb.addEventListener("mousedown", (r) => {
240
240
  if (r.button !== 0) return;
241
241
  r.stopPropagation(), r.preventDefault(), y(this, yt, !0), y(this, kt, r.clientY), y(this, It, e.scrollTop);
242
- const o = /* @__PURE__ */ h((a) => {
242
+ const i = /* @__PURE__ */ h((a) => {
243
243
  if (!t(this, yt)) return;
244
- const l = t(this, k).track.getBoundingClientRect(), c = t(this, k).thumb.clientHeight, f = l.height - c, b = a.clientY - t(this, kt), g = e.clientHeight, p = s(), x = Math.max(p - g, 1);
244
+ const c = t(this, k).track.getBoundingClientRect(), l = t(this, k).thumb.clientHeight, f = c.height - l, b = a.clientY - t(this, kt), g = e.clientHeight, p = n(), x = Math.max(p - g, 1);
245
245
  if (f > 0 && x > 0) {
246
246
  const w = b / f * x;
247
247
  let m = t(this, It) + w;
248
- const T = Math.max(0, p - g);
249
- m < 0 && (m = 0), m > T && (m = T), e.scrollTop = m;
248
+ const C = Math.max(0, p - g);
249
+ m < 0 && (m = 0), m > C && (m = C), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
- }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
253
- y(this, yt, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
252
+ }, "onMouseMove"), o = /* @__PURE__ */ h(() => {
253
+ y(this, yt, !1), document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", o), this.refresh();
254
254
  }, "onMouseUp");
255
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
255
+ document.addEventListener("mousemove", i), document.addEventListener("mouseup", o);
256
256
  }), t(this, k).track.addEventListener("mousedown", (r) => {
257
257
  if (r.button !== 0 || r.target === t(this, k).thumb) return;
258
- const o = t(this, k).track.getBoundingClientRect(), i = t(this, k).thumb.clientHeight, a = r.clientY - o.top - i / 2, c = o.height - i, u = e.clientHeight, f = s(), b = Math.max(f - u, 1);
259
- if (c > 0 && b > 0) {
260
- const g = Math.max(0, Math.min(1, a / c));
258
+ const i = t(this, k).track.getBoundingClientRect(), o = t(this, k).thumb.clientHeight, a = r.clientY - i.top - o / 2, l = i.height - o, u = e.clientHeight, f = n(), b = Math.max(f - u, 1);
259
+ if (l > 0 && b > 0) {
260
+ const g = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = g * b;
262
262
  }
263
263
  this.refresh();
@@ -334,13 +334,13 @@ const ss = class ss 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 s = t(this, ot).querySelector(".ng-container-body .ng-part-body");
338
- if (!s) {
337
+ const n = t(this, ot).querySelector(".ng-container-body .ng-part-body");
338
+ if (!n) {
339
339
  setTimeout(e, 10);
340
340
  return;
341
341
  }
342
342
  y(this, k, {
343
- container: s,
343
+ container: n,
344
344
  track: this.querySelector(".ng-scroll-track"),
345
345
  thumb: this.querySelector(".ng-scroll-thumb"),
346
346
  top: this.querySelector(".ng-scroll-top"),
@@ -351,11 +351,11 @@ const ss = class ss extends HTMLElement {
351
351
  }
352
352
  };
353
353
  rt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), k = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), te = new WeakMap(), h(ss, "NineTableVScrollBar");
354
- let Te = ss;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Te);
354
+ let Ce = ss;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Ce);
356
356
  var U, A, it, Y, O, Z, at, Lt, Ye, Ve, ee, se, Mt, Ht, $t, ne, re, Nt, Ue, mt, _t, oe;
357
357
  const ns = class ns {
358
- constructor(n) {
358
+ constructor(s) {
359
359
  d(this, U);
360
360
  d(this, A);
361
361
  d(this, it);
@@ -371,74 +371,79 @@ const ns = class ns {
371
371
  q(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
373
  S.log("rowManager.refresh");
374
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body");
375
- n && (t(this, Mt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop), (e = t(this, A).querySelector("nine-table-vscrollbar")) == null || e.refresh());
374
+ const s = t(this, A).querySelector(".ng-container-body .ng-part-body");
375
+ s && (t(this, Mt).call(this), t(this, Ht).call(this), t(this, mt).call(this, s.scrollTop), (e = t(this, A).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
377
  q(this, "initialize", /* @__PURE__ */ h(() => {
378
378
  S.log("rowManager.initialize"), y(this, it, {
379
379
  scrollTables: t(this, A).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, A).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
381
  }), y(this, O, null), t(this, Y).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
382
- const i = t(this, A).querySelector(o);
383
- if (!i) return;
384
- const a = i.querySelector(".ng-part-body table");
382
+ const a = t(this, A).querySelector(o);
385
383
  if (!a) return;
386
- const l = a.querySelector("tbody.bindable-tbody");
384
+ const c = a.querySelector(".ng-part-body table");
385
+ if (!c) return;
386
+ const l = c.querySelector("tbody.bindable-tbody");
387
387
  if (!l) return;
388
- const u = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
389
- t(this, Y).set(o, u);
388
+ const f = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
+ t(this, Y).set(o, f);
390
390
  });
391
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body"), e = t(this, A).querySelector(".ng-container-left .ng-part-body"), s = t(this, A).querySelector(".ng-container-right .ng-part-body"), r = t(this, A).querySelector(".ng-container-body .ng-part-header");
392
- if (t(this, A).querySelector(".ng-container-body .ng-part-footer"), n) {
393
- t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, n.scrollTop);
391
+ const s = t(this, A).querySelector(".ng-container-body .ng-part-body"), e = t(this, A).querySelector(".ng-container-left .ng-part-body"), n = t(this, A).querySelector(".ng-container-right .ng-part-body"), r = t(this, A).querySelector(".ng-container-body .ng-part-header"), i = t(this, A).querySelector(".ng-container-body .ng-part-footer");
392
+ if (s) {
393
+ t(this, Mt).call(this), t(this, Nt).call(this), t(this, Ht).call(this), t(this, mt).call(this, s.scrollTop);
394
394
  let o = !1;
395
- n.scrollTop, n.scrollLeft;
396
- const i = /* @__PURE__ */ h((a) => {
397
- var c;
395
+ s.scrollTop, s.scrollLeft;
396
+ const a = /* @__PURE__ */ h((c) => {
397
+ var f;
398
398
  if (o) return;
399
399
  o = !0;
400
- const l = a.scrollTop;
401
- a.scrollLeft, S.log("======", r.scrollLeft), n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), t(this, mt).call(this, l), (c = t(this, A).querySelector("nine-table-vscrollbar")) == null || c.refresh(), o = !1;
400
+ const l = c.scrollTop, u = c.scrollLeft;
401
+ S.log("======", c, c.scrollLeft), s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), n && n.scrollTop !== l && (n.scrollTop = l), r && r.scrollLeft !== u && (r.scrollLeft = u), i && i.scrollLeft !== u && (i.scrollLeft = u), t(this, mt).call(this, l), (f = t(this, A).querySelector("nine-table-vscrollbar")) == null || f.refresh(), o = !1;
402
402
  }, "handleContainerScroll");
403
- [n, e, s].forEach((a) => {
404
- a == null || a.addEventListener("scroll", (l) => {
405
- S.log(l), S.log("rowManager.scroll event"), i(a);
403
+ s == null || s.addEventListener("scroll", (c) => {
404
+ a(s);
405
+ }), [e, n].forEach((c) => {
406
+ c == null || c.addEventListener("scroll", (l) => {
407
+ if (o) return;
408
+ o = !0;
409
+ const u = c.scrollTop;
410
+ s && s.scrollTop !== u && (s.scrollTop = u), o = !1;
406
411
  });
407
412
  });
408
413
  }
409
414
  }, "initialize"));
410
- d(this, se, /* @__PURE__ */ h((n, e) => {
415
+ d(this, se, /* @__PURE__ */ h((s, e) => {
411
416
  S.log("rowManager.#renderRows");
412
- const s = t(this, Y).get(e);
413
- if (!s || s.length === 0) return;
414
- const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
417
+ const n = t(this, Y).get(e);
418
+ if (!n || n.length === 0) return;
419
+ const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
415
420
  if (!r) return;
416
421
  r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
417
- const o = r.querySelector("tr.nodata"), i = document.createDocumentFragment();
422
+ const i = r.querySelector("tr.nodata"), o = document.createDocumentFragment();
418
423
  for (let a = 0; a < t(this, Lt); a++)
419
- s.forEach((l) => {
420
- i.appendChild(l.cloneNode(!0));
424
+ n.forEach((c) => {
425
+ o.appendChild(c.cloneNode(!0));
421
426
  });
422
- o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, it).firstTr = r.querySelector("tr:not(.nodata)"));
427
+ i ? i.before(o) : r.appendChild(o), e === ".ng-container-body" && (t(this, it).firstTr = r.querySelector("tr:not(.nodata)"));
423
428
  }, "#renderRows"));
424
429
  d(this, Mt, /* @__PURE__ */ h(() => {
425
430
  if (t(this, O) !== null && t(this, O) > 0)
426
431
  return t(this, O);
427
- const n = t(this, A).querySelector(".ng-container-body .ng-part-body");
432
+ const s = t(this, A).querySelector(".ng-container-body .ng-part-body");
428
433
  S.log("rowManager.#measureAndCacheHeight");
429
434
  const e = t(this, Y).get(".ng-container-body");
430
435
  if (!e || e.length === 0) throw new Error("invalid dom");
431
- const s = n.querySelector("tbody.bindable-tbody");
432
- if (S.log(s), !s) throw new Error("invalid dom");
433
- s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
434
- const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
436
+ const n = s.querySelector("tbody.bindable-tbody");
437
+ if (S.log(n), !n) throw new Error("invalid dom");
438
+ n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
439
+ const r = n.querySelector("tr.nodata"), i = document.createDocumentFragment();
435
440
  e.forEach((b) => {
436
- o.appendChild(b.cloneNode(!0));
437
- }), r ? r.before(o) : s.appendChild(o);
438
- const i = t(this, A), a = i.style.display, l = i.style.visibility, c = i.style.position;
439
- (a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
441
+ i.appendChild(b.cloneNode(!0));
442
+ }), r ? r.before(i) : n.appendChild(i);
443
+ const o = t(this, A), a = o.style.display, c = o.style.visibility, l = o.style.position;
444
+ (a === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
440
445
  let u = 0;
441
- const f = s.querySelectorAll("tr");
446
+ const f = n.querySelectorAll("tr");
442
447
  return f.forEach((b) => {
443
448
  let g = b.offsetHeight || b.getBoundingClientRect().height;
444
449
  if (g === 0) {
@@ -446,84 +451,84 @@ const ns = class ns {
446
451
  g = parseFloat(p.height) || parseFloat(p.minHeight) || 0;
447
452
  }
448
453
  u += g;
449
- }), f.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = l, i.style.position = c, u <= 0 ? -1 : (y(this, O, u), t(this, $t).call(this), t(this, O));
454
+ }), f.forEach((b) => b.remove()), o.style.display = a, o.style.visibility = c, o.style.position = l, u <= 0 ? -1 : (y(this, O, u), t(this, $t).call(this), t(this, O));
450
455
  }, "#measureAndCacheHeight"));
451
456
  d(this, Ht, /* @__PURE__ */ h(() => {
452
457
  S.log("rowManager.#updateVirtualScrollHeight");
453
- const e = (t(this, U).data.get() || []).length, s = t(this, O), r = e * s;
454
- S.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
455
- const i = t(this, A).querySelector(o);
456
- if (!i) return;
457
- const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
458
+ const e = (t(this, U).data.get() || []).length, n = t(this, O), r = e * n;
459
+ S.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: n, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
460
+ const o = t(this, A).querySelector(i);
461
+ if (!o) return;
462
+ const a = o.querySelector(".ng-part-body .ng-virtual-spacer");
458
463
  a && (a.style.height = `${r}px`);
459
464
  });
460
465
  }, "#updateVirtualScrollHeight"));
461
466
  d(this, $t, /* @__PURE__ */ h(() => {
462
467
  if (t(this, at) > 0 && t(this, O) > 0) {
463
- const n = Math.ceil(t(this, at) / t(this, O));
464
- y(this, Lt, n + t(this, ee));
468
+ const s = Math.ceil(t(this, at) / t(this, O));
469
+ y(this, Lt, s + t(this, ee));
465
470
  }
466
471
  }, "#updateRowCount"));
467
472
  d(this, ne, /* @__PURE__ */ h(() => {
468
- var a, l, c, u, f, b;
469
- const n = t(this, A).querySelector(".ng-container-left .ng-part-body table"), e = t(this, A).querySelector(".ng-container-body .ng-part-body table"), s = t(this, A).querySelector(".ng-container-right .ng-part-body table");
473
+ var a, c, l, u, f, b;
474
+ const s = t(this, A).querySelector(".ng-container-left .ng-part-body table"), e = t(this, A).querySelector(".ng-container-body .ng-part-body table"), n = t(this, A).querySelector(".ng-container-right .ng-part-body table");
470
475
  if (e) {
471
- const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, p.length, x.length);
476
+ const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], p = Array.from(e.querySelectorAll("tbody tr")), x = n ? Array.from(n.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, p.length, x.length);
472
477
  for (let m = 0; m < w; m++) {
473
- const T = [
478
+ const C = [
474
479
  ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
475
- ((l = p[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
476
- ((c = x[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0
477
- ], R = Math.max(...T);
480
+ ((c = p[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
481
+ ((l = x[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
482
+ ], R = Math.max(...C);
478
483
  R > 0 && (g[m] && (g[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
479
484
  }
480
485
  }
481
- const r = t(this, A).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, A).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, A).querySelector(".ng-container-right .ng-part-footer table");
482
- if (o) {
483
- const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(o.querySelectorAll("tfoot tr")), x = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, p.length, x.length);
486
+ const r = t(this, A).querySelector(".ng-container-left .ng-part-footer table"), i = t(this, A).querySelector(".ng-container-body .ng-part-footer table"), o = t(this, A).querySelector(".ng-container-right .ng-part-footer table");
487
+ if (i) {
488
+ const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], p = Array.from(i.querySelectorAll("tfoot tr")), x = o ? Array.from(o.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, p.length, x.length);
484
489
  for (let m = 0; m < w; m++) {
485
- const T = [
490
+ const C = [
486
491
  ((u = g[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
492
  ((f = p[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
488
493
  ((b = x[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
489
- ], R = Math.max(...T);
494
+ ], R = Math.max(...C);
490
495
  R > 0 && (g[m] && (g[m].style.height = `${R}px`), p[m] && (p[m].style.height = `${R}px`), x[m] && (x[m].style.height = `${R}px`));
491
496
  }
492
497
  }
493
498
  }, "#syncRowHeights"));
494
499
  d(this, re, /* @__PURE__ */ h(() => {
495
- !t(this, A) || !(t(this, A) instanceof HTMLElement) || (y(this, Z, new ResizeObserver((n) => {
496
- for (const e of n) {
497
- const s = e.target;
498
- if (!s.classList.contains("active")) continue;
500
+ !t(this, A) || !(t(this, A) instanceof HTMLElement) || (y(this, Z, new ResizeObserver((s) => {
501
+ for (const e of s) {
502
+ const n = e.target;
503
+ if (!n.classList.contains("active")) continue;
499
504
  const r = e.contentRect.height;
500
505
  if (r > 0) {
501
- let o = 0;
502
- const i = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
503
- i && (o += i.offsetHeight), a && (o += a.offsetHeight);
504
- const l = Math.max(r - o, 100);
505
- t(this, at) !== l && (y(this, at, l), t(this, $t).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
506
+ let i = 0;
507
+ const o = n.querySelector(".ng-part-header"), a = n.querySelector(".ng-part-footer");
508
+ o && (i += o.offsetHeight), a && (i += a.offsetHeight);
509
+ const c = Math.max(r - i, 100);
510
+ t(this, at) !== c && (y(this, at, c), t(this, $t).call(this), t(this, O) !== null && (t(this, Nt).call(this), this.refresh()));
506
511
  }
507
512
  }
508
513
  })), t(this, Z).observe(t(this, A)));
509
514
  }, "#initResizeObserver"));
510
515
  d(this, Nt, /* @__PURE__ */ h(() => {
511
- S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
512
- const e = t(this, A).querySelector(n);
513
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, se).call(this, e, n);
516
+ S.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
517
+ const e = t(this, A).querySelector(s);
518
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, se).call(this, e, s);
514
519
  }), t(this, oe).call(this), t(this, ne).call(this);
515
520
  }, "#renderAllContainers"));
516
- d(this, Ue, /* @__PURE__ */ h((n) => {
521
+ d(this, Ue, /* @__PURE__ */ h((s) => {
517
522
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
518
- var c;
519
- const s = t(this, A).querySelector(e);
520
- if (!s) return;
521
- const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
523
+ var l;
524
+ const n = t(this, A).querySelector(e);
525
+ if (!n) return;
526
+ const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
522
527
  if (!r) return;
523
- const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((c = t(this, Y).get(e)) == null ? void 0 : c.length) || 1, l = (t(this, U).data.get() || []).length;
524
- o.forEach((u, f) => {
525
- const b = n + Math.floor(f / i);
526
- if (b >= l) {
528
+ const i = Array.from(r.querySelectorAll("tr:not(.nodata)")), o = ((l = t(this, Y).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, U).data.get() || []).length;
529
+ i.forEach((u, f) => {
530
+ const b = s + Math.floor(f / o);
531
+ if (b >= c) {
527
532
  u.style.visibility = "hidden";
528
533
  return;
529
534
  }
@@ -532,28 +537,28 @@ const ns = class ns {
532
537
  });
533
538
  });
534
539
  }, "#adjustBufferRows"));
535
- d(this, mt, /* @__PURE__ */ h((n) => {
540
+ d(this, mt, /* @__PURE__ */ h((s) => {
536
541
  var f, b;
537
542
  const e = t(this, O);
538
543
  if (!e || e <= 0) return;
539
- const s = t(this, U).data.length;
540
- if (s === 0) return;
541
- const r = ((f = t(this, Y).get(".ng-container-body")) == null ? void 0 : f.length) || 1, o = t(this, A).querySelector(".ng-container-body .ng-part-body");
542
- S.log("bodyContainer.clientHeight", o.clientHeight);
543
- const i = Math.max(0, s - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
544
- let l = Math.floor(a * e);
545
- S.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${l}`), a === i && S.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${l}`);
546
- const c = t(this, it).firstTr, u = c && c.dataset.row !== void 0 ? parseInt(c.dataset.row, 10) : -1;
544
+ const n = t(this, U).data.length;
545
+ if (n === 0) return;
546
+ const r = ((f = t(this, Y).get(".ng-container-body")) == null ? void 0 : f.length) || 1, i = t(this, A).querySelector(".ng-container-body .ng-part-body");
547
+ S.log("bodyContainer.clientHeight", i.clientHeight);
548
+ const o = Math.max(0, n - Math.floor(i.clientHeight / e)), a = Math.min(o, Math.max(0, Math.floor(s / e)));
549
+ let c = Math.floor(a * e);
550
+ S.log(`📜 [Scroll Calc] maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`), a === o && S.log(`📜 [Scroll Inspect] scrollTop: ${s}, rowHeight: ${e}, maxStartIndex: ${o}, startIndex: ${a}, offsetY: ${c}`);
551
+ const l = t(this, it).firstTr, u = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
547
552
  (b = t(this, it)) == null || b.scrollTables.forEach((g) => {
548
- g.style.transform = `translate3d(0, ${l}px, 0)`;
553
+ g.style.transform = `translate3d(0, ${c}px, 0)`;
549
554
  }), u !== a && (S.log(`🔄 [Row Bind Trigger] currentStartIndex(${u}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
550
555
  const p = t(this, A).querySelector(g);
551
556
  if (!p) return;
552
557
  const x = p.querySelector(".ng-part-body tbody.bindable-tbody");
553
558
  if (!x) return;
554
- Array.from(x.querySelectorAll("tr:not(.nodata)")).forEach((m, T) => {
555
- const R = a + Math.floor(T / r);
556
- if (R >= s) {
559
+ Array.from(x.querySelectorAll("tr:not(.nodata)")).forEach((m, C) => {
560
+ const R = a + Math.floor(C / r);
561
+ if (R >= n) {
557
562
  m.style.display = "none";
558
563
  return;
559
564
  }
@@ -576,39 +581,39 @@ const ns = class ns {
576
581
  cell.dataset.row = dataIndex;
577
582
  });
578
583
  }; */
579
- d(this, _t, /* @__PURE__ */ h((n, e, s) => {
580
- n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, o) => {
581
- r.dataset.row = s;
582
- const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
583
- i && typeof i.refresh == "function" && i.refresh();
584
+ d(this, _t, /* @__PURE__ */ h((s, e, n) => {
585
+ s.dataset.row = n, s.data = e, Array.from(s.cells).forEach((r, i) => {
586
+ r.dataset.row = n;
587
+ const o = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
588
+ o && typeof o.refresh == "function" && o.refresh();
584
589
  });
585
590
  }, "#bindRowData"));
586
591
  d(this, oe, /* @__PURE__ */ h(() => {
587
- var l, c, u;
592
+ var c, l, u;
588
593
  S.log("rowManager.#syncHeaderHeights");
589
- const n = t(this, A).querySelector(".ng-container-left .ng-part-header table"), e = t(this, A).querySelector(".ng-container-body .ng-part-header table"), s = t(this, A).querySelector(".ng-container-right .ng-part-header table");
594
+ const s = t(this, A).querySelector(".ng-container-left .ng-part-header table"), e = t(this, A).querySelector(".ng-container-body .ng-part-header table"), n = t(this, A).querySelector(".ng-container-right .ng-part-header table");
590
595
  if (!e) return;
591
- 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);
596
+ const r = s ? Array.from(s.querySelectorAll("tr")) : [], i = Array.from(e.querySelectorAll("tr")), o = n ? Array.from(n.querySelectorAll("tr")) : [], a = Math.max(r.length, i.length, o.length);
592
597
  for (let f = 0; f < a; f++) {
593
598
  const b = [
594
- ((l = r[f]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
595
- ((c = o[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
596
- ((u = i[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
599
+ ((c = r[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
600
+ ((l = i[f]) == null ? void 0 : l.getBoundingClientRect().height) || 0,
601
+ ((u = o[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
597
602
  ], g = Math.max(...b);
598
- g > 0 && (r[f] && (r[f].style.height = `${g}px`), o[f] && (o[f].style.height = `${g}px`), i[f] && (i[f].style.height = `${g}px`));
603
+ g > 0 && (r[f] && (r[f].style.height = `${g}px`), i[f] && (i[f].style.height = `${g}px`), o[f] && (o[f].style.height = `${g}px`));
599
604
  }
600
605
  }, "#syncHeaderHeights"));
601
606
  q(this, "destroy", /* @__PURE__ */ h(() => {
602
607
  t(this, Z) && (t(this, Z).disconnect(), y(this, Z, null));
603
608
  }, "destroy"));
604
- y(this, U, n.getRootNode().host), y(this, A, n), t(this, re).call(this);
609
+ y(this, U, s.getRootNode().host), y(this, A, s), t(this, re).call(this);
605
610
  }
606
611
  getRowHeight() {
607
612
  return t(this, O);
608
613
  }
609
- templateLength(n = ".ng-container-body") {
614
+ templateLength(s = ".ng-container-body") {
610
615
  var e;
611
- return ((e = t(this, Y).get(n)) == null ? void 0 : e.length) || 1;
616
+ return ((e = t(this, Y).get(s)) == null ? void 0 : e.length) || 1;
612
617
  }
613
618
  };
614
619
  U = new WeakMap(), A = new WeakMap(), it = new WeakMap(), Y = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), at = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), Mt = new WeakMap(), Ht = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), Nt = new WeakMap(), Ue = new WeakMap(), mt = new WeakMap(), _t = new WeakMap(), oe = new WeakMap(), h(ns, "RowManager");
@@ -617,48 +622,48 @@ const ie = class ie {
617
622
  /**
618
623
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
619
624
  */
620
- static compileAll(n) {
621
- return Array.isArray(n) ? n.map((e) => ie.compile(e)) : [];
625
+ static compileAll(s) {
626
+ return Array.isArray(s) ? s.map((e) => ie.compile(e)) : [];
622
627
  }
623
628
  /**
624
629
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
625
630
  */
626
- static compile(n) {
627
- if (!n) return null;
631
+ static compile(s) {
632
+ if (!s) return null;
628
633
  const e = /* @__PURE__ */ h((a) => {
629
- a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((c) => {
630
- const u = c.getAttribute("cell-type") || "renderer";
631
- if (c.children.length > 0 && c.firstElementChild.tagName.includes("-")) return;
634
+ a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
635
+ const u = l.getAttribute("cell-type") || "renderer";
636
+ if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
632
637
  let f = `cell-${u}`;
633
- const b = c.getAttribute("data-bind"), g = c.getAttribute("data-expr"), p = c.getAttribute("maxbyte"), x = c.getAttribute("type");
638
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), p = l.getAttribute("maxbyte"), x = l.getAttribute("type");
634
639
  let w = [];
635
- b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), p && w.push(`maxbyte="${p}"`), x && w.push(`type="${x}"`), c.innerHTML = `<${f} ${w.join(" ")}></${f}>`;
636
- }), a.querySelectorAll("tbody td, tfoot td").forEach((c) => {
637
- c.setAttribute("tabindex", "0");
640
+ b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), p && w.push(`maxbyte="${p}"`), x && w.push(`type="${x}"`), l.innerHTML = `<${f} ${w.join(" ")}></${f}>`;
641
+ }), a.querySelectorAll("tbody td, tfoot td").forEach((l) => {
642
+ l.setAttribute("tabindex", "0");
638
643
  });
639
- }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
644
+ }, "processCellTypes"), n = /* @__PURE__ */ h((a) => {
640
645
  if (!a.querySelector("colgroup")) {
641
- const l = a.querySelector("tbody tr") || a.querySelector("tr"), c = l ? l.querySelectorAll("th, td").length : 1, u = document.createElement("colgroup"), f = Math.max(Math.floor(a.clientWidth / c), 100);
642
- for (let b = 0; b < c; b++) {
646
+ const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, u = document.createElement("colgroup"), f = Math.max(Math.floor(a.clientWidth / l), 100);
647
+ for (let b = 0; b < l; b++) {
643
648
  const g = document.createElement("col");
644
649
  g.setAttribute("width", f), u.appendChild(g);
645
650
  }
646
651
  a.prepend(u);
647
652
  }
648
653
  if (!a.querySelector("thead")) {
649
- const l = document.createElement("thead"), c = a.querySelector("colgroup");
650
- c ? c.after(l) : a.prepend(l);
654
+ const c = document.createElement("thead"), l = a.querySelector("colgroup");
655
+ l ? l.after(c) : a.prepend(c);
651
656
  }
652
657
  a.classList.add("nine-table-element");
653
- }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, l) => {
654
- const c = Array.from(a.querySelectorAll(l + " tr")), u = Array.from(a.querySelectorAll(l + " th," + l + " td")), f = c.length;
658
+ }, "ensureTableStructure"), r = /* @__PURE__ */ h((a, c) => {
659
+ const l = Array.from(a.querySelectorAll(c + " tr")), u = Array.from(a.querySelectorAll(c + " th," + c + " td")), f = l.length;
655
660
  if (f === 0 || u.length === 0) return;
656
661
  let b = 0;
657
662
  u.forEach((p) => {
658
663
  b += p.colSpan || 1;
659
664
  });
660
665
  const g = Array.from(Array(f), () => Array(b).fill(null));
661
- c.forEach((p) => {
666
+ l.forEach((p) => {
662
667
  const x = p.sectionRowIndex;
663
668
  let w = 0;
664
669
  Array.from(p.querySelectorAll("th,td")).forEach((m) => {
@@ -667,12 +672,12 @@ const ie = class ie {
667
672
  w = M;
668
673
  break;
669
674
  }
670
- const T = m.rowSpan || 1, R = m.colSpan || 1;
671
- for (let M = 0; M < T; M++)
675
+ const C = m.rowSpan || 1, R = m.colSpan || 1;
676
+ for (let M = 0; M < C; M++)
672
677
  for (let B = 0; B < R; B++)
673
678
  x + M < f && w + B < b && (g[x + M][w + B] = M === 0 && B === 0 ? "1" : "0");
674
679
  });
675
- }), c.forEach((p) => {
680
+ }), l.forEach((p) => {
676
681
  const x = p.sectionRowIndex;
677
682
  Array.from(p.querySelectorAll("th,td")).forEach((w) => {
678
683
  for (let m = 0; m < g[x].length; m++)
@@ -682,13 +687,13 @@ const ie = class ie {
682
687
  }
683
688
  });
684
689
  });
685
- }, "resetColIndex"), o = n.cloneNode(!0);
686
- return s(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, l) => {
687
- const c = a.getAttribute("fixed");
688
- c && o.querySelectorAll(`thead [data-col="${l}"], tbody [data-col="${l}"], tfoot [data-col="${l}"]`).forEach((u) => {
689
- u.setAttribute("fixed", c);
690
+ }, "resetColIndex"), i = s.cloneNode(!0);
691
+ return n(i), e(i), r(i, "thead"), r(i, "tbody"), r(i, "tfoot"), Array.from(i.querySelectorAll("colgroup col")).forEach((a, c) => {
692
+ const l = a.getAttribute("fixed");
693
+ l && i.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((u) => {
694
+ u.setAttribute("fixed", l);
690
695
  });
691
- }), o;
696
+ }), i;
692
697
  }
693
698
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
694
699
  };
@@ -696,153 +701,153 @@ h(ie, "TableCompiler");
696
701
  let Ie = ie;
697
702
  var N, X, K, qt, ws;
698
703
  const rs = class rs {
699
- constructor(n) {
704
+ constructor(s) {
700
705
  d(this, K);
701
706
  d(this, N);
702
707
  d(this, X, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
703
708
  q(this, "render", /* @__PURE__ */ h(() => {
704
- const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, X);
709
+ const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, X);
705
710
  S.log("🎨 [CellSelection.render] Rendering range ->", t(this, X));
706
- const o = t(this, N).querySelectorAll(
711
+ const i = t(this, N).querySelectorAll(
707
712
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
708
713
  );
709
- if (o.forEach((a) => {
710
- a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((l) => {
711
- l.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
714
+ if (i.forEach((a) => {
715
+ a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
716
+ c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
712
717
  });
713
- }), n < 0 || e < 0) {
718
+ }), s < 0 || e < 0) {
714
719
  S.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
715
720
  return;
716
721
  }
717
- let i = 0;
718
- o.forEach((a) => {
719
- a.querySelectorAll("tbody tr").forEach((l) => {
720
- const { matrixRow: c } = V(this, K, qt).call(this, l);
721
- c < 0 || l.querySelectorAll("td, th").forEach((u) => {
722
+ let o = 0;
723
+ i.forEach((a) => {
724
+ a.querySelectorAll("tbody tr").forEach((c) => {
725
+ const { matrixRow: l } = V(this, K, qt).call(this, c);
726
+ l < 0 || c.querySelectorAll("td, th").forEach((u) => {
722
727
  const f = parseInt(u.dataset.col, 10);
723
728
  if (isNaN(f)) return;
724
- const b = parseInt(u.rowSpan || 1, 10), g = parseInt(u.colSpan || 1, 10), p = c + b - 1, x = f + g - 1;
725
- p >= n && c <= s && x >= e && f <= r && (i++, u.classList.add("selected"), S.log(u, n, e, s, r), c <= n && u.classList.add("selected-top"), p >= s && u.classList.add("selected-bottom"), f <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
729
+ const b = parseInt(u.rowSpan || 1, 10), g = parseInt(u.colSpan || 1, 10), p = l + b - 1, x = f + g - 1;
730
+ p >= s && l <= n && x >= e && f <= r && (o++, u.classList.add("selected"), S.log(u, s, e, n, r), l <= s && u.classList.add("selected-top"), p >= n && u.classList.add("selected-bottom"), f <= e && u.classList.add("selected-left"), x >= r && u.classList.add("selected-right"));
726
731
  });
727
732
  });
728
- }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
733
+ }), S.log(`✨ [CellSelection.render] Total rendered cells marked: ${o}`);
729
734
  }, "render"));
730
- y(this, N, n), V(this, K, ws).call(this), t(this, N).querySelectorAll(
735
+ y(this, N, s), V(this, K, ws).call(this), t(this, N).querySelectorAll(
731
736
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
732
- ).forEach((s) => {
733
- s.addEventListener("scroll", () => {
737
+ ).forEach((n) => {
738
+ n.addEventListener("scroll", () => {
734
739
  t(this, X).startRow >= 0 && t(this, X).startCol >= 0 && this.render();
735
740
  });
736
741
  }), S.log("🎯 [CellSelection] Initialized");
737
742
  }
738
- setRange(n, e, s, r) {
739
- S.log(`🔍 [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
740
- let o = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, r), l = Math.max(e, r);
741
- const c = t(this, N).querySelectorAll(
743
+ setRange(s, e, n, r) {
744
+ S.log(`🔍 [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
745
+ let i = Math.min(s, n), o = Math.max(s, n), a = Math.min(e, r), c = Math.max(e, r);
746
+ const l = t(this, N).querySelectorAll(
742
747
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
743
748
  );
744
749
  let u = !0, f = 0;
745
750
  for (; u && f < 5; )
746
- u = !1, f++, c.forEach((b) => {
751
+ u = !1, f++, l.forEach((b) => {
747
752
  b.querySelectorAll("tbody tr").forEach((g) => {
748
753
  if (g.classList.contains("nodata")) return;
749
754
  const { matrixRow: p } = V(this, K, qt).call(this, g);
750
755
  p < 0 || g.querySelectorAll("td, th").forEach((x) => {
751
756
  const w = parseInt(x.dataset.col, 10);
752
757
  if (isNaN(w)) return;
753
- const m = parseInt(x.rowSpan || 1, 10), T = parseInt(x.colSpan || 1, 10), R = p + m - 1, M = w + T - 1;
754
- if (R >= o && p <= i && M >= a && w <= l) {
755
- const z = Math.min(o, p), Gt = Math.max(i, R), bs = Math.min(a, w), ps = Math.max(l, M);
756
- (z !== o || Gt !== i || bs !== a || ps !== l) && (o = z, i = Gt, a = bs, l = ps, u = !0);
758
+ const m = parseInt(x.rowSpan || 1, 10), C = parseInt(x.colSpan || 1, 10), R = p + m - 1, M = w + C - 1;
759
+ if (R >= i && p <= o && M >= a && w <= c) {
760
+ const z = Math.min(i, p), Gt = Math.max(o, R), bs = Math.min(a, w), ps = Math.max(c, M);
761
+ (z !== i || Gt !== o || bs !== a || ps !== c) && (i = z, o = Gt, a = bs, c = ps, u = !0);
757
762
  }
758
763
  });
759
764
  });
760
765
  });
761
- y(this, X, { startRow: o, startCol: a, endRow: i, endCol: l }), S.log("📦 [CellSelection.setRange] Final Range ->", t(this, X)), this.render();
766
+ y(this, X, { startRow: i, startCol: a, endRow: o, endCol: c }), S.log("📦 [CellSelection.setRange] Final Range ->", t(this, X)), this.render();
762
767
  }
763
768
  };
764
- N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(function(n) {
765
- if (!n || n.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
766
- const e = parseInt(n.dataset.row, 10);
769
+ N = new WeakMap(), X = new WeakMap(), K = new WeakSet(), qt = /* @__PURE__ */ h(function(s) {
770
+ if (!s || s.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
771
+ const e = parseInt(s.dataset.row, 10);
767
772
  if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
768
- const s = n.closest("tbody"), o = Array.from(s.querySelectorAll("tr:not(.nodata)")).filter((c) => parseInt(c.dataset.row, 10) === e), i = o.indexOf(n), a = o.length > 0 ? o.length : 1, l = e * a + (i >= 0 ? i : n.sectionRowIndex % a);
769
- return { dataRow: e, subRowIndex: i, matrixRow: l };
773
+ const n = s.closest("tbody"), i = Array.from(n.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), o = i.indexOf(s), a = i.length > 0 ? i.length : 1, c = e * a + (o >= 0 ? o : s.sectionRowIndex % a);
774
+ return { dataRow: e, subRowIndex: o, matrixRow: c };
770
775
  }, "#getMatrixRow"), ws = /* @__PURE__ */ h(function() {
771
- const n = t(this, N).querySelector(".ng-container-top");
772
- if (!n) {
776
+ const s = t(this, N).querySelector(".ng-container-top");
777
+ if (!s) {
773
778
  S.log("❌ [CellSelection] .ng-container-top not found!");
774
779
  return;
775
780
  }
776
- n.addEventListener("mousedown", (e) => {
781
+ s.addEventListener("mousedown", (e) => {
777
782
  if (e.button !== 0) return;
778
- const s = e.target.closest("td, th");
779
- if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
783
+ const n = e.target.closest("td, th");
784
+ if (!n || n.dataset.row === void 0 || n.dataset.col === void 0 || n.closest("tr").classList.contains("nodata")) return;
780
785
  t(this, N).style.userSelect = "none", t(this, N).style.webkitUserSelect = "none";
781
- const r = s.closest("tr"), { matrixRow: o } = V(this, K, qt).call(this, r), i = parseInt(s.dataset.col, 10);
782
- if (o < 0) {
786
+ const r = n.closest("tr"), { matrixRow: i } = V(this, K, qt).call(this, r), o = parseInt(n.dataset.col, 10);
787
+ if (i < 0) {
783
788
  t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "";
784
789
  return;
785
790
  }
786
- S.log(`🖱️ [MouseDown Success] startRow: ${o}, startCol: ${i}`), t(this, N).navigation.currentCell = s;
787
- let a = o, l = i;
788
- const c = /* @__PURE__ */ h((f) => {
791
+ S.log(`🖱️ [MouseDown Success] startRow: ${i}, startCol: ${o}`), t(this, N).navigation.currentCell = n;
792
+ let a = i, c = o;
793
+ const l = /* @__PURE__ */ h((f) => {
789
794
  const b = document.elementFromPoint(f.clientX, f.clientY);
790
795
  let g = b == null ? void 0 : b.closest("td, th");
791
796
  if (!g || !t(this, N).contains(g)) {
792
797
  const m = t(this, N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
793
- for (const T of m) {
794
- const R = T.getBoundingClientRect();
798
+ for (const C of m) {
799
+ const R = C.getBoundingClientRect();
795
800
  if (f.clientX >= R.left && f.clientX <= R.right && f.clientY >= R.top && f.clientY <= R.bottom) {
796
- g = T;
801
+ g = C;
797
802
  break;
798
803
  }
799
804
  }
800
805
  }
801
806
  if (!g || g.dataset.row === void 0 || g.dataset.col === void 0 || g.closest("tr").classList.contains("nodata")) return;
802
807
  const p = g.closest("tr"), { matrixRow: x } = V(this, K, qt).call(this, p), w = parseInt(g.dataset.col, 10);
803
- x < 0 || a === x && l === w || (a = x, l = w, this.setRange(o, i, x, w));
808
+ x < 0 || a === x && c === w || (a = x, c = w, this.setRange(i, o, x, w));
804
809
  }, "onMouseMove"), u = /* @__PURE__ */ h(() => {
805
- S.log("🖱️ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", u);
810
+ S.log("🖱️ [MouseUp] Drag ended."), t(this, N).style.userSelect = "", t(this, N).style.webkitUserSelect = "", document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", u);
806
811
  }, "onMouseUp");
807
- document.addEventListener("mousemove", c), document.addEventListener("mouseup", u);
812
+ document.addEventListener("mousemove", l), document.addEventListener("mouseup", u);
808
813
  });
809
814
  }, "#initEvents"), h(rs, "CellSelection");
810
815
  let Le = rs;
811
816
  var F, lt, ae, le, pt, He, Ot, Dt, Bt, ct, Wt, vs;
812
817
  const os = class os {
813
- constructor(n) {
818
+ constructor(s) {
814
819
  d(this, pt);
815
820
  d(this, F);
816
821
  d(this, lt, null);
817
822
  d(this, ae, -1);
818
823
  d(this, le, -1);
819
- d(this, Ot, /* @__PURE__ */ h((n) => {
824
+ d(this, Ot, /* @__PURE__ */ h((s) => {
820
825
  const e = [];
821
- return n.forEach((s) => e.push(...Array.from(s.querySelectorAll("td")))), e.length === 0 ? null : (e.sort((s, r) => parseInt(s.dataset.col, 10) - parseInt(r.dataset.col, 10)), e[e.length - 1]);
826
+ return s.forEach((n) => e.push(...Array.from(n.querySelectorAll("td")))), e.length === 0 ? null : (e.sort((n, r) => parseInt(n.dataset.col, 10) - parseInt(r.dataset.col, 10)), e[e.length - 1]);
822
827
  }, "#getMaxColCell"));
823
- d(this, Dt, /* @__PURE__ */ h((n, e) => {
824
- const s = t(this, ct).call(this, n);
825
- if (s.length === 0) return e + 1;
828
+ d(this, Dt, /* @__PURE__ */ h((s, e) => {
829
+ const n = t(this, ct).call(this, s);
830
+ if (n.length === 0) return e + 1;
826
831
  let r = e + 1;
827
- const o = [];
828
- s.forEach((i) => o.push(...Array.from(i.querySelectorAll("td")))), o.sort((i, a) => parseInt(i.dataset.col, 10) - parseInt(a.dataset.col, 10));
829
- for (const i of o) {
830
- const a = parseInt(i.dataset.col, 10), l = parseInt(i.colSpan || 1, 10);
831
- if (e >= a && e < a + l) {
832
- r = a + l;
832
+ const i = [];
833
+ n.forEach((o) => i.push(...Array.from(o.querySelectorAll("td")))), i.sort((o, a) => parseInt(o.dataset.col, 10) - parseInt(a.dataset.col, 10));
834
+ for (const o of i) {
835
+ const a = parseInt(o.dataset.col, 10), c = parseInt(o.colSpan || 1, 10);
836
+ if (e >= a && e < a + c) {
837
+ r = a + c;
833
838
  break;
834
839
  }
835
840
  }
836
841
  return r;
837
842
  }, "#getNextCol"));
838
- d(this, Bt, /* @__PURE__ */ h((n, e) => {
839
- const s = t(this, ct).call(this, n);
840
- if (s.length === 0) return Math.max(0, e - 1);
843
+ d(this, Bt, /* @__PURE__ */ h((s, e) => {
844
+ const n = t(this, ct).call(this, s);
845
+ if (n.length === 0) return Math.max(0, e - 1);
841
846
  let r = -1;
842
- const o = [];
843
- s.forEach((i) => o.push(...Array.from(i.querySelectorAll("td")))), o.sort((i, a) => parseInt(i.dataset.col, 10) - parseInt(a.dataset.col, 10));
844
- for (const i of o) {
845
- const a = parseInt(i.dataset.col, 10);
847
+ const i = [];
848
+ n.forEach((o) => i.push(...Array.from(o.querySelectorAll("td")))), i.sort((o, a) => parseInt(o.dataset.col, 10) - parseInt(a.dataset.col, 10));
849
+ for (const o of i) {
850
+ const a = parseInt(o.dataset.col, 10);
846
851
  if (a < e)
847
852
  r = a;
848
853
  else
@@ -851,107 +856,107 @@ const os = class os {
851
856
  return r;
852
857
  }, "#getPreviousCol"));
853
858
  // 🎯 레거시의 병합 셀(rowSpan) 블록 포용 탐색 로직 이식
854
- d(this, ct, /* @__PURE__ */ h((n) => {
859
+ d(this, ct, /* @__PURE__ */ h((s) => {
855
860
  const e = t(this, F).querySelectorAll(
856
861
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
857
- ), s = [];
862
+ ), n = [];
858
863
  return e.forEach((r) => {
859
- const o = Array.from(r.querySelectorAll("tbody tr:not(.nodata)"));
860
- for (const i of o) {
861
- const a = parseInt(i.dataset.row, 10), l = o.filter((p) => parseInt(p.dataset.row, 10) === a), c = l.length > 0 ? l.length : 1, u = l.indexOf(i), f = a * c + (u >= 0 ? u : 0);
862
- if (f === n) {
863
- s.push(i);
864
+ const i = Array.from(r.querySelectorAll("tbody tr:not(.nodata)"));
865
+ for (const o of i) {
866
+ const a = parseInt(o.dataset.row, 10), c = i.filter((p) => parseInt(p.dataset.row, 10) === a), l = c.length > 0 ? c.length : 1, u = c.indexOf(o), f = a * l + (u >= 0 ? u : 0);
867
+ if (f === s) {
868
+ n.push(o);
864
869
  break;
865
870
  }
866
- const b = Array.from(i.querySelectorAll("td"));
871
+ const b = Array.from(o.querySelectorAll("td"));
867
872
  let g = !1;
868
873
  for (const p of b) {
869
874
  const x = parseInt(p.rowSpan || 1, 10);
870
- if (x > 1 && n >= f && n < f + x) {
871
- s.push(i), g = !0;
875
+ if (x > 1 && s >= f && s < f + x) {
876
+ n.push(o), g = !0;
872
877
  break;
873
878
  }
874
879
  }
875
880
  if (g) break;
876
881
  }
877
- }), s;
882
+ }), n;
878
883
  }, "#findTargetTrsByMatrix"));
879
884
  // 🎯 rowSpan 및 colSpan 경계를 모두 충족하는 셀을 3분할 전체 영역에서 탐색
880
- d(this, Wt, /* @__PURE__ */ h((n, e, s, r) => {
881
- const o = t(this, F).querySelectorAll(
885
+ d(this, Wt, /* @__PURE__ */ h((s, e, n, r) => {
886
+ const i = t(this, F).querySelectorAll(
882
887
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
883
- ), i = r !== void 0 ? r : n * 1 + e;
884
- for (const a of o) {
885
- const l = Array.from(a.querySelectorAll("tbody tr:not(.nodata)"));
886
- for (const c of l) {
887
- const u = parseInt(c.dataset.row, 10), f = l.filter((w) => parseInt(w.dataset.row, 10) === u), b = f.length > 0 ? f.length : 1, g = f.indexOf(c), p = u * b + (g >= 0 ? g : 0), x = Array.from(c.querySelectorAll("td"));
888
+ ), o = r !== void 0 ? r : s * 1 + e;
889
+ for (const a of i) {
890
+ const c = Array.from(a.querySelectorAll("tbody tr:not(.nodata)"));
891
+ for (const l of c) {
892
+ const u = parseInt(l.dataset.row, 10), f = c.filter((w) => parseInt(w.dataset.row, 10) === u), b = f.length > 0 ? f.length : 1, g = f.indexOf(l), p = u * b + (g >= 0 ? g : 0), x = Array.from(l.querySelectorAll("td"));
888
893
  for (const w of x) {
889
- const m = parseInt(w.dataset.col, 10), T = parseInt(w.colSpan || 1, 10), R = parseInt(w.rowSpan || 1, 10);
890
- if (!isNaN(m) && s >= m && s < m + T && i >= p && i < p + R && window.getComputedStyle(w).display !== "none")
894
+ const m = parseInt(w.dataset.col, 10), C = parseInt(w.colSpan || 1, 10), R = parseInt(w.rowSpan || 1, 10);
895
+ if (!isNaN(m) && n >= m && n < m + C && o >= p && o < p + R && window.getComputedStyle(w).display !== "none")
891
896
  return w;
892
897
  }
893
898
  }
894
899
  }
895
900
  return null;
896
901
  }, "#getNearElement"));
897
- y(this, F, n), V(this, pt, vs).call(this), S.log("🎯 [CellNavigation] Initialized");
902
+ y(this, F, s), V(this, pt, vs).call(this), S.log("🎯 [CellNavigation] Initialized");
898
903
  }
899
904
  get currentCell() {
900
905
  return t(this, lt);
901
906
  }
902
- set currentCell(n) {
903
- if (!n) return;
904
- y(this, lt, n), n.focus({ preventScroll: !0 });
905
- const e = parseInt(n.dataset.row, 10), s = parseInt(n.dataset.col, 10);
906
- if (!isNaN(e) && !isNaN(s)) {
907
- y(this, ae, e), y(this, le, s);
908
- const r = n.closest("tr"), o = r == null ? void 0 : r.closest("tbody");
909
- if (o) {
910
- const a = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), l = a.length > 0 ? a.length : 1, c = a.indexOf(r), u = e * l + (c >= 0 ? c : 0);
911
- t(this, F).selection.setRange(u, s, u, s);
907
+ set currentCell(s) {
908
+ if (!s) return;
909
+ y(this, lt, s), s.focus({ preventScroll: !0 });
910
+ const e = parseInt(s.dataset.row, 10), n = parseInt(s.dataset.col, 10);
911
+ if (!isNaN(e) && !isNaN(n)) {
912
+ y(this, ae, e), y(this, le, n);
913
+ const r = s.closest("tr"), i = r == null ? void 0 : r.closest("tbody");
914
+ if (i) {
915
+ const a = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((f) => parseInt(f.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), u = e * c + (l >= 0 ? l : 0);
916
+ t(this, F).selection.setRange(u, n, u, n);
912
917
  }
913
918
  }
914
919
  }
915
- moveCell(n) {
916
- var m, T, R, M;
920
+ moveCell(s) {
921
+ var m, C, R, M;
917
922
  if (!t(this, lt)) return;
918
- const e = t(this, lt), s = e.closest("tr"), r = parseInt(e.dataset.row, 10), o = parseInt(e.dataset.col, 10), i = s == null ? void 0 : s.closest("tbody");
919
- if (!i) return;
920
- const l = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), c = l.length > 0 ? l.length : 1, u = l.indexOf(s), f = r * c + (u >= 0 ? u : 0);
921
- let b = f, g = o;
922
- switch (n.code) {
923
+ const e = t(this, lt), n = e.closest("tr"), r = parseInt(e.dataset.row, 10), i = parseInt(e.dataset.col, 10), o = n == null ? void 0 : n.closest("tbody");
924
+ if (!o) return;
925
+ const c = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((B) => parseInt(B.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, u = c.indexOf(n), f = r * l + (u >= 0 ? u : 0);
926
+ let b = f, g = i;
927
+ switch (s.code) {
923
928
  case "Tab":
924
- if (n.preventDefault(), n.shiftKey) {
925
- if (g = t(this, Bt).call(this, f, o), g < 0 && f > 0) {
929
+ if (s.preventDefault(), s.shiftKey) {
930
+ if (g = t(this, Bt).call(this, f, i), g < 0 && f > 0) {
926
931
  b = f - 1;
927
932
  const B = t(this, ct).call(this, b), z = t(this, Ot).call(this, B);
928
933
  g = z ? parseInt(z.dataset.col, 10) : 0;
929
934
  }
930
935
  } else {
931
- g = t(this, Dt).call(this, f, o);
936
+ g = t(this, Dt).call(this, f, i);
932
937
  const B = t(this, ct).call(this, f), z = t(this, Ot).call(this, B), Gt = z ? parseInt(z.dataset.col, 10) + parseInt(z.colSpan || 1, 10) : 0;
933
938
  g >= Gt && (b = f + 1, g = 0);
934
939
  }
935
940
  break;
936
941
  case "ArrowRight":
937
- g = t(this, Dt).call(this, f, o);
942
+ g = t(this, Dt).call(this, f, i);
938
943
  break;
939
944
  case "ArrowLeft":
940
- g = t(this, Bt).call(this, f, o);
945
+ g = t(this, Bt).call(this, f, i);
941
946
  break;
942
947
  case "ArrowDown":
943
- n.preventDefault(), b = f + (e.rowSpan || 1);
948
+ s.preventDefault(), b = f + (e.rowSpan || 1);
944
949
  break;
945
950
  case "ArrowUp":
946
- n.preventDefault(), b = Math.max(0, f - (e.rowSpan || 1));
951
+ s.preventDefault(), b = Math.max(0, f - (e.rowSpan || 1));
947
952
  break;
948
953
  }
949
- const p = Math.floor(b / c), x = b % c;
954
+ const p = Math.floor(b / l), x = b % l;
950
955
  let w = t(this, Wt).call(this, p, x, g, b);
951
956
  if (w)
952
957
  this.currentCell = w, V(this, pt, He).call(this, w);
953
958
  else if (p !== r && p >= 0) {
954
- const B = ((T = (m = t(this, F)).getRowHeight) == null ? void 0 : T.call(m)) || 40;
959
+ const B = ((C = (m = t(this, F)).getRowHeight) == null ? void 0 : C.call(m)) || 40;
955
960
  (M = (R = t(this, F)).scrollToY) == null || M.call(R, p * B), setTimeout(() => {
956
961
  const z = t(this, Wt).call(this, p, x, g, b);
957
962
  z && (this.currentCell = z, V(this, pt, He).call(this, z));
@@ -960,19 +965,19 @@ const os = class os {
960
965
  }
961
966
  };
962
967
  F = new WeakMap(), lt = new WeakMap(), ae = new WeakMap(), le = new WeakMap(), pt = new WeakSet(), // 🎯 셀이 보이지 않는 영역에 있을 때 컨테이너 스크롤을 동기화하는 함수
963
- He = /* @__PURE__ */ h(function(n) {
968
+ He = /* @__PURE__ */ h(function(s) {
964
969
  const e = t(this, F).querySelector(".ng-container-body .ng-part-body");
965
970
  if (!e) return;
966
- const s = n.getBoundingClientRect(), r = e.getBoundingClientRect();
967
- s.top < r.top ? e.scrollTop -= r.top - s.top : s.bottom > r.bottom && (e.scrollTop += s.bottom - r.bottom), s.left < r.left ? e.scrollLeft -= r.left - s.left : s.right > r.right && (e.scrollLeft += s.right - r.right);
971
+ const n = s.getBoundingClientRect(), r = e.getBoundingClientRect();
972
+ n.top < r.top ? e.scrollTop -= r.top - n.top : n.bottom > r.bottom && (e.scrollTop += n.bottom - r.bottom), n.left < r.left ? e.scrollLeft -= r.left - n.left : n.right > r.right && (e.scrollLeft += n.right - r.right);
968
973
  }, "#ensureCellVisible"), Ot = new WeakMap(), Dt = new WeakMap(), Bt = new WeakMap(), ct = new WeakMap(), Wt = new WeakMap(), vs = /* @__PURE__ */ h(function() {
969
- t(this, F).addEventListener("keydown", (n) => {
970
- ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(n.code) && this.moveCell(n);
974
+ t(this, F).addEventListener("keydown", (s) => {
975
+ ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
971
976
  });
972
977
  }, "#initEvents"), h(os, "CellNavigation");
973
978
  let Me = os;
974
- var ce, ht, dt, zt, Pt, he, de, xt, fe, ge;
975
- const Ct = class Ct extends HTMLElement {
979
+ var ce, ht, dt, zt, Pt, he, de, xt, fe, ue;
980
+ const Tt = class Tt extends HTMLElement {
976
981
  constructor() {
977
982
  super();
978
983
  d(this, ce);
@@ -986,10 +991,10 @@ const Ct = class Ct extends HTMLElement {
986
991
  q(this, "generate", /* @__PURE__ */ h((e) => {
987
992
  if (S.log("sheet.generate()"), !e) return;
988
993
  y(this, ht, Ie.compile(e)), t(this, he).call(this), t(this, de).call(this);
989
- 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");
990
- s && o && (o.style.top = `${s.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, dt).initialize(), setTimeout(() => {
991
- var i;
992
- (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
994
+ const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), i = this.querySelector(".ng-nodata-overlay");
995
+ n && i && (i.style.top = `${n.offsetHeight}px`), r && i && (i.style.bottom = `${r.offsetHeight}px`), t(this, dt).initialize(), setTimeout(() => {
996
+ var o;
997
+ (o = this.querySelector("nine-table-hscrollbar")) == null || o.refresh();
993
998
  }, 0);
994
999
  }, "generate"));
995
1000
  d(this, he, /* @__PURE__ */ h(() => {
@@ -997,56 +1002,56 @@ const Ct = class Ct extends HTMLElement {
997
1002
  { selector: ".ng-container-body", type: null },
998
1003
  { selector: ".ng-container-left", type: "left" },
999
1004
  { selector: ".ng-container-right", type: "right" }
1000
- ].forEach(({ selector: s, type: r }) => {
1001
- var o, i, a;
1002
- (o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, xt).call(this, t(this, ht), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, xt).call(this, t(this, ht), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, xt).call(this, t(this, ht), r, "footer"));
1005
+ ].forEach(({ selector: n, type: r }) => {
1006
+ var i, o, a;
1007
+ (i = this.querySelector(`${n} .ng-part-header`)) == null || i.appendChild(t(this, xt).call(this, t(this, ht), r, "header")), (o = this.querySelector(`${n} .ng-virtual-spacer`)) == null || o.before(t(this, xt).call(this, t(this, ht), r, "body")), (a = this.querySelector(`${n} .ng-part-footer`)) == null || a.appendChild(t(this, xt).call(this, t(this, ht), r, "footer"));
1003
1008
  });
1004
1009
  }, "#renderSplitContainers"));
1005
1010
  d(this, de, /* @__PURE__ */ h(() => {
1006
1011
  ["left", "right", "body"].forEach((e) => {
1007
- const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
1008
- if (!s || !r || r.length === 0) return;
1009
- let o = 0;
1010
- r[0].querySelectorAll("col").forEach((i) => {
1011
- const a = parseInt(i.getAttribute("width"), 10);
1012
- isNaN(a) || (o += a);
1013
- }), e === "body" ? (s.style.flex = "1", r.forEach((i) => {
1014
- i.style.width = `${o}px`, i.style.minWidth = `${o}px`;
1015
- })) : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`, r.forEach((i) => {
1016
- i.style.width = `${o}px`, i.style.minWidth = `${o}px`;
1012
+ const n = this.querySelector(`.ng-container-${e}`), r = n == null ? void 0 : n.querySelectorAll("table");
1013
+ if (!n || !r || r.length === 0) return;
1014
+ let i = 0;
1015
+ r[0].querySelectorAll("col").forEach((o) => {
1016
+ const a = parseInt(o.getAttribute("width"), 10);
1017
+ isNaN(a) || (i += a);
1018
+ }), e === "body" ? (n.style.flex = "1", r.forEach((o) => {
1019
+ o.style.width = `${i}px`, o.style.minWidth = `${i}px`;
1020
+ })) : (n.style.flex = `0 0 ${i}px`, n.style.width = `${i}px`, r.forEach((o) => {
1021
+ o.style.width = `${i}px`, o.style.minWidth = `${i}px`;
1017
1022
  }));
1018
1023
  });
1019
1024
  }, "#updateContainerWidths"));
1020
- d(this, xt, /* @__PURE__ */ h((e, s, r) => {
1021
- const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), l = o.querySelector("tfoot");
1025
+ d(this, xt, /* @__PURE__ */ h((e, n, r) => {
1026
+ const i = e.cloneNode(!0), o = i.querySelector("thead"), a = i.querySelector("tbody"), c = i.querySelector("tfoot");
1022
1027
  if (r === "header") {
1023
- if (a && a.remove(), l && l.remove(), e.querySelector("tbody")) {
1028
+ if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
1024
1029
  const u = document.createElement("tbody");
1025
- u.className = "fixed-tbody", o.appendChild(u);
1030
+ u.className = "fixed-tbody", i.appendChild(u);
1026
1031
  }
1027
- } else r === "body" ? (i && i.remove(), l && l.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
1028
- return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((c) => {
1029
- c.getAttribute("fixed") !== "left" && c.remove();
1030
- }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((c) => {
1031
- c.getAttribute("fixed") !== "right" && c.remove();
1032
- }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((c) => {
1033
- c.remove();
1034
- }), o;
1032
+ } else r === "body" ? (o && o.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (o && o.remove(), a && a.remove());
1033
+ return n === "left" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1034
+ l.getAttribute("fixed") !== "left" && l.remove();
1035
+ }) : n === "right" ? i.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
1036
+ l.getAttribute("fixed") !== "right" && l.remove();
1037
+ }) : i.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
1038
+ l.remove();
1039
+ }), i;
1035
1040
  }, "#createSplitTable"));
1036
1041
  q(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, dt).getRowHeight(), "getRowHeight"));
1037
1042
  q(this, "scrollToX", /* @__PURE__ */ h((e) => {
1038
- const s = this.querySelector(".ng-container-body .ng-part-body");
1039
- s && (s.scrollLeft = e);
1043
+ const n = this.querySelector(".ng-container-body .ng-part-body");
1044
+ n && (n.scrollLeft = e);
1040
1045
  }, "scrollToX"));
1041
1046
  q(this, "scrollToY", /* @__PURE__ */ h((e) => {
1042
- const s = this.querySelector(".ng-container-body .ng-part-body");
1043
- s && (s.scrollTop = e);
1047
+ const n = this.querySelector(".ng-container-body .ng-part-body");
1048
+ n && (n.scrollTop = e);
1044
1049
  }, "scrollToY"));
1045
1050
  d(this, fe, /* @__PURE__ */ h(() => {
1046
- t(this, ge).call(this), y(this, zt, new Le(this)), y(this, Pt, new Me(this));
1051
+ t(this, ue).call(this), y(this, zt, new Le(this)), y(this, Pt, new Me(this));
1047
1052
  }, "#init"));
1048
- d(this, ge, /* @__PURE__ */ h(() => {
1049
- const e = Ct.SCROLLBAR_SIZE;
1053
+ d(this, ue, /* @__PURE__ */ h(() => {
1054
+ const e = Tt.SCROLLBAR_SIZE;
1050
1055
  this.innerHTML = `
1051
1056
  <style>
1052
1057
  nine-table-sheet {
@@ -1262,22 +1267,22 @@ const Ct = class Ct extends HTMLElement {
1262
1267
  this.innerHTML = "", S.log("NineTableSheet destroyed.");
1263
1268
  }
1264
1269
  };
1265
- ce = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), he = new WeakMap(), de = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), ge = new WeakMap(), h(Ct, "NineTableSheet"), q(Ct, "SCROLLBAR_SIZE", 16);
1266
- let Zt = Ct;
1270
+ ce = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), Pt = new WeakMap(), he = new WeakMap(), de = new WeakMap(), xt = new WeakMap(), fe = new WeakMap(), ue = new WeakMap(), h(Tt, "NineTableSheet"), q(Tt, "SCROLLBAR_SIZE", 16);
1271
+ let Zt = Tt;
1267
1272
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Zt);
1268
- var ue, Ft;
1273
+ var ge, Ft;
1269
1274
  const is = class is extends HTMLElement {
1270
1275
  constructor() {
1271
1276
  super();
1272
- d(this, ue, /* @__PURE__ */ h(() => {
1277
+ d(this, ge, /* @__PURE__ */ h(() => {
1273
1278
  var e;
1274
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1275
- var i;
1276
- const r = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1277
- t(this, Ft).call(this, o, r);
1279
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
1280
+ var o;
1281
+ const r = n.ctrlKey || n.metaKey || n.shiftKey, i = parseInt((o = n.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
1282
+ t(this, Ft).call(this, i, r);
1278
1283
  }), t(this, Ft).call(this, 0, !1);
1279
1284
  }, "#init"));
1280
- d(this, Ft, /* @__PURE__ */ h((e, s = !1) => {
1285
+ d(this, Ft, /* @__PURE__ */ h((e, n = !1) => {
1281
1286
  const r = /* @__PURE__ */ h(() => {
1282
1287
  const u = Array.from(this.querySelectorAll("nine-table-sheet"));
1283
1288
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
@@ -1286,58 +1291,58 @@ const is = class is extends HTMLElement {
1286
1291
  const p = parseInt(g.getAttribute("data-index"), 10), x = this.querySelector(`nine-splitter[data-split-index="${p}"]`), w = u[p + 1];
1287
1292
  x && w && w.classList.contains("active") && x.style.setProperty("display", "flex");
1288
1293
  });
1289
- }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), l = i.querySelectorAll("nine-table-sheet");
1294
+ }, "updateSplitters"), i = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), a = i.querySelectorAll(".nine-tab-item"), c = o.querySelectorAll("nine-table-sheet");
1290
1295
  if (!a[e]) return;
1291
- if (!s)
1296
+ if (!n)
1292
1297
  a.forEach((u, f) => {
1293
1298
  u.classList.toggle("active", f === e);
1294
- }), l.forEach((u, f) => {
1299
+ }), c.forEach((u, f) => {
1295
1300
  const b = f === e;
1296
1301
  u.classList.toggle("active", b), u.style.flex = b ? "1 1 100%" : "";
1297
1302
  });
1298
1303
  else {
1299
- const u = a[e], f = o.querySelectorAll(".nine-tab-item.active");
1304
+ const u = a[e], f = i.querySelectorAll(".nine-tab-item.active");
1300
1305
  if (u.classList.contains("active") && f.length <= 1)
1301
1306
  return;
1302
1307
  u.classList.toggle("active");
1303
- const b = i.querySelector(`nine-table-sheet[data-index="${e}"]`);
1308
+ const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
1304
1309
  b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
1305
1310
  }
1306
- const c = i.querySelectorAll("nine-table-sheet.active");
1307
- c == null || c.forEach((u) => {
1308
- u.style.flex = c.length > 1 ? "1 1 0%" : "1 1 100%";
1311
+ const l = o.querySelectorAll("nine-table-sheet.active");
1312
+ l == null || l.forEach((u) => {
1313
+ u.style.flex = l.length > 1 ? "1 1 0%" : "1 1 100%";
1309
1314
  }), r();
1310
1315
  }, "#switchSheet"));
1311
1316
  }
1312
1317
  connectedCallback() {
1313
- t(this, ue).call(this);
1318
+ t(this, ge).call(this);
1314
1319
  }
1315
1320
  };
1316
- ue = new WeakMap(), Ft = new WeakMap(), h(is, "NineTableSheets");
1321
+ ge = new WeakMap(), Ft = new WeakMap(), h(is, "NineTableSheets");
1317
1322
  let $e = is;
1318
1323
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", $e);
1319
1324
  var _, be, jt, pe;
1320
1325
  const as = class as {
1321
- constructor(n) {
1326
+ constructor(s) {
1322
1327
  d(this, _);
1323
1328
  d(this, be, /* @__PURE__ */ h(() => {
1324
- t(this, pe).call(this), new ResizeObserver((n) => {
1325
- for (let e of n)
1329
+ t(this, pe).call(this), new ResizeObserver((s) => {
1330
+ for (let e of s)
1326
1331
  t(this, _).getAttribute("auto-height") === "true" && t(this, jt).call(this);
1327
1332
  }).observe(t(this, _));
1328
1333
  }, "#init"));
1329
1334
  d(this, jt, /* @__PURE__ */ h(() => {
1330
- var l, c;
1331
- const n = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1332
- if (n.length === 0) return;
1333
- const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((u) => u.getRowHeight())), r = (l = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : l.getBoundingClientRect().height, o = (c = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : c.getBoundingClientRect().height, i = Zt.SCROLLBAR_SIZE, a = e * s + r + o + i;
1335
+ var c, l;
1336
+ const s = Array.from(t(this, _).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1337
+ if (s.length === 0) return;
1338
+ const e = parseInt(t(this, _).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((u) => u.getRowHeight())), r = (c = t(this, _).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, i = (l = t(this, _).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, o = Zt.SCROLLBAR_SIZE, a = e * n + r + i + o;
1334
1339
  t(this, _).style.height = `${a}px`;
1335
1340
  }, "#applyAutoHeight"));
1336
1341
  d(this, pe, /* @__PURE__ */ h(() => {
1337
- const e = Array.from(t(this, _).children).filter((l) => l.tagName === "TABLE"), s = t(this, _).getAttribute("auto-height") === "true", r = e.length, o = e.map((l, c) => {
1338
- const f = `<nine-table-sheet class="${c === 0 ? "active" : ""}" data-index="${c}"></nine-table-sheet>`, b = c < r - 1 ? `<nine-splitter class="h" data-split-index="${c}"></nine-splitter>` : "";
1342
+ const e = Array.from(t(this, _).children).filter((c) => c.tagName === "TABLE"), n = t(this, _).getAttribute("auto-height") === "true", r = e.length, i = e.map((c, l) => {
1343
+ const f = `<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>` : "";
1339
1344
  return f + b;
1340
- }).join(""), i = e.map((l, c) => `<div class="nine-tab-item ${c === 0 ? "active" : ""}" data-index="${c}">Sheet ${c + 1}</div>`).join("");
1345
+ }).join(""), o = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1341
1346
  t(this, _).shadowRoot.innerHTML = `
1342
1347
  <style>
1343
1348
  :host {
@@ -1345,7 +1350,7 @@ const as = class as {
1345
1350
  flex-direction: column;
1346
1351
  position: relative;
1347
1352
  overflow: hidden;
1348
- height: ${s ? "auto" : "100%"};
1353
+ height: ${n ? "auto" : "100%"};
1349
1354
  background: #fff;
1350
1355
  }
1351
1356
 
@@ -1449,9 +1454,9 @@ const as = class as {
1449
1454
  <nine-table-body>
1450
1455
  <nine-table-summary></nine-table-summary>
1451
1456
  <nine-table-sheets>
1452
- <nine-table-sheets-body>${o}</nine-table-sheets-body>
1457
+ <nine-table-sheets-body>${i}</nine-table-sheets-body>
1453
1458
  <nine-table-sheets-footer>
1454
- <div class="nine-tab-bar">${i}</div>
1459
+ <div class="nine-tab-bar">${o}</div>
1455
1460
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1456
1461
  </nine-table-sheets-footer>
1457
1462
  </nine-table-sheets>
@@ -1460,30 +1465,30 @@ const as = class as {
1460
1465
  <nine-table-footer></nine-table-footer>
1461
1466
  `, t(this, _).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1462
1467
  const a = t(this, _).shadowRoot.querySelectorAll("nine-table-sheet");
1463
- a == null || a.forEach((l, c) => {
1464
- e[c] && setTimeout(() => {
1465
- l.generate(e[c]), s && t(this, jt).call(this);
1468
+ a == null || a.forEach((c, l) => {
1469
+ e[l] && setTimeout(() => {
1470
+ c.generate(e[l]), n && t(this, jt).call(this);
1466
1471
  });
1467
1472
  });
1468
1473
  }, "#render"));
1469
- y(this, _, n), t(this, be).call(this);
1474
+ y(this, _, s), t(this, be).call(this);
1470
1475
  }
1471
1476
  };
1472
1477
  _ = new WeakMap(), be = new WeakMap(), jt = new WeakMap(), pe = new WeakMap(), h(as, "LayoutManager");
1473
1478
  let Ne = as;
1474
1479
  var Yt, wt;
1475
1480
  const ls = class ls {
1476
- constructor(n) {
1481
+ constructor(s) {
1477
1482
  d(this, Yt);
1478
1483
  d(this, wt, -1);
1479
1484
  q(this, "count", /* @__PURE__ */ h(() => t(this, Yt).rawRecords.length, "count"));
1480
- y(this, Yt, n);
1485
+ y(this, Yt, s);
1481
1486
  }
1482
1487
  get at() {
1483
1488
  return t(this, wt);
1484
1489
  }
1485
- set at(n) {
1486
- y(this, wt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, wt)}"]`) && setTimeout(() => {
1490
+ set at(s) {
1491
+ y(this, wt, parseInt(s, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, wt)}"]`) && setTimeout(() => {
1487
1492
  });
1488
1493
  }
1489
1494
  };
@@ -1491,7 +1496,7 @@ Yt = new WeakMap(), wt = new WeakMap(), h(ls, "ngRow");
1491
1496
  let _e = ls;
1492
1497
  var D, I, W, vt, ye, J, me, ft, Vt, xe, we, St;
1493
1498
  const P = class P {
1494
- constructor(n, e) {
1499
+ constructor(s, e) {
1495
1500
  d(this, D);
1496
1501
  d(this, I);
1497
1502
  d(this, W, []);
@@ -1500,35 +1505,35 @@ const P = class P {
1500
1505
  d(this, J, []);
1501
1506
  d(this, me, /* @__PURE__ */ h(() => {
1502
1507
  y(this, J, []);
1503
- const n = t(this, D).template || [];
1504
- Array.from(n).forEach((e) => {
1505
- var s;
1506
- t(this, J).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1508
+ const s = t(this, D).template || [];
1509
+ Array.from(s).forEach((e) => {
1510
+ var n;
1511
+ t(this, J).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1507
1512
  }), (t(this, I).rawRecords || []).forEach((e) => {
1508
1513
  e.__ng || (e.__ng = t(this, Vt).call(this)), e.__ng.height = t(this, J).slice();
1509
1514
  });
1510
1515
  }, "#initialize"));
1511
1516
  d(this, ft, /* @__PURE__ */ h(() => {
1512
- const n = t(this, D).shadowRoot.querySelector("nine-table-sheets");
1513
- n == null || n.classList.toggle("nodata", this.length === 0), t(this, D).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1517
+ const s = t(this, D).shadowRoot.querySelector("nine-table-sheets");
1518
+ s == null || s.classList.toggle("nodata", this.length === 0), t(this, D).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1514
1519
  e.invalidate();
1515
1520
  });
1516
1521
  }, "#invalidate"));
1517
- q(this, "get", /* @__PURE__ */ h((n, e) => {
1518
- var o;
1519
- const s = this.getValidData();
1520
- if (!s || s.length <= 0) return;
1521
- if (n == null) return t(this, St).call(this, s);
1522
- if (n < 0 || n >= s.length) return null;
1523
- const r = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : [];
1522
+ q(this, "get", /* @__PURE__ */ h((s, e) => {
1523
+ var i;
1524
+ const n = this.getValidData();
1525
+ if (!n || n.length <= 0) return;
1526
+ if (s == null) return t(this, St).call(this, n);
1527
+ if (s < 0 || s >= n.length) return null;
1528
+ const r = typeof ((i = t(this, D).fields) == null ? void 0 : i.get) == "function" ? t(this, D).fields.get() : [];
1524
1529
  if (e != null) {
1525
- const i = r.indexOf(e);
1526
- return i >= 0 ? s[n].v[i] : null;
1530
+ const o = r.indexOf(e);
1531
+ return o >= 0 ? n[s].v[o] : null;
1527
1532
  }
1528
- return t(this, St).call(this, s[n]);
1533
+ return t(this, St).call(this, n[s]);
1529
1534
  }, "get"));
1530
- q(this, "set", /* @__PURE__ */ h((n) => {
1531
- this.clear(), this.add(n, !1), t(this, ft).call(this);
1535
+ q(this, "set", /* @__PURE__ */ h((s) => {
1536
+ this.clear(), this.add(s, !1), t(this, ft).call(this);
1532
1537
  }, "set"));
1533
1538
  d(this, Vt, /* @__PURE__ */ h(() => ({
1534
1539
  rowState: P.ROW_STATE.EMPTY,
@@ -1543,81 +1548,81 @@ const P = class P {
1543
1548
  y(this, W, []), y(this, vt, []), t(this, ft).call(this);
1544
1549
  }, "reset"));
1545
1550
  q(this, "clear", /* @__PURE__ */ h(() => {
1546
- var n;
1547
- t(this, I).rawRecords = [], y(this, W, []), y(this, vt, []), (n = t(this, I).viewRecords) != null && n.reset && t(this, I).viewRecords.reset();
1551
+ var s;
1552
+ t(this, I).rawRecords = [], y(this, W, []), y(this, vt, []), (s = t(this, I).viewRecords) != null && s.reset && t(this, I).viewRecords.reset();
1548
1553
  }, "clear"));
1549
- d(this, xe, /* @__PURE__ */ h((n) => {
1554
+ d(this, xe, /* @__PURE__ */ h((s) => {
1550
1555
  var r;
1551
- Array.isArray(n) || (n = [n]);
1552
- const e = typeof ((r = t(this, D).fields) == null ? void 0 : r.get) == "function" ? t(this, D).fields.get() : Object.keys(n[0] || {}), s = [];
1553
- return n.forEach((o) => {
1554
- const i = { v: [] };
1556
+ Array.isArray(s) || (s = [s]);
1557
+ const e = typeof ((r = t(this, D).fields) == null ? void 0 : r.get) == "function" ? t(this, D).fields.get() : Object.keys(s[0] || {}), n = [];
1558
+ return s.forEach((i) => {
1559
+ const o = { v: [] };
1555
1560
  e.forEach((a) => {
1556
- i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
1557
- }), s.push(i);
1558
- }), s;
1561
+ o.v.push(i[a] !== void 0 && i[a] !== null ? i[a] : "");
1562
+ }), n.push(o);
1563
+ }), n;
1559
1564
  }, "#json2Array"));
1560
- d(this, we, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1565
+ d(this, we, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1561
1566
  e.__ng = t(this, Vt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = P.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1562
- }), n), "#defaultInsert"));
1563
- q(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1564
- n === void 0 && (n = {});
1565
- const s = t(this, xe).call(this, n);
1566
- t(this, I).rawRecords = t(this, I).rawRecords.concat(t(this, we).call(this, s)), this.resetRecords();
1567
+ }), s), "#defaultInsert"));
1568
+ q(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1569
+ s === void 0 && (s = {});
1570
+ const n = t(this, xe).call(this, s);
1571
+ t(this, I).rawRecords = t(this, I).rawRecords.concat(t(this, we).call(this, n)), this.resetRecords();
1567
1572
  const r = this.count() - 1;
1568
- return e || s.forEach((o, i) => {
1569
- const a = t(this, I).rawRecords[r - i];
1573
+ return e || n.forEach((i, o) => {
1574
+ const a = t(this, I).rawRecords[r - o];
1570
1575
  a && (a.__ng.rowState = P.ROW_STATE.EMPTY);
1571
1576
  }), t(this, ft).call(this), r;
1572
1577
  }, "add"));
1573
- q(this, "delete", /* @__PURE__ */ h((n) => {
1578
+ q(this, "delete", /* @__PURE__ */ h((s) => {
1574
1579
  let e = [];
1575
- Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, I).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
1576
- if (t(this, W)[s]) {
1577
- const r = t(this, W)[s].__ng.rowid;
1578
- t(this, W)[s].__ng.rowState === P.ROW_STATE.INSERT ? t(this, I).rawRecords = t(this, I).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, I).rawRecords.forEach((o) => {
1579
- o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = P.ROW_STATE.DELETE);
1580
+ Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, I).host.row.at] : e = [parseInt(s, 10)], e.sort((n, r) => r - n).forEach((n) => {
1581
+ if (t(this, W)[n]) {
1582
+ const r = t(this, W)[n].__ng.rowid;
1583
+ t(this, W)[n].__ng.rowState === P.ROW_STATE.INSERT ? t(this, I).rawRecords = t(this, I).rawRecords.filter((i) => i.__ng.rowid !== r) : t(this, I).rawRecords.forEach((i) => {
1584
+ i.__ng.rowid === r && (i.__ng.deleted = !0, i.__ng.rowState = P.ROW_STATE.DELETE);
1580
1585
  });
1581
1586
  }
1582
1587
  }), this.resetRecords(), t(this, ft).call(this);
1583
1588
  }, "delete"));
1584
- q(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1585
- var l;
1586
- n = parseInt(n, 10);
1587
- const o = (typeof ((l = t(this, D).fields) == null ? void 0 : l.get) == "function" ? t(this, D).fields.get() : []).indexOf(e);
1588
- if (o < 0) return;
1589
- const i = this.getValidData()[n];
1590
- if (!i) return;
1591
- const a = i.v[o];
1592
- a !== s && i.__ng.rowState !== P.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = P.ROW_STATE.UPDATE), i.v[o] = s;
1589
+ q(this, "setValue", /* @__PURE__ */ h((s, e, n) => {
1590
+ var c;
1591
+ s = parseInt(s, 10);
1592
+ const i = (typeof ((c = t(this, D).fields) == null ? void 0 : c.get) == "function" ? t(this, D).fields.get() : []).indexOf(e);
1593
+ if (i < 0) return;
1594
+ const o = this.getValidData()[s];
1595
+ if (!o) return;
1596
+ const a = o.v[i];
1597
+ a !== n && o.__ng.rowState !== P.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = a), o.__ng.rowState = P.ROW_STATE.UPDATE), o.v[i] = n;
1593
1598
  }, "setValue"));
1594
1599
  q(this, "resetRecords", /* @__PURE__ */ h(() => {
1595
- y(this, vt, t(this, I).rawRecords.filter((n) => !n.__ng.deleted)), y(this, W, t(this, I).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, I).rawRecords.forEach((n, e) => {
1596
- n.__ng.rowidx = e;
1597
- }), t(this, W).forEach((n, e) => {
1598
- n.__ng.i = e;
1600
+ y(this, vt, t(this, I).rawRecords.filter((s) => !s.__ng.deleted)), y(this, W, t(this, I).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, I).rawRecords.forEach((s, e) => {
1601
+ s.__ng.rowidx = e;
1602
+ }), t(this, W).forEach((s, e) => {
1603
+ s.__ng.i = e;
1599
1604
  });
1600
1605
  }, "resetRecords"));
1601
1606
  q(this, "getValidData", /* @__PURE__ */ h(() => (t(this, W).length === 0 && t(this, I).rawRecords.length > 0 && this.resetRecords(), t(this, W)), "getValidData"));
1602
- d(this, St, /* @__PURE__ */ h((n) => {
1603
- var i;
1604
- if (!n) return n;
1605
- const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, D).fields) == null ? void 0 : i.get) == "function" ? t(this, D).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
1606
- const l = {};
1607
- return r.forEach((c, u) => {
1608
- l[c] = a.v ? a.v[u] : a[c];
1609
- }), l.__ng = a.__ng, l;
1607
+ d(this, St, /* @__PURE__ */ h((s) => {
1608
+ var o;
1609
+ if (!s) return s;
1610
+ const e = !Array.isArray(s), n = e ? [s] : s, r = typeof ((o = t(this, D).fields) == null ? void 0 : o.get) == "function" ? t(this, D).fields.get() : [], i = n.filter((a) => !a.__ng.deleted).map((a) => {
1611
+ const c = {};
1612
+ return r.forEach((l, u) => {
1613
+ c[l] = a.v ? a.v[u] : a[l];
1614
+ }), c.__ng = a.__ng, c;
1610
1615
  });
1611
- return e ? o[0] : o;
1616
+ return e ? i[0] : i;
1612
1617
  }, "#conv"));
1613
1618
  q(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1614
- y(this, D, n), y(this, I, e), t(this, me).call(this);
1619
+ y(this, D, s), y(this, I, e), t(this, me).call(this);
1615
1620
  }
1616
1621
  get source() {
1617
1622
  return t(this, St).call(this, t(this, I).rawRecords);
1618
1623
  }
1619
- set source(n) {
1620
- this.clear(), this.add(n, !1);
1624
+ set source(s) {
1625
+ this.clear(), this.add(s, !1);
1621
1626
  }
1622
1627
  get nextId() {
1623
1628
  return ++xs(this, ye)._;
@@ -1641,71 +1646,71 @@ q(P, "ROW_STATE", {
1641
1646
  DELETE: "DELETE"
1642
1647
  });
1643
1648
  let Oe = P;
1644
- var gt;
1649
+ var ut;
1645
1650
  const cs = class cs {
1646
- constructor(n) {
1647
- d(this, gt);
1648
- y(this, gt, n), this.row = new _e(this), this.data = new Oe(t(this, gt), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1651
+ constructor(s) {
1652
+ d(this, ut);
1653
+ y(this, ut, s), this.row = new _e(this), this.data = new Oe(t(this, ut), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1649
1654
  var e;
1650
- (e = t(this, gt).view) != null && e.redraw && t(this, gt).view.redraw();
1655
+ (e = t(this, ut).view) != null && e.redraw && t(this, ut).view.redraw();
1651
1656
  }, this.setDataSource = (e) => {
1652
1657
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1653
1658
  }, this.getRowState = (e) => {
1654
- var r, o;
1655
- const s = parseInt(e, 10);
1656
- if (!(s >= this.data.count()))
1657
- return (o = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1659
+ var r, i;
1660
+ const n = parseInt(e, 10);
1661
+ if (!(n >= this.data.count()))
1662
+ return (i = (r = this.data.getValidData()[n]) == null ? void 0 : r.__ng) == null ? void 0 : i.rowState;
1658
1663
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1659
1664
  this.row.at = e;
1660
- }, 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) => {
1661
- e = parseInt(e, 10), this.data.setValue(e, s, r);
1665
+ }, 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) => {
1666
+ e = parseInt(e, 10), this.data.setValue(e, n, r);
1662
1667
  }, this.setDataSource([]);
1663
1668
  }
1664
1669
  };
1665
- gt = new WeakMap(), h(cs, "ngDataManager");
1670
+ ut = new WeakMap(), h(cs, "ngDataManager");
1666
1671
  let De = cs;
1667
1672
  var Rt, H, Ut, ve;
1668
1673
  const hs = class hs {
1669
1674
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1670
- constructor(n) {
1675
+ constructor(s) {
1671
1676
  d(this, Rt);
1672
1677
  d(this, H, []);
1673
- q(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1674
- n.forEach((s) => {
1675
- t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
1678
+ q(this, "add", /* @__PURE__ */ h((s, e = "string") => {
1679
+ s.forEach((n) => {
1680
+ t(this, H).some((r) => r.name === n) || t(this, H).push({ name: n, type: e });
1676
1681
  }), t(this, Ut).call(this);
1677
1682
  }, "add"));
1678
1683
  d(this, Ut, /* @__PURE__ */ h(() => {
1679
- const n = /* @__PURE__ */ new Map();
1684
+ const s = /* @__PURE__ */ new Map();
1680
1685
  t(this, H).forEach((e) => {
1681
- n.set(e.name, e.type);
1682
- }), y(this, H, Array.from(n, ([e, s]) => ({ name: e, type: s }))), y(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);
1686
+ s.set(e.name, e.type);
1687
+ }), y(this, H, Array.from(s, ([e, n]) => ({ name: e, type: n }))), y(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);
1683
1688
  }, "#adjust"));
1684
1689
  d(this, ve, /* @__PURE__ */ h(() => {
1685
1690
  y(this, H, []), S.log(t(this, Rt).querySelectorAll("table"));
1686
- const n = Array.from(t(this, Rt).querySelectorAll("table"));
1687
- if (!(!n || n.length === 0)) {
1688
- for (const e of n)
1689
- S.log(e), $("[data-bind]", e).each((s, r) => {
1690
- const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
1691
- o && t(this, H).push({ name: o, type: i });
1692
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1693
- $(`[${s}]`, e).each((r, o) => {
1694
- var i = o.getAttribute(s);
1695
- if (i.indexOf("data.") < 0) {
1696
- const a = i.search(/[(]/g);
1691
+ const s = Array.from(t(this, Rt).querySelectorAll("table"));
1692
+ if (!(!s || s.length === 0)) {
1693
+ for (const e of s)
1694
+ S.log(e), $("[data-bind]", e).each((n, r) => {
1695
+ const i = r.dataset.bind, o = r.getAttribute("data-type") || "string";
1696
+ i && t(this, H).push({ name: i, type: o });
1697
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1698
+ $(`[${n}]`, e).each((r, i) => {
1699
+ var o = i.getAttribute(n);
1700
+ if (o.indexOf("data.") < 0) {
1701
+ const a = o.search(/[(]/g);
1697
1702
  if (a > 0)
1698
1703
  try {
1699
- i = String(window[i.substring(0, a).trim()]);
1704
+ o = String(window[o.substring(0, a).trim()]);
1700
1705
  } catch {
1701
- i = "";
1706
+ o = "";
1702
1707
  }
1703
1708
  }
1704
- i.split("data.").forEach((a) => {
1709
+ o.split("data.").forEach((a) => {
1705
1710
  if (a.trim() != "") {
1706
- const l = a.search(/[^_A-Za-z0-9]/g);
1707
- let c = "";
1708
- l >= 0 ? c = a.substring(0, l) : i.startsWith("data.") && (c = a.replace("data.", "")), c && t(this, H).push({ name: c, type: "string" });
1711
+ const c = a.search(/[^_A-Za-z0-9]/g);
1712
+ let l = "";
1713
+ c >= 0 ? l = a.substring(0, c) : o.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1709
1714
  }
1710
1715
  });
1711
1716
  });
@@ -1713,41 +1718,41 @@ const hs = class hs {
1713
1718
  t(this, Ut).call(this);
1714
1719
  }
1715
1720
  }, "#init"));
1716
- y(this, Rt, n), t(this, ve).call(this);
1721
+ y(this, Rt, s), t(this, ve).call(this);
1717
1722
  }
1718
1723
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1719
1724
  get() {
1720
- return t(this, H).map((n) => n.name);
1725
+ return t(this, H).map((s) => s.name);
1721
1726
  }
1722
1727
  // 🎯 내부 객체 통째로 얻기
1723
1728
  getFields() {
1724
1729
  return t(this, H);
1725
1730
  }
1726
1731
  // 🎯 특정 필드의 데이터 타입 조회
1727
- getType(n) {
1728
- const e = t(this, H).find((s) => s.name === n);
1732
+ getType(s) {
1733
+ const e = t(this, H).find((n) => n.name === s);
1729
1734
  return e ? e.type : "string";
1730
1735
  }
1731
- indexOf(n) {
1732
- return t(this, H).findIndex((e) => e.name === n);
1736
+ indexOf(s) {
1737
+ return t(this, H).findIndex((e) => e.name === s);
1733
1738
  }
1734
- includes(n) {
1735
- return t(this, H).some((e) => e.name === n);
1739
+ includes(s) {
1740
+ return t(this, H).some((e) => e.name === s);
1736
1741
  }
1737
1742
  };
1738
1743
  Rt = new WeakMap(), H = new WeakMap(), Ut = new WeakMap(), ve = new WeakMap(), h(hs, "ngFields");
1739
1744
  let Be = hs;
1740
- var ut, Se, Re;
1745
+ var gt, Se, Re;
1741
1746
  const ds = class ds extends HTMLElement {
1742
1747
  constructor() {
1743
1748
  super();
1744
1749
  //#created = false;
1745
- d(this, ut);
1750
+ d(this, gt);
1746
1751
  d(this, Se);
1747
1752
  d(this, Re, /* @__PURE__ */ h(() => {
1748
1753
  this.fields = new Be(this), y(this, Se, new Ne(this)), S.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1749
1754
  }, "#init"));
1750
- this.attachShadow({ mode: "open" }), y(this, ut, new De(this));
1755
+ this.attachShadow({ mode: "open" }), y(this, gt, new De(this));
1751
1756
  }
1752
1757
  connectedCallback() {
1753
1758
  t(this, Re).call(this);
@@ -1757,21 +1762,21 @@ const ds = class ds extends HTMLElement {
1757
1762
  }
1758
1763
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1759
1764
  get data() {
1760
- return t(this, ut).data;
1765
+ return t(this, gt).data;
1761
1766
  }
1762
1767
  // 🎯 행(row) 관련 제어 접근자 오픈
1763
1768
  get row() {
1764
- return t(this, ut).row;
1769
+ return t(this, gt).row;
1765
1770
  }
1766
1771
  // 🎯 전체 데이터 매니저 접근 필요할 경우
1767
1772
  get dataManager() {
1768
- return t(this, ut);
1773
+ return t(this, gt);
1769
1774
  }
1770
1775
  };
1771
- ut = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), h(ds, "NineTable");
1776
+ gt = new WeakMap(), Se = new WeakMap(), Re = new WeakMap(), h(ds, "NineTable");
1772
1777
  let We = ds;
1773
1778
  customElements.get("nine-table") || customElements.define("nine-table", We);
1774
- const Tt = class Tt extends HTMLElement {
1779
+ const Ct = class Ct extends HTMLElement {
1775
1780
  // 👈 커스텀 스타일용 캐시 추가
1776
1781
  constructor() {
1777
1782
  super();
@@ -1782,8 +1787,8 @@ const Tt = class Tt extends HTMLElement {
1782
1787
  connectedCallback() {
1783
1788
  }
1784
1789
  };
1785
- h(Tt, "BasicCellElement"), q(Tt, "_styleCache", /* @__PURE__ */ new Map()), q(Tt, "_customStyleCache", /* @__PURE__ */ new Map());
1786
- let ze = Tt;
1790
+ h(Ct, "BasicCellElement"), q(Ct, "_styleCache", /* @__PURE__ */ new Map()), q(Ct, "_customStyleCache", /* @__PURE__ */ new Map());
1791
+ let ze = Ct;
1787
1792
  var L, Xt, v, Xe, Ke, Ge, Ze, Je;
1788
1793
  const fs = class fs extends ze {
1789
1794
  constructor() {
@@ -1798,15 +1803,15 @@ const fs = class fs extends ze {
1798
1803
  q(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1799
1804
  if (t(this, v))
1800
1805
  if (t(this, v).closest("tbody")) {
1801
- const s = t(this, v).closest("tr").data, r = parseInt(t(this, v).dataset.row);
1802
- if (!s) return "";
1806
+ const n = t(this, v).closest("tr").data, r = parseInt(t(this, v).dataset.row);
1807
+ if (!n) return "";
1803
1808
  if (ninegrid.isNull(t(this, v).dataset.expr)) {
1804
1809
  if (!ninegrid.isNull(t(this, v).dataset.bind))
1805
- return s[t(this, v).dataset.bind] || ninegrid.nvl(e, "");
1810
+ return n[t(this, v).dataset.bind] || ninegrid.nvl(e, "");
1806
1811
  } else try {
1807
- return this.getExprValue(t(this, v).dataset.expr, s, r, t(this, v));
1812
+ return this.getExprValue(t(this, v).dataset.expr, n, r, t(this, v));
1808
1813
  } catch {
1809
- console.error(t(this, v).dataset.expr, s, t(this, v).dataset.row);
1814
+ console.error(t(this, v).dataset.expr, n, t(this, v).dataset.row);
1810
1815
  }
1811
1816
  return ninegrid.nvl(e, "");
1812
1817
  } else
@@ -1819,37 +1824,37 @@ const fs = class fs extends ze {
1819
1824
  if (!(!t(this, L) || !t(this, L).template || !t(this, v).closest("tbody.bindable"))) {
1820
1825
  var e = ninegrid.j.querySelectorAll(t(this, v)).attr("suppress");
1821
1826
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1822
- var s = t(this, v).closest("tr"), r = [];
1823
- $("th,td", s).each((m, T) => {
1824
- var R = ninegrid.j.querySelectorAll(T).attr("suppress");
1825
- R && T.dataset.row && (R = parseInt(R), !isNaN(R) && R <= e && r.push(R));
1827
+ var n = t(this, v).closest("tr"), r = [];
1828
+ $("th,td", n).each((m, C) => {
1829
+ var R = ninegrid.j.querySelectorAll(C).attr("suppress");
1830
+ R && C.dataset.row && (R = parseInt(R), !isNaN(R) && R <= e && r.push(R));
1826
1831
  }), r.sort();
1827
- var o = !1;
1828
- if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1829
- for (var i of r) {
1830
- if (i > e) break;
1831
- var a = parseInt(t(this, v).dataset.row), l = a - 1, c = t(this, v).closest("tr").data, u = t(this, L).data.get(l);
1832
+ var i = !1;
1833
+ if (parseInt(n.sectionRowIndex / t(this, L).template.length) > 0)
1834
+ for (var o of r) {
1835
+ if (o > e) break;
1836
+ var a = parseInt(t(this, v).dataset.row), c = a - 1, l = t(this, v).closest("tr").data, u = t(this, L).data.get(c);
1832
1837
  t(this, v).dataset.matrixRow;
1833
- var f = t(this, L).body.querySelector(`tbody.bindable [suppress="${i}"][data-matrix-row="${t(this, v).dataset.matrixRow}"]`), b = f.dataset.expr ? this.getExprValue(f.dataset.expr, c, a) : c[f.dataset.bind], g = f.dataset.expr ? this.getExprValue(f.dataset.expr, u, l) : u[f.dataset.bind];
1838
+ var f = t(this, L).body.querySelector(`tbody.bindable [suppress="${o}"][data-matrix-row="${t(this, v).dataset.matrixRow}"]`), b = f.dataset.expr ? this.getExprValue(f.dataset.expr, l, a) : l[f.dataset.bind], g = f.dataset.expr ? this.getExprValue(f.dataset.expr, u, c) : u[f.dataset.bind];
1834
1839
  if (b != g) {
1835
- o = !0;
1840
+ i = !0;
1836
1841
  break;
1837
1842
  }
1838
1843
  }
1839
1844
  else
1840
- o = !0;
1841
- o ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, v)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, v)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, v)).addClass("hidden"));
1845
+ i = !0;
1846
+ i ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, v)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, v)).hasClass("hidden") || (i ? ninegrid.j.querySelectorAll(t(this, v)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, v)).addClass("hidden"));
1842
1847
  var p = parseInt(t(this, v).dataset.matrixRow), x = p - 1, w = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, v).dataset.col}"][data-matrix-row="${x}"]`);
1843
1848
  $(w).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, v)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").addClass("last-suppress") : !$(w).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, v)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").removeClass("last-suppress");
1844
1849
  }
1845
1850
  }
1846
1851
  }, "#resetSuppress"));
1847
- q(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
1852
+ q(this, "getExprValue", /* @__PURE__ */ h((e, n, r, i) => {
1848
1853
  if (typeof e < "u")
1849
1854
  try {
1850
1855
  r = parseInt(r);
1851
- const i = e.replace("()", "");
1852
- return t(this, L)[i] ? t(this, L)[i].call(this, s, r, t(this, v)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1856
+ const o = e.replace("()", "");
1857
+ return t(this, L)[o] ? t(this, L)[o].call(this, n, r, t(this, v)) : t(this, L).exprFunction(e).call(this, n, r, t(this, L).data);
1853
1858
  } catch {
1854
1859
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1855
1860
  }
@@ -1865,9 +1870,9 @@ const fs = class fs extends ze {
1865
1870
  return e ?? "";
1866
1871
  }
1867
1872
  set value(e) {
1868
- var s = parseInt(t(this, v).dataset.row);
1873
+ var n = parseInt(t(this, v).dataset.row);
1869
1874
  const r = this.getAttribute("update-row-state") != "false";
1870
- s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, v).dataset.index), t(this, v).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, v).dataset.bind, e, r);
1875
+ n < 0 ? t(this, L).data.setValueNF(parseInt(t(this, v).dataset.index), t(this, v).dataset.bind, e, r) : t(this, L).data.setValue(n, t(this, v).dataset.bind, e, r);
1871
1876
  }
1872
1877
  get row() {
1873
1878
  return parseInt(t(this, v).dataset.row);
@@ -1882,7 +1887,7 @@ const fs = class fs extends ze {
1882
1887
  };
1883
1888
  L = new WeakMap(), Xt = new WeakMap(), v = new WeakMap(), Xe = new WeakMap(), Ke = new WeakMap(), Ge = new WeakMap(), Ze = new WeakMap(), Je = new WeakMap(), h(fs, "CellElement");
1884
1889
  let Pe = fs;
1885
- const gs = class gs extends Pe {
1890
+ const us = class us extends Pe {
1886
1891
  constructor() {
1887
1892
  super();
1888
1893
  }
@@ -1893,10 +1898,10 @@ const gs = class gs extends Pe {
1893
1898
  return super.refresh();
1894
1899
  }
1895
1900
  };
1896
- h(gs, "EditableCellElement");
1897
- let Fe = gs;
1901
+ h(us, "EditableCellElement");
1902
+ let Fe = us;
1898
1903
  var Kt, bt, At, Et, Ae, Q, Qe;
1899
- const us = class us extends Fe {
1904
+ const gs = class gs extends Fe {
1900
1905
  constructor() {
1901
1906
  super();
1902
1907
  d(this, Kt);
@@ -1942,12 +1947,12 @@ const us = class us extends Fe {
1942
1947
  d(this, Qe, /* @__PURE__ */ h((e) => {
1943
1948
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1944
1949
  if (t(this, bt) == "number") {
1945
- let o = [];
1946
- if (t(this, Q) && Number(t(this, Q)) > 0 && o.push("."), t(this, Et) && Number(t(this, Et)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, Q) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1947
- var s = e.target.value, r = s.indexOf(".");
1950
+ let i = [];
1951
+ if (t(this, Q) && Number(t(this, Q)) > 0 && i.push("."), t(this, Et) && Number(t(this, Et)) >= 0 && i.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !i.includes(e.key) && e.preventDefault(), t(this, Q) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1952
+ var n = e.target.value, r = n.indexOf(".");
1948
1953
  if (r >= 0) {
1949
- var s = s.substr(r + 1, s.length);
1950
- s.length >= Number(t(this, Q)) && e.preventDefault();
1954
+ var n = n.substr(r + 1, n.length);
1955
+ n.length >= Number(t(this, Q)) && e.preventDefault();
1951
1956
  }
1952
1957
  }
1953
1958
  }
@@ -1957,8 +1962,8 @@ const us = class us extends Fe {
1957
1962
  if (this.applyBaseStyle(), y(this, bt, this.getAttribute("type") || "text"), y(this, At, this.getAttribute("maxbyte")), y(this, Et, this.getAttribute("min")), y(this, Ae, this.getAttribute("max")), y(this, Q, this.getAttribute("scale")), !["text", "number"].includes(t(this, bt))) throw `invalid type : ${t(this, bt)}`;
1958
1963
  }
1959
1964
  connectedCallback() {
1960
- for (var e = [], s = 0; s < this.attributes.length; s++)
1961
- ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[s].name) && e.push(`${this.attributes[s].name}="${this.attributes[s].value}"`);
1965
+ for (var e = [], n = 0; n < this.attributes.length; n++)
1966
+ ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[n].name) && e.push(`${this.attributes[n].name}="${this.attributes[n].value}"`);
1962
1967
  this.innerHTML = `
1963
1968
  <input type="text"
1964
1969
  ${e.join(" ")}
@@ -1967,8 +1972,8 @@ const us = class us extends Fe {
1967
1972
  `, super.connectedCallback(), y(this, Kt, this.querySelector("input"));
1968
1973
  }
1969
1974
  };
1970
- Kt = new WeakMap(), bt = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), Ae = new WeakMap(), Q = new WeakMap(), Qe = new WeakMap(), h(us, "CellInputText");
1971
- let je = us;
1975
+ Kt = new WeakMap(), bt = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), Ae = new WeakMap(), Q = new WeakMap(), Qe = new WeakMap(), h(gs, "CellInputText");
1976
+ let je = gs;
1972
1977
  customElements.get("cell-input-text");
1973
1978
  customElements.get("cell-input") || customElements.define("cell-input", je);
1974
1979
  //# sourceMappingURL=nine-table.js.map