@stonecrop/atable 0.11.7 → 0.11.8

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,7 +1,7 @@
1
- import { onMounted as He, ref as z, watch as ce, onBeforeUnmount as Bt, computed as T, shallowRef as ie, toValue as D, watchEffect as Pt, getCurrentScope as $t, onScopeDispose as Et, getCurrentInstance as lt, unref as Z, nextTick as at, isRef as Zt, toRefs as Nt, customRef as St, toRef as Wt, readonly as Ft, defineComponent as we, useTemplateRef as re, openBlock as y, createElementBlock as C, normalizeClass as oe, normalizeStyle as me, createBlock as ve, resolveDynamicComponent as We, mergeProps as st, toDisplayString as xe, Fragment as he, createElementVNode as W, renderSlot as fe, createCommentVNode as K, useCssVars as zt, onUnmounted as Xt, withModifiers as Se, withDirectives as de, renderList as ye, vShow as it, reactive as Gt, vModelText as Ne, vModelCheckbox as Yt, vModelSelect as Ut, createTextVNode as jt, useModel as wt, createVNode as pt, withCtx as xt, mergeModels as yt } from "vue";
1
+ import { onMounted as He, ref as z, watch as ce, onBeforeUnmount as Bt, computed as T, shallowRef as ie, toValue as D, watchEffect as Pt, getCurrentScope as It, onScopeDispose as Et, getCurrentInstance as lt, unref as Z, nextTick as at, isRef as Zt, toRefs as Nt, customRef as St, toRef as Wt, readonly as Ft, defineComponent as we, useTemplateRef as re, openBlock as y, createElementBlock as C, normalizeClass as oe, normalizeStyle as me, createBlock as ve, resolveDynamicComponent as We, mergeProps as st, toDisplayString as xe, Fragment as he, createElementVNode as W, renderSlot as fe, createCommentVNode as K, useCssVars as zt, onUnmounted as Xt, withModifiers as Se, withDirectives as de, renderList as ye, vShow as it, reactive as Gt, vModelText as Ne, vModelCheckbox as Yt, vModelSelect as Ut, createTextVNode as jt, useModel as wt, createVNode as pt, withCtx as xt, mergeModels as yt } from "vue";
2
2
  import { defineStore as qt } from "pinia";
3
3
  import './assets/index.css';function At(e, t) {
4
- return $t() ? (Et(e, t), !0) : !1;
4
+ return It() ? (Et(e, t), !0) : !1;
5
5
  }
6
6
  const Jt = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -23,23 +23,23 @@ function De(e) {
23
23
  return (t = s?.$el) !== null && t !== void 0 ? t : s;
24
24
  }
25
25
  function Fe(...e) {
26
- const t = (i, u, o, a) => (i.addEventListener(u, o, a), () => i.removeEventListener(u, o, a)), s = T(() => {
27
- const i = Ue(D(e[0])).filter((u) => u != null);
28
- return i.every((u) => typeof u != "string") ? i : void 0;
26
+ const t = (i, d, l, o) => (i.addEventListener(d, l, o), () => i.removeEventListener(d, l, o)), s = T(() => {
27
+ const i = Ue(D(e[0])).filter((d) => d != null);
28
+ return i.every((d) => typeof d != "string") ? i : void 0;
29
29
  });
30
30
  return tn(() => {
31
- var i, u;
31
+ var i, d;
32
32
  return [
33
- (i = (u = s.value) === null || u === void 0 ? void 0 : u.map((o) => De(o))) !== null && i !== void 0 ? i : [Le].filter((o) => o != null),
33
+ (i = (d = s.value) === null || d === void 0 ? void 0 : d.map((l) => De(l))) !== null && i !== void 0 ? i : [Le].filter((l) => l != null),
34
34
  Ue(D(s.value ? e[1] : e[0])),
35
35
  Ue(Z(s.value ? e[2] : e[1])),
36
36
  D(s.value ? e[3] : e[2])
37
37
  ];
38
- }, ([i, u, o, a], n, c) => {
39
- if (!i?.length || !u?.length || !o?.length) return;
40
- const r = _t(a) ? { ...a } : a, f = i.flatMap((g) => u.flatMap(($) => o.map((V) => t(g, $, V, r))));
41
- c(() => {
42
- f.forEach((g) => g());
38
+ }, ([i, d, l, o], n, r) => {
39
+ if (!i?.length || !d?.length || !l?.length) return;
40
+ const c = _t(o) ? { ...o } : o, f = i.flatMap((w) => d.flatMap((E) => l.map((V) => t(w, E, V, c))));
41
+ r(() => {
42
+ f.forEach((w) => w());
43
43
  });
44
44
  }, { flush: "post" });
45
45
  }
@@ -56,98 +56,98 @@ function on(e) {
56
56
  return T(() => (t.value, !!e()));
57
57
  }
58
58
  function ln(e, t, s = {}) {
59
- const { window: i = Le, ...u } = s;
60
- let o;
61
- const a = /* @__PURE__ */ on(() => i && "MutationObserver" in i), n = () => {
62
- o && (o.disconnect(), o = void 0);
63
- }, c = ce(T(() => {
64
- const g = Ue(D(e)).map(De).filter(Qt);
65
- return new Set(g);
66
- }), (g) => {
67
- n(), a.value && g.size && (o = new MutationObserver(t), g.forEach(($) => o.observe($, u)));
59
+ const { window: i = Le, ...d } = s;
60
+ let l;
61
+ const o = /* @__PURE__ */ on(() => i && "MutationObserver" in i), n = () => {
62
+ l && (l.disconnect(), l = void 0);
63
+ }, r = ce(T(() => {
64
+ const w = Ue(D(e)).map(De).filter(Qt);
65
+ return new Set(w);
66
+ }), (w) => {
67
+ n(), o.value && w.size && (l = new MutationObserver(t), w.forEach((E) => l.observe(E, d)));
68
68
  }, {
69
69
  immediate: !0,
70
70
  flush: "post"
71
- }), r = () => o?.takeRecords(), f = () => {
72
- c(), n();
71
+ }), c = () => l?.takeRecords(), f = () => {
72
+ r(), n();
73
73
  };
74
74
  return At(f), {
75
- isSupported: a,
75
+ isSupported: o,
76
76
  stop: f,
77
- takeRecords: r
77
+ takeRecords: c
78
78
  };
79
79
  }
80
80
  function an(e, t, s = {}) {
81
- const { window: i = Le, document: u = i?.document, flush: o = "sync" } = s;
82
- if (!i || !u) return en;
83
- let a;
81
+ const { window: i = Le, document: d = i?.document, flush: l = "sync" } = s;
82
+ if (!i || !d) return en;
83
+ let o;
84
84
  const n = (f) => {
85
- a?.(), a = f;
86
- }, c = Pt(() => {
85
+ o?.(), o = f;
86
+ }, r = Pt(() => {
87
87
  const f = De(e);
88
88
  if (f) {
89
- const { stop: g } = ln(u, ($) => {
90
- $.map((V) => [...V.removedNodes]).flat().some((V) => V === f || V.contains(f)) && t($);
89
+ const { stop: w } = ln(d, (E) => {
90
+ E.map((V) => [...V.removedNodes]).flat().some((V) => V === f || V.contains(f)) && t(E);
91
91
  }, {
92
92
  window: i,
93
93
  childList: !0,
94
94
  subtree: !0
95
95
  });
96
- n(g);
96
+ n(w);
97
97
  }
98
- }, { flush: o }), r = () => {
99
- c(), n();
98
+ }, { flush: l }), c = () => {
99
+ r(), n();
100
100
  };
101
- return At(r), r;
101
+ return At(c), c;
102
102
  }
103
103
  // @__NO_SIDE_EFFECTS__
104
104
  function sn(e = {}) {
105
105
  var t;
106
- const { window: s = Le, deep: i = !0, triggerOnRemoval: u = !1 } = e, o = (t = e.document) !== null && t !== void 0 ? t : s?.document, a = () => {
107
- let r = o?.activeElement;
106
+ const { window: s = Le, deep: i = !0, triggerOnRemoval: d = !1 } = e, l = (t = e.document) !== null && t !== void 0 ? t : s?.document, o = () => {
107
+ let c = l?.activeElement;
108
108
  if (i)
109
- for (var f; r?.shadowRoot; ) r = r == null || (f = r.shadowRoot) === null || f === void 0 ? void 0 : f.activeElement;
110
- return r;
111
- }, n = ie(), c = () => {
112
- n.value = a();
109
+ for (var f; c?.shadowRoot; ) c = c == null || (f = c.shadowRoot) === null || f === void 0 ? void 0 : f.activeElement;
110
+ return c;
111
+ }, n = ie(), r = () => {
112
+ n.value = o();
113
113
  };
114
114
  if (s) {
115
- const r = {
115
+ const c = {
116
116
  capture: !0,
117
117
  passive: !0
118
118
  };
119
119
  Fe(s, "blur", (f) => {
120
- f.relatedTarget === null && c();
121
- }, r), Fe(s, "focus", c, r);
120
+ f.relatedTarget === null && r();
121
+ }, c), Fe(s, "focus", r, c);
122
122
  }
123
- return u && an(n, c, { document: o }), c(), n;
123
+ return d && an(n, r, { document: l }), r(), n;
124
124
  }
125
125
  const rn = "focusin", cn = "focusout", un = ":focus-within";
126
126
  function dn(e, t = {}) {
127
- const { window: s = Le } = t, i = T(() => De(e)), u = ie(!1), o = T(() => u.value);
128
- if (!s || !(/* @__PURE__ */ sn(t)).value) return { focused: o };
129
- const a = { passive: !0 };
130
- return Fe(i, rn, () => u.value = !0, a), Fe(i, cn, () => {
131
- var n, c, r;
132
- return u.value = (n = (c = i.value) === null || c === void 0 || (r = c.matches) === null || r === void 0 ? void 0 : r.call(c, un)) !== null && n !== void 0 ? n : !1;
133
- }, a), { focused: o };
127
+ const { window: s = Le } = t, i = T(() => De(e)), d = ie(!1), l = T(() => d.value);
128
+ if (!s || !(/* @__PURE__ */ sn(t)).value) return { focused: l };
129
+ const o = { passive: !0 };
130
+ return Fe(i, rn, () => d.value = !0, o), Fe(i, cn, () => {
131
+ var n, r, c;
132
+ return d.value = (n = (r = i.value) === null || r === void 0 || (c = r.matches) === null || c === void 0 ? void 0 : c.call(r, un)) !== null && n !== void 0 ? n : !1;
133
+ }, o), { focused: l };
134
134
  }
135
135
  function fn(e, { window: t = Le, scrollTarget: s } = {}) {
136
- const i = z(!1), u = () => {
136
+ const i = z(!1), d = () => {
137
137
  if (!t) return;
138
- const o = t.document, a = De(e);
139
- if (!a)
138
+ const l = t.document, o = De(e);
139
+ if (!o)
140
140
  i.value = !1;
141
141
  else {
142
- const n = a.getBoundingClientRect();
143
- i.value = n.top <= (t.innerHeight || o.documentElement.clientHeight) && n.left <= (t.innerWidth || o.documentElement.clientWidth) && n.bottom >= 0 && n.right >= 0;
142
+ const n = o.getBoundingClientRect();
143
+ i.value = n.top <= (t.innerHeight || l.documentElement.clientHeight) && n.left <= (t.innerWidth || l.documentElement.clientWidth) && n.bottom >= 0 && n.right >= 0;
144
144
  }
145
145
  };
146
146
  return ce(
147
147
  () => De(e),
148
- () => u(),
148
+ () => d(),
149
149
  { immediate: !0, flush: "post" }
150
- ), t && Fe(s || t, "scroll", u, {
150
+ ), t && Fe(s || t, "scroll", d, {
151
151
  capture: !1,
152
152
  passive: !0
153
153
  }), i;
@@ -177,14 +177,14 @@ const be = (e) => {
177
177
  if (t instanceof HTMLTableCellElement) {
178
178
  const i = t.parentElement?.parentElement;
179
179
  if (i) {
180
- const u = i.firstElementChild?.children[t.cellIndex];
181
- u && (s = u);
180
+ const d = i.firstElementChild?.children[t.cellIndex];
181
+ d && (s = d);
182
182
  }
183
183
  } else if (t instanceof HTMLTableRowElement) {
184
184
  const i = t.parentElement;
185
185
  if (i) {
186
- const u = i.firstElementChild;
187
- u && (s = u);
186
+ const d = i.firstElementChild;
187
+ d && (s = d);
188
188
  }
189
189
  }
190
190
  return s && (!Ce(s) || !be(s)) ? ct(s) : s;
@@ -210,14 +210,14 @@ const be = (e) => {
210
210
  if (t instanceof HTMLTableCellElement) {
211
211
  const i = t.parentElement?.parentElement;
212
212
  if (i) {
213
- const u = i.lastElementChild?.children[t.cellIndex];
214
- u && (s = u);
213
+ const d = i.lastElementChild?.children[t.cellIndex];
214
+ d && (s = d);
215
215
  }
216
216
  } else if (t instanceof HTMLTableRowElement) {
217
217
  const i = t.parentElement;
218
218
  if (i) {
219
- const u = i.lastElementChild;
220
- u && (s = u);
219
+ const d = i.lastElementChild;
220
+ d && (s = d);
221
221
  }
222
222
  }
223
223
  return s && (!Ce(s) || !be(s)) ? rt(s) : s;
@@ -236,7 +236,7 @@ const be = (e) => {
236
236
  }, Rt = (e) => {
237
237
  const t = e.target.parentElement?.firstElementChild;
238
238
  return t && (!Ce(t) || !be(t)) ? dt(t) : t;
239
- }, It = (e) => {
239
+ }, $t = (e) => {
240
240
  const t = e.target.parentElement?.lastElementChild;
241
241
  return t && (!Ce(t) || !be(t)) ? ut(t) : t;
242
242
  }, Xe = ["alt", "control", "shift", "meta"], gn = {
@@ -274,11 +274,11 @@ const be = (e) => {
274
274
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
275
275
  },
276
276
  "keydown.control.right": (e) => {
277
- const t = It(e);
277
+ const t = $t(e);
278
278
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
279
279
  },
280
280
  "keydown.end": (e) => {
281
- const t = It(e);
281
+ const t = $t(e);
282
282
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
283
283
  },
284
284
  "keydown.enter": (e) => {
@@ -309,45 +309,45 @@ const be = (e) => {
309
309
  }
310
310
  };
311
311
  function ft(e) {
312
- const t = (a) => {
312
+ const t = (o) => {
313
313
  let n = null;
314
- return a.parent && (typeof a.parent == "string" ? n = document.querySelector(a.parent) : a.parent instanceof HTMLElement ? n = a.parent : n = a.parent.value), n;
315
- }, s = (a) => {
316
- const n = t(a);
317
- let c = [];
318
- if (typeof a.selectors == "string")
319
- c = Array.from(n ? n.querySelectorAll(a.selectors) : document.querySelectorAll(a.selectors));
320
- else if (Array.isArray(a.selectors))
321
- for (const r of a.selectors)
322
- r instanceof HTMLElement ? c.push(r) : c.push(r.$el);
323
- else if (a.selectors instanceof HTMLElement)
324
- c.push(a.selectors);
325
- else if (a.selectors?.value)
326
- if (Array.isArray(a.selectors.value))
327
- for (const r of a.selectors.value)
328
- r instanceof HTMLElement ? c.push(r) : c.push(r.$el);
314
+ return o.parent && (typeof o.parent == "string" ? n = document.querySelector(o.parent) : o.parent instanceof HTMLElement ? n = o.parent : n = o.parent.value), n;
315
+ }, s = (o) => {
316
+ const n = t(o);
317
+ let r = [];
318
+ if (typeof o.selectors == "string")
319
+ r = Array.from(n ? n.querySelectorAll(o.selectors) : document.querySelectorAll(o.selectors));
320
+ else if (Array.isArray(o.selectors))
321
+ for (const c of o.selectors)
322
+ c instanceof HTMLElement ? r.push(c) : r.push(c.$el);
323
+ else if (o.selectors instanceof HTMLElement)
324
+ r.push(o.selectors);
325
+ else if (o.selectors?.value)
326
+ if (Array.isArray(o.selectors.value))
327
+ for (const c of o.selectors.value)
328
+ c instanceof HTMLElement ? r.push(c) : r.push(c.$el);
329
329
  else
330
- c.push(a.selectors.value);
331
- return c;
332
- }, i = (a) => {
333
- const n = t(a);
334
- let c = [];
335
- return a.selectors ? c = s(a) : n && (c = Array.from(n.children).filter((r) => Ce(r) && be(r))), c;
336
- }, u = (a) => (n) => {
337
- const c = gn[n.key] || n.key.toLowerCase();
338
- if (Xe.includes(c)) return;
339
- const r = a.handlers || Qe;
340
- for (const f of Object.keys(r)) {
341
- const [g, ...$] = f.split(".");
342
- if (g === "keydown" && $.includes(c)) {
343
- const V = r[f], x = $.filter((v) => Xe.includes(v)), p = Xe.some((v) => {
330
+ r.push(o.selectors.value);
331
+ return r;
332
+ }, i = (o) => {
333
+ const n = t(o);
334
+ let r = [];
335
+ return o.selectors ? r = s(o) : n && (r = Array.from(n.children).filter((c) => Ce(c) && be(c))), r;
336
+ }, d = (o) => (n) => {
337
+ const r = gn[n.key] || n.key.toLowerCase();
338
+ if (Xe.includes(r)) return;
339
+ const c = o.handlers || Qe;
340
+ for (const f of Object.keys(c)) {
341
+ const [w, ...E] = f.split(".");
342
+ if (w === "keydown" && E.includes(r)) {
343
+ const V = c[f], x = E.filter((v) => Xe.includes(v)), p = Xe.some((v) => {
344
344
  const h = v.charAt(0).toUpperCase() + v.slice(1);
345
345
  return n.getModifierState(h);
346
346
  });
347
347
  if (x.length > 0) {
348
348
  if (p) {
349
349
  for (const v of Xe)
350
- if ($.includes(v)) {
350
+ if (E.includes(v)) {
351
351
  const h = v.charAt(0).toUpperCase() + v.slice(1);
352
352
  n.getModifierState(h) && V(n);
353
353
  }
@@ -356,24 +356,24 @@ function ft(e) {
356
356
  p || V(n);
357
357
  }
358
358
  }
359
- }, o = [];
359
+ }, l = [];
360
360
  He(() => {
361
- for (const a of e) {
362
- const n = t(a), c = i(a), r = u(a), f = n ? [n] : c;
363
- for (const g of f) {
364
- const { focused: $ } = dn(z(g)), V = ce($, (x) => {
365
- x ? g.addEventListener("keydown", r) : g.removeEventListener("keydown", r);
361
+ for (const o of e) {
362
+ const n = t(o), r = i(o), c = d(o), f = n ? [n] : r;
363
+ for (const w of f) {
364
+ const { focused: E } = dn(z(w)), V = ce(E, (x) => {
365
+ x ? w.addEventListener("keydown", c) : w.removeEventListener("keydown", c);
366
366
  });
367
- o.push(V);
367
+ l.push(V);
368
368
  }
369
369
  }
370
370
  }), Bt(() => {
371
- for (const a of o)
372
- a();
371
+ for (const o of l)
372
+ o();
373
373
  });
374
374
  }
375
375
  function vt(e, t) {
376
- return $t() ? (Et(e, t), !0) : !1;
376
+ return It() ? (Et(e, t), !0) : !1;
377
377
  }
378
378
  const Tt = typeof window < "u" && typeof document < "u";
379
379
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -389,30 +389,30 @@ function xn(...e) {
389
389
  }
390
390
  function yn(e, t) {
391
391
  function s(...i) {
392
- return new Promise((u, o) => {
392
+ return new Promise((d, l) => {
393
393
  Promise.resolve(e(() => t.apply(this, i), {
394
394
  fn: t,
395
395
  thisArg: this,
396
396
  args: i
397
- })).then(u).catch(o);
397
+ })).then(d).catch(l);
398
398
  });
399
399
  }
400
400
  return s;
401
401
  }
402
402
  function bn(e, t = {}) {
403
- let s, i, u = Ee;
404
- const o = (c) => {
405
- clearTimeout(c), u(), u = Ee;
403
+ let s, i, d = Ee;
404
+ const l = (r) => {
405
+ clearTimeout(r), d(), d = Ee;
406
406
  };
407
- let a;
408
- return (c) => {
409
- const r = D(e), f = D(t.maxWait);
410
- return s && o(s), r <= 0 || f !== void 0 && f <= 0 ? (i && (o(i), i = void 0), Promise.resolve(c())) : new Promise((g, $) => {
411
- u = t.rejectOnCancel ? $ : g, a = c, f && !i && (i = setTimeout(() => {
412
- s && o(s), i = void 0, g(a());
407
+ let o;
408
+ return (r) => {
409
+ const c = D(e), f = D(t.maxWait);
410
+ return s && l(s), c <= 0 || f !== void 0 && f <= 0 ? (i && (l(i), i = void 0), Promise.resolve(r())) : new Promise((w, E) => {
411
+ d = t.rejectOnCancel ? E : w, o = r, f && !i && (i = setTimeout(() => {
412
+ s && l(s), i = void 0, w(o());
413
413
  }, f)), s = setTimeout(() => {
414
- i && o(i), i = void 0, g(c());
415
- }, r);
414
+ i && l(i), i = void 0, w(r());
415
+ }, c);
416
416
  });
417
417
  };
418
418
  }
@@ -433,19 +433,19 @@ function Mn(e, t = {}) {
433
433
  get() {
434
434
  return e.value[i];
435
435
  },
436
- set(u) {
437
- var o;
438
- if (!((o = D(t.replaceRef)) !== null && o !== void 0) || o) if (Array.isArray(e.value)) {
439
- const a = [...e.value];
440
- a[i] = u, e.value = a;
436
+ set(d) {
437
+ var l;
438
+ if (!((l = D(t.replaceRef)) !== null && l !== void 0) || l) if (Array.isArray(e.value)) {
439
+ const o = [...e.value];
440
+ o[i] = d, e.value = o;
441
441
  } else {
442
- const a = {
442
+ const o = {
443
443
  ...e.value,
444
- [i]: u
444
+ [i]: d
445
445
  };
446
- Object.setPrototypeOf(a, Object.getPrototypeOf(e.value)), e.value = a;
446
+ Object.setPrototypeOf(o, Object.getPrototypeOf(e.value)), e.value = o;
447
447
  }
448
- else e.value[i] = u;
448
+ else e.value[i] = d;
449
449
  }
450
450
  }));
451
451
  return s;
@@ -453,7 +453,7 @@ function Mn(e, t = {}) {
453
453
  function Rn(e, t = !0, s) {
454
454
  Cn() ? He(e, s) : t ? e() : at(e);
455
455
  }
456
- function In(e, t, s) {
456
+ function $n(e, t, s) {
457
457
  return ce(e, t, {
458
458
  ...s,
459
459
  immediate: !0
@@ -466,54 +466,54 @@ function ge(e) {
466
466
  return (t = s?.$el) !== null && t !== void 0 ? t : s;
467
467
  }
468
468
  function Re(...e) {
469
- const t = (i, u, o, a) => (i.addEventListener(u, o, a), () => i.removeEventListener(u, o, a)), s = T(() => {
470
- const i = je(D(e[0])).filter((u) => u != null);
471
- return i.every((u) => typeof u != "string") ? i : void 0;
469
+ const t = (i, d, l, o) => (i.addEventListener(d, l, o), () => i.removeEventListener(d, l, o)), s = T(() => {
470
+ const i = je(D(e[0])).filter((d) => d != null);
471
+ return i.every((d) => typeof d != "string") ? i : void 0;
472
472
  });
473
- return In(() => {
474
- var i, u;
473
+ return $n(() => {
474
+ var i, d;
475
475
  return [
476
- (i = (u = s.value) === null || u === void 0 ? void 0 : u.map((o) => ge(o))) !== null && i !== void 0 ? i : [ze].filter((o) => o != null),
476
+ (i = (d = s.value) === null || d === void 0 ? void 0 : d.map((l) => ge(l))) !== null && i !== void 0 ? i : [ze].filter((l) => l != null),
477
477
  je(D(s.value ? e[1] : e[0])),
478
478
  je(Z(s.value ? e[2] : e[1])),
479
479
  D(s.value ? e[3] : e[2])
480
480
  ];
481
- }, ([i, u, o, a], n, c) => {
482
- if (!i?.length || !u?.length || !o?.length) return;
483
- const r = pn(a) ? { ...a } : a, f = i.flatMap((g) => u.flatMap(($) => o.map((V) => t(g, $, V, r))));
484
- c(() => {
485
- f.forEach((g) => g());
481
+ }, ([i, d, l, o], n, r) => {
482
+ if (!i?.length || !d?.length || !l?.length) return;
483
+ const c = pn(o) ? { ...o } : o, f = i.flatMap((w) => d.flatMap((E) => l.map((V) => t(w, E, V, c))));
484
+ r(() => {
485
+ f.forEach((w) => w());
486
486
  });
487
487
  }, { flush: "post" });
488
488
  }
489
489
  function ot(e, t, s = {}) {
490
- const { window: i = ze, ignore: u = [], capture: o = !0, detectIframe: a = !1, controls: n = !1 } = s;
490
+ const { window: i = ze, ignore: d = [], capture: l = !0, detectIframe: o = !1, controls: n = !1 } = s;
491
491
  if (!i) return n ? {
492
492
  stop: Ee,
493
493
  cancel: Ee,
494
494
  trigger: Ee
495
495
  } : Ee;
496
- let c = !0;
497
- const r = (v) => D(u).some((h) => {
498
- if (typeof h == "string") return Array.from(i.document.querySelectorAll(h)).some((m) => m === v.target || v.composedPath().includes(m));
496
+ let r = !0;
497
+ const c = (v) => D(d).some((h) => {
498
+ if (typeof h == "string") return Array.from(i.document.querySelectorAll(h)).some((g) => g === v.target || v.composedPath().includes(g));
499
499
  {
500
- const m = ge(h);
501
- return m && (v.target === m || v.composedPath().includes(m));
500
+ const g = ge(h);
501
+ return g && (v.target === g || v.composedPath().includes(g));
502
502
  }
503
503
  });
504
504
  function f(v) {
505
505
  const h = D(v);
506
506
  return h && h.$.subTree.shapeFlag === 16;
507
507
  }
508
- function g(v, h) {
509
- const m = D(v), I = m.$.subTree && m.$.subTree.children;
510
- return I == null || !Array.isArray(I) ? !1 : I.some((E) => E.el === h.target || h.composedPath().includes(E.el));
508
+ function w(v, h) {
509
+ const g = D(v), $ = g.$.subTree && g.$.subTree.children;
510
+ return $ == null || !Array.isArray($) ? !1 : $.some((I) => I.el === h.target || h.composedPath().includes(I.el));
511
511
  }
512
- const $ = (v) => {
512
+ const E = (v) => {
513
513
  const h = ge(e);
514
- if (v.target != null && !(!(h instanceof Element) && f(e) && g(e, v)) && !(!h || h === v.target || v.composedPath().includes(h))) {
515
- if ("detail" in v && v.detail === 0 && (c = !r(v)), !c) {
516
- c = !0;
514
+ if (v.target != null && !(!(h instanceof Element) && f(e) && w(e, v)) && !(!h || h === v.target || v.composedPath().includes(h))) {
515
+ if ("detail" in v && v.detail === 0 && (r = !c(v)), !r) {
516
+ r = !0;
517
517
  return;
518
518
  }
519
519
  t(v);
@@ -524,35 +524,35 @@ function ot(e, t, s = {}) {
524
524
  Re(i, "click", (v) => {
525
525
  V || (V = !0, setTimeout(() => {
526
526
  V = !1;
527
- }, 0), $(v));
527
+ }, 0), E(v));
528
528
  }, {
529
529
  passive: !0,
530
- capture: o
530
+ capture: l
531
531
  }),
532
532
  Re(i, "pointerdown", (v) => {
533
533
  const h = ge(e);
534
- c = !r(v) && !!(h && !v.composedPath().includes(h));
534
+ r = !c(v) && !!(h && !v.composedPath().includes(h));
535
535
  }, { passive: !0 }),
536
- a && Re(i, "blur", (v) => {
536
+ o && Re(i, "blur", (v) => {
537
537
  setTimeout(() => {
538
538
  var h;
539
- const m = ge(e);
540
- ((h = i.document.activeElement) === null || h === void 0 ? void 0 : h.tagName) === "IFRAME" && !m?.contains(i.document.activeElement) && t(v);
539
+ const g = ge(e);
540
+ ((h = i.document.activeElement) === null || h === void 0 ? void 0 : h.tagName) === "IFRAME" && !g?.contains(i.document.activeElement) && t(v);
541
541
  }, 0);
542
542
  }, { passive: !0 })
543
543
  ].filter(Boolean), p = () => x.forEach((v) => v());
544
544
  return n ? {
545
545
  stop: p,
546
546
  cancel: () => {
547
- c = !1;
547
+ r = !1;
548
548
  },
549
549
  trigger: (v) => {
550
- c = !0, $(v), c = !1;
550
+ r = !0, E(v), r = !1;
551
551
  }
552
552
  } : p;
553
553
  }
554
554
  // @__NO_SIDE_EFFECTS__
555
- function $n() {
555
+ function In() {
556
556
  const e = ie(!1), t = lt();
557
557
  return t && He(() => {
558
558
  e.value = !0;
@@ -560,29 +560,29 @@ function $n() {
560
560
  }
561
561
  // @__NO_SIDE_EFFECTS__
562
562
  function Dt(e) {
563
- const t = /* @__PURE__ */ $n();
563
+ const t = /* @__PURE__ */ In();
564
564
  return T(() => (t.value, !!e()));
565
565
  }
566
566
  function Ht(e, t, s = {}) {
567
- const { window: i = ze, ...u } = s;
568
- let o;
569
- const a = /* @__PURE__ */ Dt(() => i && "MutationObserver" in i), n = () => {
570
- o && (o.disconnect(), o = void 0);
571
- }, c = ce(T(() => {
572
- const g = je(D(e)).map(ge).filter(mn);
573
- return new Set(g);
574
- }), (g) => {
575
- n(), a.value && g.size && (o = new MutationObserver(t), g.forEach(($) => o.observe($, u)));
567
+ const { window: i = ze, ...d } = s;
568
+ let l;
569
+ const o = /* @__PURE__ */ Dt(() => i && "MutationObserver" in i), n = () => {
570
+ l && (l.disconnect(), l = void 0);
571
+ }, r = ce(T(() => {
572
+ const w = je(D(e)).map(ge).filter(mn);
573
+ return new Set(w);
574
+ }), (w) => {
575
+ n(), o.value && w.size && (l = new MutationObserver(t), w.forEach((E) => l.observe(E, d)));
576
576
  }, {
577
577
  immediate: !0,
578
578
  flush: "post"
579
- }), r = () => o?.takeRecords(), f = () => {
580
- c(), n();
579
+ }), c = () => l?.takeRecords(), f = () => {
580
+ r(), n();
581
581
  };
582
582
  return vt(f), {
583
- isSupported: a,
583
+ isSupported: o,
584
584
  stop: f,
585
- takeRecords: r
585
+ takeRecords: c
586
586
  };
587
587
  }
588
588
  const Ge = {
@@ -594,16 +594,16 @@ function En(e) {
594
594
  e.scrollLeft > e.scrollWidth - e.clientWidth && (e.scrollLeft = Math.max(0, e.scrollWidth - e.clientWidth)), e.scrollTop > e.scrollHeight - e.clientHeight && (e.scrollTop = Math.max(0, e.scrollHeight - e.clientHeight));
595
595
  }
596
596
  function _e(e, t = {}) {
597
- var s, i, u, o;
598
- const { pointerTypes: a, preventDefault: n, stopPropagation: c, exact: r, onMove: f, onEnd: g, onStart: $, initialValue: V, axis: x = "both", draggingElement: p = ze, containerElement: v, handle: h = e, buttons: m = [0], restrictInView: I, autoScroll: E = !1 } = t, H = z((s = D(V)) !== null && s !== void 0 ? s : {
597
+ var s, i, d, l;
598
+ const { pointerTypes: o, preventDefault: n, stopPropagation: r, exact: c, onMove: f, onEnd: w, onStart: E, initialValue: V, axis: x = "both", draggingElement: p = ze, containerElement: v, handle: h = e, buttons: g = [0], restrictInView: $, autoScroll: I = !1 } = t, H = z((s = D(V)) !== null && s !== void 0 ? s : {
599
599
  x: 0,
600
600
  y: 0
601
- }), A = z(), L = (k) => a ? a.includes(k.pointerType) : !0, X = (k) => {
602
- D(n) && k.preventDefault(), D(c) && k.stopPropagation();
603
- }, le = D(E), j = typeof le == "object" ? {
601
+ }), A = z(), L = (k) => o ? o.includes(k.pointerType) : !0, X = (k) => {
602
+ D(n) && k.preventDefault(), D(r) && k.stopPropagation();
603
+ }, le = D(I), j = typeof le == "object" ? {
604
604
  speed: (i = D(le.speed)) !== null && i !== void 0 ? i : Ge.speed,
605
- margin: (u = D(le.margin)) !== null && u !== void 0 ? u : Ge.margin,
606
- direction: (o = le.direction) !== null && o !== void 0 ? o : Ge.direction
605
+ margin: (d = D(le.margin)) !== null && d !== void 0 ? d : Ge.margin,
606
+ direction: (l = le.direction) !== null && l !== void 0 ? l : Ge.direction
607
607
  } : Ge, q = (k) => typeof k == "number" ? [k, k] : [k.x, k.y], ue = (k, O, F) => {
608
608
  const { clientWidth: J, clientHeight: G, scrollLeft: te, scrollTop: pe, scrollWidth: Me, scrollHeight: S } = k, [B, U] = q(j.margin), [Y, Q] = q(j.speed);
609
609
  let _ = 0, ne = 0;
@@ -638,25 +638,25 @@ function _e(e, t = {}) {
638
638
  y: J - k.scrollTop
639
639
  }, k, j.margin, O) ? Ae() : ke();
640
640
  };
641
- D(E) && ce(H, Ve);
641
+ D(I) && ce(H, Ve);
642
642
  const Be = (k) => {
643
643
  var O;
644
- if (!D(m).includes(k.button) || D(t.disabled) || !L(k) || D(r) && k.target !== D(e)) return;
644
+ if (!D(g).includes(k.button) || D(t.disabled) || !L(k) || D(c) && k.target !== D(e)) return;
645
645
  const F = D(v), J = F == null || (O = F.getBoundingClientRect) === null || O === void 0 ? void 0 : O.call(F), G = D(e).getBoundingClientRect(), te = {
646
- x: k.clientX - (F ? G.left - J.left + (E ? 0 : F.scrollLeft) : G.left),
647
- y: k.clientY - (F ? G.top - J.top + (E ? 0 : F.scrollTop) : G.top)
646
+ x: k.clientX - (F ? G.left - J.left + (I ? 0 : F.scrollLeft) : G.left),
647
+ y: k.clientY - (F ? G.top - J.top + (I ? 0 : F.scrollTop) : G.top)
648
648
  };
649
- $?.(te, k) !== !1 && (A.value = te, X(k));
649
+ E?.(te, k) !== !1 && (A.value = te, X(k));
650
650
  }, Te = (k) => {
651
651
  if (D(t.disabled) || !L(k) || !A.value) return;
652
652
  const O = D(v);
653
653
  O instanceof HTMLElement && En(O);
654
654
  const F = D(e).getBoundingClientRect();
655
655
  let { x: J, y: G } = H.value;
656
- if ((x === "x" || x === "both") && (J = k.clientX - A.value.x, O && (J = Math.min(Math.max(0, J), O.scrollWidth - F.width))), (x === "y" || x === "both") && (G = k.clientY - A.value.y, O && (G = Math.min(Math.max(0, G), O.scrollHeight - F.height))), D(E) && O && (ae === null && ue(O, F, {
656
+ if ((x === "x" || x === "both") && (J = k.clientX - A.value.x, O && (J = Math.min(Math.max(0, J), O.scrollWidth - F.width))), (x === "y" || x === "both") && (G = k.clientY - A.value.y, O && (G = Math.min(Math.max(0, G), O.scrollHeight - F.height))), D(I) && O && (ae === null && ue(O, F, {
657
657
  x: J,
658
658
  y: G
659
- }), J += O.scrollLeft, G += O.scrollTop), O && (I || E)) {
659
+ }), J += O.scrollLeft, G += O.scrollTop), O && ($ || I)) {
660
660
  if (x !== "y") {
661
661
  const te = J - O.scrollLeft;
662
662
  te < 0 ? J = O.scrollLeft : te > O.clientWidth - F.width && (J = O.clientWidth - F.width + O.scrollLeft);
@@ -671,7 +671,7 @@ function _e(e, t = {}) {
671
671
  y: G
672
672
  }, f?.(H.value, k), X(k);
673
673
  }, Pe = (k) => {
674
- D(t.disabled) || !L(k) || A.value && (A.value = void 0, E && ke(), g?.(H.value, k), X(k));
674
+ D(t.disabled) || !L(k) || A.value && (A.value = void 0, I && ke(), w?.(H.value, k), X(k));
675
675
  };
676
676
  if (Tt) {
677
677
  const k = () => {
@@ -690,60 +690,60 @@ function _e(e, t = {}) {
690
690
  style: T(() => `
691
691
  left: ${H.value.x}px;
692
692
  top: ${H.value.y}px;
693
- ${E ? "text-wrap: nowrap;" : ""}
693
+ ${I ? "text-wrap: nowrap;" : ""}
694
694
  `)
695
695
  };
696
696
  }
697
697
  function Je(e, t, s = {}) {
698
- const { window: i = ze, ...u } = s;
699
- let o;
700
- const a = /* @__PURE__ */ Dt(() => i && "ResizeObserver" in i), n = () => {
701
- o && (o.disconnect(), o = void 0);
702
- }, c = ce(T(() => {
698
+ const { window: i = ze, ...d } = s;
699
+ let l;
700
+ const o = /* @__PURE__ */ Dt(() => i && "ResizeObserver" in i), n = () => {
701
+ l && (l.disconnect(), l = void 0);
702
+ }, r = ce(T(() => {
703
703
  const f = D(e);
704
- return Array.isArray(f) ? f.map((g) => ge(g)) : [ge(f)];
704
+ return Array.isArray(f) ? f.map((w) => ge(w)) : [ge(f)];
705
705
  }), (f) => {
706
- if (n(), a.value && i) {
707
- o = new ResizeObserver(t);
708
- for (const g of f) g && o.observe(g, u);
706
+ if (n(), o.value && i) {
707
+ l = new ResizeObserver(t);
708
+ for (const w of f) w && l.observe(w, d);
709
709
  }
710
710
  }, {
711
711
  immediate: !0,
712
712
  flush: "post"
713
- }), r = () => {
714
- n(), c();
713
+ }), c = () => {
714
+ n(), r();
715
715
  };
716
- return vt(r), {
717
- isSupported: a,
718
- stop: r
716
+ return vt(c), {
717
+ isSupported: o,
718
+ stop: c
719
719
  };
720
720
  }
721
- function $e(e, t = {}) {
722
- const { reset: s = !0, windowResize: i = !0, windowScroll: u = !0, immediate: o = !0, updateTiming: a = "sync" } = t, n = ie(0), c = ie(0), r = ie(0), f = ie(0), g = ie(0), $ = ie(0), V = ie(0), x = ie(0);
721
+ function Ie(e, t = {}) {
722
+ const { reset: s = !0, windowResize: i = !0, windowScroll: d = !0, immediate: l = !0, updateTiming: o = "sync" } = t, n = ie(0), r = ie(0), c = ie(0), f = ie(0), w = ie(0), E = ie(0), V = ie(0), x = ie(0);
723
723
  function p() {
724
724
  const h = ge(e);
725
725
  if (!h) {
726
- s && (n.value = 0, c.value = 0, r.value = 0, f.value = 0, g.value = 0, $.value = 0, V.value = 0, x.value = 0);
726
+ s && (n.value = 0, r.value = 0, c.value = 0, f.value = 0, w.value = 0, E.value = 0, V.value = 0, x.value = 0);
727
727
  return;
728
728
  }
729
- const m = h.getBoundingClientRect();
730
- n.value = m.height, c.value = m.bottom, r.value = m.left, f.value = m.right, g.value = m.top, $.value = m.width, V.value = m.x, x.value = m.y;
729
+ const g = h.getBoundingClientRect();
730
+ n.value = g.height, r.value = g.bottom, c.value = g.left, f.value = g.right, w.value = g.top, E.value = g.width, V.value = g.x, x.value = g.y;
731
731
  }
732
732
  function v() {
733
- a === "sync" ? p() : a === "next-frame" && requestAnimationFrame(() => p());
733
+ o === "sync" ? p() : o === "next-frame" && requestAnimationFrame(() => p());
734
734
  }
735
- return Je(e, v), ce(() => ge(e), (h) => !h && v()), Ht(e, v, { attributeFilter: ["style", "class"] }), u && Re("scroll", v, {
735
+ return Je(e, v), ce(() => ge(e), (h) => !h && v()), Ht(e, v, { attributeFilter: ["style", "class"] }), d && Re("scroll", v, {
736
736
  capture: !0,
737
737
  passive: !0
738
738
  }), i && Re("resize", v, { passive: !0 }), Rn(() => {
739
- o && v();
739
+ l && v();
740
740
  }), {
741
741
  height: n,
742
- bottom: c,
743
- left: r,
742
+ bottom: r,
743
+ left: c,
744
744
  right: f,
745
- top: g,
746
- width: $,
745
+ top: w,
746
+ width: E,
747
747
  x: V,
748
748
  y: x,
749
749
  update: v
@@ -756,27 +756,27 @@ const tt = /* @__PURE__ */ new WeakMap();
756
756
  function Sn(e, t = !1) {
757
757
  const s = ie(t);
758
758
  let i = "";
759
- ce(xn(e), (a) => {
760
- const n = et(D(a));
759
+ ce(xn(e), (o) => {
760
+ const n = et(D(o));
761
761
  if (n) {
762
- const c = n;
763
- if (tt.get(c) || tt.set(c, c.style.overflow), c.style.overflow !== "hidden" && (i = c.style.overflow), c.style.overflow === "hidden") return s.value = !0;
764
- if (s.value) return c.style.overflow = "hidden";
762
+ const r = n;
763
+ if (tt.get(r) || tt.set(r, r.style.overflow), r.style.overflow !== "hidden" && (i = r.style.overflow), r.style.overflow === "hidden") return s.value = !0;
764
+ if (s.value) return r.style.overflow = "hidden";
765
765
  }
766
766
  }, { immediate: !0 });
767
- const u = () => {
768
- const a = et(D(e));
769
- !a || s.value || (a.style.overflow = "hidden", s.value = !0);
770
- }, o = () => {
771
- const a = et(D(e));
772
- !a || !s.value || (a.style.overflow = i, tt.delete(a), s.value = !1);
767
+ const d = () => {
768
+ const o = et(D(e));
769
+ !o || s.value || (o.style.overflow = "hidden", s.value = !0);
770
+ }, l = () => {
771
+ const o = et(D(e));
772
+ !o || !s.value || (o.style.overflow = i, tt.delete(o), s.value = !1);
773
773
  };
774
- return vt(o), T({
774
+ return vt(l), T({
775
775
  get() {
776
776
  return s.value;
777
777
  },
778
- set(a) {
779
- a ? u() : o();
778
+ set(o) {
779
+ o ? d() : l();
780
780
  }
781
781
  });
782
782
  }
@@ -795,20 +795,20 @@ const An = (e) => {
795
795
  debounce: { default: 300 }
796
796
  },
797
797
  setup(e, { expose: t }) {
798
- const s = re("cell"), i = e.store.getCellData(e.colIndex, e.rowIndex), u = z(""), o = z(!1), a = e.store.columns[e.colIndex], n = e.store.rows[e.rowIndex], c = a.align || "center", r = a.width || "40ch", f = T(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), g = T(() => typeof f.value == "string" ? An(f.value) : !1), $ = T(() => ({
799
- textAlign: c,
800
- width: r,
801
- fontWeight: o.value ? "bold" : "inherit",
798
+ const s = re("cell"), i = e.store.getCellData(e.colIndex, e.rowIndex), d = z(""), l = z(!1), o = e.store.columns[e.colIndex], n = e.store.rows[e.rowIndex], r = o.align || "center", c = o.width || "40ch", f = T(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), w = T(() => typeof f.value == "string" ? An(f.value) : !1), E = T(() => ({
799
+ textAlign: r,
800
+ width: c,
801
+ fontWeight: l.value ? "bold" : "inherit",
802
802
  paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
803
803
  })), V = T(() => ({
804
804
  "sticky-column": e.pinned,
805
- "cell-modified": o.value
805
+ "cell-modified": l.value
806
806
  })), x = () => {
807
807
  v(), p();
808
808
  }, p = () => {
809
- const { left: A, bottom: L, width: X, height: le } = $e(s);
810
- a.mask, a.modalComponent && e.store.$patch((j) => {
811
- j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left = A, j.modal.bottom = L, j.modal.width = X, j.modal.height = le, j.modal.cell = s.value, typeof a.modalComponent == "function" ? j.modal.component = a.modalComponent({ table: j.table, row: n, column: a }) : j.modal.component = a.modalComponent, j.modal.componentProps = a.modalComponentExtraProps;
809
+ const { left: A, bottom: L, width: X, height: le } = Ie(s);
810
+ o.mask, o.modalComponent && e.store.$patch((j) => {
811
+ j.modal.visible = !0, j.modal.colIndex = e.colIndex, j.modal.rowIndex = e.rowIndex, j.modal.left = A, j.modal.bottom = L, j.modal.width = X, j.modal.height = le, j.modal.cell = s.value, typeof o.modalComponent == "function" ? j.modal.component = o.modalComponent({ table: j.table, row: n, column: o }) : j.modal.component = o.modalComponent, j.modal.componentProps = o.modalComponentExtraProps;
812
812
  });
813
813
  };
814
814
  if (e.addNavigation) {
@@ -831,7 +831,7 @@ const An = (e) => {
831
831
  ]);
832
832
  }
833
833
  const v = () => {
834
- if (s.value && a.edit) {
834
+ if (s.value && o.edit) {
835
835
  const A = window.getSelection();
836
836
  if (A)
837
837
  try {
@@ -841,8 +841,8 @@ const An = (e) => {
841
841
  }
842
842
  }
843
843
  }, h = () => {
844
- s.value && (u.value = s.value.textContent, v());
845
- }, m = () => {
844
+ s.value && (d.value = s.value.textContent, v());
845
+ }, g = () => {
846
846
  try {
847
847
  const A = window.getSelection();
848
848
  if (A && A.rangeCount > 0 && s.value) {
@@ -853,7 +853,7 @@ const An = (e) => {
853
853
  } catch {
854
854
  }
855
855
  return 0;
856
- }, I = (A) => {
856
+ }, $ = (A) => {
857
857
  if (s.value)
858
858
  try {
859
859
  const L = window.getSelection();
@@ -873,38 +873,38 @@ const An = (e) => {
873
873
  q && L.removeAllRanges && L.addRange && (L.removeAllRanges(), L.addRange(q));
874
874
  } catch {
875
875
  }
876
- }, E = (A) => {
877
- if (!a.edit) return;
876
+ }, I = (A) => {
877
+ if (!o.edit) return;
878
878
  const L = A.target;
879
- if (L.textContent === u.value)
879
+ if (L.textContent === d.value)
880
880
  return;
881
- const X = m();
882
- u.value = L.textContent, a.format ? (o.value = L.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, i), e.store.setCellText(e.colIndex, e.rowIndex, L.textContent)) : (o.value = L.textContent !== i, e.store.setCellData(e.colIndex, e.rowIndex, L.textContent)), at().then(() => {
883
- I(X);
881
+ const X = g();
882
+ d.value = L.textContent, o.format ? (l.value = L.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, i), e.store.setCellText(e.colIndex, e.rowIndex, L.textContent)) : (l.value = L.textContent !== i, e.store.setCellData(e.colIndex, e.rowIndex, L.textContent)), at().then(() => {
883
+ $(X);
884
884
  });
885
- }, H = /* @__PURE__ */ kn(E, e.debounce);
885
+ }, H = /* @__PURE__ */ kn(I, e.debounce);
886
886
  return t({
887
- currentData: u
887
+ currentData: d
888
888
  }), (A, L) => (y(), C("td", {
889
889
  ref: "cell",
890
890
  "data-colindex": e.colIndex,
891
891
  "data-rowindex": e.rowIndex,
892
- "data-editable": Z(a).edit,
893
- contenteditable: Z(a).edit,
892
+ "data-editable": Z(o).edit,
893
+ contenteditable: Z(o).edit,
894
894
  tabindex: e.tabIndex,
895
895
  spellcheck: !1,
896
- style: me($.value),
896
+ style: me(E.value),
897
897
  class: oe(["atable-cell", V.value]),
898
898
  onFocus: h,
899
- onPaste: E,
899
+ onPaste: I,
900
900
  onInput: L[0] || (L[0] = //@ts-ignore
901
901
  (...X) => Z(H) && Z(H)(...X)),
902
902
  onClick: x
903
903
  }, [
904
- Z(a).cellComponent ? (y(), ve(We(Z(a).cellComponent), st({
904
+ Z(o).cellComponent ? (y(), ve(We(Z(o).cellComponent), st({
905
905
  key: 0,
906
906
  value: f.value
907
- }, Z(a).cellComponentProps), null, 16, ["value"])) : g.value ? (y(), C("span", {
907
+ }, Z(o).cellComponentProps), null, 16, ["value"])) : w.value ? (y(), C("span", {
908
908
  key: 1,
909
909
  innerHTML: f.value
910
910
  }, null, 8, Hn)) : (y(), C("span", Ln, xe(f.value), 1))
@@ -922,8 +922,8 @@ const An = (e) => {
922
922
  const t = re("rowEl"), s = T(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
923
923
  if (e.addNavigation) {
924
924
  const i = {
925
- "keydown.control.g": (u) => {
926
- u.stopPropagation(), u.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
925
+ "keydown.control.g": (d) => {
926
+ d.stopPropagation(), d.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
927
927
  }
928
928
  };
929
929
  typeof e.addNavigation == "object" && Object.assign(i, e.addNavigation), ft([
@@ -933,7 +933,7 @@ const An = (e) => {
933
933
  }
934
934
  ]);
935
935
  }
936
- return (i, u) => (y(), C(he, null, [
936
+ return (i, d) => (y(), C(he, null, [
937
937
  W("tr", st(i.$attrs, {
938
938
  ref: "rowEl",
939
939
  tabindex: e.tabIndex,
@@ -942,7 +942,7 @@ const An = (e) => {
942
942
  W("td", {
943
943
  tabIndex: -1,
944
944
  class: "row-index",
945
- onClick: u[0] || (u[0] = (o) => e.store.toggleRowExpand(e.rowIndex))
945
+ onClick: d[0] || (d[0] = (l) => e.store.toggleRowExpand(e.rowIndex))
946
946
  }, xe(s.value), 1),
947
947
  fe(i.$slots, "row", {}, void 0, !0)
948
948
  ], 16, Vn),
@@ -962,12 +962,12 @@ const An = (e) => {
962
962
  ], 8, Bn)) : K("", !0)
963
963
  ], 64));
964
964
  }
965
- }), Ie = (e, t) => {
965
+ }), $e = (e, t) => {
966
966
  const s = e.__vccOpts || e;
967
- for (const [i, u] of t)
968
- s[i] = u;
967
+ for (const [i, d] of t)
968
+ s[i] = d;
969
969
  return s;
970
- }, Nn = /* @__PURE__ */ Ie(Zn, [["__scopeId", "data-v-a42297c7"]]), Wn = ["colspan"], Fn = {
970
+ }, Nn = /* @__PURE__ */ $e(Zn, [["__scopeId", "data-v-a42297c7"]]), Wn = ["colspan"], Fn = {
971
971
  ref: "container",
972
972
  class: "gantt-container"
973
973
  }, zn = ["data-rowindex", "data-colindex"], Xn = {
@@ -989,15 +989,15 @@ const An = (e) => {
989
989
  emits: ["connection:create"],
990
990
  setup(e, { expose: t, emit: s }) {
991
991
  zt((S) => ({
992
- v737862e7: u.value,
992
+ v737862e7: d.value,
993
993
  v05f25613: S.colspan
994
994
  }));
995
- const i = s, u = z(e.color.length >= 6 ? e.color : "#cccccc"), o = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, a = re("container"), n = re("bar"), c = re("leftResizeHandle"), r = re("rightResizeHandle"), f = re("leftConnectionHandle"), g = re("rightConnectionHandle"), { width: $ } = $e(a), { left: V, right: x } = $e(n), p = z(e.start), v = z(e.end || p.value + e.colspan), h = z(!1), m = z(!1), I = z(!1), E = z(!1), H = z(!1), A = z({ startX: 0, startY: 0, endX: 0, endY: 0 }), L = T(() => Ae.value || ue.value || ae.value), X = T(() => e.colspan > 0 ? $.value / e.colspan : 0), le = T(() => {
995
+ const i = s, d = z(e.color.length >= 6 ? e.color : "#cccccc"), l = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, o = re("container"), n = re("bar"), r = re("leftResizeHandle"), c = re("rightResizeHandle"), f = re("leftConnectionHandle"), w = re("rightConnectionHandle"), { width: E } = Ie(o), { left: V, right: x } = Ie(n), p = z(e.start), v = z(e.end || p.value + e.colspan), h = z(!1), g = z(!1), $ = z(!1), I = z(!1), H = z(!1), A = z({ startX: 0, startY: 0, endX: 0, endY: 0 }), L = T(() => Ae.value || ue.value || ae.value), X = T(() => e.colspan > 0 ? E.value / e.colspan : 0), le = T(() => {
996
996
  const S = p.value / e.colspan * 100, B = v.value / e.colspan * 100;
997
997
  return {
998
998
  left: `${S}%`,
999
999
  width: `${B - S}%`,
1000
- backgroundColor: u.value
1000
+ backgroundColor: d.value
1001
1001
  };
1002
1002
  }), j = T(
1003
1003
  () => ({
@@ -1009,12 +1009,12 @@ const An = (e) => {
1009
1009
  pointerEvents: "none",
1010
1010
  zIndex: 1e3
1011
1011
  })
1012
- ), q = z({ startX: 0, startPos: 0 }), { isDragging: ue } = _e(c, {
1012
+ ), q = z({ startX: 0, startPos: 0 }), { isDragging: ue } = _e(r, {
1013
1013
  axis: "x",
1014
1014
  onStart: () => ke(V.value, p.value),
1015
1015
  onMove: ({ x: S }) => Oe(S),
1016
1016
  onEnd: ({ x: S }) => Ve(S)
1017
- }), { isDragging: ae } = _e(r, {
1017
+ }), { isDragging: ae } = _e(c, {
1018
1018
  axis: "x",
1019
1019
  onStart: () => ke(x.value, v.value),
1020
1020
  onMove: ({ x: S }) => Be(S),
@@ -1098,46 +1098,46 @@ const An = (e) => {
1098
1098
  });
1099
1099
  }
1100
1100
  function O() {
1101
- const { x: S, y: B } = $e(n), { x: U, y: Y } = $e(f), { x: Q, y: _ } = $e(g);
1101
+ const { x: S, y: B } = Ie(n), { x: U, y: Y } = Ie(f), { x: Q, y: _ } = Ie(w);
1102
1102
  e.store.registerGanttBar({
1103
- id: o,
1103
+ id: l,
1104
1104
  rowIndex: e.rowIndex,
1105
1105
  colIndex: e.colIndex,
1106
1106
  startIndex: p,
1107
1107
  endIndex: v,
1108
- color: u,
1108
+ color: d,
1109
1109
  label: e.label,
1110
1110
  position: { x: S, y: B }
1111
1111
  }), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
1112
- id: `${o}-connection-left`,
1112
+ id: `${l}-connection-left`,
1113
1113
  rowIndex: e.rowIndex,
1114
1114
  colIndex: e.colIndex,
1115
1115
  side: "left",
1116
1116
  position: { x: U, y: Y },
1117
1117
  visible: h,
1118
- barId: o
1118
+ barId: l
1119
1119
  }), e.store.registerConnectionHandle({
1120
- id: `${o}-connection-right`,
1120
+ id: `${l}-connection-right`,
1121
1121
  rowIndex: e.rowIndex,
1122
1122
  colIndex: e.colIndex,
1123
1123
  side: "right",
1124
1124
  position: { x: Q, y: _ },
1125
- visible: m,
1126
- barId: o
1125
+ visible: g,
1126
+ barId: l
1127
1127
  }));
1128
1128
  }
1129
1129
  function F() {
1130
- e.store.unregisterGanttBar(o), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${o}-connection-left`), e.store.unregisterConnectionHandle(`${o}-connection-right`));
1130
+ e.store.unregisterGanttBar(l), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${l}-connection-left`), e.store.unregisterConnectionHandle(`${l}-connection-right`));
1131
1131
  }
1132
1132
  function J() {
1133
- e.store.isDependencyGraphEnabled && (h.value = !0, m.value = !0);
1133
+ e.store.isDependencyGraphEnabled && (h.value = !0, g.value = !0);
1134
1134
  }
1135
1135
  function G() {
1136
- !I.value && !E.value && (h.value = !1, m.value = !1);
1136
+ !$.value && !I.value && (h.value = !1, g.value = !1);
1137
1137
  }
1138
1138
  function te(S, B) {
1139
- B.preventDefault(), B.stopPropagation(), H.value = !0, S === "left" ? I.value = !0 : E.value = !0;
1140
- const U = S === "left" ? f.value : g.value;
1139
+ B.preventDefault(), B.stopPropagation(), H.value = !0, S === "left" ? $.value = !0 : I.value = !0;
1140
+ const U = S === "left" ? f.value : w.value;
1141
1141
  if (U) {
1142
1142
  const _ = U.getBoundingClientRect(), ne = _.left + _.width / 2, se = _.top + _.height / 2;
1143
1143
  A.value = { startX: ne, startY: se, endX: ne, endY: se };
@@ -1151,11 +1151,11 @@ const An = (e) => {
1151
1151
  }
1152
1152
  function pe(S, B) {
1153
1153
  const Y = document.elementFromPoint(S.clientX, S.clientY)?.closest(".connection-handle");
1154
- if (Y && Y !== (B === "left" ? f.value : g.value)) {
1154
+ if (Y && Y !== (B === "left" ? f.value : w.value)) {
1155
1155
  const Q = Y.closest(".gantt-bar");
1156
1156
  if (Q) {
1157
1157
  const _ = parseInt(Q.getAttribute("data-rowindex") || "0"), ne = parseInt(Q.getAttribute("data-colindex") || "0"), se = Y.classList.contains("left-connection-handle") ? "left" : "right", Ze = `gantt-bar-row-${_}-col-${ne}`, Ke = e.store.createConnection(
1158
- `${o}-connection-${B}`,
1158
+ `${l}-connection-${B}`,
1159
1159
  `${Ze}-connection-${se}`
1160
1160
  );
1161
1161
  Ke && i("connection:create", Ke);
@@ -1163,17 +1163,17 @@ const An = (e) => {
1163
1163
  }
1164
1164
  }
1165
1165
  function Me(S, B) {
1166
- H.value = !1, I.value = !1, E.value = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", B), n.value?.matches(":hover") || G();
1166
+ H.value = !1, $.value = !1, I.value = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", B), n.value?.matches(":hover") || G();
1167
1167
  }
1168
1168
  return t({
1169
1169
  barStyle: le,
1170
1170
  cleanupConnectionDrag: Me,
1171
1171
  currentEnd: v,
1172
1172
  handleConnectionDrop: pe,
1173
- isLeftConnectionDragging: I,
1173
+ isLeftConnectionDragging: $,
1174
1174
  isLeftConnectionVisible: h,
1175
- isRightConnectionDragging: E,
1176
- isRightConnectionVisible: m,
1175
+ isRightConnectionDragging: I,
1176
+ isRightConnectionVisible: g,
1177
1177
  showDragPreview: H
1178
1178
  }), (S, B) => (y(), C("td", {
1179
1179
  class: "aganttcell",
@@ -1192,7 +1192,7 @@ const An = (e) => {
1192
1192
  e.store.isDependencyGraphEnabled ? (y(), C("div", {
1193
1193
  key: 0,
1194
1194
  ref: "leftConnectionHandle",
1195
- class: oe(["connection-handle left-connection-handle", { visible: h.value, "is-dragging": I.value }]),
1195
+ class: oe(["connection-handle left-connection-handle", { visible: h.value, "is-dragging": $.value }]),
1196
1196
  onMousedown: B[0] || (B[0] = Se((U) => te("left", U), ["stop"]))
1197
1197
  }, [...B[2] || (B[2] = [
1198
1198
  W("div", { class: "connection-dot" }, null, -1)
@@ -1200,7 +1200,7 @@ const An = (e) => {
1200
1200
  e.store.isDependencyGraphEnabled ? (y(), C("div", {
1201
1201
  key: 1,
1202
1202
  ref: "rightConnectionHandle",
1203
- class: oe(["connection-handle right-connection-handle", { visible: m.value, "is-dragging": E.value }]),
1203
+ class: oe(["connection-handle right-connection-handle", { visible: g.value, "is-dragging": I.value }]),
1204
1204
  onMousedown: B[1] || (B[1] = Se((U) => te("right", U), ["stop"]))
1205
1205
  }, [...B[3] || (B[3] = [
1206
1206
  W("div", { class: "connection-dot" }, null, -1)
@@ -1238,7 +1238,7 @@ const An = (e) => {
1238
1238
  ], 4)) : K("", !0)
1239
1239
  ], 8, Wn));
1240
1240
  }
1241
- }), Un = /* @__PURE__ */ Ie(Yn, [["__scopeId", "data-v-c2df3f52"]]), jn = `<?xml version="1.0" encoding="UTF-8"?>
1241
+ }), Un = /* @__PURE__ */ $e(Yn, [["__scopeId", "data-v-c2df3f52"]]), jn = `<?xml version="1.0" encoding="UTF-8"?>
1242
1242
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
1243
1243
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
1244
1244
  <polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
@@ -1305,66 +1305,66 @@ const An = (e) => {
1305
1305
  },
1306
1306
  emits: ["action"],
1307
1307
  setup(e, { emit: t }) {
1308
- const s = e, i = t, u = re("actionsCell"), o = re("toggleButton"), a = z(0), n = z(!1), c = z(!1), r = z({ top: 0, left: 0 }), f = {
1308
+ const s = e, i = t, d = re("actionsCell"), l = re("toggleButton"), o = z(0), n = z(!1), r = z(!1), c = z({ top: 0, left: 0 }), f = {
1309
1309
  add: "Add Row",
1310
1310
  delete: "Delete Row",
1311
1311
  duplicate: "Duplicate Row",
1312
1312
  insertAbove: "Insert Above",
1313
1313
  insertBelow: "Insert Below",
1314
1314
  move: "Move Row"
1315
- }, g = T(() => {
1316
- const h = [], m = s.config.actions || {}, I = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1317
- for (const E of I) {
1318
- const H = m[E];
1315
+ }, w = T(() => {
1316
+ const h = [], g = s.config.actions || {}, $ = ["add", "delete", "duplicate", "insertAbove", "insertBelow", "move"];
1317
+ for (const I of $) {
1318
+ const H = g[I];
1319
1319
  if (H === !1 || H === void 0) continue;
1320
- let A = !0, L = f[E], X = eo[E];
1321
- typeof H == "object" && (A = H.enabled !== !1, L = H.label || L, X = H.icon || X), A && h.push({ type: E, label: L, icon: X });
1320
+ let A = !0, L = f[I], X = eo[I];
1321
+ typeof H == "object" && (A = H.enabled !== !1, L = H.label || L, X = H.icon || X), A && h.push({ type: I, label: L, icon: X });
1322
1322
  }
1323
1323
  return h;
1324
- }), $ = T(() => {
1324
+ }), E = T(() => {
1325
1325
  if (s.config.forceDropdown) return !0;
1326
1326
  const h = s.config.dropdownThreshold ?? 150;
1327
- return h === 0 ? !1 : a.value > 0 && a.value < h;
1328
- }), V = T(() => n.value ? c.value ? {
1327
+ return h === 0 ? !1 : o.value > 0 && o.value < h;
1328
+ }), V = T(() => n.value ? r.value ? {
1329
1329
  position: "fixed",
1330
- bottom: `${window.innerHeight - r.value.top}px`,
1331
- left: `${r.value.left}px`,
1330
+ bottom: `${window.innerHeight - c.value.top}px`,
1331
+ left: `${c.value.left}px`,
1332
1332
  top: "auto"
1333
1333
  } : {
1334
1334
  position: "fixed",
1335
- top: `${r.value.top}px`,
1336
- left: `${r.value.left}px`
1335
+ top: `${c.value.top}px`,
1336
+ left: `${c.value.left}px`
1337
1337
  } : {});
1338
- Je(u, (h) => {
1339
- const m = h[0];
1340
- m && (a.value = m.contentRect.width);
1338
+ Je(d, (h) => {
1339
+ const g = h[0];
1340
+ g && (o.value = g.contentRect.width);
1341
1341
  });
1342
1342
  const x = () => {
1343
1343
  n.value || p(), n.value = !n.value;
1344
1344
  }, p = () => {
1345
- if (!o.value) return;
1346
- const h = o.value.getBoundingClientRect(), m = window.innerHeight, I = g.value.length * 40 + 16, E = m - h.bottom, H = h.top;
1347
- c.value = E < I && H > I, c.value ? r.value = {
1345
+ if (!l.value) return;
1346
+ const h = l.value.getBoundingClientRect(), g = window.innerHeight, $ = w.value.length * 40 + 16, I = g - h.bottom, H = h.top;
1347
+ r.value = I < $ && H > $, r.value ? c.value = {
1348
1348
  top: h.top,
1349
1349
  left: h.left
1350
- } : r.value = {
1350
+ } : c.value = {
1351
1351
  top: h.bottom,
1352
1352
  left: h.left
1353
1353
  };
1354
1354
  };
1355
- ot(u, () => {
1355
+ ot(d, () => {
1356
1356
  n.value = !1;
1357
1357
  });
1358
1358
  const v = (h) => {
1359
1359
  n.value = !1;
1360
- const m = s.config.actions?.[h];
1361
- typeof m == "object" && m.handler && m.handler(s.rowIndex, s.store) === !1 || i("action", h, s.rowIndex);
1360
+ const g = s.config.actions?.[h];
1361
+ typeof g == "object" && g.handler && g.handler(s.rowIndex, s.store) === !1 || i("action", h, s.rowIndex);
1362
1362
  };
1363
- return (h, m) => (y(), C("td", {
1363
+ return (h, g) => (y(), C("td", {
1364
1364
  ref: "actionsCell",
1365
1365
  class: oe(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": n.value }])
1366
1366
  }, [
1367
- $.value ? (y(), C("div", to, [
1367
+ E.value ? (y(), C("div", to, [
1368
1368
  W("button", {
1369
1369
  ref: "toggleButton",
1370
1370
  type: "button",
@@ -1372,42 +1372,42 @@ const An = (e) => {
1372
1372
  "aria-expanded": n.value,
1373
1373
  "aria-haspopup": "true",
1374
1374
  onClick: Se(x, ["stop"])
1375
- }, [...m[0] || (m[0] = [
1375
+ }, [...g[0] || (g[0] = [
1376
1376
  W("span", { class: "dropdown-icon" }, "⋮", -1)
1377
1377
  ])], 8, no),
1378
1378
  de(W("div", {
1379
- class: oe(["row-actions-menu", { "menu-flipped": c.value }]),
1379
+ class: oe(["row-actions-menu", { "menu-flipped": r.value }]),
1380
1380
  style: me(V.value),
1381
1381
  role: "menu"
1382
1382
  }, [
1383
- (y(!0), C(he, null, ye(g.value, (I) => (y(), C("button", {
1384
- key: I.type,
1383
+ (y(!0), C(he, null, ye(w.value, ($) => (y(), C("button", {
1384
+ key: $.type,
1385
1385
  type: "button",
1386
1386
  class: "row-action-menu-item",
1387
1387
  role: "menuitem",
1388
- onClick: Se((E) => v(I.type), ["stop"])
1388
+ onClick: Se((I) => v($.type), ["stop"])
1389
1389
  }, [
1390
1390
  W("span", {
1391
1391
  class: "action-icon",
1392
- innerHTML: I.icon
1392
+ innerHTML: $.icon
1393
1393
  }, null, 8, lo),
1394
- W("span", ao, xe(I.label), 1)
1394
+ W("span", ao, xe($.label), 1)
1395
1395
  ], 8, oo))), 128))
1396
1396
  ], 6), [
1397
1397
  [it, n.value]
1398
1398
  ])
1399
1399
  ])) : (y(), C("div", so, [
1400
- (y(!0), C(he, null, ye(g.value, (I) => (y(), C("button", {
1401
- key: I.type,
1400
+ (y(!0), C(he, null, ye(w.value, ($) => (y(), C("button", {
1401
+ key: $.type,
1402
1402
  type: "button",
1403
1403
  class: "row-action-btn",
1404
- title: I.label,
1405
- "aria-label": I.label,
1406
- onClick: Se((E) => v(I.type), ["stop"])
1404
+ title: $.label,
1405
+ "aria-label": $.label,
1406
+ onClick: Se((I) => v($.type), ["stop"])
1407
1407
  }, [
1408
1408
  W("span", {
1409
1409
  class: "action-icon",
1410
- innerHTML: I.icon
1410
+ innerHTML: $.icon
1411
1411
  }, null, 8, ro)
1412
1412
  ], 8, io))), 128))
1413
1413
  ]))
@@ -1423,8 +1423,8 @@ const An = (e) => {
1423
1423
  },
1424
1424
  emits: ["row:action"],
1425
1425
  setup(e, { emit: t }) {
1426
- const s = t, i = re("rowEl"), u = T(() => e.store.isRowVisible(e.rowIndex)), o = T(() => e.store.getRowExpandSymbol(e.rowIndex)), a = T(() => e.store.config.rowActions || { enabled: !1 }), n = T(() => a.value.enabled), c = T(() => a.value.position || "before-index"), r = (f, g) => {
1427
- s("row:action", f, g);
1426
+ const s = t, i = re("rowEl"), d = T(() => e.store.isRowVisible(e.rowIndex)), l = T(() => e.store.getRowExpandSymbol(e.rowIndex)), o = T(() => e.store.config.rowActions || { enabled: !1 }), n = T(() => o.value.enabled), r = T(() => o.value.position || "before-index"), c = (f, w) => {
1427
+ s("row:action", f, w);
1428
1428
  };
1429
1429
  if (e.addNavigation) {
1430
1430
  let f = Qe;
@@ -1438,18 +1438,18 @@ const An = (e) => {
1438
1438
  }
1439
1439
  ]);
1440
1440
  }
1441
- return (f, g) => de((y(), C("tr", {
1441
+ return (f, w) => de((y(), C("tr", {
1442
1442
  ref: "rowEl",
1443
1443
  tabindex: e.tabIndex,
1444
1444
  class: "atable-row"
1445
1445
  }, [
1446
- n.value && c.value === "before-index" ? (y(), ve(qe, {
1446
+ n.value && r.value === "before-index" ? (y(), ve(qe, {
1447
1447
  key: 0,
1448
1448
  "row-index": e.rowIndex,
1449
1449
  store: e.store,
1450
- config: a.value,
1451
- position: c.value,
1452
- onAction: r
1450
+ config: o.value,
1451
+ position: r.value,
1452
+ onAction: c
1453
1453
  }, null, 8, ["row-index", "store", "config", "position"])) : K("", !0),
1454
1454
  e.store.config.view !== "uncounted" ? fe(f.$slots, "index", { key: 1 }, () => [
1455
1455
  e.store.config.view === "list" ? (y(), C("td", {
@@ -1460,38 +1460,38 @@ const An = (e) => {
1460
1460
  key: 1,
1461
1461
  tabIndex: -1,
1462
1462
  class: oe(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1463
- onClick: g[0] || (g[0] = ($) => e.store.toggleRowExpand(e.rowIndex))
1464
- }, xe(o.value), 3)) : K("", !0)
1463
+ onClick: w[0] || (w[0] = (E) => e.store.toggleRowExpand(e.rowIndex))
1464
+ }, xe(l.value), 3)) : K("", !0)
1465
1465
  ], !0) : K("", !0),
1466
- n.value && c.value === "after-index" ? (y(), ve(qe, {
1466
+ n.value && r.value === "after-index" ? (y(), ve(qe, {
1467
1467
  key: 2,
1468
1468
  "row-index": e.rowIndex,
1469
1469
  store: e.store,
1470
- config: a.value,
1471
- position: c.value,
1472
- onAction: r
1470
+ config: o.value,
1471
+ position: r.value,
1472
+ onAction: c
1473
1473
  }, null, 8, ["row-index", "store", "config", "position"])) : K("", !0),
1474
1474
  fe(f.$slots, "default", {}, void 0, !0),
1475
- n.value && c.value === "end" ? (y(), ve(qe, {
1475
+ n.value && r.value === "end" ? (y(), ve(qe, {
1476
1476
  key: 3,
1477
1477
  "row-index": e.rowIndex,
1478
1478
  store: e.store,
1479
- config: a.value,
1480
- position: c.value,
1481
- onAction: r
1479
+ config: o.value,
1480
+ position: r.value,
1481
+ onAction: c
1482
1482
  }, null, 8, ["row-index", "store", "config", "position"])) : K("", !0)
1483
1483
  ], 8, co)), [
1484
- [it, u.value]
1484
+ [it, d.value]
1485
1485
  ]);
1486
1486
  }
1487
- }), Lt = /* @__PURE__ */ Ie(uo, [["__scopeId", "data-v-2e038a9c"]]), nt = /* @__PURE__ */ new WeakMap(), fo = {
1487
+ }), Lt = /* @__PURE__ */ $e(uo, [["__scopeId", "data-v-e7ca13d1"]]), nt = /* @__PURE__ */ new WeakMap(), fo = {
1488
1488
  mounted(e, t) {
1489
1489
  const s = !t.modifiers.bubble;
1490
1490
  let i;
1491
1491
  if (typeof t.value == "function") i = ot(e, t.value, { capture: s });
1492
1492
  else {
1493
- const [u, o] = t.value;
1494
- i = ot(e, u, Object.assign({ capture: s }, o));
1493
+ const [d, l] = t.value;
1494
+ i = ot(e, d, Object.assign({ capture: s }, l));
1495
1495
  }
1496
1496
  nt.set(e, i);
1497
1497
  },
@@ -1508,8 +1508,8 @@ function ho() {
1508
1508
  return (s, i) => {
1509
1509
  if (t.value = i.value, e) return;
1510
1510
  e = !0;
1511
- const u = Sn(s, i.value);
1512
- ce(t, (o) => u.value = o);
1511
+ const d = Sn(s, i.value);
1512
+ ce(t, (l) => d.value = l);
1513
1513
  };
1514
1514
  }
1515
1515
  ho();
@@ -1531,22 +1531,22 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1531
1531
  },
1532
1532
  emits: ["connection:delete"],
1533
1533
  setup(e, { emit: t }) {
1534
- const s = t, i = T(() => e.store.connectionPaths.filter((a) => {
1535
- const n = e.store.ganttBars.find((r) => r.id === a.from.barId), c = e.store.ganttBars.find((r) => r.id === a.to.barId);
1536
- return n && c;
1537
- })), u = (a) => {
1534
+ const s = t, i = T(() => e.store.connectionPaths.filter((o) => {
1535
+ const n = e.store.ganttBars.find((c) => c.id === o.from.barId), r = e.store.ganttBars.find((c) => c.id === o.to.barId);
1536
+ return n && r;
1537
+ })), d = (o) => {
1538
1538
  const n = e.store.connectionHandles.find(
1539
- (L) => L.barId === a.from.barId && L.side === a.from.side
1540
- ), c = e.store.connectionHandles.find(
1541
- (L) => L.barId === a.to.barId && L.side === a.to.side
1539
+ (L) => L.barId === o.from.barId && L.side === o.from.side
1540
+ ), r = e.store.connectionHandles.find(
1541
+ (L) => L.barId === o.to.barId && L.side === o.to.side
1542
1542
  );
1543
- if (!n || !c) return "";
1544
- const r = n.position.x + Ye / 2, f = n.position.y + Ye / 2, g = c.position.x + Ye / 2, $ = c.position.y + Ye / 2, V = Math.abs(g - r), x = Math.max(V * xo, 50), p = r + (a.from.side === "left" ? -x : x), v = g + (a.to.side === "left" ? -x : x), h = { x: 0.5 * r + 0.5 * p, y: 0.5 * f + 0.5 * f }, m = { x: 0.5 * p + 0.5 * v, y: 0.5 * f + 0.5 * $ }, I = { x: 0.5 * v + 0.5 * g, y: 0.5 * $ + 0.5 * $ }, E = { x: 0.5 * h.x + 0.5 * m.x, y: 0.5 * h.y + 0.5 * m.y }, H = { x: 0.5 * m.x + 0.5 * I.x, y: 0.5 * m.y + 0.5 * I.y }, A = { x: 0.5 * E.x + 0.5 * H.x, y: 0.5 * E.y + 0.5 * H.y };
1545
- return `M ${r} ${f} Q ${p} ${f}, ${A.x} ${A.y} Q ${v} ${$}, ${g} ${$}`;
1546
- }, o = (a) => {
1547
- e.store.deleteConnection(a.id) && s("connection:delete", a);
1543
+ if (!n || !r) return "";
1544
+ const c = n.position.x + Ye / 2, f = n.position.y + Ye / 2, w = r.position.x + Ye / 2, E = r.position.y + Ye / 2, V = Math.abs(w - c), x = Math.max(V * xo, 50), p = c + (o.from.side === "left" ? -x : x), v = w + (o.to.side === "left" ? -x : x), h = { x: 0.5 * c + 0.5 * p, y: 0.5 * f + 0.5 * f }, g = { x: 0.5 * p + 0.5 * v, y: 0.5 * f + 0.5 * E }, $ = { x: 0.5 * v + 0.5 * w, y: 0.5 * E + 0.5 * E }, I = { x: 0.5 * h.x + 0.5 * g.x, y: 0.5 * h.y + 0.5 * g.y }, H = { x: 0.5 * g.x + 0.5 * $.x, y: 0.5 * g.y + 0.5 * $.y }, A = { x: 0.5 * I.x + 0.5 * H.x, y: 0.5 * I.y + 0.5 * H.y };
1545
+ return `M ${c} ${f} Q ${p} ${f}, ${A.x} ${A.y} Q ${v} ${E}, ${w} ${E}`;
1546
+ }, l = (o) => {
1547
+ e.store.deleteConnection(o.id) && s("connection:delete", o);
1548
1548
  };
1549
- return (a, n) => (y(), C("div", go, [
1549
+ return (o, n) => (y(), C("div", go, [
1550
1550
  (y(), C("svg", mo, [
1551
1551
  n[0] || (n[0] = W("defs", null, [
1552
1552
  W("path", {
@@ -1571,36 +1571,36 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1571
1571
  })
1572
1572
  ])
1573
1573
  ], -1)),
1574
- (y(!0), C(he, null, ye(i.value, (c) => (y(), C("path", {
1575
- key: `${c.id}-hitbox`,
1576
- d: u(c),
1574
+ (y(!0), C(he, null, ye(i.value, (r) => (y(), C("path", {
1575
+ key: `${r.id}-hitbox`,
1576
+ d: d(r),
1577
1577
  stroke: "transparent",
1578
- "stroke-width": (c.style?.width || 2) + 10,
1578
+ "stroke-width": (r.style?.width || 2) + 10,
1579
1579
  fill: "none",
1580
1580
  class: "connection-hitbox",
1581
- onDblclick: (r) => o(c)
1581
+ onDblclick: (c) => l(r)
1582
1582
  }, null, 40, wo))), 128)),
1583
- (y(!0), C(he, null, ye(i.value, (c) => (y(), C("path", {
1584
- id: c.id,
1585
- key: c.id,
1586
- d: u(c),
1587
- stroke: c.style?.color || "#666",
1588
- "stroke-width": c.style?.width || 2,
1583
+ (y(!0), C(he, null, ye(i.value, (r) => (y(), C("path", {
1584
+ id: r.id,
1585
+ key: r.id,
1586
+ d: d(r),
1587
+ stroke: r.style?.color || "#666",
1588
+ "stroke-width": r.style?.width || 2,
1589
1589
  fill: "none",
1590
1590
  "marker-mid": "url(#arrowhead-marker)",
1591
1591
  class: "connection-path animated-path",
1592
- onDblclick: (r) => o(c)
1592
+ onDblclick: (c) => l(r)
1593
1593
  }, null, 40, po))), 128))
1594
1594
  ]))
1595
1595
  ]));
1596
1596
  }
1597
- }), bo = /* @__PURE__ */ Ie(yo, [["__scopeId", "data-v-d5929c98"]]), Co = { class: "column-filter" }, ko = {
1597
+ }), bo = /* @__PURE__ */ $e(yo, [["__scopeId", "data-v-d5929c98"]]), Co = { class: "column-filter" }, ko = {
1598
1598
  key: 2,
1599
1599
  class: "checkbox-filter"
1600
1600
  }, Mo = ["value"], Ro = {
1601
1601
  key: 5,
1602
1602
  class: "date-range-filter"
1603
- }, Io = /* @__PURE__ */ we({
1603
+ }, $o = /* @__PURE__ */ we({
1604
1604
  __name: "ATableColumnFilter",
1605
1605
  props: {
1606
1606
  column: {},
@@ -1611,20 +1611,20 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1611
1611
  const t = z(""), s = Gt({
1612
1612
  startValue: "",
1613
1613
  endValue: ""
1614
- }), i = (c) => {
1615
- if (c.filterOptions) return c.filterOptions;
1616
- const r = /* @__PURE__ */ new Set();
1614
+ }), i = (r) => {
1615
+ if (r.filterOptions) return r.filterOptions;
1616
+ const c = /* @__PURE__ */ new Set();
1617
1617
  return e.store.rows.forEach((f) => {
1618
- const g = f[c.name];
1619
- g != null && g !== "" && r.add(g);
1620
- }), Array.from(r).map((f) => ({
1618
+ const w = f[r.name];
1619
+ w != null && w !== "" && c.add(w);
1620
+ }), Array.from(c).map((f) => ({
1621
1621
  value: f,
1622
1622
  label: String(f)
1623
1623
  }));
1624
- }, u = T(() => !!(t.value || s.startValue || s.endValue)), o = (c) => {
1625
- !c && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = c, e.store.setFilter(e.colIndex, { value: c }));
1626
- }, a = (c, r) => {
1627
- c === "start" ? s.startValue = r : s.endValue = r, !s.startValue && !s.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
1624
+ }, d = T(() => !!(t.value || s.startValue || s.endValue)), l = (r) => {
1625
+ !r && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = r, e.store.setFilter(e.colIndex, { value: r }));
1626
+ }, o = (r, c) => {
1627
+ r === "start" ? s.startValue = c : s.endValue = c, !s.startValue && !s.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
1628
1628
  value: null,
1629
1629
  startValue: s.startValue,
1630
1630
  endValue: s.endValue
@@ -1632,40 +1632,40 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1632
1632
  }, n = () => {
1633
1633
  t.value = "", s.startValue = "", s.endValue = "", e.store.clearFilter(e.colIndex);
1634
1634
  };
1635
- return (c, r) => (y(), C("div", Co, [
1635
+ return (r, c) => (y(), C("div", Co, [
1636
1636
  (e.column.filterType || "text") === "text" ? de((y(), C("input", {
1637
1637
  key: 0,
1638
- "onUpdate:modelValue": r[0] || (r[0] = (f) => t.value = f),
1638
+ "onUpdate:modelValue": c[0] || (c[0] = (f) => t.value = f),
1639
1639
  type: "text",
1640
1640
  class: "filter-input",
1641
- onInput: r[1] || (r[1] = (f) => o(t.value))
1641
+ onInput: c[1] || (c[1] = (f) => l(t.value))
1642
1642
  }, null, 544)), [
1643
1643
  [Ne, t.value]
1644
1644
  ]) : e.column.filterType === "number" ? de((y(), C("input", {
1645
1645
  key: 1,
1646
- "onUpdate:modelValue": r[2] || (r[2] = (f) => t.value = f),
1646
+ "onUpdate:modelValue": c[2] || (c[2] = (f) => t.value = f),
1647
1647
  type: "number",
1648
1648
  class: "filter-input",
1649
- onInput: r[3] || (r[3] = (f) => o(t.value))
1649
+ onInput: c[3] || (c[3] = (f) => l(t.value))
1650
1650
  }, null, 544)), [
1651
1651
  [Ne, t.value]
1652
1652
  ]) : e.column.filterType === "checkbox" ? (y(), C("label", ko, [
1653
1653
  de(W("input", {
1654
- "onUpdate:modelValue": r[4] || (r[4] = (f) => t.value = f),
1654
+ "onUpdate:modelValue": c[4] || (c[4] = (f) => t.value = f),
1655
1655
  type: "checkbox",
1656
1656
  class: "filter-checkbox",
1657
- onChange: r[5] || (r[5] = (f) => o(t.value))
1657
+ onChange: c[5] || (c[5] = (f) => l(t.value))
1658
1658
  }, null, 544), [
1659
1659
  [Yt, t.value]
1660
1660
  ]),
1661
1661
  W("span", null, xe(e.column.label), 1)
1662
1662
  ])) : e.column.filterType === "select" ? de((y(), C("select", {
1663
1663
  key: 3,
1664
- "onUpdate:modelValue": r[6] || (r[6] = (f) => t.value = f),
1664
+ "onUpdate:modelValue": c[6] || (c[6] = (f) => t.value = f),
1665
1665
  class: "filter-select",
1666
- onChange: r[7] || (r[7] = (f) => o(t.value))
1666
+ onChange: c[7] || (c[7] = (f) => l(t.value))
1667
1667
  }, [
1668
- r[15] || (r[15] = W("option", { value: "" }, "All", -1)),
1668
+ c[15] || (c[15] = W("option", { value: "" }, "All", -1)),
1669
1669
  (y(!0), C(he, null, ye(i(e.column), (f) => (y(), C("option", {
1670
1670
  key: f.value || f,
1671
1671
  value: f.value || f
@@ -1674,27 +1674,27 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1674
1674
  [Ut, t.value]
1675
1675
  ]) : e.column.filterType === "date" ? de((y(), C("input", {
1676
1676
  key: 4,
1677
- "onUpdate:modelValue": r[8] || (r[8] = (f) => t.value = f),
1677
+ "onUpdate:modelValue": c[8] || (c[8] = (f) => t.value = f),
1678
1678
  type: "date",
1679
1679
  class: "filter-input",
1680
- onChange: r[9] || (r[9] = (f) => o(t.value))
1680
+ onChange: c[9] || (c[9] = (f) => l(t.value))
1681
1681
  }, null, 544)), [
1682
1682
  [Ne, t.value]
1683
1683
  ]) : e.column.filterType === "dateRange" ? (y(), C("div", Ro, [
1684
1684
  de(W("input", {
1685
- "onUpdate:modelValue": r[10] || (r[10] = (f) => s.startValue = f),
1685
+ "onUpdate:modelValue": c[10] || (c[10] = (f) => s.startValue = f),
1686
1686
  type: "date",
1687
1687
  class: "filter-input",
1688
- onChange: r[11] || (r[11] = (f) => a("start", s.startValue))
1688
+ onChange: c[11] || (c[11] = (f) => o("start", s.startValue))
1689
1689
  }, null, 544), [
1690
1690
  [Ne, s.startValue]
1691
1691
  ]),
1692
- r[16] || (r[16] = W("span", { class: "date-separator" }, "-", -1)),
1692
+ c[16] || (c[16] = W("span", { class: "date-separator" }, "-", -1)),
1693
1693
  de(W("input", {
1694
- "onUpdate:modelValue": r[12] || (r[12] = (f) => s.endValue = f),
1694
+ "onUpdate:modelValue": c[12] || (c[12] = (f) => s.endValue = f),
1695
1695
  type: "date",
1696
1696
  class: "filter-input",
1697
- onChange: r[13] || (r[13] = (f) => a("end", s.endValue))
1697
+ onChange: c[13] || (c[13] = (f) => o("end", s.endValue))
1698
1698
  }, null, 544), [
1699
1699
  [Ne, s.endValue]
1700
1700
  ])
@@ -1702,19 +1702,19 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1702
1702
  key: 6,
1703
1703
  value: t.value,
1704
1704
  column: e.column,
1705
- colIndex: e.colIndex,
1705
+ "col-index": e.colIndex,
1706
1706
  store: e.store,
1707
- "onUpdate:value": r[14] || (r[14] = (f) => o(f))
1708
- }, null, 40, ["value", "column", "colIndex", "store"])) : K("", !0),
1709
- u.value ? (y(), C("button", {
1707
+ "onUpdate:value": c[14] || (c[14] = (f) => l(f))
1708
+ }, null, 40, ["value", "column", "col-index", "store"])) : K("", !0),
1709
+ d.value ? (y(), C("button", {
1710
1710
  key: 7,
1711
- onClick: n,
1712
1711
  class: "clear-btn",
1713
- title: "Clear"
1712
+ title: "Clear",
1713
+ onClick: n
1714
1714
  }, "×")) : K("", !0)
1715
1715
  ]));
1716
1716
  }
1717
- }), $o = /* @__PURE__ */ Ie(Io, [["__scopeId", "data-v-8487462d"]]), Eo = { key: 0 }, So = {
1717
+ }), Io = /* @__PURE__ */ $e($o, [["__scopeId", "data-v-a809a3bf"]]), Eo = { key: 0 }, So = {
1718
1718
  class: "atable-header-row",
1719
1719
  tabindex: "-1"
1720
1720
  }, Ao = {
@@ -1739,72 +1739,72 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1739
1739
  store: {}
1740
1740
  },
1741
1741
  setup(e) {
1742
- const t = e, s = T(() => t.columns.filter((n) => n.filterable)), i = T(() => t.store.config.value?.rowActions?.enabled ?? !1), u = T(() => t.store.config.value?.rowActions?.position ?? "before-index"), o = (n) => t.store.sortByColumn(n), a = (n) => {
1743
- for (const c of n) {
1744
- if (c.borderBoxSize.length === 0) continue;
1745
- const f = c.borderBoxSize[0].inlineSize, g = Number(c.target.dataset.colindex), $ = t.store.columns[g]?.width;
1746
- typeof $ == "number" && $ !== f && t.store.resizeColumn(g, f);
1742
+ const t = T(() => e.columns.filter((o) => o.filterable)), s = T(() => e.store.config.rowActions?.enabled ?? !1), i = T(() => e.store.config.rowActions?.position ?? "before-index"), d = (o) => e.store.sortByColumn(o), l = (o) => {
1743
+ for (const n of o) {
1744
+ if (n.borderBoxSize.length === 0) continue;
1745
+ const c = n.borderBoxSize[0].inlineSize, f = Number(n.target.dataset.colindex), w = e.store.columns[f]?.width;
1746
+ typeof w == "number" && w !== c && e.store.resizeColumn(f, c);
1747
1747
  }
1748
1748
  };
1749
- return (n, c) => t.columns.length ? (y(), C("thead", Eo, [
1749
+ return (o, n) => e.columns.length ? (y(), C("thead", Eo, [
1750
1750
  W("tr", So, [
1751
- i.value && u.value === "before-index" ? (y(), C("th", {
1751
+ s.value && i.value === "before-index" ? (y(), C("th", {
1752
1752
  key: 0,
1753
- class: oe(["row-actions-header", { "sticky-column": u.value === "before-index" }])
1753
+ class: oe(["row-actions-header", { "sticky-column": i.value === "before-index" }])
1754
1754
  }, null, 2)) : K("", !0),
1755
- t.store.zeroColumn ? (y(), C("th", {
1755
+ e.store.zeroColumn ? (y(), C("th", {
1756
1756
  key: 1,
1757
1757
  id: "header-index",
1758
1758
  class: oe([[
1759
- t.store.hasPinnedColumns ? "sticky-index" : "",
1760
- t.store.isTreeView ? "tree-index" : "",
1761
- t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1759
+ e.store.hasPinnedColumns ? "sticky-index" : "",
1760
+ e.store.isTreeView ? "tree-index" : "",
1761
+ e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1762
1762
  ], "list-index"])
1763
1763
  }, null, 2)) : K("", !0),
1764
- i.value && u.value === "after-index" ? (y(), C("th", Ao)) : K("", !0),
1765
- (y(!0), C(he, null, ye(t.columns, (r, f) => de((y(), C("th", {
1764
+ s.value && i.value === "after-index" ? (y(), C("th", Ao)) : K("", !0),
1765
+ (y(!0), C(he, null, ye(e.columns, (r, c) => de((y(), C("th", {
1766
1766
  key: r.name,
1767
- "data-colindex": f,
1767
+ "data-colindex": c,
1768
1768
  tabindex: "-1",
1769
- style: me(t.store.getHeaderCellStyle(r)),
1769
+ style: me(e.store.getHeaderCellStyle(r)),
1770
1770
  class: oe(`${r.pinned ? "sticky-column" : ""} ${r.sortable === !1 ? "" : "cursor-pointer"}`),
1771
- onClick: (g) => r.sortable !== !1 ? o(f) : void 0
1771
+ onClick: (f) => r.sortable !== !1 ? d(c) : void 0
1772
1772
  }, [
1773
- fe(n.$slots, "default", {}, () => [
1774
- jt(xe(r.label || String.fromCharCode(f + 97).toUpperCase()), 1)
1773
+ fe(o.$slots, "default", {}, () => [
1774
+ jt(xe(r.label || String.fromCharCode(c + 97).toUpperCase()), 1)
1775
1775
  ])
1776
1776
  ], 14, To)), [
1777
- [Z(vo), a]
1777
+ [Z(vo), l]
1778
1778
  ])), 128)),
1779
- i.value && u.value === "end" ? (y(), C("th", Do)) : K("", !0)
1779
+ s.value && i.value === "end" ? (y(), C("th", Do)) : K("", !0)
1780
1780
  ]),
1781
- s.value.length > 0 ? (y(), C("tr", Ho, [
1782
- i.value && u.value === "before-index" ? (y(), C("th", {
1781
+ t.value.length > 0 ? (y(), C("tr", Ho, [
1782
+ s.value && i.value === "before-index" ? (y(), C("th", {
1783
1783
  key: 0,
1784
- class: oe(["row-actions-header", { "sticky-column": u.value === "before-index" }])
1784
+ class: oe(["row-actions-header", { "sticky-column": i.value === "before-index" }])
1785
1785
  }, null, 2)) : K("", !0),
1786
- t.store.zeroColumn ? (y(), C("th", {
1786
+ e.store.zeroColumn ? (y(), C("th", {
1787
1787
  key: 1,
1788
1788
  class: oe([[
1789
- t.store.hasPinnedColumns ? "sticky-index" : "",
1790
- t.store.isTreeView ? "tree-index" : "",
1791
- t.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1789
+ e.store.hasPinnedColumns ? "sticky-index" : "",
1790
+ e.store.isTreeView ? "tree-index" : "",
1791
+ e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1792
1792
  ], "list-index"])
1793
1793
  }, null, 2)) : K("", !0),
1794
- i.value && u.value === "after-index" ? (y(), C("th", Lo)) : K("", !0),
1795
- (y(!0), C(he, null, ye(t.columns, (r, f) => (y(), C("th", {
1794
+ s.value && i.value === "after-index" ? (y(), C("th", Lo)) : K("", !0),
1795
+ (y(!0), C(he, null, ye(e.columns, (r, c) => (y(), C("th", {
1796
1796
  key: `filter-${r.name}`,
1797
1797
  class: oe(`${r.pinned ? "sticky-column" : ""}`),
1798
- style: me(t.store.getHeaderCellStyle(r))
1798
+ style: me(e.store.getHeaderCellStyle(r))
1799
1799
  }, [
1800
- r.filterable ? (y(), ve($o, {
1800
+ r.filterable ? (y(), ve(Io, {
1801
1801
  key: 0,
1802
1802
  column: r,
1803
- "col-index": f,
1804
- store: t.store
1803
+ "col-index": c,
1804
+ store: e.store
1805
1805
  }, null, 8, ["column", "col-index", "store"])) : K("", !0)
1806
1806
  ], 6))), 128)),
1807
- i.value && u.value === "end" ? (y(), C("th", Oo)) : K("", !0)
1807
+ s.value && i.value === "end" ? (y(), C("th", Oo)) : K("", !0)
1808
1808
  ])) : K("", !0)
1809
1809
  ])) : K("", !0);
1810
1810
  }
@@ -1814,49 +1814,49 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1814
1814
  store: {}
1815
1815
  },
1816
1816
  setup(e) {
1817
- const t = re("amodal"), { width: s, height: i } = $e(t), u = T(() => {
1817
+ const t = re("amodal"), { width: s, height: i } = Ie(t), d = T(() => {
1818
1818
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
1819
- const o = e.store.modal.cell?.closest("table");
1820
- if (!o) return {};
1821
- const a = o.offsetHeight || 0, n = o.offsetWidth || 0;
1822
- let c = e.store.modal.cell?.offsetTop || 0;
1823
- const r = o.querySelector("thead")?.offsetHeight || 0;
1824
- c += r, c = c + i.value < a ? c : c - (i.value + e.store.modal.height);
1819
+ const l = e.store.modal.cell?.closest("table");
1820
+ if (!l) return {};
1821
+ const o = l.offsetHeight || 0, n = l.offsetWidth || 0;
1822
+ let r = e.store.modal.cell?.offsetTop || 0;
1823
+ const c = l.querySelector("thead")?.offsetHeight || 0;
1824
+ r += c, r = r + i.value < o ? r : r - (i.value + e.store.modal.height);
1825
1825
  let f = e.store.modal.cell?.offsetLeft || 0;
1826
1826
  return f = f + s.value <= n ? f : f - (s.value - e.store.modal.width), {
1827
1827
  left: `${f}px`,
1828
- top: `${c}px`
1828
+ top: `${r}px`
1829
1829
  };
1830
1830
  });
1831
- return (o, a) => (y(), C("div", {
1831
+ return (l, o) => (y(), C("div", {
1832
1832
  ref: "amodal",
1833
1833
  class: "amodal",
1834
1834
  tabindex: "-1",
1835
- style: me(u.value),
1836
- onClick: a[0] || (a[0] = Se(() => {
1835
+ style: me(d.value),
1836
+ onClick: o[0] || (o[0] = Se(() => {
1837
1837
  }, ["stop"])),
1838
- onInput: a[1] || (a[1] = Se(() => {
1838
+ onInput: o[1] || (o[1] = Se(() => {
1839
1839
  }, ["stop"]))
1840
1840
  }, [
1841
- fe(o.$slots, "default")
1841
+ fe(l.$slots, "default")
1842
1842
  ], 36));
1843
1843
  }
1844
1844
  }), Vo = (e) => {
1845
1845
  const t = e.id || Tn();
1846
1846
  return qt(`table-${t}`, () => {
1847
1847
  const i = () => {
1848
- const l = [Object.assign({}, { rowModified: !1 })], d = /* @__PURE__ */ new Set();
1849
- for (let b = 0; b < o.value.length; b++) {
1850
- const M = o.value[b];
1851
- M.parent !== null && M.parent !== void 0 && d.add(M.parent);
1848
+ const a = [Object.assign({}, { rowModified: !1 })], u = /* @__PURE__ */ new Set();
1849
+ for (let b = 0; b < l.value.length; b++) {
1850
+ const M = l.value[b];
1851
+ M.parent !== null && M.parent !== void 0 && u.add(M.parent);
1852
1852
  }
1853
- const w = (b) => o.value[b]?.gantt !== void 0, R = (b) => {
1854
- for (let M = 0; M < o.value.length; M++)
1855
- if (o.value[M].parent === b && (w(M) || R(M)))
1853
+ const m = (b) => l.value[b]?.gantt !== void 0, R = (b) => {
1854
+ for (let M = 0; M < l.value.length; M++)
1855
+ if (l.value[M].parent === b && (m(M) || R(M)))
1856
1856
  return !0;
1857
1857
  return !1;
1858
1858
  }, P = (b) => {
1859
- const M = a.value, N = M.view === "tree" || M.view === "tree-gantt" ? M.defaultTreeExpansion : void 0;
1859
+ const M = o.value, N = M.view === "tree" || M.view === "tree-gantt" ? M.defaultTreeExpansion : void 0;
1860
1860
  if (!N) return !0;
1861
1861
  switch (N) {
1862
1862
  case "root":
@@ -1871,9 +1871,9 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1871
1871
  return !0;
1872
1872
  }
1873
1873
  };
1874
- for (let b = 0; b < o.value.length; b++) {
1875
- const M = o.value[b], N = M.parent === null || M.parent === void 0, ee = d.has(b);
1876
- l[b] = {
1874
+ for (let b = 0; b < l.value.length; b++) {
1875
+ const M = l.value[b], N = M.parent === null || M.parent === void 0, ee = u.has(b);
1876
+ a[b] = {
1877
1877
  childrenOpen: P(b),
1878
1878
  expanded: !1,
1879
1879
  indent: M.indent || 0,
@@ -1885,152 +1885,152 @@ const go = { class: "gantt-connection-overlay" }, mo = {
1885
1885
  parent: M.parent
1886
1886
  };
1887
1887
  }
1888
- return l;
1889
- }, u = z(e.columns), o = z(e.rows), a = z(e.config || {}), n = z({}), c = z({}), r = T(() => {
1890
- const l = {};
1891
- for (const [d, w] of u.value.entries())
1892
- for (const [R, P] of o.value.entries())
1893
- l[`${d}:${R}`] = P[w.name];
1894
- return l;
1888
+ return a;
1889
+ }, d = z(e.columns), l = z(e.rows), o = z(e.config || {}), n = z({}), r = z({}), c = T(() => {
1890
+ const a = {};
1891
+ for (const [u, m] of d.value.entries())
1892
+ for (const [R, P] of l.value.entries())
1893
+ a[`${u}:${R}`] = P[m.name];
1894
+ return a;
1895
1895
  }), f = T({
1896
1896
  get: () => {
1897
- const l = i();
1898
- for (let d = 0; d < l.length; d++)
1899
- n.value[d] && (l[d].rowModified = n.value[d]), c.value[d] && (c.value[d].childrenOpen !== void 0 && (l[d].childrenOpen = c.value[d].childrenOpen), c.value[d].expanded !== void 0 && (l[d].expanded = c.value[d].expanded));
1900
- if (E.value) {
1901
- const d = (w, R) => {
1902
- const P = R[w];
1897
+ const a = i();
1898
+ for (let u = 0; u < a.length; u++)
1899
+ n.value[u] && (a[u].rowModified = n.value[u]), r.value[u] && (r.value[u].childrenOpen !== void 0 && (a[u].childrenOpen = r.value[u].childrenOpen), r.value[u].expanded !== void 0 && (a[u].expanded = r.value[u].expanded));
1900
+ if (I.value) {
1901
+ const u = (m, R) => {
1902
+ const P = R[m];
1903
1903
  if (P.isRoot || P.parent === null || P.parent === void 0)
1904
1904
  return !0;
1905
1905
  const b = P.parent;
1906
- return b < 0 || b >= R.length ? !1 : (R[b].childrenOpen || !1) && d(b, R);
1906
+ return b < 0 || b >= R.length ? !1 : (R[b].childrenOpen || !1) && u(b, R);
1907
1907
  };
1908
- for (let w = 0; w < l.length; w++)
1909
- l[w].isRoot || (l[w].open = d(w, l));
1908
+ for (let m = 0; m < a.length; m++)
1909
+ a[m].isRoot || (a[m].open = u(m, a));
1910
1910
  }
1911
- return l;
1911
+ return a;
1912
1912
  },
1913
- set: (l) => {
1914
- JSON.stringify(l) !== JSON.stringify(f.value) && (f.value = l);
1913
+ set: (a) => {
1914
+ JSON.stringify(a) !== JSON.stringify(f.value) && (f.value = a);
1915
1915
  }
1916
- }), g = z(e.modal || { visible: !1 }), $ = z({}), V = z([]), x = z([]), p = z([]), v = z({
1916
+ }), w = z(e.modal || { visible: !1 }), E = z({}), V = z([]), x = z([]), p = z([]), v = z({
1917
1917
  column: null,
1918
1918
  direction: null
1919
- }), h = z({}), m = T(() => u.value.some((l) => l.pinned)), I = T(() => a.value.view === "gantt" || a.value.view === "tree-gantt"), E = T(() => a.value.view === "tree" || a.value.view === "tree-gantt"), H = T(() => {
1920
- const l = a.value;
1921
- return l.view === "gantt" || l.view === "tree-gantt" ? l.dependencyGraph !== !1 : !0;
1922
- }), A = T(() => `${Math.ceil(o.value.length / 100 + 1)}ch`), L = T(
1923
- () => a.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(a.value.view) : !1
1919
+ }), h = z({}), g = T(() => d.value.some((a) => a.pinned)), $ = T(() => o.value.view === "gantt" || o.value.view === "tree-gantt"), I = T(() => o.value.view === "tree" || o.value.view === "tree-gantt"), H = T(() => {
1920
+ const a = o.value;
1921
+ return a.view === "gantt" || a.view === "tree-gantt" ? a.dependencyGraph !== !1 : !0;
1922
+ }), A = T(() => `${Math.ceil(l.value.length / 100 + 1)}ch`), L = T(
1923
+ () => o.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(o.value.view) : !1
1924
1924
  ), X = T(() => {
1925
- let l = o.value.map((d, w) => ({
1926
- ...d,
1927
- originalIndex: w
1925
+ let a = l.value.map((u, m) => ({
1926
+ ...u,
1927
+ originalIndex: m
1928
1928
  }));
1929
- if (Object.entries(h.value).forEach(([d, w]) => {
1930
- const R = parseInt(d), P = u.value[R];
1931
- !P || !(w.value || w.startValue || w.endValue || P.filterType === "checkbox" && w.value !== void 0) || (l = l.filter((M) => {
1929
+ if (Object.entries(h.value).forEach(([u, m]) => {
1930
+ const R = parseInt(u), P = d.value[R];
1931
+ !P || !(m.value || m.startValue || m.endValue || P.filterType === "checkbox" && m.value !== void 0) || (a = a.filter((M) => {
1932
1932
  const N = M[P.name];
1933
- return _(N, w, P);
1933
+ return _(N, m, P);
1934
1934
  }));
1935
1935
  }), v.value.column !== null && v.value.direction) {
1936
- const d = u.value[v.value.column], w = v.value.direction;
1937
- l.sort((R, P) => {
1938
- let b = R[d.name], M = P[d.name];
1936
+ const u = d.value[v.value.column], m = v.value.direction;
1937
+ a.sort((R, P) => {
1938
+ let b = R[u.name], M = P[u.name];
1939
1939
  b == null && (b = ""), M == null && (M = "");
1940
1940
  const N = Number(b), ee = Number(M);
1941
1941
  if (!isNaN(N) && !isNaN(ee) && b !== "" && M !== "")
1942
- return w === "asc" ? N - ee : ee - N;
1942
+ return m === "asc" ? N - ee : ee - N;
1943
1943
  {
1944
1944
  const gt = String(b).toLowerCase(), mt = String(M).toLowerCase();
1945
- return w === "asc" ? gt.localeCompare(mt) : mt.localeCompare(gt);
1945
+ return m === "asc" ? gt.localeCompare(mt) : mt.localeCompare(gt);
1946
1946
  }
1947
1947
  });
1948
1948
  }
1949
- return l;
1950
- }), le = (l, d) => r.value[`${l}:${d}`], j = (l, d, w) => {
1951
- const R = `${l}:${d}`, P = u.value[l];
1952
- r.value[R] !== w && (n.value[d] = !0), r.value[R] = w, o.value[d] = {
1953
- ...o.value[d],
1954
- [P.name]: w
1949
+ return a;
1950
+ }), le = (a, u) => c.value[`${a}:${u}`], j = (a, u, m) => {
1951
+ const R = `${a}:${u}`, P = d.value[a];
1952
+ c.value[R] !== m && (n.value[u] = !0), c.value[R] = m, l.value[u] = {
1953
+ ...l.value[u],
1954
+ [P.name]: m
1955
1955
  };
1956
- }, q = (l) => {
1957
- o.value = l;
1958
- }, ue = (l, d, w) => {
1959
- const R = `${l}:${d}`;
1960
- r.value[R] !== w && (n.value[d] = !0, $.value[R] = w);
1961
- }, ae = (l) => {
1962
- const d = u.value.indexOf(l) === u.value.length - 1, w = a.value.fullWidth ? l.resizable && !d : l.resizable;
1956
+ }, q = (a) => {
1957
+ l.value = a;
1958
+ }, ue = (a, u, m) => {
1959
+ const R = `${a}:${u}`;
1960
+ c.value[R] !== m && (n.value[u] = !0, E.value[R] = m);
1961
+ }, ae = (a) => {
1962
+ const u = d.value.indexOf(a) === d.value.length - 1, m = o.value.fullWidth ? a.resizable && !u : a.resizable;
1963
1963
  return {
1964
- width: l.width || "40ch",
1965
- textAlign: l.align || "center",
1966
- ...w && {
1964
+ width: a.width || "40ch",
1965
+ textAlign: a.align || "center",
1966
+ ...m && {
1967
1967
  resize: "horizontal",
1968
1968
  overflow: "hidden",
1969
1969
  whiteSpace: "nowrap"
1970
1970
  }
1971
1971
  };
1972
- }, Ae = (l, d) => {
1973
- if (l < 0 || l >= u.value.length) return;
1974
- const R = Math.max(d, 40);
1975
- u.value[l] = {
1976
- ...u.value[l],
1972
+ }, Ae = (a, u) => {
1973
+ if (a < 0 || a >= d.value.length) return;
1974
+ const R = Math.max(u, 40);
1975
+ d.value[a] = {
1976
+ ...d.value[a],
1977
1977
  width: `${R}px`
1978
1978
  };
1979
- }, ke = (l) => {
1980
- const d = o.value[l];
1981
- return I.value && d.gantt !== void 0;
1982
- }, Oe = (l) => !E.value || f.value[l].isRoot || f.value[l].open, Ve = (l) => !E.value && a.value.view !== "list-expansion" ? "" : E.value && (f.value[l].isRoot || f.value[l].isParent) ? f.value[l].childrenOpen ? "▼" : "►" : a.value.view === "list-expansion" ? f.value[l].expanded ? "▼" : "►" : "", Be = (l) => {
1983
- if (E.value) {
1984
- const d = c.value[l] || {}, R = !(d.childrenOpen ?? f.value[l].childrenOpen);
1985
- c.value[l] = {
1986
- ...d,
1979
+ }, ke = (a) => {
1980
+ const u = l.value[a];
1981
+ return $.value && u.gantt !== void 0;
1982
+ }, Oe = (a) => !I.value || f.value[a].isRoot || f.value[a].open, Ve = (a) => !I.value && o.value.view !== "list-expansion" ? "" : I.value && (f.value[a].isRoot || f.value[a].isParent) ? f.value[a].childrenOpen ? "▼" : "►" : o.value.view === "list-expansion" ? f.value[a].expanded ? "▼" : "►" : "", Be = (a) => {
1983
+ if (I.value) {
1984
+ const u = r.value[a] || {}, R = !(u.childrenOpen ?? f.value[a].childrenOpen);
1985
+ r.value[a] = {
1986
+ ...u,
1987
1987
  childrenOpen: R
1988
- }, R || Te(l);
1989
- } else if (a.value.view === "list-expansion") {
1990
- const d = c.value[l] || {}, w = d.expanded ?? f.value[l].expanded;
1991
- c.value[l] = {
1992
- ...d,
1993
- expanded: !w
1988
+ }, R || Te(a);
1989
+ } else if (o.value.view === "list-expansion") {
1990
+ const u = r.value[a] || {}, m = u.expanded ?? f.value[a].expanded;
1991
+ r.value[a] = {
1992
+ ...u,
1993
+ expanded: !m
1994
1994
  };
1995
1995
  }
1996
- }, Te = (l) => {
1997
- for (let d = 0; d < o.value.length; d++)
1998
- if (f.value[d].parent === l) {
1999
- const w = c.value[d] || {};
2000
- c.value[d] = {
2001
- ...w,
1996
+ }, Te = (a) => {
1997
+ for (let u = 0; u < l.value.length; u++)
1998
+ if (f.value[u].parent === a) {
1999
+ const m = r.value[u] || {};
2000
+ r.value[u] = {
2001
+ ...m,
2002
2002
  childrenOpen: !1
2003
- }, Te(d);
2003
+ }, Te(u);
2004
2004
  }
2005
- }, Pe = (l, d) => {
2006
- const w = le(l, d);
2007
- return k(l, d, w);
2008
- }, k = (l, d, w) => {
2009
- const R = u.value[l], P = o.value[d], b = R.format;
2010
- return b ? typeof b == "function" ? b(w, { table: r.value, row: P, column: R }) : typeof b == "string" ? Function(`"use strict";return (${b})`)()(w, { table: r.value, row: P, column: R }) : w : w;
2011
- }, O = (l) => {
2012
- l.target instanceof Node && g.value.parent?.contains(l.target) || g.value.visible && (g.value.visible = !1);
2013
- }, F = (l, d) => d && l === 0 && d > 0 ? `${d}ch` : "inherit", J = (l) => {
2014
- const d = o.value[l.rowIndex]?.gantt;
2015
- d && (l.type === "resize" ? l.edge === "start" ? (d.startIndex = l.newStart, d.endIndex = l.end, d.colspan = d.endIndex - d.startIndex) : l.edge === "end" && (d.startIndex = l.start, d.endIndex = l.newEnd, d.colspan = d.endIndex - d.startIndex) : l.type === "bar" && (d.startIndex = l.newStart, d.endIndex = l.newEnd, d.colspan = d.endIndex - d.startIndex));
2016
- }, G = (l) => {
2017
- const d = V.value.findIndex((w) => w.id === l.id);
2018
- d >= 0 ? V.value[d] = l : V.value.push(l);
2019
- }, te = (l) => {
2020
- const d = V.value.findIndex((w) => w.id === l);
2021
- d >= 0 && V.value.splice(d, 1);
2022
- }, pe = (l) => {
2023
- const d = x.value.findIndex((w) => w.id === l.id);
2024
- d >= 0 ? x.value[d] = l : x.value.push(l);
2025
- }, Me = (l) => {
2026
- const d = x.value.findIndex((w) => w.id === l);
2027
- d >= 0 && x.value.splice(d, 1);
2028
- }, S = (l, d, w) => {
2029
- const R = x.value.find((M) => M.id === l), P = x.value.find((M) => M.id === d);
2005
+ }, Pe = (a, u) => {
2006
+ const m = le(a, u);
2007
+ return k(a, u, m);
2008
+ }, k = (a, u, m) => {
2009
+ const R = d.value[a], P = l.value[u], b = R.format;
2010
+ return b ? typeof b == "function" ? b(m, { table: c.value, row: P, column: R }) : typeof b == "string" ? Function(`"use strict";return (${b})`)()(m, { table: c.value, row: P, column: R }) : m : m;
2011
+ }, O = (a) => {
2012
+ a.target instanceof Node && w.value.parent?.contains(a.target) || w.value.visible && (w.value.visible = !1);
2013
+ }, F = (a, u) => u && a === 0 && u > 0 ? `${u}ch` : "inherit", J = (a) => {
2014
+ const u = l.value[a.rowIndex]?.gantt;
2015
+ u && (a.type === "resize" ? a.edge === "start" ? (u.startIndex = a.newStart, u.endIndex = a.end, u.colspan = u.endIndex - u.startIndex) : a.edge === "end" && (u.startIndex = a.start, u.endIndex = a.newEnd, u.colspan = u.endIndex - u.startIndex) : a.type === "bar" && (u.startIndex = a.newStart, u.endIndex = a.newEnd, u.colspan = u.endIndex - u.startIndex));
2016
+ }, G = (a) => {
2017
+ const u = V.value.findIndex((m) => m.id === a.id);
2018
+ u >= 0 ? V.value[u] = a : V.value.push(a);
2019
+ }, te = (a) => {
2020
+ const u = V.value.findIndex((m) => m.id === a);
2021
+ u >= 0 && V.value.splice(u, 1);
2022
+ }, pe = (a) => {
2023
+ const u = x.value.findIndex((m) => m.id === a.id);
2024
+ u >= 0 ? x.value[u] = a : x.value.push(a);
2025
+ }, Me = (a) => {
2026
+ const u = x.value.findIndex((m) => m.id === a);
2027
+ u >= 0 && x.value.splice(u, 1);
2028
+ }, S = (a, u, m) => {
2029
+ const R = x.value.find((M) => M.id === a), P = x.value.find((M) => M.id === u);
2030
2030
  if (!R || !P)
2031
2031
  return console.warn("Cannot create connection: handle not found"), null;
2032
2032
  const b = {
2033
- id: `connection-${l}-${d}`,
2033
+ id: `connection-${a}-${u}`,
2034
2034
  from: {
2035
2035
  barId: R.barId,
2036
2036
  side: R.side
@@ -2039,88 +2039,86 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2039
2039
  barId: P.barId,
2040
2040
  side: P.side
2041
2041
  },
2042
- style: w?.style,
2043
- label: w?.label
2042
+ style: m?.style,
2043
+ label: m?.label
2044
2044
  };
2045
2045
  return p.value.push(b), b;
2046
- }, B = (l) => {
2047
- const d = p.value.findIndex((w) => w.id === l);
2048
- return d >= 0 ? (p.value.splice(d, 1), !0) : !1;
2049
- }, U = (l) => p.value.filter((d) => d.from.barId === l || d.to.barId === l), Y = (l) => x.value.filter((d) => d.barId === l), Q = (l) => {
2050
- if (u.value[l].sortable === !1) return;
2051
- let w;
2052
- v.value.column === l && v.value.direction === "asc" ? w = "desc" : w = "asc", v.value.column = l, v.value.direction = w;
2053
- }, _ = (l, d, w) => {
2054
- const R = w.filterType || "text", P = d.value;
2046
+ }, B = (a) => {
2047
+ const u = p.value.findIndex((m) => m.id === a);
2048
+ return u >= 0 ? (p.value.splice(u, 1), !0) : !1;
2049
+ }, U = (a) => p.value.filter((u) => u.from.barId === a || u.to.barId === a), Y = (a) => x.value.filter((u) => u.barId === a), Q = (a) => {
2050
+ if (d.value[a].sortable === !1) return;
2051
+ let m;
2052
+ v.value.column === a && v.value.direction === "asc" ? m = "desc" : m = "asc", v.value.column = a, v.value.direction = m;
2053
+ }, _ = (a, u, m) => {
2054
+ const R = m.filterType || "text", P = u.value;
2055
2055
  if (!P && R !== "dateRange" && R !== "checkbox") return !0;
2056
2056
  switch (R) {
2057
- case "text": {
2058
- let b = "";
2059
- return typeof l == "object" && l !== null ? b = Object.values(l).join(" ") : b = String(l || ""), b.toLowerCase().includes(String(P).toLowerCase());
2060
- }
2057
+ case "text":
2058
+ return (typeof a == "object" && a !== null ? Object.values(a).join(" ") : String(a || "")).toLowerCase().includes(String(P).toLowerCase());
2061
2059
  case "number": {
2062
- const b = Number(l), M = Number(P);
2060
+ const b = Number(a), M = Number(P);
2063
2061
  return !isNaN(b) && !isNaN(M) && b === M;
2064
2062
  }
2065
2063
  case "select":
2066
- return l === P;
2064
+ return a === P;
2067
2065
  case "checkbox":
2068
- return P === !0 ? !!l : !0;
2066
+ return P === !0 ? !!a : !0;
2069
2067
  case "date": {
2070
2068
  let b;
2071
- if (typeof l == "number") {
2072
- const N = new Date(l), ee = (/* @__PURE__ */ new Date()).getFullYear();
2069
+ if (typeof a == "number") {
2070
+ const N = new Date(a), ee = (/* @__PURE__ */ new Date()).getFullYear();
2073
2071
  b = new Date(ee, N.getMonth(), N.getDate());
2074
2072
  } else
2075
- b = new Date(String(l));
2073
+ b = new Date(String(a));
2076
2074
  const M = new Date(String(P));
2077
2075
  return b.toDateString() === M.toDateString();
2078
2076
  }
2079
2077
  case "dateRange": {
2080
- const b = d.startValue, M = d.endValue;
2078
+ const b = u.startValue, M = u.endValue;
2081
2079
  if (!b && !M) return !0;
2082
2080
  let N;
2083
- if (typeof l == "number") {
2084
- const ee = new Date(l), ht = (/* @__PURE__ */ new Date()).getFullYear();
2081
+ if (typeof a == "number") {
2082
+ const ee = new Date(a), ht = (/* @__PURE__ */ new Date()).getFullYear();
2085
2083
  N = new Date(ht, ee.getMonth(), ee.getDate());
2086
2084
  } else
2087
- N = new Date(String(l));
2085
+ N = new Date(String(a));
2088
2086
  return !(b && N < new Date(String(b)) || M && N > new Date(String(M)));
2089
2087
  }
2090
2088
  default:
2091
2089
  return !0;
2092
2090
  }
2093
- }, ne = (l, d) => {
2094
- !d.value && !d.startValue && !d.endValue ? delete h.value[l] : h.value[l] = d;
2095
- }, se = (l) => {
2096
- delete h.value[l];
2097
- }, Ze = (l, d = "end") => {
2098
- const w = {};
2099
- for (const P of u.value)
2100
- w[P.name] = "";
2101
- l && Object.assign(w, l);
2091
+ }, ne = (a, u) => {
2092
+ !u.value && !u.startValue && !u.endValue ? delete h.value[a] : h.value[a] = u;
2093
+ }, se = (a) => {
2094
+ delete h.value[a];
2095
+ }, Ze = (a, u = "end") => {
2096
+ const m = {};
2097
+ for (const P of d.value)
2098
+ m[P.name] = "";
2099
+ a && Object.assign(m, a);
2102
2100
  let R;
2103
- return d === "start" ? (R = 0, o.value.unshift(w)) : d === "end" ? (R = o.value.length, o.value.push(w)) : (R = Math.max(0, Math.min(d, o.value.length)), o.value.splice(R, 0, w)), R;
2101
+ return u === "start" ? (R = 0, l.value.unshift(m)) : u === "end" ? (R = l.value.length, l.value.push(m)) : (R = Math.max(0, Math.min(u, l.value.length)), l.value.splice(R, 0, m)), R;
2104
2102
  };
2105
2103
  return {
2106
2104
  // state
2107
- columns: u,
2108
- config: a,
2105
+ columns: d,
2106
+ config: o,
2109
2107
  connectionHandles: x,
2110
2108
  connectionPaths: p,
2111
2109
  display: f,
2112
2110
  filterState: h,
2113
2111
  ganttBars: V,
2114
- modal: g,
2115
- rows: o,
2112
+ modal: w,
2113
+ rows: l,
2116
2114
  sortState: v,
2117
- table: r,
2118
- updates: $,
2115
+ table: c,
2116
+ updates: E,
2119
2117
  // getters
2120
2118
  filteredRows: X,
2121
- hasPinnedColumns: m,
2122
- isGanttView: I,
2123
- isTreeView: E,
2119
+ hasPinnedColumns: g,
2120
+ isGanttView: $,
2121
+ isTreeView: I,
2124
2122
  isDependencyGraphEnabled: H,
2125
2123
  numberedRowWidth: A,
2126
2124
  zeroColumn: L,
@@ -2130,27 +2128,27 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2130
2128
  closeModal: O,
2131
2129
  createConnection: S,
2132
2130
  deleteConnection: B,
2133
- deleteRow: (l) => {
2134
- if (l < 0 || l >= o.value.length)
2131
+ deleteRow: (a) => {
2132
+ if (a < 0 || a >= l.value.length)
2135
2133
  return null;
2136
- const [d] = o.value.splice(l, 1);
2137
- delete n.value[l], delete c.value[l];
2138
- const w = {}, R = {};
2134
+ const [u] = l.value.splice(a, 1);
2135
+ delete n.value[a], delete r.value[a];
2136
+ const m = {}, R = {};
2139
2137
  for (const [P, b] of Object.entries(n.value)) {
2140
2138
  const M = parseInt(P);
2141
- M > l ? w[M - 1] = b : w[M] = b;
2139
+ M > a ? m[M - 1] = b : m[M] = b;
2142
2140
  }
2143
- for (const [P, b] of Object.entries(c.value)) {
2141
+ for (const [P, b] of Object.entries(r.value)) {
2144
2142
  const M = parseInt(P);
2145
- M > l ? R[M - 1] = b : R[M] = b;
2143
+ M > a ? R[M - 1] = b : R[M] = b;
2146
2144
  }
2147
- return n.value = w, c.value = R, d;
2145
+ return n.value = m, r.value = R, u;
2148
2146
  },
2149
- duplicateRow: (l) => {
2150
- if (l < 0 || l >= o.value.length)
2147
+ duplicateRow: (a) => {
2148
+ if (a < 0 || a >= l.value.length)
2151
2149
  return -1;
2152
- const d = o.value[l], w = JSON.parse(JSON.stringify(d)), R = l + 1;
2153
- return o.value.splice(R, 0, w), R;
2150
+ const u = l.value[a], m = JSON.parse(JSON.stringify(u)), R = a + 1;
2151
+ return l.value.splice(R, 0, m), R;
2154
2152
  },
2155
2153
  getCellData: le,
2156
2154
  getCellDisplayValue: Pe,
@@ -2160,33 +2158,33 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2160
2158
  getHeaderCellStyle: ae,
2161
2159
  getIndent: F,
2162
2160
  getRowExpandSymbol: Ve,
2163
- insertRowAbove: (l, d) => {
2164
- const w = Math.max(0, l);
2165
- return Ze(d, w);
2161
+ insertRowAbove: (a, u) => {
2162
+ const m = Math.max(0, a);
2163
+ return Ze(u, m);
2166
2164
  },
2167
- insertRowBelow: (l, d) => {
2168
- const w = Math.min(l + 1, o.value.length);
2169
- return Ze(d, w);
2165
+ insertRowBelow: (a, u) => {
2166
+ const m = Math.min(a + 1, l.value.length);
2167
+ return Ze(u, m);
2170
2168
  },
2171
2169
  isRowGantt: ke,
2172
2170
  isRowVisible: Oe,
2173
- moveRow: (l, d) => {
2174
- if (l < 0 || l >= o.value.length || d < 0 || d >= o.value.length || l === d)
2171
+ moveRow: (a, u) => {
2172
+ if (a < 0 || a >= l.value.length || u < 0 || u >= l.value.length || a === u)
2175
2173
  return !1;
2176
- const [w] = o.value.splice(l, 1);
2177
- o.value.splice(d, 0, w);
2174
+ const [m] = l.value.splice(a, 1);
2175
+ l.value.splice(u, 0, m);
2178
2176
  const R = {}, P = {};
2179
2177
  for (const [b, M] of Object.entries(n.value)) {
2180
2178
  const N = parseInt(b);
2181
2179
  let ee = N;
2182
- N === l ? ee = d : l < d ? N > l && N <= d && (ee = N - 1) : N >= d && N < l && (ee = N + 1), R[ee] = M;
2180
+ N === a ? ee = u : a < u ? N > a && N <= u && (ee = N - 1) : N >= u && N < a && (ee = N + 1), R[ee] = M;
2183
2181
  }
2184
- for (const [b, M] of Object.entries(c.value)) {
2182
+ for (const [b, M] of Object.entries(r.value)) {
2185
2183
  const N = parseInt(b);
2186
2184
  let ee = N;
2187
- N === l ? ee = d : l < d ? N > l && N <= d && (ee = N - 1) : N >= d && N < l && (ee = N + 1), P[ee] = M;
2185
+ N === a ? ee = u : a < u ? N > a && N <= u && (ee = N - 1) : N >= u && N < a && (ee = N + 1), P[ee] = M;
2188
2186
  }
2189
- return n.value = R, c.value = P, !0;
2187
+ return n.value = R, r.value = P, !0;
2190
2188
  },
2191
2189
  registerConnectionHandle: pe,
2192
2190
  registerGanttBar: G,
@@ -2218,21 +2216,21 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2218
2216
  }),
2219
2217
  emits: /* @__PURE__ */ yt(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move"], ["update:rows", "update:columns"]),
2220
2218
  setup(e, { expose: t, emit: s }) {
2221
- const i = wt(e, "rows"), u = wt(e, "columns"), o = s, a = re("table"), n = Vo({ columns: u.value, rows: i.value, id: e.id, config: e.config });
2219
+ const i = wt(e, "rows"), d = wt(e, "columns"), l = s, o = re("table"), n = Vo({ columns: d.value, rows: i.value, id: e.id, config: e.config });
2222
2220
  n.$onAction(({ name: x, store: p, args: v, after: h }) => {
2223
2221
  if (x === "setCellData" || x === "setCellText") {
2224
- const [m, I, E] = v, H = p.getCellData(m, I);
2222
+ const [g, $, I] = v, H = p.getCellData(g, $);
2225
2223
  h(() => {
2226
- i.value = [...p.rows], o("cellUpdate", { colIndex: m, rowIndex: I, newValue: E, oldValue: H });
2224
+ i.value = [...p.rows], l("cellUpdate", { colIndex: g, rowIndex: $, newValue: I, oldValue: H });
2227
2225
  });
2228
2226
  } else if (x === "updateGanttBar") {
2229
- const [m] = v;
2230
- let I = !1;
2231
- m.type === "resize" ? I = m.oldColspan !== m.newColspan : m.type === "bar" && (I = m.oldStart !== m.newStart || m.oldEnd !== m.newEnd), I && h(() => {
2232
- o("gantt:drag", m);
2227
+ const [g] = v;
2228
+ let $ = !1;
2229
+ g.type === "resize" ? $ = g.oldColspan !== g.newColspan : g.type === "bar" && ($ = g.oldStart !== g.newStart || g.oldEnd !== g.newEnd), $ && h(() => {
2230
+ l("gantt:drag", g);
2233
2231
  });
2234
2232
  } else x === "resizeColumn" && h(() => {
2235
- u.value = [...p.columns], o("columns:update", [...p.columns]);
2233
+ d.value = [...p.columns], l("columns:update", [...p.columns]);
2236
2234
  });
2237
2235
  }), ce(
2238
2236
  () => i.value,
@@ -2241,26 +2239,26 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2241
2239
  },
2242
2240
  { deep: !0 }
2243
2241
  ), ce(
2244
- u,
2242
+ d,
2245
2243
  (x) => {
2246
- JSON.stringify(x) !== JSON.stringify(n.columns) && (n.columns = [...x], o("columns:update", [...x]));
2244
+ JSON.stringify(x) !== JSON.stringify(n.columns) && (n.columns = [...x], l("columns:update", [...x]));
2247
2245
  },
2248
2246
  { deep: !0 }
2249
2247
  ), He(() => {
2250
- u.value.some((x) => x.pinned) && (r(), n.isTreeView && Ht(a, r, { childList: !0, subtree: !0 }));
2248
+ d.value.some((x) => x.pinned) && (c(), n.isTreeView && Ht(o, c, { childList: !0, subtree: !0 }));
2251
2249
  });
2252
- const c = T(() => n.columns.filter((x) => x.pinned).length), r = () => {
2253
- const x = a.value, p = x?.rows[0], v = x?.rows[1], h = p ? Array.from(p.cells) : [];
2254
- for (const [m, I] of h.entries()) {
2255
- const E = v?.cells[m];
2256
- E && (I.style.width = `${E.offsetWidth}px`);
2250
+ const r = T(() => n.columns.filter((x) => x.pinned).length), c = () => {
2251
+ const x = o.value, p = x?.rows[0], v = x?.rows[1], h = p ? Array.from(p.cells) : [];
2252
+ for (const [g, $] of h.entries()) {
2253
+ const I = v?.cells[g];
2254
+ I && ($.style.width = `${I.offsetWidth}px`);
2257
2255
  }
2258
- for (const m of x?.rows || []) {
2259
- let I = 0;
2260
- const E = [];
2261
- for (const H of m.cells)
2262
- (H.classList.contains("sticky-column") || H.classList.contains("sticky-index")) && (H.style.left = `${I}px`, I += H.offsetWidth, E.push(H));
2263
- E.length > 0 && E[E.length - 1].classList.add("sticky-column-edge");
2256
+ for (const g of x?.rows || []) {
2257
+ let $ = 0;
2258
+ const I = [];
2259
+ for (const H of g.cells)
2260
+ (H.classList.contains("sticky-column") || H.classList.contains("sticky-index")) && (H.style.left = `${$}px`, $ += H.offsetWidth, I.push(H));
2261
+ I.length > 0 && I[I.length - 1].classList.add("sticky-column-edge");
2264
2262
  }
2265
2263
  };
2266
2264
  window.addEventListener("keydown", (x) => {
@@ -2273,57 +2271,57 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2273
2271
  }
2274
2272
  });
2275
2273
  const f = (x) => {
2276
- if (!x.gantt || c.value === 0)
2274
+ if (!x.gantt || r.value === 0)
2277
2275
  return n.columns;
2278
2276
  const p = [];
2279
- for (let v = 0; v < c.value; v++) {
2277
+ for (let v = 0; v < r.value; v++) {
2280
2278
  const h = { ...n.columns[v] };
2281
2279
  h.originalIndex = v, p.push(h);
2282
2280
  }
2283
2281
  return p.push({
2284
- ...n.columns[c.value],
2282
+ ...n.columns[r.value],
2285
2283
  isGantt: !0,
2286
- colspan: x.gantt?.colspan || n.columns.length - c.value,
2287
- originalIndex: c.value,
2284
+ colspan: x.gantt?.colspan || n.columns.length - r.value,
2285
+ originalIndex: r.value,
2288
2286
  width: "auto"
2289
2287
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
2290
2288
  }), p;
2291
- }, g = (x) => {
2292
- o("connection:event", { type: "create", connection: x });
2293
- }, $ = (x) => {
2294
- o("connection:event", { type: "delete", connection: x });
2289
+ }, w = (x) => {
2290
+ l("connection:event", { type: "create", connection: x });
2291
+ }, E = (x) => {
2292
+ l("connection:event", { type: "delete", connection: x });
2295
2293
  }, V = (x, p) => {
2296
2294
  switch (x) {
2297
2295
  case "add": {
2298
2296
  const v = n.addRow({}, p + 1), h = n.rows[v];
2299
- i.value = [...n.rows], o("row:add", { rowIndex: v, row: h });
2297
+ i.value = [...n.rows], l("row:add", { rowIndex: v, row: h });
2300
2298
  break;
2301
2299
  }
2302
2300
  case "delete": {
2303
2301
  const v = n.deleteRow(p);
2304
- v && (i.value = [...n.rows], o("row:delete", { rowIndex: p, row: v }));
2302
+ v && (i.value = [...n.rows], l("row:delete", { rowIndex: p, row: v }));
2305
2303
  break;
2306
2304
  }
2307
2305
  case "duplicate": {
2308
2306
  const v = n.duplicateRow(p);
2309
2307
  if (v >= 0) {
2310
2308
  const h = n.rows[v];
2311
- i.value = [...n.rows], o("row:duplicate", { sourceIndex: p, newIndex: v, row: h });
2309
+ i.value = [...n.rows], l("row:duplicate", { sourceIndex: p, newIndex: v, row: h });
2312
2310
  }
2313
2311
  break;
2314
2312
  }
2315
2313
  case "insertAbove": {
2316
2314
  const v = n.insertRowAbove(p), h = n.rows[v];
2317
- i.value = [...n.rows], o("row:insert-above", { targetIndex: p, newIndex: v, row: h });
2315
+ i.value = [...n.rows], l("row:insert-above", { targetIndex: p, newIndex: v, row: h });
2318
2316
  break;
2319
2317
  }
2320
2318
  case "insertBelow": {
2321
2319
  const v = n.insertRowBelow(p), h = n.rows[v];
2322
- i.value = [...n.rows], o("row:insert-below", { targetIndex: p, newIndex: v, row: h });
2320
+ i.value = [...n.rows], l("row:insert-below", { targetIndex: p, newIndex: v, row: h });
2323
2321
  break;
2324
2322
  }
2325
2323
  case "move": {
2326
- o("row:move", { fromIndex: p, toIndex: -1 });
2324
+ l("row:move", { fromIndex: p, toIndex: -1 });
2327
2325
  break;
2328
2326
  }
2329
2327
  }
@@ -2360,47 +2358,47 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2360
2358
  (y(!0), C(he, null, ye(Z(n).filteredRows, (v, h) => (y(), ve(Lt, {
2361
2359
  key: `${v.originalIndex}-${h}`,
2362
2360
  row: v,
2363
- rowIndex: v.originalIndex,
2361
+ "row-index": v.originalIndex,
2364
2362
  store: Z(n),
2365
2363
  "onRow:action": V
2366
2364
  }, {
2367
2365
  default: xt(() => [
2368
- (y(!0), C(he, null, ye(f(v), (m, I) => (y(), C(he, {
2369
- key: m.name
2366
+ (y(!0), C(he, null, ye(f(v), (g, $) => (y(), C(he, {
2367
+ key: g.name
2370
2368
  }, [
2371
- m.isGantt ? (y(), ve(We(m.ganttComponent || "AGanttCell"), {
2369
+ g.isGantt ? (y(), ve(We(g.ganttComponent || "AGanttCell"), {
2372
2370
  key: 0,
2373
2371
  store: Z(n),
2374
- "columns-count": Z(n).columns.length - c.value,
2372
+ "columns-count": Z(n).columns.length - r.value,
2375
2373
  color: v.gantt?.color,
2376
2374
  start: v.gantt?.startIndex,
2377
2375
  end: v.gantt?.endIndex,
2378
- colspan: m.colspan,
2379
- pinned: m.pinned,
2380
- rowIndex: v.originalIndex,
2381
- colIndex: m.originalIndex ?? I,
2376
+ colspan: g.colspan,
2377
+ pinned: g.pinned,
2378
+ "row-index": v.originalIndex,
2379
+ "col-index": g.originalIndex ?? $,
2382
2380
  style: me({
2383
- textAlign: m?.align || "center",
2384
- minWidth: m?.width || "40ch",
2381
+ textAlign: g?.align || "center",
2382
+ minWidth: g?.width || "40ch",
2385
2383
  width: Z(n).config.fullWidth ? "auto" : null
2386
2384
  }),
2387
- "onConnection:create": g
2388
- }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (y(), ve(We(m.cellComponent || "ACell"), {
2385
+ "onConnection:create": w
2386
+ }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "row-index", "col-index", "style"])) : (y(), ve(We(g.cellComponent || "ACell"), {
2389
2387
  key: 1,
2390
2388
  store: Z(n),
2391
- pinned: m.pinned,
2392
- rowIndex: v.originalIndex,
2393
- colIndex: I,
2389
+ pinned: g.pinned,
2390
+ "row-index": v.originalIndex,
2391
+ "col-index": $,
2394
2392
  style: me({
2395
- textAlign: m?.align || "center",
2393
+ textAlign: g?.align || "center",
2396
2394
  width: Z(n).config.fullWidth ? "auto" : null
2397
2395
  }),
2398
2396
  spellcheck: "false"
2399
- }, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
2397
+ }, null, 8, ["store", "pinned", "row-index", "col-index", "style"]))
2400
2398
  ], 64))), 128))
2401
2399
  ]),
2402
2400
  _: 2
2403
- }, 1032, ["row", "rowIndex", "store"]))), 128))
2401
+ }, 1032, ["row", "row-index", "store"]))), 128))
2404
2402
  ], !0)
2405
2403
  ]),
2406
2404
  fe(x.$slots, "footer", { data: Z(n) }, void 0, !0),
@@ -2425,11 +2423,11 @@ const go = { class: "gantt-connection-overlay" }, mo = {
2425
2423
  Z(n).isGanttView && Z(n).isDependencyGraphEnabled ? (y(), ve(bo, {
2426
2424
  key: 0,
2427
2425
  store: Z(n),
2428
- "onConnection:delete": $
2426
+ "onConnection:delete": E
2429
2427
  }, null, 8, ["store"])) : K("", !0)
2430
2428
  ]));
2431
2429
  }
2432
- }), Zo = /* @__PURE__ */ Ie(Po, [["__scopeId", "data-v-56d7171c"]]), No = {}, Wo = { class: "aloading" }, Fo = { class: "aloading-header" };
2430
+ }), Zo = /* @__PURE__ */ $e(Po, [["__scopeId", "data-v-7b50ad21"]]), No = {}, Wo = { class: "aloading" }, Fo = { class: "aloading-header" };
2433
2431
  function zo(e, t) {
2434
2432
  return y(), C("div", Wo, [
2435
2433
  W("h2", Fo, [
@@ -2438,7 +2436,7 @@ function zo(e, t) {
2438
2436
  t[0] || (t[0] = W("div", { class: "aloading-bar" }, null, -1))
2439
2437
  ]);
2440
2438
  }
2441
- const Xo = /* @__PURE__ */ Ie(No, [["render", zo], ["__scopeId", "data-v-a930a25b"]]), Go = {}, Yo = { class: "aloading" }, Uo = { class: "aloading-header" };
2439
+ const Xo = /* @__PURE__ */ $e(No, [["render", zo], ["__scopeId", "data-v-a930a25b"]]), Go = {}, Yo = { class: "aloading" }, Uo = { class: "aloading-header" };
2442
2440
  function jo(e, t) {
2443
2441
  return y(), C("div", Yo, [
2444
2442
  W("h2", Uo, [
@@ -2447,7 +2445,7 @@ function jo(e, t) {
2447
2445
  t[0] || (t[0] = W("div", { class: "aloading-bar" }, null, -1))
2448
2446
  ]);
2449
2447
  }
2450
- const qo = /* @__PURE__ */ Ie(Go, [["render", jo], ["__scopeId", "data-v-e1165876"]]);
2448
+ const qo = /* @__PURE__ */ $e(Go, [["render", jo], ["__scopeId", "data-v-e1165876"]]);
2451
2449
  function nl(e) {
2452
2450
  e.component("ACell", On), e.component("AExpansionRow", Nn), e.component("AGanttCell", Un), e.component("ARow", Lt), e.component("ARowActions", qe), e.component("ATable", Zo), e.component("ATableHeader", Ot), e.component("ATableLoading", Xo), e.component("ATableLoadingBar", qo), e.component("ATableModal", Vt);
2453
2451
  }