@ninebone/table 0.1.17 → 0.1.19

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