@ninebone/table 0.0.719 → 0.0.721

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 ds = Object.defineProperty;
2
+ var fs = (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 ps = (q, s, e) => s in q ? ds(q, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : q[s] = e;
6
+ var h = (q, s) => ds(q, "name", { value: s, configurable: !0 });
7
+ var E = (q, s, e) => ps(q, typeof s != "symbol" ? s + "" : s, e), xe = (q, s, e) => s.has(q) || fs("Cannot " + e);
8
+ var t = (q, s, e) => (xe(q, s, "read from private field"), e ? e.call(q) : s.get(q)), d = (q, s, e) => s.has(q) ? fs("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(q) : s.set(q, e), p = (q, s, e, n) => (xe(q, s, "write to private field"), n ? n.call(q, e) : s.set(q, e), e), Q = (q, s, e) => (xe(q, s, "access private method"), e);
9
+ var us = (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 ys } from "@ninebone/util";
18
+ const Ue = class Ue extends ys.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(Ue, "Trace");
24
+ let we = Ue;
25
+ const R = new we();
26
+ var B, K, A, tt, et, st, jt, nt, Yt;
27
+ const Xe = class Xe 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, jt, /* @__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, Yt, /* @__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, Yt).call(this), t(this, jt).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(), jt = new WeakMap(), nt = new WeakMap(), Yt = new WeakMap(), h(Xe, "NineTableHScrollBar");
202
+ let ve = Xe;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", ve);
204
+ var rt, ot, bt, C, Tt, Ct, Vt;
205
+ const Ke = class Ke 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, Vt, /* @__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, Vt).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(), Vt = new WeakMap(), h(Ke, "NineTableVScrollBar");
354
+ let Se = Ke;
355
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", Se);
356
+ var j, S, it, P, D, G, at, kt, Oe, ze, Ut, Xt, Lt, It, Ht, Kt, Gt, Mt, We, pt, $t, Zt;
357
+ const Ge = class Ge {
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, Oe, !1);
368
+ d(this, ze, !1);
369
369
  //#ticking = false; // 🎯 고속 스크롤 스로틀링용 플래그
370
- d(this, jt, 3);
371
- A(this, "refresh", /* @__PURE__ */ h(() => {
370
+ d(this, Ut, 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, Xt, /* @__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, Ut));
464
464
  }
465
465
  }, "#updateRowCount"));
466
- d(this, Vt, /* @__PURE__ */ h(() => {
466
+ d(this, Kt, /* @__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, Gt, /* @__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, Xt).call(this, e, s);
513
+ }), t(this, Zt).call(this), t(this, Kt).call(this);
514
514
  }, "#renderAllContainers"));
515
- d(this, Ie, /* @__PURE__ */ h((n) => {
515
+ d(this, We, /* @__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, Zt, /* @__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, Gt).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(), Oe = new WeakMap(), ze = new WeakMap(), Ut = new WeakMap(), Xt = new WeakMap(), Lt = new WeakMap(), It = new WeakMap(), Ht = new WeakMap(), Kt = new WeakMap(), Gt = new WeakMap(), Mt = new WeakMap(), We = new WeakMap(), pt = new WeakMap(), $t = new WeakMap(), Zt = new WeakMap(), h(Ge, "RowManager");
614
+ let Re = Ge;
615
+ const Jt = class Jt {
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) => Jt.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(Jt, "TableCompiler");
693
+ let Ae = Jt;
694
+ var _, Y, U, At, gs;
695
+ const Ze = class Ze {
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, gs).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,177 @@ 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), ls = Math.max(i, T), cs = Math.min(a, v), hs = Math.max(c, H);
754
+ (X !== o || ls !== i || cs !== a || hs !== c) && (o = X, i = ls, a = cs, c = hs, 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"), gs = /* @__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(Ze, "CellSelection");
807
+ let Ee = Ze;
808
+ var V, lt, Qt, te, ee, bs;
809
+ const Je = class Je {
810
+ constructor(s) {
811
+ d(this, ee);
812
+ d(this, V);
813
+ d(this, lt, null);
814
+ d(this, Qt, -1);
815
+ d(this, te, -1);
816
+ p(this, V, s), Q(this, ee, bs).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, Qt, e), p(this, te, 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(), Qt = new WeakMap(), te = new WeakMap(), ee = new WeakSet(), bs = /* @__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(Je, "CellNavigation");
874
+ let qe = Je;
875
+ var se, ct, ht, _t, ne, re, oe, yt, ie, ae;
876
+ const Et = class Et extends HTMLElement {
810
877
  constructor() {
811
878
  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();
879
+ d(this, se);
880
+ d(this, ct, null);
881
+ d(this, ht);
882
+ d(this, _t);
883
+ d(this, ne);
884
+ E(this, "invalidate", /* @__PURE__ */ h(() => {
885
+ R.log("sheet.invalidate()"), t(this, ht).refresh();
818
886
  }, "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(() => {
887
+ E(this, "generate", /* @__PURE__ */ h((e) => {
888
+ if (R.log("sheet.generate()"), !e) return;
889
+ p(this, ct, Ae.compile(e)), t(this, re).call(this), t(this, oe).call(this);
890
+ 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");
891
+ n && o && (o.style.top = `${n.offsetHeight}px`), r && o && (o.style.bottom = `${r.offsetHeight}px`), t(this, ht).initialize(), setTimeout(() => {
824
892
  var i;
825
893
  (i = this.querySelector("nine-table-hscrollbar")) == null || i.refresh();
826
894
  }, 0);
827
895
  }, "generate"));
828
- d(this, Gt, /* @__PURE__ */ h(() => {
896
+ d(this, re, /* @__PURE__ */ h(() => {
829
897
  [
830
898
  { selector: ".ng-container-body", type: null },
831
899
  { selector: ".ng-container-left", type: "left" },
832
900
  { selector: ".ng-container-right", type: "right" }
833
- ].forEach(({ selector: s, type: r }) => {
901
+ ].forEach(({ selector: n, type: r }) => {
834
902
  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"));
903
+ (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
904
  });
837
905
  }, "#renderSplitContainers"));
838
- d(this, Jt, /* @__PURE__ */ h(() => {
906
+ d(this, oe, /* @__PURE__ */ h(() => {
839
907
  ["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;
908
+ const n = this.querySelector(`.ng-container-${e}`), r = n == null ? void 0 : n.querySelectorAll("table");
909
+ if (!n || !r || r.length === 0) return;
842
910
  let o = 0;
843
911
  r[0].querySelectorAll("col").forEach((i) => {
844
912
  const a = parseInt(i.getAttribute("width"), 10);
845
913
  isNaN(o) || (o += a);
846
- }), e === "body" ? s.style.flex = "1" : (s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`);
914
+ }), e === "body" ? n.style.flex = "1" : (n.style.flex = `0 0 ${o}px`, n.style.width = `${o}px`);
847
915
  });
848
916
  }, "#updateContainerWidths"));
849
- d(this, gt, /* @__PURE__ */ h((e, s, r) => {
917
+ d(this, yt, /* @__PURE__ */ h((e, n, r) => {
850
918
  const o = e.cloneNode(!0), i = o.querySelector("thead"), a = o.querySelector("tbody"), c = o.querySelector("tfoot");
851
919
  if (r === "header") {
852
920
  if (a && a.remove(), c && c.remove(), e.querySelector("tbody")) {
@@ -854,28 +922,28 @@ const St = class St extends HTMLElement {
854
922
  f.className = "fixed-tbody", o.appendChild(f);
855
923
  }
856
924
  } 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) => {
925
+ return n === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
858
926
  l.getAttribute("fixed") !== "left" && l.remove();
859
- }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
927
+ }) : n === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((l) => {
860
928
  l.getAttribute("fixed") !== "right" && l.remove();
861
929
  }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((l) => {
862
930
  l.remove();
863
931
  }), o;
864
932
  }, "#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);
933
+ E(this, "getRowHeight", /* @__PURE__ */ h(() => t(this, ht).getRowHeight(), "getRowHeight"));
934
+ E(this, "scrollToX", /* @__PURE__ */ h((e) => {
935
+ const n = this.querySelector(".ng-container-body .ng-part-body");
936
+ n && (n.scrollLeft = e);
869
937
  }, "scrollToX"));
870
- A(this, "scrollToY", /* @__PURE__ */ h((e) => {
871
- const s = this.querySelector(".ng-container-body .ng-part-body");
872
- s && (s.scrollTop = e);
938
+ E(this, "scrollToY", /* @__PURE__ */ h((e) => {
939
+ const n = this.querySelector(".ng-container-body .ng-part-body");
940
+ n && (n.scrollTop = e);
873
941
  }, "scrollToY"));
874
- d(this, Qt, /* @__PURE__ */ h(() => {
875
- t(this, te).call(this), p(this, It, new me(this));
942
+ d(this, ie, /* @__PURE__ */ h(() => {
943
+ t(this, ae).call(this), p(this, _t, new Ee(this)), p(this, ne, new qe(this));
876
944
  }, "#init"));
877
- d(this, te, /* @__PURE__ */ h(() => {
878
- const e = St.SCROLLBAR_SIZE;
945
+ d(this, ae, /* @__PURE__ */ h(() => {
946
+ const e = Et.SCROLLBAR_SIZE;
879
947
  this.innerHTML = `
880
948
  <style>
881
949
  nine-table-sheet {
@@ -1076,45 +1144,45 @@ const St = class St extends HTMLElement {
1076
1144
  </div>
1077
1145
  `;
1078
1146
  }, "#render"));
1079
- p(this, ot, new pe(this)), p(this, Zt, this.getRootNode().host);
1147
+ p(this, ht, new Re(this)), p(this, se, this.getRootNode().host);
1080
1148
  }
1081
1149
  connectedCallback() {
1082
- t(this, Qt).call(this);
1150
+ t(this, ie).call(this);
1083
1151
  }
1084
1152
  get selection() {
1085
- return t(this, It);
1153
+ return t(this, _t);
1086
1154
  }
1087
1155
  disconnectedCallback() {
1088
- this.innerHTML = "", E.log("NineTableSheet destroyed.");
1156
+ this.innerHTML = "", R.log("NineTableSheet destroyed.");
1089
1157
  }
1090
1158
  };
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 {
1159
+ se = new WeakMap(), ct = new WeakMap(), ht = new WeakMap(), _t = new WeakMap(), ne = new WeakMap(), re = new WeakMap(), oe = new WeakMap(), yt = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), h(Et, "NineTableSheet"), E(Et, "SCROLLBAR_SIZE", 16);
1160
+ let Ft = Et;
1161
+ customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", Ft);
1162
+ var le, Nt;
1163
+ const Qe = class Qe extends HTMLElement {
1096
1164
  constructor() {
1097
1165
  super();
1098
- d(this, ee, /* @__PURE__ */ h(() => {
1166
+ d(this, le, /* @__PURE__ */ h(() => {
1099
1167
  var e;
1100
- (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
1168
+ (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (n) => {
1101
1169
  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);
1170
+ const r = n.ctrlKey || n.metaKey || n.shiftKey, o = parseInt((i = n.target.closest(".nine-tab-item")) == null ? void 0 : i.dataset.index, 10);
1171
+ t(this, Nt).call(this, o, r);
1172
+ }), t(this, Nt).call(this, 0, !1);
1105
1173
  }, "#init"));
1106
- d(this, Mt, /* @__PURE__ */ h((e, s = !1) => {
1174
+ d(this, Nt, /* @__PURE__ */ h((e, n = !1) => {
1107
1175
  const r = /* @__PURE__ */ h(() => {
1108
1176
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
1109
1177
  Array.from(this.querySelectorAll("nine-splitter")).forEach((g) => g.style.setProperty("display", "none"));
1110
1178
  const b = f.filter((g) => g.classList.contains("active"));
1111
1179
  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");
1180
+ const y = parseInt(g.getAttribute("data-index"), 10), w = this.querySelector(`nine-splitter[data-split-index="${y}"]`), v = f[y + 1];
1181
+ w && v && v.classList.contains("active") && w.style.setProperty("display", "flex");
1114
1182
  });
1115
1183
  }, "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
1184
  if (!a[e]) return;
1117
- if (!s)
1185
+ if (!n)
1118
1186
  a.forEach((f, u) => {
1119
1187
  f.classList.toggle("active", u === e);
1120
1188
  }), c.forEach((f, u) => {
@@ -1136,42 +1204,42 @@ const je = class je extends HTMLElement {
1136
1204
  }, "#switchSheet"));
1137
1205
  }
1138
1206
  connectedCallback() {
1139
- t(this, ee).call(this);
1207
+ t(this, le).call(this);
1140
1208
  }
1141
1209
  };
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));
1210
+ le = new WeakMap(), Nt = new WeakMap(), h(Qe, "NineTableSheets");
1211
+ let Te = Qe;
1212
+ customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Te);
1213
+ var N, ce, Dt, he;
1214
+ const ts = class ts {
1215
+ constructor(s) {
1216
+ d(this, N);
1217
+ d(this, ce, /* @__PURE__ */ h(() => {
1218
+ t(this, he).call(this), new ResizeObserver((s) => {
1219
+ for (let e of s)
1220
+ t(this, N).getAttribute("auto-height") === "true" && t(this, Dt).call(this);
1221
+ }).observe(t(this, N));
1154
1222
  }, "#init"));
1155
- d(this, $t, /* @__PURE__ */ h(() => {
1223
+ d(this, Dt, /* @__PURE__ */ h(() => {
1156
1224
  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`;
1225
+ const s = Array.from(t(this, N).shadowRoot.querySelectorAll("nine-table-sheet.active"));
1226
+ if (s.length === 0) return;
1227
+ 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 = Ft.SCROLLBAR_SIZE, a = e * n + r + o + i;
1228
+ t(this, N).style.height = `${a}px`;
1161
1229
  }, "#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) => {
1230
+ d(this, he, /* @__PURE__ */ h(() => {
1231
+ 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
1232
  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
1233
  return u + b;
1166
1234
  }).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 = `
1235
+ t(this, N).shadowRoot.innerHTML = `
1168
1236
  <style>
1169
1237
  :host {
1170
1238
  display: flex;
1171
1239
  flex-direction: column;
1172
1240
  position: relative;
1173
1241
  overflow: hidden;
1174
- height: ${s ? "auto" : "100%"};
1242
+ height: ${n ? "auto" : "100%"};
1175
1243
  background: #fff;
1176
1244
  }
1177
1245
 
@@ -1284,151 +1352,151 @@ const Ye = class Ye {
1284
1352
  <nine-table-analysis></nine-table-analysis>
1285
1353
  </nine-table-body>
1286
1354
  <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");
1355
+ `, t(this, N).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");
1356
+ const a = t(this, N).shadowRoot.querySelectorAll("nine-table-sheet");
1289
1357
  a == null || a.forEach((c, l) => {
1290
1358
  e[l] && setTimeout(() => {
1291
- c.generate(e[l]), s && t(this, $t).call(this);
1359
+ c.generate(e[l]), n && t(this, Dt).call(this);
1292
1360
  });
1293
1361
  });
1294
1362
  }, "#render"));
1295
- p(this, M, n), t(this, se).call(this);
1363
+ p(this, N, s), t(this, ce).call(this);
1296
1364
  }
1297
1365
  };
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);
1366
+ N = new WeakMap(), ce = new WeakMap(), Dt = new WeakMap(), he = new WeakMap(), h(ts, "LayoutManager");
1367
+ let Ce = ts;
1368
+ var Ot, mt;
1369
+ const es = class es {
1370
+ constructor(s) {
1371
+ d(this, Ot);
1372
+ d(this, mt, -1);
1373
+ E(this, "count", /* @__PURE__ */ h(() => t(this, Ot).rawRecords.length, "count"));
1374
+ p(this, Ot, s);
1307
1375
  }
1308
1376
  get at() {
1309
- return t(this, bt);
1377
+ return t(this, mt);
1310
1378
  }
1311
- set at(n) {
1312
- p(this, bt, parseInt(n, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, bt)}"]`) && setTimeout(() => {
1379
+ set at(s) {
1380
+ p(this, mt, parseInt(s, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, mt)}"]`) && setTimeout(() => {
1313
1381
  });
1314
1382
  }
1315
1383
  };
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);
1384
+ Ot = new WeakMap(), mt = new WeakMap(), h(es, "ngRow");
1385
+ let ke = es;
1386
+ var O, k, z, xt, de, Z, fe, dt, zt, ue, ge, wt;
1387
+ const W = class W {
1388
+ constructor(s, e) {
1389
+ d(this, O);
1322
1390
  d(this, k);
1323
1391
  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);
1392
+ d(this, xt, []);
1393
+ d(this, de, 0);
1394
+ d(this, Z, []);
1395
+ d(this, fe, /* @__PURE__ */ h(() => {
1396
+ p(this, Z, []);
1397
+ const s = t(this, O).template || [];
1398
+ Array.from(s).forEach((e) => {
1399
+ var n;
1400
+ t(this, Z).push(((n = e.getBoundingClientRect) == null ? void 0 : n.call(e).height) || 24);
1333
1401
  }), (t(this, k).rawRecords || []).forEach((e) => {
1334
- e.__ng || (e.__ng = t(this, Nt).call(this)), e.__ng.height = t(this, X).slice();
1402
+ e.__ng || (e.__ng = t(this, zt).call(this)), e.__ng.height = t(this, Z).slice();
1335
1403
  });
1336
1404
  }, "#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) => {
1405
+ d(this, dt, /* @__PURE__ */ h(() => {
1406
+ const s = t(this, O).shadowRoot.querySelector("nine-table-sheets");
1407
+ s == null || s.classList.toggle("nodata", this.length === 0), t(this, O).shadowRoot.querySelectorAll("nine-table-sheet").forEach((e) => {
1340
1408
  e.invalidate();
1341
1409
  });
1342
1410
  }, "#invalidate"));
1343
- A(this, "get", /* @__PURE__ */ h((n, e) => {
1411
+ E(this, "get", /* @__PURE__ */ h((s, e) => {
1344
1412
  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() : [];
1413
+ const n = this.getValidData();
1414
+ if (!n || n.length <= 0) return;
1415
+ if (s == null) return t(this, wt).call(this, n);
1416
+ if (s < 0 || s >= n.length) return null;
1417
+ const r = typeof ((o = t(this, O).fields) == null ? void 0 : o.get) == "function" ? t(this, O).fields.get() : [];
1350
1418
  if (e != null) {
1351
1419
  const i = r.indexOf(e);
1352
- return i >= 0 ? s[n].v[i] : null;
1420
+ return i >= 0 ? n[s].v[i] : null;
1353
1421
  }
1354
- return t(this, yt).call(this, s[n]);
1422
+ return t(this, wt).call(this, n[s]);
1355
1423
  }, "get"));
1356
- A(this, "set", /* @__PURE__ */ h((n) => {
1357
- this.clear(), this.add(n, !1), t(this, it).call(this);
1424
+ E(this, "set", /* @__PURE__ */ h((s) => {
1425
+ this.clear(), this.add(s, !1), t(this, dt).call(this);
1358
1426
  }, "set"));
1359
- d(this, Nt, /* @__PURE__ */ h(() => ({
1360
- rowState: B.ROW_STATE.EMPTY,
1427
+ d(this, zt, /* @__PURE__ */ h(() => ({
1428
+ rowState: W.ROW_STATE.EMPTY,
1361
1429
  deleted: !1,
1362
1430
  filtered: !1,
1363
- height: t(this, X).slice(),
1431
+ height: t(this, Z).slice(),
1364
1432
  o: {},
1365
1433
  c: {},
1366
- _: [0, 0, 0, 0, B.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, X).slice(), -1, {}, {}]
1434
+ _: [0, 0, 0, 0, W.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, Z).slice(), -1, {}, {}]
1367
1435
  }), "#getDefaultMeta"));
1368
- A(this, "reset", /* @__PURE__ */ h(() => {
1369
- p(this, z, []), p(this, pt, []), t(this, it).call(this);
1436
+ E(this, "reset", /* @__PURE__ */ h(() => {
1437
+ p(this, z, []), p(this, xt, []), t(this, dt).call(this);
1370
1438
  }, "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();
1439
+ E(this, "clear", /* @__PURE__ */ h(() => {
1440
+ var s;
1441
+ t(this, k).rawRecords = [], p(this, z, []), p(this, xt, []), (s = t(this, k).viewRecords) != null && s.reset && t(this, k).viewRecords.reset();
1374
1442
  }, "clear"));
1375
- d(this, ie, /* @__PURE__ */ h((n) => {
1443
+ d(this, ue, /* @__PURE__ */ h((s) => {
1376
1444
  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) => {
1445
+ Array.isArray(s) || (s = [s]);
1446
+ const e = typeof ((r = t(this, O).fields) == null ? void 0 : r.get) == "function" ? t(this, O).fields.get() : Object.keys(s[0] || {}), n = [];
1447
+ return s.forEach((o) => {
1380
1448
  const i = { v: [] };
1381
1449
  e.forEach((a) => {
1382
1450
  i.v.push(o[a] !== void 0 && o[a] !== null ? o[a] : "");
1383
- }), s.push(i);
1384
- }), s;
1451
+ }), n.push(i);
1452
+ }), n;
1385
1453
  }, "#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();
1454
+ d(this, ge, /* @__PURE__ */ h((s) => (Array.isArray(s) || (s = [s]), s.forEach((e) => {
1455
+ e.__ng = t(this, zt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = W.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1456
+ }), s), "#defaultInsert"));
1457
+ E(this, "add", /* @__PURE__ */ h((s, e = !0) => {
1458
+ s === void 0 && (s = {});
1459
+ const n = t(this, ue).call(this, s);
1460
+ t(this, k).rawRecords = t(this, k).rawRecords.concat(t(this, ge).call(this, n)), this.resetRecords();
1393
1461
  const r = this.count() - 1;
1394
- return e || s.forEach((o, i) => {
1462
+ return e || n.forEach((o, i) => {
1395
1463
  const a = t(this, k).rawRecords[r - i];
1396
- a && (a.__ng.rowState = B.ROW_STATE.EMPTY);
1397
- }), t(this, it).call(this), r;
1464
+ a && (a.__ng.rowState = W.ROW_STATE.EMPTY);
1465
+ }), t(this, dt).call(this), r;
1398
1466
  }, "add"));
1399
- A(this, "delete", /* @__PURE__ */ h((n) => {
1467
+ E(this, "delete", /* @__PURE__ */ h((s) => {
1400
1468
  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);
1469
+ 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) => {
1470
+ if (t(this, z)[n]) {
1471
+ const r = t(this, z)[n].__ng.rowid;
1472
+ 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) => {
1473
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = W.ROW_STATE.DELETE);
1406
1474
  });
1407
1475
  }
1408
- }), this.resetRecords(), t(this, it).call(this);
1476
+ }), this.resetRecords(), t(this, dt).call(this);
1409
1477
  }, "delete"));
1410
- A(this, "setValue", /* @__PURE__ */ h((n, e, s) => {
1478
+ E(this, "setValue", /* @__PURE__ */ h((s, e, n) => {
1411
1479
  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);
1480
+ s = parseInt(s, 10);
1481
+ const o = (typeof ((c = t(this, O).fields) == null ? void 0 : c.get) == "function" ? t(this, O).fields.get() : []).indexOf(e);
1414
1482
  if (o < 0) return;
1415
- const i = this.getValidData()[n];
1483
+ const i = this.getValidData()[s];
1416
1484
  if (!i) return;
1417
1485
  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;
1486
+ 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
1487
  }, "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;
1488
+ E(this, "resetRecords", /* @__PURE__ */ h(() => {
1489
+ 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) => {
1490
+ s.__ng.rowidx = e;
1491
+ }), t(this, z).forEach((s, e) => {
1492
+ s.__ng.i = e;
1425
1493
  });
1426
1494
  }, "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) => {
1495
+ E(this, "getValidData", /* @__PURE__ */ h(() => (t(this, z).length === 0 && t(this, k).rawRecords.length > 0 && this.resetRecords(), t(this, z)), "getValidData"));
1496
+ d(this, wt, /* @__PURE__ */ h((s) => {
1429
1497
  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) => {
1498
+ if (!s) return s;
1499
+ 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
1500
  const c = {};
1433
1501
  return r.forEach((l, f) => {
1434
1502
  c[l] = a.v ? a.v[f] : a[l];
@@ -1436,17 +1504,17 @@ const B = class B {
1436
1504
  });
1437
1505
  return e ? o[0] : o;
1438
1506
  }, "#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);
1507
+ E(this, "count", /* @__PURE__ */ h(() => this.getValidData().length, "count"));
1508
+ p(this, O, s), p(this, k, e), t(this, fe).call(this);
1441
1509
  }
1442
1510
  get source() {
1443
- return t(this, yt).call(this, t(this, k).rawRecords);
1511
+ return t(this, wt).call(this, t(this, k).rawRecords);
1444
1512
  }
1445
- set source(n) {
1446
- this.clear(), this.add(n, !1);
1513
+ set source(s) {
1514
+ this.clear(), this.add(s, !1);
1447
1515
  }
1448
1516
  get nextId() {
1449
- return ++os(this, re)._;
1517
+ return ++us(this, de)._;
1450
1518
  }
1451
1519
  get count() {
1452
1520
  return t(this, z).length;
@@ -1458,66 +1526,66 @@ const B = class B {
1458
1526
  return this.length;
1459
1527
  }
1460
1528
  };
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", {
1529
+ O = new WeakMap(), k = new WeakMap(), z = new WeakMap(), xt = new WeakMap(), de = new WeakMap(), Z = new WeakMap(), fe = new WeakMap(), dt = new WeakMap(), zt = new WeakMap(), ue = new WeakMap(), ge = new WeakMap(), wt = new WeakMap(), h(W, "ngData"), // 🎯 행 상태 정의 상수를 클래스 내부로 내재화
1530
+ E(W, "ROW_STATE", {
1463
1531
  EMPTY: "EMPTY",
1464
1532
  NORMAL: "NORMAL",
1465
1533
  INSERT: "INSERT",
1466
1534
  UPDATE: "UPDATE",
1467
1535
  DELETE: "DELETE"
1468
1536
  });
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 = () => {
1537
+ let Le = W;
1538
+ var ft;
1539
+ const ss = class ss {
1540
+ constructor(s) {
1541
+ d(this, ft);
1542
+ p(this, ft, s), this.row = new ke(this), this.data = new Le(t(this, ft), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1475
1543
  var e;
1476
- (e = t(this, at).view) != null && e.redraw && t(this, at).view.redraw();
1544
+ (e = t(this, ft).view) != null && e.redraw && t(this, ft).view.redraw();
1477
1545
  }, this.setDataSource = (e) => {
1478
1546
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1479
1547
  }, this.getRowState = (e) => {
1480
1548
  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;
1549
+ const n = parseInt(e, 10);
1550
+ if (!(n >= this.data.count()))
1551
+ return (o = (r = this.data.getValidData()[n]) == null ? void 0 : r.__ng) == null ? void 0 : o.rowState;
1484
1552
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1485
1553
  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);
1554
+ }, 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) => {
1555
+ e = parseInt(e, 10), this.data.setValue(e, n, r);
1488
1556
  }, this.setDataSource([]);
1489
1557
  }
1490
1558
  };
1491
- at = new WeakMap(), h(Ue, "ngDataManager");
1492
- let Re = Ue;
1493
- var mt, H, Ot, le;
1494
- const Xe = class Xe {
1559
+ ft = new WeakMap(), h(ss, "ngDataManager");
1560
+ let Ie = ss;
1561
+ var vt, M, Wt, be;
1562
+ const ns = class ns {
1495
1563
  // 🎯 이제 { 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);
1564
+ constructor(s) {
1565
+ d(this, vt);
1566
+ d(this, M, []);
1567
+ E(this, "add", /* @__PURE__ */ h((s, e = "string") => {
1568
+ s.forEach((n) => {
1569
+ t(this, M).some((r) => r.name === n) || t(this, M).push({ name: n, type: e });
1570
+ }), t(this, Wt).call(this);
1503
1571
  }, "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);
1572
+ d(this, Wt, /* @__PURE__ */ h(() => {
1573
+ const s = /* @__PURE__ */ new Map();
1574
+ t(this, M).forEach((e) => {
1575
+ s.set(e.name, e.type);
1576
+ }), 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
1577
  }, "#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) => {
1578
+ d(this, be, /* @__PURE__ */ h(() => {
1579
+ p(this, M, []), R.log(t(this, vt).querySelectorAll("table"));
1580
+ const s = Array.from(t(this, vt).querySelectorAll("table"));
1581
+ if (!(!s || s.length === 0)) {
1582
+ for (const e of s)
1583
+ R.log(e), $("[data-bind]", e).each((n, r) => {
1516
1584
  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);
1585
+ o && t(this, M).push({ name: o, type: i });
1586
+ }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((n) => {
1587
+ $(`[${n}]`, e).each((r, o) => {
1588
+ var i = o.getAttribute(n);
1521
1589
  if (i.indexOf("data.") < 0) {
1522
1590
  const a = i.search(/[(]/g);
1523
1591
  if (a > 0)
@@ -1531,73 +1599,73 @@ const Xe = class Xe {
1531
1599
  if (a.trim() != "") {
1532
1600
  const c = a.search(/[^_A-Za-z0-9]/g);
1533
1601
  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" });
1602
+ c >= 0 ? l = a.substring(0, c) : i.startsWith("data.") && (l = a.replace("data.", "")), l && t(this, M).push({ name: l, type: "string" });
1535
1603
  }
1536
1604
  });
1537
1605
  });
1538
1606
  });
1539
- t(this, Ot).call(this);
1607
+ t(this, Wt).call(this);
1540
1608
  }
1541
1609
  }, "#init"));
1542
- p(this, mt, n), t(this, le).call(this);
1610
+ p(this, vt, s), t(this, be).call(this);
1543
1611
  }
1544
1612
  // 🎯 기존에 필드 이름만 쓰던 곳들과의 호환을 위해 이름 배열만 리턴하는 메서드 유지
1545
1613
  get() {
1546
- return t(this, H).map((n) => n.name);
1614
+ return t(this, M).map((s) => s.name);
1547
1615
  }
1548
1616
  // 🎯 내부 객체 통째로 얻기
1549
1617
  getFields() {
1550
- return t(this, H);
1618
+ return t(this, M);
1551
1619
  }
1552
1620
  // 🎯 특정 필드의 데이터 타입 조회
1553
- getType(n) {
1554
- const e = t(this, H).find((s) => s.name === n);
1621
+ getType(s) {
1622
+ const e = t(this, M).find((n) => n.name === s);
1555
1623
  return e ? e.type : "string";
1556
1624
  }
1557
- indexOf(n) {
1558
- return t(this, H).findIndex((e) => e.name === n);
1625
+ indexOf(s) {
1626
+ return t(this, M).findIndex((e) => e.name === s);
1559
1627
  }
1560
- includes(n) {
1561
- return t(this, H).some((e) => e.name === n);
1628
+ includes(s) {
1629
+ return t(this, M).some((e) => e.name === s);
1562
1630
  }
1563
1631
  };
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 {
1632
+ vt = new WeakMap(), M = new WeakMap(), Wt = new WeakMap(), be = new WeakMap(), h(ns, "ngFields");
1633
+ let He = ns;
1634
+ var ut, pe, ye;
1635
+ const rs = class rs extends HTMLElement {
1568
1636
  constructor() {
1569
1637
  super();
1570
1638
  //#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 } }));
1639
+ d(this, ut);
1640
+ d(this, pe);
1641
+ d(this, ye, /* @__PURE__ */ h(() => {
1642
+ this.fields = new He(this), p(this, pe, new Ce(this)), R.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1575
1643
  }, "#init"));
1576
- this.attachShadow({ mode: "open" }), p(this, lt, new Re(this));
1644
+ this.attachShadow({ mode: "open" }), p(this, ut, new Ie(this));
1577
1645
  }
1578
1646
  connectedCallback() {
1579
- t(this, he).call(this);
1647
+ t(this, ye).call(this);
1580
1648
  }
1581
1649
  disconnectedCallback() {
1582
- E.log("NineTable disconnected.");
1650
+ R.log("NineTable disconnected.");
1583
1651
  }
1584
1652
  // 🎯 외부에서 grid.data.set(...) 형태로 접근할 수 있도록 데이터 매니저 오픈
1585
1653
  get data() {
1586
- return t(this, lt).data;
1654
+ return t(this, ut).data;
1587
1655
  }
1588
1656
  // 🎯 행(row) 관련 제어 접근자 오픈
1589
1657
  get row() {
1590
- return t(this, lt).row;
1658
+ return t(this, ut).row;
1591
1659
  }
1592
1660
  // 🎯 전체 데이터 매니저 접근 필요할 경우
1593
1661
  get dataManager() {
1594
- return t(this, lt);
1662
+ return t(this, ut);
1595
1663
  }
1596
1664
  };
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 {
1665
+ ut = new WeakMap(), pe = new WeakMap(), ye = new WeakMap(), h(rs, "NineTable");
1666
+ let Me = rs;
1667
+ customElements.get("nine-table") || customElements.define("nine-table", Me);
1668
+ const qt = class qt extends HTMLElement {
1601
1669
  // 👈 커스텀 스타일용 캐시 추가
1602
1670
  constructor() {
1603
1671
  super();
@@ -1608,31 +1676,31 @@ const Rt = class Rt extends HTMLElement {
1608
1676
  connectedCallback() {
1609
1677
  }
1610
1678
  };
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 {
1679
+ h(qt, "BasicCellElement"), E(qt, "_styleCache", /* @__PURE__ */ new Map()), E(qt, "_customStyleCache", /* @__PURE__ */ new Map());
1680
+ let $e = qt;
1681
+ var L, Bt, x, Be, Pe, Fe, je, Ye;
1682
+ const os = class os extends $e {
1615
1683
  constructor() {
1616
1684
  super();
1617
1685
  d(this, L);
1618
- d(this, Wt);
1686
+ d(this, Bt);
1619
1687
  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) => {
1688
+ d(this, Be);
1689
+ d(this, Pe);
1690
+ d(this, Fe);
1691
+ d(this, je);
1692
+ E(this, "getDisplayText", /* @__PURE__ */ h((e) => {
1625
1693
  if (t(this, x))
1626
1694
  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 "";
1695
+ const n = t(this, x).closest("tr").data, r = parseInt(t(this, x).dataset.row);
1696
+ if (!n) return "";
1629
1697
  if (ninegrid.isNull(t(this, x).dataset.expr)) {
1630
1698
  if (!ninegrid.isNull(t(this, x).dataset.bind))
1631
- return s[t(this, x).dataset.bind] || ninegrid.nvl(e, "");
1699
+ return n[t(this, x).dataset.bind] || ninegrid.nvl(e, "");
1632
1700
  } else try {
1633
- return this.getExprValue(t(this, x).dataset.expr, s, r, t(this, x));
1701
+ return this.getExprValue(t(this, x).dataset.expr, n, r, t(this, x));
1634
1702
  } catch {
1635
- console.error(t(this, x).dataset.expr, s, t(this, x).dataset.row);
1703
+ console.error(t(this, x).dataset.expr, n, t(this, x).dataset.row);
1636
1704
  }
1637
1705
  return ninegrid.nvl(e, "");
1638
1706
  } else
@@ -1641,17 +1709,17 @@ const Ze = class Ze extends qe {
1641
1709
  } catch {
1642
1710
  }
1643
1711
  }, "getDisplayText"));
1644
- d(this, Oe, /* @__PURE__ */ h(() => {
1712
+ d(this, Ye, /* @__PURE__ */ h(() => {
1645
1713
  if (!(!t(this, L) || !t(this, L).template || !t(this, x).closest("tbody.bindable"))) {
1646
1714
  var e = ninegrid.j.querySelectorAll(t(this, x)).attr("suppress");
1647
1715
  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));
1716
+ var n = t(this, x).closest("tr"), r = [];
1717
+ $("th,td", n).each((m, I) => {
1718
+ var T = ninegrid.j.querySelectorAll(I).attr("suppress");
1719
+ T && I.dataset.row && (T = parseInt(T), !isNaN(T) && T <= e && r.push(T));
1652
1720
  }), r.sort();
1653
1721
  var o = !1;
1654
- if (parseInt(s.sectionRowIndex / t(this, L).template.length) > 0)
1722
+ if (parseInt(n.sectionRowIndex / t(this, L).template.length) > 0)
1655
1723
  for (var i of r) {
1656
1724
  if (i > e) break;
1657
1725
  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 +1733,17 @@ const Ze = class Ze extends qe {
1665
1733
  else
1666
1734
  o = !0;
1667
1735
  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");
1736
+ 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}"]`);
1737
+ $(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
1738
  }
1671
1739
  }
1672
1740
  }, "#resetSuppress"));
1673
- A(this, "getExprValue", /* @__PURE__ */ h((e, s, r, o) => {
1741
+ E(this, "getExprValue", /* @__PURE__ */ h((e, n, r, o) => {
1674
1742
  if (typeof e < "u")
1675
1743
  try {
1676
1744
  r = parseInt(r);
1677
1745
  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);
1746
+ 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
1747
  } catch {
1680
1748
  return ["NG-COMBO"].includes(this.tagName) ? "" : e;
1681
1749
  }
@@ -1684,16 +1752,16 @@ const Ze = class Ze extends qe {
1684
1752
  }, "getExprValue"));
1685
1753
  }
1686
1754
  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"));
1755
+ super.connectedCallback(), p(this, L, this.getRootNode().host), p(this, x, this.closest("th,td")), p(this, Bt, t(this, x).closest("tr"));
1688
1756
  }
1689
1757
  get value() {
1690
1758
  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
1759
  return e ?? "";
1692
1760
  }
1693
1761
  set value(e) {
1694
- var s = parseInt(t(this, x).dataset.row);
1762
+ var n = parseInt(t(this, x).dataset.row);
1695
1763
  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);
1764
+ 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
1765
  }
1698
1766
  get row() {
1699
1767
  return parseInt(t(this, x).dataset.row);
@@ -1703,12 +1771,12 @@ const Ze = class Ze extends qe {
1703
1771
  }
1704
1772
  refresh() {
1705
1773
  const e = t(this, x).dataset.bind;
1706
- return parseInt(t(this, x).dataset.row), t(this, Wt).data[e];
1774
+ return parseInt(t(this, x).dataset.row), t(this, Bt).data[e];
1707
1775
  }
1708
1776
  };
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 {
1777
+ L = new WeakMap(), Bt = new WeakMap(), x = new WeakMap(), Be = new WeakMap(), Pe = new WeakMap(), Fe = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), h(os, "CellElement");
1778
+ let _e = os;
1779
+ const is = class is extends _e {
1712
1780
  constructor() {
1713
1781
  super();
1714
1782
  }
@@ -1719,21 +1787,21 @@ const Ge = class Ge extends Te {
1719
1787
  return super.refresh();
1720
1788
  }
1721
1789
  };
1722
- h(Ge, "EditableCellElement");
1723
- let Ce = Ge;
1724
- var zt, ct, xt, vt, de, K, We;
1725
- const Je = class Je extends Ce {
1790
+ h(is, "EditableCellElement");
1791
+ let Ne = is;
1792
+ var Pt, gt, St, Rt, me, J, Ve;
1793
+ const as = class as extends Ne {
1726
1794
  constructor() {
1727
1795
  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(() => {
1796
+ d(this, Pt);
1797
+ d(this, gt);
1798
+ d(this, St);
1799
+ d(this, Rt);
1800
+ d(this, me);
1801
+ d(this, J);
1802
+ E(this, "refresh", /* @__PURE__ */ h(() => {
1735
1803
  const e = super.refresh();
1736
- t(this, zt).value = e;
1804
+ t(this, Pt).value = e;
1737
1805
  }, "refresh"));
1738
1806
  /**
1739
1807
  dataRefresh = (v) => {
@@ -1765,36 +1833,36 @@ const Je = class Je extends Ce {
1765
1833
  if (!v) this.reset();
1766
1834
  };
1767
1835
  */
1768
- d(this, We, /* @__PURE__ */ h((e) => {
1836
+ d(this, Ve, /* @__PURE__ */ h((e) => {
1769
1837
  if (!["Escape", "Enter", "Tab", "Home", "End", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Backspace", "Delete"].includes(e.code)) {
1770
- if (t(this, ct) == "number") {
1838
+ if (t(this, gt) == "number") {
1771
1839
  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(".");
1840
+ 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) {
1841
+ var n = e.target.value, r = n.indexOf(".");
1774
1842
  if (r >= 0) {
1775
- var s = s.substr(r + 1, s.length);
1776
- s.length >= Number(t(this, K)) && e.preventDefault();
1843
+ var n = n.substr(r + 1, n.length);
1844
+ n.length >= Number(t(this, J)) && e.preventDefault();
1777
1845
  }
1778
1846
  }
1779
1847
  }
1780
- t(this, xt) && ninegrid.getByteLength(e.target.value) >= Number(t(this, xt)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1848
+ t(this, St) && ninegrid.getByteLength(e.target.value) >= Number(t(this, St)) && e.target.selectionStart == e.target.selectionEnd && e.preventDefault();
1781
1849
  }
1782
1850
  }, "#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)}`;
1851
+ if (this.applyBaseStyle(), p(this, gt, this.getAttribute("type") || "text"), p(this, St, this.getAttribute("maxbyte")), p(this, Rt, this.getAttribute("min")), p(this, me, this.getAttribute("max")), p(this, J, this.getAttribute("scale")), !["text", "number"].includes(t(this, gt))) throw `invalid type : ${t(this, gt)}`;
1784
1852
  }
1785
1853
  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}"`);
1854
+ for (var e = [], n = 0; n < this.attributes.length; n++)
1855
+ ["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
1856
  this.innerHTML = `
1789
1857
  <input type="text"
1790
1858
  ${e.join(" ")}
1791
1859
  ondragstart="return false;"
1792
1860
  >
1793
- `, super.connectedCallback(), p(this, zt, this.querySelector("input"));
1861
+ `, super.connectedCallback(), p(this, Pt, this.querySelector("input"));
1794
1862
  }
1795
1863
  };
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;
1864
+ Pt = new WeakMap(), gt = new WeakMap(), St = new WeakMap(), Rt = new WeakMap(), me = new WeakMap(), J = new WeakMap(), Ve = new WeakMap(), h(as, "CellInputText");
1865
+ let De = as;
1798
1866
  customElements.get("cell-input-text");
1799
- customElements.get("cell-input") || customElements.define("cell-input", ke);
1867
+ customElements.get("cell-input") || customElements.define("cell-input", De);
1800
1868
  //# sourceMappingURL=nine-table.js.map