@ninebone/table 0.0.311 β†’ 0.0.313

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,90 +1,90 @@
1
1
  var te = Object.defineProperty;
2
- var ee = (x) => {
3
- throw TypeError(x);
2
+ var ee = (v) => {
3
+ throw TypeError(v);
4
4
  };
5
- var ne = (x, i, e) => i in x ? te(x, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : x[i] = e;
6
- var a = (x, i) => te(x, "name", { value: i, configurable: !0 });
7
- var w = (x, i, e) => ne(x, typeof i != "symbol" ? i + "" : i, e), ie = (x, i, e) => i.has(x) || ee("Cannot " + e);
8
- var t = (x, i, e) => (ie(x, i, "read from private field"), e ? e.call(x) : i.get(x)), h = (x, i, e) => i.has(x) ? ee("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(x) : i.set(x, e), b = (x, i, e, s) => (ie(x, i, "write to private field"), s ? s.call(x, e) : i.set(x, e), e);
9
- var se = (x, i, e, s) => ({
5
+ var ne = (v, i, e) => i in v ? te(v, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : v[i] = e;
6
+ var c = (v, i) => te(v, "name", { value: i, configurable: !0 });
7
+ var w = (v, i, e) => ne(v, typeof i != "symbol" ? i + "" : i, e), ie = (v, i, e) => i.has(v) || ee("Cannot " + e);
8
+ var t = (v, i, e) => (ie(v, i, "read from private field"), e ? e.call(v) : i.get(v)), h = (v, i, e) => i.has(v) ? ee("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(v) : i.set(v, e), g = (v, i, e, s) => (ie(v, i, "write to private field"), s ? s.call(v, e) : i.set(v, e), e);
9
+ var se = (v, i, e, s) => ({
10
10
  set _(n) {
11
- b(x, i, n, e);
11
+ g(v, i, n, e);
12
12
  },
13
13
  get _() {
14
- return t(x, i, s);
14
+ return t(v, i, s);
15
15
  }
16
16
  });
17
17
  import { trace as oe } from "@ninebone/util";
18
- const Yt = class Yt extends oe.constructor {
18
+ const Vt = class Vt extends oe.constructor {
19
19
  constructor() {
20
20
  super(), this.init("nine-table", "green");
21
21
  }
22
22
  };
23
- a(Yt, "Trace");
24
- let _t = Yt;
25
- const H = new _t();
26
- var M, $, p, P, B, N, dt, V, ft;
23
+ c(Vt, "Trace");
24
+ let Mt = Vt;
25
+ const tt = new Mt();
26
+ var C, M, p, D, P, B, dt, N, ft;
27
27
  const Xt = class Xt extends HTMLElement {
28
28
  constructor() {
29
29
  super();
30
- h(this, M);
31
- h(this, $, !1);
30
+ h(this, C);
31
+ h(this, M, !1);
32
32
  h(this, p);
33
+ h(this, D);
33
34
  h(this, P);
34
35
  h(this, B);
35
- h(this, N);
36
- h(this, dt, /* @__PURE__ */ a(() => {
37
- if (!t(this, M)) return;
38
- const e = t(this, M).querySelector(".ng-container-body");
39
- e && (b(this, N, new ResizeObserver(() => {
36
+ h(this, dt, /* @__PURE__ */ c(() => {
37
+ if (!t(this, C)) return;
38
+ const e = t(this, C).querySelector(".ng-container-body");
39
+ e && (g(this, B, new ResizeObserver(() => {
40
40
  this.refresh();
41
- })), t(this, N).observe(e));
41
+ })), t(this, B).observe(e));
42
42
  }, "#observeResize"));
43
- w(this, "refresh", /* @__PURE__ */ a(() => {
44
- if (!t(this, M) || !t(this, p) || t(this, $)) return;
43
+ w(this, "refresh", /* @__PURE__ */ c(() => {
44
+ if (!t(this, C) || !t(this, p) || t(this, M)) return;
45
45
  const e = t(this, p).container, s = e.querySelector("table");
46
46
  if (!s) return;
47
- const n = t(this, p).track, o = t(this, p).thumb, r = t(this, M).querySelector(".ng-container-bottom"), l = e.clientWidth, c = s.scrollWidth;
48
- if (l !== 0 && c > l)
49
- r && (r.style.display = "flex");
47
+ const n = t(this, p).track, r = t(this, p).thumb, o = t(this, C).querySelector(".ng-container-bottom"), l = e.clientWidth, a = s.scrollWidth;
48
+ if (l !== 0 && a > l)
49
+ o && (o.style.display = "flex");
50
50
  else {
51
- r && (r.style.display = "none");
51
+ o && (o.style.display = "none");
52
52
  return;
53
53
  }
54
54
  const d = n.clientWidth;
55
55
  if (d <= 0) return;
56
- const u = Math.max(Math.min(d * (l / c), d), 20);
57
- o.style.width = `${u}px`;
58
- const f = e.scrollLeft, g = c - l;
59
- let y = 0;
60
- g > 0 && (y = parseInt(f / g * (d - u), 10)), y < 0 && (y = 0);
61
- const E = d - u;
62
- y > E && (y = E), o.style.left = `${y}px`, H.log(y), t(this, p).left.disabled = y === 0, t(this, p).right.disabled = y >= E - 1;
56
+ const f = Math.max(Math.min(d * (l / a), d), 20);
57
+ r.style.width = `${f}px`;
58
+ const u = e.scrollLeft, b = a - l;
59
+ let m = 0;
60
+ b > 0 && (m = parseInt(u / b * (d - f), 10)), m < 0 && (m = 0);
61
+ const E = d - f;
62
+ m > E && (m = E), r.style.left = `${m}px`, tt.log(m), t(this, p).left.disabled = m === 0, t(this, p).right.disabled = m >= E - 1;
63
63
  }, "refresh"));
64
- h(this, V, /* @__PURE__ */ a((e) => {
64
+ h(this, N, /* @__PURE__ */ c((e) => {
65
65
  if (!t(this, p)) return !1;
66
66
  const s = t(this, p).container, n = s.querySelector("table");
67
67
  if (!n) return !1;
68
- const o = t(this, p).track.getBoundingClientRect(), r = t(this, p).thumb.clientWidth;
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 c = o.width - r;
72
- l > c && (l = c), 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 >= c - 1;
73
- const d = s.clientWidth, f = n.scrollWidth - d;
74
- return c > 0 && f > 0 && (s.scrollLeft = l / c * f), l > 0 && l < c - 1;
71
+ const a = r.width - o;
72
+ l > a && (l = a), 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 >= a - 1;
73
+ const d = s.clientWidth, u = n.scrollWidth - d;
74
+ return a > 0 && u > 0 && (s.scrollLeft = l / a * u), l > 0 && l < a - 1;
75
75
  }, "#thumbMoveTo"));
76
- h(this, ft, /* @__PURE__ */ a(() => {
77
- const e = /* @__PURE__ */ a((n) => {
78
- clearInterval(t(this, P)), clearInterval(t(this, B));
79
- const o = parseInt(t(this, p).thumb.style.left || 0, 10);
80
- t(this, V).call(this, o + n), b(this, P, setInterval(() => {
81
- clearInterval(t(this, P)), b(this, B, setInterval(() => {
82
- const r = parseInt(t(this, p).thumb.style.left || 0, 10);
83
- t(this, V).call(this, r + n) || clearInterval(t(this, B));
76
+ h(this, ft, /* @__PURE__ */ c(() => {
77
+ const e = /* @__PURE__ */ c((n) => {
78
+ clearInterval(t(this, D)), clearInterval(t(this, P));
79
+ const r = parseInt(t(this, p).thumb.style.left || 0, 10);
80
+ t(this, N).call(this, r + n), g(this, D, setInterval(() => {
81
+ clearInterval(t(this, D)), g(this, P, setInterval(() => {
82
+ const o = parseInt(t(this, p).thumb.style.left || 0, 10);
83
+ t(this, N).call(this, o + n) || clearInterval(t(this, P));
84
84
  }, 50));
85
85
  }, 500));
86
- }, "delayScroll"), s = /* @__PURE__ */ a(() => {
87
- clearInterval(t(this, P)), clearInterval(t(this, B));
86
+ }, "delayScroll"), s = /* @__PURE__ */ c(() => {
87
+ clearInterval(t(this, D)), clearInterval(t(this, P));
88
88
  }, "clearTimer");
89
89
  ["mouseup", "mouseleave", "touchend"].forEach((n) => {
90
90
  t(this, p).left.addEventListener(n, s), t(this, p).right.addEventListener(n, s), t(this, p).track.addEventListener(n, s);
@@ -95,24 +95,24 @@ const Xt = class Xt extends HTMLElement {
95
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
96
  if (n.button !== 0) return;
97
97
  n.preventDefault();
98
- const o = t(this, p).track.getBoundingClientRect(), r = t(this, p).thumb.clientWidth;
99
- t(this, V).call(this, n.clientX - o.left - r / 2);
98
+ const r = t(this, p).track.getBoundingClientRect(), o = t(this, p).thumb.clientWidth;
99
+ t(this, N).call(this, n.clientX - r.left - o / 2);
100
100
  }), t(this, p).thumb.addEventListener("mousedown", (n) => {
101
101
  if (n.button !== 0) return;
102
- n.stopPropagation(), n.preventDefault(), b(this, $, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
- const o = /* @__PURE__ */ a((l) => {
104
- if (!t(this, $)) return;
105
- const c = t(this, p).track.getBoundingClientRect();
106
- t(this, V).call(this, l.clientX - c.left - this.shiftX);
107
- }, "onMouseMove"), r = /* @__PURE__ */ a(() => {
108
- b(this, $, !1), s(), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.refresh();
102
+ n.stopPropagation(), n.preventDefault(), g(this, M, !0), this.shiftX = n.clientX - t(this, p).thumb.getBoundingClientRect().left;
103
+ const r = /* @__PURE__ */ c((l) => {
104
+ if (!t(this, M)) return;
105
+ const a = t(this, p).track.getBoundingClientRect();
106
+ t(this, N).call(this, l.clientX - a.left - this.shiftX);
107
+ }, "onMouseMove"), o = /* @__PURE__ */ c(() => {
108
+ g(this, M, !1), s(), document.removeEventListener("mousemove", r), document.removeEventListener("mouseup", o), this.refresh();
109
109
  }, "onMouseUp");
110
- document.addEventListener("mousemove", o), document.addEventListener("mouseup", r);
110
+ document.addEventListener("mousemove", r), document.addEventListener("mouseup", o);
111
111
  });
112
112
  }, "#init"));
113
113
  }
114
114
  connectedCallback() {
115
- if (b(this, M, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, M)) return;
115
+ if (g(this, C, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, C)) return;
116
116
  this.innerHTML = `
117
117
  <style>
118
118
  nine-table-hscrollbar {
@@ -176,31 +176,31 @@ const Xt = class Xt extends HTMLElement {
176
176
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
177
177
  <button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
178
178
  `;
179
- const e = /* @__PURE__ */ a(() => {
180
- const s = t(this, M).querySelector(".ng-container-body");
179
+ const e = /* @__PURE__ */ c(() => {
180
+ const s = t(this, C).querySelector(".ng-container-body");
181
181
  if (!s) {
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, $) || this.refresh();
192
+ t(this, M) || this.refresh();
193
193
  }), t(this, ft).call(this), t(this, dt).call(this), this.refresh();
194
194
  }, "initWhenReady");
195
195
  e();
196
196
  }
197
197
  disconnectedCallback() {
198
- t(this, N) && t(this, N).disconnect();
198
+ t(this, B) && t(this, B).disconnect();
199
199
  }
200
200
  };
201
- M = new WeakMap(), $ = new WeakMap(), p = new WeakMap(), P = new WeakMap(), B = new WeakMap(), N = new WeakMap(), dt = new WeakMap(), V = new WeakMap(), ft = new WeakMap(), a(Xt, "NineTableHScrollBar");
202
- let $t = Xt;
203
- customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", $t);
201
+ C = new WeakMap(), M = new WeakMap(), p = new WeakMap(), D = new WeakMap(), P = new WeakMap(), B = new WeakMap(), dt = new WeakMap(), N = new WeakMap(), ft = new WeakMap(), c(Xt, "NineTableHScrollBar");
202
+ let It = Xt;
203
+ customElements.get("nine-table-hscrollbar") || customElements.define("nine-table-hscrollbar", It);
204
204
  var Y, I, S, it, st, ut;
205
205
  const Ut = class Ut extends HTMLElement {
206
206
  constructor() {
@@ -213,53 +213,53 @@ const Ut = class Ut extends HTMLElement {
213
213
  /**
214
214
  * 🎯 μŠ€ν¬λ‘€λ°” μœ„μΉ˜ 및 썸브 크기 κ°±μ‹ 
215
215
  */
216
- w(this, "refresh", /* @__PURE__ */ a(() => {
216
+ w(this, "refresh", /* @__PURE__ */ c(() => {
217
217
  if (!t(this, Y) || !t(this, S) || t(this, I)) return;
218
218
  const e = t(this, S).container, s = e.querySelector("table");
219
219
  if (!s) return;
220
- const n = t(this, S).track, o = t(this, S).thumb, r = e.clientHeight, l = s.scrollHeight;
221
- if (l <= r) {
222
- o.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
220
+ const n = t(this, S).track, r = t(this, S).thumb, o = e.clientHeight, l = s.scrollHeight;
221
+ if (l <= o) {
222
+ r.style.display = "none", t(this, S).top.disabled = !0, t(this, S).bottom.disabled = !0;
223
223
  return;
224
224
  } else
225
- o.style.display = "block";
226
- const c = n.clientHeight;
227
- if (c <= 0) return;
228
- const d = Math.max(Math.min(c * (r / l), c), 20);
229
- o.style.height = `${d}px`;
230
- const u = e.scrollTop, f = l - r;
231
- let g = 0;
232
- f > 0 && (g = u / f * (c - d));
233
- const y = c - d;
234
- g < 0 && (g = 0), g > y && (g = y), o.style.top = `${g}px`, t(this, S).top.disabled = u <= 0, t(this, S).bottom.disabled = u >= f - 1;
225
+ r.style.display = "block";
226
+ const a = n.clientHeight;
227
+ if (a <= 0) return;
228
+ const d = Math.max(Math.min(a * (o / l), a), 20);
229
+ r.style.height = `${d}px`;
230
+ const f = e.scrollTop, u = l - o;
231
+ let b = 0;
232
+ u > 0 && (b = f / u * (a - d));
233
+ const m = a - d;
234
+ b < 0 && (b = 0), b > m && (b = m), r.style.top = `${b}px`, t(this, S).top.disabled = f <= 0, t(this, S).bottom.disabled = f >= u - 1;
235
235
  }, "refresh"));
236
- h(this, ut, /* @__PURE__ */ a(() => {
236
+ h(this, ut, /* @__PURE__ */ c(() => {
237
237
  const e = t(this, S).container;
238
238
  e.addEventListener("scroll", () => {
239
239
  t(this, I) || this.refresh();
240
240
  }), t(this, S).thumb.addEventListener("mousedown", (s) => {
241
241
  if (s.button !== 0) return;
242
- s.stopPropagation(), s.preventDefault(), b(this, I, !0), b(this, it, s.clientY), b(this, st, e.scrollTop);
243
- const n = /* @__PURE__ */ a((r) => {
242
+ s.stopPropagation(), s.preventDefault(), g(this, I, !0), g(this, it, s.clientY), g(this, st, e.scrollTop);
243
+ const n = /* @__PURE__ */ c((o) => {
244
244
  if (!t(this, I)) return;
245
- const l = t(this, S).track.getBoundingClientRect(), c = t(this, S).thumb.clientHeight, u = l.height - c, f = r.clientY - t(this, it), g = e.clientHeight, y = e.querySelector("table");
246
- H.log(y), H.log(y.scrollHeight);
247
- const k = y.scrollHeight - g;
248
- if (u > 0 && k > 0) {
249
- const D = f / u * k;
250
- e.scrollTop = t(this, st) + D;
245
+ const l = t(this, S).track.getBoundingClientRect(), a = t(this, S).thumb.clientHeight, f = l.height - a, u = o.clientY - t(this, it), b = e.clientHeight, m = e.querySelector("table");
246
+ tt.log(m), tt.log(m.scrollHeight);
247
+ const T = m.scrollHeight - b;
248
+ if (f > 0 && T > 0) {
249
+ const z = u / f * T;
250
+ e.scrollTop = t(this, st) + z;
251
251
  }
252
252
  this.refresh();
253
- }, "onMouseMove"), o = /* @__PURE__ */ a(() => {
254
- b(this, I, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", o), this.refresh();
253
+ }, "onMouseMove"), r = /* @__PURE__ */ c(() => {
254
+ g(this, I, !1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", r), this.refresh();
255
255
  }, "onMouseUp");
256
- document.addEventListener("mousemove", n), document.addEventListener("mouseup", o);
256
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", r);
257
257
  }), t(this, S).track.addEventListener("mousedown", (s) => {
258
258
  if (s.button !== 0 || s.target === t(this, S).thumb) return;
259
- const n = t(this, S).track.getBoundingClientRect(), o = t(this, S).thumb.clientHeight, r = s.clientY - n.top - o / 2, c = n.height - o, d = e.clientHeight, f = e.querySelector("table").scrollHeight - d;
260
- if (c > 0 && f > 0) {
261
- const g = Math.max(0, Math.min(1, r / c));
262
- e.scrollTop = g * f;
259
+ const n = t(this, S).track.getBoundingClientRect(), r = t(this, S).thumb.clientHeight, o = s.clientY - n.top - r / 2, a = n.height - r, d = e.clientHeight, u = e.querySelector("table").scrollHeight - d;
260
+ if (a > 0 && u > 0) {
261
+ const b = Math.max(0, Math.min(1, o / a));
262
+ e.scrollTop = b * u;
263
263
  }
264
264
  this.refresh();
265
265
  }), t(this, S).top.addEventListener("click", () => {
@@ -270,7 +270,7 @@ const Ut = class Ut extends HTMLElement {
270
270
  }, "#init"));
271
271
  }
272
272
  connectedCallback() {
273
- if (b(this, Y, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, Y)) return;
273
+ if (g(this, Y, this.closest("nine-table-sheet") || this.getRootNode().host), !t(this, Y)) return;
274
274
  this.innerHTML = `
275
275
  <style>
276
276
  nine-table-vscrollbar {
@@ -334,13 +334,13 @@ const Ut = class Ut extends HTMLElement {
334
334
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
335
335
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
336
336
  `;
337
- const e = /* @__PURE__ */ a(() => {
337
+ const e = /* @__PURE__ */ c(() => {
338
338
  const s = t(this, Y).querySelector(".ng-container-body");
339
339
  if (!s) {
340
340
  setTimeout(e, 10);
341
341
  return;
342
342
  }
343
- b(this, S, {
343
+ g(this, S, {
344
344
  container: s,
345
345
  track: this.querySelector(".ng-scroll-track"),
346
346
  thumb: this.querySelector(".ng-scroll-thumb"),
@@ -351,38 +351,38 @@ const Ut = class Ut extends HTMLElement {
351
351
  e();
352
352
  }
353
353
  };
354
- Y = new WeakMap(), I = new WeakMap(), S = new WeakMap(), it = new WeakMap(), st = new WeakMap(), ut = new WeakMap(), a(Ut, "NineTableVScrollBar");
355
- let It = Ut;
356
- customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", It);
357
- var gt, F;
358
- const C = class C {
354
+ Y = new WeakMap(), I = new WeakMap(), S = new WeakMap(), it = new WeakMap(), st = new WeakMap(), ut = new WeakMap(), c(Ut, "NineTableVScrollBar");
355
+ let $t = Ut;
356
+ customElements.get("nine-table-vscrollbar") || customElements.define("nine-table-vscrollbar", $t);
357
+ var bt, K;
358
+ const H = class H {
359
359
  /**
360
360
  * 🎯 λ ˆμ΄μ•„μ›ƒ λ‚΄μ˜ μ—¬λŸ¬ rawTables 배열을 μΌκ΄„λ‘œ λ°›μ•„ 단일 λ§ˆμŠ€ν„° ν…œν”Œλ¦ΏμœΌλ‘œ 사전 μ»΄νŒŒμΌν•©λ‹ˆλ‹€.
361
361
  */
362
362
  static compileAll(i) {
363
- return Array.isArray(i) ? i.map((e) => C.compile(e)) : [];
363
+ return Array.isArray(i) ? i.map((e) => H.compile(e)) : [];
364
364
  }
365
365
  /**
366
366
  * 🎯 단일 원본 ν…Œμ΄λΈ”μ„ λ°›μ•„ κΈ°λ³Έ ꡬ쑰 보정 및 2차원 격자 인덱슀 사전 λΆ€μ—¬ μ™„λ£Œλœ λ§ˆμŠ€ν„° ν…Œμ΄λΈ” λ°˜ν™˜
367
367
  */
368
368
  static compile(i) {
369
- var n, o, r, l;
369
+ var n, r, o, l;
370
370
  if (!i) return null;
371
371
  const e = i.cloneNode(!0);
372
- return t(n = C, gt).call(n, e), t(o = C, F).call(o, e, "thead"), t(r = C, F).call(r, e, "tbody"), t(l = C, F).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((c, d) => {
373
- const u = c.getAttribute("fixed");
374
- u && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((f) => {
375
- f.setAttribute("fixed", u);
372
+ return t(n = H, bt).call(n, e), t(r = H, K).call(r, e, "thead"), t(o = H, K).call(o, e, "tbody"), t(l = H, K).call(l, e, "tfoot"), Array.from(e.querySelectorAll("colgroup col")).forEach((a, d) => {
373
+ const f = a.getAttribute("fixed");
374
+ f && e.querySelectorAll(`thead [data-col="${d}"], tbody [data-col="${d}"], tfoot [data-col="${d}"]`).forEach((u) => {
375
+ u.setAttribute("fixed", f);
376
376
  });
377
377
  }), e;
378
378
  }
379
379
  };
380
- gt = new WeakMap(), F = new WeakMap(), a(C, "TableCompiler"), h(C, gt, /* @__PURE__ */ a((i) => {
380
+ bt = new WeakMap(), K = new WeakMap(), c(H, "TableCompiler"), h(H, bt, /* @__PURE__ */ c((i) => {
381
381
  if (!i.querySelector("colgroup")) {
382
- const e = i.querySelector("tbody tr") || i.querySelector("tr"), s = e ? e.querySelectorAll("th, td").length : 1, n = document.createElement("colgroup"), o = Math.max(Math.floor(i.clientWidth / s), 100);
383
- for (let r = 0; r < s; r++) {
382
+ 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);
383
+ for (let o = 0; o < s; o++) {
384
384
  const l = document.createElement("col");
385
- l.setAttribute("width", o), n.appendChild(l);
385
+ l.setAttribute("width", r), n.appendChild(l);
386
386
  }
387
387
  i.prepend(n);
388
388
  }
@@ -391,214 +391,191 @@ gt = new WeakMap(), F = new WeakMap(), a(C, "TableCompiler"), h(C, gt, /* @__PUR
391
391
  s ? s.after(e) : i.prepend(e);
392
392
  }
393
393
  i.classList.add("nine-table-element"), i.style.display = "table";
394
- }, "#ensureTableStructure")), h(C, F, /* @__PURE__ */ a((i, e) => {
395
- const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), o = s.length;
396
- if (o === 0 || n.length === 0) return;
397
- let r = 0;
398
- n.forEach((c) => {
399
- r += c.colSpan || 1;
394
+ }, "#ensureTableStructure")), h(H, K, /* @__PURE__ */ c((i, e) => {
395
+ const s = Array.from(i.querySelectorAll(e + " tr")), n = Array.from(i.querySelectorAll(e + " th," + e + " td")), r = s.length;
396
+ if (r === 0 || n.length === 0) return;
397
+ let o = 0;
398
+ n.forEach((a) => {
399
+ o += a.colSpan || 1;
400
400
  });
401
- const l = Array.from(Array(o), () => Array(r).fill(null));
402
- s.forEach((c) => {
403
- const d = c.sectionRowIndex;
404
- let u = 0;
405
- Array.from(c.querySelectorAll("th,td")).forEach((f) => {
401
+ const l = Array.from(Array(r), () => Array(o).fill(null));
402
+ s.forEach((a) => {
403
+ const d = a.sectionRowIndex;
404
+ let f = 0;
405
+ Array.from(a.querySelectorAll("th,td")).forEach((u) => {
406
406
  for (let E = 0; E < l[d].length; E++)
407
407
  if (l[d][E] === null) {
408
- u = E;
408
+ f = E;
409
409
  break;
410
410
  }
411
- const g = f.rowSpan || 1, y = f.colSpan || 1;
412
- for (let E = 0; E < g; E++)
413
- for (let k = 0; k < y; k++)
414
- d + E < o && u + k < r && (l[d + E][u + k] = E === 0 && k === 0 ? "1" : "0");
411
+ const b = u.rowSpan || 1, m = u.colSpan || 1;
412
+ for (let E = 0; E < b; E++)
413
+ for (let T = 0; T < m; T++)
414
+ d + E < r && f + T < o && (l[d + E][f + T] = E === 0 && T === 0 ? "1" : "0");
415
415
  });
416
- }), s.forEach((c) => {
417
- const d = c.sectionRowIndex;
418
- Array.from(c.querySelectorAll("th,td")).forEach((u) => {
419
- for (let f = 0; f < l[d].length; f++)
420
- if (l[d][f] === "1") {
421
- u.dataset.col = f, l[d][f] = "0";
416
+ }), s.forEach((a) => {
417
+ const d = a.sectionRowIndex;
418
+ Array.from(a.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";
422
422
  break;
423
423
  }
424
424
  });
425
425
  });
426
426
  }, "#resetColIndex"));
427
- let Wt = C;
428
- var m, _, R, W, X, U, bt, pt, nt, ot, yt, mt, rt, Z, xt;
427
+ let Wt = H;
428
+ var y, _, R, $, V, j, gt, pt, nt, ot, yt, mt, rt, F, vt;
429
429
  const Kt = class Kt {
430
430
  constructor(i) {
431
- h(this, m);
431
+ h(this, y);
432
432
  h(this, _, /* @__PURE__ */ new Map());
433
- // 각 μ»¨ν…Œμ΄λ„ˆλ³„ λ…λ¦½λœ ν…œν”Œλ¦Ώ TR 관리
434
433
  h(this, R, null);
435
- h(this, W, null);
436
- h(this, X, 0);
437
- h(this, U, 40);
438
- /**
439
- * 🎯 μ™ΈλΆ€μ—μ„œ 데이터가 λ‘œλ“œλ˜κ±°λ‚˜ λ³€κ²½λœ ν›„ 가상 높이와 λ·°λ₯Ό μž¬κ°±μ‹ ν•˜λŠ” 퍼블릭 λ©”μ„œλ“œ
440
- */
441
- w(this, "refresh", /* @__PURE__ */ a(() => {
434
+ h(this, $, null);
435
+ h(this, V, 0);
436
+ h(this, j, 40);
437
+ w(this, "refresh", /* @__PURE__ */ c(() => {
442
438
  var e;
443
- const i = t(this, m).querySelector(".ng-container-body");
444
- i && (t(this, nt).call(this), t(this, Z).call(this, i.scrollTop), (e = t(this, m).querySelector("nine-table-vscrollbar")) == null || e.refresh());
439
+ const i = t(this, y).querySelector(".ng-container-body");
440
+ i && (t(this, nt).call(this), t(this, F).call(this, i.scrollTop), (e = t(this, y).querySelector("nine-table-vscrollbar")) == null || e.refresh());
445
441
  }, "refresh"));
446
- /**
447
- * 🎯 NineTableSheetμ—μ„œ λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 전달받아 각 μ˜μ—­λ³„ ν…Œμ΄λΈ” 생성 및 ν…œν”Œλ¦Ώ μΆ”μΆœ 일원화
448
- */
449
- // [RowManager.js μˆ˜μ • λ‚΄μš© 발췌]
450
- w(this, "initialize", /* @__PURE__ */ a(() => {
451
- b(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((e) => {
452
- const s = t(this, m).querySelector(e);
453
- if (!s) return;
454
- const n = s.querySelector("table");
455
- if (!n) return;
456
- const o = n.querySelector("tbody");
442
+ w(this, "initialize", /* @__PURE__ */ c(() => {
443
+ g(this, R, null), t(this, _).clear(), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((n) => {
444
+ const r = t(this, y).querySelector(n);
445
+ if (!r) return;
446
+ const o = r.querySelector("table");
457
447
  if (!o) return;
458
- const l = Array.from(o.querySelectorAll("tr")).map((c) => c.cloneNode(!0));
459
- t(this, _).set(e, l);
448
+ const l = o.querySelector("tbody");
449
+ if (!l) return;
450
+ const d = Array.from(l.querySelectorAll("tr")).map((f) => f.cloneNode(!0));
451
+ t(this, _).set(n, d);
460
452
  });
461
- const i = t(this, m).querySelector(".ng-container-body");
453
+ const i = t(this, y).querySelector(".ng-container-body"), e = t(this, y).querySelector(".ng-container-left"), s = t(this, y).querySelector(".ng-container-right");
462
454
  if (i) {
463
- t(this, pt).call(this, i), t(this, rt).call(this), t(this, nt).call(this), t(this, Z).call(this, i.scrollTop);
464
- let e = i.scrollTop;
455
+ t(this, pt).call(this, i), t(this, rt).call(this), t(this, nt).call(this), t(this, F).call(this, i.scrollTop);
456
+ let n = i.scrollTop;
457
+ const r = /* @__PURE__ */ c((o) => {
458
+ var l;
459
+ e && e.scrollTop !== o && (e.scrollTop = o), s && s.scrollTop !== o && (s.scrollTop = o), t(this, F).call(this, o), (l = t(this, y).querySelector("nine-table-vscrollbar")) == null || l.refresh();
460
+ }, "syncScroll");
465
461
  i.addEventListener("scroll", () => {
466
- var n;
467
- const s = i.scrollTop;
468
- H.log(e, s), e !== s && (e = s, t(this, Z).call(this, s)), (n = t(this, m).querySelector("nine-table-vscrollbar")) == null || n.refresh();
462
+ const o = i.scrollTop;
463
+ n !== o && (n = o, r(o));
469
464
  });
470
465
  }
471
466
  }, "initialize"));
472
- h(this, bt, /* @__PURE__ */ a((i, e) => {
467
+ h(this, gt, /* @__PURE__ */ c((i, e) => {
473
468
  const s = t(this, _).get(e);
474
469
  if (!s || s.length === 0) return;
475
470
  const n = i.querySelector("tbody");
476
471
  if (!n) return;
477
472
  n.querySelectorAll("tr:not(.nodata)").forEach((l) => l.remove());
478
- const o = n.querySelector("tr.nodata"), r = document.createDocumentFragment();
479
- for (let l = 0; l < t(this, U); l++)
480
- s.forEach((c) => {
481
- r.appendChild(c.cloneNode(!0));
473
+ const r = n.querySelector("tr.nodata"), o = document.createDocumentFragment();
474
+ for (let l = 0; l < t(this, j); l++)
475
+ s.forEach((a) => {
476
+ o.appendChild(a.cloneNode(!0));
482
477
  });
483
- o ? o.before(r) : n.appendChild(r);
478
+ r ? r.before(o) : n.appendChild(o);
484
479
  }, "#renderRows"));
485
- /**
486
- * 🎯 ν…œν”Œλ¦Ώ TRλ“€μ˜ 총 높이λ₯Ό μΈ‘μ •ν•˜κ³  캐싱
487
- */
488
- h(this, pt, /* @__PURE__ */ a((i) => {
480
+ h(this, pt, /* @__PURE__ */ c((i) => {
489
481
  if (t(this, R) !== null && t(this, R) > 0)
490
482
  return t(this, R);
491
483
  const e = t(this, _).get(".ng-container-body");
492
484
  if (!e || e.length === 0) return 24;
493
485
  const s = i.querySelector("tbody");
494
486
  if (!s) return 24;
495
- s.querySelectorAll("tr:not(.nodata)").forEach((g) => g.remove());
496
- const n = s.querySelector("tr.nodata"), o = document.createDocumentFragment();
497
- e.forEach((g) => {
498
- o.appendChild(g.cloneNode(!0));
499
- }), n ? n.before(o) : s.appendChild(o);
500
- const r = t(this, m), l = r.style.display, c = r.style.visibility, d = r.style.position;
501
- (l === "none" || window.getComputedStyle(r).display === "none") && (r.style.display = "block", r.style.visibility = "hidden", r.style.position = "absolute");
502
- let u = 0;
503
- const f = s.querySelectorAll("tr:not(.nodata)");
504
- return f.forEach((g) => {
505
- u += g.offsetHeight || g.getBoundingClientRect().height;
506
- }), f.forEach((g) => g.remove()), r.style.display = l, r.style.visibility = c, r.style.position = d, b(this, R, u > 0 ? u : 24), t(this, ot).call(this), H.log(`[RowManager] Height Cached: ${t(this, R)}px | RowCount: ${t(this, U)}`), t(this, R);
487
+ s.querySelectorAll("tr:not(.nodata)").forEach((b) => b.remove());
488
+ const n = s.querySelector("tr.nodata"), r = document.createDocumentFragment();
489
+ e.forEach((b) => {
490
+ r.appendChild(b.cloneNode(!0));
491
+ }), n ? n.before(r) : s.appendChild(r);
492
+ const o = t(this, y), l = o.style.display, a = o.style.visibility, d = o.style.position;
493
+ (l === "none" || window.getComputedStyle(o).display === "none") && (o.style.display = "block", o.style.visibility = "hidden", o.style.position = "absolute");
494
+ let f = 0;
495
+ const u = s.querySelectorAll("tr:not(.nodata)");
496
+ return u.forEach((b) => {
497
+ f += b.offsetHeight || b.getBoundingClientRect().height;
498
+ }), u.forEach((b) => b.remove()), o.style.display = l, o.style.visibility = a, o.style.position = d, g(this, R, f > 0 ? f : 24), t(this, ot).call(this), t(this, R);
507
499
  }, "#measureAndCacheHeight"));
508
- /**
509
- * 🎯 전체 데이터 개수 기반으둜 가상 슀크둀 높이 μ„€μ •
510
- */
511
- /**
512
- * 🎯 전체 데이터 개수 기반으둜 가상 슀크둀 높이 μ„€μ •
513
- */
514
- h(this, nt, /* @__PURE__ */ a(() => {
515
- var o, r, l, c;
516
- if (!t(this, m).querySelector(".ng-container-body")) return;
517
- const e = (typeof ((o = t(this, m).data) == null ? void 0 : o.count) == "function" ? t(this, m).data.count() : null) ?? ((l = (r = t(this, m).dataManager) == null ? void 0 : r.rawRecords) == null ? void 0 : l.length) ?? ((c = t(this, m).data) == null ? void 0 : c.length) ?? 0, s = t(this, R) || 24, n = e * s;
518
- H.log(`[RowManager] TotalCount: ${e} | RowHeight: ${s}px | TotalVirtualHeight: ${n}px`), [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
519
- const u = t(this, m).querySelector(d), f = u == null ? void 0 : u.querySelector("table");
520
- f ? (f.style.height = `${n}px`, H.log(`[RowManager] Applied height to ${d} table:`, f.style.height)) : H.log(`[RowManager] Table not found for selector: ${d}`);
500
+ h(this, nt, /* @__PURE__ */ c(() => {
501
+ var r, o, l, a;
502
+ if (!t(this, y).querySelector(".ng-container-body")) return;
503
+ const e = (typeof ((r = t(this, y).data) == null ? void 0 : r.count) == "function" ? t(this, y).data.count() : null) ?? ((l = (o = t(this, y).dataManager) == null ? void 0 : o.rawRecords) == null ? void 0 : l.length) ?? ((a = t(this, y).data) == null ? void 0 : a.length) ?? 100, s = t(this, R) || 24, n = e * s;
504
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((d) => {
505
+ const f = t(this, y).querySelector(d), u = f == null ? void 0 : f.querySelector("table");
506
+ u && (u.style.height = `${n}px`);
521
507
  });
522
508
  }, "#updateVirtualScrollHeight"));
523
- h(this, ot, /* @__PURE__ */ a(() => {
524
- if (t(this, X) > 0 && t(this, R) > 0) {
525
- const i = Math.ceil(t(this, X) / t(this, R));
526
- b(this, U, i + 20);
509
+ h(this, ot, /* @__PURE__ */ c(() => {
510
+ if (t(this, V) > 0 && t(this, R) > 0) {
511
+ const i = Math.ceil(t(this, V) / t(this, R));
512
+ g(this, j, i + 20);
527
513
  } else
528
- b(this, U, 40);
514
+ g(this, j, 40);
529
515
  }, "#updateRowCount"));
530
- h(this, yt, /* @__PURE__ */ a(() => {
531
- var c, d, u;
532
- const i = t(this, m).querySelector(".ng-container-left table"), e = t(this, m).querySelector(".ng-container-body table"), s = t(this, m).querySelector(".ng-container-right table");
516
+ h(this, yt, /* @__PURE__ */ c(() => {
517
+ var a, d, f;
518
+ const i = t(this, y).querySelector(".ng-container-left table"), e = t(this, y).querySelector(".ng-container-body table"), s = t(this, y).querySelector(".ng-container-right table");
533
519
  if (!e) return;
534
- const n = i ? Array.from(i.querySelectorAll("tr")) : [], o = Array.from(e.querySelectorAll("tr")), r = s ? Array.from(s.querySelectorAll("tr")) : [], l = Math.max(n.length, o.length, r.length);
535
- for (let f = 0; f < l; f++) {
536
- const g = [
537
- ((c = n[f]) == null ? void 0 : c.getBoundingClientRect().height) || 0,
538
- ((d = o[f]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
539
- ((u = r[f]) == null ? void 0 : u.getBoundingClientRect().height) || 0
540
- ], y = Math.max(...g);
541
- y > 0 && (n[f] && (n[f].style.height = `${y}px`), o[f] && (o[f].style.height = `${y}px`), r[f] && (r[f].style.height = `${y}px`));
520
+ 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);
521
+ for (let u = 0; u < l; u++) {
522
+ const b = [
523
+ ((a = n[u]) == null ? void 0 : a.getBoundingClientRect().height) || 0,
524
+ ((d = r[u]) == null ? void 0 : d.getBoundingClientRect().height) || 0,
525
+ ((f = o[u]) == null ? void 0 : f.getBoundingClientRect().height) || 0
526
+ ], m = Math.max(...b);
527
+ m > 0 && (n[u] && (n[u].style.height = `${m}px`), r[u] && (r[u].style.height = `${m}px`), o[u] && (o[u].style.height = `${m}px`));
542
528
  }
543
529
  }, "#syncRowHeights"));
544
- /**
545
- * 🎯 ResizeObserver μ„€μ •: μ‹œνŠΈ 크기 λ³€κ²½ μ‹œ ν–‰ 개수 μž¬μ‚°μ • 및 μž¬λ Œλ”λ§
546
- */
547
- h(this, mt, /* @__PURE__ */ a(() => {
548
- !t(this, m) || !(t(this, m) instanceof HTMLElement) || (b(this, W, new ResizeObserver((i) => {
530
+ h(this, mt, /* @__PURE__ */ c(() => {
531
+ !t(this, y) || !(t(this, y) instanceof HTMLElement) || (g(this, $, new ResizeObserver((i) => {
549
532
  for (const e of i) {
550
533
  const s = e.target;
551
534
  if (!s.classList.contains("active")) continue;
552
535
  const n = e.contentRect.height;
553
536
  if (n > 0) {
554
- let o = 0;
555
- const r = s.querySelector("thead");
556
- r && (o += r.offsetHeight || r.getBoundingClientRect().height);
557
- const l = Math.max(n - o, 100);
558
- t(this, X) !== l && (b(this, X, l), t(this, ot).call(this), t(this, R) !== null && t(this, rt).call(this));
537
+ let r = 0;
538
+ const o = s.querySelector("thead");
539
+ o && (r += o.offsetHeight || o.getBoundingClientRect().height);
540
+ const l = Math.max(n - r, 100);
541
+ t(this, V) !== l && (g(this, V, l), t(this, ot).call(this), t(this, R) !== null && t(this, rt).call(this));
559
542
  }
560
543
  }
561
- })), t(this, W).observe(t(this, m)));
544
+ })), t(this, $).observe(t(this, y)));
562
545
  }, "#initResizeObserver"));
563
- /**
564
- * 🎯 λ°”λ”” 및 쒌우 κ³ μ • μ»¨ν…Œμ΄λ„ˆ 전체에 각각에 λ§žλŠ” ν…œν”Œλ¦Ώ ν–‰ λΌˆλŒ€ μ£Όμž…
565
- */
566
- h(this, rt, /* @__PURE__ */ a(() => {
546
+ h(this, rt, /* @__PURE__ */ c(() => {
567
547
  [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((i) => {
568
- const e = t(this, m).querySelector(i);
569
- e && e.querySelector("tbody") && t(this, bt).call(this, e, i);
548
+ const e = t(this, y).querySelector(i);
549
+ e && e.querySelector("tbody") && t(this, gt).call(this, e, i);
570
550
  }), t(this, yt).call(this);
571
551
  }, "#renderAllContainers"));
572
- h(this, Z, /* @__PURE__ */ a((i) => {
573
- var o;
552
+ h(this, F, /* @__PURE__ */ c((i) => {
553
+ var r;
574
554
  const e = t(this, R);
575
555
  if (!e || e <= 0) return;
576
- const s = Math.max(0, Math.floor(i / e)), n = ((o = t(this, _).get(".ng-container-body")) == null ? void 0 : o.length) || 1;
577
- [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((r) => {
578
- const l = t(this, m).querySelector(r);
556
+ const s = Math.max(0, Math.floor(i / e)), n = ((r = t(this, _).get(".ng-container-body")) == null ? void 0 : r.length) || 1;
557
+ [".ng-container-body", ".ng-container-left", ".ng-container-right"].forEach((o) => {
558
+ const l = t(this, y).querySelector(o);
579
559
  if (!l) return;
580
- const c = l.querySelector("tbody");
581
- if (!c) return;
582
- Array.from(c.querySelectorAll("tr:not(.nodata)")).forEach((u, f) => {
583
- var E, k, D, Qt;
584
- const g = s + Math.floor(f / n), y = (typeof t(this, m).getData == "function" ? t(this, m).getData(g) : null) ?? (typeof ((E = t(this, m).data) == null ? void 0 : E.get) == "function" ? t(this, m).data.get(g) : null) ?? ((D = (k = t(this, m).dataManager) == null ? void 0 : k.rawRecords) == null ? void 0 : D[g]) ?? ((Qt = t(this, m).data) == null ? void 0 : Qt[g]) ?? { _index: g };
585
- u.style.display = "", t(this, xt).call(this, u, y, g);
560
+ const a = l.querySelector("tbody");
561
+ if (!a) return;
562
+ Array.from(a.querySelectorAll("tr:not(.nodata)")).forEach((f, u) => {
563
+ var E, T, z, Qt;
564
+ const b = s + Math.floor(u / n), m = (typeof t(this, y).getData == "function" ? t(this, y).getData(b) : null) ?? (typeof ((E = t(this, y).data) == null ? void 0 : E.get) == "function" ? t(this, y).data.get(b) : null) ?? ((z = (T = t(this, y).dataManager) == null ? void 0 : T.rawRecords) == null ? void 0 : z[b]) ?? ((Qt = t(this, y).data) == null ? void 0 : Qt[b]) ?? { _index: b };
565
+ f.style.display = "", t(this, vt).call(this, f, m, b);
586
566
  });
587
567
  });
588
568
  }, "#handleScroll"));
589
- /**
590
- * 🎯 κ°œλ³„ TR μ—˜λ¦¬λ¨ΌνŠΈμ— μ‹€μ œ 데이터 값을 κ½‚μ•„μ£ΌλŠ” 바인딩 λ©”μ„œλ“œ
591
- */
592
- h(this, xt, /* @__PURE__ */ a((i, e, s) => {
593
- i.dataset.row = s, Array.from(i.cells).forEach((n, o) => {
594
- const r = n.dataset.bind;
595
- r && e && e[r] !== void 0 ? n.textContent = e[r] : n.textContent = e ? e[Object.keys(e)[o]] ?? `R${s}C${o}` : `ν–‰ ${s + 1}`, n.dataset.row = s;
569
+ h(this, vt, /* @__PURE__ */ c((i, e, s) => {
570
+ i.dataset.row = s, Array.from(i.cells).forEach((n, r) => {
571
+ const o = n.dataset.bind;
572
+ 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;
596
573
  });
597
574
  }, "#bindRowData"));
598
- w(this, "destroy", /* @__PURE__ */ a(() => {
599
- t(this, W) && (t(this, W).disconnect(), b(this, W, null));
575
+ w(this, "destroy", /* @__PURE__ */ c(() => {
576
+ t(this, $) && (t(this, $).disconnect(), g(this, $, null));
600
577
  }, "destroy"));
601
- b(this, m, i), t(this, mt).call(this);
578
+ g(this, y, i), t(this, mt).call(this);
602
579
  }
603
580
  getRowHeight() {
604
581
  return t(this, R);
@@ -608,39 +585,39 @@ const Kt = class Kt {
608
585
  return ((e = t(this, _).get(i)) == null ? void 0 : e.length) || 1;
609
586
  }
610
587
  };
611
- m = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), W = new WeakMap(), X = new WeakMap(), U = new WeakMap(), bt = new WeakMap(), pt = new WeakMap(), nt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), mt = new WeakMap(), rt = new WeakMap(), Z = new WeakMap(), xt = new WeakMap(), a(Kt, "RowManager");
588
+ y = new WeakMap(), _ = new WeakMap(), R = new WeakMap(), $ = new WeakMap(), V = new WeakMap(), j = new WeakMap(), gt = new WeakMap(), pt = new WeakMap(), nt = new WeakMap(), ot = new WeakMap(), yt = new WeakMap(), mt = new WeakMap(), rt = new WeakMap(), F = new WeakMap(), vt = new WeakMap(), c(Kt, "RowManager");
612
589
  let Ot = Kt;
613
- var G, J, vt, wt, St, Et, Rt;
590
+ var Z, G, xt, wt, St, Et, Rt;
614
591
  const et = class et extends HTMLElement {
615
592
  constructor() {
616
593
  super();
617
- h(this, G, null);
618
- h(this, J);
619
- h(this, vt, /* @__PURE__ */ a(() => {
594
+ h(this, Z, null);
595
+ h(this, G);
596
+ h(this, xt, /* @__PURE__ */ c(() => {
620
597
  [
621
598
  { selector: ".ng-container-body", type: null },
622
599
  { selector: ".ng-container-left", type: "left" },
623
600
  { selector: ".ng-container-right", type: "right" }
624
601
  ].forEach(({ selector: s, type: n }) => {
625
- const o = this.querySelector(s);
626
- if (!o) return;
627
- const r = t(this, St).call(this, t(this, G), n);
628
- o.innerHTML = "", o.appendChild(r);
602
+ const r = this.querySelector(s);
603
+ if (!r) return;
604
+ const o = t(this, St).call(this, t(this, Z), n);
605
+ r.innerHTML = "", r.appendChild(o);
629
606
  });
630
607
  }, "#renderSplitContainers"));
631
- h(this, wt, /* @__PURE__ */ a(() => {
608
+ h(this, wt, /* @__PURE__ */ c(() => {
632
609
  ["left", "right"].forEach((e) => {
633
610
  const s = this.querySelector(`.ng-container-${e}`), n = s == null ? void 0 : s.querySelector("table");
634
611
  if (!s || !n) return;
635
- let o = 0;
636
- n.querySelectorAll("col").forEach((r) => {
637
- const l = parseInt(r.getAttribute("width"), 10);
638
- isNaN(o) || (o += l);
639
- }), s.style.flex = `0 0 ${o}px`, s.style.width = `${o}px`;
612
+ let r = 0;
613
+ n.querySelectorAll("col").forEach((o) => {
614
+ const l = parseInt(o.getAttribute("width"), 10);
615
+ isNaN(r) || (r += l);
616
+ }), s.style.flex = `0 0 ${r}px`, s.style.width = `${r}px`;
640
617
  });
641
618
  }, "#updateContainerWidths"));
642
- w(this, "generate", /* @__PURE__ */ a((e) => {
643
- e && (b(this, G, Wt.compile(e)), t(this, G).style.display = "table", t(this, vt).call(this), t(this, wt).call(this), t(this, J).initialize(), setTimeout(() => {
619
+ w(this, "generate", /* @__PURE__ */ c((e) => {
620
+ e && (g(this, Z, Wt.compile(e)), t(this, Z).style.display = "table", t(this, xt).call(this), t(this, wt).call(this), t(this, G).initialize(), setTimeout(() => {
644
621
  var s;
645
622
  (s = this.querySelector("nine-table-hscrollbar")) == null || s.refresh();
646
623
  }, 0));
@@ -648,29 +625,29 @@ const et = class et extends HTMLElement {
648
625
  /**
649
626
  * 🎯 λ§ˆμŠ€ν„° ν…Œμ΄λΈ”μ„ 기반으둜 νŠΉμ • fixed νƒ€μž… μ˜μ—­λ§Œ λ‚¨κΈ°λŠ” λΆ„ν•  헬퍼
650
627
  */
651
- h(this, St, /* @__PURE__ */ a((e, s) => {
628
+ h(this, St, /* @__PURE__ */ c((e, s) => {
652
629
  const n = e.cloneNode(!0);
653
- return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
654
- o.getAttribute("fixed") !== "left" && o.remove();
655
- }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((o) => {
656
- o.getAttribute("fixed") !== "right" && o.remove();
657
- }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((o) => {
658
- o.remove();
630
+ return s === "left" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((r) => {
631
+ r.getAttribute("fixed") !== "left" && r.remove();
632
+ }) : s === "right" ? n.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach((r) => {
633
+ r.getAttribute("fixed") !== "right" && r.remove();
634
+ }) : n.querySelectorAll("[fixed=left], [fixed=right]").forEach((r) => {
635
+ r.remove();
659
636
  }), n;
660
637
  }, "#createSplitTable"));
661
- w(this, "getRowHeight", /* @__PURE__ */ a(() => t(this, J).getRowHeight(), "getRowHeight"));
662
- w(this, "scrollToX", /* @__PURE__ */ a((e) => {
638
+ w(this, "getRowHeight", /* @__PURE__ */ c(() => t(this, G).getRowHeight(), "getRowHeight"));
639
+ w(this, "scrollToX", /* @__PURE__ */ c((e) => {
663
640
  const s = this.querySelector(".ng-container-body");
664
641
  s && (s.scrollLeft = e);
665
642
  }, "scrollToX"));
666
- w(this, "scrollToY", /* @__PURE__ */ a((e) => {
643
+ w(this, "scrollToY", /* @__PURE__ */ c((e) => {
667
644
  const s = this.querySelector(".ng-container-body");
668
645
  s && (s.scrollTop = e);
669
646
  }, "scrollToY"));
670
- h(this, Et, /* @__PURE__ */ a(() => {
647
+ h(this, Et, /* @__PURE__ */ c(() => {
671
648
  t(this, Rt).call(this);
672
649
  }, "#init"));
673
- h(this, Rt, /* @__PURE__ */ a(() => {
650
+ h(this, Rt, /* @__PURE__ */ c(() => {
674
651
  const e = et.SCROLLBAR_SIZE;
675
652
  this.innerHTML = `
676
653
  <style>
@@ -807,92 +784,92 @@ const et = class et extends HTMLElement {
807
784
  </div>
808
785
  `;
809
786
  }, "#render"));
810
- b(this, J, new Ot(this));
787
+ g(this, G, new Ot(this));
811
788
  }
812
789
  connectedCallback() {
813
790
  t(this, Et).call(this);
814
791
  }
815
792
  disconnectedCallback() {
816
- this.innerHTML = "", H.log("NineTableSheet destroyed.");
793
+ this.innerHTML = "", tt.log("NineTableSheet destroyed.");
817
794
  }
818
795
  };
819
- G = new WeakMap(), J = new WeakMap(), vt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), a(et, "NineTableSheet"), w(et, "SCROLLBAR_SIZE", 16);
796
+ Z = new WeakMap(), G = new WeakMap(), xt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Et = new WeakMap(), Rt = new WeakMap(), c(et, "NineTableSheet"), w(et, "SCROLLBAR_SIZE", 16);
820
797
  let ht = et;
821
798
  customElements.get("nine-table-sheet") || customElements.define("nine-table-sheet", ht);
822
- var Tt, lt;
799
+ var kt, lt;
823
800
  const jt = class jt extends HTMLElement {
824
801
  constructor() {
825
802
  super();
826
- h(this, Tt, /* @__PURE__ */ a(() => {
803
+ h(this, kt, /* @__PURE__ */ c(() => {
827
804
  var e;
828
805
  (e = this.querySelector(".nine-tab-bar")) == null || e.addEventListener("click", (s) => {
829
- var r;
830
- const n = s.ctrlKey || s.metaKey || s.shiftKey, o = parseInt((r = s.target.closest(".nine-tab-item")) == null ? void 0 : r.dataset.index, 10);
831
- t(this, lt).call(this, o, n);
806
+ var o;
807
+ const n = s.ctrlKey || s.metaKey || s.shiftKey, r = parseInt((o = s.target.closest(".nine-tab-item")) == null ? void 0 : o.dataset.index, 10);
808
+ t(this, lt).call(this, r, n);
832
809
  }), t(this, lt).call(this, 0, !1);
833
810
  }, "#init"));
834
- h(this, lt, /* @__PURE__ */ a((e, s = !1) => {
835
- const n = /* @__PURE__ */ a(() => {
836
- const u = Array.from(this.querySelectorAll("nine-table-sheet"));
837
- Array.from(this.querySelectorAll("nine-splitter")).forEach((y) => y.style.setProperty("display", "none"));
838
- const g = u.filter((y) => y.classList.contains("active"));
839
- g.length < 2 || g.forEach((y) => {
840
- const E = parseInt(y.getAttribute("data-index"), 10), k = this.querySelector(`nine-splitter[data-split-index="${E}"]`), D = u[E + 1];
841
- k && D && D.classList.contains("active") && k.style.setProperty("display", "flex");
811
+ h(this, lt, /* @__PURE__ */ c((e, s = !1) => {
812
+ const n = /* @__PURE__ */ c(() => {
813
+ const f = Array.from(this.querySelectorAll("nine-table-sheet"));
814
+ Array.from(this.querySelectorAll("nine-splitter")).forEach((m) => m.style.setProperty("display", "none"));
815
+ const b = f.filter((m) => m.classList.contains("active"));
816
+ b.length < 2 || b.forEach((m) => {
817
+ const E = parseInt(m.getAttribute("data-index"), 10), T = this.querySelector(`nine-splitter[data-split-index="${E}"]`), z = f[E + 1];
818
+ T && z && z.classList.contains("active") && T.style.setProperty("display", "flex");
842
819
  });
843
- }, "updateSplitters"), o = this.querySelector(".nine-tab-bar"), r = this.querySelector("nine-table-sheets-body"), l = o.querySelectorAll(".nine-tab-item"), c = r.querySelectorAll("nine-table-sheet");
820
+ }, "updateSplitters"), r = this.querySelector(".nine-tab-bar"), o = this.querySelector("nine-table-sheets-body"), l = r.querySelectorAll(".nine-tab-item"), a = o.querySelectorAll("nine-table-sheet");
844
821
  if (!l[e]) return;
845
822
  if (!s)
846
- l.forEach((u, f) => {
847
- u.classList.toggle("active", f === e);
848
- }), c.forEach((u, f) => {
849
- const g = f === e;
850
- u.classList.toggle("active", g), u.style.flex = g ? "1 1 100%" : "";
823
+ l.forEach((f, u) => {
824
+ f.classList.toggle("active", u === e);
825
+ }), a.forEach((f, u) => {
826
+ const b = u === e;
827
+ f.classList.toggle("active", b), f.style.flex = b ? "1 1 100%" : "";
851
828
  });
852
829
  else {
853
- const u = l[e], f = o.querySelectorAll(".nine-tab-item.active");
854
- if (u.classList.contains("active") && f.length <= 1)
830
+ const f = l[e], u = r.querySelectorAll(".nine-tab-item.active");
831
+ if (f.classList.contains("active") && u.length <= 1)
855
832
  return;
856
- u.classList.toggle("active");
857
- const g = r.querySelector(`nine-table-sheet[data-index="${e}"]`);
858
- g && (g.classList.toggle("active"), g.classList.contains("active") || (g.style.flex = ""));
833
+ f.classList.toggle("active");
834
+ const b = o.querySelector(`nine-table-sheet[data-index="${e}"]`);
835
+ b && (b.classList.toggle("active"), b.classList.contains("active") || (b.style.flex = ""));
859
836
  }
860
- const d = r.querySelectorAll("nine-table-sheet.active");
861
- d == null || d.forEach((u) => {
862
- u.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
837
+ const d = o.querySelectorAll("nine-table-sheet.active");
838
+ d == null || d.forEach((f) => {
839
+ f.style.flex = d.length > 1 ? "1 1 0%" : "1 1 100%";
863
840
  }), n();
864
841
  }, "#switchSheet"));
865
842
  }
866
843
  connectedCallback() {
867
- t(this, Tt).call(this);
844
+ t(this, kt).call(this);
868
845
  }
869
846
  };
870
- Tt = new WeakMap(), lt = new WeakMap(), a(jt, "NineTableSheets");
847
+ kt = new WeakMap(), lt = new WeakMap(), c(jt, "NineTableSheets");
871
848
  let zt = jt;
872
849
  customElements.get("nine-table-sheets") || customElements.define("nine-table-sheets", zt);
873
- var T, kt, at, At;
850
+ var k, Tt, ct, At;
874
851
  const Ft = class Ft {
875
852
  constructor(i) {
876
- h(this, T);
877
- h(this, kt, /* @__PURE__ */ a(() => {
853
+ h(this, k);
854
+ h(this, Tt, /* @__PURE__ */ c(() => {
878
855
  t(this, At).call(this), new ResizeObserver((i) => {
879
856
  for (let e of i)
880
- t(this, T).getAttribute("auto-height") === "true" && t(this, at).call(this);
881
- }).observe(t(this, T));
857
+ t(this, k).getAttribute("auto-height") === "true" && t(this, ct).call(this);
858
+ }).observe(t(this, k));
882
859
  }, "#init"));
883
- h(this, at, /* @__PURE__ */ a(() => {
884
- var c, d;
885
- const i = Array.from(t(this, T).shadowRoot.querySelectorAll("nine-table-sheet.active"));
860
+ h(this, ct, /* @__PURE__ */ c(() => {
861
+ var a, d;
862
+ const i = Array.from(t(this, k).shadowRoot.querySelectorAll("nine-table-sheet.active"));
886
863
  if (i.length === 0) return;
887
- const e = parseInt(t(this, T).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((u) => u.getRowHeight())), n = (c = t(this, T).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : c.getBoundingClientRect().height, o = (d = t(this, T).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, r = ht.SCROLLBAR_SIZE, l = e * s + n + o + r;
888
- t(this, T).style.height = `${l}px`;
864
+ const e = parseInt(t(this, k).getAttribute("max-display-row"), 10) || 10, s = Math.max(...i.map((f) => f.getRowHeight())), n = (a = t(this, k).shadowRoot.querySelector("nine-table-header")) == null ? void 0 : a.getBoundingClientRect().height, r = (d = t(this, k).shadowRoot.querySelector("nine-table-sheets-footer")) == null ? void 0 : d.getBoundingClientRect().height, o = ht.SCROLLBAR_SIZE, l = e * s + n + r + o;
865
+ t(this, k).style.height = `${l}px`;
889
866
  }, "#applyAutoHeight"));
890
- h(this, At, /* @__PURE__ */ a(() => {
891
- const e = Array.from(t(this, T).children).filter((c) => c.tagName === "TABLE"), s = t(this, T).getAttribute("auto-height") === "true", n = e.length, o = e.map((c, d) => {
892
- const f = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, g = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
893
- return f + g;
894
- }).join(""), r = e.map((c, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
895
- t(this, T).shadowRoot.innerHTML = `
867
+ h(this, At, /* @__PURE__ */ c(() => {
868
+ const e = Array.from(t(this, k).children).filter((a) => a.tagName === "TABLE"), s = t(this, k).getAttribute("auto-height") === "true", n = e.length, r = e.map((a, d) => {
869
+ const u = `<nine-table-sheet class="${d === 0 ? "active" : ""}" data-index="${d}"></nine-table-sheet>`, b = d < n - 1 ? `<nine-splitter class="h" data-split-index="${d}"></nine-splitter>` : "";
870
+ return u + b;
871
+ }).join(""), o = e.map((a, d) => `<div class="nine-tab-item ${d === 0 ? "active" : ""}" data-index="${d}">Sheet ${d + 1}</div>`).join("");
872
+ t(this, k).shadowRoot.innerHTML = `
896
873
  <style>
897
874
  :host {
898
875
  display: flex;
@@ -981,9 +958,9 @@ const Ft = class Ft {
981
958
  <nine-table-body>
982
959
  <nine-table-summary></nine-table-summary>
983
960
  <nine-table-sheets>
984
- <nine-table-sheets-body>${o}</nine-table-sheets-body>
961
+ <nine-table-sheets-body>${r}</nine-table-sheets-body>
985
962
  <nine-table-sheets-footer>
986
- <div class="nine-tab-bar">${r}</div>
963
+ <div class="nine-tab-bar">${o}</div>
987
964
  <div class="sheets-counter">Total : <span id="row-count">0</span></div>
988
965
  </nine-table-sheets-footer>
989
966
  </nine-table-sheets>
@@ -991,163 +968,163 @@ const Ft = class Ft {
991
968
  </nine-table-body>
992
969
  <nine-table-footer></nine-table-footer>
993
970
  `;
994
- const l = t(this, T).shadowRoot.querySelectorAll("nine-table-sheet");
995
- l == null || l.forEach((c, d) => {
971
+ const l = t(this, k).shadowRoot.querySelectorAll("nine-table-sheet");
972
+ l == null || l.forEach((a, d) => {
996
973
  e[d] && setTimeout(() => {
997
- c.generate(e[d]), s && t(this, at).call(this);
974
+ a.generate(e[d]), s && t(this, ct).call(this);
998
975
  });
999
976
  });
1000
977
  }, "#render"));
1001
- b(this, T, i), t(this, kt).call(this);
978
+ g(this, k, i), t(this, Tt).call(this);
1002
979
  }
1003
980
  };
1004
- T = new WeakMap(), kt = new WeakMap(), at = new WeakMap(), At = new WeakMap(), a(Ft, "LayoutManager");
981
+ k = new WeakMap(), Tt = new WeakMap(), ct = new WeakMap(), At = new WeakMap(), c(Ft, "LayoutManager");
1005
982
  let Dt = Ft;
1006
- var O, K;
983
+ var W, X;
1007
984
  const Zt = class Zt {
1008
985
  constructor(i) {
1009
- h(this, O);
1010
- h(this, K, -1);
1011
- w(this, "count", /* @__PURE__ */ a(() => t(this, O).rawRecords.length, "count"));
1012
- b(this, O, i);
986
+ h(this, W);
987
+ h(this, X, -1);
988
+ w(this, "count", /* @__PURE__ */ c(() => t(this, W).rawRecords.length, "count"));
989
+ g(this, W, i);
1013
990
  }
1014
991
  get at() {
1015
- return t(this, K);
992
+ return t(this, X);
1016
993
  }
1017
994
  set at(i) {
1018
995
  var s, n;
1019
- b(this, K, parseInt(i, 10));
1020
- const e = ((n = (s = t(this, O).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, O).owner.body;
1021
- e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, K)}"]`) && setTimeout(() => {
1022
- var o, r;
1023
- (r = (o = t(this, O).owner).scrollTo_V1) == null || r.call(o, t(this, K));
996
+ g(this, X, parseInt(i, 10));
997
+ const e = ((n = (s = t(this, W).owner).querySelector) == null ? void 0 : n.call(s, ".ng-container-body")) || t(this, W).owner.body;
998
+ e && !e.querySelector(`tbody.bindable tr[data-row="${t(this, X)}"]`) && setTimeout(() => {
999
+ var r, o;
1000
+ (o = (r = t(this, W).owner).scrollTo_V1) == null || o.call(r, t(this, X));
1024
1001
  });
1025
1002
  }
1026
1003
  };
1027
- O = new WeakMap(), K = new WeakMap(), a(Zt, "ngRow");
1004
+ W = new WeakMap(), X = new WeakMap(), c(Zt, "ngRow");
1028
1005
  let Pt = Zt;
1029
- var A, v, q, Q, qt, z, Lt, ct, Ht, Ct, tt;
1006
+ var A, x, q, J, qt, O, Lt, at, Ht, Ct, Q;
1030
1007
  const L = class L {
1031
1008
  constructor(i, e) {
1032
1009
  h(this, A);
1033
- h(this, v);
1010
+ h(this, x);
1034
1011
  h(this, q, []);
1035
- h(this, Q, []);
1012
+ h(this, J, []);
1036
1013
  h(this, qt, 0);
1037
- h(this, z, []);
1038
- h(this, Lt, /* @__PURE__ */ a(() => {
1039
- b(this, z, []);
1014
+ h(this, O, []);
1015
+ h(this, Lt, /* @__PURE__ */ c(() => {
1016
+ g(this, O, []);
1040
1017
  const i = t(this, A).template || [];
1041
1018
  Array.from(i).forEach((e) => {
1042
1019
  var s;
1043
- t(this, z).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1044
- }), (t(this, v).rawRecords || []).forEach((e) => {
1045
- e.__ng || (e.__ng = t(this, ct).call(this)), e.__ng.height = t(this, z).slice();
1020
+ t(this, O).push(((s = e.getBoundingClientRect) == null ? void 0 : s.call(e).height) || 24);
1021
+ }), (t(this, x).rawRecords || []).forEach((e) => {
1022
+ e.__ng || (e.__ng = t(this, at).call(this)), e.__ng.height = t(this, O).slice();
1046
1023
  });
1047
1024
  }, "#initialize"));
1048
- w(this, "set", /* @__PURE__ */ a((i) => {
1025
+ w(this, "set", /* @__PURE__ */ c((i) => {
1049
1026
  this.clear(), this.add(i, !1);
1050
1027
  }, "set"));
1051
- h(this, ct, /* @__PURE__ */ a(() => ({
1028
+ h(this, at, /* @__PURE__ */ c(() => ({
1052
1029
  rowState: L.ROW_STATE.EMPTY,
1053
1030
  deleted: !1,
1054
1031
  filtered: !1,
1055
- height: t(this, z).slice(),
1032
+ height: t(this, O).slice(),
1056
1033
  o: {},
1057
1034
  c: {},
1058
- _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, z).slice(), -1, {}, {}]
1035
+ _: [0, 0, 0, 0, L.ROW_STATE.EMPTY, !1, !1, !0, !1, !0, !0, !1, t(this, O).slice(), -1, {}, {}]
1059
1036
  }), "#getDefaultMeta"));
1060
- w(this, "reset", /* @__PURE__ */ a(() => {
1061
- b(this, q, []), b(this, Q, []);
1037
+ w(this, "reset", /* @__PURE__ */ c(() => {
1038
+ g(this, q, []), g(this, J, []);
1062
1039
  }, "reset"));
1063
- w(this, "clear", /* @__PURE__ */ a(() => {
1040
+ w(this, "clear", /* @__PURE__ */ c(() => {
1064
1041
  var i;
1065
- t(this, v).rawRecords = [], b(this, q, []), b(this, Q, []), (i = t(this, v).viewRecords) != null && i.reset && t(this, v).viewRecords.reset();
1042
+ t(this, x).rawRecords = [], g(this, q, []), g(this, J, []), (i = t(this, x).viewRecords) != null && i.reset && t(this, x).viewRecords.reset();
1066
1043
  }, "clear"));
1067
- h(this, Ht, /* @__PURE__ */ a((i) => {
1044
+ h(this, Ht, /* @__PURE__ */ c((i) => {
1068
1045
  var n;
1069
1046
  Array.isArray(i) || (i = [i]);
1070
1047
  const e = typeof ((n = t(this, A).fields) == null ? void 0 : n.get) == "function" ? t(this, A).fields.get() : Object.keys(i[0] || {}), s = [];
1071
- return i.forEach((o) => {
1072
- const r = { v: [] };
1048
+ return i.forEach((r) => {
1049
+ const o = { v: [] };
1073
1050
  e.forEach((l) => {
1074
- r.v.push(o[l] !== void 0 && o[l] !== null ? o[l] : "");
1075
- }), s.push(r);
1051
+ o.v.push(r[l] !== void 0 && r[l] !== null ? r[l] : "");
1052
+ }), s.push(o);
1076
1053
  }), s;
1077
1054
  }, "#json2Array"));
1078
- h(this, Ct, /* @__PURE__ */ a((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1079
- e.__ng = t(this, ct).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = L.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1055
+ h(this, Ct, /* @__PURE__ */ c((i) => (Array.isArray(i) || (i = [i]), i.forEach((e) => {
1056
+ e.__ng = t(this, at).call(this), e.__ng.rowid = this.nextId, e.__ng.rowState = L.ROW_STATE.INSERT, e.__ng._[0] = e.__ng.rowid;
1080
1057
  }), i), "#defaultInsert"));
1081
- w(this, "add", /* @__PURE__ */ a((i, e = !0) => {
1082
- var o;
1058
+ w(this, "add", /* @__PURE__ */ c((i, e = !0) => {
1059
+ var r;
1083
1060
  i === void 0 && (i = {});
1084
1061
  const s = t(this, Ht).call(this, i);
1085
- t(this, v).rawRecords = t(this, v).rawRecords.concat(t(this, Ct).call(this, s)), this.resetRecords();
1062
+ t(this, x).rawRecords = t(this, x).rawRecords.concat(t(this, Ct).call(this, s)), this.resetRecords();
1086
1063
  const n = this.count() - 1;
1087
- return e || s.forEach((r, l) => {
1088
- const c = t(this, v).rawRecords[n - l];
1089
- c && (c.__ng.rowState = L.ROW_STATE.EMPTY);
1090
- }), (o = t(this, v).viewRecords) != null && o.reset && t(this, v).viewRecords.reset(), n;
1064
+ return e || s.forEach((o, l) => {
1065
+ const a = t(this, x).rawRecords[n - l];
1066
+ a && (a.__ng.rowState = L.ROW_STATE.EMPTY);
1067
+ }), (r = t(this, x).viewRecords) != null && r.reset && t(this, x).viewRecords.reset(), n;
1091
1068
  }, "add"));
1092
- w(this, "delete", /* @__PURE__ */ a((i) => {
1069
+ w(this, "delete", /* @__PURE__ */ c((i) => {
1093
1070
  var s;
1094
1071
  let e = [];
1095
- Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, v).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, o) => o - n).forEach((n) => {
1072
+ Array.isArray(i) ? e = i : typeof i > "u" ? e = [t(this, x).owner.row.at] : e = [parseInt(i, 10)], e.sort((n, r) => r - n).forEach((n) => {
1096
1073
  if (t(this, q)[n]) {
1097
- const o = t(this, q)[n].__ng.rowid;
1098
- t(this, q)[n].__ng.rowState === L.ROW_STATE.INSERT ? t(this, v).rawRecords = t(this, v).rawRecords.filter((r) => r.__ng.rowid !== o) : t(this, v).rawRecords.forEach((r) => {
1099
- r.__ng.rowid === o && (r.__ng.deleted = !0, r.__ng.rowState = L.ROW_STATE.DELETE);
1074
+ const r = t(this, q)[n].__ng.rowid;
1075
+ t(this, q)[n].__ng.rowState === L.ROW_STATE.INSERT ? t(this, x).rawRecords = t(this, x).rawRecords.filter((o) => o.__ng.rowid !== r) : t(this, x).rawRecords.forEach((o) => {
1076
+ o.__ng.rowid === r && (o.__ng.deleted = !0, o.__ng.rowState = L.ROW_STATE.DELETE);
1100
1077
  });
1101
1078
  }
1102
- }), this.resetRecords(), (s = t(this, v).viewRecords) != null && s.reset && t(this, v).viewRecords.reset();
1079
+ }), this.resetRecords(), (s = t(this, x).viewRecords) != null && s.reset && t(this, x).viewRecords.reset();
1103
1080
  }, "delete"));
1104
- w(this, "setValue", /* @__PURE__ */ a((i, e, s) => {
1105
- var c;
1081
+ w(this, "setValue", /* @__PURE__ */ c((i, e, s) => {
1082
+ var a;
1106
1083
  i = parseInt(i, 10);
1107
- const o = (typeof ((c = t(this, A).fields) == null ? void 0 : c.get) == "function" ? t(this, A).fields.get() : []).indexOf(e);
1108
- if (o < 0) return;
1109
- const r = this.getValidData()[i];
1110
- if (!r) return;
1111
- const l = r.v[o];
1112
- l !== s && r.__ng.rowState !== L.ROW_STATE.INSERT && (r.__ng.o.hasOwnProperty(e) || (r.__ng.o[e] = l), r.__ng.rowState = L.ROW_STATE.UPDATE), r.v[o] = s, t(this, v).owner.refreshData && t(this, v).owner.refreshData(i);
1084
+ const r = (typeof ((a = t(this, A).fields) == null ? void 0 : a.get) == "function" ? t(this, A).fields.get() : []).indexOf(e);
1085
+ if (r < 0) return;
1086
+ const o = this.getValidData()[i];
1087
+ if (!o) return;
1088
+ const l = o.v[r];
1089
+ l !== s && o.__ng.rowState !== L.ROW_STATE.INSERT && (o.__ng.o.hasOwnProperty(e) || (o.__ng.o[e] = l), o.__ng.rowState = L.ROW_STATE.UPDATE), o.v[r] = s, t(this, x).owner.refreshData && t(this, x).owner.refreshData(i);
1113
1090
  }, "setValue"));
1114
- w(this, "resetRecords", /* @__PURE__ */ a(() => {
1115
- b(this, Q, t(this, v).rawRecords.filter((i) => !i.__ng.deleted)), b(this, q, t(this, v).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, v).rawRecords.forEach((i, e) => {
1091
+ w(this, "resetRecords", /* @__PURE__ */ c(() => {
1092
+ g(this, J, t(this, x).rawRecords.filter((i) => !i.__ng.deleted)), g(this, q, t(this, x).rawRecords.filter((i) => !i.__ng.deleted && !i.__ng.filtered)), t(this, x).rawRecords.forEach((i, e) => {
1116
1093
  i.__ng.rowidx = e;
1117
1094
  }), t(this, q).forEach((i, e) => {
1118
1095
  i.__ng.i = e;
1119
1096
  });
1120
1097
  }, "resetRecords"));
1121
- w(this, "getValidData", /* @__PURE__ */ a(() => (t(this, q).length === 0 && t(this, v).rawRecords.length > 0 && this.resetRecords(), t(this, q)), "getValidData"));
1122
- h(this, tt, /* @__PURE__ */ a((i) => {
1098
+ w(this, "getValidData", /* @__PURE__ */ c(() => (t(this, q).length === 0 && t(this, x).rawRecords.length > 0 && this.resetRecords(), t(this, q)), "getValidData"));
1099
+ h(this, Q, /* @__PURE__ */ c((i) => {
1123
1100
  var s;
1124
1101
  if (!i) return i;
1125
1102
  const e = typeof ((s = t(this, A).fields) == null ? void 0 : s.get) == "function" ? t(this, A).fields.get() : [];
1126
1103
  return Array.isArray(i) ? i.filter((n) => !n.__ng.deleted).map((n) => {
1127
- const o = {};
1128
- return e.forEach((r, l) => {
1129
- o[r] = n.v ? n.v[l] : n[r];
1130
- }), o.__ng = n.__ng, o;
1104
+ const r = {};
1105
+ return e.forEach((o, l) => {
1106
+ r[o] = n.v ? n.v[l] : n[o];
1107
+ }), r.__ng = n.__ng, r;
1131
1108
  }) : i;
1132
1109
  }, "#conv2"));
1133
- w(this, "count", /* @__PURE__ */ a(() => this.getValidData().length, "count"));
1134
- w(this, "get", /* @__PURE__ */ a((i, e) => {
1135
- var o;
1110
+ w(this, "count", /* @__PURE__ */ c(() => this.getValidData().length, "count"));
1111
+ w(this, "get", /* @__PURE__ */ c((i, e) => {
1112
+ var r;
1136
1113
  const s = this.getValidData();
1137
1114
  if (!s || s.length <= 0) return;
1138
- if (i == null) return t(this, tt).call(this, s);
1115
+ if (i == null) return t(this, Q).call(this, s);
1139
1116
  if (i < 0 || i >= s.length) return null;
1140
- const n = typeof ((o = t(this, A).fields) == null ? void 0 : o.get) == "function" ? t(this, A).fields.get() : [];
1117
+ const n = typeof ((r = t(this, A).fields) == null ? void 0 : r.get) == "function" ? t(this, A).fields.get() : [];
1141
1118
  if (e != null) {
1142
- const r = n.indexOf(e);
1143
- return r >= 0 ? s[i].v[r] : null;
1119
+ const o = n.indexOf(e);
1120
+ return o >= 0 ? s[i].v[o] : null;
1144
1121
  }
1145
- return t(this, tt).call(this, s[i]);
1122
+ return t(this, Q).call(this, s[i]);
1146
1123
  }, "get"));
1147
- b(this, A, i), b(this, v, e), t(this, Lt).call(this);
1124
+ g(this, A, i), g(this, x, e), t(this, Lt).call(this);
1148
1125
  }
1149
1126
  get source() {
1150
- return t(this, tt).call(this, t(this, v).rawRecords);
1127
+ return t(this, Q).call(this, t(this, x).rawRecords);
1151
1128
  }
1152
1129
  set source(i) {
1153
1130
  this.clear(), this.add(i, !1);
@@ -1162,7 +1139,7 @@ const L = class L {
1162
1139
  return this.length;
1163
1140
  }
1164
1141
  };
1165
- A = new WeakMap(), v = new WeakMap(), q = new WeakMap(), Q = new WeakMap(), qt = new WeakMap(), z = new WeakMap(), Lt = new WeakMap(), ct = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), tt = new WeakMap(), a(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1142
+ A = new WeakMap(), x = new WeakMap(), q = new WeakMap(), J = new WeakMap(), qt = new WeakMap(), O = new WeakMap(), Lt = new WeakMap(), at = new WeakMap(), Ht = new WeakMap(), Ct = new WeakMap(), Q = new WeakMap(), c(L, "ngData"), // 🎯 ν–‰ μƒνƒœ μ •μ˜ μƒμˆ˜λ₯Ό 클래슀 λ‚΄λΆ€λ‘œ λ‚΄μž¬ν™”
1166
1143
  w(L, "ROW_STATE", {
1167
1144
  EMPTY: "EMPTY",
1168
1145
  NORMAL: "NORMAL",
@@ -1179,10 +1156,10 @@ const Gt = class Gt {
1179
1156
  }, this.setDataSource = (e) => {
1180
1157
  this.data && this.data.reset(), this.rawRecords = [], this.viewRecords = [], this.delRecords = [], this.data.set(e || []);
1181
1158
  }, this.getRowState = (e) => {
1182
- var n, o;
1159
+ var n, r;
1183
1160
  const s = parseInt(e, 10);
1184
1161
  if (!(s >= this.data.count()))
1185
- return (o = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : o.rowState;
1162
+ return (r = (n = this.data.getValidData()[s]) == null ? void 0 : n.__ng) == null ? void 0 : r.rowState;
1186
1163
  }, this.getRowPosition = () => this.row.at, this.setRowPosition = (e) => {
1187
1164
  this.row.at = e;
1188
1165
  }, 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) => {
@@ -1190,37 +1167,37 @@ const Gt = class Gt {
1190
1167
  }, this.setDataSource([]);
1191
1168
  }
1192
1169
  };
1193
- a(Gt, "ngDataManager");
1170
+ c(Gt, "ngDataManager");
1194
1171
  let Nt = Gt;
1195
- var j, Mt;
1172
+ var U, _t;
1196
1173
  const Jt = class Jt extends HTMLElement {
1197
1174
  constructor() {
1198
1175
  super();
1199
1176
  //#created = false;
1200
- h(this, j);
1201
- h(this, Mt);
1202
- this.attachShadow({ mode: "open" }), b(this, j, new Nt(this));
1177
+ h(this, U);
1178
+ h(this, _t);
1179
+ this.attachShadow({ mode: "open" }), g(this, U, new Nt(this));
1203
1180
  }
1204
1181
  connectedCallback() {
1205
- b(this, Mt, new Dt(this)), H.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1182
+ g(this, _t, new Dt(this)), tt.log("NineTable connected."), this.dispatchEvent(new CustomEvent("load", { bubbles: !0, detail: { target: this } }));
1206
1183
  }
1207
1184
  disconnectedCallback() {
1208
- H.log("NineTable disconnected.");
1185
+ tt.log("NineTable disconnected.");
1209
1186
  }
1210
1187
  // 🎯 μ™ΈλΆ€μ—μ„œ grid.data.set(...) ν˜•νƒœλ‘œ μ ‘κ·Όν•  수 μžˆλ„λ‘ 데이터 λ§€λ‹ˆμ € μ˜€ν”ˆ
1211
1188
  get data() {
1212
- return t(this, j).data;
1189
+ return t(this, U).data;
1213
1190
  }
1214
1191
  // 🎯 ν–‰(row) κ΄€λ ¨ μ œμ–΄ μ ‘κ·Όμž μ˜€ν”ˆ
1215
1192
  get row() {
1216
- return t(this, j).row;
1193
+ return t(this, U).row;
1217
1194
  }
1218
1195
  // 🎯 전체 데이터 λ§€λ‹ˆμ € μ ‘κ·Ό ν•„μš”ν•  경우
1219
1196
  get dataManager() {
1220
- return t(this, j);
1197
+ return t(this, U);
1221
1198
  }
1222
1199
  };
1223
- j = new WeakMap(), Mt = new WeakMap(), a(Jt, "NineTable");
1224
- let Vt = Jt;
1225
- customElements.get("nine-table") || customElements.define("nine-table", Vt);
1200
+ U = new WeakMap(), _t = new WeakMap(), c(Jt, "NineTable");
1201
+ let Yt = Jt;
1202
+ customElements.get("nine-table") || customElements.define("nine-table", Yt);
1226
1203
  //# sourceMappingURL=nine-table.js.map