@ninebone/table 0.0.379 β†’ 0.0.382

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,118 +1,118 @@
1
- var be = Object.defineProperty;
2
- var ge = (m) => {
3
- throw TypeError(m);
1
+ var xe = Object.defineProperty;
2
+ var ve = (x) => {
3
+ throw TypeError(x);
4
4
  };
5
- var me = (m, i, e) => i in m ? be(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e;
6
- var a = (m, i) => be(m, "name", { value: i, configurable: !0 });
7
- var x = (m, i, e) => me(m, typeof i != "symbol" ? i + "" : i, e), ye = (m, i, e) => i.has(m) || ge("Cannot " + e);
8
- var t = (m, i, e) => (ye(m, i, "read from private field"), e ? e.call(m) : i.get(m)), c = (m, i, e) => i.has(m) ? ge("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(m) : i.set(m, e), b = (m, i, e, s) => (ye(m, i, "write to private field"), s ? s.call(m, e) : i.set(m, e), e);
9
- var pe = (m, i, e, s) => ({
10
- set _(o) {
11
- b(m, i, o, e);
5
+ var Ee = (x, i, e) => i in x ? xe(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
+ var a = (x, i) => xe(x, "name", { value: i, configurable: !0 });
7
+ var v = (x, i, e) => Ee(x, typeof i != "symbol" ? i + "" : i, e), we = (x, i, e) => i.has(x) || ve("Cannot " + e);
8
+ var t = (x, i, e) => (we(x, i, "read from private field"), e ? e.call(x) : i.get(x)), c = (x, i, e) => i.has(x) ? ve("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), g = (x, i, e, s) => (we(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
9
+ var Se = (x, i, e, s) => ({
10
+ set _(n) {
11
+ g(x, i, n, e);
12
12
  },
13
13
  get _() {
14
- return t(m, i, s);
14
+ return t(x, i, s);
15
15
  }
16
16
  });
17
- import { trace as xe } from "@ninebone/util";
18
- const ne = class ne extends xe.constructor {
17
+ import { trace as Re } from "@ninebone/util";
18
+ const ne = class ne extends Re.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
23
  a(ne, "Trace");
24
24
  let Ut = ne;
25
- const C = new Ut();
26
- var I, O, p, P, V, Y, vt, X, wt;
25
+ const z = new Ut();
26
+ var I, D, p, Y, X, U, vt, F, wt;
27
27
  const oe = class oe extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
30
  c(this, I);
31
- c(this, O, !1);
31
+ c(this, D, !1);
32
32
  c(this, p);
33
- c(this, P);
34
- c(this, V);
35
33
  c(this, Y);
34
+ c(this, X);
35
+ c(this, U);
36
36
  c(this, vt, /* @__PURE__ */ a(() => {
37
37
  if (!t(this, I)) return;
38
38
  const e = t(this, I).querySelector(".ng-container-body");
39
- e && (b(this, Y, new ResizeObserver(() => {
39
+ e && (g(this, U, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, Y).observe(e));
41
+ })), t(this, U).observe(e));
42
42
  }, "#observeResize"));
43
- x(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!t(this, I) || !t(this, p) || t(this, O)) return;
43
+ v(this, "refresh", /* @__PURE__ */ a(() => {
44
+ if (!t(this, I) || !t(this, p) || t(this, D)) return;
45
45
  const e = t(this, p).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const o = t(this, p).track, r = t(this, p).thumb, n = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, h = s.scrollWidth;
48
- if (l !== 0 && h > l)
49
- n && (n.style.display = "flex");
47
+ const n = t(this, p).track, r = t(this, p).thumb, o = t(this, I).querySelector(".ng-container-bottom"), l = e.clientWidth, d = s.scrollWidth;
48
+ if (l !== 0 && d > l)
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- n && (n.style.display = "none");
51
+ o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
- const d = o.clientWidth;
55
- if (d <= 0) return;
56
- const f = Math.max(Math.min(d * (l / h), d), 20);
54
+ const h = n.clientWidth;
55
+ if (h <= 0) return;
56
+ const f = Math.max(Math.min(h * (l / d), h), 20);
57
57
  r.style.width = `${f}px`;
58
- const u = e.scrollLeft, g = h - l;
58
+ const u = e.scrollLeft, b = d - l;
59
59
  let y = 0;
60
- g > 0 && (y = parseInt(u / g * (d - f), 10)), y < 0 && (y = 0);
61
- const S = d - f;
62
- y > S && (y = S), r.style.left = `${y}px`, C.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= S - 1;
60
+ b > 0 && (y = parseInt(u / b * (h - f), 10)), y < 0 && (y = 0);
61
+ const m = h - f;
62
+ y > m && (y = m), r.style.left = `${y}px`, z.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= m - 1;
63
63
  }, "refresh"));
64
- c(this, X, /* @__PURE__ */ a((e) => {
64
+ c(this, F, /* @__PURE__ */ a((e) => {
65
65
  if (!t(this, p)) return !1;
66
- const s = t(this, p).container, o = s.querySelector("table");
67
- if (!o) return !1;
68
- const r = t(this, p).track.getBoundingClientRect(), n = t(this, p).thumb.clientWidth;
66
+ const s = t(this, p).container, n = s.querySelector("table");
67
+ if (!n) return !1;
68
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
69
69
  let l = e;
70
70
  l < 0 && (l = 0);
71
- const h = r.width - n;
72
- l > h && (l = h), l = parseInt(l, 10), t(this, p).thumb.style.left = `${l}px`, t(this, p).left.disabled = l === 0, t(this, p).right.disabled = l >= h - 1;
73
- const d = s.clientWidth, u = o.scrollWidth - d;
74
- return h > 0 && u > 0 && (s.scrollLeft = l / h * u), l > 0 && l < h - 1;
71
+ const d = r.width - o;
72
+ l > d && (l = d), l = parseInt(l, 10), t(this, p).thumb.style.left = `${l}px`, t(this, p).left.disabled = l === 0, t(this, p).right.disabled = l >= d - 1;
73
+ const h = s.clientWidth, u = n.scrollWidth - h;
74
+ return d > 0 && u > 0 && (s.scrollLeft = l / d * u), l > 0 && l < d - 1;
75
75
  }, "#thumbMoveTo"));
76
76
  c(this, wt, /* @__PURE__ */ a(() => {
77
- const e = /* @__PURE__ */ a((o) => {
78
- clearInterval(t(this, P)), clearInterval(t(this, V));
77
+ const e = /* @__PURE__ */ a((n) => {
78
+ clearInterval(t(this, Y)), clearInterval(t(this, X));
79
79
  const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
- t(this, X).call(this, r + o), b(this, P, setInterval(() => {
81
- clearInterval(t(this, P)), b(this, V, setInterval(() => {
82
- const n = parseInt(t(this, p).thumb.style.left || 0, 10);
83
- t(this, X).call(this, n + o) || clearInterval(t(this, V));
80
+ t(this, F).call(this, r + n), g(this, Y, setInterval(() => {
81
+ clearInterval(t(this, Y)), g(this, X, setInterval(() => {
82
+ const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
+ t(this, F).call(this, o + n) || clearInterval(t(this, X));
84
84
  }, 50));
85
85
  }, 500));
86
86
  }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(t(this, P)), clearInterval(t(this, V));
87
+ clearInterval(t(this, Y)), clearInterval(t(this, X));
88
88
  }, "clearTimer");
89
- ["mouseup", "mouseleave", "touchend"].forEach((o) => {
90
- t(this, p).left.addEventListener(o, s), t(this, p).right.addEventListener(o, s), t(this, p).track.addEventListener(o, s);
91
- }), t(this, p).left.addEventListener("mousedown", (o) => {
92
- o.button === 0 && e(-20);
93
- }), t(this, p).right.addEventListener("mousedown", (o) => {
94
- o.button === 0 && e(20);
95
- }), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (o) => {
96
- if (o.button !== 0) return;
97
- o.preventDefault();
98
- const r = t(this, p).track.getBoundingClientRect(), n = t(this, p).thumb.clientWidth;
99
- t(this, X).call(this, o.clientX - r.left - n / 2);
100
- }), t(this, p).thumb.addEventListener("mousedown", (o) => {
101
- if (o.button !== 0) return;
102
- o.stopPropagation(), o.preventDefault(), b(this, O, !0), this.shiftX = o.clientX - t(this, p).thumb.getBoundingClientRect().left;
89
+ ["mouseup", "mouseleave", "touchend"].forEach((n) => {
90
+ t(this, p).left.addEventListener(n, s), t(this, p).right.addEventListener(n, s), t(this, p).track.addEventListener(n, s);
91
+ }), t(this, p).left.addEventListener("mousedown", (n) => {
92
+ n.button === 0 && e(-20);
93
+ }), t(this, p).right.addEventListener("mousedown", (n) => {
94
+ n.button === 0 && e(20);
95
+ }), t(this, p).left.addEventListener("touchstart", () => e(-20)), t(this, p).right.addEventListener("touchstart", () => e(20)), t(this, p).track.addEventListener("mousedown", (n) => {
96
+ if (n.button !== 0) return;
97
+ n.preventDefault();
98
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
99
+ t(this, F).call(this, n.clientX - r.left - o / 2);
100
+ }), t(this, p).thumb.addEventListener("mousedown", (n) => {
101
+ if (n.button !== 0) return;
102
+ n.stopPropagation(), n.preventDefault(), g(this, D, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
103
  const r = /* @__PURE__ */ a((l) => {
104
- if (!t(this, O)) return;
105
- const h = t(this, p).track.getBoundingClientRect();
106
- t(this, X).call(this, l.clientX - h.left - this.shiftX);
107
- }, "onMouseMove"), n = /* @__PURE__ */ a(() => {
108
- b(this, O, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", n), this.refresh();
104
+ if (!t(this, D)) return;
105
+ const d = t(this, p).track.getBoundingClientRect();
106
+ t(this, F).call(this, l.clientX - d.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
108
+ g(this, D, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", r), document.addEventListener("mouseup", n);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (b(this, I, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, I)) return;
115
+ if (g(this, I, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, I)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -182,95 +182,96 @@ const oe = class oe extends HTMLElement {
182
182
  setTimeout(e, 10);
183
183
  return;
184
184
  }
185
- b(this, p, {
185
+ g(this, p, {
186
186
  container: s,
187
187
  track: this.querySelector(".ng-scroll-track"),
188
188
  thumb: this.querySelector(".ng-scroll-thumb"),
189
189
  left: this.querySelector(".ng-scroll-left"),
190
190
  right: this.querySelector(".ng-scroll-right")
191
191
  }), s.addEventListener("scroll", () => {
192
- t(this, O) || this.refresh();
192
+ t(this, D) || this.refresh();
193
193
  }), t(this, wt).call(this), t(this, vt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, Y) && t(this, Y).disconnect();
198
+ t(this, U) && t(this, U).disconnect();
199
199
  }
200
200
  };
201
- I = new WeakMap(), O = new WeakMap(), p = new WeakMap(), P = new WeakMap(), V = new WeakMap(), Y = new WeakMap(), vt = new WeakMap(), X = new WeakMap(), wt = new WeakMap(), a(oe, "NineTableHScrollBar");
201
+ I = new WeakMap(), D = new WeakMap(), p = new WeakMap(), Y = new WeakMap(), X = new WeakMap(), U = new WeakMap(), vt = new WeakMap(), F = new WeakMap(), wt = new WeakMap(), a(oe, "NineTableHScrollBar");
202
202
  let Ft = oe;
203
203
  customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", Ft);
204
- var U, z, w, at, ct, St;
204
+ var L, B, S, at, ct, St;
205
205
  const re = class re extends HTMLElement {
206
206
  constructor() {
207
207
  super();
208
- c(this, U);
209
- c(this, z, !1);
210
- c(this, w);
208
+ c(this, L);
209
+ c(this, B, !1);
210
+ c(this, S);
211
211
  c(this, at, 0);
212
212
  c(this, ct, 0);
213
213
  /**
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
- x(this, "refresh", /* @__PURE__ */ a(() => {
217
- if (!t(this, U) || !t(this, w) || t(this, z)) return;
218
- const e = t(this, w).container, s = e.querySelector("table");
219
- if (!s) return;
220
- const o = t(this, w).track, r = t(this, w).thumb, n = e.clientHeight, l = s.scrollHeight;
221
- if (l <= n) {
222
- r.style.display = "none", t(this, w).top.disabled = !0, t(this, w).bottom.disabled = !0;
216
+ v(this, "refresh", /* @__PURE__ */ a(() => {
217
+ var O, ge, be, ye, pe, me;
218
+ if (!t(this, L) || !t(this, S) || t(this, B)) return;
219
+ const e = t(this, S).container, s = t(this, S).track, n = t(this, S).thumb, r = e.clientHeight, o = ((ge = (O = t(this, L).host) == null ? void 0 : O.data) == null ? void 0 : ge.get()) || ((ye = (be = t(this, L)._host) == null ? void 0 : be.data) == null ? void 0 : ye.get()) || [], l = o.length > 0 ? o.length : 61, d = ((me = (pe = t(this, L)).getRowHeight) == null ? void 0 : me.call(pe)) || 85, h = l * d;
220
+ if (h <= r) {
221
+ n.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
223
222
  return;
224
223
  } else
225
- r.style.display = "block";
226
- const h = o.clientHeight;
227
- if (h <= 0) return;
228
- const d = Math.max(Math.min(h * (n / l), h), 20);
229
- r.style.height = `${d}px`;
230
- const f = e.scrollTop, u = l - n;
231
- let g = 0;
232
- u > 0 && (g = f / u * (h - d));
233
- const y = h - d;
234
- g < 0 && (g = 0), g > y && (g = y), r.style.top = `${g}px`, t(this, w).top.disabled = f <= 0, t(this, w).bottom.disabled = f >= u - 1;
224
+ n.style.display = "block";
225
+ const f = s.clientHeight;
226
+ if (f <= 0) return;
227
+ const u = Math.max(Math.min(f * (r / h), f), 20);
228
+ n.style.height = `${u}px`;
229
+ const b = e.scrollTop, y = h - r;
230
+ let m = 0;
231
+ y > 0 && (m = b / y * (f - u));
232
+ const R = f - u;
233
+ m < 0 && (m = 0), m > R && (m = R), n.style.top = `${m}px`, t(this, S).top.disabled = b <= 0, t(this, S).bottom.disabled = b >= y - 1;
235
234
  }, "refresh"));
236
235
  c(this, St, /* @__PURE__ */ a(() => {
237
- const e = t(this, w).container;
236
+ const e = t(this, S).container, s = /* @__PURE__ */ a(() => {
237
+ var l, d, h, f, u, b;
238
+ const n = ((d = (l = t(this, L).host) == null ? void 0 : l.data) == null ? void 0 : d.get()) || ((f = (h = t(this, L)._host) == null ? void 0 : h.data) == null ? void 0 : f.get()) || [], r = n.length > 0 ? n.length : 61, o = ((b = (u = t(this, L)).getRowHeight) == null ? void 0 : b.call(u)) || 85;
239
+ return r * o;
240
+ }, "getContentHeight");
238
241
  e.addEventListener("scroll", () => {
239
- t(this, z) || this.refresh();
240
- }), t(this, w).thumb.addEventListener("mousedown", (s) => {
241
- if (s.button !== 0) return;
242
- s.stopPropagation(), s.preventDefault(), b(this, z, !0), b(this, at, s.clientY), b(this, ct, e.scrollTop);
243
- const o = /* @__PURE__ */ a((n) => {
244
- if (!t(this, z)) return;
245
- const l = t(this, w).track.getBoundingClientRect(), h = t(this, w).thumb.clientHeight, f = l.height - h, u = n.clientY - t(this, at), g = e.clientHeight, y = e.querySelector("table");
246
- C.log(y), C.log(y.scrollHeight);
247
- const A = y.scrollHeight - g;
248
- if (f > 0 && A > 0) {
249
- const J = u / f * A;
250
- e.scrollTop = t(this, ct) + J;
242
+ t(this, B) || this.refresh();
243
+ }), t(this, S).thumb.addEventListener("mousedown", (n) => {
244
+ if (n.button !== 0) return;
245
+ n.stopPropagation(), n.preventDefault(), g(this, B, !0), g(this, at, n.clientY), g(this, ct, e.scrollTop);
246
+ const r = /* @__PURE__ */ a((l) => {
247
+ if (!t(this, B)) return;
248
+ const d = t(this, S).track.getBoundingClientRect(), h = t(this, S).thumb.clientHeight, u = d.height - h, b = l.clientY - t(this, at), y = e.clientHeight, R = s() - y;
249
+ if (u > 0 && R > 0) {
250
+ const O = b / u * R;
251
+ e.scrollTop = t(this, ct) + O;
251
252
  }
252
253
  this.refresh();
253
- }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
254
- b(this, z, !1), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
254
+ }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
255
+ g(this, B, !1), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
255
256
  }, "onMouseUp");
256
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
257
- }), t(this, w).track.addEventListener("mousedown", (s) => {
258
- if (s.button !== 0 || s.target === t(this, w).thumb) return;
259
- const o = t(this, w).track.getBoundingClientRect(), r = t(this, w).thumb.clientHeight, n = s.clientY - o.top - r / 2, h = o.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
- if (h > 0 && u > 0) {
261
- const g = Math.max(0, Math.min(1, n / h));
262
- e.scrollTop = g * u;
257
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
258
+ }), t(this, S).track.addEventListener("mousedown", (n) => {
259
+ if (n.button !== 0 || n.target === t(this, S).thumb) return;
260
+ const r = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientHeight, l = n.clientY - r.top - o / 2, h = r.height - o, f = e.clientHeight, b = s() - f;
261
+ if (h > 0 && b > 0) {
262
+ const y = Math.max(0, Math.min(1, l / h));
263
+ e.scrollTop = y * b;
263
264
  }
264
265
  this.refresh();
265
- }), t(this, w).top.addEventListener("click", () => {
266
+ }), t(this, S).top.addEventListener("click", () => {
266
267
  e.scrollTop -= 40;
267
- }), t(this, w).bottom.addEventListener("click", () => {
268
+ }), t(this, S).bottom.addEventListener("click", () => {
268
269
  e.scrollTop += 40;
269
270
  });
270
271
  }, "#init"));
271
272
  }
272
273
  connectedCallback() {
273
- if (b(this, U, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, U)) return;
274
+ if (g(this, L, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, L)) return;
274
275
  this.innerHTML = `
275
276
  <style>
276
277
  nine-table-vscrollbar {
@@ -335,12 +336,12 @@ const re = class re extends HTMLElement {
335
336
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
336
337
  `;
337
338
  const e = /* @__PURE__ */ a(() => {
338
- const s = t(this, U).querySelector(".ng-container-body");
339
+ const s = t(this, L).querySelector(".ng-container-body");
339
340
  if (!s) {
340
341
  setTimeout(e, 10);
341
342
  return;
342
343
  }
343
- b(this, w, {
344
+ g(this, S, {
344
345
  container: s,
345
346
  track: this.querySelector(".ng-scroll-track"),
346
347
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -351,7 +352,7 @@ const re = class re extends HTMLElement {
351
352
  e();
352
353
  }
353
354
  };
354
- U = new WeakMap(), z = new WeakMap(), w = new WeakMap(), at = new WeakMap(), ct = new WeakMap(), St = new WeakMap(), a(re, "NineTableVScrollBar");
355
+ L = new WeakMap(), B = new WeakMap(), S = new WeakMap(), at = new WeakMap(), ct = new WeakMap(), St = new WeakMap(), a(re, "NineTableVScrollBar");
355
356
  let jt = re;
356
357
  customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", jt);
357
358
  var Et, Q;
@@ -366,12 +367,12 @@ const _ = class _ {
366
367
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
367
368
  */
368
369
  static compile(i) {
369
- var o, r, n, l;
370
+ var n, r, o, l;
370
371
  if (!i) return null;
371
372
  const e = i.cloneNode(!0);
372
- return t(o = _, Et).call(o, e), t(r = _, Q).call(r, e, "thead"), t(n = _, Q).call(n, e, "tbody"), t(l = _, Q).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((h, d) => {
373
- const f = h.getAttribute("fixed");
374
- f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
373
+ return t(n = _, Et).call(n, e), t(r = _, Q).call(r, e, "thead"), t(o = _, Q).call(o, e, "tbody"), t(l = _, Q).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((d, h) => {
374
+ const f = d.getAttribute("fixed");
375
+ f && e.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach((u) => {
375
376
  u.setAttribute("fixed", f);
376
377
  });
377
378
  }), e;
@@ -379,12 +380,12 @@ const _ = class _ {
379
380
  };
380
381
  Et = new WeakMap(), Q = new WeakMap(), a(_, "TableCompiler"), c(_, Et, /* @__PURE__ */ a((i) => {
381
382
  if (!i.querySelector("colgroup")) {
382
- const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, o = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
383
- for (let n = 0; n < s; n++) {
383
+ const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), r = Math.max(Math.floor(i.clientWidth / s), 100);
384
+ for (let o = 0; o < s; o++) {
384
385
  const l = document.createElement("col");
385
- l.setAttribute("width", r), o.appendChild(l);
386
+ l.setAttribute("width", r), n.appendChild(l);
386
387
  }
387
- i.prepend(o);
388
+ i.prepend(n);
388
389
  }
389
390
  if (!i.querySelector("thead")) {
390
391
  const e = document.createElement("thead"), s = i.querySelector("colgroup");
@@ -392,272 +393,272 @@ Et = new WeakMap(), Q = new WeakMap(), a(_, "TableCompiler"), c(_, Et, /* @__PUR
392
393
  }
393
394
  i.classList.add("nine-table-element"), i.style.display = "table";
394
395
  }, "#ensureTableStructure")), c(_, Q, /* @__PURE__ */ a((i, e) => {
395
- const s = Array.from(i.querySelectorAll(e + " tr")), o = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
- if (r === 0 || o.length === 0) return;
397
- let n = 0;
398
- o.forEach((h) => {
399
- n += h.colSpan || 1;
396
+ const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
397
+ if (r === 0 || n.length === 0) return;
398
+ let o = 0;
399
+ n.forEach((d) => {
400
+ o += d.colSpan || 1;
400
401
  });
401
- const l = Array.from(Array(r), () => Array(n).fill(null));
402
- s.forEach((h) => {
403
- const d = h.sectionRowIndex;
402
+ const l = Array.from(Array(r), () => Array(o).fill(null));
403
+ s.forEach((d) => {
404
+ const h = d.sectionRowIndex;
404
405
  let f = 0;
405
- Array.from(h.querySelectorAll("th,td")).forEach((u) => {
406
- for (let S = 0; S < l[d].length; S++)
407
- if (l[d][S] === null) {
408
- f = S;
406
+ Array.from(d.querySelectorAll("th,td")).forEach((u) => {
407
+ for (let m = 0; m < l[h].length; m++)
408
+ if (l[h][m] === null) {
409
+ f = m;
409
410
  break;
410
411
  }
411
- const g = u.rowSpan || 1, y = u.colSpan || 1;
412
- for (let S = 0; S < g; S++)
413
- for (let A = 0; A < y; A++)
414
- d + S < r && f + A < n && (l[d + S][f + A] = S === 0 && A === 0 ? "1" : "0");
412
+ const b = u.rowSpan || 1, y = u.colSpan || 1;
413
+ for (let m = 0; m < b; m++)
414
+ for (let R = 0; R < y; R++)
415
+ h + m < r && f + R < o && (l[h + m][f + R] = m === 0 && R === 0 ? "1" : "0");
415
416
  });
416
- }), s.forEach((h) => {
417
- const d = h.sectionRowIndex;
418
- Array.from(h.querySelectorAll("th,td")).forEach((f) => {
419
- for (let u = 0; u < l[d].length; u++)
420
- if (l[d][u] === "1") {
421
- f.dataset.col = u, l[d][u] = "0";
417
+ }), s.forEach((d) => {
418
+ const h = d.sectionRowIndex;
419
+ Array.from(d.querySelectorAll("th,td")).forEach((f) => {
420
+ for (let u = 0; u < l[h].length; u++)
421
+ if (l[h][u] === "1") {
422
+ f.dataset.col = u, l[h][u] = "0";
422
423
  break;
423
424
  }
424
425
  });
425
426
  });
426
427
  }, "#resetColIndex"));
427
428
  let Kt = _;
428
- var M, v, W, q, D, F, B, tt, Rt, At, qt, ht, dt, Tt, kt, ft, Lt, et, ut;
429
+ var M, w, W, T, N, j, P, tt, Rt, At, Tt, ht, dt, qt, kt, ft, Lt, et, ut;
429
430
  const le = class le {
430
431
  constructor(i) {
431
432
  c(this, M);
432
- c(this, v);
433
+ c(this, w);
433
434
  c(this, W, /* @__PURE__ */ new Map());
434
- c(this, q, null);
435
- c(this, D, null);
436
- c(this, F, 0);
437
- c(this, B, 40);
435
+ c(this, T, null);
436
+ c(this, N, null);
437
+ c(this, j, 0);
438
+ c(this, P, 40);
438
439
  c(this, tt, !1);
439
440
  c(this, Rt, 3);
440
- x(this, "refresh", /* @__PURE__ */ a(() => {
441
+ v(this, "refresh", /* @__PURE__ */ a(() => {
441
442
  var e;
442
- const i = t(this, v).querySelector(".ng-container-body");
443
- i && (t(this, ht).call(this), t(this, et).call(this, i.scrollTop), (e = t(this, v).querySelector("nine-table-vscrollbar")) == null || e.refresh());
443
+ const i = t(this, w).querySelector(".ng-container-body");
444
+ i && (t(this, ht).call(this), t(this, et).call(this, i.scrollTop), (e = t(this, w).querySelector("nine-table-vscrollbar")) == null || e.refresh());
444
445
  }, "refresh"));
445
- x(this, "initialize", /* @__PURE__ */ a(() => {
446
- b(this, q, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
447
- const r = t(this, v).querySelector(o);
446
+ v(this, "initialize", /* @__PURE__ */ a(() => {
447
+ g(this, T, null), t(this, W).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
448
+ const r = t(this, w).querySelector(n);
448
449
  if (!r) return;
449
- const n = r.querySelector("table");
450
- if (!n) return;
451
- const l = n.querySelector("tbody.bindable-tbody");
450
+ const o = r.querySelector("table");
451
+ if (!o) return;
452
+ const l = o.querySelector("tbody.bindable-tbody");
452
453
  if (!l) return;
453
- const d = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
454
- t(this, W).set(o, d);
454
+ const h = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
455
+ t(this, W).set(n, h);
455
456
  });
456
- const i = t(this, v).querySelector(".ng-container-body"), e = t(this, v).querySelector(".ng-container-left"), s = t(this, v).querySelector(".ng-container-right");
457
+ const i = t(this, w).querySelector(".ng-container-body"), e = t(this, w).querySelector(".ng-container-left"), s = t(this, w).querySelector(".ng-container-right");
457
458
  if (i) {
458
- t(this, qt).call(this, i), t(this, ft).call(this), t(this, ht).call(this), t(this, et).call(this, i.scrollTop);
459
- let o = i.scrollTop;
460
- const r = /* @__PURE__ */ a((n) => {
459
+ t(this, Tt).call(this, i), t(this, ft).call(this), t(this, ht).call(this), t(this, et).call(this, i.scrollTop);
460
+ let n = i.scrollTop;
461
+ const r = /* @__PURE__ */ a((o) => {
461
462
  var l;
462
- e && e.scrollTop !== n && (e.scrollTop = n), s && s.scrollTop !== n && (s.scrollTop = n), t(this, et).call(this, n), (l = t(this, v).querySelector("nine-table-vscrollbar")) == null || l.refresh();
463
+ e && e.scrollTop !== o && (e.scrollTop = o), s && s.scrollTop !== o && (s.scrollTop = o), t(this, et).call(this, o), (l = t(this, w).querySelector("nine-table-vscrollbar")) == null || l.refresh();
463
464
  }, "syncScroll");
464
465
  i.addEventListener("scroll", () => {
465
- const n = i.scrollTop;
466
- o !== n && (o = n, r(n));
466
+ const o = i.scrollTop;
467
+ n !== o && (n = o, r(o));
467
468
  });
468
469
  }
469
470
  }, "initialize"));
470
471
  c(this, At, /* @__PURE__ */ a((i, e) => {
471
472
  const s = t(this, W).get(e);
472
473
  if (!s || s.length === 0) return;
473
- const o = i.querySelector("tbody.bindable-tbody");
474
- if (!o) return;
475
- o.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
476
- const r = o.querySelector("tr.nodata"), n = document.createDocumentFragment();
477
- for (let l = 0; l < t(this, B); l++)
478
- s.forEach((h) => {
479
- n.appendChild(h.cloneNode(!0));
474
+ const n = i.querySelector("tbody.bindable-tbody");
475
+ if (!n) return;
476
+ n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
477
+ const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
478
+ for (let l = 0; l < t(this, P); l++)
479
+ s.forEach((d) => {
480
+ o.appendChild(d.cloneNode(!0));
480
481
  });
481
- r ? r.before(n) : o.appendChild(n);
482
+ r ? r.before(o) : n.appendChild(o);
482
483
  }, "#renderRows"));
483
- c(this, qt, /* @__PURE__ */ a((i) => {
484
- if (t(this, q) !== null && t(this, q) > 0)
485
- return t(this, q);
484
+ c(this, Tt, /* @__PURE__ */ a((i) => {
485
+ if (t(this, T) !== null && t(this, T) > 0)
486
+ return t(this, T);
486
487
  const e = t(this, W).get(".ng-container-body");
487
488
  if (!e || e.length === 0) return 24;
488
489
  const s = i.querySelector("tbody.bindable-tbody") || i.querySelector("tbody.bindable-tbody:last-of-type");
489
490
  if (!s) return 24;
490
- s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
491
- const o = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
492
- e.forEach((g) => {
493
- r.appendChild(g.cloneNode(!0));
494
- }), o ? o.before(r) : s.appendChild(r);
495
- const n = t(this, v), l = n.style.display, h = n.style.visibility, d = n.style.position;
496
- (l === "none" || window.getComputedStyle(n).display === "none") && (n.style.display = "block", n.style.visibility = "hidden", n.style.position = "absolute");
491
+ s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
492
+ const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
493
+ e.forEach((b) => {
494
+ r.appendChild(b.cloneNode(!0));
495
+ }), n ? n.before(r) : s.appendChild(r);
496
+ const o = t(this, w), l = o.style.display, d = o.style.visibility, h = o.style.position;
497
+ (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
497
498
  let f = 0;
498
499
  const u = s.querySelectorAll("tr:not(.nodata)");
499
- return u.forEach((g) => {
500
- f += g.offsetHeight || g.getBoundingClientRect().height;
501
- }), u.forEach((g) => g.remove()), n.style.display = l, n.style.visibility = h, n.style.position = d, b(this, q, f > 0 ? f : 24), t(this, dt).call(this), t(this, q);
500
+ return u.forEach((b) => {
501
+ f += b.offsetHeight || b.getBoundingClientRect().height;
502
+ }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = d, o.style.position = h, g(this, T, f > 0 ? f : 24), t(this, dt).call(this), t(this, T);
502
503
  }, "#measureAndCacheHeight"));
503
504
  c(this, ht, /* @__PURE__ */ a(() => {
504
- if (!t(this, v).querySelector(".ng-container-body")) return;
505
- const s = (t(this, M).data.get() || []).length, o = t(this, q) || 24, r = s * o;
506
- C.log(`[VirtualHeight] totalCount: ${s}, rowHeight: ${o}, totalVirtualHeight: ${r}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
507
- const l = t(this, v).querySelector(n), h = l == null ? void 0 : l.querySelector("table");
508
- h && (h.style.height = `${r}px`);
505
+ if (!t(this, w).querySelector(".ng-container-body")) return;
506
+ const s = (t(this, M).data.get() || []).length, n = t(this, T) || 24, r = s * n;
507
+ z.log(`[VirtualHeight] totalCount: ${s}, rowHeight: ${n}, totalVirtualHeight: ${r}`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
508
+ const l = t(this, w).querySelector(o), d = l == null ? void 0 : l.querySelector("table");
509
+ d && (d.style.height = `${r}px`);
509
510
  });
510
511
  }, "#updateVirtualScrollHeight"));
511
512
  c(this, dt, /* @__PURE__ */ a(() => {
512
- if ((t(this, M).data.get() || []).length, t(this, F) > 0 && t(this, q) > 0) {
513
- const e = Math.ceil(t(this, F) / t(this, q));
514
- b(this, B, e + t(this, Rt)), C.log("visibleRows:", e, "cachedRowCount:", t(this, B));
513
+ if ((t(this, M).data.get() || []).length, t(this, j) > 0 && t(this, T) > 0) {
514
+ const e = Math.ceil(t(this, j) / t(this, T));
515
+ g(this, P, e + t(this, Rt)), z.log("visibleRows:", e, "cachedRowCount:", t(this, P));
515
516
  }
516
517
  }, "#updateRowCount"));
517
- c(this, Tt, /* @__PURE__ */ a(() => {
518
- var h, d, f;
519
- const i = t(this, v).querySelector(".ng-container-left table"), e = t(this, v).querySelector(".ng-container-body table"), s = t(this, v).querySelector(".ng-container-right table");
518
+ c(this, qt, /* @__PURE__ */ a(() => {
519
+ var d, h, f;
520
+ const i = t(this, w).querySelector(".ng-container-left table"), e = t(this, w).querySelector(".ng-container-body table"), s = t(this, w).querySelector(".ng-container-right table");
520
521
  if (!e) return;
521
- const o = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), n = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(o.length, r.length, n.length);
522
+ const n = i ? Array.from(i.querySelectorAll("tr")) : [], r = Array.from(e.querySelectorAll("tr")), o = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, r.length, o.length);
522
523
  for (let u = 0; u < l; u++) {
523
- const g = [
524
- ((h = o[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
525
- ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
526
- ((f = n[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
527
- ], y = Math.max(...g);
528
- y > 0 && (o[u] && (o[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), n[u] && (n[u].style.height = `${y}px`));
524
+ const b = [
525
+ ((d = n[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
526
+ ((h = r[u]) == null ? void 0 : h.getBoundingClientRect().height) || 0,
527
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
528
+ ], y = Math.max(...b);
529
+ y > 0 && (n[u] && (n[u].style.height = `${y}px`), r[u] && (r[u].style.height = `${y}px`), o[u] && (o[u].style.height = `${y}px`));
529
530
  }
530
531
  }, "#syncRowHeights"));
531
532
  c(this, kt, /* @__PURE__ */ a(() => {
532
- !t(this, v) || !(t(this, v) instanceof HTMLElement) || (b(this, D, new ResizeObserver((i) => {
533
+ !t(this, w) || !(t(this, w) instanceof HTMLElement) || (g(this, N, new ResizeObserver((i) => {
533
534
  for (const e of i) {
534
535
  const s = e.target;
535
536
  if (!s.classList.contains("active")) continue;
536
- const o = e.contentRect.height;
537
- if (o > 0) {
537
+ const n = e.contentRect.height;
538
+ if (n > 0) {
538
539
  let r = 0;
539
- const n = s.querySelector("thead");
540
- n && (r += n.offsetHeight || n.getBoundingClientRect().height);
541
- const l = Math.max(o - r, 100);
542
- t(this, F) !== l && (b(this, F, l), t(this, dt).call(this), t(this, q) !== null && t(this, ft).call(this));
540
+ const o = s.querySelector("thead");
541
+ o && (r += o.offsetHeight || o.getBoundingClientRect().height);
542
+ const l = Math.max(n - r, 100);
543
+ t(this, j) !== l && (g(this, j, l), t(this, dt).call(this), t(this, T) !== null && t(this, ft).call(this));
543
544
  }
544
545
  }
545
- })), t(this, D).observe(t(this, v)));
546
+ })), t(this, N).observe(t(this, w)));
546
547
  }, "#initResizeObserver"));
547
548
  c(this, ft, /* @__PURE__ */ a(() => {
548
549
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
549
- const e = t(this, v).querySelector(i);
550
+ const e = t(this, w).querySelector(i);
550
551
  e && e.querySelector("tbody.bindable-tbody") && t(this, At).call(this, e, i);
551
- }), t(this, Tt).call(this);
552
+ }), t(this, qt).call(this);
552
553
  }, "#renderAllContainers"));
553
554
  c(this, Lt, /* @__PURE__ */ a((i) => {
554
555
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
555
- var d;
556
- const s = t(this, v).querySelector(e);
556
+ var h;
557
+ const s = t(this, w).querySelector(e);
557
558
  if (!s) return;
558
- const o = s.querySelector("tbody.bindable-tbody");
559
- if (!o) return;
560
- const r = Array.from(o.querySelectorAll("tr:not(.nodata)")), n = ((d = t(this, W).get(e)) == null ? void 0 : d.length) || 1, h = (t(this, M).data.get() || []).length;
559
+ const n = s.querySelector("tbody.bindable-tbody");
560
+ if (!n) return;
561
+ const r = Array.from(n.querySelectorAll("tr:not(.nodata)")), o = ((h = t(this, W).get(e)) == null ? void 0 : h.length) || 1, d = (t(this, M).data.get() || []).length;
561
562
  r.forEach((f, u) => {
562
- const g = i + Math.floor(u / n);
563
- if (g >= h) {
563
+ const b = i + Math.floor(u / o);
564
+ if (b >= d) {
564
565
  f.style.display = "none";
565
566
  return;
566
567
  }
567
- const y = t(this, M).data.get(g);
568
- f.style.display = "", t(this, ut).call(this, f, y, g);
568
+ const y = t(this, M).data.get(b);
569
+ f.style.display = "", t(this, ut).call(this, f, y, b);
569
570
  });
570
571
  });
571
572
  }, "#adjustBufferRows"));
572
573
  c(this, et, /* @__PURE__ */ a((i) => {
573
- var h;
574
- const e = t(this, q);
574
+ var d;
575
+ const e = t(this, T);
575
576
  if (!e || e <= 0) return;
576
- const o = (t(this, M).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), n = ((h = t(this, W).get(".ng-container-body")) == null ? void 0 : h.length) || 1, l = r + t(this, B);
577
- C.log(`[Scroll] scrollTop: ${i}, startIndex: ${r}, cachedRowCount: ${t(this, B)}, targetDataIndex range: ${r} ~ ${l} (Total: ${o})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
578
- const f = t(this, v).querySelector(d);
577
+ const n = (t(this, M).data.get() || []).length, r = Math.max(0, Math.floor(i / e)), o = ((d = t(this, W).get(".ng-container-body")) == null ? void 0 : d.length) || 1, l = r + t(this, P);
578
+ z.log(`[Scroll] scrollTop: ${i}, startIndex: ${r}, cachedRowCount: ${t(this, P)}, targetDataIndex range: ${r} ~ ${l} (Total: ${n})`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((h) => {
579
+ const f = t(this, w).querySelector(h);
579
580
  if (!f) return;
580
581
  const u = f.querySelector("tbody.bindable-tbody");
581
582
  if (!u) return;
582
- Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y, S) => {
583
- const A = r + Math.floor(S / n);
584
- if (A >= o) {
583
+ Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y, m) => {
584
+ const R = r + Math.floor(m / o);
585
+ if (R >= n) {
585
586
  y.style.display = "none";
586
587
  return;
587
588
  }
588
- const J = t(this, M).data.get(A);
589
- y.style.display = "", t(this, ut).call(this, y, J, A);
589
+ const O = t(this, M).data.get(R);
590
+ y.style.display = "", t(this, ut).call(this, y, O, R);
590
591
  });
591
- }), t(this, tt) || (b(this, tt, !0), setTimeout(() => {
592
- t(this, Lt).call(this, r), b(this, tt, !1);
592
+ }), t(this, tt) || (g(this, tt, !0), setTimeout(() => {
593
+ t(this, Lt).call(this, r), g(this, tt, !1);
593
594
  }, 0));
594
595
  }, "#handleScroll"));
595
596
  c(this, ut, /* @__PURE__ */ a((i, e, s) => {
596
- i.dataset.row = s, Array.from(i.cells).forEach((o, r) => {
597
- const n = o.dataset.bind;
598
- n && e && e[n] !== void 0 ? o.textContent = e[n] : o.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `ν–‰ ${s + 1}`, o.dataset.row = s;
597
+ i.dataset.row = s, Array.from(i.cells).forEach((n, r) => {
598
+ const o = n.dataset.bind;
599
+ o && e && e[o] !== void 0 ? n.textContent = e[o] : n.textContent = e ? e[Object.keys(e)[r]] ?? `R${s}C${r}` : `ν–‰ ${s + 1}`, n.dataset.row = s;
599
600
  });
600
601
  }, "#bindRowData"));
601
- x(this, "destroy", /* @__PURE__ */ a(() => {
602
- t(this, D) && (t(this, D).disconnect(), b(this, D, null));
602
+ v(this, "destroy", /* @__PURE__ */ a(() => {
603
+ t(this, N) && (t(this, N).disconnect(), g(this, N, null));
603
604
  }, "destroy"));
604
- b(this, M, i.getRootNode().host), b(this, v, i), t(this, kt).call(this);
605
+ g(this, M, i.getRootNode().host), g(this, w, i), t(this, kt).call(this);
605
606
  }
606
607
  getRowHeight() {
607
- return t(this, q);
608
+ return t(this, T);
608
609
  }
609
610
  templateLength(i = ".ng-container-body") {
610
611
  var e;
611
612
  return ((e = t(this, W).get(i)) == null ? void 0 : e.length) || 1;
612
613
  }
613
614
  };
614
- M = new WeakMap(), v = new WeakMap(), W = new WeakMap(), q = new WeakMap(), D = new WeakMap(), F = new WeakMap(), B = new WeakMap(), tt = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Tt = new WeakMap(), kt = new WeakMap(), ft = new WeakMap(), Lt = new WeakMap(), et = new WeakMap(), ut = new WeakMap(), a(le, "RowManager");
615
+ M = new WeakMap(), w = new WeakMap(), W = new WeakMap(), T = new WeakMap(), N = new WeakMap(), j = new WeakMap(), P = new WeakMap(), tt = new WeakMap(), Rt = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), qt = new WeakMap(), kt = new WeakMap(), ft = new WeakMap(), Lt = new WeakMap(), et = new WeakMap(), ut = new WeakMap(), a(le, "RowManager");
615
616
  let Zt = le;
616
- var Ht, it, j, Ct, _t, $t, It, Mt;
617
+ var Ht, it, K, Ct, _t, $t, It, Mt;
617
618
  const lt = class lt extends HTMLElement {
618
619
  constructor() {
619
620
  super();
620
621
  c(this, Ht);
621
622
  c(this, it, null);
622
- c(this, j);
623
+ c(this, K);
623
624
  /**
624
625
  * data.set, add, delete
625
626
  * filter, sorting : κ³ λ €λŒ€μƒ
626
627
  */
627
- x(this, "invalidate", /* @__PURE__ */ a(() => {
628
- t(this, j).refresh();
628
+ v(this, "invalidate", /* @__PURE__ */ a(() => {
629
+ t(this, K).refresh();
629
630
  }, "invalidate"));
630
631
  c(this, Ct, /* @__PURE__ */ a(() => {
631
632
  [
632
633
  { selector: ".ng-container-body", type: null },
633
634
  { selector: ".ng-container-left", type: "left" },
634
635
  { selector: ".ng-container-right", type: "right" }
635
- ].forEach(({ selector: s, type: o }) => {
636
+ ].forEach(({ selector: s, type: n }) => {
636
637
  const r = this.querySelector(s);
637
638
  if (!r) return;
638
- const n = t(this, $t).call(this, t(this, it), o);
639
- r.innerHTML = "", r.appendChild(n);
639
+ const o = t(this, $t).call(this, t(this, it), n);
640
+ r.innerHTML = "", r.appendChild(o);
640
641
  });
641
642
  }, "#renderSplitContainers"));
642
643
  c(this, _t, /* @__PURE__ */ a(() => {
643
644
  ["left", "right"].forEach((e) => {
644
- const s = this.querySelector(`.ng-container-${e}`), o = s == null ? void 0 : s.querySelector("table");
645
- if (!s || !o) return;
645
+ const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
646
+ if (!s || !n) return;
646
647
  let r = 0;
647
- o.querySelectorAll("col").forEach((n) => {
648
- const l = parseInt(n.getAttribute("width"), 10);
648
+ n.querySelectorAll("col").forEach((o) => {
649
+ const l = parseInt(o.getAttribute("width"), 10);
649
650
  isNaN(r) || (r += l);
650
651
  }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
651
652
  });
652
653
  }, "#updateContainerWidths"));
653
- x(this, "generate", /* @__PURE__ */ a((e) => {
654
- e && (b(this, it, Kt.compile(e)), t(this, it).style.display = "table", t(this, Ct).call(this), t(this, _t).call(this), requestAnimationFrame(() => {
655
- var o;
656
- const s = (o = this.querySelector("thead")) == null ? void 0 : o.getBoundingClientRect().height;
654
+ v(this, "generate", /* @__PURE__ */ a((e) => {
655
+ e && (g(this, it, Kt.compile(e)), t(this, it).style.display = "table", t(this, Ct).call(this), t(this, _t).call(this), requestAnimationFrame(() => {
656
+ var n;
657
+ const s = (n = this.querySelector("thead")) == null ? void 0 : n.getBoundingClientRect().height;
657
658
  this.querySelectorAll("tbody.fixed-tbody").forEach((r) => {
658
659
  r.style.top = `${s}px`;
659
660
  });
660
- }), t(this, j).initialize(), setTimeout(() => {
661
+ }), t(this, K).initialize(), setTimeout(() => {
661
662
  var s;
662
663
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
663
664
  }, 0));
@@ -666,25 +667,25 @@ const lt = class lt extends HTMLElement {
666
667
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
667
668
  */
668
669
  c(this, $t, /* @__PURE__ */ a((e, s) => {
669
- const o = e.cloneNode(!0), r = o.querySelector("tbody");
670
+ const n = e.cloneNode(!0), r = n.querySelector("tbody");
670
671
  if (r) {
671
- const n = document.createElement("tbody");
672
- n.className = "fixed-tbody", r.className = "bindable-tbody", r.before(n);
672
+ const o = document.createElement("tbody");
673
+ o.className = "fixed-tbody", r.className = "bindable-tbody", r.before(o);
673
674
  }
674
- return s === "left" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
675
- n.getAttribute("fixed") !== "left" && n.remove();
676
- }) : s === "right" ? o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((n) => {
677
- n.getAttribute("fixed") !== "right" && n.remove();
678
- }) : o.querySelectorAll("[fixed=left], [fixed=right]").forEach((n) => {
679
- n.remove();
680
- }), o;
675
+ return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
676
+ o.getAttribute("fixed") !== "left" && o.remove();
677
+ }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
678
+ o.getAttribute("fixed") !== "right" && o.remove();
679
+ }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((o) => {
680
+ o.remove();
681
+ }), n;
681
682
  }, "#createSplitTable"));
682
- x(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, j).getRowHeight(), "getRowHeight"));
683
- x(this, "scrollToX", /* @__PURE__ */ a((e) => {
683
+ v(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, K).getRowHeight(), "getRowHeight"));
684
+ v(this, "scrollToX", /* @__PURE__ */ a((e) => {
684
685
  const s = this.querySelector(".ng-container-body");
685
686
  s && (s.scrollLeft = e);
686
687
  }, "scrollToX"));
687
- x(this, "scrollToY", /* @__PURE__ */ a((e) => {
688
+ v(this, "scrollToY", /* @__PURE__ */ a((e) => {
688
689
  const s = this.querySelector(".ng-container-body");
689
690
  s && (s.scrollTop = e);
690
691
  }, "scrollToY"));
@@ -838,92 +839,92 @@ const lt = class lt extends HTMLElement {
838
839
  </div>
839
840
  `;
840
841
  }, "#render"));
841
- b(this, j, new Zt(this)), b(this, Ht, this.getRootNode().host);
842
+ g(this, K, new Zt(this)), g(this, Ht, this.getRootNode().host);
842
843
  }
843
844
  connectedCallback() {
844
845
  t(this, It).call(this);
845
846
  }
846
847
  disconnectedCallback() {
847
- this.innerHTML = "", C.log("NineTableSheet destroyed.");
848
+ this.innerHTML = "", z.log("NineTableSheet destroyed.");
848
849
  }
849
850
  };
850
- Ht = new WeakMap(), it = new WeakMap(), j = new WeakMap(), Ct = new WeakMap(), _t = new WeakMap(), $t = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), a(lt, "NineTableSheet"), x(lt, "SCROLLBAR_SIZE", 16);
851
+ Ht = new WeakMap(), it = new WeakMap(), K = new WeakMap(), Ct = new WeakMap(), _t = new WeakMap(), $t = new WeakMap(), It = new WeakMap(), Mt = new WeakMap(), a(lt, "NineTableSheet"), v(lt, "SCROLLBAR_SIZE", 16);
851
852
  let xt = lt;
852
853
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", xt);
853
- var Wt, bt;
854
+ var Wt, gt;
854
855
  const ae = class ae extends HTMLElement {
855
856
  constructor() {
856
857
  super();
857
858
  c(this, Wt, /* @__PURE__ */ a(() => {
858
859
  var e;
859
860
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
860
- var n;
861
- const o = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((n = s.target.closest(".nine-tab-item")) == null ? void 0 : n.dataset.index, 10);
862
- t(this, bt).call(this, r, o);
863
- }), t(this, bt).call(this, 0, !1);
861
+ var o;
862
+ const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
863
+ t(this, gt).call(this, r, n);
864
+ }), t(this, gt).call(this, 0, !1);
864
865
  }, "#init"));
865
- c(this, bt, /* @__PURE__ */ a((e, s = !1) => {
866
- const o = /* @__PURE__ */ a(() => {
866
+ c(this, gt, /* @__PURE__ */ a((e, s = !1) => {
867
+ const n = /* @__PURE__ */ a(() => {
867
868
  const f = Array.from(this.querySelectorAll("nine-table-sheet"));
868
869
  Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
869
- const g = f.filter((y) => y.classList.contains("active"));
870
- g.length < 2 || g.forEach((y) => {
871
- const S = parseInt(y.getAttribute("data-index"), 10), A = this.querySelector(`nine-splitter[data-split-index="${S}"]`), J = f[S + 1];
872
- A && J && J.classList.contains("active") && A.style.setProperty("display", "flex");
870
+ const b = f.filter((y) => y.classList.contains("active"));
871
+ b.length < 2 || b.forEach((y) => {
872
+ const m = parseInt(y.getAttribute("data-index"), 10), R = this.querySelector(`nine-splitter[data-split-index="${m}"]`), O = f[m + 1];
873
+ R && O && O.classList.contains("active") && R.style.setProperty("display", "flex");
873
874
  });
874
- }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), n = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), h = n.querySelectorAll("nine-table-sheet");
875
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), d = o.querySelectorAll("nine-table-sheet");
875
876
  if (!l[e]) return;
876
877
  if (!s)
877
878
  l.forEach((f, u) => {
878
879
  f.classList.toggle("active", u === e);
879
- }), h.forEach((f, u) => {
880
- const g = u === e;
881
- f.classList.toggle("active", g), f.style.flex = g ? "1 1 100%" : "";
880
+ }), d.forEach((f, u) => {
881
+ const b = u === e;
882
+ f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
882
883
  });
883
884
  else {
884
885
  const f = l[e], u = r.querySelectorAll(".nine-tab-item.active");
885
886
  if (f.classList.contains("active") && u.length <= 1)
886
887
  return;
887
888
  f.classList.toggle("active");
888
- const g = n.querySelector(`nine-table-sheet[data-index="${e}"]`);
889
- g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
889
+ const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
890
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
890
891
  }
891
- const d = n.querySelectorAll("nine-table-sheet.active");
892
- d == null || d.forEach((f) => {
893
- f.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
894
- }), o();
892
+ const h = o.querySelectorAll("nine-table-sheet.active");
893
+ h == null || h.forEach((f) => {
894
+ f.style.flex = h.length > 1 ? "1 1 0%" : "1 1 100%";
895
+ }), n();
895
896
  }, "#switchSheet"));
896
897
  }
897
898
  connectedCallback() {
898
899
  t(this, Wt).call(this);
899
900
  }
900
901
  };
901
- Wt = new WeakMap(), bt = new WeakMap(), a(ae, "NineTableSheets");
902
+ Wt = new WeakMap(), gt = new WeakMap(), a(ae, "NineTableSheets");
902
903
  let Gt = ae;
903
904
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", Gt);
904
- var T, Ot, gt, zt;
905
+ var q, Ot, bt, zt;
905
906
  const ce = class ce {
906
907
  constructor(i) {
907
- c(this, T);
908
+ c(this, q);
908
909
  c(this, Ot, /* @__PURE__ */ a(() => {
909
910
  t(this, zt).call(this), new ResizeObserver((i) => {
910
911
  for (let e of i)
911
- t(this, T).getAttribute("auto-height") === "true" && t(this, gt).call(this);
912
- }).observe(t(this, T));
912
+ t(this, q).getAttribute("auto-height") === "true" && t(this, bt).call(this);
913
+ }).observe(t(this, q));
913
914
  }, "#init"));
914
- c(this, gt, /* @__PURE__ */ a(() => {
915
- var h, d;
916
- const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
915
+ c(this, bt, /* @__PURE__ */ a(() => {
916
+ var d, h;
917
+ const i = Array.from(t(this, q).shadowRoot.querySelectorAll("nine-table-sheet.active"));
917
918
  if (i.length === 0) return;
918
- const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), o = (h = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : h.getBoundingClientRect().height, r = (d = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, n = xt.SCROLLBAR_SIZE, l = e * s + o + r + n;
919
- t(this, T).style.height = `${l}px`;
919
+ const e = parseInt(t(this, q).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), n = (d = t(this, q).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : d.getBoundingClientRect().height, r = (h = t(this, q).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : h.getBoundingClientRect().height, o = xt.SCROLLBAR_SIZE, l = e * s + n + r + o;
920
+ t(this, q).style.height = `${l}px`;
920
921
  }, "#applyAutoHeight"));
921
922
  c(this, zt, /* @__PURE__ */ a(() => {
922
- const e = Array.from(t(this, T).children).filter((h) => h.tagName === "TABLE"), s = t(this, T).getAttribute("auto-height") === "true", o = e.length, r = e.map((h, d) => {
923
- const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, g = d < o - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
924
- return u + g;
925
- }).join(""), n = e.map((h, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
926
- t(this, T).shadowRoot.innerHTML = `
923
+ const e = Array.from(t(this, q).children).filter((d) => d.tagName === "TABLE"), s = t(this, q).getAttribute("auto-height") === "true", n = e.length, r = e.map((d, h) => {
924
+ const u = `<nine-table-sheet class="${h === 0 ? "active" : ""}" data-index="${h}"></nine-table-sheet>`, b = h < n - 1 ? `<nine-splitter class="h" data-split-index="${h}"></nine-splitter>` : "";
925
+ return u + b;
926
+ }).join(""), o = e.map((d, h) => `<div class="nine-tab-item ${h === 0 ? "active" : ""}" data-index="${h}">Sheet ${h + 1}</div>`).join("");
927
+ t(this, q).shadowRoot.innerHTML = `
927
928
  <style>
928
929
  :host {
929
930
  display: flex;
@@ -1006,7 +1007,7 @@ const ce = class ce {
1006
1007
  <nine-table-sheets>
1007
1008
  <nine-table-sheets-body>${r}</nine-table-sheets-body>
1008
1009
  <nine-table-sheets-footer>
1009
- <div class="nine-tab-bar">${n}</div>
1010
+ <div class="nine-tab-bar">${o}</div>
1010
1011
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
1011
1012
  </nine-table-sheets-footer>
1012
1013
  </nine-table-sheets>
@@ -1014,158 +1015,158 @@ const ce = class ce {
1014
1015
  </nine-table-body>
1015
1016
  <nine-table-footer></nine-table-footer>
1016
1017
  `;
1017
- const l = t(this, T).shadowRoot.querySelectorAll("nine-table-sheet");
1018
- l == null || l.forEach((h, d) => {
1019
- e[d] && setTimeout(() => {
1020
- h.generate(e[d]), s && t(this, gt).call(this);
1018
+ const l = t(this, q).shadowRoot.querySelectorAll("nine-table-sheet");
1019
+ l == null || l.forEach((d, h) => {
1020
+ e[h] && setTimeout(() => {
1021
+ d.generate(e[h]), s && t(this, bt).call(this);
1021
1022
  });
1022
1023
  });
1023
1024
  }, "#render"));
1024
- b(this, T, i), t(this, Ot).call(this);
1025
+ g(this, q, i), t(this, Ot).call(this);
1025
1026
  }
1026
1027
  };
1027
- T = new WeakMap(), Ot = new WeakMap(), gt = new WeakMap(), zt = new WeakMap(), a(ce, "LayoutManager");
1028
+ q = new WeakMap(), Ot = new WeakMap(), bt = new WeakMap(), zt = new WeakMap(), a(ce, "LayoutManager");
1028
1029
  let Jt = ce;
1029
1030
  var yt, st;
1030
1031
  const he = class he {
1031
1032
  constructor(i) {
1032
1033
  c(this, yt);
1033
1034
  c(this, st, -1);
1034
- x(this, "count", /* @__PURE__ */ a(() => t(this, yt).rawRecords.length, "count"));
1035
- b(this, yt, i);
1035
+ v(this, "count", /* @__PURE__ */ a(() => t(this, yt).rawRecords.length, "count"));
1036
+ g(this, yt, i);
1036
1037
  }
1037
1038
  get at() {
1038
1039
  return t(this, st);
1039
1040
  }
1040
1041
  set at(i) {
1041
- b(this, st, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, st)}"]`) && setTimeout(() => {
1042
+ g(this, st, parseInt(i, 10)), body && !body.querySelector(`tbody.bindable tr[data-row="${t(this, st)}"]`) && setTimeout(() => {
1042
1043
  });
1043
1044
  }
1044
1045
  };
1045
1046
  yt = new WeakMap(), st = new WeakMap(), a(he, "ngRow");
1046
1047
  let Qt = he;
1047
- var k, E, L, nt, Dt, N, Bt, K, pt, Nt, Pt, ot;
1048
- const H = class H {
1048
+ var k, E, H, nt, Dt, V, Bt, Z, pt, Nt, Pt, ot;
1049
+ const C = class C {
1049
1050
  constructor(i, e) {
1050
1051
  c(this, k);
1051
1052
  c(this, E);
1052
- c(this, L, []);
1053
+ c(this, H, []);
1053
1054
  c(this, nt, []);
1054
1055
  c(this, Dt, 0);
1055
- c(this, N, []);
1056
+ c(this, V, []);
1056
1057
  c(this, Bt, /* @__PURE__ */ a(() => {
1057
- b(this, N, []);
1058
+ g(this, V, []);
1058
1059
  const i = t(this, k).template || [];
1059
1060
  Array.from(i).forEach((e) => {
1060
1061
  var s;
1061
- t(this, N).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1062
+ t(this, V).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1062
1063
  }), (t(this, E).rawRecords || []).forEach((e) => {
1063
- e.__ng || (e.__ng = t(this, pt).call(this)), e.__ng.height = t(this, N).slice();
1064
+ e.__ng || (e.__ng = t(this, pt).call(this)), e.__ng.height = t(this, V).slice();
1064
1065
  });
1065
1066
  }, "#initialize"));
1066
- c(this, K, /* @__PURE__ */ a(() => {
1067
+ c(this, Z, /* @__PURE__ */ a(() => {
1067
1068
  t(this, k).shadowRoot.querySelectorAll("nine-table-sheet").forEach((i) => {
1068
1069
  i.invalidate();
1069
1070
  });
1070
1071
  }, "#invalidate"));
1071
- x(this, "get", /* @__PURE__ */ a((i, e) => {
1072
+ v(this, "get", /* @__PURE__ */ a((i, e) => {
1072
1073
  var r;
1073
1074
  const s = this.getValidData();
1074
1075
  if (!s || s.length <= 0) return;
1075
1076
  if (i == null) return t(this, ot).call(this, s);
1076
1077
  if (i < 0 || i >= s.length) return null;
1077
- const o = typeof ((r = t(this, k).fields) == null ? void 0 : r.get) == "function" ? t(this, k).fields.get() : [];
1078
+ const n = typeof ((r = t(this, k).fields) == null ? void 0 : r.get) == "function" ? t(this, k).fields.get() : [];
1078
1079
  if (e != null) {
1079
- const n = o.indexOf(e);
1080
- return n >= 0 ? s[i].v[n] : null;
1080
+ const o = n.indexOf(e);
1081
+ return o >= 0 ? s[i].v[o] : null;
1081
1082
  }
1082
1083
  return t(this, ot).call(this, s[i]);
1083
1084
  }, "get"));
1084
- x(this, "set", /* @__PURE__ */ a((i) => {
1085
- this.clear(), this.add(i, !1), t(this, K).call(this);
1085
+ v(this, "set", /* @__PURE__ */ a((i) => {
1086
+ this.clear(), this.add(i, !1), t(this, Z).call(this);
1086
1087
  }, "set"));
1087
1088
  c(this, pt, /* @__PURE__ */ a(() => ({
1088
- rowState: H.ROW_STATE.EMPTY,
1089
+ rowState: C.ROW_STATE.EMPTY,
1089
1090
  deleted: !1,
1090
1091
  filtered: !1,
1091
- height: t(this, N).slice(),
1092
+ height: t(this, V).slice(),
1092
1093
  o: {},
1093
1094
  c: {},
1094
- _: [0, 0, 0, 0, H.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, N).slice(), -1, {}, {}]
1095
+ _: [0, 0, 0, 0, C.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, V).slice(), -1, {}, {}]
1095
1096
  }), "#getDefaultMeta"));
1096
- x(this, "reset", /* @__PURE__ */ a(() => {
1097
- b(this, L, []), b(this, nt, []), t(this, K).call(this);
1097
+ v(this, "reset", /* @__PURE__ */ a(() => {
1098
+ g(this, H, []), g(this, nt, []), t(this, Z).call(this);
1098
1099
  }, "reset"));
1099
- x(this, "clear", /* @__PURE__ */ a(() => {
1100
+ v(this, "clear", /* @__PURE__ */ a(() => {
1100
1101
  var i;
1101
- t(this, E).rawRecords = [], b(this, L, []), b(this, nt, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1102
+ t(this, E).rawRecords = [], g(this, H, []), g(this, nt, []), (i = t(this, E).viewRecords) != null && i.reset && t(this, E).viewRecords.reset();
1102
1103
  }, "clear"));
1103
1104
  c(this, Nt, /* @__PURE__ */ a((i) => {
1104
- var o;
1105
+ var n;
1105
1106
  Array.isArray(i) || (i = [i]);
1106
- const e = typeof ((o = t(this, k).fields) == null ? void 0 : o.get) == "function" ? t(this, k).fields.get() : Object.keys(i[0] || {}), s = [];
1107
+ const e = typeof ((n = t(this, k).fields) == null ? void 0 : n.get) == "function" ? t(this, k).fields.get() : Object.keys(i[0] || {}), s = [];
1107
1108
  return i.forEach((r) => {
1108
- const n = { v: [] };
1109
+ const o = { v: [] };
1109
1110
  e.forEach((l) => {
1110
- n.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1111
- }), s.push(n);
1111
+ o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1112
+ }), s.push(o);
1112
1113
  }), s;
1113
1114
  }, "#json2Array"));
1114
1115
  c(this, Pt, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1115
- e.__ng = t(this, pt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = H.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1116
+ e.__ng = t(this, pt).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = C.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1116
1117
  }), i), "#defaultInsert"));
1117
- x(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1118
+ v(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1118
1119
  i === void 0 && (i = {});
1119
1120
  const s = t(this, Nt).call(this, i);
1120
1121
  t(this, E).rawRecords = t(this, E).rawRecords.concat(t(this, Pt).call(this, s)), this.resetRecords();
1121
- const o = this.count() - 1;
1122
- return e || s.forEach((r, n) => {
1123
- const l = t(this, E).rawRecords[o - n];
1124
- l && (l.__ng.rowState = H.ROW_STATE.EMPTY);
1125
- }), t(this, K).call(this), o;
1122
+ const n = this.count() - 1;
1123
+ return e || s.forEach((r, o) => {
1124
+ const l = t(this, E).rawRecords[n - o];
1125
+ l && (l.__ng.rowState = C.ROW_STATE.EMPTY);
1126
+ }), t(this, Z).call(this), n;
1126
1127
  }, "add"));
1127
- x(this, "delete", /* @__PURE__ */ a((i) => {
1128
+ v(this, "delete", /* @__PURE__ */ a((i) => {
1128
1129
  let e = [];
1129
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((s, o) => o - s).forEach((s) => {
1130
- if (t(this, L)[s]) {
1131
- const o = t(this, L)[s].__ng.rowid;
1132
- t(this, L)[s].__ng.rowState === H.ROW_STATE.INSERT ? t(this, E).rawRecords = t(this, E).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, E).rawRecords.forEach((r) => {
1133
- r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = H.ROW_STATE.DELETE);
1130
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, E).host.row.at] : e = [parseInt(i, 10)], e.sort((s, n) => n - s).forEach((s) => {
1131
+ if (t(this, H)[s]) {
1132
+ const n = t(this, H)[s].__ng.rowid;
1133
+ t(this, H)[s].__ng.rowState === C.ROW_STATE.INSERT ? t(this, E).rawRecords = t(this, E).rawRecords.filter((r) => r.__ng.rowid !== n) : t(this, E).rawRecords.forEach((r) => {
1134
+ r.__ng.rowid === n && (r.__ng.deleted = !0, r.__ng.rowState = C.ROW_STATE.DELETE);
1134
1135
  });
1135
1136
  }
1136
- }), this.resetRecords(), t(this, K).call(this);
1137
+ }), this.resetRecords(), t(this, Z).call(this);
1137
1138
  }, "delete"));
1138
- x(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1139
- var h;
1139
+ v(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1140
+ var d;
1140
1141
  i = parseInt(i, 10);
1141
- const r = (typeof ((h = t(this, k).fields) == null ? void 0 : h.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
1142
+ const r = (typeof ((d = t(this, k).fields) == null ? void 0 : d.get) == "function" ? t(this, k).fields.get() : []).indexOf(e);
1142
1143
  if (r < 0) return;
1143
- const n = this.getValidData()[i];
1144
- if (!n) return;
1145
- const l = n.v[r];
1146
- l !== s && n.__ng.rowState !== H.ROW_STATE.INSERT && (n.__ng.o.hasOwnProperty(e) || (n.__ng.o[e] = l), n.__ng.rowState = H.ROW_STATE.UPDATE), n.v[r] = s;
1144
+ const o = this.getValidData()[i];
1145
+ if (!o) return;
1146
+ const l = o.v[r];
1147
+ l !== s && o.__ng.rowState !== C.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = C.ROW_STATE.UPDATE), o.v[r] = s;
1147
1148
  }, "setValue"));
1148
- x(this, "resetRecords", /* @__PURE__ */ a(() => {
1149
- b(this, nt, t(this, E).rawRecords.filter((i) => !i.__ng.deleted)), b(this, L, t(this, E).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, E).rawRecords.forEach((i, e) => {
1149
+ v(this, "resetRecords", /* @__PURE__ */ a(() => {
1150
+ g(this, nt, t(this, E).rawRecords.filter((i) => !i.__ng.deleted)), g(this, H, t(this, E).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, E).rawRecords.forEach((i, e) => {
1150
1151
  i.__ng.rowidx = e;
1151
- }), t(this, L).forEach((i, e) => {
1152
+ }), t(this, H).forEach((i, e) => {
1152
1153
  i.__ng.i = e;
1153
1154
  });
1154
1155
  }, "resetRecords"));
1155
- x(this, "getValidData", /* @__PURE__ */ a(() => (t(this, L).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, L)), "getValidData"));
1156
+ v(this, "getValidData", /* @__PURE__ */ a(() => (t(this, H).length === 0 && t(this, E).rawRecords.length > 0 && this.resetRecords(), t(this, H)), "getValidData"));
1156
1157
  c(this, ot, /* @__PURE__ */ a((i) => {
1157
- var n;
1158
+ var o;
1158
1159
  if (!i) return i;
1159
- const e = !Array.isArray(i), s = e ? [i] : i, o = typeof ((n = t(this, k).fields) == null ? void 0 : n.get) == "function" ? t(this, k).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1160
- const h = {};
1161
- return o.forEach((d, f) => {
1162
- h[d] = l.v ? l.v[f] : l[d];
1163
- }), h.__ng = l.__ng, h;
1160
+ const e = !Array.isArray(i), s = e ? [i] : i, n = typeof ((o = t(this, k).fields) == null ? void 0 : o.get) == "function" ? t(this, k).fields.get() : [], r = s.filter((l) => !l.__ng.deleted).map((l) => {
1161
+ const d = {};
1162
+ return n.forEach((h, f) => {
1163
+ d[h] = l.v ? l.v[f] : l[h];
1164
+ }), d.__ng = l.__ng, d;
1164
1165
  });
1165
1166
  return e ? r[0] : r;
1166
1167
  }, "#conv"));
1167
- x(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
1168
- b(this, k, i), b(this, E, e), t(this, Bt).call(this);
1168
+ v(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
1169
+ g(this, k, i), g(this, E, e), t(this, Bt).call(this);
1169
1170
  }
1170
1171
  get source() {
1171
1172
  return t(this, ot).call(this, t(this, E).rawRecords);
@@ -1174,89 +1175,89 @@ const H = class H {
1174
1175
  this.clear(), this.add(i, !1);
1175
1176
  }
1176
1177
  get nextId() {
1177
- return ++pe(this, Dt)._;
1178
+ return ++Se(this, Dt)._;
1178
1179
  }
1179
1180
  get length() {
1180
- return t(this, L).length;
1181
+ return t(this, H).length;
1181
1182
  }
1182
1183
  getRowCount() {
1183
1184
  return this.length;
1184
1185
  }
1185
1186
  };
1186
- k = new WeakMap(), E = new WeakMap(), L = new WeakMap(), nt = new WeakMap(), Dt = new WeakMap(), N = new WeakMap(), Bt = new WeakMap(), K = new WeakMap(), pt = new WeakMap(), Nt = new WeakMap(), Pt = new WeakMap(), ot = new WeakMap(), a(H, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1187
- x(H, "ROW_STATE", {
1187
+ k = new WeakMap(), E = new WeakMap(), H = new WeakMap(), nt = new WeakMap(), Dt = new WeakMap(), V = new WeakMap(), Bt = new WeakMap(), Z = new WeakMap(), pt = new WeakMap(), Nt = new WeakMap(), Pt = new WeakMap(), ot = new WeakMap(), a(C, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1188
+ v(C, "ROW_STATE", {
1188
1189
  EMPTY: "EMPTY",
1189
1190
  NORMAL: "NORMAL",
1190
1191
  INSERT: "INSERT",
1191
1192
  UPDATE: "UPDATE",
1192
1193
  DELETE: "DELETE"
1193
1194
  });
1194
- let te = H;
1195
- var Z;
1195
+ let te = C;
1196
+ var G;
1196
1197
  const de = class de {
1197
1198
  constructor(i) {
1198
- c(this, Z);
1199
- b(this, Z, i), this.row = new Qt(this), this.data = new te(t(this, Z), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1199
+ c(this, G);
1200
+ g(this, G, i), this.row = new Qt(this), this.data = new te(t(this, G), this), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.pageCnt = 25, this.viewRecords.reset = () => {
1200
1201
  var e;
1201
- (e = t(this, Z).view) != null && e.redraw && t(this, Z).view.redraw();
1202
+ (e = t(this, G).view) != null && e.redraw && t(this, G).view.redraw();
1202
1203
  }, this.setDataSource = (e) => {
1203
1204
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1204
1205
  }, this.getRowState = (e) => {
1205
- var o, r;
1206
+ var n, r;
1206
1207
  const s = parseInt(e, 10);
1207
1208
  if (!(s >= this.data.count()))
1208
- return (r = (o = this.data.getValidData()[s]) == null ? void 0 : o.__ng) == null ? void 0 : r.rowState;
1209
+ return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
1209
1210
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1210
1211
  this.row.at = e;
1211
- }, 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, o) => {
1212
- e = parseInt(e, 10), this.data.setValue(e, s, o);
1212
+ }, 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, n) => {
1213
+ e = parseInt(e, 10), this.data.setValue(e, s, n);
1213
1214
  }, this.setDataSource([]);
1214
1215
  }
1215
1216
  };
1216
- Z = new WeakMap(), a(de, "ngDataManager");
1217
+ G = new WeakMap(), a(de, "ngDataManager");
1217
1218
  let ee = de;
1218
- var rt, R, mt, Vt;
1219
+ var rt, A, mt, Vt;
1219
1220
  const fe = class fe {
1220
1221
  // 🎯 이제 { name: string, type: string } κ°μ²΄λ“€μ˜ λ°°μ—΄λ‘œ κ΄€λ¦¬ν•©λ‹ˆλ‹€.
1221
1222
  constructor(i) {
1222
1223
  c(this, rt);
1223
- c(this, R, []);
1224
- x(this, "add", /* @__PURE__ */ a((i, e = "string") => {
1224
+ c(this, A, []);
1225
+ v(this, "add", /* @__PURE__ */ a((i, e = "string") => {
1225
1226
  i.forEach((s) => {
1226
- t(this, R).some((o) => o.name === s) || t(this, R).push({ name: s, type: e });
1227
+ t(this, A).some((n) => n.name === s) || t(this, A).push({ name: s, type: e });
1227
1228
  }), t(this, mt).call(this);
1228
1229
  }, "add"));
1229
1230
  c(this, mt, /* @__PURE__ */ a(() => {
1230
1231
  const i = /* @__PURE__ */ new Map();
1231
- t(this, R).forEach((e) => {
1232
+ t(this, A).forEach((e) => {
1232
1233
  i.set(e.name, e.type);
1233
- }), b(this, R, Array.from(i, ([e, s]) => ({ name: e, type: s }))), b(this, R, t(this, R).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, R).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1234
+ }), g(this, A, Array.from(i, ([e, s]) => ({ name: e, type: s }))), g(this, A, t(this, A).filter((e) => e.name !== "" && e.name !== "__ng")), t(this, A).sort((e, s) => e.name.length < s.name.length ? 1 : -1);
1234
1235
  }, "#adjust"));
1235
1236
  c(this, Vt, /* @__PURE__ */ a(() => {
1236
- b(this, R, []), C.log(t(this, rt).querySelectorAll("table"));
1237
+ g(this, A, []), z.log(t(this, rt).querySelectorAll("table"));
1237
1238
  const i = Array.from(t(this, rt).querySelectorAll("table"));
1238
1239
  if (!(!i || i.length === 0)) {
1239
1240
  for (const e of i)
1240
- C.log(e), $("[data-bind]", e).each((s, o) => {
1241
- const r = o.dataset.bind, n = o.getAttribute("data-type") || "string";
1242
- r && t(this, R).push({ name: r, type: n });
1241
+ z.log(e), $("[data-bind]", e).each((s, n) => {
1242
+ const r = n.dataset.bind, o = n.getAttribute("data-type") || "string";
1243
+ r && t(this, A).push({ name: r, type: o });
1243
1244
  }), ["data-expr", "background-color", "color", "tooltip", "visible", "readonly", "enable-button", "enable-check", "class-expr", "icon-color", "icon-src"].forEach((s) => {
1244
- $(`[${s}]`, e).each((o, r) => {
1245
- var n = r.getAttribute(s);
1246
- if (n.indexOf("data.") < 0) {
1247
- const l = n.search(/[(]/g);
1245
+ $(`[${s}]`, e).each((n, r) => {
1246
+ var o = r.getAttribute(s);
1247
+ if (o.indexOf("data.") < 0) {
1248
+ const l = o.search(/[(]/g);
1248
1249
  if (l > 0)
1249
1250
  try {
1250
- n = String(window[n.substring(0, l).trim()]);
1251
+ o = String(window[o.substring(0, l).trim()]);
1251
1252
  } catch {
1252
- n = "";
1253
+ o = "";
1253
1254
  }
1254
1255
  }
1255
- n.split("data.").forEach((l) => {
1256
+ o.split("data.").forEach((l) => {
1256
1257
  if (l.trim() != "") {
1257
- const h = l.search(/[^_A-Za-z0-9]/g);
1258
- let d = "";
1259
- h >= 0 ? d = l.substring(0, h) : n.startsWith("data.") && (d = l.replace("data.", "")), d && t(this, R).push({ name: d, type: "string" });
1258
+ const d = l.search(/[^_A-Za-z0-9]/g);
1259
+ let h = "";
1260
+ d >= 0 ? h = l.substring(0, d) : o.startsWith("data.") && (h = l.replace("data.", "")), h && t(this, A).push({ name: h, type: "string" });
1260
1261
  }
1261
1262
  });
1262
1263
  });
@@ -1264,62 +1265,62 @@ const fe = class fe {
1264
1265
  t(this, mt).call(this);
1265
1266
  }
1266
1267
  }, "#init"));
1267
- b(this, rt, i), t(this, Vt).call(this);
1268
+ g(this, rt, i), t(this, Vt).call(this);
1268
1269
  }
1269
1270
  // 🎯 기쑴에 ν•„λ“œ μ΄λ¦„λ§Œ μ“°λ˜ κ³³λ“€κ³Όμ˜ ν˜Έν™˜μ„ μœ„ν•΄ 이름 λ°°μ—΄λ§Œ λ¦¬ν„΄ν•˜λŠ” λ©”μ„œλ“œ μœ μ§€
1270
1271
  get() {
1271
- return t(this, R).map((i) => i.name);
1272
+ return t(this, A).map((i) => i.name);
1272
1273
  }
1273
1274
  // 🎯 λ‚΄λΆ€ 객체 ν†΅μ§Έλ‘œ μ–»κΈ°
1274
1275
  getFields() {
1275
- return t(this, R);
1276
+ return t(this, A);
1276
1277
  }
1277
1278
  // 🎯 νŠΉμ • ν•„λ“œμ˜ 데이터 νƒ€μž… 쑰회
1278
1279
  getType(i) {
1279
- const e = t(this, R).find((s) => s.name === i);
1280
+ const e = t(this, A).find((s) => s.name === i);
1280
1281
  return e ? e.type : "string";
1281
1282
  }
1282
1283
  indexOf(i) {
1283
- return t(this, R).findIndex((e) => e.name === i);
1284
+ return t(this, A).findIndex((e) => e.name === i);
1284
1285
  }
1285
1286
  includes(i) {
1286
- return t(this, R).some((e) => e.name === i);
1287
+ return t(this, A).some((e) => e.name === i);
1287
1288
  }
1288
1289
  };
1289
- rt = new WeakMap(), R = new WeakMap(), mt = new WeakMap(), Vt = new WeakMap(), a(fe, "ngFields");
1290
+ rt = new WeakMap(), A = new WeakMap(), mt = new WeakMap(), Vt = new WeakMap(), a(fe, "ngFields");
1290
1291
  let ie = fe;
1291
- var G, Yt, Xt;
1292
+ var J, Yt, Xt;
1292
1293
  const ue = class ue extends HTMLElement {
1293
1294
  constructor() {
1294
1295
  super();
1295
1296
  //#created = false;
1296
- c(this, G);
1297
+ c(this, J);
1297
1298
  c(this, Yt);
1298
1299
  c(this, Xt, /* @__PURE__ */ a(() => {
1299
- this.fields = new ie(this), b(this, Yt, new Jt(this)), C.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1300
+ this.fields = new ie(this), g(this, Yt, new Jt(this)), z.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1300
1301
  }, "#init"));
1301
- this.attachShadow({ mode: "open" }), b(this, G, new ee(this));
1302
+ this.attachShadow({ mode: "open" }), g(this, J, new ee(this));
1302
1303
  }
1303
1304
  connectedCallback() {
1304
1305
  t(this, Xt).call(this);
1305
1306
  }
1306
1307
  disconnectedCallback() {
1307
- C.log("NineTable disconnected.");
1308
+ z.log("NineTable disconnected.");
1308
1309
  }
1309
1310
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1310
1311
  get data() {
1311
- return t(this, G).data;
1312
+ return t(this, J).data;
1312
1313
  }
1313
1314
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1314
1315
  get row() {
1315
- return t(this, G).row;
1316
+ return t(this, J).row;
1316
1317
  }
1317
1318
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1318
1319
  get dataManager() {
1319
- return t(this, G);
1320
+ return t(this, J);
1320
1321
  }
1321
1322
  };
1322
- G = new WeakMap(), Yt = new WeakMap(), Xt = new WeakMap(), a(ue, "NineTable");
1323
+ J = new WeakMap(), Yt = new WeakMap(), Xt = new WeakMap(), a(ue, "NineTable");
1323
1324
  let se = ue;
1324
1325
  customElements.get("nine-table") || customElements.define("nine-table", se);
1325
1326
  //# sourceMappingURL=nine-table.js.map