@stonecrop/atable 0.4.15 → 0.4.17

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.
package/dist/atable.js CHANGED
@@ -1,17 +1,17 @@
1
- import { onMounted as ne, ref as P, watch as X, onBeforeUnmount as lt, computed as k, shallowRef as H, toValue as E, watchEffect as at, getCurrentScope as Fe, onScopeDispose as je, unref as b, getCurrentInstance as Ie, nextTick as Ue, isRef as st, toRefs as rt, customRef as Ye, toRef as it, readonly as ut, defineComponent as J, useTemplateRef as N, createElementBlock as R, openBlock as S, normalizeClass as j, normalizeStyle as Y, createBlock as se, resolveDynamicComponent as ve, mergeProps as ke, toDisplayString as K, Fragment as ie, createElementVNode as L, createCommentVNode as _, renderSlot as W, useCssVars as ct, withDirectives as xe, vShow as qe, renderList as Ce, createTextVNode as dt, withModifiers as Oe, createVNode as Le, withCtx as De } from "vue";
2
- import { defineStore as ft } from "pinia";
1
+ import { onMounted as Q, ref as O, watch as B, onBeforeUnmount as st, computed as I, shallowRef as H, toValue as E, watchEffect as rt, getCurrentScope as Ye, onScopeDispose as qe, unref as b, getCurrentInstance as pe, nextTick as Je, isRef as it, toRefs as ut, customRef as Qe, toRef as ct, readonly as dt, defineComponent as Z, useTemplateRef as N, createElementBlock as R, openBlock as M, normalizeClass as j, normalizeStyle as q, createBlock as ie, resolveDynamicComponent as ve, mergeProps as Se, toDisplayString as _, Fragment as ue, createElementVNode as L, createCommentVNode as ee, renderSlot as z, useCssVars as ft, withDirectives as he, vShow as Ze, renderList as Ie, createTextVNode as vt, withModifiers as De, createVNode as We, withCtx as He } from "vue";
2
+ import { defineStore as mt } from "pinia";
3
3
  import './assets/index.css';function Me(e) {
4
- return Fe() ? (je(e), !0) : !1;
4
+ return Ye() ? (qe(e), !0) : !1;
5
5
  }
6
- const vt = typeof window < "u" && typeof document < "u";
6
+ const ht = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
8
- const mt = (e) => e != null, gt = Object.prototype.toString, ht = (e) => gt.call(e) === "[object Object]", pt = () => {
8
+ const gt = (e) => e != null, pt = Object.prototype.toString, wt = (e) => pt.call(e) === "[object Object]", yt = () => {
9
9
  };
10
10
  function me(e) {
11
11
  return Array.isArray(e) ? e : [e];
12
12
  }
13
- function wt(e, t, n) {
14
- return X(
13
+ function bt(e, t, n) {
14
+ return B(
15
15
  e,
16
16
  t,
17
17
  {
@@ -20,37 +20,37 @@ function wt(e, t, n) {
20
20
  }
21
21
  );
22
22
  }
23
- const oe = vt ? window : void 0;
24
- function ee(e) {
23
+ const oe = ht ? window : void 0;
24
+ function te(e) {
25
25
  var t;
26
26
  const n = E(e);
27
27
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
28
28
  }
29
- function ce(...e) {
29
+ function de(...e) {
30
30
  const t = [], n = () => {
31
31
  t.forEach((a) => a()), t.length = 0;
32
- }, o = (a, i, r, s) => (a.addEventListener(i, r, s), () => a.removeEventListener(i, r, s)), u = k(() => {
33
- const a = me(E(e[0])).filter((i) => i != null);
34
- return a.every((i) => typeof i != "string") ? a : void 0;
35
- }), c = wt(
32
+ }, o = (a, u, r, s) => (a.addEventListener(u, r, s), () => a.removeEventListener(u, r, s)), i = I(() => {
33
+ const a = me(E(e[0])).filter((u) => u != null);
34
+ return a.every((u) => typeof u != "string") ? a : void 0;
35
+ }), c = bt(
36
36
  () => {
37
- var a, i;
37
+ var a, u;
38
38
  return [
39
- (i = (a = u.value) == null ? void 0 : a.map((r) => ee(r))) != null ? i : [oe].filter((r) => r != null),
40
- me(E(u.value ? e[1] : e[0])),
41
- me(b(u.value ? e[2] : e[1])),
39
+ (u = (a = i.value) == null ? void 0 : a.map((r) => te(r))) != null ? u : [oe].filter((r) => r != null),
40
+ me(E(i.value ? e[1] : e[0])),
41
+ me(b(i.value ? e[2] : e[1])),
42
42
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
43
- E(u.value ? e[3] : e[2])
43
+ E(i.value ? e[3] : e[2])
44
44
  ];
45
45
  },
46
- ([a, i, r, s]) => {
47
- if (n(), !(a != null && a.length) || !(i != null && i.length) || !(r != null && r.length))
46
+ ([a, u, r, s]) => {
47
+ if (n(), !(a != null && a.length) || !(u != null && u.length) || !(r != null && r.length))
48
48
  return;
49
- const g = ht(s) ? { ...s } : s;
49
+ const v = wt(s) ? { ...s } : s;
50
50
  t.push(
51
51
  ...a.flatMap(
52
- (m) => i.flatMap(
53
- (w) => r.map((v) => o(m, w, v, g))
52
+ (m) => u.flatMap(
53
+ (y) => r.map((h) => o(m, y, h, v))
54
54
  )
55
55
  )
56
56
  );
@@ -61,57 +61,57 @@ function ce(...e) {
61
61
  };
62
62
  return Me(n), l;
63
63
  }
64
- function yt() {
65
- const e = H(!1), t = Ie();
66
- return t && ne(() => {
64
+ function xt() {
65
+ const e = H(!1), t = pe();
66
+ return t && Q(() => {
67
67
  e.value = !0;
68
68
  }, t), e;
69
69
  }
70
- function bt(e) {
71
- const t = yt();
72
- return k(() => (t.value, !!e()));
70
+ function Ct(e) {
71
+ const t = xt();
72
+ return I(() => (t.value, !!e()));
73
73
  }
74
- function xt(e, t, n = {}) {
75
- const { window: o = oe, ...u } = n;
74
+ function Et(e, t, n = {}) {
75
+ const { window: o = oe, ...i } = n;
76
76
  let c;
77
- const l = bt(() => o && "MutationObserver" in o), a = () => {
77
+ const l = Ct(() => o && "MutationObserver" in o), a = () => {
78
78
  c && (c.disconnect(), c = void 0);
79
- }, i = k(() => {
80
- const m = E(e), w = me(m).map(ee).filter(mt);
81
- return new Set(w);
82
- }), r = X(
83
- () => i.value,
79
+ }, u = I(() => {
80
+ const m = E(e), y = me(m).map(te).filter(gt);
81
+ return new Set(y);
82
+ }), r = B(
83
+ () => u.value,
84
84
  (m) => {
85
- a(), l.value && m.size && (c = new MutationObserver(t), m.forEach((w) => c.observe(w, u)));
85
+ a(), l.value && m.size && (c = new MutationObserver(t), m.forEach((y) => c.observe(y, i)));
86
86
  },
87
87
  { immediate: !0, flush: "post" }
88
- ), s = () => c == null ? void 0 : c.takeRecords(), g = () => {
88
+ ), s = () => c == null ? void 0 : c.takeRecords(), v = () => {
89
89
  r(), a();
90
90
  };
91
- return Me(g), {
91
+ return Me(v), {
92
92
  isSupported: l,
93
- stop: g,
93
+ stop: v,
94
94
  takeRecords: s
95
95
  };
96
96
  }
97
- function Ct(e, t, n = {}) {
97
+ function It(e, t, n = {}) {
98
98
  const {
99
99
  window: o = oe,
100
- document: u = o == null ? void 0 : o.document,
100
+ document: i = o == null ? void 0 : o.document,
101
101
  flush: c = "sync"
102
102
  } = n;
103
- if (!o || !u)
104
- return pt;
103
+ if (!o || !i)
104
+ return yt;
105
105
  let l;
106
106
  const a = (s) => {
107
107
  l == null || l(), l = s;
108
- }, i = at(() => {
109
- const s = ee(e);
108
+ }, u = rt(() => {
109
+ const s = te(e);
110
110
  if (s) {
111
- const { stop: g } = xt(
112
- u,
111
+ const { stop: v } = Et(
112
+ i,
113
113
  (m) => {
114
- m.map((w) => [...w.removedNodes]).flat().some((w) => w === s || w.contains(s)) && t(m);
114
+ m.map((y) => [...y.removedNodes]).flat().some((y) => y === s || y.contains(s)) && t(m);
115
115
  },
116
116
  {
117
117
  window: o,
@@ -119,19 +119,19 @@ function Ct(e, t, n = {}) {
119
119
  subtree: !0
120
120
  }
121
121
  );
122
- a(g);
122
+ a(v);
123
123
  }
124
124
  }, { flush: c }), r = () => {
125
- i(), a();
125
+ u(), a();
126
126
  };
127
127
  return Me(r), r;
128
128
  }
129
- function Et(e = {}) {
129
+ function kt(e = {}) {
130
130
  var t;
131
131
  const {
132
132
  window: n = oe,
133
133
  deep: o = !0,
134
- triggerOnRemoval: u = !1
134
+ triggerOnRemoval: i = !1
135
135
  } = e, c = (t = e.document) != null ? t : n == null ? void 0 : n.document, l = () => {
136
136
  var r;
137
137
  let s = c == null ? void 0 : c.activeElement;
@@ -139,7 +139,7 @@ function Et(e = {}) {
139
139
  for (; s != null && s.shadowRoot; )
140
140
  s = (r = s == null ? void 0 : s.shadowRoot) == null ? void 0 : r.activeElement;
141
141
  return s;
142
- }, a = P(), i = () => {
142
+ }, a = O(), u = () => {
143
143
  a.value = l();
144
144
  };
145
145
  if (n) {
@@ -147,37 +147,37 @@ function Et(e = {}) {
147
147
  capture: !0,
148
148
  passive: !0
149
149
  };
150
- ce(
150
+ de(
151
151
  n,
152
152
  "blur",
153
153
  (s) => {
154
- s.relatedTarget === null && i();
154
+ s.relatedTarget === null && u();
155
155
  },
156
156
  r
157
- ), ce(
157
+ ), de(
158
158
  n,
159
159
  "focus",
160
- i,
160
+ u,
161
161
  r
162
162
  );
163
163
  }
164
- return u && Ct(a, i, { document: c }), i(), a;
164
+ return i && It(a, u, { document: c }), u(), a;
165
165
  }
166
- const It = "focusin", kt = "focusout", Mt = ":focus-within";
167
- function St(e, t = {}) {
168
- const { window: n = oe } = t, o = k(() => ee(e)), u = H(!1), c = k(() => u.value), l = Et(t);
166
+ const St = "focusin", Mt = "focusout", $t = ":focus-within";
167
+ function At(e, t = {}) {
168
+ const { window: n = oe } = t, o = I(() => te(e)), i = H(!1), c = I(() => i.value), l = kt(t);
169
169
  if (!n || !l.value)
170
170
  return { focused: c };
171
171
  const a = { passive: !0 };
172
- return ce(o, It, () => u.value = !0, a), ce(o, kt, () => {
173
- var i, r, s;
174
- return u.value = (s = (r = (i = o.value) == null ? void 0 : i.matches) == null ? void 0 : r.call(i, Mt)) != null ? s : !1;
172
+ return de(o, St, () => i.value = !0, a), de(o, Mt, () => {
173
+ var u, r, s;
174
+ return i.value = (s = (r = (u = o.value) == null ? void 0 : u.matches) == null ? void 0 : r.call(u, $t)) != null ? s : !1;
175
175
  }, a), { focused: c };
176
176
  }
177
- function $t(e, { window: t = oe, scrollTarget: n } = {}) {
178
- const o = P(!1), u = () => {
177
+ function Rt(e, { window: t = oe, scrollTarget: n } = {}) {
178
+ const o = O(!1), i = () => {
179
179
  if (!t) return;
180
- const c = t.document, l = ee(e);
180
+ const c = t.document, l = te(e);
181
181
  if (!l)
182
182
  o.value = !1;
183
183
  else {
@@ -185,92 +185,92 @@ function $t(e, { window: t = oe, scrollTarget: n } = {}) {
185
185
  o.value = a.top <= (t.innerHeight || c.documentElement.clientHeight) && a.left <= (t.innerWidth || c.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;
186
186
  }
187
187
  };
188
- return X(
189
- () => ee(e),
190
- () => u(),
188
+ return B(
189
+ () => te(e),
190
+ () => i(),
191
191
  { immediate: !0, flush: "post" }
192
- ), t && ce(n || t, "scroll", u, {
192
+ ), t && de(n || t, "scroll", i, {
193
193
  capture: !1,
194
194
  passive: !0
195
195
  }), o;
196
196
  }
197
- const G = (e) => {
198
- let t = $t(e).value;
197
+ const V = (e) => {
198
+ let t = Rt(e).value;
199
199
  return t = t && e.offsetHeight > 0, t;
200
- }, z = (e) => e.tabIndex >= 0, He = (e) => {
200
+ }, G = (e) => e.tabIndex >= 0, ze = (e) => {
201
201
  const t = e.target;
202
- return Se(t);
203
- }, Se = (e) => {
202
+ return $e(t);
203
+ }, $e = (e) => {
204
204
  var t;
205
205
  let n;
206
206
  if (e instanceof HTMLTableCellElement) {
207
207
  const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
208
208
  if (o) {
209
- const u = Array.from(o.children)[e.cellIndex];
210
- u && (n = u);
209
+ const i = Array.from(o.children)[e.cellIndex];
210
+ i && (n = i);
211
211
  }
212
212
  } else if (e instanceof HTMLTableRowElement) {
213
213
  const o = e.previousElementSibling;
214
214
  o && (n = o);
215
215
  }
216
- return n && (!z(n) || !G(n)) ? Se(n) : n;
217
- }, At = (e) => {
216
+ return n && (!G(n) || !V(n)) ? $e(n) : n;
217
+ }, Tt = (e) => {
218
218
  var t;
219
219
  const n = e.target;
220
220
  let o;
221
221
  if (n instanceof HTMLTableCellElement) {
222
- const u = (t = n.parentElement) == null ? void 0 : t.parentElement;
223
- if (u) {
224
- const c = u.firstElementChild, l = c == null ? void 0 : c.children[n.cellIndex];
222
+ const i = (t = n.parentElement) == null ? void 0 : t.parentElement;
223
+ if (i) {
224
+ const c = i.firstElementChild, l = c == null ? void 0 : c.children[n.cellIndex];
225
225
  l && (o = l);
226
226
  }
227
227
  } else if (n instanceof HTMLTableRowElement) {
228
- const u = n.parentElement;
229
- if (u) {
230
- const c = u.firstElementChild;
228
+ const i = n.parentElement;
229
+ if (i) {
230
+ const c = i.firstElementChild;
231
231
  c && (o = c);
232
232
  }
233
233
  }
234
- return o && (!z(o) || !G(o)) ? $e(o) : o;
235
- }, We = (e) => {
234
+ return o && (!G(o) || !V(o)) ? Ae(o) : o;
235
+ }, Be = (e) => {
236
236
  const t = e.target;
237
- return $e(t);
238
- }, $e = (e) => {
237
+ return Ae(t);
238
+ }, Ae = (e) => {
239
239
  var t;
240
240
  let n;
241
241
  if (e instanceof HTMLTableCellElement) {
242
242
  const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
243
243
  if (o) {
244
- const u = Array.from(o.children)[e.cellIndex];
245
- u && (n = u);
244
+ const i = Array.from(o.children)[e.cellIndex];
245
+ i && (n = i);
246
246
  }
247
247
  } else if (e instanceof HTMLTableRowElement) {
248
248
  const o = e.nextElementSibling;
249
249
  o && (n = o);
250
250
  }
251
- return n && (!z(n) || !G(n)) ? $e(n) : n;
252
- }, Tt = (e) => {
251
+ return n && (!G(n) || !V(n)) ? Ae(n) : n;
252
+ }, Ot = (e) => {
253
253
  var t;
254
254
  const n = e.target;
255
255
  let o;
256
256
  if (n instanceof HTMLTableCellElement) {
257
- const u = (t = n.parentElement) == null ? void 0 : t.parentElement;
258
- if (u) {
259
- const c = u.lastElementChild, l = c == null ? void 0 : c.children[n.cellIndex];
257
+ const i = (t = n.parentElement) == null ? void 0 : t.parentElement;
258
+ if (i) {
259
+ const c = i.lastElementChild, l = c == null ? void 0 : c.children[n.cellIndex];
260
260
  l && (o = l);
261
261
  }
262
262
  } else if (n instanceof HTMLTableRowElement) {
263
- const u = n.parentElement;
264
- if (u) {
265
- const c = u.lastElementChild;
263
+ const i = n.parentElement;
264
+ if (i) {
265
+ const c = i.lastElementChild;
266
266
  c && (o = c);
267
267
  }
268
268
  }
269
- return o && (!z(o) || !G(o)) ? Se(o) : o;
270
- }, Be = (e) => {
269
+ return o && (!G(o) || !V(o)) ? $e(o) : o;
270
+ }, Xe = (e) => {
271
271
  const t = e.target;
272
- return Ae(t);
273
- }, Ae = (e) => {
272
+ return Re(t);
273
+ }, Re = (e) => {
274
274
  var t;
275
275
  let n;
276
276
  if (e.previousElementSibling)
@@ -279,8 +279,8 @@ const G = (e) => {
279
279
  const o = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
280
280
  n = o == null ? void 0 : o.lastElementChild;
281
281
  }
282
- return n && (!z(n) || !G(n)) ? Ae(n) : n;
283
- }, Xe = (e) => {
282
+ return n && (!G(n) || !V(n)) ? Re(n) : n;
283
+ }, Ne = (e) => {
284
284
  const t = e.target;
285
285
  return Te(t);
286
286
  }, Te = (e) => {
@@ -292,41 +292,41 @@ const G = (e) => {
292
292
  const o = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
293
293
  n = o == null ? void 0 : o.firstElementChild;
294
294
  }
295
- return n && (!z(n) || !G(n)) ? Te(n) : n;
295
+ return n && (!G(n) || !V(n)) ? Te(n) : n;
296
296
  }, Ve = (e) => {
297
297
  const t = e.target.parentElement, n = t == null ? void 0 : t.firstElementChild;
298
- return n && (!z(n) || !G(n)) ? Te(n) : n;
299
- }, Ne = (e) => {
298
+ return n && (!G(n) || !V(n)) ? Te(n) : n;
299
+ }, Ge = (e) => {
300
300
  const t = e.target.parentElement, n = t == null ? void 0 : t.lastElementChild;
301
- return n && (!z(n) || !G(n)) ? Ae(n) : n;
302
- }, fe = ["alt", "control", "shift", "meta"], Rt = {
301
+ return n && (!G(n) || !V(n)) ? Re(n) : n;
302
+ }, fe = ["alt", "control", "shift", "meta"], Pt = {
303
303
  ArrowUp: "up",
304
304
  ArrowDown: "down",
305
305
  ArrowLeft: "left",
306
306
  ArrowRight: "right"
307
- }, Re = {
307
+ }, Oe = {
308
308
  "keydown.up": (e) => {
309
- const t = He(e);
309
+ const t = ze(e);
310
310
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
311
311
  },
312
312
  "keydown.down": (e) => {
313
- const t = We(e);
313
+ const t = Be(e);
314
314
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
315
315
  },
316
316
  "keydown.left": (e) => {
317
- const t = Be(e);
317
+ const t = Xe(e);
318
318
  e.preventDefault(), e.stopPropagation(), t && t.focus();
319
319
  },
320
320
  "keydown.right": (e) => {
321
- const t = Xe(e);
321
+ const t = Ne(e);
322
322
  e.preventDefault(), e.stopPropagation(), t && t.focus();
323
323
  },
324
324
  "keydown.control.up": (e) => {
325
- const t = At(e);
325
+ const t = Tt(e);
326
326
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
327
327
  },
328
328
  "keydown.control.down": (e) => {
329
- const t = Tt(e);
329
+ const t = Ot(e);
330
330
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
331
331
  },
332
332
  "keydown.control.left": (e) => {
@@ -334,24 +334,24 @@ const G = (e) => {
334
334
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
335
335
  },
336
336
  "keydown.control.right": (e) => {
337
- const t = Ne(e);
337
+ const t = Ge(e);
338
338
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
339
339
  },
340
340
  "keydown.end": (e) => {
341
- const t = Ne(e);
341
+ const t = Ge(e);
342
342
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
343
343
  },
344
344
  "keydown.enter": (e) => {
345
345
  if (e.target instanceof HTMLTableCellElement) {
346
346
  e.preventDefault(), e.stopPropagation();
347
- const t = We(e);
347
+ const t = Be(e);
348
348
  t && t.focus();
349
349
  }
350
350
  },
351
351
  "keydown.shift.enter": (e) => {
352
352
  if (e.target instanceof HTMLTableCellElement) {
353
353
  e.preventDefault(), e.stopPropagation();
354
- const t = He(e);
354
+ const t = ze(e);
355
355
  t && t.focus();
356
356
  }
357
357
  },
@@ -360,11 +360,11 @@ const G = (e) => {
360
360
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
361
361
  },
362
362
  "keydown.tab": (e) => {
363
- const t = Xe(e);
363
+ const t = Ne(e);
364
364
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
365
365
  },
366
366
  "keydown.shift.tab": (e) => {
367
- const t = Be(e);
367
+ const t = Xe(e);
368
368
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
369
369
  }
370
370
  };
@@ -374,10 +374,10 @@ function Pe(e) {
374
374
  return l.parent && (typeof l.parent == "string" ? a = document.querySelector(l.parent) : l.parent instanceof HTMLElement ? a = l.parent : a = l.parent.value), a;
375
375
  }, n = (l) => {
376
376
  var a;
377
- const i = t(l);
377
+ const u = t(l);
378
378
  let r = [];
379
379
  if (typeof l.selectors == "string")
380
- r = i ? Array.from(i.querySelectorAll(l.selectors)) : Array.from(document.querySelectorAll(l.selectors));
380
+ r = u ? Array.from(u.querySelectorAll(l.selectors)) : Array.from(document.querySelectorAll(l.selectors));
381
381
  else if (Array.isArray(l.selectors))
382
382
  for (const s of l.selectors)
383
383
  s instanceof HTMLElement ? r.push(s) : r.push(s.$el);
@@ -392,100 +392,100 @@ function Pe(e) {
392
392
  return r;
393
393
  }, o = (l) => {
394
394
  const a = t(l);
395
- let i = [];
396
- return l.selectors ? i = n(l) : a && (i = Array.from(a.children).filter((r) => z(r) && G(r))), i;
397
- }, u = (l) => (a) => {
398
- const i = Rt[a.key] || a.key.toLowerCase();
399
- if (fe.includes(i)) return;
400
- const r = l.handlers || Re;
395
+ let u = [];
396
+ return l.selectors ? u = n(l) : a && (u = Array.from(a.children).filter((r) => G(r) && V(r))), u;
397
+ }, i = (l) => (a) => {
398
+ const u = Pt[a.key] || a.key.toLowerCase();
399
+ if (fe.includes(u)) return;
400
+ const r = l.handlers || Oe;
401
401
  for (const s of Object.keys(r)) {
402
- const [g, ...m] = s.split(".");
403
- if (g === "keydown" && m.includes(i)) {
404
- const w = r[s], v = m.filter((f) => fe.includes(f)), x = fe.some((f) => {
402
+ const [v, ...m] = s.split(".");
403
+ if (v === "keydown" && m.includes(u)) {
404
+ const y = r[s], h = m.filter((f) => fe.includes(f)), x = fe.some((f) => {
405
405
  const d = f.charAt(0).toUpperCase() + f.slice(1);
406
406
  return a.getModifierState(d);
407
407
  });
408
- if (v.length > 0) {
408
+ if (h.length > 0) {
409
409
  if (x) {
410
410
  for (const f of fe)
411
411
  if (m.includes(f)) {
412
412
  const d = f.charAt(0).toUpperCase() + f.slice(1);
413
- a.getModifierState(d) && w(a);
413
+ a.getModifierState(d) && y(a);
414
414
  }
415
415
  }
416
416
  } else
417
- x || w(a);
417
+ x || y(a);
418
418
  }
419
419
  }
420
420
  }, c = [];
421
- ne(() => {
421
+ Q(() => {
422
422
  for (const l of e) {
423
- const a = t(l), i = o(l), r = u(l), s = a ? [a] : i;
424
- for (const g of s) {
425
- const { focused: m } = St(P(g)), w = X(m, (v) => {
426
- v ? g.addEventListener("keydown", r) : g.removeEventListener("keydown", r);
423
+ const a = t(l), u = o(l), r = i(l), s = a ? [a] : u;
424
+ for (const v of s) {
425
+ const { focused: m } = At(O(v)), y = B(m, (h) => {
426
+ h ? v.addEventListener("keydown", r) : v.removeEventListener("keydown", r);
427
427
  });
428
- c.push(w);
428
+ c.push(y);
429
429
  }
430
430
  }
431
- }), lt(() => {
431
+ }), st(() => {
432
432
  for (const l of c)
433
433
  l();
434
434
  });
435
435
  }
436
- function de(e) {
437
- return Fe() ? (je(e), !0) : !1;
436
+ function le(e) {
437
+ return Ye() ? (qe(e), !0) : !1;
438
438
  }
439
- const he = typeof window < "u" && typeof document < "u";
439
+ const we = typeof window < "u" && typeof document < "u";
440
440
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
441
- const Pt = (e) => e != null, Ot = Object.prototype.toString, Je = (e) => Ot.call(e) === "[object Object]", U = () => {
442
- }, Ee = /* @__PURE__ */ Lt();
443
- function Lt() {
441
+ const Lt = (e) => e != null, Dt = Object.prototype.toString, Ke = (e) => Dt.call(e) === "[object Object]", U = () => {
442
+ }, ke = /* @__PURE__ */ Wt();
443
+ function Wt() {
444
444
  var e, t;
445
- return he && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
445
+ return we && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
446
446
  }
447
- function Dt(e) {
448
- return Ie();
447
+ function Ht(e) {
448
+ return pe();
449
449
  }
450
- function q(e) {
450
+ function J(e) {
451
451
  return Array.isArray(e) ? e : [e];
452
452
  }
453
- function Ht(...e) {
453
+ function zt(...e) {
454
454
  if (e.length !== 1)
455
- return it(...e);
455
+ return ct(...e);
456
456
  const t = e[0];
457
- return typeof t == "function" ? ut(Ye(() => ({ get: t, set: U }))) : P(t);
457
+ return typeof t == "function" ? dt(Qe(() => ({ get: t, set: U }))) : O(t);
458
458
  }
459
- function Wt(e, t = {}) {
460
- if (!st(e))
461
- return rt(e);
459
+ function Bt(e, t = {}) {
460
+ if (!it(e))
461
+ return ut(e);
462
462
  const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
463
463
  for (const o in e.value)
464
- n[o] = Ye(() => ({
464
+ n[o] = Qe(() => ({
465
465
  get() {
466
466
  return e.value[o];
467
467
  },
468
- set(u) {
468
+ set(i) {
469
469
  var c;
470
470
  if ((c = E(t.replaceRef)) != null ? c : !0)
471
471
  if (Array.isArray(e.value)) {
472
472
  const a = [...e.value];
473
- a[o] = u, e.value = a;
473
+ a[o] = i, e.value = a;
474
474
  } else {
475
- const a = { ...e.value, [o]: u };
475
+ const a = { ...e.value, [o]: i };
476
476
  Object.setPrototypeOf(a, Object.getPrototypeOf(e.value)), e.value = a;
477
477
  }
478
478
  else
479
- e.value[o] = u;
479
+ e.value[o] = i;
480
480
  }
481
481
  }));
482
482
  return n;
483
483
  }
484
- function Bt(e, t = !0, n) {
485
- Dt() ? ne(e, n) : t ? e() : Ue(e);
484
+ function Xt(e, t = !0, n) {
485
+ Ht() ? Q(e, n) : t ? e() : Je(e);
486
486
  }
487
- function Qe(e, t, n) {
488
- return X(
487
+ function _e(e, t, n) {
488
+ return B(
489
489
  e,
490
490
  t,
491
491
  {
@@ -494,37 +494,37 @@ function Qe(e, t, n) {
494
494
  }
495
495
  );
496
496
  }
497
- const pe = he ? window : void 0;
498
- function te(e) {
497
+ const ye = we ? window : void 0;
498
+ function ne(e) {
499
499
  var t;
500
500
  const n = E(e);
501
501
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
502
502
  }
503
- function ue(...e) {
503
+ function ce(...e) {
504
504
  const t = [], n = () => {
505
505
  t.forEach((a) => a()), t.length = 0;
506
- }, o = (a, i, r, s) => (a.addEventListener(i, r, s), () => a.removeEventListener(i, r, s)), u = k(() => {
507
- const a = q(E(e[0])).filter((i) => i != null);
508
- return a.every((i) => typeof i != "string") ? a : void 0;
509
- }), c = Qe(
506
+ }, o = (a, u, r, s) => (a.addEventListener(u, r, s), () => a.removeEventListener(u, r, s)), i = I(() => {
507
+ const a = J(E(e[0])).filter((u) => u != null);
508
+ return a.every((u) => typeof u != "string") ? a : void 0;
509
+ }), c = _e(
510
510
  () => {
511
- var a, i;
511
+ var a, u;
512
512
  return [
513
- (i = (a = u.value) == null ? void 0 : a.map((r) => te(r))) != null ? i : [pe].filter((r) => r != null),
514
- q(E(u.value ? e[1] : e[0])),
515
- q(b(u.value ? e[2] : e[1])),
513
+ (u = (a = i.value) == null ? void 0 : a.map((r) => ne(r))) != null ? u : [ye].filter((r) => r != null),
514
+ J(E(i.value ? e[1] : e[0])),
515
+ J(b(i.value ? e[2] : e[1])),
516
516
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
517
- E(u.value ? e[3] : e[2])
517
+ E(i.value ? e[3] : e[2])
518
518
  ];
519
519
  },
520
- ([a, i, r, s]) => {
521
- if (n(), !(a != null && a.length) || !(i != null && i.length) || !(r != null && r.length))
520
+ ([a, u, r, s]) => {
521
+ if (n(), !(a != null && a.length) || !(u != null && u.length) || !(r != null && r.length))
522
522
  return;
523
- const g = Je(s) ? { ...s } : s;
523
+ const v = Ke(s) ? { ...s } : s;
524
524
  t.push(
525
525
  ...a.flatMap(
526
- (m) => i.flatMap(
527
- (w) => r.map((v) => o(m, w, v, g))
526
+ (m) => u.flatMap(
527
+ (y) => r.map((h) => o(m, y, h, v))
528
528
  )
529
529
  )
530
530
  );
@@ -533,123 +533,123 @@ function ue(...e) {
533
533
  ), l = () => {
534
534
  c(), n();
535
535
  };
536
- return de(n), l;
536
+ return le(n), l;
537
537
  }
538
- function Xt() {
539
- const e = H(!1), t = Ie();
540
- return t && ne(() => {
538
+ function Nt() {
539
+ const e = H(!1), t = pe();
540
+ return t && Q(() => {
541
541
  e.value = !0;
542
542
  }, t), e;
543
543
  }
544
- function Ze(e) {
545
- const t = Xt();
546
- return k(() => (t.value, !!e()));
544
+ function et(e) {
545
+ const t = Nt();
546
+ return I(() => (t.value, !!e()));
547
547
  }
548
- function Ke(e, t, n = {}) {
549
- const { window: o = pe, ...u } = n;
548
+ function tt(e, t, n = {}) {
549
+ const { window: o = ye, ...i } = n;
550
550
  let c;
551
- const l = Ze(() => o && "MutationObserver" in o), a = () => {
551
+ const l = et(() => o && "MutationObserver" in o), a = () => {
552
552
  c && (c.disconnect(), c = void 0);
553
- }, i = k(() => {
554
- const m = E(e), w = q(m).map(te).filter(Pt);
555
- return new Set(w);
556
- }), r = X(
557
- () => i.value,
553
+ }, u = I(() => {
554
+ const m = E(e), y = J(m).map(ne).filter(Lt);
555
+ return new Set(y);
556
+ }), r = B(
557
+ () => u.value,
558
558
  (m) => {
559
- a(), l.value && m.size && (c = new MutationObserver(t), m.forEach((w) => c.observe(w, u)));
559
+ a(), l.value && m.size && (c = new MutationObserver(t), m.forEach((y) => c.observe(y, i)));
560
560
  },
561
561
  { immediate: !0, flush: "post" }
562
- ), s = () => c == null ? void 0 : c.takeRecords(), g = () => {
562
+ ), s = () => c == null ? void 0 : c.takeRecords(), v = () => {
563
563
  r(), a();
564
564
  };
565
- return de(g), {
565
+ return le(v), {
566
566
  isSupported: l,
567
- stop: g,
567
+ stop: v,
568
568
  takeRecords: s
569
569
  };
570
570
  }
571
- function we(e, t = {}) {
571
+ function xe(e, t = {}) {
572
572
  var n;
573
573
  const {
574
574
  pointerTypes: o,
575
- preventDefault: u,
575
+ preventDefault: i,
576
576
  stopPropagation: c,
577
577
  exact: l,
578
578
  onMove: a,
579
- onEnd: i,
579
+ onEnd: u,
580
580
  onStart: r,
581
581
  initialValue: s,
582
- axis: g = "both",
583
- draggingElement: m = pe,
584
- containerElement: w,
585
- handle: v = e,
582
+ axis: v = "both",
583
+ draggingElement: m = ye,
584
+ containerElement: y,
585
+ handle: h = e,
586
586
  buttons: x = [0]
587
- } = t, f = P(
587
+ } = t, f = O(
588
588
  (n = E(s)) != null ? n : { x: 0, y: 0 }
589
- ), d = P(), p = (C) => o ? o.includes(C.pointerType) : !0, M = (C) => {
590
- E(u) && C.preventDefault(), E(c) && C.stopPropagation();
589
+ ), d = O(), p = (C) => o ? o.includes(C.pointerType) : !0, S = (C) => {
590
+ E(i) && C.preventDefault(), E(c) && C.stopPropagation();
591
591
  }, $ = (C) => {
592
- var A;
592
+ var T;
593
593
  if (!E(x).includes(C.button) || E(t.disabled) || !p(C) || E(l) && C.target !== E(e))
594
594
  return;
595
- const B = E(w), F = (A = B == null ? void 0 : B.getBoundingClientRect) == null ? void 0 : A.call(B), V = E(e).getBoundingClientRect(), h = {
596
- x: C.clientX - (B ? V.left - F.left + B.scrollLeft : V.left),
597
- y: C.clientY - (B ? V.top - F.top + B.scrollTop : V.top)
595
+ const W = E(y), F = (T = W == null ? void 0 : W.getBoundingClientRect) == null ? void 0 : T.call(W), X = E(e).getBoundingClientRect(), be = {
596
+ x: C.clientX - (W ? X.left - F.left + W.scrollLeft : X.left),
597
+ y: C.clientY - (W ? X.top - F.top + W.scrollTop : X.top)
598
598
  };
599
- (r == null ? void 0 : r(h, C)) !== !1 && (d.value = h, M(C));
600
- }, I = (C) => {
599
+ (r == null ? void 0 : r(be, C)) !== !1 && (d.value = be, S(C));
600
+ }, k = (C) => {
601
601
  if (E(t.disabled) || !p(C) || !d.value)
602
602
  return;
603
- const A = E(w), B = E(e).getBoundingClientRect();
604
- let { x: F, y: V } = f.value;
605
- (g === "x" || g === "both") && (F = C.clientX - d.value.x, A && (F = Math.min(Math.max(0, F), A.scrollWidth - B.width))), (g === "y" || g === "both") && (V = C.clientY - d.value.y, A && (V = Math.min(Math.max(0, V), A.scrollHeight - B.height))), f.value = {
603
+ const T = E(y), W = E(e).getBoundingClientRect();
604
+ let { x: F, y: X } = f.value;
605
+ (v === "x" || v === "both") && (F = C.clientX - d.value.x, T && (F = Math.min(Math.max(0, F), T.scrollWidth - W.width))), (v === "y" || v === "both") && (X = C.clientY - d.value.y, T && (X = Math.min(Math.max(0, X), T.scrollHeight - W.height))), f.value = {
606
606
  x: F,
607
- y: V
608
- }, a == null || a(f.value, C), M(C);
609
- }, Q = (C) => {
610
- E(t.disabled) || !p(C) || d.value && (d.value = void 0, i == null || i(f.value, C), M(C));
607
+ y: X
608
+ }, a == null || a(f.value, C), S(C);
609
+ }, se = (C) => {
610
+ E(t.disabled) || !p(C) || d.value && (d.value = void 0, u == null || u(f.value, C), S(C));
611
611
  };
612
- if (he) {
612
+ if (we) {
613
613
  const C = () => {
614
- var A;
614
+ var T;
615
615
  return {
616
- capture: (A = t.capture) != null ? A : !0,
617
- passive: !E(u)
616
+ capture: (T = t.capture) != null ? T : !0,
617
+ passive: !E(i)
618
618
  };
619
619
  };
620
- ue(v, "pointerdown", $, C), ue(m, "pointermove", I, C), ue(m, "pointerup", Q, C);
620
+ ce(h, "pointerdown", $, C), ce(m, "pointermove", k, C), ce(m, "pointerup", se, C);
621
621
  }
622
622
  return {
623
- ...Wt(f),
623
+ ...Bt(f),
624
624
  position: f,
625
- isDragging: k(() => !!d.value),
626
- style: k(
625
+ isDragging: I(() => !!d.value),
626
+ style: I(
627
627
  () => `left:${f.value.x}px;top:${f.value.y}px;`
628
628
  )
629
629
  };
630
630
  }
631
631
  function Vt(e, t, n = {}) {
632
- const { window: o = pe, ...u } = n;
632
+ const { window: o = ye, ...i } = n;
633
633
  let c;
634
- const l = Ze(() => o && "ResizeObserver" in o), a = () => {
634
+ const l = et(() => o && "ResizeObserver" in o), a = () => {
635
635
  c && (c.disconnect(), c = void 0);
636
- }, i = k(() => {
637
- const g = E(e);
638
- return Array.isArray(g) ? g.map((m) => te(m)) : [te(g)];
639
- }), r = X(
640
- i,
641
- (g) => {
636
+ }, u = I(() => {
637
+ const v = E(e);
638
+ return Array.isArray(v) ? v.map((m) => ne(m)) : [ne(v)];
639
+ }), r = B(
640
+ u,
641
+ (v) => {
642
642
  if (a(), l.value && o) {
643
643
  c = new ResizeObserver(t);
644
- for (const m of g)
645
- m && c.observe(m, u);
644
+ for (const m of v)
645
+ m && c.observe(m, i);
646
646
  }
647
647
  },
648
648
  { immediate: !0, flush: "post" }
649
649
  ), s = () => {
650
650
  a(), r();
651
651
  };
652
- return de(s), {
652
+ return le(s), {
653
653
  isSupported: l,
654
654
  stop: s
655
655
  };
@@ -658,42 +658,42 @@ function ge(e, t = {}) {
658
658
  const {
659
659
  reset: n = !0,
660
660
  windowResize: o = !0,
661
- windowScroll: u = !0,
661
+ windowScroll: i = !0,
662
662
  immediate: c = !0,
663
663
  updateTiming: l = "sync"
664
- } = t, a = H(0), i = H(0), r = H(0), s = H(0), g = H(0), m = H(0), w = H(0), v = H(0);
664
+ } = t, a = H(0), u = H(0), r = H(0), s = H(0), v = H(0), m = H(0), y = H(0), h = H(0);
665
665
  function x() {
666
- const d = te(e);
666
+ const d = ne(e);
667
667
  if (!d) {
668
- n && (a.value = 0, i.value = 0, r.value = 0, s.value = 0, g.value = 0, m.value = 0, w.value = 0, v.value = 0);
668
+ n && (a.value = 0, u.value = 0, r.value = 0, s.value = 0, v.value = 0, m.value = 0, y.value = 0, h.value = 0);
669
669
  return;
670
670
  }
671
671
  const p = d.getBoundingClientRect();
672
- a.value = p.height, i.value = p.bottom, r.value = p.left, s.value = p.right, g.value = p.top, m.value = p.width, w.value = p.x, v.value = p.y;
672
+ a.value = p.height, u.value = p.bottom, r.value = p.left, s.value = p.right, v.value = p.top, m.value = p.width, y.value = p.x, h.value = p.y;
673
673
  }
674
674
  function f() {
675
675
  l === "sync" ? x() : l === "next-frame" && requestAnimationFrame(() => x());
676
676
  }
677
- return Vt(e, f), X(() => te(e), (d) => !d && f()), Ke(e, f, {
677
+ return Vt(e, f), B(() => ne(e), (d) => !d && f()), tt(e, f, {
678
678
  attributeFilter: ["style", "class"]
679
- }), u && ue("scroll", f, { capture: !0, passive: !0 }), o && ue("resize", f, { passive: !0 }), Bt(() => {
679
+ }), i && ce("scroll", f, { capture: !0, passive: !0 }), o && ce("resize", f, { passive: !0 }), Xt(() => {
680
680
  c && f();
681
681
  }), {
682
682
  height: a,
683
- bottom: i,
683
+ bottom: u,
684
684
  left: r,
685
685
  right: s,
686
- top: g,
686
+ top: v,
687
687
  width: m,
688
- x: w,
689
- y: v,
688
+ x: y,
689
+ y: h,
690
690
  update: f
691
691
  };
692
692
  }
693
- const Nt = (e) => {
693
+ const Gt = (e) => {
694
694
  const t = new DOMParser().parseFromString(e, "text/html");
695
695
  return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
696
- }, Gt = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), zt = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Ft = ["innerHTML"], jt = { key: 2 }, Ut = /* @__PURE__ */ J({
696
+ }, Ft = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), jt = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Ut = ["innerHTML"], Yt = { key: 2 }, qt = /* @__PURE__ */ Z({
697
697
  __name: "ACell",
698
698
  props: {
699
699
  colIndex: {},
@@ -704,31 +704,31 @@ const Nt = (e) => {
704
704
  pinned: { type: Boolean, default: !1 }
705
705
  },
706
706
  setup(e, { expose: t }) {
707
- const n = N("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), u = P(""), c = P(!1), l = e.store.columns[e.colIndex], a = e.store.rows[e.rowIndex], i = l.align || "center", r = l.width || "40ch", s = k(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), g = k(() => typeof s.value == "string" ? Nt(s.value) : !1), m = k(() => {
707
+ const n = N("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), i = O(""), c = O(!1), l = e.store.columns[e.colIndex], a = e.store.rows[e.rowIndex], u = l.align || "center", r = l.width || "40ch", s = I(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), v = I(() => typeof s.value == "string" ? Gt(s.value) : !1), m = I(() => {
708
708
  var d;
709
709
  return {
710
- textAlign: i,
710
+ textAlign: u,
711
711
  width: r,
712
712
  fontWeight: c.value ? "bold" : "inherit",
713
713
  paddingLeft: e.store.getIndent(e.colIndex, (d = e.store.display[e.rowIndex]) == null ? void 0 : d.indent)
714
714
  };
715
- }), w = k(() => ({
715
+ }), y = I(() => ({
716
716
  "sticky-column": e.pinned,
717
717
  "cell-modified": c.value
718
- })), v = () => {
719
- const { left: d, bottom: p, width: M, height: $ } = ge(n);
720
- l.mask, l.modalComponent && e.store.$patch((I) => {
721
- I.modal.visible = !0, I.modal.colIndex = e.colIndex, I.modal.rowIndex = e.rowIndex, I.modal.left = d, I.modal.bottom = p, I.modal.width = M, I.modal.height = $, I.modal.cell = n.value, typeof l.modalComponent == "function" ? I.modal.component = l.modalComponent({ table: I.table, row: a, column: l }) : I.modal.component = l.modalComponent, I.modal.componentProps = l.modalComponentExtraProps;
718
+ })), h = () => {
719
+ const { left: d, bottom: p, width: S, height: $ } = ge(n);
720
+ l.mask, l.modalComponent && e.store.$patch((k) => {
721
+ k.modal.visible = !0, k.modal.colIndex = e.colIndex, k.modal.rowIndex = e.rowIndex, k.modal.left = d, k.modal.bottom = p, k.modal.width = S, k.modal.height = $, k.modal.cell = n.value, typeof l.modalComponent == "function" ? k.modal.component = l.modalComponent({ table: k.table, row: a, column: l }) : k.modal.component = l.modalComponent, k.modal.componentProps = l.modalComponentExtraProps;
722
722
  });
723
723
  };
724
724
  if (e.addNavigation) {
725
725
  let d = {
726
- ...Re,
727
- "keydown.f2": v,
728
- "keydown.alt.up": v,
729
- "keydown.alt.down": v,
730
- "keydown.alt.left": v,
731
- "keydown.alt.right": v
726
+ ...Oe,
727
+ "keydown.f2": h,
728
+ "keydown.alt.up": h,
729
+ "keydown.alt.down": h,
730
+ "keydown.alt.left": h,
731
+ "keydown.alt.right": h
732
732
  };
733
733
  typeof e.addNavigation == "object" && (d = {
734
734
  ...d,
@@ -741,14 +741,14 @@ const Nt = (e) => {
741
741
  ]);
742
742
  }
743
743
  const x = () => {
744
- n.value && (u.value = n.value.textContent);
744
+ n.value && (i.value = n.value.textContent);
745
745
  }, f = (d) => {
746
746
  const p = d.target;
747
- p.textContent !== u.value && (u.value = p.textContent, l.format ? (c.value = p.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, p.textContent)) : (c.value = p.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, p.textContent)));
747
+ p.textContent !== i.value && (i.value = p.textContent, l.format ? (c.value = p.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, p.textContent)) : (c.value = p.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, p.textContent)));
748
748
  };
749
749
  return t({
750
- currentData: u
751
- }), (d, p) => (S(), R("td", {
750
+ currentData: i
751
+ }), (d, p) => (M(), R("td", {
752
752
  ref: "cell",
753
753
  "data-colindex": d.colIndex,
754
754
  "data-rowindex": d.rowIndex,
@@ -756,23 +756,23 @@ const Nt = (e) => {
756
756
  contenteditable: b(l).edit,
757
757
  tabindex: d.tabIndex,
758
758
  spellcheck: !1,
759
- style: Y(m.value),
759
+ style: q(m.value),
760
760
  onFocus: x,
761
761
  onPaste: f,
762
762
  onInput: f,
763
- onClick: v,
764
- class: j(["atable-cell", w.value])
763
+ onClick: h,
764
+ class: j(["atable-cell", y.value])
765
765
  }, [
766
- b(l).cellComponent ? (S(), se(ve(b(l).cellComponent), ke({
766
+ b(l).cellComponent ? (M(), ie(ve(b(l).cellComponent), Se({
767
767
  key: 0,
768
768
  value: s.value
769
- }, b(l).cellComponentProps), null, 16, ["value"])) : g.value ? (S(), R("span", {
769
+ }, b(l).cellComponentProps), null, 16, ["value"])) : v.value ? (M(), R("span", {
770
770
  key: 1,
771
771
  innerHTML: s.value
772
- }, null, 8, Ft)) : (S(), R("span", jt, K(s.value), 1))
773
- ], 46, zt));
772
+ }, null, 8, Ut)) : (M(), R("span", Yt, _(s.value), 1))
773
+ ], 46, jt));
774
774
  }
775
- }), Yt = ["tabindex"], qt = ["tabindex"], Jt = ["colspan"], Qt = /* @__PURE__ */ J({
775
+ }), Jt = ["tabindex"], Qt = ["tabindex"], Zt = ["colspan"], Kt = /* @__PURE__ */ Z({
776
776
  __name: "AExpansionRow",
777
777
  props: {
778
778
  rowIndex: {},
@@ -781,11 +781,11 @@ const Nt = (e) => {
781
781
  addNavigation: { type: [Boolean, Object] }
782
782
  },
783
783
  setup(e) {
784
- const t = N("rowEl"), n = k(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
784
+ const t = N("rowEl"), n = I(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
785
785
  if (e.addNavigation) {
786
786
  const o = {
787
- "keydown.control.g": (u) => {
788
- u.stopPropagation(), u.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
787
+ "keydown.control.g": (i) => {
788
+ i.stopPropagation(), i.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
789
789
  }
790
790
  };
791
791
  typeof e.addNavigation == "object" && Object.assign(o, e.addNavigation), Pe([
@@ -795,20 +795,20 @@ const Nt = (e) => {
795
795
  }
796
796
  ]);
797
797
  }
798
- return (o, u) => (S(), R(ie, null, [
799
- L("tr", ke(o.$attrs, {
798
+ return (o, i) => (M(), R(ue, null, [
799
+ L("tr", Se(o.$attrs, {
800
800
  ref: "rowEl",
801
801
  tabindex: o.tabIndex,
802
802
  class: "expandable-row"
803
803
  }), [
804
804
  L("td", {
805
805
  tabIndex: -1,
806
- onClick: u[0] || (u[0] = (c) => o.store.toggleRowExpand(o.rowIndex)),
806
+ onClick: i[0] || (i[0] = (c) => o.store.toggleRowExpand(o.rowIndex)),
807
807
  class: "row-index"
808
- }, K(n.value), 1),
809
- W(o.$slots, "row", {}, void 0, !0)
810
- ], 16, Yt),
811
- o.store.display[o.rowIndex].expanded ? (S(), R("tr", {
808
+ }, _(n.value), 1),
809
+ z(o.$slots, "row", {}, void 0, !0)
810
+ ], 16, Jt),
811
+ o.store.display[o.rowIndex].expanded ? (M(), R("tr", {
812
812
  key: 0,
813
813
  ref: "rowExpanded",
814
814
  tabindex: o.tabIndex,
@@ -819,23 +819,23 @@ const Nt = (e) => {
819
819
  colspan: o.store.columns.length + 1,
820
820
  class: "expanded-row-content"
821
821
  }, [
822
- W(o.$slots, "content", {}, void 0, !0)
823
- ], 8, Jt)
824
- ], 8, qt)) : _("", !0)
822
+ z(o.$slots, "content", {}, void 0, !0)
823
+ ], 8, Zt)
824
+ ], 8, Qt)) : ee("", !0)
825
825
  ], 64));
826
826
  }
827
- }), le = (e, t) => {
827
+ }), ae = (e, t) => {
828
828
  const n = e.__vccOpts || e;
829
- for (const [o, u] of t)
830
- n[o] = u;
829
+ for (const [o, i] of t)
830
+ n[o] = i;
831
831
  return n;
832
- }, Zt = /* @__PURE__ */ le(Qt, [["__scopeId", "data-v-5ad4bb41"]]), Kt = ["colspan"], _t = {
832
+ }, _t = /* @__PURE__ */ ae(Kt, [["__scopeId", "data-v-5ad4bb41"]]), en = ["colspan"], tn = {
833
833
  ref: "container",
834
834
  class: "gantt-handler"
835
- }, en = {
835
+ }, nn = {
836
836
  key: 0,
837
837
  class: "gantt-label"
838
- }, tn = /* @__PURE__ */ J({
838
+ }, on = /* @__PURE__ */ Z({
839
839
  __name: "AGanttCell",
840
840
  props: {
841
841
  store: {},
@@ -849,141 +849,141 @@ const Nt = (e) => {
849
849
  color: {}
850
850
  },
851
851
  setup(e) {
852
- ct((d) => ({
852
+ ft((d) => ({
853
853
  "78862e08": t.value,
854
854
  "18ad7d98": d.colspan
855
855
  }));
856
- const t = P();
857
- ne(() => {
856
+ const t = O();
857
+ Q(() => {
858
858
  !e.color || e.color == "" || e.color.length < 6 ? t.value = "#cccccc" : t.value = e.color;
859
859
  });
860
- const n = N("container"), o = N("bar"), u = N("leftHandle"), c = N("rightHandle"), { width: l } = ge(n), { left: a, right: i } = ge(o), r = P(e.start || 0), s = P(e.end || r.value + e.colspan), g = P({ startX: 0, startPos: 0 }), m = k(() => e.colspan > 0 ? l.value / e.colspan : 0), w = k(() => {
860
+ const n = N("container"), o = N("bar"), i = N("leftHandle"), c = N("rightHandle"), { width: l } = ge(n), { left: a, right: u } = ge(o), r = O(e.start || 0), s = O(e.end || r.value + e.colspan), v = O({ startX: 0, startPos: 0 }), m = I(() => e.colspan > 0 ? l.value / e.colspan : 0), y = I(() => {
861
861
  const d = r.value / e.colspan * 100, p = s.value / e.colspan * 100;
862
862
  return {
863
863
  left: `${d}%`,
864
864
  width: `${p - d}%`,
865
865
  backgroundColor: t.value
866
866
  };
867
- }), { isDragging: v } = we(u, {
867
+ }), { isDragging: h } = xe(i, {
868
868
  axis: "x",
869
869
  onStart: () => {
870
- o.value && (o.value.style.transition = "none"), g.value = {
870
+ o.value && (o.value.style.transition = "none"), v.value = {
871
871
  startX: a.value,
872
872
  startPos: r.value
873
873
  };
874
874
  },
875
875
  onMove: ({ x: d }) => {
876
- if (v.value && o.value) {
877
- const M = (d - g.value.startX) / m.value, $ = Math.max(0, Math.min(s.value - 1, g.value.startPos + M));
876
+ if (h.value && o.value) {
877
+ const S = (d - v.value.startX) / m.value, $ = Math.max(0, Math.min(s.value - 1, v.value.startPos + S));
878
878
  o.value.style.left = `${$ / e.colspan * 100}%`, o.value.style.width = `${(s.value - $) / e.colspan * 100}%`;
879
879
  }
880
880
  },
881
881
  onEnd: ({ x: d }) => {
882
882
  if (o.value) {
883
- const p = d - g.value.startX, M = Math.round(p / m.value), $ = r.value, I = Math.max(0, Math.min(s.value - 1, g.value.startPos + M));
884
- r.value = I, e.store.updateGanttBar({
883
+ const p = d - v.value.startX, S = Math.round(p / m.value), $ = r.value, k = Math.max(0, Math.min(s.value - 1, v.value.startPos + S));
884
+ r.value = k, e.store.updateGanttBar({
885
885
  rowIndex: e.rowIndex,
886
886
  colIndex: e.colIndex,
887
887
  type: "resize",
888
888
  edge: "start",
889
889
  oldStart: $,
890
- newStart: I,
890
+ newStart: k,
891
891
  end: s.value,
892
- delta: M,
892
+ delta: S,
893
893
  oldColspan: s.value - $,
894
- newColspan: s.value - I
894
+ newColspan: s.value - k
895
895
  });
896
896
  }
897
897
  }
898
- }), { isDragging: x } = we(c, {
898
+ }), { isDragging: x } = xe(c, {
899
899
  axis: "x",
900
900
  onStart: () => {
901
- o.value && (o.value.style.transition = "none"), g.value = {
902
- startX: i.value,
901
+ o.value && (o.value.style.transition = "none"), v.value = {
902
+ startX: u.value,
903
903
  startPos: s.value
904
904
  };
905
905
  },
906
906
  onMove: ({ x: d }) => {
907
907
  if (x.value && o.value) {
908
- const M = (d - g.value.startX) / m.value, $ = Math.max(
908
+ const S = (d - v.value.startX) / m.value, $ = Math.max(
909
909
  r.value + 1,
910
- Math.min(e.columnsCount, g.value.startPos + M)
910
+ Math.min(e.columnsCount, v.value.startPos + S)
911
911
  );
912
912
  o.value.style.width = `${($ - r.value) / e.colspan * 100}%`;
913
913
  }
914
914
  },
915
915
  onEnd: ({ x: d }) => {
916
916
  if (o.value) {
917
- const p = d - g.value.startX, M = Math.round(p / m.value), $ = s.value, I = Math.max(
917
+ const p = d - v.value.startX, S = Math.round(p / m.value), $ = s.value, k = Math.max(
918
918
  r.value + 1,
919
- Math.min(e.columnsCount, g.value.startPos + M)
919
+ Math.min(e.columnsCount, v.value.startPos + S)
920
920
  );
921
- s.value = I, e.store.updateGanttBar({
921
+ s.value = k, e.store.updateGanttBar({
922
922
  rowIndex: e.rowIndex,
923
923
  colIndex: e.colIndex,
924
924
  type: "resize",
925
925
  edge: "end",
926
926
  oldEnd: $,
927
- newEnd: I,
927
+ newEnd: k,
928
928
  start: r.value,
929
- delta: M,
929
+ delta: S,
930
930
  oldColspan: $ - r.value,
931
- newColspan: I - r.value
931
+ newColspan: k - r.value
932
932
  });
933
933
  }
934
934
  }
935
- }), { isDragging: f } = we(o, {
935
+ }), { isDragging: f } = xe(o, {
936
936
  exact: !0,
937
937
  // to avoid triggering when the left and right handles are being used
938
938
  axis: "x",
939
939
  onStart: () => {
940
- o.value && (o.value.style.transition = "none"), g.value = {
940
+ o.value && (o.value.style.transition = "none"), v.value = {
941
941
  startX: a.value,
942
942
  startPos: r.value
943
943
  };
944
944
  },
945
945
  onMove: ({ x: d }) => {
946
946
  if (f.value && o.value) {
947
- const M = (d - g.value.startX) / m.value, $ = s.value - r.value, I = Math.max(0, Math.min(g.value.startPos + M, e.columnsCount - $));
948
- o.value.style.left = `${I / e.colspan * 100}%`;
947
+ const S = (d - v.value.startX) / m.value, $ = s.value - r.value, k = Math.max(0, Math.min(v.value.startPos + S, e.columnsCount - $));
948
+ o.value.style.left = `${k / e.colspan * 100}%`;
949
949
  }
950
950
  },
951
951
  onEnd: ({ x: d }) => {
952
952
  if (o.value) {
953
- const p = d - g.value.startX, M = Math.round(p / m.value), $ = s.value - r.value, I = r.value, Q = s.value;
954
- let C = g.value.startPos + M, A = C + $;
955
- C < 0 ? (C = 0, A = $) : A > e.columnsCount && (A = e.columnsCount, C = A - $), r.value = C, s.value = A, e.store.updateGanttBar({
953
+ const p = d - v.value.startX, S = Math.round(p / m.value), $ = s.value - r.value, k = r.value, se = s.value;
954
+ let C = v.value.startPos + S, T = C + $;
955
+ C < 0 ? (C = 0, T = $) : T > e.columnsCount && (T = e.columnsCount, C = T - $), r.value = C, s.value = T, e.store.updateGanttBar({
956
956
  rowIndex: e.rowIndex,
957
957
  colIndex: e.colIndex,
958
958
  type: "bar",
959
- oldStart: I,
960
- oldEnd: Q,
959
+ oldStart: k,
960
+ oldEnd: se,
961
961
  newStart: C,
962
- newEnd: A,
963
- delta: M,
964
- colspan: A - C
962
+ newEnd: T,
963
+ delta: S,
964
+ colspan: T - C
965
965
  });
966
966
  }
967
967
  }
968
968
  });
969
- return (d, p) => (S(), R("td", {
969
+ return (d, p) => (M(), R("td", {
970
970
  class: "aganttcell",
971
971
  colspan: d.colspan
972
972
  }, [
973
- L("div", _t, [
973
+ L("div", tn, [
974
974
  L("div", {
975
975
  ref: "bar",
976
- class: j(["gantt-bar", { "is-dragging": b(f) || b(v) || b(x) }]),
977
- style: Y(w.value)
976
+ class: j(["gantt-bar", { "is-dragging": b(f) || b(h) || b(x) }]),
977
+ style: q(y.value)
978
978
  }, [
979
979
  L("div", {
980
980
  ref: "leftHandle",
981
- class: j(["gantt-handle left-handle", { "is-dragging": b(v) }])
981
+ class: j(["gantt-handle left-handle", { "is-dragging": b(h) }])
982
982
  }, p[0] || (p[0] = [
983
983
  L("div", { class: "handle-grip" }, null, -1),
984
984
  L("div", { class: "vertical-indicator left-indicator" }, null, -1)
985
985
  ]), 2),
986
- d.label ? (S(), R("label", en, K(d.label), 1)) : _("", !0),
986
+ d.label ? (M(), R("label", nn, _(d.label), 1)) : ee("", !0),
987
987
  L("div", {
988
988
  ref: "rightHandle",
989
989
  class: j(["gantt-handle right-handle", { "is-dragging": b(x) }])
@@ -993,9 +993,9 @@ const Nt = (e) => {
993
993
  ]), 2)
994
994
  ], 6)
995
995
  ], 512)
996
- ], 8, Kt));
996
+ ], 8, en));
997
997
  }
998
- }), nn = /* @__PURE__ */ le(tn, [["__scopeId", "data-v-a929e8e3"]]), on = ["tabindex"], ln = /* @__PURE__ */ J({
998
+ }), ln = /* @__PURE__ */ ae(on, [["__scopeId", "data-v-a929e8e3"]]), an = ["tabindex"], sn = /* @__PURE__ */ Z({
999
999
  __name: "ARow",
1000
1000
  props: {
1001
1001
  rowIndex: {},
@@ -1004,72 +1004,72 @@ const Nt = (e) => {
1004
1004
  addNavigation: { type: [Boolean, Object], default: !1 }
1005
1005
  },
1006
1006
  setup(e) {
1007
- const t = N("rowEl"), n = k(() => e.store.isRowVisible(e.rowIndex)), o = k(() => e.store.getRowExpandSymbol(e.rowIndex));
1007
+ const t = N("rowEl"), n = I(() => e.store.isRowVisible(e.rowIndex)), o = I(() => e.store.getRowExpandSymbol(e.rowIndex));
1008
1008
  if (e.addNavigation) {
1009
- let u = Re;
1010
- typeof e.addNavigation == "object" && (u = {
1011
- ...u,
1009
+ let i = Oe;
1010
+ typeof e.addNavigation == "object" && (i = {
1011
+ ...i,
1012
1012
  ...e.addNavigation
1013
1013
  }), Pe([
1014
1014
  {
1015
1015
  selectors: t,
1016
- handlers: u
1016
+ handlers: i
1017
1017
  }
1018
1018
  ]);
1019
1019
  }
1020
- return (u, c) => xe((S(), R("tr", {
1020
+ return (i, c) => he((M(), R("tr", {
1021
1021
  ref: "rowEl",
1022
- tabindex: u.tabIndex,
1022
+ tabindex: i.tabIndex,
1023
1023
  class: "atable-row"
1024
1024
  }, [
1025
- u.store.config.view !== "uncounted" ? W(u.$slots, "index", { key: 0 }, () => [
1026
- u.store.config.view === "list" ? (S(), R("td", {
1025
+ i.store.config.view !== "uncounted" ? z(i.$slots, "index", { key: 0 }, () => [
1026
+ i.store.config.view === "list" ? (M(), R("td", {
1027
1027
  key: 0,
1028
1028
  tabIndex: -1,
1029
- class: j(["list-index", u.store.hasPinnedColumns ? "sticky-index" : ""])
1030
- }, K(u.rowIndex + 1), 3)) : u.store.config.view === "tree" ? (S(), R("td", {
1029
+ class: j(["list-index", i.store.hasPinnedColumns ? "sticky-index" : ""])
1030
+ }, _(i.rowIndex + 1), 3)) : i.store.config.view === "tree" ? (M(), R("td", {
1031
1031
  key: 1,
1032
1032
  tabIndex: -1,
1033
- class: j(["tree-index", u.store.hasPinnedColumns ? "sticky-index" : ""]),
1034
- onClick: c[0] || (c[0] = (l) => u.store.toggleRowExpand(u.rowIndex))
1035
- }, K(o.value), 3)) : _("", !0)
1036
- ], !0) : _("", !0),
1037
- W(u.$slots, "default", {}, void 0, !0)
1038
- ], 8, on)), [
1039
- [qe, n.value]
1033
+ class: j(["tree-index", i.store.hasPinnedColumns ? "sticky-index" : ""]),
1034
+ onClick: c[0] || (c[0] = (l) => i.store.toggleRowExpand(i.rowIndex))
1035
+ }, _(o.value), 3)) : ee("", !0)
1036
+ ], !0) : ee("", !0),
1037
+ z(i.$slots, "default", {}, void 0, !0)
1038
+ ], 8, an)), [
1039
+ [Ze, n.value]
1040
1040
  ]);
1041
1041
  }
1042
- }), _e = /* @__PURE__ */ le(ln, [["__scopeId", "data-v-4cb4f254"]]), et = he ? window : void 0;
1043
- function re(e) {
1042
+ }), nt = /* @__PURE__ */ ae(sn, [["__scopeId", "data-v-4cb4f254"]]), Le = we ? window : void 0;
1043
+ function Y(e) {
1044
1044
  var t;
1045
1045
  const n = E(e);
1046
1046
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
1047
1047
  }
1048
- function Z(...e) {
1048
+ function K(...e) {
1049
1049
  const t = [], n = () => {
1050
1050
  t.forEach((a) => a()), t.length = 0;
1051
- }, o = (a, i, r, s) => (a.addEventListener(i, r, s), () => a.removeEventListener(i, r, s)), u = k(() => {
1052
- const a = q(E(e[0])).filter((i) => i != null);
1053
- return a.every((i) => typeof i != "string") ? a : void 0;
1054
- }), c = Qe(
1051
+ }, o = (a, u, r, s) => (a.addEventListener(u, r, s), () => a.removeEventListener(u, r, s)), i = I(() => {
1052
+ const a = J(E(e[0])).filter((u) => u != null);
1053
+ return a.every((u) => typeof u != "string") ? a : void 0;
1054
+ }), c = _e(
1055
1055
  () => {
1056
- var a, i;
1056
+ var a, u;
1057
1057
  return [
1058
- (i = (a = u.value) == null ? void 0 : a.map((r) => re(r))) != null ? i : [et].filter((r) => r != null),
1059
- q(E(u.value ? e[1] : e[0])),
1060
- q(b(u.value ? e[2] : e[1])),
1058
+ (u = (a = i.value) == null ? void 0 : a.map((r) => Y(r))) != null ? u : [Le].filter((r) => r != null),
1059
+ J(E(i.value ? e[1] : e[0])),
1060
+ J(b(i.value ? e[2] : e[1])),
1061
1061
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
1062
- E(u.value ? e[3] : e[2])
1062
+ E(i.value ? e[3] : e[2])
1063
1063
  ];
1064
1064
  },
1065
- ([a, i, r, s]) => {
1066
- if (n(), !(a != null && a.length) || !(i != null && i.length) || !(r != null && r.length))
1065
+ ([a, u, r, s]) => {
1066
+ if (n(), !(a != null && a.length) || !(u != null && u.length) || !(r != null && r.length))
1067
1067
  return;
1068
- const g = Je(s) ? { ...s } : s;
1068
+ const v = Ke(s) ? { ...s } : s;
1069
1069
  t.push(
1070
1070
  ...a.flatMap(
1071
- (m) => i.flatMap(
1072
- (w) => r.map((v) => o(m, w, v, g))
1071
+ (m) => u.flatMap(
1072
+ (y) => r.map((h) => o(m, y, h, v))
1073
1073
  )
1074
1074
  )
1075
1075
  );
@@ -1078,24 +1078,24 @@ function Z(...e) {
1078
1078
  ), l = () => {
1079
1079
  c(), n();
1080
1080
  };
1081
- return de(n), l;
1081
+ return le(n), l;
1082
1082
  }
1083
- let Ge = !1;
1084
- function ze(e, t, n = {}) {
1085
- const { window: o = et, ignore: u = [], capture: c = !0, detectIframe: l = !1, controls: a = !1 } = n;
1083
+ let Fe = !1;
1084
+ function je(e, t, n = {}) {
1085
+ const { window: o = Le, ignore: i = [], capture: c = !0, detectIframe: l = !1, controls: a = !1 } = n;
1086
1086
  if (!o)
1087
1087
  return a ? { stop: U, cancel: U, trigger: U } : U;
1088
- if (Ee && !Ge) {
1089
- Ge = !0;
1088
+ if (ke && !Fe) {
1089
+ Fe = !0;
1090
1090
  const f = { passive: !0 };
1091
- Array.from(o.document.body.children).forEach((d) => Z(d, "click", U, f)), Z(o.document.documentElement, "click", U, f);
1091
+ Array.from(o.document.body.children).forEach((d) => K(d, "click", U, f)), K(o.document.documentElement, "click", U, f);
1092
1092
  }
1093
- let i = !0;
1094
- const r = (f) => E(u).some((d) => {
1093
+ let u = !0;
1094
+ const r = (f) => E(i).some((d) => {
1095
1095
  if (typeof d == "string")
1096
1096
  return Array.from(o.document.querySelectorAll(d)).some((p) => p === f.target || f.composedPath().includes(p));
1097
1097
  {
1098
- const p = re(d);
1098
+ const p = Y(d);
1099
1099
  return p && (f.target === p || f.composedPath().includes(p));
1100
1100
  }
1101
1101
  });
@@ -1103,88 +1103,129 @@ function ze(e, t, n = {}) {
1103
1103
  const d = E(f);
1104
1104
  return d && d.$.subTree.shapeFlag === 16;
1105
1105
  }
1106
- function g(f, d) {
1107
- const p = E(f), M = p.$.subTree && p.$.subTree.children;
1108
- return M == null || !Array.isArray(M) ? !1 : M.some(($) => $.el === d.target || d.composedPath().includes($.el));
1106
+ function v(f, d) {
1107
+ const p = E(f), S = p.$.subTree && p.$.subTree.children;
1108
+ return S == null || !Array.isArray(S) ? !1 : S.some(($) => $.el === d.target || d.composedPath().includes($.el));
1109
1109
  }
1110
1110
  const m = (f) => {
1111
- const d = re(e);
1112
- if (f.target != null && !(!(d instanceof Element) && s(e) && g(e, f)) && !(!d || d === f.target || f.composedPath().includes(d))) {
1113
- if ("detail" in f && f.detail === 0 && (i = !r(f)), !i) {
1114
- i = !0;
1111
+ const d = Y(e);
1112
+ if (f.target != null && !(!(d instanceof Element) && s(e) && v(e, f)) && !(!d || d === f.target || f.composedPath().includes(d))) {
1113
+ if ("detail" in f && f.detail === 0 && (u = !r(f)), !u) {
1114
+ u = !0;
1115
1115
  return;
1116
1116
  }
1117
1117
  t(f);
1118
1118
  }
1119
1119
  };
1120
- let w = !1;
1121
- const v = [
1122
- Z(o, "click", (f) => {
1123
- w || (w = !0, setTimeout(() => {
1124
- w = !1;
1120
+ let y = !1;
1121
+ const h = [
1122
+ K(o, "click", (f) => {
1123
+ y || (y = !0, setTimeout(() => {
1124
+ y = !1;
1125
1125
  }, 0), m(f));
1126
1126
  }, { passive: !0, capture: c }),
1127
- Z(o, "pointerdown", (f) => {
1128
- const d = re(e);
1129
- i = !r(f) && !!(d && !f.composedPath().includes(d));
1127
+ K(o, "pointerdown", (f) => {
1128
+ const d = Y(e);
1129
+ u = !r(f) && !!(d && !f.composedPath().includes(d));
1130
1130
  }, { passive: !0 }),
1131
- l && Z(o, "blur", (f) => {
1131
+ l && K(o, "blur", (f) => {
1132
1132
  setTimeout(() => {
1133
1133
  var d;
1134
- const p = re(e);
1134
+ const p = Y(e);
1135
1135
  ((d = o.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !(p != null && p.contains(o.document.activeElement)) && t(f);
1136
1136
  }, 0);
1137
1137
  }, { passive: !0 })
1138
- ].filter(Boolean), x = () => v.forEach((f) => f());
1138
+ ].filter(Boolean), x = () => h.forEach((f) => f());
1139
1139
  return a ? {
1140
1140
  stop: x,
1141
1141
  cancel: () => {
1142
- i = !1;
1142
+ u = !1;
1143
1143
  },
1144
1144
  trigger: (f) => {
1145
- i = !0, m(f), i = !1;
1145
+ u = !0, m(f), u = !1;
1146
1146
  }
1147
1147
  } : x;
1148
1148
  }
1149
- const an = {
1149
+ const rn = {
1150
1150
  mounted(e, t) {
1151
1151
  const n = !t.modifiers.bubble;
1152
1152
  if (typeof t.value == "function")
1153
- e.__onClickOutside_stop = ze(e, t.value, { capture: n });
1153
+ e.__onClickOutside_stop = je(e, t.value, { capture: n });
1154
1154
  else {
1155
- const [o, u] = t.value;
1156
- e.__onClickOutside_stop = ze(e, o, Object.assign({ capture: n }, u));
1155
+ const [o, i] = t.value;
1156
+ e.__onClickOutside_stop = je(e, o, Object.assign({ capture: n }, i));
1157
1157
  }
1158
1158
  },
1159
1159
  unmounted(e) {
1160
1160
  e.__onClickOutside_stop();
1161
1161
  }
1162
1162
  };
1163
- function ye(e) {
1163
+ function un() {
1164
+ const e = H(!1), t = pe();
1165
+ return t && Q(() => {
1166
+ e.value = !0;
1167
+ }, t), e;
1168
+ }
1169
+ function cn(e) {
1170
+ const t = un();
1171
+ return I(() => (t.value, !!e()));
1172
+ }
1173
+ function Ue(e, t, n = {}) {
1174
+ const { window: o = Le, ...i } = n;
1175
+ let c;
1176
+ const l = cn(() => o && "ResizeObserver" in o), a = () => {
1177
+ c && (c.disconnect(), c = void 0);
1178
+ }, u = I(() => {
1179
+ const v = E(e);
1180
+ return Array.isArray(v) ? v.map((m) => Y(m)) : [Y(v)];
1181
+ }), r = B(
1182
+ u,
1183
+ (v) => {
1184
+ if (a(), l.value && o) {
1185
+ c = new ResizeObserver(t);
1186
+ for (const m of v)
1187
+ m && c.observe(m, i);
1188
+ }
1189
+ },
1190
+ { immediate: !0, flush: "post" }
1191
+ ), s = () => {
1192
+ a(), r();
1193
+ };
1194
+ return le(s), {
1195
+ isSupported: l,
1196
+ stop: s
1197
+ };
1198
+ }
1199
+ function Ce(e) {
1164
1200
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
1165
1201
  }
1166
- function tt(e) {
1202
+ const dn = {
1203
+ mounted(e, t) {
1204
+ typeof t.value == "function" ? Ue(e, t.value) : Ue(e, ...t.value);
1205
+ }
1206
+ };
1207
+ function ot(e) {
1167
1208
  const t = window.getComputedStyle(e);
1168
1209
  if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
1169
1210
  return !0;
1170
1211
  {
1171
1212
  const n = e.parentNode;
1172
- return !n || n.tagName === "BODY" ? !1 : tt(n);
1213
+ return !n || n.tagName === "BODY" ? !1 : ot(n);
1173
1214
  }
1174
1215
  }
1175
- function sn(e) {
1216
+ function fn(e) {
1176
1217
  const t = e || window.event, n = t.target;
1177
- return tt(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
1218
+ return ot(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
1178
1219
  }
1179
- const be = /* @__PURE__ */ new WeakMap();
1180
- function rn(e, t = !1) {
1181
- const n = P(t);
1182
- let o = null, u = "";
1183
- X(Ht(e), (a) => {
1184
- const i = ye(E(a));
1185
- if (i) {
1186
- const r = i;
1187
- if (be.get(r) || be.set(r, r.style.overflow), r.style.overflow !== "hidden" && (u = r.style.overflow), r.style.overflow === "hidden")
1220
+ const Ee = /* @__PURE__ */ new WeakMap();
1221
+ function vn(e, t = !1) {
1222
+ const n = O(t);
1223
+ let o = null, i = "";
1224
+ B(zt(e), (a) => {
1225
+ const u = Ce(E(a));
1226
+ if (u) {
1227
+ const r = u;
1228
+ if (Ee.get(r) || Ee.set(r, r.style.overflow), r.style.overflow !== "hidden" && (i = r.style.overflow), r.style.overflow === "hidden")
1188
1229
  return n.value = !0;
1189
1230
  if (n.value)
1190
1231
  return r.style.overflow = "hidden";
@@ -1193,20 +1234,20 @@ function rn(e, t = !1) {
1193
1234
  immediate: !0
1194
1235
  });
1195
1236
  const c = () => {
1196
- const a = ye(E(e));
1197
- !a || n.value || (Ee && (o = Z(
1237
+ const a = Ce(E(e));
1238
+ !a || n.value || (ke && (o = K(
1198
1239
  a,
1199
1240
  "touchmove",
1200
- (i) => {
1201
- sn(i);
1241
+ (u) => {
1242
+ fn(u);
1202
1243
  },
1203
1244
  { passive: !1 }
1204
1245
  )), a.style.overflow = "hidden", n.value = !0);
1205
1246
  }, l = () => {
1206
- const a = ye(E(e));
1207
- !a || !n.value || (Ee && (o == null || o()), a.style.overflow = u, be.delete(a), n.value = !1);
1247
+ const a = Ce(E(e));
1248
+ !a || !n.value || (ke && (o == null || o()), a.style.overflow = i, Ee.delete(a), n.value = !1);
1208
1249
  };
1209
- return de(l), k({
1250
+ return le(l), I({
1210
1251
  get() {
1211
1252
  return n.value;
1212
1253
  },
@@ -1215,142 +1256,164 @@ function rn(e, t = !1) {
1215
1256
  }
1216
1257
  });
1217
1258
  }
1218
- function un() {
1259
+ function mn() {
1219
1260
  let e = !1;
1220
1261
  const t = H(!1);
1221
1262
  return (n, o) => {
1222
1263
  if (t.value = o.value, e)
1223
1264
  return;
1224
1265
  e = !0;
1225
- const u = rn(n, o.value);
1226
- X(t, (c) => u.value = c);
1266
+ const i = vn(n, o.value);
1267
+ B(t, (c) => i.value = c);
1227
1268
  };
1228
1269
  }
1229
- un();
1230
- const cn = {
1231
- key: 0,
1232
- id: "resizable"
1233
- }, dn = {
1270
+ mn();
1271
+ const hn = { key: 0 }, gn = {
1234
1272
  class: "atable-header-row",
1235
1273
  tabindex: "-1"
1236
- }, nt = /* @__PURE__ */ J({
1274
+ }, pn = ["data-colindex"], lt = /* @__PURE__ */ Z({
1237
1275
  __name: "ATableHeader",
1238
1276
  props: {
1239
1277
  columns: {},
1240
1278
  store: {}
1241
1279
  },
1242
1280
  setup(e) {
1243
- return (t, n) => t.columns.length ? (S(), R("thead", cn, [
1244
- L("tr", dn, [
1245
- t.store.zeroColumn ? (S(), R("th", {
1281
+ const t = (n) => {
1282
+ var o;
1283
+ for (const i of n) {
1284
+ if (i.borderBoxSize.length === 0) continue;
1285
+ const l = i.borderBoxSize[0].inlineSize, a = Number(i.target.dataset.colindex), u = (o = e.store.columns[a]) == null ? void 0 : o.width;
1286
+ typeof u == "number" && u !== l && e.store.resizeColumn(a, l);
1287
+ }
1288
+ };
1289
+ return (n, o) => n.columns.length ? (M(), R("thead", hn, [
1290
+ L("tr", gn, [
1291
+ n.store.zeroColumn ? (M(), R("th", {
1246
1292
  key: 0,
1247
1293
  id: "header-index",
1248
1294
  class: j([[
1249
- t.store.hasPinnedColumns ? "sticky-index" : "",
1250
- t.store.config.view === "tree" ? "tree-index" : "",
1251
- t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1295
+ n.store.hasPinnedColumns ? "sticky-index" : "",
1296
+ n.store.config.view === "tree" ? "tree-index" : "",
1297
+ n.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1252
1298
  ], "list-index"])
1253
- }, null, 2)) : _("", !0),
1254
- (S(!0), R(ie, null, Ce(t.columns, (o, u) => (S(), R("th", {
1255
- key: o.name,
1299
+ }, null, 2)) : ee("", !0),
1300
+ (M(!0), R(ue, null, Ie(n.columns, (i, c) => he((M(), R("th", {
1301
+ key: i.name,
1302
+ "data-colindex": c,
1256
1303
  tabindex: "-1",
1257
- style: Y(t.store.getHeaderCellStyle(o)),
1258
- class: j(o.pinned ? "sticky-column" : "")
1304
+ style: q(n.store.getHeaderCellStyle(i)),
1305
+ class: j(i.pinned ? "sticky-column" : "")
1259
1306
  }, [
1260
- W(t.$slots, "default", {}, () => [
1261
- dt(K(o.label || String.fromCharCode(u + 97).toUpperCase()), 1)
1307
+ z(n.$slots, "default", {}, () => [
1308
+ vt(_(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)
1262
1309
  ])
1263
- ], 6))), 128))
1310
+ ], 14, pn)), [
1311
+ [b(dn), t]
1312
+ ])), 128))
1264
1313
  ])
1265
- ])) : _("", !0);
1314
+ ])) : ee("", !0);
1266
1315
  }
1267
- }), ot = /* @__PURE__ */ J({
1316
+ }), at = /* @__PURE__ */ Z({
1268
1317
  __name: "ATableModal",
1269
1318
  props: {
1270
1319
  store: {}
1271
1320
  },
1272
1321
  setup(e) {
1273
- const t = N("amodal"), { width: n, height: o } = ge(t), u = k(() => {
1274
- var g, m, w, v;
1322
+ const t = N("amodal"), { width: n, height: o } = ge(t), i = I(() => {
1323
+ var v, m, y, h;
1275
1324
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
1276
- const c = (g = e.store.modal.cell) == null ? void 0 : g.closest("table"), l = c.offsetHeight || 0, a = c.offsetWidth || 0;
1277
- let i = ((m = e.store.modal.cell) == null ? void 0 : m.offsetTop) || 0;
1278
- const r = ((w = c.querySelector("thead")) == null ? void 0 : w.offsetHeight) || 0;
1279
- i += r, i = i + o.value < l ? i : i - (o.value + e.store.modal.height);
1280
- let s = ((v = e.store.modal.cell) == null ? void 0 : v.offsetLeft) || 0;
1325
+ const c = (v = e.store.modal.cell) == null ? void 0 : v.closest("table"), l = c.offsetHeight || 0, a = c.offsetWidth || 0;
1326
+ let u = ((m = e.store.modal.cell) == null ? void 0 : m.offsetTop) || 0;
1327
+ const r = ((y = c.querySelector("thead")) == null ? void 0 : y.offsetHeight) || 0;
1328
+ u += r, u = u + o.value < l ? u : u - (o.value + e.store.modal.height);
1329
+ let s = ((h = e.store.modal.cell) == null ? void 0 : h.offsetLeft) || 0;
1281
1330
  return s = s + n.value <= a ? s : s - (n.value - e.store.modal.width), {
1282
1331
  left: `${s}px`,
1283
- top: `${i}px`
1332
+ top: `${u}px`
1284
1333
  };
1285
1334
  });
1286
- return (c, l) => (S(), R("div", {
1335
+ return (c, l) => (M(), R("div", {
1287
1336
  class: "amodal",
1288
1337
  ref: "amodal",
1289
1338
  tabindex: "-1",
1290
- onClick: l[0] || (l[0] = Oe(() => {
1339
+ onClick: l[0] || (l[0] = De(() => {
1291
1340
  }, ["stop"])),
1292
- onInput: l[1] || (l[1] = Oe(() => {
1341
+ onInput: l[1] || (l[1] = De(() => {
1293
1342
  }, ["stop"])),
1294
- style: Y(u.value)
1343
+ style: q(i.value)
1295
1344
  }, [
1296
- W(c.$slots, "default")
1345
+ z(c.$slots, "default")
1297
1346
  ], 36));
1298
1347
  }
1299
- }), fn = (e) => {
1300
- const t = e.id || Gt();
1301
- return ft(`table-${t}`, () => {
1348
+ }), wn = (e) => {
1349
+ const t = e.id || Ft();
1350
+ return mt(`table-${t}`, () => {
1302
1351
  const o = () => {
1303
- const h = {};
1304
- for (const [y, T] of c.value.entries())
1305
- for (const [O, D] of l.value.entries())
1306
- h[`${y}:${O}`] = D[T.name];
1307
- return h;
1308
- }, u = (h) => {
1309
- const y = [Object.assign({}, { rowModified: !1 })];
1310
- if (h && "0:0" in h)
1311
- return h;
1312
- const T = /* @__PURE__ */ new Set();
1313
- for (let O = l.value.length - 1; O >= 0; O--) {
1314
- const D = l.value[O];
1315
- D.parent && T.add(D.parent), y[O] = {
1352
+ const g = {};
1353
+ for (const [w, A] of c.value.entries())
1354
+ for (const [P, D] of l.value.entries())
1355
+ g[`${w}:${P}`] = D[A.name];
1356
+ return g;
1357
+ }, i = (g) => {
1358
+ const w = [Object.assign({}, { rowModified: !1 })];
1359
+ if (g && "0:0" in g)
1360
+ return g;
1361
+ const A = /* @__PURE__ */ new Set();
1362
+ for (let P = l.value.length - 1; P >= 0; P--) {
1363
+ const D = l.value[P];
1364
+ D.parent && A.add(D.parent), w[P] = {
1316
1365
  childrenOpen: !1,
1317
1366
  expanded: !1,
1318
1367
  indent: D.indent || 0,
1319
- isParent: T.has(O),
1368
+ isParent: A.has(P),
1320
1369
  isRoot: D.parent === null || D.parent === void 0,
1321
1370
  rowModified: !1,
1322
1371
  open: D.parent === null || D.parent === void 0,
1323
1372
  parent: D.parent
1324
1373
  };
1325
1374
  }
1326
- return y;
1327
- }, c = P(e.columns), l = P(e.rows), a = P(e.config || {}), i = P(e.table || o()), r = P(u(e.display)), s = P(e.modal || { visible: !1 }), g = P({}), m = k(() => c.value.some((h) => h.pinned)), w = k(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), v = k(
1375
+ return w;
1376
+ }, c = O(e.columns), l = O(e.rows), a = O(e.config || {}), u = O(e.table || o()), r = O(i(e.display)), s = O(e.modal || { visible: !1 }), v = O({}), m = I(() => c.value.some((g) => g.pinned)), y = I(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), h = I(
1328
1377
  () => a.value.view ? ["list", "tree", "list-expansion"].includes(a.value.view) : !1
1329
- ), x = (h, y) => i.value[`${h}:${y}`], f = (h, y, T) => {
1330
- const O = `${h}:${y}`, D = c.value[h];
1331
- i.value[O] !== T && (r.value[y].rowModified = !0), i.value[O] = T, l.value[y][D.name] = T;
1332
- }, d = (h, y, T) => {
1333
- const O = `${h}:${y}`;
1334
- i.value[O] !== T && (r.value[y].rowModified = !0, g.value[O] = T);
1335
- }, p = (h) => ({
1336
- minWidth: h.width || "40ch",
1337
- textAlign: h.align || "center",
1338
- width: a.value.fullWidth ? "auto" : void 0
1339
- }), M = (h) => {
1340
- const y = l.value[h];
1341
- return a.value.view === "gantt" && y.indent === 0;
1342
- }, $ = (h) => a.value.view !== "tree" || r.value[h].isRoot || r.value[h].open, I = (h) => a.value.view !== "tree" ? "" : r.value[h].isRoot || r.value[h].isParent ? r.value[h].childrenOpen ? "-" : "+" : "", Q = (h) => {
1378
+ ), x = (g, w) => u.value[`${g}:${w}`], f = (g, w, A) => {
1379
+ const P = `${g}:${w}`, D = c.value[g];
1380
+ u.value[P] !== A && (r.value[w].rowModified = !0), u.value[P] = A, l.value[w][D.name] = A;
1381
+ }, d = (g, w, A) => {
1382
+ const P = `${g}:${w}`;
1383
+ u.value[P] !== A && (r.value[w].rowModified = !0, v.value[P] = A);
1384
+ }, p = (g) => {
1385
+ const w = c.value.indexOf(g) === c.value.length - 1, A = a.value.fullWidth ? g.resizable && !w : g.resizable;
1386
+ return {
1387
+ width: g.width || "40ch",
1388
+ textAlign: g.align || "center",
1389
+ ...A && {
1390
+ resize: "horizontal",
1391
+ overflow: "hidden",
1392
+ whiteSpace: "nowrap"
1393
+ }
1394
+ };
1395
+ }, S = (g, w) => {
1396
+ if (g < 0 || g >= c.value.length) return;
1397
+ const P = Math.max(w, 40);
1398
+ c.value[g] = {
1399
+ ...c.value[g],
1400
+ width: `${P}px`
1401
+ };
1402
+ }, $ = (g) => {
1403
+ const w = l.value[g];
1404
+ return a.value.view === "gantt" && w.indent === 0;
1405
+ }, k = (g) => a.value.view !== "tree" || r.value[g].isRoot || r.value[g].open, se = (g) => a.value.view !== "tree" ? "" : r.value[g].isRoot || r.value[g].isParent ? r.value[g].childrenOpen ? "-" : "+" : "", C = (g) => {
1343
1406
  if (a.value.view === "tree") {
1344
- r.value[h].childrenOpen = !r.value[h].childrenOpen;
1345
- for (let y = l.value.length - 1; y >= 0; y--)
1346
- r.value[y].parent === h && (r.value[y].open = !r.value[y].open, r.value[y].childrenOpen && Q(y));
1347
- } else a.value.view === "list-expansion" && (r.value[h].expanded = !r.value[h].expanded);
1348
- }, C = (h, y) => {
1349
- const T = x(h, y);
1350
- return A(h, y, T);
1351
- }, A = (h, y, T) => {
1352
- const O = c.value[h], D = l.value[y], ae = O.format;
1353
- return ae ? typeof ae == "function" ? ae(T, { table: i.value, row: D, column: O }) : typeof ae == "string" ? Function(`"use strict";return (${ae})`)()(T, { table: i.value, row: D, column: O }) : T : T;
1407
+ r.value[g].childrenOpen = !r.value[g].childrenOpen;
1408
+ for (let w = l.value.length - 1; w >= 0; w--)
1409
+ r.value[w].parent === g && (r.value[w].open = !r.value[w].open, r.value[w].childrenOpen && C(w));
1410
+ } else a.value.view === "list-expansion" && (r.value[g].expanded = !r.value[g].expanded);
1411
+ }, T = (g, w) => {
1412
+ const A = x(g, w);
1413
+ return W(g, w, A);
1414
+ }, W = (g, w, A) => {
1415
+ const P = c.value[g], D = l.value[w], re = P.format;
1416
+ return re ? typeof re == "function" ? re(A, { table: u.value, row: D, column: P }) : typeof re == "string" ? Function(`"use strict";return (${re})`)()(A, { table: u.value, row: D, column: P }) : A : A;
1354
1417
  };
1355
1418
  return {
1356
1419
  // state
@@ -1359,36 +1422,37 @@ const cn = {
1359
1422
  display: r,
1360
1423
  modal: s,
1361
1424
  rows: l,
1362
- table: i,
1363
- updates: g,
1425
+ table: u,
1426
+ updates: v,
1364
1427
  // getters
1365
1428
  hasPinnedColumns: m,
1366
- numberedRowWidth: w,
1367
- zeroColumn: v,
1429
+ numberedRowWidth: y,
1430
+ zeroColumn: h,
1368
1431
  // actions
1369
- closeModal: (h) => {
1370
- var y;
1371
- h.target instanceof Node && (y = s.value.parent) != null && y.contains(h.target) || s.value.visible && (s.value.visible = !1);
1432
+ closeModal: (g) => {
1433
+ var w;
1434
+ g.target instanceof Node && (w = s.value.parent) != null && w.contains(g.target) || s.value.visible && (s.value.visible = !1);
1372
1435
  },
1373
1436
  getCellData: x,
1374
- getCellDisplayValue: C,
1375
- getFormattedValue: A,
1437
+ getCellDisplayValue: T,
1438
+ getFormattedValue: W,
1376
1439
  getHeaderCellStyle: p,
1377
- getIndent: (h, y) => y && h === 0 && y > 0 ? `${y}ch` : "inherit",
1378
- getRowExpandSymbol: I,
1379
- isRowGantt: M,
1380
- isRowVisible: $,
1440
+ resizeColumn: S,
1441
+ getIndent: (g, w) => w && g === 0 && w > 0 ? `${w}ch` : "inherit",
1442
+ getRowExpandSymbol: se,
1443
+ isRowGantt: $,
1444
+ isRowVisible: k,
1381
1445
  setCellData: f,
1382
1446
  setCellText: d,
1383
- toggleRowExpand: Q,
1384
- updateGanttBar: (h) => {
1385
- var T;
1386
- const y = (T = l.value[h.rowIndex]) == null ? void 0 : T.gantt;
1387
- y && (h.type === "resize" ? h.edge === "start" ? (y.startIndex = h.newStart, y.endIndex = h.end, y.colspan = y.endIndex - y.startIndex) : h.edge === "end" && (y.startIndex = h.start, y.endIndex = h.newEnd, y.colspan = y.endIndex - y.startIndex) : h.type === "bar" && (y.startIndex = h.newStart, y.endIndex = h.newEnd, y.colspan = y.endIndex - y.startIndex));
1447
+ toggleRowExpand: C,
1448
+ updateGanttBar: (g) => {
1449
+ var A;
1450
+ const w = (A = l.value[g.rowIndex]) == null ? void 0 : A.gantt;
1451
+ w && (g.type === "resize" ? g.edge === "start" ? (w.startIndex = g.newStart, w.endIndex = g.end, w.colspan = w.endIndex - w.startIndex) : g.edge === "end" && (w.startIndex = g.start, w.endIndex = g.newEnd, w.colspan = w.endIndex - w.startIndex) : g.type === "bar" && (w.startIndex = g.newStart, w.endIndex = g.newEnd, w.colspan = w.endIndex - w.startIndex));
1388
1452
  }
1389
1453
  };
1390
1454
  })();
1391
- }, vn = /* @__PURE__ */ J({
1455
+ }, yn = /* @__PURE__ */ Z({
1392
1456
  __name: "ATable",
1393
1457
  props: {
1394
1458
  id: {},
@@ -1399,39 +1463,39 @@ const cn = {
1399
1463
  },
1400
1464
  emits: ["update:modelValue", "cellUpdate", "gantt:drag"],
1401
1465
  setup(e, { expose: t, emit: n }) {
1402
- const o = n, u = N("table"), c = e.modelValue ? e.modelValue : e.rows, l = fn({ columns: e.columns, rows: c, id: e.id, config: e.config });
1403
- l.$onAction(({ name: s, store: g, args: m, after: w }) => {
1466
+ const o = n, i = N("table"), c = e.modelValue ? e.modelValue : e.rows, l = wn({ columns: e.columns, rows: c, id: e.id, config: e.config });
1467
+ l.$onAction(({ name: s, store: v, args: m, after: y }) => {
1404
1468
  if (s === "setCellData" || s === "setCellText") {
1405
- const [v, x, f] = m, d = g.getCellData(v, x);
1406
- w(() => {
1407
- o("cellUpdate", { colIndex: v, rowIndex: x, newValue: f, oldValue: d });
1469
+ const [h, x, f] = m, d = v.getCellData(h, x);
1470
+ y(() => {
1471
+ o("cellUpdate", { colIndex: h, rowIndex: x, newValue: f, oldValue: d });
1408
1472
  });
1409
1473
  } else if (s === "updateGanttBar") {
1410
- const [v] = m;
1474
+ const [h] = m;
1411
1475
  let x = !1;
1412
- v.type === "resize" ? x = v.oldColspan !== v.newColspan : v.type === "bar" && (x = v.oldStart !== v.newStart || v.oldEnd !== v.newEnd), x && w(() => {
1413
- o("gantt:drag", v);
1476
+ h.type === "resize" ? x = h.oldColspan !== h.newColspan : h.type === "bar" && (x = h.oldStart !== h.newStart || h.oldEnd !== h.newEnd), x && y(() => {
1477
+ o("gantt:drag", h);
1414
1478
  });
1415
1479
  }
1416
- }), X(
1480
+ }), B(
1417
1481
  () => l.rows,
1418
1482
  (s) => {
1419
1483
  o("update:modelValue", s);
1420
1484
  },
1421
1485
  { deep: !0 }
1422
- ), ne(() => {
1423
- e.columns.some((s) => s.pinned) && (i(), l.config.view === "tree" && Ke(u, i, { childList: !0, subtree: !0 }));
1486
+ ), Q(() => {
1487
+ e.columns.some((s) => s.pinned) && (u(), l.config.view === "tree" && tt(i, u, { childList: !0, subtree: !0 }));
1424
1488
  });
1425
- const a = k(() => l.columns.filter((s) => s.pinned).length), i = () => {
1426
- const s = u.value, g = s == null ? void 0 : s.rows[0], m = s == null ? void 0 : s.rows[1], w = g ? Array.from(g.cells) : [];
1427
- for (const [v, x] of w.entries()) {
1428
- const f = m == null ? void 0 : m.cells[v];
1489
+ const a = I(() => l.columns.filter((s) => s.pinned).length), u = () => {
1490
+ const s = i.value, v = s == null ? void 0 : s.rows[0], m = s == null ? void 0 : s.rows[1], y = v ? Array.from(v.cells) : [];
1491
+ for (const [h, x] of y.entries()) {
1492
+ const f = m == null ? void 0 : m.cells[h];
1429
1493
  f && (x.style.width = `${f.offsetWidth}px`);
1430
1494
  }
1431
- for (const v of (s == null ? void 0 : s.rows) || []) {
1495
+ for (const h of (s == null ? void 0 : s.rows) || []) {
1432
1496
  let x = 0;
1433
1497
  const f = [];
1434
- for (const d of v.cells)
1498
+ for (const d of h.cells)
1435
1499
  (d.classList.contains("sticky-column") || d.classList.contains("sticky-index")) && (d.style.left = `${x}px`, x += d.offsetWidth, f.push(d));
1436
1500
  f.length > 0 && f[f.length - 1].classList.add("sticky-column-edge");
1437
1501
  }
@@ -1439,82 +1503,81 @@ const cn = {
1439
1503
  window.addEventListener("keydown", (s) => {
1440
1504
  if (s.key === "Escape" && l.modal.visible) {
1441
1505
  l.modal.visible = !1;
1442
- const g = l.modal.parent;
1443
- g && Ue().then(() => {
1444
- g.focus();
1506
+ const v = l.modal.parent;
1507
+ v && Je().then(() => {
1508
+ v.focus();
1445
1509
  });
1446
1510
  }
1447
1511
  });
1448
1512
  const r = (s) => {
1449
- var w;
1513
+ var y;
1450
1514
  if (!(s.indent === 0) || a.value === 0)
1451
1515
  return l.columns;
1452
1516
  const m = [];
1453
- for (let v = 0; v < a.value; v++) {
1454
- const x = { ...l.columns[v] };
1455
- x.originalIndex = v, m.push(x);
1517
+ for (let h = 0; h < a.value; h++) {
1518
+ const x = { ...l.columns[h] };
1519
+ x.originalIndex = h, m.push(x);
1456
1520
  }
1457
1521
  return m.push({
1458
1522
  ...l.columns[a.value],
1459
1523
  isGantt: !0,
1460
- colspan: ((w = s.gantt) == null ? void 0 : w.colspan) || l.columns.length - a.value,
1524
+ colspan: ((y = s.gantt) == null ? void 0 : y.colspan) || l.columns.length - a.value,
1461
1525
  originalIndex: a.value,
1462
1526
  width: "auto"
1463
1527
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
1464
1528
  }), m;
1465
1529
  };
1466
- return t({ store: l }), (s, g) => xe((S(), R("table", {
1530
+ return t({ store: l }), (s, v) => he((M(), R("table", {
1467
1531
  ref: "table",
1468
1532
  class: "atable",
1469
- style: Y({
1533
+ style: q({
1470
1534
  width: b(l).config.fullWidth ? "100%" : "auto"
1471
1535
  })
1472
1536
  }, [
1473
- W(s.$slots, "header", { data: b(l) }, () => [
1474
- Le(nt, {
1537
+ z(s.$slots, "header", { data: b(l) }, () => [
1538
+ We(lt, {
1475
1539
  columns: b(l).columns,
1476
1540
  store: b(l)
1477
1541
  }, null, 8, ["columns", "store"])
1478
1542
  ], !0),
1479
1543
  L("tbody", null, [
1480
- W(s.$slots, "body", { data: b(l) }, () => [
1481
- (S(!0), R(ie, null, Ce(b(l).rows, (m, w) => (S(), se(_e, {
1544
+ z(s.$slots, "body", { data: b(l) }, () => [
1545
+ (M(!0), R(ue, null, Ie(b(l).rows, (m, y) => (M(), ie(nt, {
1482
1546
  key: m.id,
1483
1547
  row: m,
1484
- rowIndex: w,
1548
+ rowIndex: y,
1485
1549
  store: b(l)
1486
1550
  }, {
1487
- default: De(() => [
1488
- (S(!0), R(ie, null, Ce(r(m), (v, x) => {
1551
+ default: He(() => [
1552
+ (M(!0), R(ue, null, Ie(r(m), (h, x) => {
1489
1553
  var f, d, p;
1490
- return S(), R(ie, {
1491
- key: v.name
1554
+ return M(), R(ue, {
1555
+ key: h.name
1492
1556
  }, [
1493
- v.isGantt ? (S(), se(ve(v.ganttComponent || "AGanttCell"), {
1557
+ h.isGantt ? (M(), ie(ve(h.ganttComponent || "AGanttCell"), {
1494
1558
  key: 0,
1495
1559
  store: b(l),
1496
1560
  columnsCount: b(l).columns.length - a.value,
1497
1561
  color: (f = m.gantt) == null ? void 0 : f.color,
1498
1562
  start: (d = m.gantt) == null ? void 0 : d.startIndex,
1499
1563
  end: (p = m.gantt) == null ? void 0 : p.endIndex,
1500
- colspan: v.colspan,
1501
- pinned: v.pinned,
1502
- rowIndex: w,
1503
- colIndex: v.originalIndex ?? x,
1504
- style: Y({
1505
- textAlign: (v == null ? void 0 : v.align) || "center",
1506
- minWidth: (v == null ? void 0 : v.width) || "40ch",
1564
+ colspan: h.colspan,
1565
+ pinned: h.pinned,
1566
+ rowIndex: y,
1567
+ colIndex: h.originalIndex ?? x,
1568
+ style: q({
1569
+ textAlign: (h == null ? void 0 : h.align) || "center",
1570
+ minWidth: (h == null ? void 0 : h.width) || "40ch",
1507
1571
  width: b(l).config.fullWidth ? "auto" : null
1508
1572
  })
1509
- }, null, 8, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (S(), se(ve(v.cellComponent || "ACell"), {
1573
+ }, null, 8, ["store", "columnsCount", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (M(), ie(ve(h.cellComponent || "ACell"), {
1510
1574
  key: 1,
1511
1575
  store: b(l),
1512
- pinned: v.pinned,
1513
- rowIndex: w,
1576
+ pinned: h.pinned,
1577
+ rowIndex: y,
1514
1578
  colIndex: x,
1515
- style: Y({
1516
- textAlign: (v == null ? void 0 : v.align) || "center",
1517
- minWidth: (v == null ? void 0 : v.width) || "40ch",
1579
+ style: q({
1580
+ textAlign: (h == null ? void 0 : h.align) || "center",
1518
1581
  width: b(l).config.fullWidth ? "auto" : null
1519
1582
  }),
1520
1583
  spellcheck: "false"
@@ -1526,11 +1589,11 @@ const cn = {
1526
1589
  }, 1032, ["row", "rowIndex", "store"]))), 128))
1527
1590
  ], !0)
1528
1591
  ]),
1529
- W(s.$slots, "footer", { data: b(l) }, void 0, !0),
1530
- W(s.$slots, "modal", { data: b(l) }, () => [
1531
- xe(Le(ot, { store: b(l) }, {
1532
- default: De(() => [
1533
- (S(), se(ve(b(l).modal.component), ke({
1592
+ z(s.$slots, "footer", { data: b(l) }, void 0, !0),
1593
+ z(s.$slots, "modal", { data: b(l) }, () => [
1594
+ he(We(at, { store: b(l) }, {
1595
+ default: He(() => [
1596
+ (M(), ie(ve(b(l).modal.component), Se({
1534
1597
  key: `${b(l).modal.rowIndex}:${b(l).modal.colIndex}`,
1535
1598
  colIndex: b(l).modal.colIndex,
1536
1599
  rowIndex: b(l).modal.rowIndex,
@@ -1539,46 +1602,46 @@ const cn = {
1539
1602
  ]),
1540
1603
  _: 1
1541
1604
  }, 8, ["store"]), [
1542
- [qe, b(l).modal.visible]
1605
+ [Ze, b(l).modal.visible]
1543
1606
  ])
1544
1607
  ], !0)
1545
1608
  ], 4)), [
1546
- [b(an), b(l).closeModal]
1609
+ [b(rn), b(l).closeModal]
1547
1610
  ]);
1548
1611
  }
1549
- }), mn = /* @__PURE__ */ le(vn, [["__scopeId", "data-v-fcb81c06"]]), gn = {}, hn = { class: "aloading" }, pn = { class: "aloading-header" };
1550
- function wn(e, t) {
1551
- return S(), R("div", hn, [
1552
- L("h2", pn, [
1553
- W(e.$slots, "default", {}, void 0, !0)
1612
+ }), bn = /* @__PURE__ */ ae(yn, [["__scopeId", "data-v-785e5fa3"]]), xn = {}, Cn = { class: "aloading" }, En = { class: "aloading-header" };
1613
+ function In(e, t) {
1614
+ return M(), R("div", Cn, [
1615
+ L("h2", En, [
1616
+ z(e.$slots, "default", {}, void 0, !0)
1554
1617
  ]),
1555
1618
  t[0] || (t[0] = L("div", { class: "aloading-bar" }, null, -1))
1556
1619
  ]);
1557
1620
  }
1558
- const yn = /* @__PURE__ */ le(gn, [["render", wn], ["__scopeId", "data-v-a930a25b"]]), bn = {}, xn = { class: "aloading" }, Cn = { class: "aloading-header" };
1559
- function En(e, t) {
1560
- return S(), R("div", xn, [
1561
- L("h2", Cn, [
1562
- W(e.$slots, "default", {}, void 0, !0)
1621
+ const kn = /* @__PURE__ */ ae(xn, [["render", In], ["__scopeId", "data-v-a930a25b"]]), Sn = {}, Mn = { class: "aloading" }, $n = { class: "aloading-header" };
1622
+ function An(e, t) {
1623
+ return M(), R("div", Mn, [
1624
+ L("h2", $n, [
1625
+ z(e.$slots, "default", {}, void 0, !0)
1563
1626
  ]),
1564
1627
  t[0] || (t[0] = L("div", { class: "aloading-bar" }, null, -1))
1565
1628
  ]);
1566
1629
  }
1567
- const In = /* @__PURE__ */ le(bn, [["render", En], ["__scopeId", "data-v-e1165876"]]);
1568
- function $n(e) {
1569
- e.component("ACell", Ut), e.component("AExpansionRow", Zt), e.component("AGanttCell", nn), e.component("ARow", _e), e.component("ATable", mn), e.component("ATableHeader", nt), e.component("ATableLoading", yn), e.component("ATableLoadingBar", In), e.component("ATableModal", ot);
1630
+ const Rn = /* @__PURE__ */ ae(Sn, [["render", An], ["__scopeId", "data-v-e1165876"]]);
1631
+ function Ln(e) {
1632
+ e.component("ACell", qt), e.component("AExpansionRow", _t), e.component("AGanttCell", ln), e.component("ARow", nt), e.component("ATable", bn), e.component("ATableHeader", lt), e.component("ATableLoading", kn), e.component("ATableLoadingBar", Rn), e.component("ATableModal", at);
1570
1633
  }
1571
1634
  export {
1572
- Ut as ACell,
1573
- Zt as AExpansionRow,
1574
- nn as AGanttCell,
1575
- _e as ARow,
1576
- mn as ATable,
1577
- nt as ATableHeader,
1578
- yn as ATableLoading,
1579
- In as ATableLoadingBar,
1580
- ot as ATableModal,
1581
- fn as createTableStore,
1582
- $n as install
1635
+ qt as ACell,
1636
+ _t as AExpansionRow,
1637
+ ln as AGanttCell,
1638
+ nt as ARow,
1639
+ bn as ATable,
1640
+ lt as ATableHeader,
1641
+ kn as ATableLoading,
1642
+ Rn as ATableLoadingBar,
1643
+ at as ATableModal,
1644
+ wn as createTableStore,
1645
+ Ln as install
1583
1646
  };
1584
1647
  //# sourceMappingURL=atable.js.map