@ninebone/table 0.0.719 → 0.0.720

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,50 +1,50 @@
1
- var ns = Object.defineProperty;
2
- var rs = (q) => {
1
+ var bs = Object.defineProperty;
2
+ var ps = (q) => {
3
3
  throw TypeError(q);
4
4
  };
5
- var as = (q, n, e) => n in q ? ns(q, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[n] = e;
6
- var h = (q, n) => ns(q, "name", { value: n, configurable: !0 });
7
- var A = (q, n, e) => as(q, typeof n != "symbol" ? n + "" : n, e), fe = (q, n, e) => n.has(q) || rs("Cannot " + e);
8
- var t = (q, n, e) => (fe(q, n, "read from private field"), e ? e.call(q) : n.get(q)), d = (q, n, e) => n.has(q) ? rs("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(q) : n.set(q, e), p = (q, n, e, s) => (fe(q, n, "write to private field"), s ? s.call(q, e) : n.set(q, e), e), dt = (q, n, e) => (fe(q, n, "access private method"), e);
9
- var os = (q, n, e, s) => ({
5
+ var ws = (q, s, e) => s in q ? bs(q, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[s] = e;
6
+ var h = (q, s) => bs(q, "name", { value: s, configurable: !0 });
7
+ var E = (q, s, e) => ws(q, typeof s != "symbol" ? s + "" : s, e), ve = (q, s, e) => s.has(q) || ps("Cannot " + e);
8
+ var t = (q, s, e) => (ve(q, s, "read from private field"), e ? e.call(q) : s.get(q)), d = (q, s, e) => s.has(q) ? ps("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(q) : s.set(q, e), p = (q, s, e, n) => (ve(q, s, "write to private field"), n ? n.call(q, e) : s.set(q, e), e), Q = (q, s, e) => (ve(q, s, "access private method"), e);
9
+ var ys = (q, s, e, n) => ({
10
10
  set _(r) {
11
- p(q, n, r, e);
11
+ p(q, s, r, e);
12
12
  },
13
13
  get _() {
14
- return t(q, n, s);
14
+ return t(q, s, n);
15
15
  }
16
16
  });
17
- import { trace as ls } from "@ninebone/util";
18
- const ze = class ze extends ls.constructor {
17
+ import { trace as vs } from "@ninebone/util";
18
+ const Ge = class Ge extends vs.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- h(ze, "Trace");
24
- let ue = ze;
25
- const E = new ue();
26
- var D, V, R, Z, G, J, Dt, Q, Pt;
27
- const Be = class Be extends HTMLElement {
23
+ h(Ge, "Trace");
24
+ let Se = Ge;
25
+ const R = new Se();
26
+ var B, K, A, tt, et, st, Yt, nt, Vt;
27
+ const Ze = class Ze extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- d(this, D);
31
- d(this, V, !1);
32
- d(this, R);
33
- d(this, Z);
34
- d(this, G);
35
- d(this, J);
36
- d(this, Dt, /* @__PURE__ */ h(() => {
37
- if (!t(this, D)) return;
38
- const e = t(this, D).querySelector(".ng-container-body .ng-part-body");
39
- e && (p(this, J, new ResizeObserver(() => {
30
+ d(this, B);
31
+ d(this, K, !1);
32
+ d(this, A);
33
+ d(this, tt);
34
+ d(this, et);
35
+ d(this, st);
36
+ d(this, Yt, /* @__PURE__ */ h(() => {
37
+ if (!t(this, B)) return;
38
+ const e = t(this, B).querySelector(".ng-container-body .ng-part-body");
39
+ e && (p(this, st, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, J).observe(e));
41
+ })), t(this, st).observe(e));
42
42
  }, "#observeResize"));
43
- A(this, "refresh", /* @__PURE__ */ h(() => {
44
- if (!t(this, D) || !t(this, R) || t(this, V)) return;
45
- const e = t(this, R).container, s = e.querySelector("table");
46
- if (!s) return;
47
- const r = t(this, R).track, o = t(this, R).thumb, i = t(this, D).querySelector(".ng-container-bottom"), a = e.clientWidth, c = s.scrollWidth;
43
+ E(this, "refresh", /* @__PURE__ */ h(() => {
44
+ if (!t(this, B) || !t(this, A) || t(this, K)) return;
45
+ const e = t(this, A).container, n = e.querySelector("table");
46
+ if (!n) return;
47
+ const r = t(this, A).track, o = t(this, A).thumb, i = t(this, B).querySelector(".ng-container-bottom"), a = e.clientWidth, c = n.scrollWidth;
48
48
  if (a !== 0 && c > a)
49
49
  i && (i.style.display = "flex");
50
50
  else {
@@ -59,60 +59,60 @@ const Be = class Be extends HTMLElement {
59
59
  let g = 0;
60
60
  b > 0 && (g = parseInt(u / b * (l - f), 10)), g < 0 && (g = 0);
61
61
  const y = l - f;
62
- g > y && (g = y), o.style.left = `${g}px`, t(this, R).left.disabled = g === 0, t(this, R).right.disabled = g >= y - 1;
62
+ g > y && (g = y), o.style.left = `${g}px`, t(this, A).left.disabled = g === 0, t(this, A).right.disabled = g >= y - 1;
63
63
  }, "refresh"));
64
- d(this, Q, /* @__PURE__ */ h((e) => {
65
- if (!t(this, R)) return !1;
66
- const s = t(this, R).container, r = s.querySelector("table");
64
+ d(this, nt, /* @__PURE__ */ h((e) => {
65
+ if (!t(this, A)) return !1;
66
+ const n = t(this, A).container, r = n.querySelector("table");
67
67
  if (!r) return !1;
68
- const o = t(this, R).track.getBoundingClientRect(), i = t(this, R).thumb.clientWidth;
68
+ const o = t(this, A).track.getBoundingClientRect(), i = t(this, A).thumb.clientWidth;
69
69
  let a = e;
70
70
  a < 0 && (a = 0);
71
71
  const c = o.width - i;
72
- a > c && (a = c), a = parseInt(a, 10), t(this, R).thumb.style.left = `${a}px`, t(this, R).left.disabled = a === 0, t(this, R).right.disabled = a >= c - 1;
73
- const l = s.clientWidth, u = r.scrollWidth - l;
74
- return c > 0 && u > 0 && (s.scrollLeft = a / c * u), a > 0 && a < c - 1;
72
+ a > c && (a = c), a = parseInt(a, 10), t(this, A).thumb.style.left = `${a}px`, t(this, A).left.disabled = a === 0, t(this, A).right.disabled = a >= c - 1;
73
+ const l = n.clientWidth, u = r.scrollWidth - l;
74
+ return c > 0 && u > 0 && (n.scrollLeft = a / c * u), a > 0 && a < c - 1;
75
75
  }, "#thumbMoveTo"));
76
- d(this, Pt, /* @__PURE__ */ h(() => {
76
+ d(this, Vt, /* @__PURE__ */ h(() => {
77
77
  const e = /* @__PURE__ */ h((r) => {
78
- clearInterval(t(this, Z)), clearInterval(t(this, G));
79
- const o = parseInt(t(this, R).thumb.style.left || 0, 10);
80
- t(this, Q).call(this, o + r), p(this, Z, setInterval(() => {
81
- clearInterval(t(this, Z)), p(this, G, setInterval(() => {
82
- const i = parseInt(t(this, R).thumb.style.left || 0, 10);
83
- t(this, Q).call(this, i + r) || clearInterval(t(this, G));
78
+ clearInterval(t(this, tt)), clearInterval(t(this, et));
79
+ const o = parseInt(t(this, A).thumb.style.left || 0, 10);
80
+ t(this, nt).call(this, o + r), p(this, tt, setInterval(() => {
81
+ clearInterval(t(this, tt)), p(this, et, setInterval(() => {
82
+ const i = parseInt(t(this, A).thumb.style.left || 0, 10);
83
+ t(this, nt).call(this, i + r) || clearInterval(t(this, et));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ h(() => {
87
- clearInterval(t(this, Z)), clearInterval(t(this, G));
86
+ }, "delayScroll"), n = /* @__PURE__ */ h(() => {
87
+ clearInterval(t(this, tt)), clearInterval(t(this, et));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((r) => {
90
- t(this, R).left.addEventListener(r, s), t(this, R).right.addEventListener(r, s), t(this, R).track.addEventListener(r, s);
91
- }), t(this, R).left.addEventListener("mousedown", (r) => {
90
+ t(this, A).left.addEventListener(r, n), t(this, A).right.addEventListener(r, n), t(this, A).track.addEventListener(r, n);
91
+ }), t(this, A).left.addEventListener("mousedown", (r) => {
92
92
  r.button === 0 && e(-20);
93
- }), t(this, R).right.addEventListener("mousedown", (r) => {
93
+ }), t(this, A).right.addEventListener("mousedown", (r) => {
94
94
  r.button === 0 && e(20);
95
- }), t(this, R).left.addEventListener("touchstart", () => e(-20)), t(this, R).right.addEventListener("touchstart", () => e(20)), t(this, R).track.addEventListener("mousedown", (r) => {
95
+ }), t(this, A).left.addEventListener("touchstart", () => e(-20)), t(this, A).right.addEventListener("touchstart", () => e(20)), t(this, A).track.addEventListener("mousedown", (r) => {
96
96
  if (r.button !== 0) return;
97
97
  r.preventDefault();
98
- const o = t(this, R).track.getBoundingClientRect(), i = t(this, R).thumb.clientWidth;
99
- t(this, Q).call(this, r.clientX - o.left - i / 2);
100
- }), t(this, R).thumb.addEventListener("mousedown", (r) => {
98
+ const o = t(this, A).track.getBoundingClientRect(), i = t(this, A).thumb.clientWidth;
99
+ t(this, nt).call(this, r.clientX - o.left - i / 2);
100
+ }), t(this, A).thumb.addEventListener("mousedown", (r) => {
101
101
  if (r.button !== 0) return;
102
- r.stopPropagation(), r.preventDefault(), p(this, V, !0), this.shiftX = r.clientX - t(this, R).thumb.getBoundingClientRect().left;
102
+ r.stopPropagation(), r.preventDefault(), p(this, K, !0), this.shiftX = r.clientX - t(this, A).thumb.getBoundingClientRect().left;
103
103
  const o = /* @__PURE__ */ h((a) => {
104
- if (!t(this, V)) return;
105
- const c = t(this, R).track.getBoundingClientRect();
106
- t(this, Q).call(this, a.clientX - c.left - this.shiftX);
104
+ if (!t(this, K)) return;
105
+ const c = t(this, A).track.getBoundingClientRect();
106
+ t(this, nt).call(this, a.clientX - c.left - this.shiftX);
107
107
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
108
- p(this, V, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
108
+ p(this, K, !1), n(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
109
109
  }, "onMouseUp");
110
110
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (p(this, D, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, D)) return;
115
+ if (p(this, B, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, B)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -177,85 +177,85 @@ const Be = class Be extends HTMLElement {
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
179
  const e = /* @__PURE__ */ h(() => {
180
- const s = t(this, D).querySelector(".ng-container-body .ng-part-body");
181
- if (!s) {
180
+ const n = t(this, B).querySelector(".ng-container-body .ng-part-body");
181
+ if (!n) {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- p(this, R, {
186
- container: s,
185
+ p(this, A, {
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", () => {
192
- t(this, V) || this.refresh();
193
- }), t(this, Pt).call(this), t(this, Dt).call(this), this.refresh();
191
+ }), n.addEventListener("scroll", () => {
192
+ t(this, K) || this.refresh();
193
+ }), t(this, Vt).call(this), t(this, Yt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, J) && t(this, J).disconnect();
198
+ t(this, st) && t(this, st).disconnect();
199
199
  }
200
200
  };
201
- D = new WeakMap(), V = new WeakMap(), R = new WeakMap(), Z = new WeakMap(), G = new WeakMap(), J = new WeakMap(), Dt = new WeakMap(), Q = new WeakMap(), Pt = new WeakMap(), h(Be, "NineTableHScrollBar");
202
- let ge = Be;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ge);
204
- var tt, et, ft, C, Et, At, Ft;
205
- const De = class De extends HTMLElement {
201
+ B = new WeakMap(), K = new WeakMap(), A = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), Yt = new WeakMap(), nt = new WeakMap(), Vt = new WeakMap(), h(Ze, "NineTableHScrollBar");
202
+ let Re = Ze;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Re);
204
+ var rt, ot, bt, C, Tt, Ct, Ut;
205
+ const Je = class Je extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- d(this, tt);
209
- d(this, et);
210
- d(this, ft, !1);
208
+ d(this, rt);
209
+ d(this, ot);
210
+ d(this, bt, !1);
211
211
  d(this, C);
212
- d(this, Et, 0);
213
- d(this, At, 0);
214
- A(this, "refresh", /* @__PURE__ */ h(() => {
215
- if (E.log("vscrollbar.refresh"), !t(this, tt) || !t(this, C)) return;
216
- const e = t(this, C).container, s = t(this, C).track, r = t(this, C).thumb, o = e.clientHeight, i = t(this, tt).data.length, a = t(this, et).getRowHeight(), c = i * a;
212
+ d(this, Tt, 0);
213
+ d(this, Ct, 0);
214
+ E(this, "refresh", /* @__PURE__ */ h(() => {
215
+ if (R.log("vscrollbar.refresh"), !t(this, rt) || !t(this, C)) return;
216
+ const e = t(this, C).container, n = t(this, C).track, r = t(this, C).thumb, o = e.clientHeight, i = t(this, rt).data.length, a = t(this, ot).getRowHeight(), c = i * a;
217
217
  if (c <= o || i === 0) {
218
218
  this.style.display = "none";
219
219
  return;
220
220
  } else
221
221
  this.style.display = "flex";
222
- const l = s.clientHeight;
222
+ const l = n.clientHeight;
223
223
  if (l <= 0) return;
224
224
  const f = Math.max(Math.min(l * (o / c), l), 20);
225
225
  r.style.height = `${f}px`;
226
226
  const u = e.scrollTop, b = Math.max(c - o, 1);
227
- E.log(e, u, b);
227
+ R.log(e, u, b);
228
228
  let g = 0;
229
229
  b > 0 && (g = u / b * (l - f));
230
230
  const y = l - f;
231
231
  g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, C).top.disabled = u <= 0, t(this, C).bottom.disabled = u >= b - 1;
232
232
  }, "refresh"));
233
- d(this, Ft, /* @__PURE__ */ h(() => {
234
- E.log("nine-table-vscrollbar.#init");
235
- const e = t(this, C).container, s = /* @__PURE__ */ h(() => {
236
- const o = (t(this, tt).data.get() || []).length, i = t(this, et).getRowHeight();
233
+ d(this, Ut, /* @__PURE__ */ h(() => {
234
+ R.log("nine-table-vscrollbar.#init");
235
+ const e = t(this, C).container, n = /* @__PURE__ */ h(() => {
236
+ const o = (t(this, rt).data.get() || []).length, i = t(this, ot).getRowHeight();
237
237
  return o * i;
238
238
  }, "getContentHeight");
239
239
  t(this, C).thumb.addEventListener("mousedown", (r) => {
240
240
  if (r.button !== 0) return;
241
- r.stopPropagation(), r.preventDefault(), p(this, ft, !0), p(this, Et, r.clientY), p(this, At, e.scrollTop);
241
+ r.stopPropagation(), r.preventDefault(), p(this, bt, !0), p(this, Tt, r.clientY), p(this, Ct, e.scrollTop);
242
242
  const o = /* @__PURE__ */ h((a) => {
243
- if (!t(this, ft)) return;
244
- const c = t(this, C).track.getBoundingClientRect(), l = t(this, C).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Et), g = e.clientHeight, y = s(), v = Math.max(y - g, 1);
245
- if (u > 0 && v > 0) {
246
- const w = b / u * v;
247
- let m = t(this, At) + w;
248
- const _ = Math.max(0, y - g);
249
- m < 0 && (m = 0), m > _ && (m = _), e.scrollTop = m;
243
+ if (!t(this, bt)) return;
244
+ const c = t(this, C).track.getBoundingClientRect(), l = t(this, C).thumb.clientHeight, u = c.height - l, b = a.clientY - t(this, Tt), g = e.clientHeight, y = n(), w = Math.max(y - g, 1);
245
+ if (u > 0 && w > 0) {
246
+ const v = b / u * w;
247
+ let m = t(this, Ct) + v;
248
+ const I = Math.max(0, y - g);
249
+ m < 0 && (m = 0), m > I && (m = I), e.scrollTop = m;
250
250
  }
251
251
  this.refresh();
252
252
  }, "onMouseMove"), i = /* @__PURE__ */ h(() => {
253
- p(this, ft, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
253
+ p(this, bt, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", i), this.refresh();
254
254
  }, "onMouseUp");
255
255
  document.addEventListener("mousemove", o), document.addEventListener("mouseup", i);
256
256
  }), t(this, C).track.addEventListener("mousedown", (r) => {
257
257
  if (r.button !== 0 || r.target === t(this, C).thumb) return;
258
- const o = t(this, C).track.getBoundingClientRect(), i = t(this, C).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, u = s(), b = Math.max(u - f, 1);
258
+ const o = t(this, C).track.getBoundingClientRect(), i = t(this, C).thumb.clientHeight, a = r.clientY - o.top - i / 2, l = o.height - i, f = e.clientHeight, u = n(), b = Math.max(u - f, 1);
259
259
  if (l > 0 && b > 0) {
260
260
  const g = Math.max(0, Math.min(1, a / l));
261
261
  e.scrollTop = g * b;
@@ -269,7 +269,7 @@ const De = class De extends HTMLElement {
269
269
  }, "#init"));
270
270
  }
271
271
  connectedCallback() {
272
- p(this, tt, this.getRootNode().host), p(this, et, this.closest("nine-table-sheet")), this.innerHTML = `
272
+ p(this, rt, this.getRootNode().host), p(this, ot, this.closest("nine-table-sheet")), this.innerHTML = `
273
273
  <style>
274
274
  nine-table-vscrollbar {
275
275
  display: flex;
@@ -334,51 +334,51 @@ const De = class De extends HTMLElement {
334
334
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
335
335
  `;
336
336
  const e = /* @__PURE__ */ h(() => {
337
- const s = t(this, et).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
  p(this, C, {
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"),
347
347
  bottom: this.querySelector(".ng-scroll-bottom")
348
- }), t(this, Ft).call(this), this.refresh();
348
+ }), t(this, Ut).call(this), this.refresh();
349
349
  }, "initWhenReady");
350
350
  e();
351
351
  }
352
352
  };
353
- tt = new WeakMap(), et = new WeakMap(), ft = new WeakMap(), C = new WeakMap(), Et = new WeakMap(), At = new WeakMap(), Ft = new WeakMap(), h(De, "NineTableVScrollBar");
354
- let be = De;
355
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", be);
356
- var F, S, st, P, O, U, nt, qt, Le, He, jt, Yt, Tt, Ct, kt, Vt, Ut, Lt, Ie, ut, Ht, Xt;
357
- const Pe = class Pe {
358
- constructor(n) {
359
- d(this, F);
353
+ rt = new WeakMap(), ot = new WeakMap(), bt = new WeakMap(), C = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Ut = new WeakMap(), h(Je, "NineTableVScrollBar");
354
+ let Ae = Je;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Ae);
356
+ var j, S, it, P, D, G, at, kt, Be, Pe, Xt, Kt, Lt, It, Ht, Gt, Zt, Mt, Fe, pt, $t, Jt;
357
+ const Qe = class Qe {
358
+ constructor(s) {
359
+ d(this, j);
360
360
  d(this, S);
361
- d(this, st);
361
+ d(this, it);
362
362
  d(this, P, /* @__PURE__ */ new Map());
363
- d(this, O, null);
364
- d(this, U, null);
365
- d(this, nt, 0);
366
- d(this, qt, 40);
367
- d(this, Le, !1);
368
- d(this, He, !1);
363
+ d(this, D, null);
364
+ d(this, G, null);
365
+ d(this, at, 0);
366
+ d(this, kt, 40);
367
+ d(this, Be, !1);
368
+ d(this, Pe, !1);
369
369
  //#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
370
- d(this, jt, 3);
371
- A(this, "refresh", /* @__PURE__ */ h(() => {
370
+ d(this, Xt, 3);
371
+ E(this, "refresh", /* @__PURE__ */ h(() => {
372
372
  var e;
373
- E.log("rowManager.refresh");
374
- const n = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
- n && (t(this, Tt).call(this), t(this, Ct).call(this), t(this, ut).call(this, n.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
373
+ R.log("rowManager.refresh");
374
+ const s = t(this, S).querySelector(".ng-container-body .ng-part-body");
375
+ s && (t(this, Lt).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop), (e = t(this, S).querySelector("nine-table-vscrollbar")) == null || e.refresh());
376
376
  }, "refresh"));
377
- A(this, "initialize", /* @__PURE__ */ h(() => {
378
- E.log("rowManager.initialize"), p(this, st, {
377
+ E(this, "initialize", /* @__PURE__ */ h(() => {
378
+ R.log("rowManager.initialize"), p(this, it, {
379
379
  scrollTables: t(this, S).querySelectorAll(".ng-part-body table"),
380
380
  firstTr: t(this, S).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")
381
- }), p(this, O, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
381
+ }), p(this, D, null), t(this, P).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
382
382
  const a = t(this, S).querySelector(i);
383
383
  if (!a) return;
384
384
  const c = a.querySelector(".ng-part-body table");
@@ -388,56 +388,56 @@ const Pe = class Pe {
388
388
  const u = Array.from(l.querySelectorAll("tr")).map((b) => b.cloneNode(!0));
389
389
  t(this, P).set(i, u);
390
390
  });
391
- const n = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), s = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), o = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
- if (n) {
393
- t(this, Tt).call(this), t(this, Lt).call(this), t(this, Ct).call(this), t(this, ut).call(this, n.scrollTop);
391
+ const s = t(this, S).querySelector(".ng-container-body .ng-part-body"), e = t(this, S).querySelector(".ng-container-left .ng-part-body"), n = t(this, S).querySelector(".ng-container-right .ng-part-body"), r = t(this, S).querySelector(".ng-container-body .ng-part-header"), o = t(this, S).querySelector(".ng-container-body .ng-part-footer");
392
+ if (s) {
393
+ t(this, Lt).call(this), t(this, Mt).call(this), t(this, It).call(this), t(this, pt).call(this, s.scrollTop);
394
394
  let i = !1;
395
395
  const a = /* @__PURE__ */ h((c) => {
396
396
  var u;
397
397
  if (i) return;
398
398
  i = !0;
399
399
  const l = c.scrollTop, f = c.scrollLeft;
400
- n && n.scrollTop !== l && (n.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), s && s.scrollTop !== l && (s.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, ut).call(this, l), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
400
+ s && s.scrollTop !== l && (s.scrollTop = l), e && e.scrollTop !== l && (e.scrollTop = l), n && n.scrollTop !== l && (n.scrollTop = l), r && r.scrollLeft !== f && (r.scrollLeft = f), o && o.scrollLeft !== f && (o.scrollLeft = f), t(this, pt).call(this, l), (u = t(this, S).querySelector("nine-table-vscrollbar")) == null || u.refresh(), i = !1;
401
401
  }, "handleContainerScroll");
402
- [n, e, s].forEach((c) => {
402
+ [s, e, n].forEach((c) => {
403
403
  c == null || c.addEventListener("scroll", () => {
404
404
  a(c);
405
405
  });
406
406
  });
407
407
  }
408
408
  }, "initialize"));
409
- d(this, Yt, /* @__PURE__ */ h((n, e) => {
410
- E.log("rowManager.#renderRows");
411
- const s = t(this, P).get(e);
412
- if (!s || s.length === 0) return;
413
- const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
409
+ d(this, Kt, /* @__PURE__ */ h((s, e) => {
410
+ R.log("rowManager.#renderRows");
411
+ const n = t(this, P).get(e);
412
+ if (!n || n.length === 0) return;
413
+ const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
414
414
  if (!r) return;
415
415
  r.querySelectorAll("tr:not(.nodata)").forEach((a) => a.remove());
416
416
  const o = r.querySelector("tr.nodata"), i = document.createDocumentFragment();
417
- for (let a = 0; a < t(this, qt); a++)
418
- s.forEach((c) => {
417
+ for (let a = 0; a < t(this, kt); a++)
418
+ n.forEach((c) => {
419
419
  i.appendChild(c.cloneNode(!0));
420
420
  });
421
- o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, st).firstTr = r.querySelector("tr:not(.nodata)"));
421
+ o ? o.before(i) : r.appendChild(i), e === ".ng-container-body" && (t(this, it).firstTr = r.querySelector("tr:not(.nodata)"));
422
422
  }, "#renderRows"));
423
- d(this, Tt, /* @__PURE__ */ h(() => {
424
- if (t(this, O) !== null && t(this, O) > 0)
425
- return t(this, O);
426
- const n = t(this, S).querySelector(".ng-container-body .ng-part-body");
427
- E.log("rowManager.#measureAndCacheHeight");
423
+ d(this, Lt, /* @__PURE__ */ h(() => {
424
+ if (t(this, D) !== null && t(this, D) > 0)
425
+ return t(this, D);
426
+ const s = t(this, S).querySelector(".ng-container-body .ng-part-body");
427
+ R.log("rowManager.#measureAndCacheHeight");
428
428
  const e = t(this, P).get(".ng-container-body");
429
429
  if (!e || e.length === 0) throw new Error("invalid dom");
430
- const s = n.querySelector("tbody.bindable-tbody");
431
- if (E.log(s), !s) throw new Error("invalid dom");
432
- s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
- const r = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
430
+ const n = s.querySelector("tbody.bindable-tbody");
431
+ if (R.log(n), !n) throw new Error("invalid dom");
432
+ n.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
433
+ const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
434
434
  e.forEach((b) => {
435
435
  o.appendChild(b.cloneNode(!0));
436
- }), r ? r.before(o) : s.appendChild(o);
436
+ }), r ? r.before(o) : n.appendChild(o);
437
437
  const i = t(this, S), a = i.style.display, c = i.style.visibility, l = i.style.position;
438
438
  (a === "none" || window.getComputedStyle(i).display === "none") && (i.style.display = "block", i.style.visibility = "hidden", i.style.position = "absolute");
439
439
  let f = 0;
440
- const u = s.querySelectorAll("tr");
440
+ const u = n.querySelectorAll("tr");
441
441
  return u.forEach((b) => {
442
442
  let g = b.offsetHeight || b.getBoundingClientRect().height;
443
443
  if (g === 0) {
@@ -445,119 +445,119 @@ const Pe = class Pe {
445
445
  g = parseFloat(y.height) || parseFloat(y.minHeight) || 0;
446
446
  }
447
447
  f += g;
448
- }), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, O, f), t(this, kt).call(this), t(this, O));
448
+ }), u.forEach((b) => b.remove()), i.style.display = a, i.style.visibility = c, i.style.position = l, f <= 0 ? -1 : (p(this, D, f), t(this, Ht).call(this), t(this, D));
449
449
  }, "#measureAndCacheHeight"));
450
- d(this, Ct, /* @__PURE__ */ h(() => {
451
- E.log("rowManager.#updateVirtualScrollHeight");
452
- const e = (t(this, F).data.get() || []).length, s = t(this, O), r = e * s;
453
- E.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: s, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
450
+ d(this, It, /* @__PURE__ */ h(() => {
451
+ R.log("rowManager.#updateVirtualScrollHeight");
452
+ const e = (t(this, j).data.get() || []).length, n = t(this, D), r = e * n;
453
+ R.log("🔍 [VirtualHeight]", { totalCount: e, rowHeight: n, totalVirtualHeight: r }), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
454
454
  const i = t(this, S).querySelector(o);
455
455
  if (!i) return;
456
456
  const a = i.querySelector(".ng-part-body .ng-virtual-spacer");
457
457
  a && (a.style.height = `${r}px`);
458
458
  });
459
459
  }, "#updateVirtualScrollHeight"));
460
- d(this, kt, /* @__PURE__ */ h(() => {
461
- if (t(this, nt) > 0 && t(this, O) > 0) {
462
- const n = Math.ceil(t(this, nt) / t(this, O));
463
- p(this, qt, n + t(this, jt));
460
+ d(this, Ht, /* @__PURE__ */ h(() => {
461
+ if (t(this, at) > 0 && t(this, D) > 0) {
462
+ const s = Math.ceil(t(this, at) / t(this, D));
463
+ p(this, kt, s + t(this, Xt));
464
464
  }
465
465
  }, "#updateRowCount"));
466
- d(this, Vt, /* @__PURE__ */ h(() => {
466
+ d(this, Gt, /* @__PURE__ */ h(() => {
467
467
  var a, c, l, f, u, b;
468
- const n = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), s = t(this, S).querySelector(".ng-container-right .ng-part-body table");
468
+ const s = t(this, S).querySelector(".ng-container-left .ng-part-body table"), e = t(this, S).querySelector(".ng-container-body .ng-part-body table"), n = t(this, S).querySelector(".ng-container-right .ng-part-body table");
469
469
  if (e) {
470
- const g = n ? Array.from(n.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), v = s ? Array.from(s.querySelectorAll("tbody tr")) : [], w = Math.max(g.length, y.length, v.length);
471
- for (let m = 0; m < w; m++) {
472
- const _ = [
470
+ const g = s ? Array.from(s.querySelectorAll("tbody tr")) : [], y = Array.from(e.querySelectorAll("tbody tr")), w = n ? Array.from(n.querySelectorAll("tbody tr")) : [], v = Math.max(g.length, y.length, w.length);
471
+ for (let m = 0; m < v; m++) {
472
+ const I = [
473
473
  ((a = g[m]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
474
474
  ((c = y[m]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
475
- ((l = v[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
- ], T = Math.max(..._);
477
- T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`));
475
+ ((l = w[m]) == null ? void 0 : l.getBoundingClientRect().height) || 0
476
+ ], T = Math.max(...I);
477
+ T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), w[m] && (w[m].style.height = `${T}px`));
478
478
  }
479
479
  }
480
480
  const r = t(this, S).querySelector(".ng-container-left .ng-part-footer table"), o = t(this, S).querySelector(".ng-container-body .ng-part-footer table"), i = t(this, S).querySelector(".ng-container-right .ng-part-footer table");
481
481
  if (o) {
482
- const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), v = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], w = Math.max(g.length, y.length, v.length);
483
- for (let m = 0; m < w; m++) {
484
- const _ = [
482
+ const g = r ? Array.from(r.querySelectorAll("tfoot tr")) : [], y = Array.from(o.querySelectorAll("tfoot tr")), w = i ? Array.from(i.querySelectorAll("tfoot tr")) : [], v = Math.max(g.length, y.length, w.length);
483
+ for (let m = 0; m < v; m++) {
484
+ const I = [
485
485
  ((f = g[m]) == null ? void 0 : f.getBoundingClientRect().height) || 0,
486
486
  ((u = y[m]) == null ? void 0 : u.getBoundingClientRect().height) || 0,
487
- ((b = v[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
- ], T = Math.max(..._);
489
- T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), v[m] && (v[m].style.height = `${T}px`));
487
+ ((b = w[m]) == null ? void 0 : b.getBoundingClientRect().height) || 0
488
+ ], T = Math.max(...I);
489
+ T > 0 && (g[m] && (g[m].style.height = `${T}px`), y[m] && (y[m].style.height = `${T}px`), w[m] && (w[m].style.height = `${T}px`));
490
490
  }
491
491
  }
492
492
  }, "#syncRowHeights"));
493
- d(this, Ut, /* @__PURE__ */ h(() => {
494
- !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, U, new ResizeObserver((n) => {
495
- for (const e of n) {
496
- const s = e.target;
497
- if (!s.classList.contains("active")) continue;
493
+ d(this, Zt, /* @__PURE__ */ h(() => {
494
+ !t(this, S) || !(t(this, S) instanceof HTMLElement) || (p(this, G, new ResizeObserver((s) => {
495
+ for (const e of s) {
496
+ const n = e.target;
497
+ if (!n.classList.contains("active")) continue;
498
498
  const r = e.contentRect.height;
499
499
  if (r > 0) {
500
500
  let o = 0;
501
- const i = s.querySelector(".ng-part-header"), a = s.querySelector(".ng-part-footer");
501
+ const i = n.querySelector(".ng-part-header"), a = n.querySelector(".ng-part-footer");
502
502
  i && (o += i.offsetHeight), a && (o += a.offsetHeight);
503
503
  const c = Math.max(r - o, 100);
504
- t(this, nt) !== c && (p(this, nt, c), t(this, kt).call(this), t(this, O) !== null && (t(this, Lt).call(this), this.refresh()));
504
+ t(this, at) !== c && (p(this, at, c), t(this, Ht).call(this), t(this, D) !== null && (t(this, Mt).call(this), this.refresh()));
505
505
  }
506
506
  }
507
- })), t(this, U).observe(t(this, S)));
507
+ })), t(this, G).observe(t(this, S)));
508
508
  }, "#initResizeObserver"));
509
- d(this, Lt, /* @__PURE__ */ h(() => {
510
- E.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
511
- const e = t(this, S).querySelector(n);
512
- e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Yt).call(this, e, n);
513
- }), t(this, Xt).call(this), t(this, Vt).call(this);
509
+ d(this, Mt, /* @__PURE__ */ h(() => {
510
+ R.log("rowManager.#renderAllContainers"), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((s) => {
511
+ const e = t(this, S).querySelector(s);
512
+ e && e.querySelector(".ng-part-body tbody.bindable-tbody") && t(this, Kt).call(this, e, s);
513
+ }), t(this, Jt).call(this), t(this, Gt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, Ie, /* @__PURE__ */ h((n) => {
515
+ d(this, Fe, /* @__PURE__ */ h((s) => {
516
516
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
517
517
  var l;
518
- const s = t(this, S).querySelector(e);
519
- if (!s) return;
520
- const r = s.querySelector(".ng-part-body tbody.bindable-tbody");
518
+ const n = t(this, S).querySelector(e);
519
+ if (!n) return;
520
+ const r = n.querySelector(".ng-part-body tbody.bindable-tbody");
521
521
  if (!r) return;
522
- const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, F).data.get() || []).length;
522
+ const o = Array.from(r.querySelectorAll("tr:not(.nodata)")), i = ((l = t(this, P).get(e)) == null ? void 0 : l.length) || 1, c = (t(this, j).data.get() || []).length;
523
523
  o.forEach((f, u) => {
524
- const b = n + Math.floor(u / i);
524
+ const b = s + Math.floor(u / i);
525
525
  if (b >= c) {
526
526
  f.style.visibility = "hidden";
527
527
  return;
528
528
  }
529
- const g = t(this, F).data.get(b);
530
- f.style.display = "", t(this, Ht).call(this, f, g, b);
529
+ const g = t(this, j).data.get(b);
530
+ f.style.display = "", t(this, $t).call(this, f, g, b);
531
531
  });
532
532
  });
533
533
  }, "#adjustBufferRows"));
534
- d(this, ut, /* @__PURE__ */ h((n) => {
534
+ d(this, pt, /* @__PURE__ */ h((s) => {
535
535
  var u, b;
536
- const e = t(this, O);
536
+ const e = t(this, D);
537
537
  if (!e || e <= 0) return;
538
- const s = t(this, F).data.length;
539
- if (s === 0) return;
538
+ const n = t(this, j).data.length;
539
+ if (n === 0) return;
540
540
  const r = ((u = t(this, P).get(".ng-container-body")) == null ? void 0 : u.length) || 1, o = t(this, S).querySelector(".ng-container-body .ng-part-body");
541
- E.log("bodyContainer.clientHeight", o.clientHeight);
542
- const i = Math.max(0, s - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(n / e)));
541
+ R.log("bodyContainer.clientHeight", o.clientHeight);
542
+ const i = Math.max(0, n - Math.floor(o.clientHeight / e)), a = Math.min(i, Math.max(0, Math.floor(s / e)));
543
543
  let c = Math.floor(a * e);
544
- E.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && E.log(`📜 [Scroll Inspect] scrollTop: ${n}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
- const l = t(this, st).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
- (b = t(this, st)) == null || b.scrollTables.forEach((g) => {
544
+ R.log(`📜 [Scroll Calc] maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`), a === i && R.log(`📜 [Scroll Inspect] scrollTop: ${s}, rowHeight: ${e}, maxStartIndex: ${i}, startIndex: ${a}, offsetY: ${c}`);
545
+ const l = t(this, it).firstTr, f = l && l.dataset.row !== void 0 ? parseInt(l.dataset.row, 10) : -1;
546
+ (b = t(this, it)) == null || b.scrollTables.forEach((g) => {
547
547
  g.style.transform = `translate3d(0, ${c}px, 0)`;
548
- }), f !== a && (E.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
548
+ }), f !== a && (R.log(`🔄 [Row Bind Trigger] currentStartIndex(${f}) !== startIndex(${a})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((g) => {
549
549
  const y = t(this, S).querySelector(g);
550
550
  if (!y) return;
551
- const v = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
- if (!v) return;
553
- Array.from(v.querySelectorAll("tr:not(.nodata)")).forEach((m, _) => {
554
- const T = a + Math.floor(_ / r);
555
- if (T >= s) {
551
+ const w = y.querySelector(".ng-part-body tbody.bindable-tbody");
552
+ if (!w) return;
553
+ Array.from(w.querySelectorAll("tr:not(.nodata)")).forEach((m, I) => {
554
+ const T = a + Math.floor(I / r);
555
+ if (T >= n) {
556
556
  m.style.display = "none";
557
557
  return;
558
558
  }
559
- const N = t(this, F).data.get(T);
560
- m.style.display = "", t(this, Ht).call(this, m, N, T);
559
+ const H = t(this, j).data.get(T);
560
+ m.style.display = "", t(this, $t).call(this, m, H, T);
561
561
  });
562
562
  }));
563
563
  }, "#handleScroll"));
@@ -575,19 +575,19 @@ const Pe = class Pe {
575
575
  cell.dataset.row = dataIndex;
576
576
  });
577
577
  }; */
578
- d(this, Ht, /* @__PURE__ */ h((n, e, s) => {
579
- n.dataset.row = s, n.data = e, Array.from(n.cells).forEach((r, o) => {
580
- r.dataset.row = s;
578
+ d(this, $t, /* @__PURE__ */ h((s, e, n) => {
579
+ s.dataset.row = n, s.data = e, Array.from(s.cells).forEach((r, o) => {
580
+ r.dataset.row = n;
581
581
  const i = Array.from(r.children).find((a) => a.tagName.toLowerCase().startsWith("cell-") || typeof a.refresh == "function");
582
582
  i && typeof i.refresh == "function" && i.refresh();
583
583
  });
584
584
  }, "#bindRowData"));
585
- d(this, Xt, /* @__PURE__ */ h(() => {
585
+ d(this, Jt, /* @__PURE__ */ h(() => {
586
586
  var c, l, f;
587
- E.log("rowManager.#syncHeaderHeights");
588
- const n = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), s = t(this, S).querySelector(".ng-container-right .ng-part-header table");
587
+ R.log("rowManager.#syncHeaderHeights");
588
+ const s = t(this, S).querySelector(".ng-container-left .ng-part-header table"), e = t(this, S).querySelector(".ng-container-body .ng-part-header table"), n = t(this, S).querySelector(".ng-container-right .ng-part-header table");
589
589
  if (!e) return;
590
- const r = n ? Array.from(n.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = s ? Array.from(s.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
590
+ const r = s ? Array.from(s.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), i = n ? Array.from(n.querySelectorAll("tr")) : [], a = Math.max(r.length, o.length, i.length);
591
591
  for (let u = 0; u < a; u++) {
592
592
  const b = [
593
593
  ((c = r[u]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
@@ -597,43 +597,43 @@ const Pe = class Pe {
597
597
  g > 0 && (r[u] && (r[u].style.height = `${g}px`), o[u] && (o[u].style.height = `${g}px`), i[u] && (i[u].style.height = `${g}px`));
598
598
  }
599
599
  }, "#syncHeaderHeights"));
600
- A(this, "destroy", /* @__PURE__ */ h(() => {
601
- t(this, U) && (t(this, U).disconnect(), p(this, U, null));
600
+ E(this, "destroy", /* @__PURE__ */ h(() => {
601
+ t(this, G) && (t(this, G).disconnect(), p(this, G, null));
602
602
  }, "destroy"));
603
- p(this, F, n.getRootNode().host), p(this, S, n), t(this, Ut).call(this);
603
+ p(this, j, s.getRootNode().host), p(this, S, s), t(this, Zt).call(this);
604
604
  }
605
605
  getRowHeight() {
606
- return t(this, O);
606
+ return t(this, D);
607
607
  }
608
- templateLength(n = ".ng-container-body") {
608
+ templateLength(s = ".ng-container-body") {
609
609
  var e;
610
- return ((e = t(this, P).get(n)) == null ? void 0 : e.length) || 1;
610
+ return ((e = t(this, P).get(s)) == null ? void 0 : e.length) || 1;
611
611
  }
612
612
  };
613
- F = new WeakMap(), S = new WeakMap(), st = new WeakMap(), P = new WeakMap(), O = new WeakMap(), U = new WeakMap(), nt = new WeakMap(), qt = new WeakMap(), Le = new WeakMap(), He = new WeakMap(), jt = new WeakMap(), Yt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), kt = new WeakMap(), Vt = new WeakMap(), Ut = new WeakMap(), Lt = new WeakMap(), Ie = new WeakMap(), ut = new WeakMap(), Ht = new WeakMap(), Xt = new WeakMap(), h(Pe, "RowManager");
614
- let pe = Pe;
615
- const Kt = class Kt {
613
+ j = new WeakMap(), S = new WeakMap(), it = new WeakMap(), P = new WeakMap(), D = new WeakMap(), G = new WeakMap(), at = new WeakMap(), kt = new WeakMap(), Be = new WeakMap(), Pe = new WeakMap(), Xt = new WeakMap(), Kt = new WeakMap(), Lt = new WeakMap(), It = new WeakMap(), Ht = new WeakMap(), Gt = new WeakMap(), Zt = new WeakMap(), Mt = new WeakMap(), Fe = new WeakMap(), pt = new WeakMap(), $t = new WeakMap(), Jt = new WeakMap(), h(Qe, "RowManager");
614
+ let Ee = Qe;
615
+ const Qt = class Qt {
616
616
  /**
617
617
  * 🎯 레이아웃 내의 여러 rawTables 배열을 일괄로 받아 단일 마스터 템플릿으로 사전 컴파일합니다.
618
618
  */
619
- static compileAll(n) {
620
- return Array.isArray(n) ? n.map((e) => Kt.compile(e)) : [];
619
+ static compileAll(s) {
620
+ return Array.isArray(s) ? s.map((e) => Qt.compile(e)) : [];
621
621
  }
622
622
  /**
623
623
  * 🎯 단일 원본 테이블을 받아 기본 구조 보정 및 2차원 격자 인덱스 사전 부여 완료된 마스터 테이블 반환
624
624
  */
625
- static compile(n) {
626
- if (!n) return null;
625
+ static compile(s) {
626
+ if (!s) return null;
627
627
  const e = /* @__PURE__ */ h((a) => {
628
628
  a.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach((l) => {
629
629
  const f = l.getAttribute("cell-type") || "renderer";
630
630
  if (l.children.length > 0 && l.firstElementChild.tagName.includes("-")) return;
631
631
  let u = `cell-${f}`;
632
- const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), v = l.getAttribute("type");
633
- let w = [];
634
- b && w.push(`data-bind="${b}"`), g && w.push(`data-expr="${g}"`), y && w.push(`maxbyte="${y}"`), v && w.push(`type="${v}"`), l.innerHTML = `<${u} ${w.join(" ")}></${u}>`;
632
+ const b = l.getAttribute("data-bind"), g = l.getAttribute("data-expr"), y = l.getAttribute("maxbyte"), w = l.getAttribute("type");
633
+ let v = [];
634
+ b && v.push(`data-bind="${b}"`), g && v.push(`data-expr="${g}"`), y && v.push(`maxbyte="${y}"`), w && v.push(`type="${w}"`), l.innerHTML = `<${u} ${v.join(" ")}></${u}>`;
635
635
  });
636
- }, "processCellTypes"), s = /* @__PURE__ */ h((a) => {
636
+ }, "processCellTypes"), n = /* @__PURE__ */ h((a) => {
637
637
  if (!a.querySelector("colgroup")) {
638
638
  const c = a.querySelector("tbody tr") || a.querySelector("tr"), l = c ? c.querySelectorAll("th, td").length : 1, f = document.createElement("colgroup"), u = Math.max(Math.floor(a.clientWidth / l), 100);
639
639
  for (let b = 0; b < l; b++) {
@@ -656,31 +656,31 @@ const Kt = class Kt {
656
656
  });
657
657
  const g = Array.from(Array(u), () => Array(b).fill(null));
658
658
  l.forEach((y) => {
659
- const v = y.sectionRowIndex;
660
- let w = 0;
659
+ const w = y.sectionRowIndex;
660
+ let v = 0;
661
661
  Array.from(y.querySelectorAll("th,td")).forEach((m) => {
662
- for (let N = 0; N < g[v].length; N++)
663
- if (g[v][N] === null) {
664
- w = N;
662
+ for (let H = 0; H < g[w].length; H++)
663
+ if (g[w][H] === null) {
664
+ v = H;
665
665
  break;
666
666
  }
667
- const _ = m.rowSpan || 1, T = m.colSpan || 1;
668
- for (let N = 0; N < _; N++)
669
- for (let ht = 0; ht < T; ht++)
670
- v + N < u && w + ht < b && (g[v + N][w + ht] = N === 0 && ht === 0 ? "1" : "0");
667
+ const I = m.rowSpan || 1, T = m.colSpan || 1;
668
+ for (let H = 0; H < I; H++)
669
+ for (let F = 0; F < T; F++)
670
+ w + H < u && v + F < b && (g[w + H][v + F] = H === 0 && F === 0 ? "1" : "0");
671
671
  });
672
672
  }), l.forEach((y) => {
673
- const v = y.sectionRowIndex;
674
- Array.from(y.querySelectorAll("th,td")).forEach((w) => {
675
- for (let m = 0; m < g[v].length; m++)
676
- if (g[v][m] === "1") {
677
- w.dataset.col = m, g[v][m] = "0";
673
+ const w = y.sectionRowIndex;
674
+ Array.from(y.querySelectorAll("th,td")).forEach((v) => {
675
+ for (let m = 0; m < g[w].length; m++)
676
+ if (g[w][m] === "1") {
677
+ v.dataset.col = m, g[w][m] = "0";
678
678
  break;
679
679
  }
680
680
  });
681
681
  });
682
- }, "resetColIndex"), o = n.cloneNode(!0);
683
- return s(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
682
+ }, "resetColIndex"), o = s.cloneNode(!0);
683
+ return n(o), e(o), r(o, "thead"), r(o, "tbody"), r(o, "tfoot"), Array.from(o.querySelectorAll("colgroup col")).forEach((a, c) => {
684
684
  const l = a.getAttribute("fixed");
685
685
  l && o.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach((f) => {
686
686
  f.setAttribute("fixed", l);
@@ -689,54 +689,54 @@ const Kt = class Kt {
689
689
  }
690
690
  // 🎯 [추가] td/th에 선언된 cell-type 속성을 읽어 커스텀 태그로 자동 감싸기
691
691
  };
692
- h(Kt, "TableCompiler");
693
- let ye = Kt;
694
- var I, j, Y, wt, is;
695
- const Fe = class Fe {
696
- constructor(n) {
697
- d(this, Y);
698
- d(this, I);
699
- d(this, j, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
- A(this, "render", /* @__PURE__ */ h(() => {
701
- const { startRow: n, startCol: e, endRow: s, endCol: r } = t(this, j);
702
- E.log("🎨 [CellSelection.render] Rendering range ->", t(this, j));
703
- const o = t(this, I).querySelectorAll(
692
+ h(Qt, "TableCompiler");
693
+ let qe = Qt;
694
+ var _, Y, U, At, ms;
695
+ const ts = class ts {
696
+ constructor(s) {
697
+ d(this, U);
698
+ d(this, _);
699
+ d(this, Y, { startRow: -1, startCol: -1, endRow: -1, endCol: -1 });
700
+ E(this, "render", /* @__PURE__ */ h(() => {
701
+ const { startRow: s, startCol: e, endRow: n, endCol: r } = t(this, Y);
702
+ R.log("🎨 [CellSelection.render] Rendering range ->", t(this, Y));
703
+ const o = t(this, _).querySelectorAll(
704
704
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
705
705
  );
706
706
  if (o.forEach((a) => {
707
707
  a.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach((c) => {
708
708
  c.classList.remove("selected", "selected-top", "selected-bottom", "selected-left", "selected-right");
709
709
  });
710
- }), n < 0 || e < 0) {
711
- E.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
710
+ }), s < 0 || e < 0) {
711
+ R.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");
712
712
  return;
713
713
  }
714
714
  let i = 0;
715
715
  o.forEach((a) => {
716
716
  a.querySelectorAll("tbody tr").forEach((c) => {
717
717
  if (c.classList.contains("nodata")) return;
718
- const { matrixRow: l } = dt(this, Y, wt).call(this, c);
718
+ const { matrixRow: l } = Q(this, U, At).call(this, c);
719
719
  l < 0 || c.querySelectorAll("td, th").forEach((f) => {
720
720
  const u = parseInt(f.dataset.col, 10);
721
721
  if (isNaN(u)) return;
722
- const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), y = l + b - 1, v = u + g - 1;
723
- y >= n && l <= s && v >= e && u <= r && (i++, f.classList.add("selected"), l <= n && f.classList.add("selected-top"), y >= s && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), v >= r && f.classList.add("selected-right"));
722
+ const b = parseInt(f.rowSpan || 1, 10), g = parseInt(f.colSpan || 1, 10), y = l + b - 1, w = u + g - 1;
723
+ y >= s && l <= n && w >= e && u <= r && (i++, f.classList.add("selected"), l <= s && f.classList.add("selected-top"), y >= n && f.classList.add("selected-bottom"), u <= e && f.classList.add("selected-left"), w >= r && f.classList.add("selected-right"));
724
724
  });
725
725
  });
726
- }), E.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
726
+ }), R.log(`✨ [CellSelection.render] Total rendered cells marked: ${i}`);
727
727
  }, "render"));
728
- p(this, I, n), dt(this, Y, is).call(this), t(this, I).querySelectorAll(
728
+ p(this, _, s), Q(this, U, ms).call(this), t(this, _).querySelectorAll(
729
729
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
730
- ).forEach((s) => {
731
- s.addEventListener("scroll", () => {
732
- t(this, j).startRow >= 0 && t(this, j).startCol >= 0 && this.render();
730
+ ).forEach((n) => {
731
+ n.addEventListener("scroll", () => {
732
+ t(this, Y).startRow >= 0 && t(this, Y).startCol >= 0 && this.render();
733
733
  });
734
- }), E.log("🎯 [CellSelection] Initialized");
734
+ }), R.log("🎯 [CellSelection] Initialized");
735
735
  }
736
- setRange(n, e, s, r) {
737
- E.log(`🔍 [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${r}`);
738
- let o = Math.min(n, s), i = Math.max(n, s), a = Math.min(e, r), c = Math.max(e, r);
739
- const l = t(this, I).querySelectorAll(
736
+ setRange(s, e, n, r) {
737
+ R.log(`🔍 [CellSelection.setRange] Input -> startRow: ${s}, startCol: ${e}, endRow: ${n}, endCol: ${r}`);
738
+ let o = Math.min(s, n), i = Math.max(s, n), a = Math.min(e, r), c = Math.max(e, r);
739
+ const l = t(this, _).querySelectorAll(
740
740
  ".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"
741
741
  );
742
742
  let f = !0, u = 0;
@@ -744,109 +744,193 @@ const Fe = class Fe {
744
744
  f = !1, u++, l.forEach((b) => {
745
745
  b.querySelectorAll("tbody tr").forEach((g) => {
746
746
  if (g.classList.contains("nodata")) return;
747
- const { matrixRow: y } = dt(this, Y, wt).call(this, g);
748
- y < 0 || g.querySelectorAll("td, th").forEach((v) => {
749
- const w = parseInt(v.dataset.col, 10);
750
- if (isNaN(w)) return;
751
- const m = parseInt(v.rowSpan || 1, 10), _ = parseInt(v.colSpan || 1, 10), T = y + m - 1, N = w + _ - 1;
752
- if (T >= o && y <= i && N >= a && w <= c) {
753
- const Qe = Math.min(o, y), ts = Math.max(i, T), es = Math.min(a, w), ss = Math.max(c, N);
754
- (Qe !== o || ts !== i || es !== a || ss !== c) && (o = Qe, i = ts, a = es, c = ss, f = !0);
747
+ const { matrixRow: y } = Q(this, U, At).call(this, g);
748
+ y < 0 || g.querySelectorAll("td, th").forEach((w) => {
749
+ const v = parseInt(w.dataset.col, 10);
750
+ if (isNaN(v)) return;
751
+ const m = parseInt(w.rowSpan || 1, 10), I = parseInt(w.colSpan || 1, 10), T = y + m - 1, H = v + I - 1;
752
+ if (T >= o && y <= i && H >= a && v <= c) {
753
+ const X = Math.min(o, y), fs = Math.max(i, T), us = Math.min(a, v), gs = Math.max(c, H);
754
+ (X !== o || fs !== i || us !== a || gs !== c) && (o = X, i = fs, a = us, c = gs, f = !0);
755
755
  }
756
756
  });
757
757
  });
758
758
  });
759
- p(this, j, { startRow: o, startCol: a, endRow: i, endCol: c }), E.log("📦 [CellSelection.setRange] Final Range ->", t(this, j)), this.render();
759
+ p(this, Y, { startRow: o, startCol: a, endRow: i, endCol: c }), R.log("📦 [CellSelection.setRange] Final Range ->", t(this, Y)), this.render();
760
760
  }
761
761
  };
762
- I = new WeakMap(), j = new WeakMap(), Y = new WeakSet(), wt = /* @__PURE__ */ h(function(n) {
763
- if (!n || n.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
764
- const e = parseInt(n.dataset.row, 10);
762
+ _ = new WeakMap(), Y = new WeakMap(), U = new WeakSet(), At = /* @__PURE__ */ h(function(s) {
763
+ if (!s || s.classList.contains("nodata")) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
764
+ const e = parseInt(s.dataset.row, 10);
765
765
  if (isNaN(e)) return { dataRow: -1, subRowIndex: -1, matrixRow: -1 };
766
- const s = n.closest("tbody"), o = Array.from(s.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(n), a = o.length > 0 ? o.length : 1, c = e * a + (i >= 0 ? i : n.sectionRowIndex % a);
766
+ const n = s.closest("tbody"), o = Array.from(n.querySelectorAll("tr:not(.nodata)")).filter((l) => parseInt(l.dataset.row, 10) === e), i = o.indexOf(s), a = o.length > 0 ? o.length : 1, c = e * a + (i >= 0 ? i : s.sectionRowIndex % a);
767
767
  return { dataRow: e, subRowIndex: i, matrixRow: c };
768
- }, "#getMatrixRow"), is = /* @__PURE__ */ h(function() {
769
- const n = t(this, I).querySelector(".ng-container-top");
770
- if (!n) {
771
- E.log("❌ [CellSelection] .ng-container-top not found!");
768
+ }, "#getMatrixRow"), ms = /* @__PURE__ */ h(function() {
769
+ const s = t(this, _).querySelector(".ng-container-top");
770
+ if (!s) {
771
+ R.log("❌ [CellSelection] .ng-container-top not found!");
772
772
  return;
773
773
  }
774
- n.addEventListener("mousedown", (e) => {
774
+ s.addEventListener("mousedown", (e) => {
775
775
  if (e.button !== 0) return;
776
- const s = e.target.closest("td, th");
777
- if (!s || s.dataset.row === void 0 || s.dataset.col === void 0 || s.closest("tr").classList.contains("nodata")) return;
778
- t(this, I).style.userSelect = "none", t(this, I).style.webkitUserSelect = "none";
779
- const r = s.closest("tr"), { matrixRow: o } = dt(this, Y, wt).call(this, r), i = parseInt(s.dataset.col, 10);
776
+ const n = e.target.closest("td, th");
777
+ if (!n || n.dataset.row === void 0 || n.dataset.col === void 0 || n.closest("tr").classList.contains("nodata")) return;
778
+ t(this, _).style.userSelect = "none", t(this, _).style.webkitUserSelect = "none";
779
+ const r = n.closest("tr"), { matrixRow: o } = Q(this, U, At).call(this, r), i = parseInt(n.dataset.col, 10);
780
780
  if (o < 0) {
781
- t(this, I).style.userSelect = "", t(this, I).style.webkitUserSelect = "";
781
+ t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "";
782
782
  return;
783
783
  }
784
- E.log(`🖱️ [MouseDown Success] startRow: ${o}, startCol: ${i}`), this.setRange(o, i, o, i);
784
+ R.log(`🖱️ [MouseDown Success] startRow: ${o}, startCol: ${i}`), this.setRange(o, i, o, i);
785
785
  const a = /* @__PURE__ */ h((l) => {
786
786
  const f = document.elementFromPoint(l.clientX, l.clientY);
787
787
  let u = f == null ? void 0 : f.closest("td, th");
788
- if (!u || !t(this, I).contains(u)) {
789
- const v = t(this, I).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
790
- for (const w of v) {
791
- const m = w.getBoundingClientRect();
788
+ if (!u || !t(this, _).contains(u)) {
789
+ const w = t(this, _).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");
790
+ for (const v of w) {
791
+ const m = v.getBoundingClientRect();
792
792
  if (l.clientX >= m.left && l.clientX <= m.right && l.clientY >= m.top && l.clientY <= m.bottom) {
793
- u = w;
793
+ u = v;
794
794
  break;
795
795
  }
796
796
  }
797
797
  }
798
798
  if (!u || u.dataset.row === void 0 || u.dataset.col === void 0 || u.closest("tr").classList.contains("nodata")) return;
799
- const b = u.closest("tr"), { matrixRow: g } = dt(this, Y, wt).call(this, b), y = parseInt(u.dataset.col, 10);
799
+ const b = u.closest("tr"), { matrixRow: g } = Q(this, U, At).call(this, b), y = parseInt(u.dataset.col, 10);
800
800
  g < 0 || this.setRange(o, i, g, y);
801
801
  }, "onMouseMove"), c = /* @__PURE__ */ h(() => {
802
- E.log("🖱️ [MouseUp] Drag ended."), t(this, I).style.userSelect = "", t(this, I).style.webkitUserSelect = "", document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
802
+ R.log("🖱️ [MouseUp] Drag ended."), t(this, _).style.userSelect = "", t(this, _).style.webkitUserSelect = "", document.removeEventListener("mousemove", a), document.removeEventListener("mouseup", c);
803
803
  }, "onMouseUp");
804
804
  document.addEventListener("mousemove", a), document.addEventListener("mouseup", c);
805
805
  });
806
- }, "#initEvents"), h(Fe, "CellSelection");
807
- let me = Fe;
808
- var Zt, rt, ot, It, Gt, Jt, gt, Qt, te;
809
- const St = class St extends HTMLElement {
806
+ }, "#initEvents"), h(ts, "CellSelection");
807
+ let Te = ts;
808
+ var V, lt, te, ee, se, xs;
809
+ const es = class es {
810
+ constructor(s) {
811
+ d(this, se);
812
+ d(this, V);
813
+ d(this, lt, null);
814
+ d(this, te, -1);
815
+ d(this, ee, -1);
816
+ p(this, V, s), Q(this, se, xs).call(this), R.log("🎯 [CellNavigation] Initialized");
817
+ }
818
+ get currentCell() {
819
+ return t(this, lt);
820
+ }
821
+ set currentCell(s) {
822
+ if (!s) return;
823
+ p(this, lt, s), s.focus();
824
+ const e = parseInt(s.dataset.row, 10), n = parseInt(s.dataset.col, 10);
825
+ if (!isNaN(e) && !isNaN(n)) {
826
+ p(this, te, e), p(this, ee, n);
827
+ const r = s.closest("tr"), o = r == null ? void 0 : r.closest("tbody");
828
+ if (o) {
829
+ const a = Array.from(o.querySelectorAll("tr:not(.nodata)")).filter((u) => parseInt(u.dataset.row, 10) === e), c = a.length > 0 ? a.length : 1, l = a.indexOf(r), f = e * c + (l >= 0 ? l : 0);
830
+ t(this, V).selection.setRange(f, n, f, n);
831
+ }
832
+ }
833
+ }
834
+ moveCell(s) {
835
+ var I, T, H, F;
836
+ if (!t(this, lt)) return;
837
+ const e = t(this, lt), n = e.closest("tr"), r = parseInt(e.dataset.row, 10), o = parseInt(e.dataset.col, 10), i = n == null ? void 0 : n.closest("tbody"), c = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((X) => parseInt(X.dataset.row, 10) === r), l = c.length > 0 ? c.length : 1, f = c.indexOf(n);
838
+ let u = r, b = f, g = o;
839
+ switch (s.code) {
840
+ case "Tab":
841
+ s.preventDefault(), g = s.shiftKey ? o - 1 : o + 1;
842
+ break;
843
+ case "ArrowRight":
844
+ g = o + 1;
845
+ break;
846
+ case "ArrowLeft":
847
+ g = o - 1;
848
+ break;
849
+ case "ArrowDown":
850
+ s.preventDefault(), f < l - 1 ? b = f + 1 : (u = r + 1, b = 0);
851
+ break;
852
+ case "ArrowUp":
853
+ s.preventDefault(), f > 0 ? b = f - 1 : (u = r - 1, b = l - 1);
854
+ break;
855
+ }
856
+ let y = null;
857
+ const m = Array.from(i.querySelectorAll("tr:not(.nodata)")).filter((X) => parseInt(X.dataset.row, 10) === u)[b];
858
+ if (m && (y = m.querySelector(`[data-col="${g}"]`)), y)
859
+ this.currentCell = y;
860
+ else if (u !== r && u >= 0) {
861
+ const X = ((T = (I = t(this, V)).getRowHeight) == null ? void 0 : T.call(I)) || 40;
862
+ (F = (H = t(this, V)).scrollToY) == null || F.call(H, u * X);
863
+ }
864
+ }
865
+ };
866
+ V = new WeakMap(), lt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), se = new WeakSet(), xs = /* @__PURE__ */ h(function() {
867
+ t(this, V).addEventListener("mousedown", (s) => {
868
+ const e = s.target.closest("td, th");
869
+ !e || e.dataset.row === void 0 || e.dataset.col === void 0 || e.closest("tr").classList.contains("nodata") || (this.currentCell = e);
870
+ }), t(this, V).addEventListener("keydown", (s) => {
871
+ ["Tab", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(s.code) && this.moveCell(s);
872
+ });
873
+ }, "#initEvents"), h(es, "CellNavigation");
874
+ let Ce = es;
875
+ var ne, _t, Nt;
876
+ const ss = class ss {
877
+ constructor(s) {
878
+ d(this, ne);
879
+ d(this, _t);
880
+ d(this, Nt);
881
+ p(this, ne, s), p(this, _t, new Te(s)), p(this, Nt, new Ce(s)), R.log("🎯 [CellManager] Master Initialized");
882
+ }
883
+ get selection() {
884
+ return t(this, _t);
885
+ }
886
+ get navigation() {
887
+ return t(this, Nt);
888
+ }
889
+ };
890
+ ne = new WeakMap(), _t = new WeakMap(), Nt = new WeakMap(), h(ss, "CellManager");
891
+ let ke = ss;
892
+ var re, ct, ht, oe, ie, ae, yt, le, ce;
893
+ const Et = class Et extends HTMLElement {
810
894
  constructor() {
811
895
  super();
812
- d(this, Zt);
813
- d(this, rt, null);
814
- d(this, ot);
815
- d(this, It);
816
- A(this, "invalidate", /* @__PURE__ */ h(() => {
817
- E.log("sheet.invalidate()"), t(this, ot).refresh();
896
+ d(this, re);
897
+ d(this, ct, null);
898
+ d(this, ht);
899
+ d(this, oe);
900
+ E(this, "invalidate", /* @__PURE__ */ h(() => {
901
+ R.log("sheet.invalidate()"), t(this, ht).refresh();
818
902
  }, "invalidate"));
819
- A(this, "generate", /* @__PURE__ */ h((e) => {
820
- if (E.log("sheet.generate()"), !e) return;
821
- p(this, rt, ye.compile(e)), t(this, Gt).call(this), t(this, Jt).call(this);
822
- const s = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
823
- s && o && (o.style.top = `${s.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ot).initialize(), setTimeout(() => {
903
+ E(this, "generate", /* @__PURE__ */ h((e) => {
904
+ if (R.log("sheet.generate()"), !e) return;
905
+ p(this, ct, qe.compile(e)), t(this, ie).call(this), t(this, ae).call(this);
906
+ const n = this.querySelector(".ng-container-body .ng-part-header"), r = this.querySelector(".ng-container-body .ng-part-footer"), o = this.querySelector(".ng-nodata-overlay");
907
+ n && o && (o.style.top = `${n.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ht).initialize(), setTimeout(() => {
824
908
  var i;
825
909
  (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
826
910
  }, 0);
827
911
  }, "generate"));
828
- d(this, Gt, /* @__PURE__ */ h(() => {
912
+ d(this, ie, /* @__PURE__ */ h(() => {
829
913
  [
830
914
  { selector: ".ng-container-body", type: null },
831
915
  { selector: ".ng-container-left", type: "left" },
832
916
  { selector: ".ng-container-right", type: "right" }
833
- ].forEach(({ selector: s, type: r }) => {
917
+ ].forEach(({ selector: n, type: r }) => {
834
918
  var o, i, a;
835
- (o = this.querySelector(`${s} .ng-part-header`)) == null || o.appendChild(t(this, gt).call(this, t(this, rt), r, "header")), (i = this.querySelector(`${s} .ng-virtual-spacer`)) == null || i.before(t(this, gt).call(this, t(this, rt), r, "body")), (a = this.querySelector(`${s} .ng-part-footer`)) == null || a.appendChild(t(this, gt).call(this, t(this, rt), r, "footer"));
919
+ (o = this.querySelector(`${n} .ng-part-header`)) == null || o.appendChild(t(this, yt).call(this, t(this, ct), r, "header")), (i = this.querySelector(`${n} .ng-virtual-spacer`)) == null || i.before(t(this, yt).call(this, t(this, ct), r, "body")), (a = this.querySelector(`${n} .ng-part-footer`)) == null || a.appendChild(t(this, yt).call(this, t(this, ct), r, "footer"));
836
920
  });
837
921
  }, "#renderSplitContainers"));
838
- d(this, Jt, /* @__PURE__ */ h(() => {
922
+ d(this, ae, /* @__PURE__ */ h(() => {
839
923
  ["left", "right", "body"].forEach((e) => {
840
- const s = this.querySelector(`.ng-container-${e}`), r = s == null ? void 0 : s.querySelectorAll("table");
841
- if (!s || !r || r.length === 0) return;
924
+ const n = this.querySelector(`.ng-container-${e}`), r = n == null ? void 0 : n.querySelectorAll("table");
925
+ if (!n || !r || r.length === 0) return;
842
926
  let o = 0;
843
927
  r[0].querySelectorAll("col").forEach((i) => {
844
928
  const a = parseInt(i.getAttribute("width"), 10);
845
929
  isNaN(o) || (o += a);
846
- }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`);
930
+ }), e === "body" ? n.style.flex = "1" : (n.style.flex = `0 0 ${o}px`, n.style.width = `${o}px`);
847
931
  });
848
932
  }, "#updateContainerWidths"));
849
- d(this, gt, /* @__PURE__ */ h((e, s, r) => {
933
+ d(this, yt, /* @__PURE__ */ h((e, n, r) => {
850
934
  const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
851
935
  if (r === "header") {
852
936
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
@@ -854,28 +938,28 @@ const St = class St extends HTMLElement {
854
938
  f.className = "fixed-tbody", o.appendChild(f);
855
939
  }
856
940
  } else r === "body" ? (i && i.remove(), c && c.remove(), a && (a.className = "bindable-tbody")) : r === "footer" && (i && i.remove(), a && a.remove());
857
- return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
941
+ return n === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
858
942
  l.getAttribute("fixed") !== "left" && l.remove();
859
- }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
943
+ }) : n === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
860
944
  l.getAttribute("fixed") !== "right" && l.remove();
861
945
  }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
862
946
  l.remove();
863
947
  }), o;
864
948
  }, "#createSplitTable"));
865
- A(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, ot).getRowHeight(), "getRowHeight"));
866
- A(this, "scrollToX", /* @__PURE__ */ h((e) => {
867
- const s = this.querySelector(".ng-container-body .ng-part-body");
868
- s && (s.scrollLeft = e);
949
+ E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, ht).getRowHeight(), "getRowHeight"));
950
+ E(this, "scrollToX", /* @__PURE__ */ h((e) => {
951
+ const n = this.querySelector(".ng-container-body .ng-part-body");
952
+ n && (n.scrollLeft = e);
869
953
  }, "scrollToX"));
870
- A(this, "scrollToY", /* @__PURE__ */ h((e) => {
871
- const s = this.querySelector(".ng-container-body .ng-part-body");
872
- s && (s.scrollTop = e);
954
+ E(this, "scrollToY", /* @__PURE__ */ h((e) => {
955
+ const n = this.querySelector(".ng-container-body .ng-part-body");
956
+ n && (n.scrollTop = e);
873
957
  }, "scrollToY"));
874
- d(this, Qt, /* @__PURE__ */ h(() => {
875
- t(this, te).call(this), p(this, It, new me(this));
958
+ d(this, le, /* @__PURE__ */ h(() => {
959
+ t(this, ce).call(this), p(this, oe, new ke(this));
876
960
  }, "#init"));
877
- d(this, te, /* @__PURE__ */ h(() => {
878
- const e = St.SCROLLBAR_SIZE;
961
+ d(this, ce, /* @__PURE__ */ h(() => {
962
+ const e = Et.SCROLLBAR_SIZE;
879
963
  this.innerHTML = `
880
964
  <style>
881
965
  nine-table-sheet {
@@ -1076,45 +1160,42 @@ const St = class St extends HTMLElement {
1076
1160
  </div>
1077
1161
  `;
1078
1162
  }, "#render"));
1079
- p(this, ot, new pe(this)), p(this, Zt, this.getRootNode().host);
1163
+ p(this, ht, new Ee(this)), p(this, re, this.getRootNode().host);
1080
1164
  }
1081
1165
  connectedCallback() {
1082
- t(this, Qt).call(this);
1083
- }
1084
- get selection() {
1085
- return t(this, It);
1166
+ t(this, le).call(this);
1086
1167
  }
1087
1168
  disconnectedCallback() {
1088
- this.innerHTML = "", E.log("NineTableSheet destroyed.");
1169
+ this.innerHTML = "", R.log("NineTableSheet destroyed.");
1089
1170
  }
1090
1171
  };
1091
- Zt = new WeakMap(), rt = new WeakMap(), ot = new WeakMap(), It = new WeakMap(), Gt = new WeakMap(), Jt = new WeakMap(), gt = new WeakMap(), Qt = new WeakMap(), te = new WeakMap(), h(St, "NineTableSheet"), A(St, "SCROLLBAR_SIZE", 16);
1092
- let Bt = St;
1093
- customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Bt);
1094
- var ee, Mt;
1095
- const je = class je extends HTMLElement {
1172
+ re = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), oe = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), yt = new WeakMap(), le = new WeakMap(), ce = new WeakMap(), h(Et, "NineTableSheet"), E(Et, "SCROLLBAR_SIZE", 16);
1173
+ let jt = Et;
1174
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", jt);
1175
+ var he, Dt;
1176
+ const ns = class ns extends HTMLElement {
1096
1177
  constructor() {
1097
1178
  super();
1098
- d(this, ee, /* @__PURE__ */ h(() => {
1179
+ d(this, he, /* @__PURE__ */ h(() => {
1099
1180
  var e;
1100
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1181
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
1101
1182
  var i;
1102
- const r = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((i = s.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1103
- t(this, Mt).call(this, o, r);
1104
- }), t(this, Mt).call(this, 0, !1);
1183
+ const r = n.ctrlKey || n.metaKey || n.shiftKey, o = parseInt((i = n.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1184
+ t(this, Dt).call(this, o, r);
1185
+ }), t(this, Dt).call(this, 0, !1);
1105
1186
  }, "#init"));
1106
- d(this, Mt, /* @__PURE__ */ h((e, s = !1) => {
1187
+ d(this, Dt, /* @__PURE__ */ h((e, n = !1) => {
1107
1188
  const r = /* @__PURE__ */ h(() => {
1108
1189
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
1109
1190
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1110
1191
  const b = f.filter((g) => g.classList.contains("active"));
1111
1192
  b.length < 2 || b.forEach((g) => {
1112
- const y = parseInt(g.getAttribute("data-index"), 10), v = this.querySelector(`nine-splitter[data-split-index="${y}"]`), w = f[y + 1];
1113
- v && w && w.classList.contains("active") && v.style.setProperty("display", "flex");
1193
+ const y = parseInt(g.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${y}"]`), v = f[y + 1];
1194
+ w && v && v.classList.contains("active") && w.style.setProperty("display", "flex");
1114
1195
  });
1115
1196
  }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), i = this.querySelector("nine-table-sheets-body"), a = o.querySelectorAll(".nine-tab-item"), c = i.querySelectorAll("nine-table-sheet");
1116
1197
  if (!a[e]) return;
1117
- if (!s)
1198
+ if (!n)
1118
1199
  a.forEach((f, u) => {
1119
1200
  f.classList.toggle("active", u === e);
1120
1201
  }), c.forEach((f, u) => {
@@ -1136,42 +1217,42 @@ const je = class je extends HTMLElement {
1136
1217
  }, "#switchSheet"));
1137
1218
  }
1138
1219
  connectedCallback() {
1139
- t(this, ee).call(this);
1220
+ t(this, he).call(this);
1140
1221
  }
1141
1222
  };
1142
- ee = new WeakMap(), Mt = new WeakMap(), h(je, "NineTableSheets");
1143
- let xe = je;
1144
- customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", xe);
1145
- var M, se, $t, ne;
1146
- const Ye = class Ye {
1147
- constructor(n) {
1148
- d(this, M);
1149
- d(this, se, /* @__PURE__ */ h(() => {
1150
- t(this, ne).call(this), new ResizeObserver((n) => {
1151
- for (let e of n)
1152
- t(this, M).getAttribute("auto-height") === "true" && t(this, $t).call(this);
1153
- }).observe(t(this, M));
1223
+ he = new WeakMap(), Dt = new WeakMap(), h(ns, "NineTableSheets");
1224
+ let Le = ns;
1225
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Le);
1226
+ var N, de, Ot, fe;
1227
+ const rs = class rs {
1228
+ constructor(s) {
1229
+ d(this, N);
1230
+ d(this, de, /* @__PURE__ */ h(() => {
1231
+ t(this, fe).call(this), new ResizeObserver((s) => {
1232
+ for (let e of s)
1233
+ t(this, N).getAttribute("auto-height") === "true" && t(this, Ot).call(this);
1234
+ }).observe(t(this, N));
1154
1235
  }, "#init"));
1155
- d(this, $t, /* @__PURE__ */ h(() => {
1236
+ d(this, Ot, /* @__PURE__ */ h(() => {
1156
1237
  var c, l;
1157
- const n = Array.from(t(this, M).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1158
- if (n.length === 0) return;
1159
- const e = parseInt(t(this, M).getAttribute("max-display-row"), 10) || 10, s = Math.max(...n.map((f) => f.getRowHeight())), r = (c = t(this, M).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, M).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = Bt.SCROLLBAR_SIZE, a = e * s + r + o + i;
1160
- t(this, M).style.height = `${a}px`;
1238
+ const s = Array.from(t(this, N).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1239
+ if (s.length === 0) return;
1240
+ const e = parseInt(t(this, N).getAttribute("max-display-row"), 10) || 10, n = Math.max(...s.map((f) => f.getRowHeight())), r = (c = t(this, N).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (l = t(this, N).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : l.getBoundingClientRect().height, i = jt.SCROLLBAR_SIZE, a = e * n + r + o + i;
1241
+ t(this, N).style.height = `${a}px`;
1161
1242
  }, "#applyAutoHeight"));
1162
- d(this, ne, /* @__PURE__ */ h(() => {
1163
- const e = Array.from(t(this, M).children).filter((c) => c.tagName === "TABLE"), s = t(this, M).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1243
+ d(this, fe, /* @__PURE__ */ h(() => {
1244
+ const e = Array.from(t(this, N).children).filter((c) => c.tagName === "TABLE"), n = t(this, N).getAttribute("auto-height") === "true", r = e.length, o = e.map((c, l) => {
1164
1245
  const u = `<nine-table-sheet class="${l === 0 ? "active" : ""}" data-index="${l}"></nine-table-sheet>`, b = l < r - 1 ? `<nine-splitter class="h" data-split-index="${l}"></nine-splitter>` : "";
1165
1246
  return u + b;
1166
1247
  }).join(""), i = e.map((c, l) => `<div class="nine-tab-item ${l === 0 ? "active" : ""}" data-index="${l}">Sheet ${l + 1}</div>`).join("");
1167
- t(this, M).shadowRoot.innerHTML = `
1248
+ t(this, N).shadowRoot.innerHTML = `
1168
1249
  <style>
1169
1250
  :host {
1170
1251
  display: flex;
1171
1252
  flex-direction: column;
1172
1253
  position: relative;
1173
1254
  overflow: hidden;
1174
- height: ${s ? "auto" : "100%"};
1255
+ height: ${n ? "auto" : "100%"};
1175
1256
  background: #fff;
1176
1257
  }
1177
1258
 
@@ -1284,151 +1365,151 @@ const Ye = class Ye {
1284
1365
  <nine-table-analysis></nine-table-analysis>
1285
1366
  </nine-table-body>
1286
1367
  <nine-table-footer></nine-table-footer>
1287
- `, t(this, M).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1288
- const a = t(this, M).shadowRoot.querySelectorAll("nine-table-sheet");
1368
+ `, t(this, N).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1369
+ const a = t(this, N).shadowRoot.querySelectorAll("nine-table-sheet");
1289
1370
  a == null || a.forEach((c, l) => {
1290
1371
  e[l] && setTimeout(() => {
1291
- c.generate(e[l]), s && t(this, $t).call(this);
1372
+ c.generate(e[l]), n && t(this, Ot).call(this);
1292
1373
  });
1293
1374
  });
1294
1375
  }, "#render"));
1295
- p(this, M, n), t(this, se).call(this);
1376
+ p(this, N, s), t(this, de).call(this);
1296
1377
  }
1297
1378
  };
1298
- M = new WeakMap(), se = new WeakMap(), $t = new WeakMap(), ne = new WeakMap(), h(Ye, "LayoutManager");
1299
- let ve = Ye;
1300
- var _t, bt;
1301
- const Ve = class Ve {
1302
- constructor(n) {
1303
- d(this, _t);
1304
- d(this, bt, -1);
1305
- A(this, "count", /* @__PURE__ */ h(() => t(this, _t).rawRecords.length, "count"));
1306
- p(this, _t, n);
1379
+ N = new WeakMap(), de = new WeakMap(), Ot = new WeakMap(), fe = new WeakMap(), h(rs, "LayoutManager");
1380
+ let Ie = rs;
1381
+ var zt, mt;
1382
+ const os = class os {
1383
+ constructor(s) {
1384
+ d(this, zt);
1385
+ d(this, mt, -1);
1386
+ E(this, "count", /* @__PURE__ */ h(() => t(this, zt).rawRecords.length, "count"));
1387
+ p(this, zt, s);
1307
1388
  }
1308
1389
  get at() {
1309
- return t(this, bt);
1390
+ return t(this, mt);
1310
1391
  }
1311
- set at(n) {
1312
- p(this, bt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, bt)}"]`) && setTimeout(() => {
1392
+ set at(s) {
1393
+ p(this, mt, parseInt(s, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, mt)}"]`) && setTimeout(() => {
1313
1394
  });
1314
1395
  }
1315
1396
  };
1316
- _t = new WeakMap(), bt = new WeakMap(), h(Ve, "ngRow");
1317
- let we = Ve;
1318
- var W, k, z, pt, re, X, oe, it, Nt, ie, ae, yt;
1319
- const B = class B {
1320
- constructor(n, e) {
1321
- d(this, W);
1397
+ zt = new WeakMap(), mt = new WeakMap(), h(os, "ngRow");
1398
+ let He = os;
1399
+ var O, k, z, xt, ue, Z, ge, dt, Wt, be, pe, wt;
1400
+ const W = class W {
1401
+ constructor(s, e) {
1402
+ d(this, O);
1322
1403
  d(this, k);
1323
1404
  d(this, z, []);
1324
- d(this, pt, []);
1325
- d(this, re, 0);
1326
- d(this, X, []);
1327
- d(this, oe, /* @__PURE__ */ h(() => {
1328
- p(this, X, []);
1329
- const n = t(this, W).template || [];
1330
- Array.from(n).forEach((e) => {
1331
- var s;
1332
- t(this, X).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1405
+ d(this, xt, []);
1406
+ d(this, ue, 0);
1407
+ d(this, Z, []);
1408
+ d(this, ge, /* @__PURE__ */ h(() => {
1409
+ p(this, Z, []);
1410
+ const s = t(this, O).template || [];
1411
+ Array.from(s).forEach((e) => {
1412
+ var n;
1413
+ t(this, Z).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1333
1414
  }), (t(this, k).rawRecords || []).forEach((e) => {
1334
- e.__ng || (e.__ng = t(this, Nt).call(this)), e.__ng.height = t(this, X).slice();
1415
+ e.__ng || (e.__ng = t(this, Wt).call(this)), e.__ng.height = t(this, Z).slice();
1335
1416
  });
1336
1417
  }, "#initialize"));
1337
- d(this, it, /* @__PURE__ */ h(() => {
1338
- const n = t(this, W).shadowRoot.querySelector("nine-table-sheets");
1339
- n == null || n.classList.toggle("nodata", this.length === 0), t(this, W).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1418
+ d(this, dt, /* @__PURE__ */ h(() => {
1419
+ const s = t(this, O).shadowRoot.querySelector("nine-table-sheets");
1420
+ s == null || s.classList.toggle("nodata", this.length === 0), t(this, O).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1340
1421
  e.invalidate();
1341
1422
  });
1342
1423
  }, "#invalidate"));
1343
- A(this, "get", /* @__PURE__ */ h((n, e) => {
1424
+ E(this, "get", /* @__PURE__ */ h((s, e) => {
1344
1425
  var o;
1345
- const s = this.getValidData();
1346
- if (!s || s.length <= 0) return;
1347
- if (n == null) return t(this, yt).call(this, s);
1348
- if (n < 0 || n >= s.length) return null;
1349
- const r = typeof ((o = t(this, W).fields) == null ? void 0 : o.get) == "function" ? t(this, W).fields.get() : [];
1426
+ const n = this.getValidData();
1427
+ if (!n || n.length <= 0) return;
1428
+ if (s == null) return t(this, wt).call(this, n);
1429
+ if (s < 0 || s >= n.length) return null;
1430
+ const r = typeof ((o = t(this, O).fields) == null ? void 0 : o.get) == "function" ? t(this, O).fields.get() : [];
1350
1431
  if (e != null) {
1351
1432
  const i = r.indexOf(e);
1352
- return i >= 0 ? s[n].v[i] : null;
1433
+ return i >= 0 ? n[s].v[i] : null;
1353
1434
  }
1354
- return t(this, yt).call(this, s[n]);
1435
+ return t(this, wt).call(this, n[s]);
1355
1436
  }, "get"));
1356
- A(this, "set", /* @__PURE__ */ h((n) => {
1357
- this.clear(), this.add(n, !1), t(this, it).call(this);
1437
+ E(this, "set", /* @__PURE__ */ h((s) => {
1438
+ this.clear(), this.add(s, !1), t(this, dt).call(this);
1358
1439
  }, "set"));
1359
- d(this, Nt, /* @__PURE__ */ h(() => ({
1360
- rowState: B.ROW_STATE.EMPTY,
1440
+ d(this, Wt, /* @__PURE__ */ h(() => ({
1441
+ rowState: W.ROW_STATE.EMPTY,
1361
1442
  deleted: !1,
1362
1443
  filtered: !1,
1363
- height: t(this, X).slice(),
1444
+ height: t(this, Z).slice(),
1364
1445
  o: {},
1365
1446
  c: {},
1366
- _: [0, 0, 0, 0, B.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, X).slice(), -1, {}, {}]
1447
+ _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Z).slice(), -1, {}, {}]
1367
1448
  }), "#getDefaultMeta"));
1368
- A(this, "reset", /* @__PURE__ */ h(() => {
1369
- p(this, z, []), p(this, pt, []), t(this, it).call(this);
1449
+ E(this, "reset", /* @__PURE__ */ h(() => {
1450
+ p(this, z, []), p(this, xt, []), t(this, dt).call(this);
1370
1451
  }, "reset"));
1371
- A(this, "clear", /* @__PURE__ */ h(() => {
1372
- var n;
1373
- t(this, k).rawRecords = [], p(this, z, []), p(this, pt, []), (n = t(this, k).viewRecords) != null && n.reset && t(this, k).viewRecords.reset();
1452
+ E(this, "clear", /* @__PURE__ */ h(() => {
1453
+ var s;
1454
+ t(this, k).rawRecords = [], p(this, z, []), p(this, xt, []), (s = t(this, k).viewRecords) != null && s.reset && t(this, k).viewRecords.reset();
1374
1455
  }, "clear"));
1375
- d(this, ie, /* @__PURE__ */ h((n) => {
1456
+ d(this, be, /* @__PURE__ */ h((s) => {
1376
1457
  var r;
1377
- Array.isArray(n) || (n = [n]);
1378
- const e = typeof ((r = t(this, W).fields) == null ? void 0 : r.get) == "function" ? t(this, W).fields.get() : Object.keys(n[0] || {}), s = [];
1379
- return n.forEach((o) => {
1458
+ Array.isArray(s) || (s = [s]);
1459
+ const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(s[0] || {}), n = [];
1460
+ return s.forEach((o) => {
1380
1461
  const i = { v: [] };
1381
1462
  e.forEach((a) => {
1382
1463
  i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
1383
- }), s.push(i);
1384
- }), s;
1464
+ }), n.push(i);
1465
+ }), n;
1385
1466
  }, "#json2Array"));
1386
- d(this, ae, /* @__PURE__ */ h((n) => (Array.isArray(n) || (n = [n]), n.forEach((e) => {
1387
- e.__ng = t(this, Nt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = B.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1388
- }), n), "#defaultInsert"));
1389
- A(this, "add", /* @__PURE__ */ h((n, e = !0) => {
1390
- n === void 0 && (n = {});
1391
- const s = t(this, ie).call(this, n);
1392
- t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ae).call(this, s)), this.resetRecords();
1467
+ d(this, pe, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1468
+ e.__ng = t(this, Wt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1469
+ }), s), "#defaultInsert"));
1470
+ E(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1471
+ s === void 0 && (s = {});
1472
+ const n = t(this, be).call(this, s);
1473
+ t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, pe).call(this, n)), this.resetRecords();
1393
1474
  const r = this.count() - 1;
1394
- return e || s.forEach((o, i) => {
1475
+ return e || n.forEach((o, i) => {
1395
1476
  const a = t(this, k).rawRecords[r - i];
1396
- a && (a.__ng.rowState = B.ROW_STATE.EMPTY);
1397
- }), t(this, it).call(this), r;
1477
+ a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1478
+ }), t(this, dt).call(this), r;
1398
1479
  }, "add"));
1399
- A(this, "delete", /* @__PURE__ */ h((n) => {
1480
+ E(this, "delete", /* @__PURE__ */ h((s) => {
1400
1481
  let e = [];
1401
- Array.isArray(n) ? e = n : typeof n > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(n, 10)], e.sort((s, r) => r - s).forEach((s) => {
1402
- if (t(this, z)[s]) {
1403
- const r = t(this, z)[s].__ng.rowid;
1404
- t(this, z)[s].__ng.rowState === B.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, k).rawRecords.forEach((o) => {
1405
- o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = B.ROW_STATE.DELETE);
1482
+ Array.isArray(s) ? e = s : typeof s > "u" ? e = [t(this, k).host.row.at] : e = [parseInt(s, 10)], e.sort((n, r) => r - n).forEach((n) => {
1483
+ if (t(this, z)[n]) {
1484
+ const r = t(this, z)[n].__ng.rowid;
1485
+ t(this, z)[n].__ng.rowState === W.ROW_STATE.INSERT ? t(this, k).rawRecords = t(this, k).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, k).rawRecords.forEach((o) => {
1486
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = W.ROW_STATE.DELETE);
1406
1487
  });
1407
1488
  }
1408
- }), this.resetRecords(), t(this, it).call(this);
1489
+ }), this.resetRecords(), t(this, dt).call(this);
1409
1490
  }, "delete"));
1410
- A(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1491
+ E(this, "setValue", /* @__PURE__ */ h((s, e, n) => {
1411
1492
  var c;
1412
- n = parseInt(n, 10);
1413
- const o = (typeof ((c = t(this, W).fields) == null ? void 0 : c.get) == "function" ? t(this, W).fields.get() : []).indexOf(e);
1493
+ s = parseInt(s, 10);
1494
+ const o = (typeof ((c = t(this, O).fields) == null ? void 0 : c.get) == "function" ? t(this, O).fields.get() : []).indexOf(e);
1414
1495
  if (o < 0) return;
1415
- const i = this.getValidData()[n];
1496
+ const i = this.getValidData()[s];
1416
1497
  if (!i) return;
1417
1498
  const a = i.v[o];
1418
- a !== s && i.__ng.rowState !== B.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = B.ROW_STATE.UPDATE), i.v[o] = s;
1499
+ a !== n && i.__ng.rowState !== W.ROW_STATE.INSERT && (i.__ng.o.hasOwnProperty(e) || (i.__ng.o[e] = a), i.__ng.rowState = W.ROW_STATE.UPDATE), i.v[o] = n;
1419
1500
  }, "setValue"));
1420
- A(this, "resetRecords", /* @__PURE__ */ h(() => {
1421
- p(this, pt, t(this, k).rawRecords.filter((n) => !n.__ng.deleted)), p(this, z, t(this, k).rawRecords.filter((n) => !n.__ng.deleted && !n.__ng.filtered)), t(this, k).rawRecords.forEach((n, e) => {
1422
- n.__ng.rowidx = e;
1423
- }), t(this, z).forEach((n, e) => {
1424
- n.__ng.i = e;
1501
+ E(this, "resetRecords", /* @__PURE__ */ h(() => {
1502
+ p(this, xt, t(this, k).rawRecords.filter((s) => !s.__ng.deleted)), p(this, z, t(this, k).rawRecords.filter((s) => !s.__ng.deleted && !s.__ng.filtered)), t(this, k).rawRecords.forEach((s, e) => {
1503
+ s.__ng.rowidx = e;
1504
+ }), t(this, z).forEach((s, e) => {
1505
+ s.__ng.i = e;
1425
1506
  });
1426
1507
  }, "resetRecords"));
1427
- A(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1428
- d(this, yt, /* @__PURE__ */ h((n) => {
1508
+ E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1509
+ d(this, wt, /* @__PURE__ */ h((s) => {
1429
1510
  var i;
1430
- if (!n) return n;
1431
- const e = !Array.isArray(n), s = e ? [n] : n, r = typeof ((i = t(this, W).fields) == null ? void 0 : i.get) == "function" ? t(this, W).fields.get() : [], o = s.filter((a) => !a.__ng.deleted).map((a) => {
1511
+ if (!s) return s;
1512
+ const e = !Array.isArray(s), n = e ? [s] : s, r = typeof ((i = t(this, O).fields) == null ? void 0 : i.get) == "function" ? t(this, O).fields.get() : [], o = n.filter((a) => !a.__ng.deleted).map((a) => {
1432
1513
  const c = {};
1433
1514
  return r.forEach((l, f) => {
1434
1515
  c[l] = a.v ? a.v[f] : a[l];
@@ -1436,17 +1517,17 @@ const B = class B {
1436
1517
  });
1437
1518
  return e ? o[0] : o;
1438
1519
  }, "#conv"));
1439
- A(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1440
- p(this, W, n), p(this, k, e), t(this, oe).call(this);
1520
+ E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1521
+ p(this, O, s), p(this, k, e), t(this, ge).call(this);
1441
1522
  }
1442
1523
  get source() {
1443
- return t(this, yt).call(this, t(this, k).rawRecords);
1524
+ return t(this, wt).call(this, t(this, k).rawRecords);
1444
1525
  }
1445
- set source(n) {
1446
- this.clear(), this.add(n, !1);
1526
+ set source(s) {
1527
+ this.clear(), this.add(s, !1);
1447
1528
  }
1448
1529
  get nextId() {
1449
- return ++os(this, re)._;
1530
+ return ++ys(this, ue)._;
1450
1531
  }
1451
1532
  get count() {
1452
1533
  return t(this, z).length;
@@ -1458,66 +1539,66 @@ const B = class B {
1458
1539
  return this.length;
1459
1540
  }
1460
1541
  };
1461
- W = new WeakMap(), k = new WeakMap(), z = new WeakMap(), pt = new WeakMap(), re = new WeakMap(), X = new WeakMap(), oe = new WeakMap(), it = new WeakMap(), Nt = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), yt = new WeakMap(), h(B, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1462
- A(B, "ROW_STATE", {
1542
+ O = new WeakMap(), k = new WeakMap(), z = new WeakMap(), xt = new WeakMap(), ue = new WeakMap(), Z = new WeakMap(), ge = new WeakMap(), dt = new WeakMap(), Wt = new WeakMap(), be = new WeakMap(), pe = new WeakMap(), wt = new WeakMap(), h(W, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1543
+ E(W, "ROW_STATE", {
1463
1544
  EMPTY: "EMPTY",
1464
1545
  NORMAL: "NORMAL",
1465
1546
  INSERT: "INSERT",
1466
1547
  UPDATE: "UPDATE",
1467
1548
  DELETE: "DELETE"
1468
1549
  });
1469
- let Se = B;
1470
- var at;
1471
- const Ue = class Ue {
1472
- constructor(n) {
1473
- d(this, at);
1474
- p(this, at, n), this.row = new we(this), this.data = new Se(t(this, at), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1550
+ let Me = W;
1551
+ var ft;
1552
+ const is = class is {
1553
+ constructor(s) {
1554
+ d(this, ft);
1555
+ p(this, ft, s), this.row = new He(this), this.data = new Me(t(this, ft), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1475
1556
  var e;
1476
- (e = t(this, at).view) != null && e.redraw && t(this, at).view.redraw();
1557
+ (e = t(this, ft).view) != null && e.redraw && t(this, ft).view.redraw();
1477
1558
  }, this.setDataSource = (e) => {
1478
1559
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1479
1560
  }, this.getRowState = (e) => {
1480
1561
  var r, o;
1481
- const s = parseInt(e, 10);
1482
- if (!(s >= this.data.count()))
1483
- return (o = (r = this.data.getValidData()[s]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1562
+ const n = parseInt(e, 10);
1563
+ if (!(n >= this.data.count()))
1564
+ return (o = (r = this.data.getValidData()[n]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1484
1565
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1485
1566
  this.row.at = e;
1486
- }, 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) => {
1487
- e = parseInt(e, 10), this.data.setValue(e, s, r);
1567
+ }, 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) => {
1568
+ e = parseInt(e, 10), this.data.setValue(e, n, r);
1488
1569
  }, this.setDataSource([]);
1489
1570
  }
1490
1571
  };
1491
- at = new WeakMap(), h(Ue, "ngDataManager");
1492
- let Re = Ue;
1493
- var mt, H, Ot, le;
1494
- const Xe = class Xe {
1572
+ ft = new WeakMap(), h(is, "ngDataManager");
1573
+ let $e = is;
1574
+ var vt, M, Bt, ye;
1575
+ const as = class as {
1495
1576
  // 🎯 이제 { name: string, type: string } 객체들의 배열로 관리합니다.
1496
- constructor(n) {
1497
- d(this, mt);
1498
- d(this, H, []);
1499
- A(this, "add", /* @__PURE__ */ h((n, e = "string") => {
1500
- n.forEach((s) => {
1501
- t(this, H).some((r) => r.name === s) || t(this, H).push({ name: s, type: e });
1502
- }), t(this, Ot).call(this);
1577
+ constructor(s) {
1578
+ d(this, vt);
1579
+ d(this, M, []);
1580
+ E(this, "add", /* @__PURE__ */ h((s, e = "string") => {
1581
+ s.forEach((n) => {
1582
+ t(this, M).some((r) => r.name === n) || t(this, M).push({ name: n, type: e });
1583
+ }), t(this, Bt).call(this);
1503
1584
  }, "add"));
1504
- d(this, Ot, /* @__PURE__ */ h(() => {
1505
- const n = /* @__PURE__ */ new Map();
1506
- t(this, H).forEach((e) => {
1507
- n.set(e.name, e.type);
1508
- }), p(this, H, Array.from(n, ([e, s]) => ({ name: e, type: s }))), p(this, H, t(this, H).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, H).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1585
+ d(this, Bt, /* @__PURE__ */ h(() => {
1586
+ const s = /* @__PURE__ */ new Map();
1587
+ t(this, M).forEach((e) => {
1588
+ s.set(e.name, e.type);
1589
+ }), p(this, M, Array.from(s, ([e, n]) => ({ name: e, type: n }))), p(this, M, t(this, M).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, M).sort((e, n) => e.name.length < n.name.length ? 1 : -1);
1509
1590
  }, "#adjust"));
1510
- d(this, le, /* @__PURE__ */ h(() => {
1511
- p(this, H, []), E.log(t(this, mt).querySelectorAll("table"));
1512
- const n = Array.from(t(this, mt).querySelectorAll("table"));
1513
- if (!(!n || n.length === 0)) {
1514
- for (const e of n)
1515
- E.log(e), $("[data-bind]", e).each((s, r) => {
1591
+ d(this, ye, /* @__PURE__ */ h(() => {
1592
+ p(this, M, []), R.log(t(this, vt).querySelectorAll("table"));
1593
+ const s = Array.from(t(this, vt).querySelectorAll("table"));
1594
+ if (!(!s || s.length === 0)) {
1595
+ for (const e of s)
1596
+ R.log(e), $("[data-bind]", e).each((n, r) => {
1516
1597
  const o = r.dataset.bind, i = r.getAttribute("data-type") || "string";
1517
- o && t(this, H).push({ name: o, type: i });
1518
- }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1519
- $(`[${s}]`, e).each((r, o) => {
1520
- var i = o.getAttribute(s);
1598
+ o && t(this, M).push({ name: o, type: i });
1599
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1600
+ $(`[${n}]`, e).each((r, o) => {
1601
+ var i = o.getAttribute(n);
1521
1602
  if (i.indexOf("data.") < 0) {
1522
1603
  const a = i.search(/[(]/g);
1523
1604
  if (a > 0)
@@ -1531,73 +1612,73 @@ const Xe = class Xe {
1531
1612
  if (a.trim() != "") {
1532
1613
  const c = a.search(/[^_A-Za-z0-9]/g);
1533
1614
  let l = "";
1534
- c >= 0 ? l = a.substring(0, c) : i.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, H).push({ name: l, type: "string" });
1615
+ c >= 0 ? l = a.substring(0, c) : i.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, M).push({ name: l, type: "string" });
1535
1616
  }
1536
1617
  });
1537
1618
  });
1538
1619
  });
1539
- t(this, Ot).call(this);
1620
+ t(this, Bt).call(this);
1540
1621
  }
1541
1622
  }, "#init"));
1542
- p(this, mt, n), t(this, le).call(this);
1623
+ p(this, vt, s), t(this, ye).call(this);
1543
1624
  }
1544
1625
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1545
1626
  get() {
1546
- return t(this, H).map((n) => n.name);
1627
+ return t(this, M).map((s) => s.name);
1547
1628
  }
1548
1629
  // 🎯 내부 객체 통째로 얻기
1549
1630
  getFields() {
1550
- return t(this, H);
1631
+ return t(this, M);
1551
1632
  }
1552
1633
  // 🎯 특정 필드의 데이터 타입 조회
1553
- getType(n) {
1554
- const e = t(this, H).find((s) => s.name === n);
1634
+ getType(s) {
1635
+ const e = t(this, M).find((n) => n.name === s);
1555
1636
  return e ? e.type : "string";
1556
1637
  }
1557
- indexOf(n) {
1558
- return t(this, H).findIndex((e) => e.name === n);
1638
+ indexOf(s) {
1639
+ return t(this, M).findIndex((e) => e.name === s);
1559
1640
  }
1560
- includes(n) {
1561
- return t(this, H).some((e) => e.name === n);
1641
+ includes(s) {
1642
+ return t(this, M).some((e) => e.name === s);
1562
1643
  }
1563
1644
  };
1564
- mt = new WeakMap(), H = new WeakMap(), Ot = new WeakMap(), le = new WeakMap(), h(Xe, "ngFields");
1565
- let Ee = Xe;
1566
- var lt, ce, he;
1567
- const Ke = class Ke extends HTMLElement {
1645
+ vt = new WeakMap(), M = new WeakMap(), Bt = new WeakMap(), ye = new WeakMap(), h(as, "ngFields");
1646
+ let _e = as;
1647
+ var ut, me, xe;
1648
+ const ls = class ls extends HTMLElement {
1568
1649
  constructor() {
1569
1650
  super();
1570
1651
  //#created = false;
1571
- d(this, lt);
1572
- d(this, ce);
1573
- d(this, he, /* @__PURE__ */ h(() => {
1574
- this.fields = new Ee(this), p(this, ce, new ve(this)), E.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1652
+ d(this, ut);
1653
+ d(this, me);
1654
+ d(this, xe, /* @__PURE__ */ h(() => {
1655
+ this.fields = new _e(this), p(this, me, new Ie(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1575
1656
  }, "#init"));
1576
- this.attachShadow({ mode: "open" }), p(this, lt, new Re(this));
1657
+ this.attachShadow({ mode: "open" }), p(this, ut, new $e(this));
1577
1658
  }
1578
1659
  connectedCallback() {
1579
- t(this, he).call(this);
1660
+ t(this, xe).call(this);
1580
1661
  }
1581
1662
  disconnectedCallback() {
1582
- E.log("NineTable disconnected.");
1663
+ R.log("NineTable disconnected.");
1583
1664
  }
1584
1665
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1585
1666
  get data() {
1586
- return t(this, lt).data;
1667
+ return t(this, ut).data;
1587
1668
  }
1588
1669
  // 🎯 행(row) 관련 제어 접근자 오픈
1589
1670
  get row() {
1590
- return t(this, lt).row;
1671
+ return t(this, ut).row;
1591
1672
  }
1592
1673
  // 🎯 전체 데이터 매니저 접근 필요할 경우
1593
1674
  get dataManager() {
1594
- return t(this, lt);
1675
+ return t(this, ut);
1595
1676
  }
1596
1677
  };
1597
- lt = new WeakMap(), ce = new WeakMap(), he = new WeakMap(), h(Ke, "NineTable");
1598
- let Ae = Ke;
1599
- customElements.get("nine-table") || customElements.define("nine-table", Ae);
1600
- const Rt = class Rt extends HTMLElement {
1678
+ ut = new WeakMap(), me = new WeakMap(), xe = new WeakMap(), h(ls, "NineTable");
1679
+ let Ne = ls;
1680
+ customElements.get("nine-table") || customElements.define("nine-table", Ne);
1681
+ const qt = class qt extends HTMLElement {
1601
1682
  // 👈 커스텀 스타일용 캐시 추가
1602
1683
  constructor() {
1603
1684
  super();
@@ -1608,31 +1689,31 @@ const Rt = class Rt extends HTMLElement {
1608
1689
  connectedCallback() {
1609
1690
  }
1610
1691
  };
1611
- h(Rt, "BasicCellElement"), A(Rt, "_styleCache", /* @__PURE__ */ new Map()), A(Rt, "_customStyleCache", /* @__PURE__ */ new Map());
1612
- let qe = Rt;
1613
- var L, Wt, x, Me, $e, _e, Ne, Oe;
1614
- const Ze = class Ze extends qe {
1692
+ h(qt, "BasicCellElement"), E(qt, "_styleCache", /* @__PURE__ */ new Map()), E(qt, "_customStyleCache", /* @__PURE__ */ new Map());
1693
+ let De = qt;
1694
+ var L, Pt, x, je, Ye, Ve, Ue, Xe;
1695
+ const cs = class cs extends De {
1615
1696
  constructor() {
1616
1697
  super();
1617
1698
  d(this, L);
1618
- d(this, Wt);
1699
+ d(this, Pt);
1619
1700
  d(this, x);
1620
- d(this, Me);
1621
- d(this, $e);
1622
- d(this, _e);
1623
- d(this, Ne);
1624
- A(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1701
+ d(this, je);
1702
+ d(this, Ye);
1703
+ d(this, Ve);
1704
+ d(this, Ue);
1705
+ E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1625
1706
  if (t(this, x))
1626
1707
  if (t(this, x).closest("tbody")) {
1627
- const s = t(this, x).closest("tr").data, r = parseInt(t(this, x).dataset.row);
1628
- if (!s) return "";
1708
+ const n = t(this, x).closest("tr").data, r = parseInt(t(this, x).dataset.row);
1709
+ if (!n) return "";
1629
1710
  if (ninegrid.isNull(t(this, x).dataset.expr)) {
1630
1711
  if (!ninegrid.isNull(t(this, x).dataset.bind))
1631
- return s[t(this, x).dataset.bind] || ninegrid.nvl(e, "");
1712
+ return n[t(this, x).dataset.bind] || ninegrid.nvl(e, "");
1632
1713
  } else try {
1633
- return this.getExprValue(t(this, x).dataset.expr, s, r, t(this, x));
1714
+ return this.getExprValue(t(this, x).dataset.expr, n, r, t(this, x));
1634
1715
  } catch {
1635
- console.error(t(this, x).dataset.expr, s, t(this, x).dataset.row);
1716
+ console.error(t(this, x).dataset.expr, n, t(this, x).dataset.row);
1636
1717
  }
1637
1718
  return ninegrid.nvl(e, "");
1638
1719
  } else
@@ -1641,17 +1722,17 @@ const Ze = class Ze extends qe {
1641
1722
  } catch {
1642
1723
  }
1643
1724
  }, "getDisplayText"));
1644
- d(this, Oe, /* @__PURE__ */ h(() => {
1725
+ d(this, Xe, /* @__PURE__ */ h(() => {
1645
1726
  if (!(!t(this, L) || !t(this, L).template || !t(this, x).closest("tbody.bindable"))) {
1646
1727
  var e = ninegrid.j.querySelectorAll(t(this, x)).attr("suppress");
1647
1728
  if (e && (e = parseInt(e)), e && !isNaN(e)) {
1648
- var s = t(this, x).closest("tr"), r = [];
1649
- $("th,td", s).each((m, _) => {
1650
- var T = ninegrid.j.querySelectorAll(_).attr("suppress");
1651
- T && _.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
1729
+ var n = t(this, x).closest("tr"), r = [];
1730
+ $("th,td", n).each((m, I) => {
1731
+ var T = ninegrid.j.querySelectorAll(I).attr("suppress");
1732
+ T && I.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
1652
1733
  }), r.sort();
1653
1734
  var o = !1;
1654
- if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1735
+ if (parseInt(n.sectionRowIndex / t(this, L).template.length) > 0)
1655
1736
  for (var i of r) {
1656
1737
  if (i > e) break;
1657
1738
  var a = parseInt(t(this, x).dataset.row), c = a - 1, l = t(this, x).closest("tr").data, f = t(this, L).data.get(c);
@@ -1665,17 +1746,17 @@ const Ze = class Ze extends qe {
1665
1746
  else
1666
1747
  o = !0;
1667
1748
  o ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("suppress") : ninegrid.j.querySelectorAll(t(this, x)).addClass("suppress"), ninegrid.j.querySelectorAll(t(this, x)).hasClass("hidden") || (o ? ninegrid.j.querySelectorAll(t(this, x)).removeClass("hidden") : ninegrid.j.querySelectorAll(t(this, x)).addClass("hidden"));
1668
- var y = parseInt(t(this, x).dataset.matrixRow), v = y - 1, w = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, x).dataset.col}"][data-matrix-row="${v}"]`);
1669
- $(w).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").addClass("last-suppress") : !$(w).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(w).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(w).removeClass("last-none-suppress").removeClass("last-suppress");
1749
+ var y = parseInt(t(this, x).dataset.matrixRow), w = y - 1, v = t(this, L).body.querySelector(`tbody.bindable [data-col="${t(this, x).dataset.col}"][data-matrix-row="${w}"]`);
1750
+ $(v).hasClass("suppress") && !ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(v).removeClass("last-none-suppress").addClass("last-suppress") : !$(v).hasClass("suppress") && ninegrid.j.querySelectorAll(t(this, x)).hasClass("suppress") ? ninegrid.j.querySelectorAll(v).removeClass("last-suppress").addClass("last-none-suppress") : ninegrid.j.querySelectorAll(v).removeClass("last-none-suppress").removeClass("last-suppress");
1670
1751
  }
1671
1752
  }
1672
1753
  }, "#resetSuppress"));
1673
- A(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
1754
+ E(this, "getExprValue", /* @__PURE__ */ h((e, n, r, o) => {
1674
1755
  if (typeof e < "u")
1675
1756
  try {
1676
1757
  r = parseInt(r);
1677
1758
  const i = e.replace("()", "");
1678
- return t(this, L)[i] ? t(this, L)[i].call(this, s, r, t(this, x)) : t(this, L).exprFunction(e).call(this, s, r, t(this, L).data);
1759
+ return t(this, L)[i] ? t(this, L)[i].call(this, n, r, t(this, x)) : t(this, L).exprFunction(e).call(this, n, r, t(this, L).data);
1679
1760
  } catch {
1680
1761
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1681
1762
  }
@@ -1684,16 +1765,16 @@ const Ze = class Ze extends qe {
1684
1765
  }, "getExprValue"));
1685
1766
  }
1686
1767
  connectedCallback() {
1687
- super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Wt, t(this, x).closest("tr"));
1768
+ super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Pt, t(this, x).closest("tr"));
1688
1769
  }
1689
1770
  get value() {
1690
1771
  var e = !t(this, L) || !t(this, L).dataManager || !t(this, x) || !t(this, x).dataset || !t(this, x).dataset.row || !t(this, x).dataset.bind ? "" : t(this, x).closest("tr").data[t(this, x).dataset.bind];
1691
1772
  return e ?? "";
1692
1773
  }
1693
1774
  set value(e) {
1694
- var s = parseInt(t(this, x).dataset.row);
1775
+ var n = parseInt(t(this, x).dataset.row);
1695
1776
  const r = this.getAttribute("update-row-state") != "false";
1696
- s < 0 ? t(this, L).data.setValueNF(parseInt(t(this, x).dataset.index), t(this, x).dataset.bind, e, r) : t(this, L).data.setValue(s, t(this, x).dataset.bind, e, r);
1777
+ n < 0 ? t(this, L).data.setValueNF(parseInt(t(this, x).dataset.index), t(this, x).dataset.bind, e, r) : t(this, L).data.setValue(n, t(this, x).dataset.bind, e, r);
1697
1778
  }
1698
1779
  get row() {
1699
1780
  return parseInt(t(this, x).dataset.row);
@@ -1703,12 +1784,12 @@ const Ze = class Ze extends qe {
1703
1784
  }
1704
1785
  refresh() {
1705
1786
  const e = t(this, x).dataset.bind;
1706
- return parseInt(t(this, x).dataset.row), t(this, Wt).data[e];
1787
+ return parseInt(t(this, x).dataset.row), t(this, Pt).data[e];
1707
1788
  }
1708
1789
  };
1709
- L = new WeakMap(), Wt = new WeakMap(), x = new WeakMap(), Me = new WeakMap(), $e = new WeakMap(), _e = new WeakMap(), Ne = new WeakMap(), Oe = new WeakMap(), h(Ze, "CellElement");
1710
- let Te = Ze;
1711
- const Ge = class Ge extends Te {
1790
+ L = new WeakMap(), Pt = new WeakMap(), x = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), Ve = new WeakMap(), Ue = new WeakMap(), Xe = new WeakMap(), h(cs, "CellElement");
1791
+ let Oe = cs;
1792
+ const hs = class hs extends Oe {
1712
1793
  constructor() {
1713
1794
  super();
1714
1795
  }
@@ -1719,21 +1800,21 @@ const Ge = class Ge extends Te {
1719
1800
  return super.refresh();
1720
1801
  }
1721
1802
  };
1722
- h(Ge, "EditableCellElement");
1723
- let Ce = Ge;
1724
- var zt, ct, xt, vt, de, K, We;
1725
- const Je = class Je extends Ce {
1803
+ h(hs, "EditableCellElement");
1804
+ let ze = hs;
1805
+ var Ft, gt, St, Rt, we, J, Ke;
1806
+ const ds = class ds extends ze {
1726
1807
  constructor() {
1727
1808
  super();
1728
- d(this, zt);
1729
- d(this, ct);
1730
- d(this, xt);
1731
- d(this, vt);
1732
- d(this, de);
1733
- d(this, K);
1734
- A(this, "refresh", /* @__PURE__ */ h(() => {
1809
+ d(this, Ft);
1810
+ d(this, gt);
1811
+ d(this, St);
1812
+ d(this, Rt);
1813
+ d(this, we);
1814
+ d(this, J);
1815
+ E(this, "refresh", /* @__PURE__ */ h(() => {
1735
1816
  const e = super.refresh();
1736
- t(this, zt).value = e;
1817
+ t(this, Ft).value = e;
1737
1818
  }, "refresh"));
1738
1819
  /**
1739
1820
  dataRefresh = (v) => {
@@ -1765,36 +1846,36 @@ const Je = class Je extends Ce {
1765
1846
  if (!v) this.reset();
1766
1847
  };
1767
1848
  */
1768
- d(this, We, /* @__PURE__ */ h((e) => {
1849
+ d(this, Ke, /* @__PURE__ */ h((e) => {
1769
1850
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1770
- if (t(this, ct) == "number") {
1851
+ if (t(this, gt) == "number") {
1771
1852
  let o = [];
1772
- if (t(this, K) && Number(t(this, K)) > 0 && o.push("."), t(this, vt) && Number(t(this, vt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, K) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1773
- var s = e.target.value, r = s.indexOf(".");
1853
+ if (t(this, J) && Number(t(this, J)) > 0 && o.push("."), t(this, Rt) && Number(t(this, Rt)) >= 0 && o.push("-"), !(e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && !o.includes(e.key) && e.preventDefault(), t(this, J) && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105) && e.target.selectionStart == e.target.selectionEnd) {
1854
+ var n = e.target.value, r = n.indexOf(".");
1774
1855
  if (r >= 0) {
1775
- var s = s.substr(r + 1, s.length);
1776
- s.length >= Number(t(this, K)) && e.preventDefault();
1856
+ var n = n.substr(r + 1, n.length);
1857
+ n.length >= Number(t(this, J)) && e.preventDefault();
1777
1858
  }
1778
1859
  }
1779
1860
  }
1780
- t(this, xt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, xt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1861
+ t(this, St) && ninegrid.getByteLength(e.target.value) >= Number(t(this, St)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1781
1862
  }
1782
1863
  }, "#onKeyDown"));
1783
- if (this.applyBaseStyle(), p(this, ct, this.getAttribute("type") || "text"), p(this, xt, this.getAttribute("maxbyte")), p(this, vt, this.getAttribute("min")), p(this, de, this.getAttribute("max")), p(this, K, this.getAttribute("scale")), !["text", "number"].includes(t(this, ct))) throw `invalid type : ${t(this, ct)}`;
1864
+ if (this.applyBaseStyle(), p(this, gt, this.getAttribute("type") || "text"), p(this, St, this.getAttribute("maxbyte")), p(this, Rt, this.getAttribute("min")), p(this, we, this.getAttribute("max")), p(this, J, this.getAttribute("scale")), !["text", "number"].includes(t(this, gt))) throw `invalid type : ${t(this, gt)}`;
1784
1865
  }
1785
1866
  connectedCallback() {
1786
- for (var e = [], s = 0; s < this.attributes.length; s++)
1787
- ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[s].name) && e.push(`${this.attributes[s].name}="${this.attributes[s].value}"`);
1867
+ for (var e = [], n = 0; n < this.attributes.length; n++)
1868
+ ["type", "maxlength", "maxbyte", "min", "max", "step", "scale", "text-align"].includes(this.attributes[n].name) && e.push(`${this.attributes[n].name}="${this.attributes[n].value}"`);
1788
1869
  this.innerHTML = `
1789
1870
  <input type="text"
1790
1871
  ${e.join(" ")}
1791
1872
  ondragstart="return false;"
1792
1873
  >
1793
- `, super.connectedCallback(), p(this, zt, this.querySelector("input"));
1874
+ `, super.connectedCallback(), p(this, Ft, this.querySelector("input"));
1794
1875
  }
1795
1876
  };
1796
- zt = new WeakMap(), ct = new WeakMap(), xt = new WeakMap(), vt = new WeakMap(), de = new WeakMap(), K = new WeakMap(), We = new WeakMap(), h(Je, "CellInputText");
1797
- let ke = Je;
1877
+ Ft = new WeakMap(), gt = new WeakMap(), St = new WeakMap(), Rt = new WeakMap(), we = new WeakMap(), J = new WeakMap(), Ke = new WeakMap(), h(ds, "CellInputText");
1878
+ let We = ds;
1798
1879
  customElements.get("cell-input-text");
1799
- customElements.get("cell-input") || customElements.define("cell-input", ke);
1880
+ customElements.get("cell-input") || customElements.define("cell-input", We);
1800
1881
  //# sourceMappingURL=nine-table.js.map