@stonecrop/atable 0.2.51 → 0.2.53

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,8 +1,8 @@
1
1
  import './assets/index.css';var Ge = Object.defineProperty;
2
2
  var Ue = (e, t, n) => t in e ? Ge(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var T = (e, t, n) => Ue(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { onMounted as z, ref as y, watch as k, onBeforeUnmount as qe, computed as b, unref as m, getCurrentScope as le, onScopeDispose as se, getCurrentInstance as ie, nextTick as Te, defineComponent as D, inject as Q, useTemplateRef as Z, openBlock as w, createElementBlock as g, normalizeClass as j, createBlock as U, resolveDynamicComponent as Re, mergeProps as re, toDisplayString as N, Fragment as X, createElementVNode as P, renderSlot as S, createCommentVNode as J, withDirectives as te, vShow as De, toRef as Ye, readonly as Xe, customRef as Je, reactive as L, renderList as ne, normalizeStyle as q, createTextVNode as Qe, provide as Ze, createVNode as ye, withCtx as be } from "vue";
5
- function Le(e) {
4
+ import { onMounted as F, ref as y, watch as C, onBeforeUnmount as qe, computed as x, unref as m, getCurrentScope as le, onScopeDispose as se, getCurrentInstance as ie, nextTick as $e, defineComponent as M, inject as Q, useTemplateRef as Z, openBlock as h, createElementBlock as E, normalizeStyle as P, normalizeClass as N, createBlock as q, resolveDynamicComponent as Te, mergeProps as re, toDisplayString as B, Fragment as X, createElementVNode as W, renderSlot as S, createCommentVNode as J, withDirectives as te, vShow as De, toRef as Ye, readonly as Xe, customRef as Je, reactive as R, renderList as ne, createTextVNode as Qe, provide as Ze, createVNode as he, withCtx as ye } from "vue";
5
+ function Me(e) {
6
6
  return le() ? (se(e), !0) : !1;
7
7
  }
8
8
  function ae(e) {
@@ -11,64 +11,64 @@ function ae(e) {
11
11
  const Ke = typeof window < "u" && typeof document < "u";
12
12
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
13
13
  const _e = (e) => e != null, et = Object.prototype.toString, tt = (e) => et.call(e) === "[object Object]", nt = () => {
14
- }, F = Ke ? window : void 0;
15
- function B(e) {
14
+ }, G = Ke ? window : void 0;
15
+ function V(e) {
16
16
  var t;
17
17
  const n = ae(e);
18
18
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
19
19
  }
20
- function V(...e) {
20
+ function z(...e) {
21
21
  let t, n, l, s;
22
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = F) : [t, n, l, s] = e, !t)
22
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = G) : [t, n, l, s] = e, !t)
23
23
  return nt;
24
24
  Array.isArray(n) || (n = [n]), Array.isArray(l) || (l = [l]);
25
- const o = [], c = () => {
25
+ const o = [], r = () => {
26
26
  o.forEach((u) => u()), o.length = 0;
27
- }, i = (u, p, a, f) => (u.addEventListener(p, a, f), () => u.removeEventListener(p, a, f)), r = k(
28
- () => [B(t), ae(s)],
27
+ }, i = (u, p, c, f) => (u.addEventListener(p, c, f), () => u.removeEventListener(p, c, f)), d = C(
28
+ () => [V(t), ae(s)],
29
29
  ([u, p]) => {
30
- if (c(), !u)
30
+ if (r(), !u)
31
31
  return;
32
- const a = tt(p) ? { ...p } : p;
32
+ const c = tt(p) ? { ...p } : p;
33
33
  o.push(
34
- ...n.flatMap((f) => l.map((v) => i(u, f, v, a)))
34
+ ...n.flatMap((f) => l.map((v) => i(u, f, v, c)))
35
35
  );
36
36
  },
37
37
  { immediate: !0, flush: "post" }
38
- ), d = () => {
39
- r(), c();
38
+ ), a = () => {
39
+ d(), r();
40
40
  };
41
- return Le(d), d;
41
+ return Me(a), a;
42
42
  }
43
43
  function ot() {
44
44
  const e = y(!1), t = ie();
45
- return t && z(() => {
45
+ return t && F(() => {
46
46
  e.value = !0;
47
47
  }, t), e;
48
48
  }
49
49
  function lt(e) {
50
50
  const t = ot();
51
- return b(() => (t.value, !!e()));
51
+ return x(() => (t.value, !!e()));
52
52
  }
53
53
  function st(e, t, n = {}) {
54
- const { window: l = F, ...s } = n;
54
+ const { window: l = G, ...s } = n;
55
55
  let o;
56
- const c = lt(() => l && "MutationObserver" in l), i = () => {
56
+ const r = lt(() => l && "MutationObserver" in l), i = () => {
57
57
  o && (o.disconnect(), o = void 0);
58
- }, r = b(() => {
59
- const a = ae(e), f = (Array.isArray(a) ? a : [a]).map(B).filter(_e);
58
+ }, d = x(() => {
59
+ const c = ae(e), f = (Array.isArray(c) ? c : [c]).map(V).filter(_e);
60
60
  return new Set(f);
61
- }), d = k(
62
- () => r.value,
63
- (a) => {
64
- i(), c.value && a.size && (o = new MutationObserver(t), a.forEach((f) => o.observe(f, s)));
61
+ }), a = C(
62
+ () => d.value,
63
+ (c) => {
64
+ i(), r.value && c.size && (o = new MutationObserver(t), c.forEach((f) => o.observe(f, s)));
65
65
  },
66
66
  { immediate: !0, flush: "post" }
67
67
  ), u = () => o == null ? void 0 : o.takeRecords(), p = () => {
68
- d(), i();
68
+ a(), i();
69
69
  };
70
- return Le(p), {
71
- isSupported: c,
70
+ return Me(p), {
71
+ isSupported: r,
72
72
  stop: p,
73
73
  takeRecords: u
74
74
  };
@@ -76,59 +76,59 @@ function st(e, t, n = {}) {
76
76
  function it(e = {}) {
77
77
  var t;
78
78
  const {
79
- window: n = F,
79
+ window: n = G,
80
80
  deep: l = !0,
81
81
  triggerOnRemoval: s = !1
82
- } = e, o = (t = e.document) != null ? t : n == null ? void 0 : n.document, c = () => {
83
- var d;
82
+ } = e, o = (t = e.document) != null ? t : n == null ? void 0 : n.document, r = () => {
83
+ var a;
84
84
  let u = o == null ? void 0 : o.activeElement;
85
85
  if (l)
86
86
  for (; u != null && u.shadowRoot; )
87
- u = (d = u == null ? void 0 : u.shadowRoot) == null ? void 0 : d.activeElement;
87
+ u = (a = u == null ? void 0 : u.shadowRoot) == null ? void 0 : a.activeElement;
88
88
  return u;
89
- }, i = y(), r = () => {
90
- i.value = c();
89
+ }, i = y(), d = () => {
90
+ i.value = r();
91
91
  };
92
- return n && (V(n, "blur", (d) => {
93
- d.relatedTarget === null && r();
94
- }, !0), V(n, "focus", r, !0)), s && st(o, (d) => {
95
- d.filter((u) => u.removedNodes.length).map((u) => Array.from(u.removedNodes)).flat().forEach((u) => {
96
- u === i.value && r();
92
+ return n && (z(n, "blur", (a) => {
93
+ a.relatedTarget === null && d();
94
+ }, !0), z(n, "focus", d, !0)), s && st(o, (a) => {
95
+ a.filter((u) => u.removedNodes.length).map((u) => Array.from(u.removedNodes)).flat().forEach((u) => {
96
+ u === i.value && d();
97
97
  });
98
98
  }, {
99
99
  childList: !0,
100
100
  subtree: !0
101
- }), r(), i;
101
+ }), d(), i;
102
102
  }
103
103
  const rt = "focusin", at = "focusout";
104
104
  function ct(e, t = {}) {
105
- const { window: n = F } = t, l = b(() => B(e)), s = y(!1), o = b(() => s.value), c = it(t);
106
- return !n || !c.value ? { focused: o } : (V(l, rt, () => s.value = !0), V(l, at, () => s.value = !1), { focused: o });
105
+ const { window: n = G } = t, l = x(() => V(e)), s = y(!1), o = x(() => s.value), r = it(t);
106
+ return !n || !r.value ? { focused: o } : (z(l, rt, () => s.value = !0), z(l, at, () => s.value = !1), { focused: o });
107
107
  }
108
- function dt(e, { window: t = F, scrollTarget: n } = {}) {
108
+ function dt(e, { window: t = G, scrollTarget: n } = {}) {
109
109
  const l = y(!1), s = () => {
110
110
  if (!t) return;
111
- const o = t.document, c = B(e);
112
- if (!c)
111
+ const o = t.document, r = V(e);
112
+ if (!r)
113
113
  l.value = !1;
114
114
  else {
115
- const i = c.getBoundingClientRect();
115
+ const i = r.getBoundingClientRect();
116
116
  l.value = i.top <= (t.innerHeight || o.documentElement.clientHeight) && i.left <= (t.innerWidth || o.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;
117
117
  }
118
118
  };
119
- return k(
120
- () => B(e),
119
+ return C(
120
+ () => V(e),
121
121
  () => s(),
122
122
  { immediate: !0, flush: "post" }
123
- ), t && V(n || t, "scroll", s, {
123
+ ), t && z(n || t, "scroll", s, {
124
124
  capture: !1,
125
125
  passive: !0
126
126
  }), l;
127
127
  }
128
- const $ = (e) => {
128
+ const O = (e) => {
129
129
  let t = dt(e).value;
130
130
  return t = t && e.offsetHeight > 0, t;
131
- }, O = (e) => e.tabIndex >= 0, ge = (e) => {
131
+ }, $ = (e) => e.tabIndex >= 0, be = (e) => {
132
132
  const t = e.target;
133
133
  return ce(t);
134
134
  }, ce = (e) => {
@@ -144,7 +144,7 @@ const $ = (e) => {
144
144
  const l = e.previousElementSibling;
145
145
  l && (n = l);
146
146
  }
147
- return n && (!O(n) || !$(n)) ? ce(n) : n;
147
+ return n && (!$(n) || !O(n)) ? ce(n) : n;
148
148
  }, ut = (e) => {
149
149
  var t;
150
150
  const n = e.target;
@@ -162,8 +162,8 @@ const $ = (e) => {
162
162
  o && (l = o);
163
163
  }
164
164
  }
165
- return l && (!O(l) || !$(l)) ? de(l) : l;
166
- }, xe = (e) => {
165
+ return l && (!$(l) || !O(l)) ? de(l) : l;
166
+ }, ge = (e) => {
167
167
  const t = e.target;
168
168
  return de(t);
169
169
  }, de = (e) => {
@@ -179,7 +179,7 @@ const $ = (e) => {
179
179
  const l = e.nextElementSibling;
180
180
  l && (n = l);
181
181
  }
182
- return n && (!O(n) || !$(n)) ? de(n) : n;
182
+ return n && (!$(n) || !O(n)) ? de(n) : n;
183
183
  }, ft = (e) => {
184
184
  var t;
185
185
  const n = e.target;
@@ -197,8 +197,8 @@ const $ = (e) => {
197
197
  o && (l = o);
198
198
  }
199
199
  }
200
- return l && (!O(l) || !$(l)) ? ce(l) : l;
201
- }, Ee = (e) => {
200
+ return l && (!$(l) || !O(l)) ? ce(l) : l;
201
+ }, xe = (e) => {
202
202
  const t = e.target;
203
203
  return ue(t);
204
204
  }, ue = (e) => {
@@ -210,8 +210,8 @@ const $ = (e) => {
210
210
  const l = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;
211
211
  n = l == null ? void 0 : l.lastElementChild;
212
212
  }
213
- return n && (!O(n) || !$(n)) ? ue(n) : n;
214
- }, ke = (e) => {
213
+ return n && (!$(n) || !O(n)) ? ue(n) : n;
214
+ }, Ee = (e) => {
215
215
  const t = e.target;
216
216
  return fe(t);
217
217
  }, fe = (e) => {
@@ -223,33 +223,33 @@ const $ = (e) => {
223
223
  const l = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;
224
224
  n = l == null ? void 0 : l.firstElementChild;
225
225
  }
226
- return n && (!O(n) || !$(n)) ? fe(n) : n;
227
- }, Ce = (e) => {
226
+ return n && (!$(n) || !O(n)) ? fe(n) : n;
227
+ }, ke = (e) => {
228
228
  const t = e.target.parentElement.firstElementChild;
229
- return t && (!O(t) || !$(t)) ? fe(t) : t;
230
- }, Ae = (e) => {
229
+ return t && (!$(t) || !O(t)) ? fe(t) : t;
230
+ }, Ce = (e) => {
231
231
  const t = e.target.parentElement.lastElementChild;
232
- return t && (!O(t) || !$(t)) ? ue(t) : t;
233
- }, G = ["alt", "control", "shift", "meta"], pt = {
232
+ return t && (!$(t) || !O(t)) ? ue(t) : t;
233
+ }, U = ["alt", "control", "shift", "meta"], pt = {
234
234
  ArrowUp: "up",
235
235
  ArrowDown: "down",
236
236
  ArrowLeft: "left",
237
237
  ArrowRight: "right"
238
238
  }, pe = {
239
239
  "keydown.up": (e) => {
240
- const t = ge(e);
240
+ const t = be(e);
241
241
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
242
242
  },
243
243
  "keydown.down": (e) => {
244
- const t = xe(e);
244
+ const t = ge(e);
245
245
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
246
246
  },
247
247
  "keydown.left": (e) => {
248
- const t = Ee(e);
248
+ const t = xe(e);
249
249
  e.preventDefault(), e.stopPropagation(), t && t.focus();
250
250
  },
251
251
  "keydown.right": (e) => {
252
- const t = ke(e);
252
+ const t = Ee(e);
253
253
  e.preventDefault(), e.stopPropagation(), t && t.focus();
254
254
  },
255
255
  "keydown.control.up": (e) => {
@@ -261,105 +261,105 @@ const $ = (e) => {
261
261
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
262
262
  },
263
263
  "keydown.control.left": (e) => {
264
- const t = Ce(e);
264
+ const t = ke(e);
265
265
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
266
266
  },
267
267
  "keydown.control.right": (e) => {
268
- const t = Ae(e);
268
+ const t = Ce(e);
269
269
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
270
270
  },
271
271
  "keydown.end": (e) => {
272
- const t = Ae(e);
272
+ const t = Ce(e);
273
273
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
274
274
  },
275
275
  "keydown.enter": (e) => {
276
276
  if (e.target instanceof HTMLTableCellElement) {
277
277
  e.preventDefault(), e.stopPropagation();
278
- const t = xe(e);
278
+ const t = ge(e);
279
279
  t && t.focus();
280
280
  }
281
281
  },
282
282
  "keydown.shift.enter": (e) => {
283
283
  if (e.target instanceof HTMLTableCellElement) {
284
284
  e.preventDefault(), e.stopPropagation();
285
- const t = ge(e);
285
+ const t = be(e);
286
286
  t && t.focus();
287
287
  }
288
288
  },
289
289
  "keydown.home": (e) => {
290
- const t = Ce(e);
290
+ const t = ke(e);
291
291
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
292
292
  },
293
293
  "keydown.tab": (e) => {
294
- const t = ke(e);
294
+ const t = Ee(e);
295
295
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
296
296
  },
297
297
  "keydown.shift.tab": (e) => {
298
- const t = Ee(e);
298
+ const t = xe(e);
299
299
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
300
300
  }
301
301
  };
302
302
  function me(e) {
303
- const t = (c) => {
303
+ const t = (r) => {
304
304
  let i = null;
305
- return c.parent && (typeof c.parent == "string" ? i = document.querySelector(c.parent) : c.parent instanceof HTMLElement ? i = c.parent : i = c.parent.value), i;
306
- }, n = (c) => {
307
- const i = t(c);
308
- let r = [];
309
- if (typeof c.selectors == "string")
310
- r = i ? Array.from(i.querySelectorAll(c.selectors)) : Array.from(document.querySelectorAll(c.selectors));
311
- else if (Array.isArray(c.selectors))
312
- for (const d of c.selectors)
313
- d instanceof HTMLElement ? r.push(d) : r.push(d.$el);
314
- else if (c.selectors instanceof HTMLElement)
315
- r.push(c.selectors);
316
- else if (Array.isArray(c.selectors.value))
317
- for (const d of c.selectors.value)
318
- d instanceof HTMLElement ? r.push(d) : r.push(d.$el);
305
+ return r.parent && (typeof r.parent == "string" ? i = document.querySelector(r.parent) : r.parent instanceof HTMLElement ? i = r.parent : i = r.parent.value), i;
306
+ }, n = (r) => {
307
+ const i = t(r);
308
+ let d = [];
309
+ if (typeof r.selectors == "string")
310
+ d = i ? Array.from(i.querySelectorAll(r.selectors)) : Array.from(document.querySelectorAll(r.selectors));
311
+ else if (Array.isArray(r.selectors))
312
+ for (const a of r.selectors)
313
+ a instanceof HTMLElement ? d.push(a) : d.push(a.$el);
314
+ else if (r.selectors instanceof HTMLElement)
315
+ d.push(r.selectors);
316
+ else if (Array.isArray(r.selectors.value))
317
+ for (const a of r.selectors.value)
318
+ a instanceof HTMLElement ? d.push(a) : d.push(a.$el);
319
319
  else
320
- r.push(c.selectors.value);
321
- return r;
322
- }, l = (c) => {
323
- const i = t(c);
324
- let r = [];
325
- return c.selectors ? r = n(c) : i && (r = Array.from(i.children).filter((d) => O(d) && $(d))), r;
326
- }, s = (c) => (i) => {
327
- const r = pt[i.key] || i.key.toLowerCase();
328
- if (G.includes(r)) return;
329
- const d = c.handlers || pe;
330
- for (const u of Object.keys(d)) {
331
- const [p, ...a] = u.split(".");
332
- if (p === "keydown" && a.includes(r)) {
333
- const f = d[u], v = a.filter((h) => G.includes(h)), E = G.some((h) => {
334
- const C = h.charAt(0).toUpperCase() + h.slice(1);
335
- return i.getModifierState(C);
320
+ d.push(r.selectors.value);
321
+ return d;
322
+ }, l = (r) => {
323
+ const i = t(r);
324
+ let d = [];
325
+ return r.selectors ? d = n(r) : i && (d = Array.from(i.children).filter((a) => $(a) && O(a))), d;
326
+ }, s = (r) => (i) => {
327
+ const d = pt[i.key] || i.key.toLowerCase();
328
+ if (U.includes(d)) return;
329
+ const a = r.handlers || pe;
330
+ for (const u of Object.keys(a)) {
331
+ const [p, ...c] = u.split(".");
332
+ if (p === "keydown" && c.includes(d)) {
333
+ const f = a[u], v = c.filter((w) => U.includes(w)), b = U.some((w) => {
334
+ const I = w.charAt(0).toUpperCase() + w.slice(1);
335
+ return i.getModifierState(I);
336
336
  });
337
337
  if (v.length > 0) {
338
- if (E) {
339
- for (const h of G)
340
- if (a.includes(h)) {
341
- const C = h.charAt(0).toUpperCase() + h.slice(1);
342
- i.getModifierState(C) && f(i);
338
+ if (b) {
339
+ for (const w of U)
340
+ if (c.includes(w)) {
341
+ const I = w.charAt(0).toUpperCase() + w.slice(1);
342
+ i.getModifierState(I) && f(i);
343
343
  }
344
344
  }
345
345
  } else
346
- E || f(i);
346
+ b || f(i);
347
347
  }
348
348
  }
349
349
  }, o = [];
350
- z(() => {
351
- for (const c of e) {
352
- const i = t(c), r = l(c), d = s(c), u = i ? [i] : r;
350
+ F(() => {
351
+ for (const r of e) {
352
+ const i = t(r), d = l(r), a = s(r), u = i ? [i] : d;
353
353
  for (const p of u) {
354
- const { focused: a } = ct(y(p)), f = k(a, (v) => {
355
- v ? p.addEventListener("keydown", d) : p.removeEventListener("keydown", d);
354
+ const { focused: c } = ct(y(p)), f = C(c, (v) => {
355
+ v ? p.addEventListener("keydown", a) : p.removeEventListener("keydown", a);
356
356
  });
357
357
  o.push(f);
358
358
  }
359
359
  }
360
360
  }), qe(() => {
361
- for (const c of o)
362
- c();
361
+ for (const r of o)
362
+ r();
363
363
  });
364
364
  }
365
365
  function ve(e) {
@@ -370,99 +370,99 @@ function K(e) {
370
370
  }
371
371
  const mt = typeof window < "u" && typeof document < "u";
372
372
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
373
- const vt = (e) => e != null, ht = Object.prototype.toString, wt = (e) => ht.call(e) === "[object Object]", yt = () => {
373
+ const vt = (e) => e != null, wt = Object.prototype.toString, ht = (e) => wt.call(e) === "[object Object]", yt = () => {
374
374
  };
375
375
  function bt(e) {
376
376
  return ie();
377
377
  }
378
378
  function gt(e, t = !0, n) {
379
- bt() ? z(e, n) : t ? e() : Te(e);
379
+ bt() ? F(e, n) : t ? e() : $e(e);
380
380
  }
381
- const he = mt ? window : void 0;
382
- function R(e) {
381
+ const we = mt ? window : void 0;
382
+ function D(e) {
383
383
  var t;
384
384
  const n = K(e);
385
385
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
386
386
  }
387
387
  function Ie(...e) {
388
388
  let t, n, l, s;
389
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = he) : [t, n, l, s] = e, !t)
389
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = we) : [t, n, l, s] = e, !t)
390
390
  return yt;
391
391
  Array.isArray(n) || (n = [n]), Array.isArray(l) || (l = [l]);
392
- const o = [], c = () => {
392
+ const o = [], r = () => {
393
393
  o.forEach((u) => u()), o.length = 0;
394
- }, i = (u, p, a, f) => (u.addEventListener(p, a, f), () => u.removeEventListener(p, a, f)), r = k(
395
- () => [R(t), K(s)],
394
+ }, i = (u, p, c, f) => (u.addEventListener(p, c, f), () => u.removeEventListener(p, c, f)), d = C(
395
+ () => [D(t), K(s)],
396
396
  ([u, p]) => {
397
- if (c(), !u)
397
+ if (r(), !u)
398
398
  return;
399
- const a = wt(p) ? { ...p } : p;
399
+ const c = ht(p) ? { ...p } : p;
400
400
  o.push(
401
- ...n.flatMap((f) => l.map((v) => i(u, f, v, a)))
401
+ ...n.flatMap((f) => l.map((v) => i(u, f, v, c)))
402
402
  );
403
403
  },
404
404
  { immediate: !0, flush: "post" }
405
- ), d = () => {
406
- r(), c();
405
+ ), a = () => {
406
+ d(), r();
407
407
  };
408
- return ve(d), d;
408
+ return ve(a), a;
409
409
  }
410
410
  function xt() {
411
411
  const e = y(!1), t = ie();
412
- return t && z(() => {
412
+ return t && F(() => {
413
413
  e.value = !0;
414
414
  }, t), e;
415
415
  }
416
- function Me(e) {
416
+ function Re(e) {
417
417
  const t = xt();
418
- return b(() => (t.value, !!e()));
418
+ return x(() => (t.value, !!e()));
419
419
  }
420
- function Pe(e, t, n = {}) {
421
- const { window: l = he, ...s } = n;
420
+ function Le(e, t, n = {}) {
421
+ const { window: l = we, ...s } = n;
422
422
  let o;
423
- const c = Me(() => l && "MutationObserver" in l), i = () => {
423
+ const r = Re(() => l && "MutationObserver" in l), i = () => {
424
424
  o && (o.disconnect(), o = void 0);
425
- }, r = b(() => {
426
- const a = K(e), f = (Array.isArray(a) ? a : [a]).map(R).filter(vt);
425
+ }, d = x(() => {
426
+ const c = K(e), f = (Array.isArray(c) ? c : [c]).map(D).filter(vt);
427
427
  return new Set(f);
428
- }), d = k(
429
- () => r.value,
430
- (a) => {
431
- i(), c.value && a.size && (o = new MutationObserver(t), a.forEach((f) => o.observe(f, s)));
428
+ }), a = C(
429
+ () => d.value,
430
+ (c) => {
431
+ i(), r.value && c.size && (o = new MutationObserver(t), c.forEach((f) => o.observe(f, s)));
432
432
  },
433
433
  { immediate: !0, flush: "post" }
434
434
  ), u = () => o == null ? void 0 : o.takeRecords(), p = () => {
435
- d(), i();
435
+ a(), i();
436
436
  };
437
437
  return ve(p), {
438
- isSupported: c,
438
+ isSupported: r,
439
439
  stop: p,
440
440
  takeRecords: u
441
441
  };
442
442
  }
443
443
  function Et(e, t, n = {}) {
444
- const { window: l = he, ...s } = n;
444
+ const { window: l = we, ...s } = n;
445
445
  let o;
446
- const c = Me(() => l && "ResizeObserver" in l), i = () => {
446
+ const r = Re(() => l && "ResizeObserver" in l), i = () => {
447
447
  o && (o.disconnect(), o = void 0);
448
- }, r = b(() => {
448
+ }, d = x(() => {
449
449
  const p = K(e);
450
- return Array.isArray(p) ? p.map((a) => R(a)) : [R(p)];
451
- }), d = k(
452
- r,
450
+ return Array.isArray(p) ? p.map((c) => D(c)) : [D(p)];
451
+ }), a = C(
452
+ d,
453
453
  (p) => {
454
- if (i(), c.value && l) {
454
+ if (i(), r.value && l) {
455
455
  o = new ResizeObserver(t);
456
- for (const a of p)
457
- a && o.observe(a, s);
456
+ for (const c of p)
457
+ c && o.observe(c, s);
458
458
  }
459
459
  },
460
460
  { immediate: !0, flush: "post" }
461
461
  ), u = () => {
462
- i(), d();
462
+ i(), a();
463
463
  };
464
464
  return ve(u), {
465
- isSupported: c,
465
+ isSupported: r,
466
466
  stop: u
467
467
  };
468
468
  }
@@ -472,40 +472,40 @@ function kt(e, t = {}) {
472
472
  windowResize: l = !0,
473
473
  windowScroll: s = !0,
474
474
  immediate: o = !0,
475
- updateTiming: c = "sync"
476
- } = t, i = y(0), r = y(0), d = y(0), u = y(0), p = y(0), a = y(0), f = y(0), v = y(0);
477
- function E() {
478
- const C = R(e);
479
- if (!C) {
480
- n && (i.value = 0, r.value = 0, d.value = 0, u.value = 0, p.value = 0, a.value = 0, f.value = 0, v.value = 0);
475
+ updateTiming: r = "sync"
476
+ } = t, i = y(0), d = y(0), a = y(0), u = y(0), p = y(0), c = y(0), f = y(0), v = y(0);
477
+ function b() {
478
+ const I = D(e);
479
+ if (!I) {
480
+ n && (i.value = 0, d.value = 0, a.value = 0, u.value = 0, p.value = 0, c.value = 0, f.value = 0, v.value = 0);
481
481
  return;
482
482
  }
483
- const A = C.getBoundingClientRect();
484
- i.value = A.height, r.value = A.bottom, d.value = A.left, u.value = A.right, p.value = A.top, a.value = A.width, f.value = A.x, v.value = A.y;
483
+ const k = I.getBoundingClientRect();
484
+ i.value = k.height, d.value = k.bottom, a.value = k.left, u.value = k.right, p.value = k.top, c.value = k.width, f.value = k.x, v.value = k.y;
485
485
  }
486
- function h() {
487
- c === "sync" ? E() : c === "next-frame" && requestAnimationFrame(() => E());
486
+ function w() {
487
+ r === "sync" ? b() : r === "next-frame" && requestAnimationFrame(() => b());
488
488
  }
489
- return Et(e, h), k(() => R(e), (C) => !C && h()), Pe(e, h, {
489
+ return Et(e, w), C(() => D(e), (I) => !I && w()), Le(e, w, {
490
490
  attributeFilter: ["style", "class"]
491
- }), s && Ie("scroll", h, { capture: !0, passive: !0 }), l && Ie("resize", h, { passive: !0 }), gt(() => {
492
- o && h();
491
+ }), s && Ie("scroll", w, { capture: !0, passive: !0 }), l && Ie("resize", w, { passive: !0 }), gt(() => {
492
+ o && w();
493
493
  }), {
494
494
  height: i,
495
- bottom: r,
496
- left: d,
495
+ bottom: d,
496
+ left: a,
497
497
  right: u,
498
498
  top: p,
499
- width: a,
499
+ width: c,
500
500
  x: f,
501
501
  y: v,
502
- update: h
502
+ update: w
503
503
  };
504
504
  }
505
505
  const Ct = (e) => {
506
506
  const t = new DOMParser().parseFromString(e, "text/html");
507
507
  return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
508
- }, At = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], It = ["innerHTML"], St = { key: 2 }, We = /* @__PURE__ */ D({
508
+ }, It = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], At = ["innerHTML"], St = { key: 2 }, Pe = /* @__PURE__ */ M({
509
509
  __name: "ACell",
510
510
  props: {
511
511
  colIndex: {},
@@ -516,70 +516,72 @@ const Ct = (e) => {
516
516
  pinned: { type: Boolean }
517
517
  },
518
518
  setup(e) {
519
- var we;
520
- const t = Q(e.tableid), n = Z("cell"), l = y(""), s = y(!1), { bottom: o, left: c } = kt(n), i = t.table, r = t.columns[e.colIndex], d = t.rows[e.rowIndex], u = b(() => r.align || "center"), p = b(() => r.width || "40ch"), a = b(() => {
521
- const x = t.cellData(e.colIndex, e.rowIndex), I = r.format;
522
- return I ? typeof I == "function" ? I(x, { table: i, row: d, column: r }) : typeof I == "string" ? Function(`"use strict";return (${I})`)()(x, { table: i, row: d, column: r }) : x : x;
523
- }), f = b(() => typeof a.value == "string" ? Ct(a.value) : !1), v = () => {
524
- r.mask, r.modalComponent && (t.modal.visible = !0, t.modal.colIndex = e.colIndex, t.modal.rowIndex = e.rowIndex, t.modal.parent = n.value, t.modal.top = o.value, t.modal.left = c.value, t.modal.width = p.value, typeof r.modalComponent == "function" ? t.modal.component = r.modalComponent({ table: i, row: d, column: r }) : t.modal.component = r.modalComponent, t.modal.componentProps = r.modalComponentExtraProps);
519
+ const t = Q(e.tableid), n = Z("cell"), { bottom: l, left: s } = kt(n), o = t.cellData(e.colIndex, e.rowIndex), r = y(""), i = y(!1), d = t.table, a = t.columns[e.colIndex], u = t.rows[e.rowIndex], p = a.align || "center", c = a.width || "40ch", f = x(() => typeof b.value == "string" ? Ct(b.value) : !1), v = x(() => {
520
+ var g;
521
+ return {
522
+ textAlign: p,
523
+ width: c,
524
+ backgroundColor: i.value ? "var(--cell-modified-color)" : "inherit",
525
+ fontWeight: i.value ? "bold" : "inherit",
526
+ paddingLeft: Fe(e.colIndex, (g = t.display[e.rowIndex]) == null ? void 0 : g.indent)
527
+ };
528
+ }), b = x(() => {
529
+ const g = t.cellData(e.colIndex, e.rowIndex), A = a.format;
530
+ return A ? typeof A == "function" ? A(g, { table: d, row: u, column: a }) : typeof A == "string" ? Function(`"use strict";return (${A})`)()(g, { table: d, row: u, column: a }) : g : g;
531
+ }), w = () => {
532
+ a.mask, a.modalComponent && (t.modal.visible = !0, t.modal.colIndex = e.colIndex, t.modal.rowIndex = e.rowIndex, t.modal.parent = n.value, t.modal.top = l.value, t.modal.left = s.value, t.modal.width = c, typeof a.modalComponent == "function" ? t.modal.component = a.modalComponent({ table: d, row: u, column: a }) : t.modal.component = a.modalComponent, t.modal.componentProps = a.modalComponentExtraProps);
525
533
  };
526
534
  if (e.addNavigation) {
527
- let x = {
535
+ let g = {
528
536
  ...pe,
529
- "keydown.f2": v,
530
- "keydown.alt.up": v,
531
- "keydown.alt.down": v,
532
- "keydown.alt.left": v,
533
- "keydown.alt.right": v
537
+ "keydown.f2": w,
538
+ "keydown.alt.up": w,
539
+ "keydown.alt.down": w,
540
+ "keydown.alt.left": w,
541
+ "keydown.alt.right": w
534
542
  };
535
- typeof e.addNavigation == "object" && (x = {
536
- ...x,
543
+ typeof e.addNavigation == "object" && (g = {
544
+ ...g,
537
545
  ...e.addNavigation
538
546
  }), me([
539
547
  {
540
548
  selectors: n,
541
- handlers: x
549
+ handlers: g
542
550
  }
543
551
  ]);
544
552
  }
545
- const E = () => {
546
- n.value && (l.value = n.value.textContent);
547
- }, h = () => {
548
- n.value && n.value.textContent !== l.value && (l.value = n.value.textContent, n.value.dispatchEvent(new Event("change")), s.value = !0, r.format || t.setCellData(e.rowIndex, e.colIndex, l.value));
549
- }, C = (x, I) => I && x === 0 && I > 0 ? `${I}ch` : "inherit", A = {
550
- textAlign: u.value,
551
- width: p.value,
552
- backgroundColor: s.value ? "var(--cell-modified-color)" : "inherit",
553
- fontWeight: s.value ? "bold" : "inherit",
554
- paddingLeft: C(e.colIndex, (we = t.display[e.rowIndex]) == null ? void 0 : we.indent)
555
- };
556
- return (x, I) => (w(), g("td", {
553
+ const I = () => {
554
+ n.value && (r.value = n.value.textContent);
555
+ }, k = () => {
556
+ n.value && (i.value = n.value.textContent !== o, n.value.textContent !== r.value && (r.value = n.value.textContent, n.value.dispatchEvent(new Event("change")), a.format || t.setCellData(e.rowIndex, e.colIndex, r.value)));
557
+ }, Fe = (g, A) => A && g === 0 && A > 0 ? `${A}ch` : "inherit";
558
+ return (g, A) => (h(), E("td", {
557
559
  ref: "cell",
558
- "data-colindex": x.colIndex,
559
- "data-rowindex": x.rowIndex,
560
- "data-editable": m(r).edit,
561
- contenteditable: m(r).edit,
562
- tabindex: x.tabIndex,
560
+ "data-colindex": g.colIndex,
561
+ "data-rowindex": g.rowIndex,
562
+ "data-editable": m(a).edit,
563
+ contenteditable: m(a).edit,
564
+ tabindex: g.tabIndex,
563
565
  spellcheck: !1,
564
- style: A,
565
- onFocus: E,
566
- onPaste: h,
567
- onBlur: h,
568
- onInput: h,
569
- onClick: v,
570
- onMousedown: v,
571
- class: j(["atable__cell", x.pinned ? "sticky-column" : ""])
566
+ style: P(v.value),
567
+ onFocus: I,
568
+ onPaste: k,
569
+ onBlur: k,
570
+ onInput: k,
571
+ onClick: w,
572
+ onMousedown: w,
573
+ class: N(["atable__cell", g.pinned ? "sticky-column" : ""])
572
574
  }, [
573
- m(r).cellComponent ? (w(), U(Re(m(r).cellComponent), re({
575
+ m(a).cellComponent ? (h(), q(Te(m(a).cellComponent), re({
574
576
  key: 0,
575
- value: a.value
576
- }, m(r).cellComponentProps), null, 16, ["value"])) : f.value ? (w(), g("span", {
577
+ value: b.value
578
+ }, m(a).cellComponentProps), null, 16, ["value"])) : f.value ? (h(), E("span", {
577
579
  key: 1,
578
- innerHTML: a.value
579
- }, null, 8, It)) : (w(), g("span", St, N(a.value), 1))
580
- ], 42, At));
580
+ innerHTML: b.value
581
+ }, null, 8, At)) : (h(), E("span", St, B(b.value), 1))
582
+ ], 46, It));
581
583
  }
582
- }), $t = ["tabindex"], Ot = ["tabindex"], Tt = ["colspan"], Rt = /* @__PURE__ */ D({
584
+ }), Ot = ["tabindex"], $t = ["tabindex"], Tt = ["colspan"], Dt = /* @__PURE__ */ M({
583
585
  __name: "AExpansionRow",
584
586
  props: {
585
587
  rowIndex: {},
@@ -588,7 +590,7 @@ const Ct = (e) => {
588
590
  addNavigation: { type: [Boolean, Object] }
589
591
  },
590
592
  setup(e) {
591
- const t = Q(e.tableid), n = Z("rowEl"), l = b(() => t.display[e.rowIndex].expanded ? "▼" : "►");
593
+ const t = Q(e.tableid), n = Z("rowEl"), l = x(() => t.display[e.rowIndex].expanded ? "▼" : "►");
592
594
  if (e.addNavigation) {
593
595
  const s = {
594
596
  "keydown.control.g": (o) => {
@@ -602,36 +604,36 @@ const Ct = (e) => {
602
604
  }
603
605
  ]);
604
606
  }
605
- return (s, o) => (w(), g(X, null, [
606
- P("tr", re(s.$attrs, {
607
+ return (s, o) => (h(), E(X, null, [
608
+ W("tr", re(s.$attrs, {
607
609
  ref: "rowEl",
608
610
  tabindex: s.tabIndex,
609
611
  class: "expandable-row"
610
612
  }), [
611
- P("td", {
613
+ W("td", {
612
614
  tabIndex: -1,
613
- onClick: o[0] || (o[0] = (c) => m(t).toggleRowExpand(s.rowIndex)),
615
+ onClick: o[0] || (o[0] = (r) => m(t).toggleRowExpand(s.rowIndex)),
614
616
  class: "row-index"
615
- }, N(l.value), 1),
617
+ }, B(l.value), 1),
616
618
  S(s.$slots, "row")
617
- ], 16, $t),
618
- m(t).display[s.rowIndex].expanded ? (w(), g("tr", {
619
+ ], 16, Ot),
620
+ m(t).display[s.rowIndex].expanded ? (h(), E("tr", {
619
621
  key: 0,
620
622
  ref: "rowExpanded",
621
623
  tabindex: s.tabIndex,
622
624
  class: "expanded-row"
623
625
  }, [
624
- P("td", {
626
+ W("td", {
625
627
  tabIndex: -1,
626
628
  colspan: m(t).columns.length + 1,
627
629
  class: "expanded-row-content"
628
630
  }, [
629
631
  S(s.$slots, "content")
630
632
  ], 8, Tt)
631
- ], 8, Ot)) : J("", !0)
633
+ ], 8, $t)) : J("", !0)
632
634
  ], 64));
633
635
  }
634
- }), Dt = ["tabindex"], He = /* @__PURE__ */ D({
636
+ }), Mt = ["tabindex"], We = /* @__PURE__ */ M({
635
637
  __name: "ARow",
636
638
  props: {
637
639
  rowIndex: {},
@@ -640,7 +642,7 @@ const Ct = (e) => {
640
642
  addNavigation: { type: [Boolean, Object], default: !1 }
641
643
  },
642
644
  setup(e) {
643
- const t = Q(e.tableid), n = Z("rowEl"), l = b(() => t.columns.some((i) => i.pinned)), s = b(() => t.config.view !== "tree" || t.display[e.rowIndex].isRoot || t.display[e.rowIndex].open), o = b(() => t.config.view !== "tree" ? "" : t.display[e.rowIndex].isRoot || t.display[e.rowIndex].isParent ? t.display[e.rowIndex].childrenOpen ? "-" : "+" : ""), c = (i) => {
645
+ const t = Q(e.tableid), n = Z("rowEl"), l = x(() => t.columns.some((i) => i.pinned)), s = x(() => t.config.view !== "tree" || t.display[e.rowIndex].isRoot || t.display[e.rowIndex].open), o = x(() => t.config.view !== "tree" ? "" : t.display[e.rowIndex].isRoot || t.display[e.rowIndex].isParent ? t.display[e.rowIndex].childrenOpen ? "-" : "+" : ""), r = (i) => {
644
646
  t.toggleRowExpand(i);
645
647
  };
646
648
  if (e.addNavigation) {
@@ -655,44 +657,44 @@ const Ct = (e) => {
655
657
  }
656
658
  ]);
657
659
  }
658
- return (i, r) => te((w(), g("tr", {
660
+ return (i, d) => te((h(), E("tr", {
659
661
  ref: "rowEl",
660
662
  tabindex: i.tabIndex,
661
663
  class: "table-row"
662
664
  }, [
663
665
  S(i.$slots, "index", {}, () => [
664
- m(t).config.view === "list" ? (w(), g("td", {
666
+ m(t).config.view === "list" ? (h(), E("td", {
665
667
  key: 0,
666
668
  tabIndex: -1,
667
- class: j(["list-index", l.value ? "sticky-index" : ""])
668
- }, N(i.rowIndex + 1), 3)) : m(t).config.view === "tree" ? (w(), g("td", {
669
+ class: N(["list-index", l.value ? "sticky-index" : ""])
670
+ }, B(i.rowIndex + 1), 3)) : m(t).config.view === "tree" ? (h(), E("td", {
669
671
  key: 1,
670
672
  tabIndex: -1,
671
- class: j(["tree-index", l.value ? "sticky-index" : ""]),
672
- onClick: r[0] || (r[0] = (d) => c(i.rowIndex))
673
- }, N(o.value), 3)) : J("", !0)
673
+ class: N(["tree-index", l.value ? "sticky-index" : ""]),
674
+ onClick: d[0] || (d[0] = (a) => r(i.rowIndex))
675
+ }, B(o.value), 3)) : J("", !0)
674
676
  ]),
675
677
  S(i.$slots, "default")
676
- ], 8, Dt)), [
678
+ ], 8, Mt)), [
677
679
  [De, s.value]
678
680
  ]);
679
681
  }
680
682
  });
681
- function je(e) {
683
+ function He(e) {
682
684
  return le() ? (se(e), !0) : !1;
683
685
  }
684
- function W(e) {
686
+ function H(e) {
685
687
  return typeof e == "function" ? e() : m(e);
686
688
  }
687
- const Ne = typeof window < "u" && typeof document < "u";
689
+ const je = typeof window < "u" && typeof document < "u";
688
690
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
689
- const Lt = Object.prototype.toString, Mt = (e) => Lt.call(e) === "[object Object]", H = () => {
691
+ const Rt = Object.prototype.toString, Lt = (e) => Rt.call(e) === "[object Object]", j = () => {
690
692
  }, oe = /* @__PURE__ */ Pt();
691
693
  function Pt() {
692
694
  var e, t;
693
- return Ne && ((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));
695
+ return je && ((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));
694
696
  }
695
- const Se = {
697
+ const Ae = {
696
698
  mounted: "mounted",
697
699
  updated: "updated",
698
700
  unmounted: "unmounted"
@@ -701,78 +703,78 @@ function Wt(...e) {
701
703
  if (e.length !== 1)
702
704
  return Ye(...e);
703
705
  const t = e[0];
704
- return typeof t == "function" ? Xe(Je(() => ({ get: t, set: H }))) : y(t);
706
+ return typeof t == "function" ? Xe(Je(() => ({ get: t, set: j }))) : y(t);
705
707
  }
706
- function M(e) {
708
+ function L(e) {
707
709
  var t;
708
- const n = W(e);
710
+ const n = H(e);
709
711
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
710
712
  }
711
- const Be = Ne ? window : void 0;
713
+ const Ne = je ? window : void 0;
712
714
  function Y(...e) {
713
715
  let t, n, l, s;
714
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = Be) : [t, n, l, s] = e, !t)
715
- return H;
716
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, l, s] = e, t = Ne) : [t, n, l, s] = e, !t)
717
+ return j;
716
718
  Array.isArray(n) || (n = [n]), Array.isArray(l) || (l = [l]);
717
- const o = [], c = () => {
719
+ const o = [], r = () => {
718
720
  o.forEach((u) => u()), o.length = 0;
719
- }, i = (u, p, a, f) => (u.addEventListener(p, a, f), () => u.removeEventListener(p, a, f)), r = k(
720
- () => [M(t), W(s)],
721
+ }, i = (u, p, c, f) => (u.addEventListener(p, c, f), () => u.removeEventListener(p, c, f)), d = C(
722
+ () => [L(t), H(s)],
721
723
  ([u, p]) => {
722
- if (c(), !u)
724
+ if (r(), !u)
723
725
  return;
724
- const a = Mt(p) ? { ...p } : p;
726
+ const c = Lt(p) ? { ...p } : p;
725
727
  o.push(
726
- ...n.flatMap((f) => l.map((v) => i(u, f, v, a)))
728
+ ...n.flatMap((f) => l.map((v) => i(u, f, v, c)))
727
729
  );
728
730
  },
729
731
  { immediate: !0, flush: "post" }
730
- ), d = () => {
731
- r(), c();
732
+ ), a = () => {
733
+ d(), r();
732
734
  };
733
- return je(d), d;
735
+ return He(a), a;
734
736
  }
735
- let $e = !1;
737
+ let Se = !1;
736
738
  function Oe(e, t, n = {}) {
737
- const { window: l = Be, ignore: s = [], capture: o = !0, detectIframe: c = !1 } = n;
739
+ const { window: l = Ne, ignore: s = [], capture: o = !0, detectIframe: r = !1 } = n;
738
740
  if (!l)
739
- return H;
740
- oe && !$e && ($e = !0, Array.from(l.document.body.children).forEach((a) => a.addEventListener("click", H)), l.document.documentElement.addEventListener("click", H));
741
+ return j;
742
+ oe && !Se && (Se = !0, Array.from(l.document.body.children).forEach((c) => c.addEventListener("click", j)), l.document.documentElement.addEventListener("click", j));
741
743
  let i = !0;
742
- const r = (a) => s.some((f) => {
744
+ const d = (c) => s.some((f) => {
743
745
  if (typeof f == "string")
744
- return Array.from(l.document.querySelectorAll(f)).some((v) => v === a.target || a.composedPath().includes(v));
746
+ return Array.from(l.document.querySelectorAll(f)).some((v) => v === c.target || c.composedPath().includes(v));
745
747
  {
746
- const v = M(f);
747
- return v && (a.target === v || a.composedPath().includes(v));
748
+ const v = L(f);
749
+ return v && (c.target === v || c.composedPath().includes(v));
748
750
  }
749
751
  }), u = [
750
- Y(l, "click", (a) => {
751
- const f = M(e);
752
- if (!(!f || f === a.target || a.composedPath().includes(f))) {
753
- if (a.detail === 0 && (i = !r(a)), !i) {
752
+ Y(l, "click", (c) => {
753
+ const f = L(e);
754
+ if (!(!f || f === c.target || c.composedPath().includes(f))) {
755
+ if (c.detail === 0 && (i = !d(c)), !i) {
754
756
  i = !0;
755
757
  return;
756
758
  }
757
- t(a);
759
+ t(c);
758
760
  }
759
761
  }, { passive: !0, capture: o }),
760
- Y(l, "pointerdown", (a) => {
761
- const f = M(e);
762
- i = !r(a) && !!(f && !a.composedPath().includes(f));
762
+ Y(l, "pointerdown", (c) => {
763
+ const f = L(e);
764
+ i = !d(c) && !!(f && !c.composedPath().includes(f));
763
765
  }, { passive: !0 }),
764
- c && Y(l, "blur", (a) => {
766
+ r && Y(l, "blur", (c) => {
765
767
  setTimeout(() => {
766
768
  var f;
767
- const v = M(e);
768
- ((f = l.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(v != null && v.contains(l.document.activeElement)) && t(a);
769
+ const v = L(e);
770
+ ((f = l.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(v != null && v.contains(l.document.activeElement)) && t(c);
769
771
  }, 0);
770
772
  })
771
773
  ].filter(Boolean);
772
- return () => u.forEach((a) => a());
774
+ return () => u.forEach((c) => c());
773
775
  }
774
776
  const Ht = {
775
- [Se.mounted](e, t) {
777
+ [Ae.mounted](e, t) {
776
778
  const n = !t.modifiers.bubble;
777
779
  if (typeof t.value == "function")
778
780
  e.__onClickOutside_stop = Oe(e, t.value, { capture: n });
@@ -781,62 +783,62 @@ const Ht = {
781
783
  e.__onClickOutside_stop = Oe(e, l, Object.assign({ capture: n }, s));
782
784
  }
783
785
  },
784
- [Se.unmounted](e) {
786
+ [Ae.unmounted](e) {
785
787
  e.__onClickOutside_stop();
786
788
  }
787
789
  };
788
790
  function _(e) {
789
791
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
790
792
  }
791
- function Ve(e) {
793
+ function Be(e) {
792
794
  const t = window.getComputedStyle(e);
793
795
  if (t.overflowX === "scroll" || t.overflowY === "scroll" || t.overflowX === "auto" && e.clientWidth < e.scrollWidth || t.overflowY === "auto" && e.clientHeight < e.scrollHeight)
794
796
  return !0;
795
797
  {
796
798
  const n = e.parentNode;
797
- return !n || n.tagName === "BODY" ? !1 : Ve(n);
799
+ return !n || n.tagName === "BODY" ? !1 : Be(n);
798
800
  }
799
801
  }
800
802
  function jt(e) {
801
803
  const t = e || window.event, n = t.target;
802
- return Ve(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
804
+ return Be(n) ? !1 : t.touches.length > 1 ? !0 : (t.preventDefault && t.preventDefault(), !1);
803
805
  }
804
806
  const ee = /* @__PURE__ */ new WeakMap();
805
807
  function Nt(e, t = !1) {
806
808
  const n = y(t);
807
809
  let l = null, s = "";
808
- k(Wt(e), (i) => {
809
- const r = _(W(i));
810
- if (r) {
811
- const d = r;
812
- if (ee.get(d) || ee.set(d, d.style.overflow), d.style.overflow !== "hidden" && (s = d.style.overflow), d.style.overflow === "hidden")
810
+ C(Wt(e), (i) => {
811
+ const d = _(H(i));
812
+ if (d) {
813
+ const a = d;
814
+ if (ee.get(a) || ee.set(a, a.style.overflow), a.style.overflow !== "hidden" && (s = a.style.overflow), a.style.overflow === "hidden")
813
815
  return n.value = !0;
814
816
  if (n.value)
815
- return d.style.overflow = "hidden";
817
+ return a.style.overflow = "hidden";
816
818
  }
817
819
  }, {
818
820
  immediate: !0
819
821
  });
820
822
  const o = () => {
821
- const i = _(W(e));
823
+ const i = _(H(e));
822
824
  !i || n.value || (oe && (l = Y(
823
825
  i,
824
826
  "touchmove",
825
- (r) => {
826
- jt(r);
827
+ (d) => {
828
+ jt(d);
827
829
  },
828
830
  { passive: !1 }
829
831
  )), i.style.overflow = "hidden", n.value = !0);
830
- }, c = () => {
831
- const i = _(W(e));
832
+ }, r = () => {
833
+ const i = _(H(e));
832
834
  !i || !n.value || (oe && (l == null || l()), i.style.overflow = s, ee.delete(i), n.value = !1);
833
835
  };
834
- return je(c), b({
836
+ return He(r), x({
835
837
  get() {
836
838
  return n.value;
837
839
  },
838
840
  set(i) {
839
- i ? o() : c();
841
+ i ? o() : r();
840
842
  }
841
843
  });
842
844
  }
@@ -848,12 +850,12 @@ function Bt() {
848
850
  return;
849
851
  e = !0;
850
852
  const s = Nt(n, l.value);
851
- k(t, (o) => s.value = o);
853
+ C(t, (o) => s.value = o);
852
854
  };
853
855
  }
854
856
  Bt();
855
857
  class Vt {
856
- constructor(t, n, l, s, o, c) {
858
+ constructor(t, n, l, s, o, r) {
857
859
  T(this, "id");
858
860
  T(this, "rows");
859
861
  T(this, "columns");
@@ -861,7 +863,7 @@ class Vt {
861
863
  T(this, "table");
862
864
  T(this, "display");
863
865
  T(this, "modal");
864
- this.id = t || crypto.randomUUID(), this.rows = l, this.columns = L(n), this.config = L(s), this.table = o || L(this.createTableObject()), this.display = this.createDisplayObject(c), this.modal = L({ visible: !1 });
866
+ this.id = t || crypto.randomUUID(), this.rows = l, this.columns = R(n), this.config = R(s), this.table = o || R(this.createTableObject()), this.display = this.createDisplayObject(r), this.modal = R({ visible: !1 });
865
867
  }
866
868
  createTableObject() {
867
869
  const t = {};
@@ -871,7 +873,7 @@ class Vt {
871
873
  return t;
872
874
  }
873
875
  createDisplayObject(t) {
874
- const n = [Object.assign({}, { modified: !1 })];
876
+ const n = [Object.assign({}, { rowModified: !1 })];
875
877
  if (t && "0:0" in t)
876
878
  return t;
877
879
  const l = /* @__PURE__ */ new Set();
@@ -883,26 +885,25 @@ class Vt {
883
885
  indent: o.indent || null,
884
886
  isParent: l.has(s),
885
887
  isRoot: o.parent === null || o.parent === void 0,
886
- modified: !1,
888
+ rowModified: !1,
887
889
  open: o.parent === null || o.parent === void 0,
888
890
  parent: o.parent
889
891
  };
890
892
  }
891
- return L(n);
893
+ return R(n);
892
894
  }
893
895
  get zeroColumn() {
894
896
  return ["list", "tree", "list-expansion"].includes(this.config.view);
895
897
  }
896
898
  get numberedRowWidth() {
897
- return b(() => String(Math.ceil(this.rows.length / 100) + 1) + "ch");
899
+ return x(() => String(Math.ceil(this.rows.length / 100) + 1) + "ch");
898
900
  }
899
901
  cellData(t, n) {
900
902
  return this.table[`${t}:${n}`];
901
903
  }
902
904
  setCellData(t, n, l) {
903
- this.table[`${n}:${t}`] !== l && (this.display[t].modified = !0), this.table[`${n}:${t}`] = l;
904
- const s = this.columns[n];
905
- return this.rows[t][s.name] = l, this.table[`${n}:${t}`];
905
+ const s = `${n}:${t}`, o = this.columns[n];
906
+ return this.table[s] !== l && (this.display[t].rowModified = !0), this.table[s] = l, this.rows[t][o.name] = l, this.table[s];
906
907
  }
907
908
  toggleRowExpand(t) {
908
909
  if (this.config.view === "tree") {
@@ -918,39 +919,39 @@ const zt = {
918
919
  }, Ft = {
919
920
  class: "atable-header-row",
920
921
  tabindex: "-1"
921
- }, ze = /* @__PURE__ */ D({
922
+ }, Ve = /* @__PURE__ */ M({
922
923
  __name: "ATableHeader",
923
924
  props: {
924
925
  columns: {},
925
926
  tableid: {}
926
927
  },
927
928
  setup(e) {
928
- const t = Q(e.tableid), n = b(() => t.columns.some((s) => s.pinned)), l = (s) => ({
929
+ const t = Q(e.tableid), n = x(() => t.columns.some((s) => s.pinned)), l = (s) => ({
929
930
  minWidth: s.width || "40ch",
930
931
  textAlign: s.align || "center",
931
932
  width: t.config.fullWidth ? "auto" : null
932
933
  });
933
- return (s, o) => s.columns.length ? (w(), g("thead", zt, [
934
- P("tr", Ft, [
935
- m(t).zeroColumn ? (w(), g("th", {
934
+ return (s, o) => s.columns.length ? (h(), E("thead", zt, [
935
+ W("tr", Ft, [
936
+ m(t).zeroColumn ? (h(), E("th", {
936
937
  key: 0,
937
938
  id: "header-index",
938
- class: j(n.value ? "sticky-index" : "")
939
+ class: N(n.value ? "sticky-index" : "")
939
940
  }, null, 2)) : J("", !0),
940
- (w(!0), g(X, null, ne(s.columns, (c, i) => (w(), g("th", {
941
- key: c.name,
941
+ (h(!0), E(X, null, ne(s.columns, (r, i) => (h(), E("th", {
942
+ key: r.name,
942
943
  tabindex: "-1",
943
- style: q(l(c)),
944
- class: j(c.pinned ? "sticky-column" : "")
944
+ style: P(l(r)),
945
+ class: N(r.pinned ? "sticky-column" : "")
945
946
  }, [
946
947
  S(s.$slots, "default", {}, () => [
947
- Qe(N(c.label || String.fromCharCode(i + 97).toUpperCase()), 1)
948
+ Qe(B(r.label || String.fromCharCode(i + 97).toUpperCase()), 1)
948
949
  ])
949
950
  ], 6))), 128))
950
951
  ])
951
952
  ])) : J("", !0);
952
953
  }
953
- }), Fe = /* @__PURE__ */ D({
954
+ }), ze = /* @__PURE__ */ M({
954
955
  __name: "ATableModal",
955
956
  props: {
956
957
  colIndex: {},
@@ -961,7 +962,7 @@ const zt = {
961
962
  const t = (n) => {
962
963
  n.stopPropagation();
963
964
  };
964
- return (n, l) => (w(), g("div", {
965
+ return (n, l) => (h(), E("div", {
965
966
  class: "amodal",
966
967
  tabindex: "-1",
967
968
  onClick: t,
@@ -970,7 +971,7 @@ const zt = {
970
971
  S(n.$slots, "default")
971
972
  ], 32));
972
973
  }
973
- }), Gt = /* @__PURE__ */ D({
974
+ }), Gt = /* @__PURE__ */ M({
974
975
  __name: "ATable",
975
976
  props: {
976
977
  id: {},
@@ -982,72 +983,72 @@ const zt = {
982
983
  emits: ["update:modelValue"],
983
984
  setup(e, { emit: t }) {
984
985
  const n = t, l = Z("table"), s = e.modelValue ? e.modelValue : e.rows, o = new Vt(e.id, e.columns, s, e.config);
985
- Ze(o.id, o), k(
986
+ Ze(o.id, o), C(
986
987
  () => o.rows,
987
- (r) => {
988
- n("update:modelValue", r);
988
+ (d) => {
989
+ n("update:modelValue", d);
989
990
  },
990
991
  { deep: !0 }
991
- ), z(() => {
992
- e.columns.some((r) => r.pinned) && (c(), o.config.view === "tree" && Pe(l, c, { childList: !0, subtree: !0 }));
992
+ ), F(() => {
993
+ e.columns.some((d) => d.pinned) && (r(), o.config.view === "tree" && Le(l, r, { childList: !0, subtree: !0 }));
993
994
  });
994
- const c = () => {
995
- const r = l.value, d = r.rows[0], u = r.rows[1], p = d ? Array.from(d.cells) : [];
996
- for (const [a, f] of p.entries()) {
997
- const v = u.cells[a];
995
+ const r = () => {
996
+ const d = l.value, a = d.rows[0], u = d.rows[1], p = a ? Array.from(a.cells) : [];
997
+ for (const [c, f] of p.entries()) {
998
+ const v = u.cells[c];
998
999
  v && (f.style.width = `${v.offsetWidth}px`);
999
1000
  }
1000
- for (const a of r.rows) {
1001
+ for (const c of d.rows) {
1001
1002
  let f = 0;
1002
1003
  const v = [];
1003
- for (const E of a.cells)
1004
- (E.classList.contains("sticky-column") || E.classList.contains("sticky-index")) && (E.style.left = `${f}px`, f += E.offsetWidth, v.push(E));
1004
+ for (const b of c.cells)
1005
+ (b.classList.contains("sticky-column") || b.classList.contains("sticky-index")) && (b.style.left = `${f}px`, f += b.offsetWidth, v.push(b));
1005
1006
  v.length > 0 && v[v.length - 1].classList.add("sticky-column-edge");
1006
1007
  }
1007
- }, i = (r) => {
1008
- var d;
1009
- r.target instanceof Node && (d = o.modal.parent) != null && d.contains(r.target) || o.modal.visible && (o.modal.visible = !1);
1008
+ }, i = (d) => {
1009
+ var a;
1010
+ d.target instanceof Node && (a = o.modal.parent) != null && a.contains(d.target) || o.modal.visible && (o.modal.visible = !1);
1010
1011
  };
1011
- return window.addEventListener("keydown", (r) => {
1012
- if (r.key === "Escape" && o.modal.visible) {
1012
+ return window.addEventListener("keydown", (d) => {
1013
+ if (d.key === "Escape" && o.modal.visible) {
1013
1014
  o.modal.visible = !1;
1014
- const d = o.modal.parent;
1015
- d && Te().then(() => {
1016
- d.focus();
1015
+ const a = o.modal.parent;
1016
+ a && $e().then(() => {
1017
+ a.focus();
1017
1018
  });
1018
1019
  }
1019
- }), (r, d) => te((w(), g("table", {
1020
+ }), (d, a) => te((h(), E("table", {
1020
1021
  ref: "table",
1021
1022
  class: "atable",
1022
- style: q({ width: m(o).config.fullWidth ? "100%" : "auto" })
1023
+ style: P({ width: m(o).config.fullWidth ? "100%" : "auto" })
1023
1024
  }, [
1024
- S(r.$slots, "header", { data: m(o) }, () => [
1025
- ye(ze, {
1025
+ S(d.$slots, "header", { data: m(o) }, () => [
1026
+ he(Ve, {
1026
1027
  columns: m(o).columns,
1027
1028
  tableid: m(o).id
1028
1029
  }, null, 8, ["columns", "tableid"])
1029
1030
  ], !0),
1030
- P("tbody", null, [
1031
- S(r.$slots, "body", { data: m(o) }, () => [
1032
- (w(!0), g(X, null, ne(m(o).rows, (u, p) => (w(), U(He, {
1031
+ W("tbody", null, [
1032
+ S(d.$slots, "body", { data: m(o) }, () => [
1033
+ (h(!0), E(X, null, ne(m(o).rows, (u, p) => (h(), q(We, {
1033
1034
  key: u.id,
1034
1035
  row: u,
1035
1036
  rowIndex: p,
1036
1037
  tableid: m(o).id
1037
1038
  }, {
1038
- default: be(() => [
1039
- (w(!0), g(X, null, ne(m(o).columns, (a, f) => (w(), U(We, {
1040
- key: a.name,
1039
+ default: ye(() => [
1040
+ (h(!0), E(X, null, ne(m(o).columns, (c, f) => (h(), q(Pe, {
1041
+ key: c.name,
1041
1042
  tableid: m(o).id,
1042
- col: a,
1043
+ col: c,
1043
1044
  spellcheck: "false",
1044
- pinned: a.pinned,
1045
+ pinned: c.pinned,
1045
1046
  rowIndex: p,
1046
1047
  colIndex: f + (m(o).zeroColumn ? 0 : -1),
1047
- component: a.cellComponent,
1048
- style: q({
1049
- textAlign: (a == null ? void 0 : a.align) || "center",
1050
- minWidth: (a == null ? void 0 : a.width) || "40ch",
1048
+ component: c.cellComponent,
1049
+ style: P({
1050
+ textAlign: (c == null ? void 0 : c.align) || "center",
1051
+ minWidth: (c == null ? void 0 : c.width) || "40ch",
1051
1052
  width: m(o).config.fullWidth ? "auto" : null
1052
1053
  })
1053
1054
  }, null, 8, ["tableid", "col", "pinned", "rowIndex", "colIndex", "component", "style"]))), 128))
@@ -1056,20 +1057,20 @@ const zt = {
1056
1057
  }, 1032, ["row", "rowIndex", "tableid"]))), 128))
1057
1058
  ], !0)
1058
1059
  ]),
1059
- S(r.$slots, "footer", { data: m(o) }, void 0, !0),
1060
- S(r.$slots, "modal", { data: m(o) }, () => [
1061
- te(ye(Fe, {
1060
+ S(d.$slots, "footer", { data: m(o) }, void 0, !0),
1061
+ S(d.$slots, "modal", { data: m(o) }, () => [
1062
+ te(he(ze, {
1062
1063
  colIndex: m(o).modal.colIndex,
1063
1064
  rowIndex: m(o).modal.rowIndex,
1064
1065
  tableid: m(o).id,
1065
- style: q({
1066
+ style: P({
1066
1067
  left: m(o).modal.left + "px",
1067
1068
  top: m(o).modal.top + "px",
1068
1069
  maxWidth: m(o).modal.width + "px"
1069
1070
  })
1070
1071
  }, {
1071
- default: be(() => [
1072
- (w(), U(Re(m(o).modal.component), re({
1072
+ default: ye(() => [
1073
+ (h(), q(Te(m(o).modal.component), re({
1073
1074
  key: `${m(o).modal.rowIndex}:${m(o).modal.colIndex}`,
1074
1075
  colIndex: m(o).modal.colIndex,
1075
1076
  rowIndex: m(o).modal.rowIndex,
@@ -1092,15 +1093,15 @@ const zt = {
1092
1093
  return n;
1093
1094
  }, qt = /* @__PURE__ */ Ut(Gt, [["__scopeId", "data-v-2896bed9"]]);
1094
1095
  function Qt(e) {
1095
- e.component("ACell", We), e.component("AExpansionRow", Rt), e.component("ARow", He), e.component("ATable", qt), e.component("ATableHeader", ze), e.component("ATableModal", Fe);
1096
+ e.component("ACell", Pe), e.component("AExpansionRow", Dt), e.component("ARow", We), e.component("ATable", qt), e.component("ATableHeader", Ve), e.component("ATableModal", ze);
1096
1097
  }
1097
1098
  export {
1098
- We as ACell,
1099
- Rt as AExpansionRow,
1100
- He as ARow,
1099
+ Pe as ACell,
1100
+ Dt as AExpansionRow,
1101
+ We as ARow,
1101
1102
  qt as ATable,
1102
- ze as ATableHeader,
1103
- Fe as ATableModal,
1103
+ Ve as ATableHeader,
1104
+ ze as ATableModal,
1104
1105
  Vt as TableDataStore,
1105
1106
  Qt as install
1106
1107
  };