@stonecrop/atable 0.6.1 → 0.6.3

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 pe, ref as B, watch as ne, onBeforeUnmount as Ot, computed as A, shallowRef as Z, toValue as P, watchEffect as Pt, getCurrentScope as It, onScopeDispose as kt, unref as R, getCurrentInstance as et, nextTick as tt, isRef as Ht, toRefs as Lt, customRef as Et, toRef as Vt, readonly as Nt, defineComponent as ue, useTemplateRef as le, createElementBlock as k, openBlock as C, normalizeClass as ee, normalizeStyle as re, createBlock as ve, resolveDynamicComponent as Ee, mergeProps as nt, toDisplayString as ge, Fragment as ie, createElementVNode as z, createCommentVNode as q, renderSlot as te, useCssVars as Bt, onUnmounted as zt, withModifiers as Be, withDirectives as oe, vShow as $t, renderList as ye, reactive as Ft, vModelText as ke, vModelCheckbox as Wt, vModelSelect as Xt, createTextVNode as Gt, mergeModels as ft, useModel as vt, createVNode as mt, withCtx as gt } from "vue";
1
+ import { onMounted as pe, ref as B, watch as ne, onBeforeUnmount as Ot, computed as A, shallowRef as Z, toValue as P, watchEffect as Pt, getCurrentScope as Ct, onScopeDispose as It, getCurrentInstance as _e, unref as R, nextTick as et, isRef as Ht, toRefs as Lt, customRef as kt, toRef as Vt, readonly as Nt, defineComponent as ue, useTemplateRef as le, createElementBlock as k, openBlock as C, normalizeClass as ee, normalizeStyle as re, createBlock as ve, resolveDynamicComponent as Ee, mergeProps as tt, toDisplayString as ge, Fragment as ie, createElementVNode as z, createCommentVNode as q, renderSlot as te, useCssVars as Bt, onUnmounted as zt, withModifiers as Be, withDirectives as oe, vShow as Et, renderList as ye, reactive as Ft, vModelText as ke, vModelCheckbox as Wt, vModelSelect as Xt, createTextVNode as Gt, mergeModels as dt, useModel as ft, createVNode as vt, withCtx as mt } from "vue";
2
2
  import { defineStore as Yt } from "pinia";
3
- import './assets/index.css';function ot(e, t) {
4
- return It() ? (kt(e, t), !0) : !1;
3
+ import './assets/index.css';function $t(e, t) {
4
+ return Ct() ? (It(e, t), !0) : !1;
5
5
  }
6
6
  const Ut = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -10,44 +10,42 @@ const jt = (e) => e != null, qt = Object.prototype.toString, Jt = (e) => qt.call
10
10
  function Ve(e) {
11
11
  return Array.isArray(e) ? e : [e];
12
12
  }
13
- function Qt(e, t, a) {
13
+ function Qt(e, t, l) {
14
14
  return ne(e, t, {
15
- ...a,
15
+ ...l,
16
16
  immediate: !0
17
17
  });
18
18
  }
19
19
  const Ce = Ut ? window : void 0;
20
20
  function be(e) {
21
21
  var t;
22
- const a = P(e);
23
- return (t = a?.$el) !== null && t !== void 0 ? t : a;
22
+ const l = P(e);
23
+ return (t = l?.$el) !== null && t !== void 0 ? t : l;
24
24
  }
25
25
  function $e(...e) {
26
- const t = [], a = () => {
27
- t.forEach((n) => n()), t.length = 0;
28
- }, d = (n, l, s, u) => (n.addEventListener(l, s, u), () => n.removeEventListener(l, s, u)), c = A(() => {
29
- const n = Ve(P(e[0])).filter((l) => l != null);
30
- return n.every((l) => typeof l != "string") ? n : void 0;
31
- }), i = Qt(() => {
32
- var n, l;
26
+ const t = (s, r, a, n) => (s.addEventListener(r, a, n), () => s.removeEventListener(r, a, n)), l = A(() => {
27
+ const s = Ve(P(e[0])).filter((r) => r != null);
28
+ return s.every((r) => typeof r != "string") ? s : void 0;
29
+ });
30
+ return Qt(() => {
31
+ var s, r;
33
32
  return [
34
- (n = (l = c.value) === null || l === void 0 ? void 0 : l.map((s) => be(s))) !== null && n !== void 0 ? n : [Ce].filter((s) => s != null),
35
- Ve(P(c.value ? e[1] : e[0])),
36
- Ve(R(c.value ? e[2] : e[1])),
37
- P(c.value ? e[3] : e[2])
33
+ (s = (r = l.value) === null || r === void 0 ? void 0 : r.map((a) => be(a))) !== null && s !== void 0 ? s : [Ce].filter((a) => a != null),
34
+ Ve(P(l.value ? e[1] : e[0])),
35
+ Ve(R(l.value ? e[2] : e[1])),
36
+ P(l.value ? e[3] : e[2])
38
37
  ];
39
- }, ([n, l, s, u]) => {
40
- if (a(), !n?.length || !l?.length || !s?.length) return;
41
- const h = Jt(u) ? { ...u } : u;
42
- t.push(...n.flatMap(($) => l.flatMap((g) => s.map((I) => d($, g, I, h)))));
43
- }, { flush: "post" }), o = () => {
44
- i(), a();
45
- };
46
- return ot(a), o;
38
+ }, ([s, r, a, n], o, u) => {
39
+ if (!s?.length || !r?.length || !a?.length) return;
40
+ const c = Jt(n) ? { ...n } : n, f = s.flatMap((h) => r.flatMap(($) => a.map((g) => t(h, $, g, c))));
41
+ u(() => {
42
+ f.forEach((h) => h());
43
+ });
44
+ }, { flush: "post" });
47
45
  }
48
46
  // @__NO_SIDE_EFFECTS__
49
47
  function Kt() {
50
- const e = Z(!1), t = et();
48
+ const e = Z(!1), t = _e();
51
49
  return t && pe(() => {
52
50
  e.value = !0;
53
51
  }, t), e;
@@ -57,190 +55,190 @@ function _t(e) {
57
55
  const t = /* @__PURE__ */ Kt();
58
56
  return A(() => (t.value, !!e()));
59
57
  }
60
- function en(e, t, a = {}) {
61
- const { window: d = Ce, ...c } = a;
62
- let i;
63
- const o = /* @__PURE__ */ _t(() => d && "MutationObserver" in d), n = () => {
64
- i && (i.disconnect(), i = void 0);
65
- }, l = ne(A(() => {
58
+ function en(e, t, l = {}) {
59
+ const { window: s = Ce, ...r } = l;
60
+ let a;
61
+ const n = /* @__PURE__ */ _t(() => s && "MutationObserver" in s), o = () => {
62
+ a && (a.disconnect(), a = void 0);
63
+ }, u = ne(A(() => {
66
64
  const h = Ve(P(e)).map(be).filter(jt);
67
65
  return new Set(h);
68
66
  }), (h) => {
69
- n(), o.value && h.size && (i = new MutationObserver(t), h.forEach(($) => i.observe($, c)));
67
+ o(), n.value && h.size && (a = new MutationObserver(t), h.forEach(($) => a.observe($, r)));
70
68
  }, {
71
69
  immediate: !0,
72
70
  flush: "post"
73
- }), s = () => i?.takeRecords(), u = () => {
74
- l(), n();
71
+ }), c = () => a?.takeRecords(), f = () => {
72
+ u(), o();
75
73
  };
76
- return ot(u), {
77
- isSupported: o,
78
- stop: u,
79
- takeRecords: s
74
+ return $t(f), {
75
+ isSupported: n,
76
+ stop: f,
77
+ takeRecords: c
80
78
  };
81
79
  }
82
- function tn(e, t, a = {}) {
83
- const { window: d = Ce, document: c = d?.document, flush: i = "sync" } = a;
84
- if (!d || !c) return Zt;
85
- let o;
86
- const n = (u) => {
87
- o?.(), o = u;
88
- }, l = Pt(() => {
89
- const u = be(e);
90
- if (u) {
91
- const { stop: h } = en(c, ($) => {
92
- $.map((g) => [...g.removedNodes]).flat().some((g) => g === u || g.contains(u)) && t($);
80
+ function tn(e, t, l = {}) {
81
+ const { window: s = Ce, document: r = s?.document, flush: a = "sync" } = l;
82
+ if (!s || !r) return Zt;
83
+ let n;
84
+ const o = (f) => {
85
+ n?.(), n = f;
86
+ }, u = Pt(() => {
87
+ const f = be(e);
88
+ if (f) {
89
+ const { stop: h } = en(r, ($) => {
90
+ $.map((g) => [...g.removedNodes]).flat().some((g) => g === f || g.contains(f)) && t($);
93
91
  }, {
94
- window: d,
92
+ window: s,
95
93
  childList: !0,
96
94
  subtree: !0
97
95
  });
98
- n(h);
96
+ o(h);
99
97
  }
100
- }, { flush: i }), s = () => {
101
- l(), n();
98
+ }, { flush: a }), c = () => {
99
+ u(), o();
102
100
  };
103
- return ot(s), s;
101
+ return $t(c), c;
104
102
  }
105
103
  // @__NO_SIDE_EFFECTS__
106
104
  function nn(e = {}) {
107
105
  var t;
108
- const { window: a = Ce, deep: d = !0, triggerOnRemoval: c = !1 } = e, i = (t = e.document) !== null && t !== void 0 ? t : a?.document, o = () => {
109
- let s = i?.activeElement;
110
- if (d)
111
- for (var u; s?.shadowRoot; ) s = s == null || (u = s.shadowRoot) === null || u === void 0 ? void 0 : u.activeElement;
112
- return s;
113
- }, n = Z(), l = () => {
114
- n.value = o();
106
+ const { window: l = Ce, deep: s = !0, triggerOnRemoval: r = !1 } = e, a = (t = e.document) !== null && t !== void 0 ? t : l?.document, n = () => {
107
+ let c = a?.activeElement;
108
+ if (s)
109
+ for (var f; c?.shadowRoot; ) c = c == null || (f = c.shadowRoot) === null || f === void 0 ? void 0 : f.activeElement;
110
+ return c;
111
+ }, o = Z(), u = () => {
112
+ o.value = n();
115
113
  };
116
- if (a) {
117
- const s = {
114
+ if (l) {
115
+ const c = {
118
116
  capture: !0,
119
117
  passive: !0
120
118
  };
121
- $e(a, "blur", (u) => {
122
- u.relatedTarget === null && l();
123
- }, s), $e(a, "focus", l, s);
119
+ $e(l, "blur", (f) => {
120
+ f.relatedTarget === null && u();
121
+ }, c), $e(l, "focus", u, c);
124
122
  }
125
- return c && tn(n, l, { document: i }), l(), n;
123
+ return r && tn(o, u, { document: a }), u(), o;
126
124
  }
127
125
  const on = "focusin", ln = "focusout", an = ":focus-within";
128
126
  function sn(e, t = {}) {
129
- const { window: a = Ce } = t, d = A(() => be(e)), c = Z(!1), i = A(() => c.value);
130
- if (!a || !(/* @__PURE__ */ nn(t)).value) return { focused: i };
131
- const o = { passive: !0 };
132
- return $e(d, on, () => c.value = !0, o), $e(d, ln, () => {
133
- var n, l, s;
134
- return c.value = (n = (l = d.value) === null || l === void 0 || (s = l.matches) === null || s === void 0 ? void 0 : s.call(l, an)) !== null && n !== void 0 ? n : !1;
135
- }, o), { focused: i };
127
+ const { window: l = Ce } = t, s = A(() => be(e)), r = Z(!1), a = A(() => r.value);
128
+ if (!l || !(/* @__PURE__ */ nn(t)).value) return { focused: a };
129
+ const n = { passive: !0 };
130
+ return $e(s, on, () => r.value = !0, n), $e(s, ln, () => {
131
+ var o, u, c;
132
+ return r.value = (o = (u = s.value) === null || u === void 0 || (c = u.matches) === null || c === void 0 ? void 0 : c.call(u, an)) !== null && o !== void 0 ? o : !1;
133
+ }, n), { focused: a };
136
134
  }
137
- function rn(e, { window: t = Ce, scrollTarget: a } = {}) {
138
- const d = B(!1), c = () => {
135
+ function rn(e, { window: t = Ce, scrollTarget: l } = {}) {
136
+ const s = B(!1), r = () => {
139
137
  if (!t) return;
140
- const i = t.document, o = be(e);
141
- if (!o)
142
- d.value = !1;
138
+ const a = t.document, n = be(e);
139
+ if (!n)
140
+ s.value = !1;
143
141
  else {
144
- const n = o.getBoundingClientRect();
145
- d.value = n.top <= (t.innerHeight || i.documentElement.clientHeight) && n.left <= (t.innerWidth || i.documentElement.clientWidth) && n.bottom >= 0 && n.right >= 0;
142
+ const o = n.getBoundingClientRect();
143
+ s.value = o.top <= (t.innerHeight || a.documentElement.clientHeight) && o.left <= (t.innerWidth || a.documentElement.clientWidth) && o.bottom >= 0 && o.right >= 0;
146
144
  }
147
145
  };
148
146
  return ne(
149
147
  () => be(e),
150
- () => c(),
148
+ () => r(),
151
149
  { immediate: !0, flush: "post" }
152
- ), t && $e(a || t, "scroll", c, {
150
+ ), t && $e(l || t, "scroll", r, {
153
151
  capture: !1,
154
152
  passive: !0
155
- }), d;
153
+ }), s;
156
154
  }
157
155
  const ce = (e) => {
158
156
  let t = rn(e).value;
159
157
  return t = t && e.offsetHeight > 0, t;
160
- }, de = (e) => e.tabIndex >= 0, ht = (e) => {
158
+ }, de = (e) => e.tabIndex >= 0, gt = (e) => {
161
159
  const t = e.target;
162
- return lt(t);
163
- }, lt = (e) => {
160
+ return nt(t);
161
+ }, nt = (e) => {
164
162
  let t;
165
163
  if (e instanceof HTMLTableCellElement) {
166
- const a = e.parentElement?.previousElementSibling;
167
- if (a) {
168
- const d = Array.from(a.children)[e.cellIndex];
169
- d && (t = d);
164
+ const l = e.parentElement?.previousElementSibling;
165
+ if (l) {
166
+ const s = Array.from(l.children)[e.cellIndex];
167
+ s && (t = s);
170
168
  }
171
169
  } else if (e instanceof HTMLTableRowElement) {
172
- const a = e.previousElementSibling;
173
- a && (t = a);
170
+ const l = e.previousElementSibling;
171
+ l && (t = l);
174
172
  }
175
- return t && (!de(t) || !ce(t)) ? lt(t) : t;
173
+ return t && (!de(t) || !ce(t)) ? nt(t) : t;
176
174
  }, un = (e) => {
177
175
  const t = e.target;
178
- let a;
176
+ let l;
179
177
  if (t instanceof HTMLTableCellElement) {
180
- const d = t.parentElement?.parentElement;
181
- if (d) {
182
- const c = d.firstElementChild?.children[t.cellIndex];
183
- c && (a = c);
178
+ const s = t.parentElement?.parentElement;
179
+ if (s) {
180
+ const r = s.firstElementChild?.children[t.cellIndex];
181
+ r && (l = r);
184
182
  }
185
183
  } else if (t instanceof HTMLTableRowElement) {
186
- const d = t.parentElement;
187
- if (d) {
188
- const c = d.firstElementChild;
189
- c && (a = c);
184
+ const s = t.parentElement;
185
+ if (s) {
186
+ const r = s.firstElementChild;
187
+ r && (l = r);
190
188
  }
191
189
  }
192
- return a && (!de(a) || !ce(a)) ? at(a) : a;
193
- }, xt = (e) => {
190
+ return l && (!de(l) || !ce(l)) ? ot(l) : l;
191
+ }, ht = (e) => {
194
192
  const t = e.target;
195
- return at(t);
196
- }, at = (e) => {
193
+ return ot(t);
194
+ }, ot = (e) => {
197
195
  let t;
198
196
  if (e instanceof HTMLTableCellElement) {
199
- const a = e.parentElement?.nextElementSibling;
200
- if (a) {
201
- const d = Array.from(a.children)[e.cellIndex];
202
- d && (t = d);
197
+ const l = e.parentElement?.nextElementSibling;
198
+ if (l) {
199
+ const s = Array.from(l.children)[e.cellIndex];
200
+ s && (t = s);
203
201
  }
204
202
  } else if (e instanceof HTMLTableRowElement) {
205
- const a = e.nextElementSibling;
206
- a && (t = a);
203
+ const l = e.nextElementSibling;
204
+ l && (t = l);
207
205
  }
208
- return t && (!de(t) || !ce(t)) ? at(t) : t;
206
+ return t && (!de(t) || !ce(t)) ? ot(t) : t;
209
207
  }, cn = (e) => {
210
208
  const t = e.target;
211
- let a;
209
+ let l;
212
210
  if (t instanceof HTMLTableCellElement) {
213
- const d = t.parentElement?.parentElement;
214
- if (d) {
215
- const c = d.lastElementChild?.children[t.cellIndex];
216
- c && (a = c);
211
+ const s = t.parentElement?.parentElement;
212
+ if (s) {
213
+ const r = s.lastElementChild?.children[t.cellIndex];
214
+ r && (l = r);
217
215
  }
218
216
  } else if (t instanceof HTMLTableRowElement) {
219
- const d = t.parentElement;
220
- if (d) {
221
- const c = d.lastElementChild;
222
- c && (a = c);
217
+ const s = t.parentElement;
218
+ if (s) {
219
+ const r = s.lastElementChild;
220
+ r && (l = r);
223
221
  }
224
222
  }
225
- return a && (!de(a) || !ce(a)) ? lt(a) : a;
226
- }, wt = (e) => {
223
+ return l && (!de(l) || !ce(l)) ? nt(l) : l;
224
+ }, xt = (e) => {
227
225
  const t = e.target;
228
- return st(t);
229
- }, st = (e) => {
226
+ return lt(t);
227
+ }, lt = (e) => {
230
228
  let t;
231
- return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!de(t) || !ce(t)) ? st(t) : t;
232
- }, yt = (e) => {
229
+ return e.previousElementSibling ? t = e.previousElementSibling : t = e.parentElement?.previousElementSibling?.lastElementChild, t && (!de(t) || !ce(t)) ? lt(t) : t;
230
+ }, wt = (e) => {
233
231
  const t = e.target;
234
- return rt(t);
235
- }, rt = (e) => {
232
+ return at(t);
233
+ }, at = (e) => {
236
234
  let t;
237
- return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!de(t) || !ce(t)) ? rt(t) : t;
238
- }, bt = (e) => {
235
+ return e.nextElementSibling ? t = e.nextElementSibling : t = e.parentElement?.nextElementSibling?.firstElementChild, t && (!de(t) || !ce(t)) ? at(t) : t;
236
+ }, yt = (e) => {
239
237
  const t = e.target.parentElement?.firstElementChild;
240
- return t && (!de(t) || !ce(t)) ? rt(t) : t;
241
- }, pt = (e) => {
238
+ return t && (!de(t) || !ce(t)) ? at(t) : t;
239
+ }, bt = (e) => {
242
240
  const t = e.target.parentElement?.lastElementChild;
243
- return t && (!de(t) || !ce(t)) ? st(t) : t;
241
+ return t && (!de(t) || !ce(t)) ? lt(t) : t;
244
242
  }, He = ["alt", "control", "shift", "meta"], dn = {
245
243
  ArrowUp: "up",
246
244
  ArrowDown: "down",
@@ -248,19 +246,19 @@ const ce = (e) => {
248
246
  ArrowRight: "right"
249
247
  }, ze = {
250
248
  "keydown.up": (e) => {
251
- const t = ht(e);
249
+ const t = gt(e);
252
250
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
253
251
  },
254
252
  "keydown.down": (e) => {
255
- const t = xt(e);
253
+ const t = ht(e);
256
254
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
257
255
  },
258
256
  "keydown.left": (e) => {
259
- const t = wt(e);
257
+ const t = xt(e);
260
258
  e.preventDefault(), e.stopPropagation(), t && t.focus();
261
259
  },
262
260
  "keydown.right": (e) => {
263
- const t = yt(e);
261
+ const t = wt(e);
264
262
  e.preventDefault(), e.stopPropagation(), t && t.focus();
265
263
  },
266
264
  "keydown.control.up": (e) => {
@@ -272,110 +270,110 @@ const ce = (e) => {
272
270
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
273
271
  },
274
272
  "keydown.control.left": (e) => {
275
- const t = bt(e);
273
+ const t = yt(e);
276
274
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
277
275
  },
278
276
  "keydown.control.right": (e) => {
279
- const t = pt(e);
277
+ const t = bt(e);
280
278
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
281
279
  },
282
280
  "keydown.end": (e) => {
283
- const t = pt(e);
281
+ const t = bt(e);
284
282
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
285
283
  },
286
284
  "keydown.enter": (e) => {
287
285
  if (e.target instanceof HTMLTableCellElement) {
288
286
  e.preventDefault(), e.stopPropagation();
289
- const t = xt(e);
287
+ const t = ht(e);
290
288
  t && t.focus();
291
289
  }
292
290
  },
293
291
  "keydown.shift.enter": (e) => {
294
292
  if (e.target instanceof HTMLTableCellElement) {
295
293
  e.preventDefault(), e.stopPropagation();
296
- const t = ht(e);
294
+ const t = gt(e);
297
295
  t && t.focus();
298
296
  }
299
297
  },
300
298
  "keydown.home": (e) => {
301
- const t = bt(e);
299
+ const t = yt(e);
302
300
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
303
301
  },
304
302
  "keydown.tab": (e) => {
305
- const t = yt(e);
303
+ const t = wt(e);
306
304
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
307
305
  },
308
306
  "keydown.shift.tab": (e) => {
309
- const t = wt(e);
307
+ const t = xt(e);
310
308
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
311
309
  }
312
310
  };
313
- function it(e) {
314
- const t = (o) => {
315
- let n = null;
316
- return o.parent && (typeof o.parent == "string" ? n = document.querySelector(o.parent) : o.parent instanceof HTMLElement ? n = o.parent : n = o.parent.value), n;
317
- }, a = (o) => {
318
- const n = t(o);
319
- let l = [];
320
- if (typeof o.selectors == "string")
321
- l = n ? Array.from(n.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));
322
- else if (Array.isArray(o.selectors))
323
- for (const s of o.selectors)
324
- s instanceof HTMLElement ? l.push(s) : l.push(s.$el);
325
- else if (o.selectors instanceof HTMLElement)
326
- l.push(o.selectors);
327
- else if (o.selectors?.value)
328
- if (Array.isArray(o.selectors.value))
329
- for (const s of o.selectors.value)
330
- s instanceof HTMLElement ? l.push(s) : l.push(s.$el);
311
+ function st(e) {
312
+ const t = (n) => {
313
+ let o = null;
314
+ return n.parent && (typeof n.parent == "string" ? o = document.querySelector(n.parent) : n.parent instanceof HTMLElement ? o = n.parent : o = n.parent.value), o;
315
+ }, l = (n) => {
316
+ const o = t(n);
317
+ let u = [];
318
+ if (typeof n.selectors == "string")
319
+ u = Array.from(o ? o.querySelectorAll(n.selectors) : document.querySelectorAll(n.selectors));
320
+ else if (Array.isArray(n.selectors))
321
+ for (const c of n.selectors)
322
+ c instanceof HTMLElement ? u.push(c) : u.push(c.$el);
323
+ else if (n.selectors instanceof HTMLElement)
324
+ u.push(n.selectors);
325
+ else if (n.selectors?.value)
326
+ if (Array.isArray(n.selectors.value))
327
+ for (const c of n.selectors.value)
328
+ c instanceof HTMLElement ? u.push(c) : u.push(c.$el);
331
329
  else
332
- l.push(o.selectors.value);
333
- return l;
334
- }, d = (o) => {
335
- const n = t(o);
336
- let l = [];
337
- return o.selectors ? l = a(o) : n && (l = Array.from(n.children).filter((s) => de(s) && ce(s))), l;
338
- }, c = (o) => (n) => {
339
- const l = dn[n.key] || n.key.toLowerCase();
340
- if (He.includes(l)) return;
341
- const s = o.handlers || ze;
342
- for (const u of Object.keys(s)) {
343
- const [h, ...$] = u.split(".");
344
- if (h === "keydown" && $.includes(l)) {
345
- const g = s[u], I = $.filter((v) => He.includes(v)), x = He.some((v) => {
330
+ u.push(n.selectors.value);
331
+ return u;
332
+ }, s = (n) => {
333
+ const o = t(n);
334
+ let u = [];
335
+ return n.selectors ? u = l(n) : o && (u = Array.from(o.children).filter((c) => de(c) && ce(c))), u;
336
+ }, r = (n) => (o) => {
337
+ const u = dn[o.key] || o.key.toLowerCase();
338
+ if (He.includes(u)) return;
339
+ const c = n.handlers || ze;
340
+ for (const f of Object.keys(c)) {
341
+ const [h, ...$] = f.split(".");
342
+ if (h === "keydown" && $.includes(u)) {
343
+ const g = c[f], I = $.filter((v) => He.includes(v)), x = He.some((v) => {
346
344
  const m = v.charAt(0).toUpperCase() + v.slice(1);
347
- return n.getModifierState(m);
345
+ return o.getModifierState(m);
348
346
  });
349
347
  if (I.length > 0) {
350
348
  if (x) {
351
349
  for (const v of He)
352
350
  if ($.includes(v)) {
353
351
  const m = v.charAt(0).toUpperCase() + v.slice(1);
354
- n.getModifierState(m) && g(n);
352
+ o.getModifierState(m) && g(o);
355
353
  }
356
354
  }
357
355
  } else
358
- x || g(n);
356
+ x || g(o);
359
357
  }
360
358
  }
361
- }, i = [];
359
+ }, a = [];
362
360
  pe(() => {
363
- for (const o of e) {
364
- const n = t(o), l = d(o), s = c(o), u = n ? [n] : l;
365
- for (const h of u) {
361
+ for (const n of e) {
362
+ const o = t(n), u = s(n), c = r(n), f = o ? [o] : u;
363
+ for (const h of f) {
366
364
  const { focused: $ } = sn(B(h)), g = ne($, (I) => {
367
- I ? h.addEventListener("keydown", s) : h.removeEventListener("keydown", s);
365
+ I ? h.addEventListener("keydown", c) : h.removeEventListener("keydown", c);
368
366
  });
369
- i.push(g);
367
+ a.push(g);
370
368
  }
371
369
  }
372
370
  }), Ot(() => {
373
- for (const o of i)
374
- o();
371
+ for (const n of a)
372
+ n();
375
373
  });
376
374
  }
377
- function Fe(e, t) {
378
- return It() ? (kt(e, t), !0) : !1;
375
+ function rt(e, t) {
376
+ return Ct() ? (It(e, t), !0) : !1;
379
377
  }
380
378
  const St = typeof window < "u" && typeof document < "u";
381
379
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -384,37 +382,37 @@ const fn = (e) => e != null, vn = Object.prototype.toString, mn = (e) => vn.call
384
382
  function gn(...e) {
385
383
  if (e.length !== 1) return Vt(...e);
386
384
  const t = e[0];
387
- return typeof t == "function" ? Nt(Et(() => ({
385
+ return typeof t == "function" ? Nt(kt(() => ({
388
386
  get: t,
389
387
  set: we
390
388
  }))) : B(t);
391
389
  }
392
390
  function hn(e, t) {
393
- function a(...d) {
394
- return new Promise((c, i) => {
395
- Promise.resolve(e(() => t.apply(this, d), {
391
+ function l(...s) {
392
+ return new Promise((r, a) => {
393
+ Promise.resolve(e(() => t.apply(this, s), {
396
394
  fn: t,
397
395
  thisArg: this,
398
- args: d
399
- })).then(c).catch(i);
396
+ args: s
397
+ })).then(r).catch(a);
400
398
  });
401
399
  }
402
- return a;
400
+ return l;
403
401
  }
404
402
  function xn(e, t = {}) {
405
- let a, d, c = we;
406
- const i = (l) => {
407
- clearTimeout(l), c(), c = we;
403
+ let l, s, r = we;
404
+ const a = (u) => {
405
+ clearTimeout(u), r(), r = we;
408
406
  };
409
- let o;
410
- return (l) => {
411
- const s = P(e), u = P(t.maxWait);
412
- return a && i(a), s <= 0 || u !== void 0 && u <= 0 ? (d && (i(d), d = void 0), Promise.resolve(l())) : new Promise((h, $) => {
413
- c = t.rejectOnCancel ? $ : h, o = l, u && !d && (d = setTimeout(() => {
414
- a && i(a), d = void 0, h(o());
415
- }, u)), a = setTimeout(() => {
416
- d && i(d), d = void 0, h(l());
417
- }, s);
407
+ let n;
408
+ return (u) => {
409
+ const c = P(e), f = P(t.maxWait);
410
+ return l && a(l), c <= 0 || f !== void 0 && f <= 0 ? (s && (a(s), s = void 0), Promise.resolve(u())) : new Promise((h, $) => {
411
+ r = t.rejectOnCancel ? $ : h, n = u, f && !s && (s = setTimeout(() => {
412
+ l && a(l), s = void 0, h(n());
413
+ }, f)), l = setTimeout(() => {
414
+ s && a(s), s = void 0, h(u());
415
+ }, c);
418
416
  });
419
417
  };
420
418
  }
@@ -422,90 +420,88 @@ function Ne(e) {
422
420
  return Array.isArray(e) ? e : [e];
423
421
  }
424
422
  function wn(e) {
425
- return et();
423
+ return _e();
426
424
  }
427
425
  // @__NO_SIDE_EFFECTS__
428
- function yn(e, t = 200, a = {}) {
429
- return hn(xn(t, a), e);
426
+ function yn(e, t = 200, l = {}) {
427
+ return hn(xn(t, l), e);
430
428
  }
431
429
  function bn(e, t = {}) {
432
430
  if (!Ht(e)) return Lt(e);
433
- const a = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
434
- for (const d in e.value) a[d] = Et(() => ({
431
+ const l = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
432
+ for (const s in e.value) l[s] = kt(() => ({
435
433
  get() {
436
- return e.value[d];
434
+ return e.value[s];
437
435
  },
438
- set(c) {
439
- var i;
440
- if (!((i = P(t.replaceRef)) !== null && i !== void 0) || i) if (Array.isArray(e.value)) {
441
- const o = [...e.value];
442
- o[d] = c, e.value = o;
436
+ set(r) {
437
+ var a;
438
+ if (!((a = P(t.replaceRef)) !== null && a !== void 0) || a) if (Array.isArray(e.value)) {
439
+ const n = [...e.value];
440
+ n[s] = r, e.value = n;
443
441
  } else {
444
- const o = {
442
+ const n = {
445
443
  ...e.value,
446
- [d]: c
444
+ [s]: r
447
445
  };
448
- Object.setPrototypeOf(o, Object.getPrototypeOf(e.value)), e.value = o;
446
+ Object.setPrototypeOf(n, Object.getPrototypeOf(e.value)), e.value = n;
449
447
  }
450
- else e.value[d] = c;
448
+ else e.value[s] = r;
451
449
  }
452
450
  }));
453
- return a;
451
+ return l;
454
452
  }
455
- function pn(e, t = !0, a) {
456
- wn() ? pe(e, a) : t ? e() : tt(e);
453
+ function pn(e, t = !0, l) {
454
+ wn() ? pe(e, l) : t ? e() : et(e);
457
455
  }
458
- function Cn(e, t, a) {
456
+ function Cn(e, t, l) {
459
457
  return ne(e, t, {
460
- ...a,
458
+ ...l,
461
459
  immediate: !0
462
460
  });
463
461
  }
464
462
  const Se = St ? window : void 0;
465
463
  function se(e) {
466
464
  var t;
467
- const a = P(e);
468
- return (t = a?.$el) !== null && t !== void 0 ? t : a;
465
+ const l = P(e);
466
+ return (t = l?.$el) !== null && t !== void 0 ? t : l;
469
467
  }
470
468
  function me(...e) {
471
- const t = [], a = () => {
472
- t.forEach((n) => n()), t.length = 0;
473
- }, d = (n, l, s, u) => (n.addEventListener(l, s, u), () => n.removeEventListener(l, s, u)), c = A(() => {
474
- const n = Ne(P(e[0])).filter((l) => l != null);
475
- return n.every((l) => typeof l != "string") ? n : void 0;
476
- }), i = Cn(() => {
477
- var n, l;
469
+ const t = (s, r, a, n) => (s.addEventListener(r, a, n), () => s.removeEventListener(r, a, n)), l = A(() => {
470
+ const s = Ne(P(e[0])).filter((r) => r != null);
471
+ return s.every((r) => typeof r != "string") ? s : void 0;
472
+ });
473
+ return Cn(() => {
474
+ var s, r;
478
475
  return [
479
- (n = (l = c.value) === null || l === void 0 ? void 0 : l.map((s) => se(s))) !== null && n !== void 0 ? n : [Se].filter((s) => s != null),
480
- Ne(P(c.value ? e[1] : e[0])),
481
- Ne(R(c.value ? e[2] : e[1])),
482
- P(c.value ? e[3] : e[2])
476
+ (s = (r = l.value) === null || r === void 0 ? void 0 : r.map((a) => se(a))) !== null && s !== void 0 ? s : [Se].filter((a) => a != null),
477
+ Ne(P(l.value ? e[1] : e[0])),
478
+ Ne(R(l.value ? e[2] : e[1])),
479
+ P(l.value ? e[3] : e[2])
483
480
  ];
484
- }, ([n, l, s, u]) => {
485
- if (a(), !n?.length || !l?.length || !s?.length) return;
486
- const h = mn(u) ? { ...u } : u;
487
- t.push(...n.flatMap(($) => l.flatMap((g) => s.map((I) => d($, g, I, h)))));
488
- }, { flush: "post" }), o = () => {
489
- i(), a();
490
- };
491
- return Fe(a), o;
481
+ }, ([s, r, a, n], o, u) => {
482
+ if (!s?.length || !r?.length || !a?.length) return;
483
+ const c = mn(n) ? { ...n } : n, f = s.flatMap((h) => r.flatMap(($) => a.map((g) => t(h, $, g, c))));
484
+ u(() => {
485
+ f.forEach((h) => h());
486
+ });
487
+ }, { flush: "post" });
492
488
  }
493
- function Ct(e, t, a = {}) {
494
- const { window: d = Se, ignore: c = [], capture: i = !0, detectIframe: o = !1, controls: n = !1 } = a;
495
- if (!d) return n ? {
489
+ function pt(e, t, l = {}) {
490
+ const { window: s = Se, ignore: r = [], capture: a = !0, detectIframe: n = !1, controls: o = !1 } = l;
491
+ if (!s) return o ? {
496
492
  stop: we,
497
493
  cancel: we,
498
494
  trigger: we
499
495
  } : we;
500
- let l = !0;
501
- const s = (v) => P(c).some((m) => {
502
- if (typeof m == "string") return Array.from(d.document.querySelectorAll(m)).some((b) => b === v.target || v.composedPath().includes(b));
496
+ let u = !0;
497
+ const c = (v) => P(r).some((m) => {
498
+ if (typeof m == "string") return Array.from(s.document.querySelectorAll(m)).some((b) => b === v.target || v.composedPath().includes(b));
503
499
  {
504
500
  const b = se(m);
505
501
  return b && (v.target === b || v.composedPath().includes(b));
506
502
  }
507
503
  });
508
- function u(v) {
504
+ function f(v) {
509
505
  const m = P(v);
510
506
  return m && m.$.subTree.shapeFlag === 16;
511
507
  }
@@ -515,9 +511,9 @@ function Ct(e, t, a = {}) {
515
511
  }
516
512
  const $ = (v) => {
517
513
  const m = se(e);
518
- if (v.target != null && !(!(m instanceof Element) && u(e) && h(e, v)) && !(!m || m === v.target || v.composedPath().includes(m))) {
519
- if ("detail" in v && v.detail === 0 && (l = !s(v)), !l) {
520
- l = !0;
514
+ if (v.target != null && !(!(m instanceof Element) && f(e) && h(e, v)) && !(!m || m === v.target || v.composedPath().includes(m))) {
515
+ if ("detail" in v && v.detail === 0 && (u = !c(v)), !u) {
516
+ u = !0;
521
517
  return;
522
518
  }
523
519
  t(v);
@@ -525,39 +521,39 @@ function Ct(e, t, a = {}) {
525
521
  };
526
522
  let g = !1;
527
523
  const I = [
528
- me(d, "click", (v) => {
524
+ me(s, "click", (v) => {
529
525
  g || (g = !0, setTimeout(() => {
530
526
  g = !1;
531
527
  }, 0), $(v));
532
528
  }, {
533
529
  passive: !0,
534
- capture: i
530
+ capture: a
535
531
  }),
536
- me(d, "pointerdown", (v) => {
532
+ me(s, "pointerdown", (v) => {
537
533
  const m = se(e);
538
- l = !s(v) && !!(m && !v.composedPath().includes(m));
534
+ u = !c(v) && !!(m && !v.composedPath().includes(m));
539
535
  }, { passive: !0 }),
540
- o && me(d, "blur", (v) => {
536
+ n && me(s, "blur", (v) => {
541
537
  setTimeout(() => {
542
538
  var m;
543
539
  const b = se(e);
544
- ((m = d.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !b?.contains(d.document.activeElement) && t(v);
540
+ ((m = s.document.activeElement) === null || m === void 0 ? void 0 : m.tagName) === "IFRAME" && !b?.contains(s.document.activeElement) && t(v);
545
541
  }, 0);
546
542
  }, { passive: !0 })
547
543
  ].filter(Boolean), x = () => I.forEach((v) => v());
548
- return n ? {
544
+ return o ? {
549
545
  stop: x,
550
546
  cancel: () => {
551
- l = !1;
547
+ u = !1;
552
548
  },
553
549
  trigger: (v) => {
554
- l = !0, $(v), l = !1;
550
+ u = !0, $(v), u = !1;
555
551
  }
556
552
  } : x;
557
553
  }
558
554
  // @__NO_SIDE_EFFECTS__
559
555
  function In() {
560
- const e = Z(!1), t = et();
556
+ const e = Z(!1), t = _e();
561
557
  return t && pe(() => {
562
558
  e.value = !0;
563
559
  }, t), e;
@@ -567,43 +563,43 @@ function Rt(e) {
567
563
  const t = /* @__PURE__ */ In();
568
564
  return A(() => (t.value, !!e()));
569
565
  }
570
- function Dt(e, t, a = {}) {
571
- const { window: d = Se, ...c } = a;
572
- let i;
573
- const o = /* @__PURE__ */ Rt(() => d && "MutationObserver" in d), n = () => {
574
- i && (i.disconnect(), i = void 0);
575
- }, l = ne(A(() => {
566
+ function Dt(e, t, l = {}) {
567
+ const { window: s = Se, ...r } = l;
568
+ let a;
569
+ const n = /* @__PURE__ */ Rt(() => s && "MutationObserver" in s), o = () => {
570
+ a && (a.disconnect(), a = void 0);
571
+ }, u = ne(A(() => {
576
572
  const h = Ne(P(e)).map(se).filter(fn);
577
573
  return new Set(h);
578
574
  }), (h) => {
579
- n(), o.value && h.size && (i = new MutationObserver(t), h.forEach(($) => i.observe($, c)));
575
+ o(), n.value && h.size && (a = new MutationObserver(t), h.forEach(($) => a.observe($, r)));
580
576
  }, {
581
577
  immediate: !0,
582
578
  flush: "post"
583
- }), s = () => i?.takeRecords(), u = () => {
584
- l(), n();
579
+ }), c = () => a?.takeRecords(), f = () => {
580
+ u(), o();
585
581
  };
586
- return Fe(u), {
587
- isSupported: o,
588
- stop: u,
589
- takeRecords: s
582
+ return rt(f), {
583
+ isSupported: n,
584
+ stop: f,
585
+ takeRecords: c
590
586
  };
591
587
  }
592
- function Je(e, t = {}) {
593
- var a;
594
- const { pointerTypes: d, preventDefault: c, stopPropagation: i, exact: o, onMove: n, onEnd: l, onStart: s, initialValue: u, axis: h = "both", draggingElement: $ = Se, containerElement: g, handle: I = e, buttons: x = [0] } = t, v = B((a = P(u)) !== null && a !== void 0 ? a : {
588
+ function qe(e, t = {}) {
589
+ var l;
590
+ const { pointerTypes: s, preventDefault: r, stopPropagation: a, exact: n, onMove: o, onEnd: u, onStart: c, initialValue: f, axis: h = "both", draggingElement: $ = Se, containerElement: g, handle: I = e, buttons: x = [0] } = t, v = B((l = P(f)) !== null && l !== void 0 ? l : {
595
591
  x: 0,
596
592
  y: 0
597
- }), m = B(), b = (y) => d ? d.includes(y.pointerType) : !0, V = (y) => {
598
- P(c) && y.preventDefault(), P(i) && y.stopPropagation();
593
+ }), m = B(), b = (y) => s ? s.includes(y.pointerType) : !0, V = (y) => {
594
+ P(r) && y.preventDefault(), P(a) && y.stopPropagation();
599
595
  }, L = (y) => {
600
596
  var D;
601
- if (!P(x).includes(y.button) || P(t.disabled) || !b(y) || P(o) && y.target !== P(e)) return;
597
+ if (!P(x).includes(y.button) || P(t.disabled) || !b(y) || P(n) && y.target !== P(e)) return;
602
598
  const G = P(g), W = G == null || (D = G.getBoundingClientRect) === null || D === void 0 ? void 0 : D.call(G), H = P(e).getBoundingClientRect(), _ = {
603
599
  x: y.clientX - (G ? H.left - W.left + G.scrollLeft : H.left),
604
600
  y: y.clientY - (G ? H.top - W.top + G.scrollTop : H.top)
605
601
  };
606
- s?.(_, y) !== !1 && (m.value = _, V(y));
602
+ c?.(_, y) !== !1 && (m.value = _, V(y));
607
603
  }, J = (y) => {
608
604
  if (P(t.disabled) || !b(y) || !m.value) return;
609
605
  const D = P(g), G = P(e).getBoundingClientRect();
@@ -611,16 +607,16 @@ function Je(e, t = {}) {
611
607
  (h === "x" || h === "both") && (W = y.clientX - m.value.x, D && (W = Math.min(Math.max(0, W), D.scrollWidth - G.width))), (h === "y" || h === "both") && (H = y.clientY - m.value.y, D && (H = Math.min(Math.max(0, H), D.scrollHeight - G.height))), v.value = {
612
608
  x: W,
613
609
  y: H
614
- }, n?.(v.value, y), V(y);
610
+ }, o?.(v.value, y), V(y);
615
611
  }, O = (y) => {
616
- P(t.disabled) || !b(y) || m.value && (m.value = void 0, l?.(v.value, y), V(y));
612
+ P(t.disabled) || !b(y) || m.value && (m.value = void 0, u?.(v.value, y), V(y));
617
613
  };
618
614
  if (St) {
619
615
  const y = () => {
620
616
  var D;
621
617
  return {
622
618
  capture: (D = t.capture) !== null && D !== void 0 ? D : !0,
623
- passive: !P(c)
619
+ passive: !P(r)
624
620
  };
625
621
  };
626
622
  me(I, "pointerdown", L, y), me($, "pointermove", J, y), me($, "pointerup", O, y);
@@ -632,54 +628,54 @@ function Je(e, t = {}) {
632
628
  style: A(() => `left:${v.value.x}px;top:${v.value.y}px;`)
633
629
  };
634
630
  }
635
- function _e(e, t, a = {}) {
636
- const { window: d = Se, ...c } = a;
637
- let i;
638
- const o = /* @__PURE__ */ Rt(() => d && "ResizeObserver" in d), n = () => {
639
- i && (i.disconnect(), i = void 0);
640
- }, l = ne(A(() => {
641
- const u = P(e);
642
- return Array.isArray(u) ? u.map((h) => se(h)) : [se(u)];
643
- }), (u) => {
644
- if (n(), o.value && d) {
645
- i = new ResizeObserver(t);
646
- for (const h of u) h && i.observe(h, c);
631
+ function Ke(e, t, l = {}) {
632
+ const { window: s = Se, ...r } = l;
633
+ let a;
634
+ const n = /* @__PURE__ */ Rt(() => s && "ResizeObserver" in s), o = () => {
635
+ a && (a.disconnect(), a = void 0);
636
+ }, u = ne(A(() => {
637
+ const f = P(e);
638
+ return Array.isArray(f) ? f.map((h) => se(h)) : [se(f)];
639
+ }), (f) => {
640
+ if (o(), n.value && s) {
641
+ a = new ResizeObserver(t);
642
+ for (const h of f) h && a.observe(h, r);
647
643
  }
648
644
  }, {
649
645
  immediate: !0,
650
646
  flush: "post"
651
- }), s = () => {
652
- n(), l();
647
+ }), c = () => {
648
+ o(), u();
653
649
  };
654
- return Fe(s), {
655
- isSupported: o,
656
- stop: s
650
+ return rt(c), {
651
+ isSupported: n,
652
+ stop: c
657
653
  };
658
654
  }
659
655
  function xe(e, t = {}) {
660
- const { reset: a = !0, windowResize: d = !0, windowScroll: c = !0, immediate: i = !0, updateTiming: o = "sync" } = t, n = Z(0), l = Z(0), s = Z(0), u = Z(0), h = Z(0), $ = Z(0), g = Z(0), I = Z(0);
656
+ const { reset: l = !0, windowResize: s = !0, windowScroll: r = !0, immediate: a = !0, updateTiming: n = "sync" } = t, o = Z(0), u = Z(0), c = Z(0), f = Z(0), h = Z(0), $ = Z(0), g = Z(0), I = Z(0);
661
657
  function x() {
662
658
  const m = se(e);
663
659
  if (!m) {
664
- a && (n.value = 0, l.value = 0, s.value = 0, u.value = 0, h.value = 0, $.value = 0, g.value = 0, I.value = 0);
660
+ l && (o.value = 0, u.value = 0, c.value = 0, f.value = 0, h.value = 0, $.value = 0, g.value = 0, I.value = 0);
665
661
  return;
666
662
  }
667
663
  const b = m.getBoundingClientRect();
668
- n.value = b.height, l.value = b.bottom, s.value = b.left, u.value = b.right, h.value = b.top, $.value = b.width, g.value = b.x, I.value = b.y;
664
+ o.value = b.height, u.value = b.bottom, c.value = b.left, f.value = b.right, h.value = b.top, $.value = b.width, g.value = b.x, I.value = b.y;
669
665
  }
670
666
  function v() {
671
- o === "sync" ? x() : o === "next-frame" && requestAnimationFrame(() => x());
667
+ n === "sync" ? x() : n === "next-frame" && requestAnimationFrame(() => x());
672
668
  }
673
- return _e(e, v), ne(() => se(e), (m) => !m && v()), Dt(e, v, { attributeFilter: ["style", "class"] }), c && me("scroll", v, {
669
+ return Ke(e, v), ne(() => se(e), (m) => !m && v()), Dt(e, v, { attributeFilter: ["style", "class"] }), r && me("scroll", v, {
674
670
  capture: !0,
675
671
  passive: !0
676
- }), d && me("resize", v, { passive: !0 }), pn(() => {
677
- i && v();
672
+ }), s && me("resize", v, { passive: !0 }), pn(() => {
673
+ a && v();
678
674
  }), {
679
- height: n,
680
- bottom: l,
681
- left: s,
682
- right: u,
675
+ height: o,
676
+ bottom: u,
677
+ left: c,
678
+ right: f,
683
679
  top: h,
684
680
  width: $,
685
681
  x: g,
@@ -687,40 +683,40 @@ function xe(e, t = {}) {
687
683
  update: v
688
684
  };
689
685
  }
690
- function Ze(e) {
686
+ function Je(e) {
691
687
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
692
688
  }
693
- const Qe = /* @__PURE__ */ new WeakMap();
689
+ const Ze = /* @__PURE__ */ new WeakMap();
694
690
  function kn(e, t = !1) {
695
- const a = Z(t);
696
- let d = "";
697
- ne(gn(e), (o) => {
698
- const n = Ze(P(o));
699
- if (n) {
700
- const l = n;
701
- if (Qe.get(l) || Qe.set(l, l.style.overflow), l.style.overflow !== "hidden" && (d = l.style.overflow), l.style.overflow === "hidden") return a.value = !0;
702
- if (a.value) return l.style.overflow = "hidden";
691
+ const l = Z(t);
692
+ let s = "";
693
+ ne(gn(e), (n) => {
694
+ const o = Je(P(n));
695
+ if (o) {
696
+ const u = o;
697
+ if (Ze.get(u) || Ze.set(u, u.style.overflow), u.style.overflow !== "hidden" && (s = u.style.overflow), u.style.overflow === "hidden") return l.value = !0;
698
+ if (l.value) return u.style.overflow = "hidden";
703
699
  }
704
700
  }, { immediate: !0 });
705
- const c = () => {
706
- const o = Ze(P(e));
707
- !o || a.value || (o.style.overflow = "hidden", a.value = !0);
708
- }, i = () => {
709
- const o = Ze(P(e));
710
- !o || !a.value || (o.style.overflow = d, Qe.delete(o), a.value = !1);
701
+ const r = () => {
702
+ const n = Je(P(e));
703
+ !n || l.value || (n.style.overflow = "hidden", l.value = !0);
704
+ }, a = () => {
705
+ const n = Je(P(e));
706
+ !n || !l.value || (n.style.overflow = s, Ze.delete(n), l.value = !1);
711
707
  };
712
- return Fe(i), A({
708
+ return rt(a), A({
713
709
  get() {
714
- return a.value;
710
+ return l.value;
715
711
  },
716
- set(o) {
717
- o ? c() : i();
712
+ set(n) {
713
+ n ? r() : a();
718
714
  }
719
715
  });
720
716
  }
721
717
  const En = (e) => {
722
718
  const t = new DOMParser().parseFromString(e, "text/html");
723
- return Array.from(t.body.childNodes).some((a) => a.nodeType === 1);
719
+ return Array.from(t.body.childNodes).some((l) => l.nodeType === 1);
724
720
  }, $n = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), Sn = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Rn = ["innerHTML"], Dn = { key: 2 }, Mn = /* @__PURE__ */ ue({
725
721
  __name: "ACell",
726
722
  props: {
@@ -733,20 +729,20 @@ const En = (e) => {
733
729
  debounce: { default: 300 }
734
730
  },
735
731
  setup(e, { expose: t }) {
736
- const a = le("cell"), d = e.store.getCellData(e.colIndex, e.rowIndex), c = B(""), i = B(!1), o = e.store.columns[e.colIndex], n = e.store.rows[e.rowIndex], l = o.align || "center", s = o.width || "40ch", u = A(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), h = A(() => typeof u.value == "string" ? En(u.value) : !1), $ = A(() => ({
737
- textAlign: l,
738
- width: s,
739
- fontWeight: i.value ? "bold" : "inherit",
732
+ const l = le("cell"), s = e.store.getCellData(e.colIndex, e.rowIndex), r = B(""), a = B(!1), n = e.store.columns[e.colIndex], o = e.store.rows[e.rowIndex], u = n.align || "center", c = n.width || "40ch", f = A(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), h = A(() => typeof f.value == "string" ? En(f.value) : !1), $ = A(() => ({
733
+ textAlign: u,
734
+ width: c,
735
+ fontWeight: a.value ? "bold" : "inherit",
740
736
  paddingLeft: e.store.getIndent(e.colIndex, e.store.display[e.rowIndex]?.indent)
741
737
  })), g = A(() => ({
742
738
  "sticky-column": e.pinned,
743
- "cell-modified": i.value
739
+ "cell-modified": a.value
744
740
  })), I = () => {
745
741
  v(), x();
746
742
  }, x = () => {
747
- const { left: O, bottom: y, width: D, height: G } = xe(a);
748
- o.mask, o.modalComponent && e.store.$patch((W) => {
749
- W.modal.visible = !0, W.modal.colIndex = e.colIndex, W.modal.rowIndex = e.rowIndex, W.modal.left = O, W.modal.bottom = y, W.modal.width = D, W.modal.height = G, W.modal.cell = a.value, typeof o.modalComponent == "function" ? W.modal.component = o.modalComponent({ table: W.table, row: n, column: o }) : W.modal.component = o.modalComponent, W.modal.componentProps = o.modalComponentExtraProps;
743
+ const { left: O, bottom: y, width: D, height: G } = xe(l);
744
+ n.mask, n.modalComponent && e.store.$patch((W) => {
745
+ W.modal.visible = !0, W.modal.colIndex = e.colIndex, W.modal.rowIndex = e.rowIndex, W.modal.left = O, W.modal.bottom = y, W.modal.width = D, W.modal.height = G, W.modal.cell = l.value, typeof n.modalComponent == "function" ? W.modal.component = n.modalComponent({ table: W.table, row: o, column: n }) : W.modal.component = n.modalComponent, W.modal.componentProps = n.modalComponentExtraProps;
750
746
  });
751
747
  };
752
748
  if (e.addNavigation) {
@@ -761,43 +757,43 @@ const En = (e) => {
761
757
  typeof e.addNavigation == "object" && (O = {
762
758
  ...O,
763
759
  ...e.addNavigation
764
- }), it([
760
+ }), st([
765
761
  {
766
- selectors: a,
762
+ selectors: l,
767
763
  handlers: O
768
764
  }
769
765
  ]);
770
766
  }
771
767
  const v = () => {
772
- if (a.value && o.edit) {
768
+ if (l.value && n.edit) {
773
769
  const O = window.getSelection();
774
770
  if (O)
775
771
  try {
776
772
  const y = document.createRange();
777
- y.selectNodeContents && (y.selectNodeContents(a.value), O.removeAllRanges(), O.addRange(y));
773
+ y.selectNodeContents && (y.selectNodeContents(l.value), O.removeAllRanges(), O.addRange(y));
778
774
  } catch {
779
775
  }
780
776
  }
781
777
  }, m = () => {
782
- a.value && (c.value = a.value.textContent, v());
778
+ l.value && (r.value = l.value.textContent, v());
783
779
  }, b = () => {
784
780
  try {
785
781
  const O = window.getSelection();
786
- if (O && O.rangeCount > 0 && a.value) {
782
+ if (O && O.rangeCount > 0 && l.value) {
787
783
  const y = O.getRangeAt(0), D = y.cloneRange();
788
784
  if (D.selectNodeContents && D.setEnd)
789
- return D.selectNodeContents(a.value), D.setEnd(y.endContainer, y.endOffset), D.toString().length;
785
+ return D.selectNodeContents(l.value), D.setEnd(y.endContainer, y.endOffset), D.toString().length;
790
786
  }
791
787
  } catch {
792
788
  }
793
789
  return 0;
794
790
  }, V = (O) => {
795
- if (a.value)
791
+ if (l.value)
796
792
  try {
797
793
  const y = window.getSelection();
798
794
  if (!y) return;
799
795
  let D = 0;
800
- const G = document.createTreeWalker ? document.createTreeWalker(a.value, NodeFilter.SHOW_TEXT, null) : null;
796
+ const G = document.createTreeWalker ? document.createTreeWalker(l.value, NodeFilter.SHOW_TEXT, null) : null;
801
797
  if (!G) return;
802
798
  let W, H = null;
803
799
  for (; W = G.nextNode(); ) {
@@ -812,23 +808,23 @@ const En = (e) => {
812
808
  } catch {
813
809
  }
814
810
  }, L = (O) => {
815
- if (!o.edit) return;
811
+ if (!n.edit) return;
816
812
  const y = O.target;
817
- if (y.textContent === c.value)
813
+ if (y.textContent === r.value)
818
814
  return;
819
815
  const D = b();
820
- c.value = y.textContent, o.format ? (i.value = y.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, d), e.store.setCellText(e.colIndex, e.rowIndex, y.textContent)) : (i.value = y.textContent !== d, e.store.setCellData(e.colIndex, e.rowIndex, y.textContent)), tt().then(() => {
816
+ r.value = y.textContent, n.format ? (a.value = y.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, s), e.store.setCellText(e.colIndex, e.rowIndex, y.textContent)) : (a.value = y.textContent !== s, e.store.setCellData(e.colIndex, e.rowIndex, y.textContent)), et().then(() => {
821
817
  V(D);
822
818
  });
823
819
  }, J = /* @__PURE__ */ yn(L, e.debounce);
824
820
  return t({
825
- currentData: c
821
+ currentData: r
826
822
  }), (O, y) => (C(), k("td", {
827
823
  ref: "cell",
828
824
  "data-colindex": e.colIndex,
829
825
  "data-rowindex": e.rowIndex,
830
- "data-editable": R(o).edit,
831
- contenteditable: R(o).edit,
826
+ "data-editable": R(n).edit,
827
+ contenteditable: R(n).edit,
832
828
  tabindex: e.tabIndex,
833
829
  spellcheck: !1,
834
830
  style: re($.value),
@@ -839,13 +835,13 @@ const En = (e) => {
839
835
  (...D) => R(J) && R(J)(...D)),
840
836
  onClick: I
841
837
  }, [
842
- R(o).cellComponent ? (C(), ve(Ee(R(o).cellComponent), nt({
838
+ R(n).cellComponent ? (C(), ve(Ee(R(n).cellComponent), tt({
843
839
  key: 0,
844
- value: u.value
845
- }, R(o).cellComponentProps), null, 16, ["value"])) : h.value ? (C(), k("span", {
840
+ value: f.value
841
+ }, R(n).cellComponentProps), null, 16, ["value"])) : h.value ? (C(), k("span", {
846
842
  key: 1,
847
- innerHTML: u.value
848
- }, null, 8, Rn)) : (C(), k("span", Dn, ge(u.value), 1))
843
+ innerHTML: f.value
844
+ }, null, 8, Rn)) : (C(), k("span", Dn, ge(f.value), 1))
849
845
  ], 46, Sn));
850
846
  }
851
847
  }), Tn = ["tabindex"], An = ["tabindex"], On = ["colspan"], Pn = /* @__PURE__ */ ue({
@@ -857,22 +853,22 @@ const En = (e) => {
857
853
  addNavigation: { type: [Boolean, Object], default: () => ze }
858
854
  },
859
855
  setup(e) {
860
- const t = le("rowEl"), a = A(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
856
+ const t = le("rowEl"), l = A(() => e.store.display[e.rowIndex].expanded ? "▼" : "►");
861
857
  if (e.addNavigation) {
862
- const d = {
863
- "keydown.control.g": (c) => {
864
- c.stopPropagation(), c.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
858
+ const s = {
859
+ "keydown.control.g": (r) => {
860
+ r.stopPropagation(), r.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
865
861
  }
866
862
  };
867
- typeof e.addNavigation == "object" && Object.assign(d, e.addNavigation), it([
863
+ typeof e.addNavigation == "object" && Object.assign(s, e.addNavigation), st([
868
864
  {
869
865
  selectors: t,
870
- handlers: d
866
+ handlers: s
871
867
  }
872
868
  ]);
873
869
  }
874
- return (d, c) => (C(), k(ie, null, [
875
- z("tr", nt(d.$attrs, {
870
+ return (s, r) => (C(), k(ie, null, [
871
+ z("tr", tt(s.$attrs, {
876
872
  ref: "rowEl",
877
873
  tabindex: e.tabIndex,
878
874
  class: "expandable-row"
@@ -880,9 +876,9 @@ const En = (e) => {
880
876
  z("td", {
881
877
  tabIndex: -1,
882
878
  class: "row-index",
883
- onClick: c[0] || (c[0] = (i) => e.store.toggleRowExpand(e.rowIndex))
884
- }, ge(a.value), 1),
885
- te(d.$slots, "row", {}, void 0, !0)
879
+ onClick: r[0] || (r[0] = (a) => e.store.toggleRowExpand(e.rowIndex))
880
+ }, ge(l.value), 1),
881
+ te(s.$slots, "row", {}, void 0, !0)
886
882
  ], 16, Tn),
887
883
  e.store.display[e.rowIndex].expanded ? (C(), k("tr", {
888
884
  key: 0,
@@ -895,16 +891,16 @@ const En = (e) => {
895
891
  colspan: e.store.columns.length + 1,
896
892
  class: "expanded-row-content"
897
893
  }, [
898
- te(d.$slots, "content", {}, void 0, !0)
894
+ te(s.$slots, "content", {}, void 0, !0)
899
895
  ], 8, On)
900
896
  ], 8, An)) : q("", !0)
901
897
  ], 64));
902
898
  }
903
899
  }), he = (e, t) => {
904
- const a = e.__vccOpts || e;
905
- for (const [d, c] of t)
906
- a[d] = c;
907
- return a;
900
+ const l = e.__vccOpts || e;
901
+ for (const [s, r] of t)
902
+ l[s] = r;
903
+ return l;
908
904
  }, Hn = /* @__PURE__ */ he(Pn, [["__scopeId", "data-v-a42297c7"]]), Ln = ["colspan"], Vn = {
909
905
  ref: "container",
910
906
  class: "gantt-container"
@@ -925,17 +921,17 @@ const En = (e) => {
925
921
  color: { default: "#cccccc" }
926
922
  },
927
923
  emits: ["connection:create"],
928
- setup(e, { expose: t, emit: a }) {
924
+ setup(e, { expose: t, emit: l }) {
929
925
  Bt((E) => ({
930
- v6d722296: c.value,
926
+ v6d722296: r.value,
931
927
  v260b36f8: E.colspan
932
928
  }));
933
- const d = a, c = B(e.color.length >= 6 ? e.color : "#cccccc"), i = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, o = le("container"), n = le("bar"), l = le("leftResizeHandle"), s = le("rightResizeHandle"), u = le("leftConnectionHandle"), h = le("rightConnectionHandle"), { width: $ } = xe(o), { left: g, right: I } = xe(n), x = B(e.start), v = B(e.end || x.value + e.colspan), m = B(!1), b = B(!1), V = B(!1), L = B(!1), J = B(!1), O = B({ startX: 0, startY: 0, endX: 0, endY: 0 }), y = A(() => Re.value || _.value || fe.value), D = A(() => e.colspan > 0 ? $.value / e.colspan : 0), G = A(() => {
929
+ const s = l, r = B(e.color.length >= 6 ? e.color : "#cccccc"), a = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, n = le("container"), o = le("bar"), u = le("leftResizeHandle"), c = le("rightResizeHandle"), f = le("leftConnectionHandle"), h = le("rightConnectionHandle"), { width: $ } = xe(n), { left: g, right: I } = xe(o), x = B(e.start), v = B(e.end || x.value + e.colspan), m = B(!1), b = B(!1), V = B(!1), L = B(!1), J = B(!1), O = B({ startX: 0, startY: 0, endX: 0, endY: 0 }), y = A(() => Re.value || _.value || fe.value), D = A(() => e.colspan > 0 ? $.value / e.colspan : 0), G = A(() => {
934
930
  const E = x.value / e.colspan * 100, M = v.value / e.colspan * 100;
935
931
  return {
936
932
  left: `${E}%`,
937
933
  width: `${M - E}%`,
938
- backgroundColor: c.value
934
+ backgroundColor: r.value
939
935
  };
940
936
  }), W = A(
941
937
  () => ({
@@ -947,38 +943,38 @@ const En = (e) => {
947
943
  pointerEvents: "none",
948
944
  zIndex: 1e3
949
945
  })
950
- ), H = B({ startX: 0, startPos: 0 }), { isDragging: _ } = Je(l, {
946
+ ), H = B({ startX: 0, startPos: 0 }), { isDragging: _ } = qe(u, {
951
947
  axis: "x",
952
948
  onStart: () => Ie(g.value, x.value),
953
- onMove: ({ x: E }) => We(E),
954
- onEnd: ({ x: E }) => Xe(E)
955
- }), { isDragging: fe } = Je(s, {
949
+ onMove: ({ x: E }) => Fe(E),
950
+ onEnd: ({ x: E }) => We(E)
951
+ }), { isDragging: fe } = qe(c, {
956
952
  axis: "x",
957
953
  onStart: () => Ie(I.value, v.value),
958
- onMove: ({ x: E }) => Ge(E),
954
+ onMove: ({ x: E }) => Xe(E),
959
955
  onEnd: ({ x: E }) => De(E)
960
- }), { isDragging: Re } = Je(n, {
956
+ }), { isDragging: Re } = qe(o, {
961
957
  exact: !0,
962
958
  axis: "x",
963
959
  onStart: () => Ie(g.value, x.value),
964
- onMove: ({ x: E }) => Ye(E),
960
+ onMove: ({ x: E }) => Ge(E),
965
961
  onEnd: ({ x: E }) => Me(E)
966
962
  });
967
963
  pe(() => {
968
- Ue();
964
+ Ye();
969
965
  }), zt(() => {
970
- je();
966
+ Ue();
971
967
  });
972
968
  function Ie(E, M) {
973
- n.value && (n.value.style.transition = "none"), H.value = { startX: E, startPos: M };
969
+ o.value && (o.value.style.transition = "none"), H.value = { startX: E, startPos: M };
974
970
  }
975
- function We(E) {
976
- if (!_.value || !n.value) return;
971
+ function Fe(E) {
972
+ if (!_.value || !o.value) return;
977
973
  const X = (E - H.value.startX) / D.value, F = Math.max(0, Math.min(v.value - 1, H.value.startPos + X));
978
- n.value.style.left = `${F / e.colspan * 100}%`, n.value.style.width = `${(v.value - F) / e.colspan * 100}%`;
974
+ o.value.style.left = `${F / e.colspan * 100}%`, o.value.style.width = `${(v.value - F) / e.colspan * 100}%`;
979
975
  }
980
- function Xe(E) {
981
- if (!n.value) return;
976
+ function We(E) {
977
+ if (!o.value) return;
982
978
  const M = E - H.value.startX, X = Math.round(M / D.value), F = x.value, Y = Math.max(0, Math.min(v.value - 1, H.value.startPos + X));
983
979
  x.value = Y, e.store.updateGanttBar({
984
980
  rowIndex: e.rowIndex,
@@ -993,13 +989,13 @@ const En = (e) => {
993
989
  newColspan: v.value - Y
994
990
  });
995
991
  }
996
- function Ge(E) {
997
- if (!fe.value || !n.value) return;
992
+ function Xe(E) {
993
+ if (!fe.value || !o.value) return;
998
994
  const X = (E - H.value.startX) / D.value, F = Math.max(x.value + 1, Math.min(e.columnsCount, H.value.startPos + X));
999
- n.value.style.width = `${(F - x.value) / e.colspan * 100}%`;
995
+ o.value.style.width = `${(F - x.value) / e.colspan * 100}%`;
1000
996
  }
1001
997
  function De(E) {
1002
- if (!n.value) return;
998
+ if (!o.value) return;
1003
999
  const M = E - H.value.startX, X = Math.round(M / D.value), F = v.value, Y = Math.max(x.value + 1, Math.min(e.columnsCount, H.value.startPos + X));
1004
1000
  v.value = Y, e.store.updateGanttBar({
1005
1001
  rowIndex: e.rowIndex,
@@ -1014,13 +1010,13 @@ const En = (e) => {
1014
1010
  newColspan: Y - x.value
1015
1011
  });
1016
1012
  }
1017
- function Ye(E) {
1018
- if (!Re.value || !n.value) return;
1013
+ function Ge(E) {
1014
+ if (!Re.value || !o.value) return;
1019
1015
  const X = (E - H.value.startX) / D.value, F = v.value - x.value, Y = Math.max(0, Math.min(H.value.startPos + X, e.columnsCount - F));
1020
- n.value.style.left = `${Y / e.colspan * 100}%`;
1016
+ o.value.style.left = `${Y / e.colspan * 100}%`;
1021
1017
  }
1022
1018
  function Me(E) {
1023
- if (!n.value) return;
1019
+ if (!o.value) return;
1024
1020
  const M = E - H.value.startX, X = Math.round(M / D.value), F = v.value - x.value, Y = x.value, j = v.value;
1025
1021
  let Q = H.value.startPos + X, K = Q + F;
1026
1022
  Q < 0 ? (Q = 0, K = F) : K > e.columnsCount && (K = e.columnsCount, Q = K - F), x.value = Q, v.value = K, e.store.updateGanttBar({
@@ -1035,39 +1031,39 @@ const En = (e) => {
1035
1031
  colspan: K - Q
1036
1032
  });
1037
1033
  }
1038
- function Ue() {
1039
- const { x: E, y: M } = xe(n), { x: X, y: F } = xe(u), { x: Y, y: j } = xe(h);
1034
+ function Ye() {
1035
+ const { x: E, y: M } = xe(o), { x: X, y: F } = xe(f), { x: Y, y: j } = xe(h);
1040
1036
  e.store.registerGanttBar({
1041
- id: i,
1037
+ id: a,
1042
1038
  rowIndex: e.rowIndex,
1043
1039
  colIndex: e.colIndex,
1044
1040
  startIndex: x,
1045
1041
  endIndex: v,
1046
- color: c,
1042
+ color: r,
1047
1043
  label: e.label,
1048
1044
  position: { x: E, y: M }
1049
1045
  }), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
1050
- id: `${i}-connection-left`,
1046
+ id: `${a}-connection-left`,
1051
1047
  rowIndex: e.rowIndex,
1052
1048
  colIndex: e.colIndex,
1053
1049
  side: "left",
1054
1050
  position: { x: X, y: F },
1055
1051
  visible: m,
1056
- barId: i
1052
+ barId: a
1057
1053
  }), e.store.registerConnectionHandle({
1058
- id: `${i}-connection-right`,
1054
+ id: `${a}-connection-right`,
1059
1055
  rowIndex: e.rowIndex,
1060
1056
  colIndex: e.colIndex,
1061
1057
  side: "right",
1062
1058
  position: { x: Y, y: j },
1063
1059
  visible: b,
1064
- barId: i
1060
+ barId: a
1065
1061
  }));
1066
1062
  }
1067
- function je() {
1068
- e.store.unregisterGanttBar(i), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${i}-connection-left`), e.store.unregisterConnectionHandle(`${i}-connection-right`));
1063
+ function Ue() {
1064
+ e.store.unregisterGanttBar(a), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${a}-connection-left`), e.store.unregisterConnectionHandle(`${a}-connection-right`));
1069
1065
  }
1070
- function qe() {
1066
+ function je() {
1071
1067
  e.store.isDependencyGraphEnabled && (m.value = !0, b.value = !0);
1072
1068
  }
1073
1069
  function Te() {
@@ -1075,7 +1071,7 @@ const En = (e) => {
1075
1071
  }
1076
1072
  function Ae(E, M) {
1077
1073
  M.preventDefault(), M.stopPropagation(), J.value = !0, E === "left" ? V.value = !0 : L.value = !0;
1078
- const X = E === "left" ? u.value : h.value;
1074
+ const X = E === "left" ? f.value : h.value;
1079
1075
  if (X) {
1080
1076
  const j = X.getBoundingClientRect(), Q = j.left + j.width / 2, K = j.top + j.height / 2;
1081
1077
  O.value = { startX: Q, startY: K, endX: Q, endY: K };
@@ -1089,19 +1085,19 @@ const En = (e) => {
1089
1085
  }
1090
1086
  function Oe(E, M) {
1091
1087
  const F = document.elementFromPoint(E.clientX, E.clientY)?.closest(".connection-handle");
1092
- if (F && F !== (M === "left" ? u.value : h.value)) {
1088
+ if (F && F !== (M === "left" ? f.value : h.value)) {
1093
1089
  const Y = F.closest(".gantt-bar");
1094
1090
  if (Y) {
1095
- const j = parseInt(Y.getAttribute("data-rowindex") || "0"), Q = parseInt(Y.getAttribute("data-colindex") || "0"), K = F.classList.contains("left-connection-handle") ? "left" : "right", r = `gantt-bar-row-${j}-col-${Q}`, f = e.store.createConnection(
1096
- `${i}-connection-${M}`,
1097
- `${r}-connection-${K}`
1091
+ const j = parseInt(Y.getAttribute("data-rowindex") || "0"), Q = parseInt(Y.getAttribute("data-colindex") || "0"), K = F.classList.contains("left-connection-handle") ? "left" : "right", i = `gantt-bar-row-${j}-col-${Q}`, d = e.store.createConnection(
1092
+ `${a}-connection-${M}`,
1093
+ `${i}-connection-${K}`
1098
1094
  );
1099
- f && d("connection:create", f);
1095
+ d && s("connection:create", d);
1100
1096
  }
1101
1097
  }
1102
1098
  }
1103
1099
  function Pe(E, M) {
1104
- J.value = !1, V.value = !1, L.value = !1, document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", M), n.value?.matches(":hover") || Te();
1100
+ J.value = !1, V.value = !1, L.value = !1, document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", M), o.value?.matches(":hover") || Te();
1105
1101
  }
1106
1102
  return t({
1107
1103
  barStyle: G,
@@ -1124,7 +1120,7 @@ const En = (e) => {
1124
1120
  "data-colindex": e.colIndex,
1125
1121
  class: ee(["gantt-bar", { "is-dragging": y.value }]),
1126
1122
  style: re(G.value),
1127
- onMouseenter: qe,
1123
+ onMouseenter: je,
1128
1124
  onMouseleave: Te
1129
1125
  }, [
1130
1126
  e.store.isDependencyGraphEnabled ? (C(), k("div", {
@@ -1185,25 +1181,25 @@ const En = (e) => {
1185
1181
  addNavigation: { type: [Boolean, Object], default: !1 }
1186
1182
  },
1187
1183
  setup(e) {
1188
- const t = le("rowEl"), a = A(() => e.store.isRowVisible(e.rowIndex)), d = A(() => e.store.getRowExpandSymbol(e.rowIndex));
1184
+ const t = le("rowEl"), l = A(() => e.store.isRowVisible(e.rowIndex)), s = A(() => e.store.getRowExpandSymbol(e.rowIndex));
1189
1185
  if (e.addNavigation) {
1190
- let c = ze;
1191
- typeof e.addNavigation == "object" && (c = {
1192
- ...c,
1186
+ let r = ze;
1187
+ typeof e.addNavigation == "object" && (r = {
1188
+ ...r,
1193
1189
  ...e.addNavigation
1194
- }), it([
1190
+ }), st([
1195
1191
  {
1196
1192
  selectors: t,
1197
- handlers: c
1193
+ handlers: r
1198
1194
  }
1199
1195
  ]);
1200
1196
  }
1201
- return (c, i) => oe((C(), k("tr", {
1197
+ return (r, a) => oe((C(), k("tr", {
1202
1198
  ref: "rowEl",
1203
1199
  tabindex: e.tabIndex,
1204
1200
  class: "atable-row"
1205
1201
  }, [
1206
- e.store.config.view !== "uncounted" ? te(c.$slots, "index", { key: 0 }, () => [
1202
+ e.store.config.view !== "uncounted" ? te(r.$slots, "index", { key: 0 }, () => [
1207
1203
  e.store.config.view === "list" ? (C(), k("td", {
1208
1204
  key: 0,
1209
1205
  tabIndex: -1,
@@ -1212,40 +1208,40 @@ const En = (e) => {
1212
1208
  key: 1,
1213
1209
  tabIndex: -1,
1214
1210
  class: ee(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1215
- onClick: i[0] || (i[0] = (o) => e.store.toggleRowExpand(e.rowIndex))
1216
- }, ge(d.value), 3)) : q("", !0)
1211
+ onClick: a[0] || (a[0] = (n) => e.store.toggleRowExpand(e.rowIndex))
1212
+ }, ge(s.value), 3)) : q("", !0)
1217
1213
  ], !0) : q("", !0),
1218
- te(c.$slots, "default", {}, void 0, !0)
1214
+ te(r.$slots, "default", {}, void 0, !0)
1219
1215
  ], 8, Xn)), [
1220
- [$t, a.value]
1216
+ [Et, l.value]
1221
1217
  ]);
1222
1218
  }
1223
- }), Mt = /* @__PURE__ */ he(Gn, [["__scopeId", "data-v-0fa91f83"]]), Ke = /* @__PURE__ */ new WeakMap(), Yn = {
1219
+ }), Mt = /* @__PURE__ */ he(Gn, [["__scopeId", "data-v-0fa91f83"]]), Qe = /* @__PURE__ */ new WeakMap(), Yn = {
1224
1220
  mounted(e, t) {
1225
- const a = !t.modifiers.bubble;
1226
- let d;
1227
- if (typeof t.value == "function") d = Ct(e, t.value, { capture: a });
1221
+ const l = !t.modifiers.bubble;
1222
+ let s;
1223
+ if (typeof t.value == "function") s = pt(e, t.value, { capture: l });
1228
1224
  else {
1229
- const [c, i] = t.value;
1230
- d = Ct(e, c, Object.assign({ capture: a }, i));
1225
+ const [r, a] = t.value;
1226
+ s = pt(e, r, Object.assign({ capture: l }, a));
1231
1227
  }
1232
- Ke.set(e, d);
1228
+ Qe.set(e, s);
1233
1229
  },
1234
1230
  unmounted(e) {
1235
- const t = Ke.get(e);
1236
- t && typeof t == "function" ? t() : t?.stop(), Ke.delete(e);
1231
+ const t = Qe.get(e);
1232
+ t && typeof t == "function" ? t() : t?.stop(), Qe.delete(e);
1237
1233
  }
1238
1234
  }, Un = { mounted(e, t) {
1239
- typeof t.value == "function" ? _e(e, t.value) : _e(e, ...t.value);
1235
+ typeof t.value == "function" ? Ke(e, t.value) : Ke(e, ...t.value);
1240
1236
  } };
1241
1237
  function jn() {
1242
1238
  let e = !1;
1243
1239
  const t = Z(!1);
1244
- return (a, d) => {
1245
- if (t.value = d.value, e) return;
1240
+ return (l, s) => {
1241
+ if (t.value = s.value, e) return;
1246
1242
  e = !0;
1247
- const c = kn(a, d.value);
1248
- ne(t, (i) => c.value = i);
1243
+ const r = kn(l, s.value);
1244
+ ne(t, (a) => r.value = a);
1249
1245
  };
1250
1246
  }
1251
1247
  jn();
@@ -1267,24 +1263,24 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1267
1263
  },
1268
1264
  emits: ["connection:delete"],
1269
1265
  setup(e, { emit: t }) {
1270
- const a = t, d = A(() => e.store.connectionPaths.filter((o) => {
1271
- const n = e.store.ganttBars.find((s) => s.id === o.from.barId), l = e.store.ganttBars.find((s) => s.id === o.to.barId);
1272
- return n && l;
1273
- })), c = (o) => {
1274
- const n = e.store.connectionHandles.find(
1275
- (y) => y.barId === o.from.barId && y.side === o.from.side
1276
- ), l = e.store.connectionHandles.find(
1277
- (y) => y.barId === o.to.barId && y.side === o.to.side
1266
+ const l = t, s = A(() => e.store.connectionPaths.filter((n) => {
1267
+ const o = e.store.ganttBars.find((c) => c.id === n.from.barId), u = e.store.ganttBars.find((c) => c.id === n.to.barId);
1268
+ return o && u;
1269
+ })), r = (n) => {
1270
+ const o = e.store.connectionHandles.find(
1271
+ (y) => y.barId === n.from.barId && y.side === n.from.side
1272
+ ), u = e.store.connectionHandles.find(
1273
+ (y) => y.barId === n.to.barId && y.side === n.to.side
1278
1274
  );
1279
- if (!n || !l) return "";
1280
- const s = n.position.x + Le / 2, u = n.position.y + Le / 2, h = l.position.x + Le / 2, $ = l.position.y + Le / 2, g = Math.abs(h - s), I = Math.max(g * Kn, 50), x = s + (o.from.side === "left" ? -I : I), v = h + (o.to.side === "left" ? -I : I), m = { x: 0.5 * s + 0.5 * x, y: 0.5 * u + 0.5 * u }, b = { x: 0.5 * x + 0.5 * v, y: 0.5 * u + 0.5 * $ }, V = { x: 0.5 * v + 0.5 * h, y: 0.5 * $ + 0.5 * $ }, L = { x: 0.5 * m.x + 0.5 * b.x, y: 0.5 * m.y + 0.5 * b.y }, J = { x: 0.5 * b.x + 0.5 * V.x, y: 0.5 * b.y + 0.5 * V.y }, O = { x: 0.5 * L.x + 0.5 * J.x, y: 0.5 * L.y + 0.5 * J.y };
1281
- return `M ${s} ${u} Q ${x} ${u}, ${O.x} ${O.y} Q ${v} ${$}, ${h} ${$}`;
1282
- }, i = (o) => {
1283
- e.store.deleteConnection(o.id) && a("connection:delete", o);
1275
+ if (!o || !u) return "";
1276
+ const c = o.position.x + Le / 2, f = o.position.y + Le / 2, h = u.position.x + Le / 2, $ = u.position.y + Le / 2, g = Math.abs(h - c), I = Math.max(g * Kn, 50), x = c + (n.from.side === "left" ? -I : I), v = h + (n.to.side === "left" ? -I : I), m = { x: 0.5 * c + 0.5 * x, y: 0.5 * f + 0.5 * f }, b = { x: 0.5 * x + 0.5 * v, y: 0.5 * f + 0.5 * $ }, V = { x: 0.5 * v + 0.5 * h, y: 0.5 * $ + 0.5 * $ }, L = { x: 0.5 * m.x + 0.5 * b.x, y: 0.5 * m.y + 0.5 * b.y }, J = { x: 0.5 * b.x + 0.5 * V.x, y: 0.5 * b.y + 0.5 * V.y }, O = { x: 0.5 * L.x + 0.5 * J.x, y: 0.5 * L.y + 0.5 * J.y };
1277
+ return `M ${c} ${f} Q ${x} ${f}, ${O.x} ${O.y} Q ${v} ${$}, ${h} ${$}`;
1278
+ }, a = (n) => {
1279
+ e.store.deleteConnection(n.id) && l("connection:delete", n);
1284
1280
  };
1285
- return (o, n) => (C(), k("div", qn, [
1281
+ return (n, o) => (C(), k("div", qn, [
1286
1282
  (C(), k("svg", Jn, [
1287
- n[0] || (n[0] = z("defs", null, [
1283
+ o[0] || (o[0] = z("defs", null, [
1288
1284
  z("path", {
1289
1285
  id: "arrowhead",
1290
1286
  d: "M 0 -7 L 20 0 L 0 7Z",
@@ -1307,25 +1303,25 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1307
1303
  })
1308
1304
  ])
1309
1305
  ], -1)),
1310
- (C(!0), k(ie, null, ye(d.value, (l) => (C(), k("path", {
1311
- key: `${l.id}-hitbox`,
1312
- d: c(l),
1306
+ (C(!0), k(ie, null, ye(s.value, (u) => (C(), k("path", {
1307
+ key: `${u.id}-hitbox`,
1308
+ d: r(u),
1313
1309
  stroke: "transparent",
1314
- "stroke-width": (l.style?.width || 2) + 10,
1310
+ "stroke-width": (u.style?.width || 2) + 10,
1315
1311
  fill: "none",
1316
1312
  class: "connection-hitbox",
1317
- onDblclick: (s) => i(l)
1313
+ onDblclick: (c) => a(u)
1318
1314
  }, null, 40, Zn))), 128)),
1319
- (C(!0), k(ie, null, ye(d.value, (l) => (C(), k("path", {
1320
- id: l.id,
1321
- key: l.id,
1322
- d: c(l),
1323
- stroke: l.style?.color || "#666",
1324
- "stroke-width": l.style?.width || 2,
1315
+ (C(!0), k(ie, null, ye(s.value, (u) => (C(), k("path", {
1316
+ id: u.id,
1317
+ key: u.id,
1318
+ d: r(u),
1319
+ stroke: u.style?.color || "#666",
1320
+ "stroke-width": u.style?.width || 2,
1325
1321
  fill: "none",
1326
1322
  "marker-mid": "url(#arrowhead-marker)",
1327
1323
  class: "connection-path animated-path",
1328
- onDblclick: (s) => i(l)
1324
+ onDblclick: (c) => a(u)
1329
1325
  }, null, 40, Qn))), 128))
1330
1326
  ]))
1331
1327
  ]));
@@ -1344,95 +1340,95 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1344
1340
  store: {}
1345
1341
  },
1346
1342
  setup(e) {
1347
- const t = B(""), a = Ft({
1343
+ const t = B(""), l = Ft({
1348
1344
  startValue: "",
1349
1345
  endValue: ""
1350
- }), d = (l) => {
1351
- if (l.filterOptions) return l.filterOptions;
1352
- const s = /* @__PURE__ */ new Set();
1353
- return e.store.rows.forEach((u) => {
1354
- const h = u[l.name];
1355
- h != null && h !== "" && s.add(h);
1356
- }), Array.from(s).map((u) => ({
1357
- value: u,
1358
- label: String(u)
1346
+ }), s = (u) => {
1347
+ if (u.filterOptions) return u.filterOptions;
1348
+ const c = /* @__PURE__ */ new Set();
1349
+ return e.store.rows.forEach((f) => {
1350
+ const h = f[u.name];
1351
+ h != null && h !== "" && c.add(h);
1352
+ }), Array.from(c).map((f) => ({
1353
+ value: f,
1354
+ label: String(f)
1359
1355
  }));
1360
- }, c = A(() => !!(t.value || a.startValue || a.endValue)), i = (l) => {
1361
- !l && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = l, e.store.setFilter(e.colIndex, { value: l }));
1362
- }, o = (l, s) => {
1363
- l === "start" ? a.startValue = s : a.endValue = s, !a.startValue && !a.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
1356
+ }, r = A(() => !!(t.value || l.startValue || l.endValue)), a = (u) => {
1357
+ !u && e.column.filterType !== "checkbox" ? (e.store.clearFilter(e.colIndex), t.value = "") : (t.value = u, e.store.setFilter(e.colIndex, { value: u }));
1358
+ }, n = (u, c) => {
1359
+ u === "start" ? l.startValue = c : l.endValue = c, !l.startValue && !l.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
1364
1360
  value: null,
1365
- startValue: a.startValue,
1366
- endValue: a.endValue
1361
+ startValue: l.startValue,
1362
+ endValue: l.endValue
1367
1363
  });
1368
- }, n = () => {
1369
- t.value = "", a.startValue = "", a.endValue = "", e.store.clearFilter(e.colIndex);
1364
+ }, o = () => {
1365
+ t.value = "", l.startValue = "", l.endValue = "", e.store.clearFilter(e.colIndex);
1370
1366
  };
1371
- return (l, s) => (C(), k("div", to, [
1367
+ return (u, c) => (C(), k("div", to, [
1372
1368
  (e.column.filterType || "text") === "text" ? oe((C(), k("input", {
1373
1369
  key: 0,
1374
- "onUpdate:modelValue": s[0] || (s[0] = (u) => t.value = u),
1370
+ "onUpdate:modelValue": c[0] || (c[0] = (f) => t.value = f),
1375
1371
  type: "text",
1376
1372
  class: "filter-input",
1377
- onInput: s[1] || (s[1] = (u) => i(t.value))
1373
+ onInput: c[1] || (c[1] = (f) => a(t.value))
1378
1374
  }, null, 544)), [
1379
1375
  [ke, t.value]
1380
1376
  ]) : e.column.filterType === "number" ? oe((C(), k("input", {
1381
1377
  key: 1,
1382
- "onUpdate:modelValue": s[2] || (s[2] = (u) => t.value = u),
1378
+ "onUpdate:modelValue": c[2] || (c[2] = (f) => t.value = f),
1383
1379
  type: "number",
1384
1380
  class: "filter-input",
1385
- onInput: s[3] || (s[3] = (u) => i(t.value))
1381
+ onInput: c[3] || (c[3] = (f) => a(t.value))
1386
1382
  }, null, 544)), [
1387
1383
  [ke, t.value]
1388
1384
  ]) : e.column.filterType === "checkbox" ? (C(), k("label", no, [
1389
1385
  oe(z("input", {
1390
- "onUpdate:modelValue": s[4] || (s[4] = (u) => t.value = u),
1386
+ "onUpdate:modelValue": c[4] || (c[4] = (f) => t.value = f),
1391
1387
  type: "checkbox",
1392
1388
  class: "filter-checkbox",
1393
- onChange: s[5] || (s[5] = (u) => i(t.value))
1389
+ onChange: c[5] || (c[5] = (f) => a(t.value))
1394
1390
  }, null, 544), [
1395
1391
  [Wt, t.value]
1396
1392
  ]),
1397
1393
  z("span", null, ge(e.column.label), 1)
1398
1394
  ])) : e.column.filterType === "select" ? oe((C(), k("select", {
1399
1395
  key: 3,
1400
- "onUpdate:modelValue": s[6] || (s[6] = (u) => t.value = u),
1396
+ "onUpdate:modelValue": c[6] || (c[6] = (f) => t.value = f),
1401
1397
  class: "filter-select",
1402
- onChange: s[7] || (s[7] = (u) => i(t.value))
1398
+ onChange: c[7] || (c[7] = (f) => a(t.value))
1403
1399
  }, [
1404
- s[15] || (s[15] = z("option", { value: "" }, "All", -1)),
1405
- (C(!0), k(ie, null, ye(d(e.column), (u) => (C(), k("option", {
1406
- key: u.value || u,
1407
- value: u.value || u
1408
- }, ge(u.label || u), 9, oo))), 128))
1400
+ c[15] || (c[15] = z("option", { value: "" }, "All", -1)),
1401
+ (C(!0), k(ie, null, ye(s(e.column), (f) => (C(), k("option", {
1402
+ key: f.value || f,
1403
+ value: f.value || f
1404
+ }, ge(f.label || f), 9, oo))), 128))
1409
1405
  ], 544)), [
1410
1406
  [Xt, t.value]
1411
1407
  ]) : e.column.filterType === "date" ? oe((C(), k("input", {
1412
1408
  key: 4,
1413
- "onUpdate:modelValue": s[8] || (s[8] = (u) => t.value = u),
1409
+ "onUpdate:modelValue": c[8] || (c[8] = (f) => t.value = f),
1414
1410
  type: "date",
1415
1411
  class: "filter-input",
1416
- onChange: s[9] || (s[9] = (u) => i(t.value))
1412
+ onChange: c[9] || (c[9] = (f) => a(t.value))
1417
1413
  }, null, 544)), [
1418
1414
  [ke, t.value]
1419
1415
  ]) : e.column.filterType === "dateRange" ? (C(), k("div", lo, [
1420
1416
  oe(z("input", {
1421
- "onUpdate:modelValue": s[10] || (s[10] = (u) => a.startValue = u),
1417
+ "onUpdate:modelValue": c[10] || (c[10] = (f) => l.startValue = f),
1422
1418
  type: "date",
1423
1419
  class: "filter-input",
1424
- onChange: s[11] || (s[11] = (u) => o("start", a.startValue))
1420
+ onChange: c[11] || (c[11] = (f) => n("start", l.startValue))
1425
1421
  }, null, 544), [
1426
- [ke, a.startValue]
1422
+ [ke, l.startValue]
1427
1423
  ]),
1428
- s[16] || (s[16] = z("span", { class: "date-separator" }, "-", -1)),
1424
+ c[16] || (c[16] = z("span", { class: "date-separator" }, "-", -1)),
1429
1425
  oe(z("input", {
1430
- "onUpdate:modelValue": s[12] || (s[12] = (u) => a.endValue = u),
1426
+ "onUpdate:modelValue": c[12] || (c[12] = (f) => l.endValue = f),
1431
1427
  type: "date",
1432
1428
  class: "filter-input",
1433
- onChange: s[13] || (s[13] = (u) => o("end", a.endValue))
1429
+ onChange: c[13] || (c[13] = (f) => n("end", l.endValue))
1434
1430
  }, null, 544), [
1435
- [ke, a.endValue]
1431
+ [ke, l.endValue]
1436
1432
  ])
1437
1433
  ])) : e.column.filterType === "component" && e.column.filterComponent ? (C(), ve(Ee(e.column.filterComponent), {
1438
1434
  key: 6,
@@ -1440,11 +1436,11 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1440
1436
  column: e.column,
1441
1437
  colIndex: e.colIndex,
1442
1438
  store: e.store,
1443
- "onUpdate:value": s[14] || (s[14] = (u) => i(u))
1439
+ "onUpdate:value": c[14] || (c[14] = (f) => a(f))
1444
1440
  }, null, 40, ["value", "column", "colIndex", "store"])) : q("", !0),
1445
- c.value ? (C(), k("button", {
1441
+ r.value ? (C(), k("button", {
1446
1442
  key: 7,
1447
- onClick: n,
1443
+ onClick: o,
1448
1444
  class: "clear-btn",
1449
1445
  title: "Clear"
1450
1446
  }, "×")) : q("", !0)
@@ -1463,14 +1459,14 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1463
1459
  store: {}
1464
1460
  },
1465
1461
  setup(e) {
1466
- const t = A(() => e.columns.filter((c) => c.filterable)), a = (c) => e.store.sortByColumn(c), d = (c) => {
1467
- for (const i of c) {
1468
- if (i.borderBoxSize.length === 0) continue;
1469
- const n = i.borderBoxSize[0].inlineSize, l = Number(i.target.dataset.colindex), s = e.store.columns[l]?.width;
1470
- typeof s == "number" && s !== n && e.store.resizeColumn(l, n);
1462
+ const t = A(() => e.columns.filter((r) => r.filterable)), l = (r) => e.store.sortByColumn(r), s = (r) => {
1463
+ for (const a of r) {
1464
+ if (a.borderBoxSize.length === 0) continue;
1465
+ const o = a.borderBoxSize[0].inlineSize, u = Number(a.target.dataset.colindex), c = e.store.columns[u]?.width;
1466
+ typeof c == "number" && c !== o && e.store.resizeColumn(u, o);
1471
1467
  }
1472
1468
  };
1473
- return (c, i) => e.columns.length ? (C(), k("thead", ro, [
1469
+ return (r, a) => e.columns.length ? (C(), k("thead", ro, [
1474
1470
  z("tr", io, [
1475
1471
  e.store.zeroColumn ? (C(), k("th", {
1476
1472
  key: 0,
@@ -1481,19 +1477,19 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1481
1477
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1482
1478
  ], "list-index"])
1483
1479
  }, null, 2)) : q("", !0),
1484
- (C(!0), k(ie, null, ye(e.columns, (o, n) => oe((C(), k("th", {
1485
- key: o.name,
1486
- "data-colindex": n,
1480
+ (C(!0), k(ie, null, ye(e.columns, (n, o) => oe((C(), k("th", {
1481
+ key: n.name,
1482
+ "data-colindex": o,
1487
1483
  tabindex: "-1",
1488
- style: re(e.store.getHeaderCellStyle(o)),
1489
- class: ee(`${o.pinned ? "sticky-column" : ""} ${o.sortable === !1 ? "" : "cursor-pointer"}`),
1490
- onClick: (l) => o.sortable !== !1 ? a(n) : void 0
1484
+ style: re(e.store.getHeaderCellStyle(n)),
1485
+ class: ee(`${n.pinned ? "sticky-column" : ""} ${n.sortable === !1 ? "" : "cursor-pointer"}`),
1486
+ onClick: (u) => n.sortable !== !1 ? l(o) : void 0
1491
1487
  }, [
1492
- te(c.$slots, "default", {}, () => [
1493
- Gt(ge(o.label || String.fromCharCode(n + 97).toUpperCase()), 1)
1488
+ te(r.$slots, "default", {}, () => [
1489
+ Gt(ge(n.label || String.fromCharCode(o + 97).toUpperCase()), 1)
1494
1490
  ])
1495
1491
  ], 14, uo)), [
1496
- [R(Un), d]
1492
+ [R(Un), s]
1497
1493
  ])), 128))
1498
1494
  ]),
1499
1495
  t.value.length > 0 ? (C(), k("tr", co, [
@@ -1505,15 +1501,15 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1505
1501
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
1506
1502
  ], "list-index"])
1507
1503
  }, null, 2)) : q("", !0),
1508
- (C(!0), k(ie, null, ye(e.columns, (o, n) => (C(), k("th", {
1509
- key: `filter-${o.name}`,
1510
- class: ee(`${o.pinned ? "sticky-column" : ""}`),
1511
- style: re(e.store.getHeaderCellStyle(o))
1504
+ (C(!0), k(ie, null, ye(e.columns, (n, o) => (C(), k("th", {
1505
+ key: `filter-${n.name}`,
1506
+ class: ee(`${n.pinned ? "sticky-column" : ""}`),
1507
+ style: re(e.store.getHeaderCellStyle(n))
1512
1508
  }, [
1513
- o.filterable ? (C(), ve(so, {
1509
+ n.filterable ? (C(), ve(so, {
1514
1510
  key: 0,
1515
- column: o,
1516
- "col-index": n,
1511
+ column: n,
1512
+ "col-index": o,
1517
1513
  store: e.store
1518
1514
  }, null, 8, ["column", "col-index", "store"])) : q("", !0)
1519
1515
  ], 6))), 128))
@@ -1526,49 +1522,49 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1526
1522
  store: {}
1527
1523
  },
1528
1524
  setup(e) {
1529
- const t = le("amodal"), { width: a, height: d } = xe(t), c = A(() => {
1525
+ const t = le("amodal"), { width: l, height: s } = xe(t), r = A(() => {
1530
1526
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return;
1531
- const i = e.store.modal.cell?.closest("table");
1532
- if (!i) return {};
1533
- const o = i.offsetHeight || 0, n = i.offsetWidth || 0;
1534
- let l = e.store.modal.cell?.offsetTop || 0;
1535
- const s = i.querySelector("thead")?.offsetHeight || 0;
1536
- l += s, l = l + d.value < o ? l : l - (d.value + e.store.modal.height);
1537
- let u = e.store.modal.cell?.offsetLeft || 0;
1538
- return u = u + a.value <= n ? u : u - (a.value - e.store.modal.width), {
1539
- left: `${u}px`,
1540
- top: `${l}px`
1527
+ const a = e.store.modal.cell?.closest("table");
1528
+ if (!a) return {};
1529
+ const n = a.offsetHeight || 0, o = a.offsetWidth || 0;
1530
+ let u = e.store.modal.cell?.offsetTop || 0;
1531
+ const c = a.querySelector("thead")?.offsetHeight || 0;
1532
+ u += c, u = u + s.value < n ? u : u - (s.value + e.store.modal.height);
1533
+ let f = e.store.modal.cell?.offsetLeft || 0;
1534
+ return f = f + l.value <= o ? f : f - (l.value - e.store.modal.width), {
1535
+ left: `${f}px`,
1536
+ top: `${u}px`
1541
1537
  };
1542
1538
  });
1543
- return (i, o) => (C(), k("div", {
1539
+ return (a, n) => (C(), k("div", {
1544
1540
  ref: "amodal",
1545
1541
  class: "amodal",
1546
1542
  tabindex: "-1",
1547
- style: re(c.value),
1548
- onClick: o[0] || (o[0] = Be(() => {
1543
+ style: re(r.value),
1544
+ onClick: n[0] || (n[0] = Be(() => {
1549
1545
  }, ["stop"])),
1550
- onInput: o[1] || (o[1] = Be(() => {
1546
+ onInput: n[1] || (n[1] = Be(() => {
1551
1547
  }, ["stop"]))
1552
1548
  }, [
1553
- te(i.$slots, "default")
1549
+ te(a.$slots, "default")
1554
1550
  ], 36));
1555
1551
  }
1556
1552
  }), fo = (e) => {
1557
1553
  const t = e.id || $n();
1558
1554
  return Yt(`table-${t}`, () => {
1559
- const d = () => {
1560
- const r = [Object.assign({}, { rowModified: !1 })], f = /* @__PURE__ */ new Set();
1561
- for (let p = 0; p < i.value.length; p++) {
1562
- const S = i.value[p];
1563
- S.parent !== null && S.parent !== void 0 && f.add(S.parent);
1555
+ const s = () => {
1556
+ const i = [Object.assign({}, { rowModified: !1 })], d = /* @__PURE__ */ new Set();
1557
+ for (let p = 0; p < a.value.length; p++) {
1558
+ const S = a.value[p];
1559
+ S.parent !== null && S.parent !== void 0 && d.add(S.parent);
1564
1560
  }
1565
- const w = (p) => i.value[p]?.gantt !== void 0, T = (p) => {
1566
- for (let S = 0; S < i.value.length; S++)
1567
- if (i.value[S].parent === p && (w(S) || T(S)))
1561
+ const w = (p) => a.value[p]?.gantt !== void 0, T = (p) => {
1562
+ for (let S = 0; S < a.value.length; S++)
1563
+ if (a.value[S].parent === p && (w(S) || T(S)))
1568
1564
  return !0;
1569
1565
  return !1;
1570
1566
  }, N = (p) => {
1571
- const S = o.value, U = S.view === "tree" || S.view === "tree-gantt" ? S.defaultTreeExpansion : void 0;
1567
+ const S = n.value, U = S.view === "tree" || S.view === "tree-gantt" ? S.defaultTreeExpansion : void 0;
1572
1568
  if (!U) return !0;
1573
1569
  switch (U) {
1574
1570
  case "root":
@@ -1583,9 +1579,9 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1583
1579
  return !0;
1584
1580
  }
1585
1581
  };
1586
- for (let p = 0; p < i.value.length; p++) {
1587
- const S = i.value[p], U = S.parent === null || S.parent === void 0, ae = f.has(p);
1588
- r[p] = {
1582
+ for (let p = 0; p < a.value.length; p++) {
1583
+ const S = a.value[p], U = S.parent === null || S.parent === void 0, ae = d.has(p);
1584
+ i[p] = {
1589
1585
  childrenOpen: N(p),
1590
1586
  expanded: !1,
1591
1587
  indent: S.indent || 0,
@@ -1597,152 +1593,152 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1597
1593
  parent: S.parent
1598
1594
  };
1599
1595
  }
1600
- return r;
1601
- }, c = B(e.columns), i = B(e.rows), o = B(e.config || {}), n = B({}), l = B({}), s = A(() => {
1602
- const r = {};
1603
- for (const [f, w] of c.value.entries())
1604
- for (const [T, N] of i.value.entries())
1605
- r[`${f}:${T}`] = N[w.name];
1606
- return r;
1607
- }), u = A({
1596
+ return i;
1597
+ }, r = B(e.columns), a = B(e.rows), n = B(e.config || {}), o = B({}), u = B({}), c = A(() => {
1598
+ const i = {};
1599
+ for (const [d, w] of r.value.entries())
1600
+ for (const [T, N] of a.value.entries())
1601
+ i[`${d}:${T}`] = N[w.name];
1602
+ return i;
1603
+ }), f = A({
1608
1604
  get: () => {
1609
- const r = d();
1610
- for (let f = 0; f < r.length; f++)
1611
- n.value[f] && (r[f].rowModified = n.value[f]), l.value[f] && (l.value[f].childrenOpen !== void 0 && (r[f].childrenOpen = l.value[f].childrenOpen), l.value[f].expanded !== void 0 && (r[f].expanded = l.value[f].expanded));
1605
+ const i = s();
1606
+ for (let d = 0; d < i.length; d++)
1607
+ o.value[d] && (i[d].rowModified = o.value[d]), u.value[d] && (u.value[d].childrenOpen !== void 0 && (i[d].childrenOpen = u.value[d].childrenOpen), u.value[d].expanded !== void 0 && (i[d].expanded = u.value[d].expanded));
1612
1608
  if (L.value) {
1613
- const f = (w, T) => {
1609
+ const d = (w, T) => {
1614
1610
  const N = T[w];
1615
1611
  if (N.isRoot || N.parent === null || N.parent === void 0)
1616
1612
  return !0;
1617
1613
  const p = N.parent;
1618
- return p < 0 || p >= T.length ? !1 : (T[p].childrenOpen || !1) && f(p, T);
1614
+ return p < 0 || p >= T.length ? !1 : (T[p].childrenOpen || !1) && d(p, T);
1619
1615
  };
1620
- for (let w = 0; w < r.length; w++)
1621
- r[w].isRoot || (r[w].open = f(w, r));
1616
+ for (let w = 0; w < i.length; w++)
1617
+ i[w].isRoot || (i[w].open = d(w, i));
1622
1618
  }
1623
- return r;
1619
+ return i;
1624
1620
  },
1625
- set: (r) => {
1626
- JSON.stringify(r) !== JSON.stringify(u.value) && (u.value = r);
1621
+ set: (i) => {
1622
+ JSON.stringify(i) !== JSON.stringify(f.value) && (f.value = i);
1627
1623
  }
1628
1624
  }), h = B(e.modal || { visible: !1 }), $ = B({}), g = B([]), I = B([]), x = B([]), v = B({
1629
1625
  column: null,
1630
1626
  direction: null
1631
- }), m = B({}), b = A(() => c.value.some((r) => r.pinned)), V = A(() => o.value.view === "gantt" || o.value.view === "tree-gantt"), L = A(() => o.value.view === "tree" || o.value.view === "tree-gantt"), J = A(() => {
1632
- const r = o.value;
1633
- return r.view === "gantt" || r.view === "tree-gantt" ? r.dependencyGraph !== !1 : !0;
1634
- }), O = A(() => `${Math.ceil(i.value.length / 100 + 1)}ch`), y = A(
1635
- () => o.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(o.value.view) : !1
1627
+ }), m = B({}), b = A(() => r.value.some((i) => i.pinned)), V = A(() => n.value.view === "gantt" || n.value.view === "tree-gantt"), L = A(() => n.value.view === "tree" || n.value.view === "tree-gantt"), J = A(() => {
1628
+ const i = n.value;
1629
+ return i.view === "gantt" || i.view === "tree-gantt" ? i.dependencyGraph !== !1 : !0;
1630
+ }), O = A(() => `${Math.ceil(a.value.length / 100 + 1)}ch`), y = A(
1631
+ () => n.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(n.value.view) : !1
1636
1632
  ), D = A(() => {
1637
- let r = i.value.map((f, w) => ({
1638
- ...f,
1633
+ let i = a.value.map((d, w) => ({
1634
+ ...d,
1639
1635
  originalIndex: w
1640
1636
  }));
1641
- if (Object.entries(m.value).forEach(([f, w]) => {
1642
- const T = parseInt(f), N = c.value[T];
1643
- !N || !(w.value || w.startValue || w.endValue || N.filterType === "checkbox" && w.value !== void 0) || (r = r.filter((S) => {
1637
+ if (Object.entries(m.value).forEach(([d, w]) => {
1638
+ const T = parseInt(d), N = r.value[T];
1639
+ !N || !(w.value || w.startValue || w.endValue || N.filterType === "checkbox" && w.value !== void 0) || (i = i.filter((S) => {
1644
1640
  const U = S[N.name];
1645
1641
  return j(U, w, N);
1646
1642
  }));
1647
1643
  }), v.value.column !== null && v.value.direction) {
1648
- const f = c.value[v.value.column], w = v.value.direction;
1649
- r.sort((T, N) => {
1650
- let p = T[f.name], S = N[f.name];
1644
+ const d = r.value[v.value.column], w = v.value.direction;
1645
+ i.sort((T, N) => {
1646
+ let p = T[d.name], S = N[d.name];
1651
1647
  p == null && (p = ""), S == null && (S = "");
1652
1648
  const U = Number(p), ae = Number(S);
1653
1649
  if (!isNaN(U) && !isNaN(ae) && p !== "" && S !== "")
1654
1650
  return w === "asc" ? U - ae : ae - U;
1655
1651
  {
1656
- const ct = String(p).toLowerCase(), dt = String(S).toLowerCase();
1657
- return w === "asc" ? ct.localeCompare(dt) : dt.localeCompare(ct);
1652
+ const ut = String(p).toLowerCase(), ct = String(S).toLowerCase();
1653
+ return w === "asc" ? ut.localeCompare(ct) : ct.localeCompare(ut);
1658
1654
  }
1659
1655
  });
1660
1656
  }
1661
- return r;
1662
- }), G = (r, f) => s.value[`${r}:${f}`], W = (r, f, w) => {
1663
- const T = `${r}:${f}`, N = c.value[r];
1664
- s.value[T] !== w && (n.value[f] = !0), s.value[T] = w, i.value[f] = {
1665
- ...i.value[f],
1657
+ return i;
1658
+ }), G = (i, d) => c.value[`${i}:${d}`], W = (i, d, w) => {
1659
+ const T = `${i}:${d}`, N = r.value[i];
1660
+ c.value[T] !== w && (o.value[d] = !0), c.value[T] = w, a.value[d] = {
1661
+ ...a.value[d],
1666
1662
  [N.name]: w
1667
1663
  };
1668
- }, H = (r) => {
1669
- i.value = r;
1670
- }, _ = (r, f, w) => {
1671
- const T = `${r}:${f}`;
1672
- s.value[T] !== w && (n.value[f] = !0, $.value[T] = w);
1673
- }, fe = (r) => {
1674
- const f = c.value.indexOf(r) === c.value.length - 1, w = o.value.fullWidth ? r.resizable && !f : r.resizable;
1664
+ }, H = (i) => {
1665
+ a.value = i;
1666
+ }, _ = (i, d, w) => {
1667
+ const T = `${i}:${d}`;
1668
+ c.value[T] !== w && (o.value[d] = !0, $.value[T] = w);
1669
+ }, fe = (i) => {
1670
+ const d = r.value.indexOf(i) === r.value.length - 1, w = n.value.fullWidth ? i.resizable && !d : i.resizable;
1675
1671
  return {
1676
- width: r.width || "40ch",
1677
- textAlign: r.align || "center",
1672
+ width: i.width || "40ch",
1673
+ textAlign: i.align || "center",
1678
1674
  ...w && {
1679
1675
  resize: "horizontal",
1680
1676
  overflow: "hidden",
1681
1677
  whiteSpace: "nowrap"
1682
1678
  }
1683
1679
  };
1684
- }, Re = (r, f) => {
1685
- if (r < 0 || r >= c.value.length) return;
1686
- const T = Math.max(f, 40);
1687
- c.value[r] = {
1688
- ...c.value[r],
1680
+ }, Re = (i, d) => {
1681
+ if (i < 0 || i >= r.value.length) return;
1682
+ const T = Math.max(d, 40);
1683
+ r.value[i] = {
1684
+ ...r.value[i],
1689
1685
  width: `${T}px`
1690
1686
  };
1691
- }, Ie = (r) => {
1692
- const f = i.value[r];
1693
- return V.value && f.gantt !== void 0;
1694
- }, We = (r) => !L.value || u.value[r].isRoot || u.value[r].open, Xe = (r) => !L.value && o.value.view !== "list-expansion" ? "" : L.value && (u.value[r].isRoot || u.value[r].isParent) ? u.value[r].childrenOpen ? "▼" : "►" : o.value.view === "list-expansion" ? u.value[r].expanded ? "▼" : "►" : "", Ge = (r) => {
1687
+ }, Ie = (i) => {
1688
+ const d = a.value[i];
1689
+ return V.value && d.gantt !== void 0;
1690
+ }, Fe = (i) => !L.value || f.value[i].isRoot || f.value[i].open, We = (i) => !L.value && n.value.view !== "list-expansion" ? "" : L.value && (f.value[i].isRoot || f.value[i].isParent) ? f.value[i].childrenOpen ? "▼" : "►" : n.value.view === "list-expansion" ? f.value[i].expanded ? "▼" : "►" : "", Xe = (i) => {
1695
1691
  if (L.value) {
1696
- const f = l.value[r] || {}, T = !(f.childrenOpen ?? u.value[r].childrenOpen);
1697
- l.value[r] = {
1698
- ...f,
1692
+ const d = u.value[i] || {}, T = !(d.childrenOpen ?? f.value[i].childrenOpen);
1693
+ u.value[i] = {
1694
+ ...d,
1699
1695
  childrenOpen: T
1700
- }, T || De(r);
1701
- } else if (o.value.view === "list-expansion") {
1702
- const f = l.value[r] || {}, w = f.expanded ?? u.value[r].expanded;
1703
- l.value[r] = {
1704
- ...f,
1696
+ }, T || De(i);
1697
+ } else if (n.value.view === "list-expansion") {
1698
+ const d = u.value[i] || {}, w = d.expanded ?? f.value[i].expanded;
1699
+ u.value[i] = {
1700
+ ...d,
1705
1701
  expanded: !w
1706
1702
  };
1707
1703
  }
1708
- }, De = (r) => {
1709
- for (let f = 0; f < i.value.length; f++)
1710
- if (u.value[f].parent === r) {
1711
- const w = l.value[f] || {};
1712
- l.value[f] = {
1704
+ }, De = (i) => {
1705
+ for (let d = 0; d < a.value.length; d++)
1706
+ if (f.value[d].parent === i) {
1707
+ const w = u.value[d] || {};
1708
+ u.value[d] = {
1713
1709
  ...w,
1714
1710
  childrenOpen: !1
1715
- }, De(f);
1711
+ }, De(d);
1716
1712
  }
1717
- }, Ye = (r, f) => {
1718
- const w = G(r, f);
1719
- return Me(r, f, w);
1720
- }, Me = (r, f, w) => {
1721
- const T = c.value[r], N = i.value[f], p = T.format;
1722
- return p ? typeof p == "function" ? p(w, { table: s.value, row: N, column: T }) : typeof p == "string" ? Function(`"use strict";return (${p})`)()(w, { table: s.value, row: N, column: T }) : w : w;
1723
- }, Ue = (r) => {
1724
- r.target instanceof Node && h.value.parent?.contains(r.target) || h.value.visible && (h.value.visible = !1);
1725
- }, je = (r, f) => f && r === 0 && f > 0 ? `${f}ch` : "inherit", qe = (r) => {
1726
- const f = i.value[r.rowIndex]?.gantt;
1727
- f && (r.type === "resize" ? r.edge === "start" ? (f.startIndex = r.newStart, f.endIndex = r.end, f.colspan = f.endIndex - f.startIndex) : r.edge === "end" && (f.startIndex = r.start, f.endIndex = r.newEnd, f.colspan = f.endIndex - f.startIndex) : r.type === "bar" && (f.startIndex = r.newStart, f.endIndex = r.newEnd, f.colspan = f.endIndex - f.startIndex));
1728
- }, Te = (r) => {
1729
- const f = g.value.findIndex((w) => w.id === r.id);
1730
- f >= 0 ? g.value[f] = r : g.value.push(r);
1731
- }, Ae = (r) => {
1732
- const f = g.value.findIndex((w) => w.id === r);
1733
- f >= 0 && g.value.splice(f, 1);
1734
- }, Oe = (r) => {
1735
- const f = I.value.findIndex((w) => w.id === r.id);
1736
- f >= 0 ? I.value[f] = r : I.value.push(r);
1737
- }, Pe = (r) => {
1738
- const f = I.value.findIndex((w) => w.id === r);
1739
- f >= 0 && I.value.splice(f, 1);
1740
- }, E = (r, f, w) => {
1741
- const T = I.value.find((S) => S.id === r), N = I.value.find((S) => S.id === f);
1713
+ }, Ge = (i, d) => {
1714
+ const w = G(i, d);
1715
+ return Me(i, d, w);
1716
+ }, Me = (i, d, w) => {
1717
+ const T = r.value[i], N = a.value[d], p = T.format;
1718
+ return p ? typeof p == "function" ? p(w, { table: c.value, row: N, column: T }) : typeof p == "string" ? Function(`"use strict";return (${p})`)()(w, { table: c.value, row: N, column: T }) : w : w;
1719
+ }, Ye = (i) => {
1720
+ i.target instanceof Node && h.value.parent?.contains(i.target) || h.value.visible && (h.value.visible = !1);
1721
+ }, Ue = (i, d) => d && i === 0 && d > 0 ? `${d}ch` : "inherit", je = (i) => {
1722
+ const d = a.value[i.rowIndex]?.gantt;
1723
+ d && (i.type === "resize" ? i.edge === "start" ? (d.startIndex = i.newStart, d.endIndex = i.end, d.colspan = d.endIndex - d.startIndex) : i.edge === "end" && (d.startIndex = i.start, d.endIndex = i.newEnd, d.colspan = d.endIndex - d.startIndex) : i.type === "bar" && (d.startIndex = i.newStart, d.endIndex = i.newEnd, d.colspan = d.endIndex - d.startIndex));
1724
+ }, Te = (i) => {
1725
+ const d = g.value.findIndex((w) => w.id === i.id);
1726
+ d >= 0 ? g.value[d] = i : g.value.push(i);
1727
+ }, Ae = (i) => {
1728
+ const d = g.value.findIndex((w) => w.id === i);
1729
+ d >= 0 && g.value.splice(d, 1);
1730
+ }, Oe = (i) => {
1731
+ const d = I.value.findIndex((w) => w.id === i.id);
1732
+ d >= 0 ? I.value[d] = i : I.value.push(i);
1733
+ }, Pe = (i) => {
1734
+ const d = I.value.findIndex((w) => w.id === i);
1735
+ d >= 0 && I.value.splice(d, 1);
1736
+ }, E = (i, d, w) => {
1737
+ const T = I.value.find((S) => S.id === i), N = I.value.find((S) => S.id === d);
1742
1738
  if (!T || !N)
1743
1739
  return console.warn("Cannot create connection: handle not found"), null;
1744
1740
  const p = {
1745
- id: `connection-${r}-${f}`,
1741
+ id: `connection-${i}-${d}`,
1746
1742
  from: {
1747
1743
  barId: T.barId,
1748
1744
  side: T.side
@@ -1755,48 +1751,48 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1755
1751
  label: w?.label
1756
1752
  };
1757
1753
  return x.value.push(p), p;
1758
- }, M = (r) => {
1759
- const f = x.value.findIndex((w) => w.id === r);
1760
- return f >= 0 ? (x.value.splice(f, 1), !0) : !1;
1761
- }, X = (r) => x.value.filter((f) => f.from.barId === r || f.to.barId === r), F = (r) => I.value.filter((f) => f.barId === r), Y = (r) => {
1762
- if (c.value[r].sortable === !1) return;
1754
+ }, M = (i) => {
1755
+ const d = x.value.findIndex((w) => w.id === i);
1756
+ return d >= 0 ? (x.value.splice(d, 1), !0) : !1;
1757
+ }, X = (i) => x.value.filter((d) => d.from.barId === i || d.to.barId === i), F = (i) => I.value.filter((d) => d.barId === i), Y = (i) => {
1758
+ if (r.value[i].sortable === !1) return;
1763
1759
  let w;
1764
- v.value.column === r && v.value.direction === "asc" ? w = "desc" : w = "asc", v.value.column = r, v.value.direction = w;
1765
- }, j = (r, f, w) => {
1766
- const T = w.filterType || "text", N = f.value;
1760
+ v.value.column === i && v.value.direction === "asc" ? w = "desc" : w = "asc", v.value.column = i, v.value.direction = w;
1761
+ }, j = (i, d, w) => {
1762
+ const T = w.filterType || "text", N = d.value;
1767
1763
  if (!N && T !== "dateRange" && T !== "checkbox") return !0;
1768
1764
  switch (T) {
1769
1765
  case "text": {
1770
1766
  let p = "";
1771
- return typeof r == "object" && r !== null ? p = Object.values(r).join(" ") : p = String(r || ""), p.toLowerCase().includes(String(N).toLowerCase());
1767
+ return typeof i == "object" && i !== null ? p = Object.values(i).join(" ") : p = String(i || ""), p.toLowerCase().includes(String(N).toLowerCase());
1772
1768
  }
1773
1769
  case "number": {
1774
- const p = Number(r), S = Number(N);
1770
+ const p = Number(i), S = Number(N);
1775
1771
  return !isNaN(p) && !isNaN(S) && p === S;
1776
1772
  }
1777
1773
  case "select":
1778
- return r === N;
1774
+ return i === N;
1779
1775
  case "checkbox":
1780
- return N === !0 ? !!r : !0;
1776
+ return N === !0 ? !!i : !0;
1781
1777
  case "date": {
1782
1778
  let p;
1783
- if (typeof r == "number") {
1784
- const U = new Date(r), ae = (/* @__PURE__ */ new Date()).getFullYear();
1779
+ if (typeof i == "number") {
1780
+ const U = new Date(i), ae = (/* @__PURE__ */ new Date()).getFullYear();
1785
1781
  p = new Date(ae, U.getMonth(), U.getDate());
1786
1782
  } else
1787
- p = new Date(String(r));
1783
+ p = new Date(String(i));
1788
1784
  const S = new Date(String(N));
1789
1785
  return p.toDateString() === S.toDateString();
1790
1786
  }
1791
1787
  case "dateRange": {
1792
- const p = f.startValue, S = f.endValue;
1788
+ const p = d.startValue, S = d.endValue;
1793
1789
  if (!p && !S) return !0;
1794
1790
  let U;
1795
- if (typeof r == "number") {
1796
- const ae = new Date(r), ut = (/* @__PURE__ */ new Date()).getFullYear();
1797
- U = new Date(ut, ae.getMonth(), ae.getDate());
1791
+ if (typeof i == "number") {
1792
+ const ae = new Date(i), it = (/* @__PURE__ */ new Date()).getFullYear();
1793
+ U = new Date(it, ae.getMonth(), ae.getDate());
1798
1794
  } else
1799
- U = new Date(String(r));
1795
+ U = new Date(String(i));
1800
1796
  return !(p && U < new Date(String(p)) || S && U > new Date(String(S)));
1801
1797
  }
1802
1798
  default:
@@ -1805,17 +1801,17 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1805
1801
  };
1806
1802
  return {
1807
1803
  // state
1808
- columns: c,
1809
- config: o,
1804
+ columns: r,
1805
+ config: n,
1810
1806
  connectionHandles: I,
1811
1807
  connectionPaths: x,
1812
- display: u,
1808
+ display: f,
1813
1809
  filterState: m,
1814
1810
  ganttBars: g,
1815
1811
  modal: h,
1816
- rows: i,
1812
+ rows: a,
1817
1813
  sortState: v,
1818
- table: s,
1814
+ table: c,
1819
1815
  updates: $,
1820
1816
  // getters
1821
1817
  filteredRows: D,
@@ -1826,35 +1822,35 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1826
1822
  numberedRowWidth: O,
1827
1823
  zeroColumn: y,
1828
1824
  // actions
1829
- clearFilter: (r) => {
1830
- delete m.value[r];
1825
+ clearFilter: (i) => {
1826
+ delete m.value[i];
1831
1827
  },
1832
- closeModal: Ue,
1828
+ closeModal: Ye,
1833
1829
  createConnection: E,
1834
1830
  deleteConnection: M,
1835
1831
  getCellData: G,
1836
- getCellDisplayValue: Ye,
1832
+ getCellDisplayValue: Ge,
1837
1833
  getConnectionsForBar: X,
1838
1834
  getFormattedValue: Me,
1839
1835
  getHandlesForBar: F,
1840
1836
  getHeaderCellStyle: fe,
1841
- getIndent: je,
1842
- getRowExpandSymbol: Xe,
1837
+ getIndent: Ue,
1838
+ getRowExpandSymbol: We,
1843
1839
  isRowGantt: Ie,
1844
- isRowVisible: We,
1840
+ isRowVisible: Fe,
1845
1841
  registerConnectionHandle: Oe,
1846
1842
  registerGanttBar: Te,
1847
1843
  resizeColumn: Re,
1848
1844
  setCellData: W,
1849
1845
  setCellText: _,
1850
- setFilter: (r, f) => {
1851
- !f.value && !f.startValue && !f.endValue ? delete m.value[r] : m.value[r] = f;
1846
+ setFilter: (i, d) => {
1847
+ !d.value && !d.startValue && !d.endValue ? delete m.value[i] : m.value[i] = d;
1852
1848
  },
1853
1849
  sortByColumn: Y,
1854
- toggleRowExpand: Ge,
1850
+ toggleRowExpand: Xe,
1855
1851
  unregisterConnectionHandle: Pe,
1856
1852
  unregisterGanttBar: Ae,
1857
- updateGanttBar: qe,
1853
+ updateGanttBar: je,
1858
1854
  updateRows: H
1859
1855
  };
1860
1856
  })();
@@ -1863,7 +1859,7 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1863
1859
  style: { position: "relative" }
1864
1860
  }, mo = /* @__PURE__ */ ue({
1865
1861
  __name: "ATable",
1866
- props: /* @__PURE__ */ ft({
1862
+ props: /* @__PURE__ */ dt({
1867
1863
  id: { default: "" },
1868
1864
  config: { default: () => new Object() }
1869
1865
  }, {
@@ -1872,41 +1868,41 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1872
1868
  columns: { required: !0 },
1873
1869
  columnsModifiers: {}
1874
1870
  }),
1875
- emits: /* @__PURE__ */ ft(["cellUpdate", "gantt:drag", "connection:event", "columns:update"], ["update:rows", "update:columns"]),
1876
- setup(e, { expose: t, emit: a }) {
1877
- const d = vt(e, "rows"), c = vt(e, "columns"), i = a, o = le("table"), n = fo({ columns: c.value, rows: d.value, id: e.id, config: e.config });
1878
- n.$onAction(({ name: g, store: I, args: x, after: v }) => {
1871
+ emits: /* @__PURE__ */ dt(["cellUpdate", "gantt:drag", "connection:event", "columns:update"], ["update:rows", "update:columns"]),
1872
+ setup(e, { expose: t, emit: l }) {
1873
+ const s = ft(e, "rows"), r = ft(e, "columns"), a = l, n = le("table"), o = fo({ columns: r.value, rows: s.value, id: e.id, config: e.config });
1874
+ o.$onAction(({ name: g, store: I, args: x, after: v }) => {
1879
1875
  if (g === "setCellData" || g === "setCellText") {
1880
1876
  const [m, b, V] = x, L = I.getCellData(m, b);
1881
1877
  v(() => {
1882
- d.value = [...I.rows], i("cellUpdate", { colIndex: m, rowIndex: b, newValue: V, oldValue: L });
1878
+ s.value = [...I.rows], a("cellUpdate", { colIndex: m, rowIndex: b, newValue: V, oldValue: L });
1883
1879
  });
1884
1880
  } else if (g === "updateGanttBar") {
1885
1881
  const [m] = x;
1886
1882
  let b = !1;
1887
1883
  m.type === "resize" ? b = m.oldColspan !== m.newColspan : m.type === "bar" && (b = m.oldStart !== m.newStart || m.oldEnd !== m.newEnd), b && v(() => {
1888
- i("gantt:drag", m);
1884
+ a("gantt:drag", m);
1889
1885
  });
1890
1886
  } else g === "resizeColumn" && v(() => {
1891
- c.value = [...I.columns], i("columns:update", [...I.columns]);
1887
+ r.value = [...I.columns], a("columns:update", [...I.columns]);
1892
1888
  });
1893
1889
  }), ne(
1894
- () => d.value,
1890
+ () => s.value,
1895
1891
  (g) => {
1896
- JSON.stringify(g) !== JSON.stringify(n.rows) && (n.rows = [...g]);
1892
+ JSON.stringify(g) !== JSON.stringify(o.rows) && (o.rows = [...g]);
1897
1893
  },
1898
1894
  { deep: !0 }
1899
1895
  ), ne(
1900
- c,
1896
+ r,
1901
1897
  (g) => {
1902
- JSON.stringify(g) !== JSON.stringify(n.columns) && (n.columns = [...g], i("columns:update", [...g]));
1898
+ JSON.stringify(g) !== JSON.stringify(o.columns) && (o.columns = [...g], a("columns:update", [...g]));
1903
1899
  },
1904
1900
  { deep: !0 }
1905
1901
  ), pe(() => {
1906
- c.value.some((g) => g.pinned) && (s(), n.isTreeView && Dt(o, s, { childList: !0, subtree: !0 }));
1902
+ r.value.some((g) => g.pinned) && (c(), o.isTreeView && Dt(n, c, { childList: !0, subtree: !0 }));
1907
1903
  });
1908
- const l = A(() => n.columns.filter((g) => g.pinned).length), s = () => {
1909
- const g = o.value, I = g?.rows[0], x = g?.rows[1], v = I ? Array.from(I.cells) : [];
1904
+ const u = A(() => o.columns.filter((g) => g.pinned).length), c = () => {
1905
+ const g = n.value, I = g?.rows[0], x = g?.rows[1], v = I ? Array.from(I.cells) : [];
1910
1906
  for (const [m, b] of v.entries()) {
1911
1907
  const V = x?.cells[m];
1912
1908
  V && (b.style.width = `${V.offsetWidth}px`);
@@ -1920,71 +1916,71 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1920
1916
  }
1921
1917
  };
1922
1918
  window.addEventListener("keydown", (g) => {
1923
- if (g.key === "Escape" && n.modal.visible) {
1924
- n.modal.visible = !1;
1925
- const I = n.modal.parent;
1926
- I && tt().then(() => {
1919
+ if (g.key === "Escape" && o.modal.visible) {
1920
+ o.modal.visible = !1;
1921
+ const I = o.modal.parent;
1922
+ I && et().then(() => {
1927
1923
  I.focus();
1928
1924
  });
1929
1925
  }
1930
1926
  });
1931
- const u = (g) => {
1932
- if (!g.gantt || l.value === 0)
1933
- return n.columns;
1927
+ const f = (g) => {
1928
+ if (!g.gantt || u.value === 0)
1929
+ return o.columns;
1934
1930
  const I = [];
1935
- for (let x = 0; x < l.value; x++) {
1936
- const v = { ...n.columns[x] };
1931
+ for (let x = 0; x < u.value; x++) {
1932
+ const v = { ...o.columns[x] };
1937
1933
  v.originalIndex = x, I.push(v);
1938
1934
  }
1939
1935
  return I.push({
1940
- ...n.columns[l.value],
1936
+ ...o.columns[u.value],
1941
1937
  isGantt: !0,
1942
- colspan: g.gantt?.colspan || n.columns.length - l.value,
1943
- originalIndex: l.value,
1938
+ colspan: g.gantt?.colspan || o.columns.length - u.value,
1939
+ originalIndex: u.value,
1944
1940
  width: "auto"
1945
1941
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
1946
1942
  }), I;
1947
1943
  }, h = (g) => {
1948
- i("connection:event", { type: "create", connection: g });
1944
+ a("connection:event", { type: "create", connection: g });
1949
1945
  }, $ = (g) => {
1950
- i("connection:event", { type: "delete", connection: g });
1946
+ a("connection:event", { type: "delete", connection: g });
1951
1947
  };
1952
1948
  return t({
1953
- store: n,
1954
- createConnection: n.createConnection,
1955
- deleteConnection: n.deleteConnection,
1956
- getConnectionsForBar: n.getConnectionsForBar,
1957
- getHandlesForBar: n.getHandlesForBar
1949
+ store: o,
1950
+ createConnection: o.createConnection,
1951
+ deleteConnection: o.deleteConnection,
1952
+ getConnectionsForBar: o.getConnectionsForBar,
1953
+ getHandlesForBar: o.getHandlesForBar
1958
1954
  }), (g, I) => (C(), k("div", vo, [
1959
1955
  oe((C(), k("table", {
1960
1956
  ref: "table",
1961
1957
  class: "atable",
1962
1958
  style: re({
1963
- width: R(n).config.fullWidth ? "100%" : "auto"
1959
+ width: R(o).config.fullWidth ? "100%" : "auto"
1964
1960
  })
1965
1961
  }, [
1966
- te(g.$slots, "header", { data: R(n) }, () => [
1967
- mt(Tt, {
1968
- columns: R(n).columns,
1969
- store: R(n)
1962
+ te(g.$slots, "header", { data: R(o) }, () => [
1963
+ vt(Tt, {
1964
+ columns: R(o).columns,
1965
+ store: R(o)
1970
1966
  }, null, 8, ["columns", "store"])
1971
1967
  ], !0),
1972
1968
  z("tbody", null, [
1973
- te(g.$slots, "body", { data: R(n) }, () => [
1974
- (C(!0), k(ie, null, ye(R(n).filteredRows, (x, v) => (C(), ve(Mt, {
1969
+ te(g.$slots, "body", { data: R(o) }, () => [
1970
+ (C(!0), k(ie, null, ye(R(o).filteredRows, (x, v) => (C(), ve(Mt, {
1975
1971
  key: `${x.originalIndex}-${v}`,
1976
1972
  row: x,
1977
1973
  rowIndex: x.originalIndex,
1978
- store: R(n)
1974
+ store: R(o)
1979
1975
  }, {
1980
- default: gt(() => [
1981
- (C(!0), k(ie, null, ye(u(x), (m, b) => (C(), k(ie, {
1976
+ default: mt(() => [
1977
+ (C(!0), k(ie, null, ye(f(x), (m, b) => (C(), k(ie, {
1982
1978
  key: m.name
1983
1979
  }, [
1984
1980
  m.isGantt ? (C(), ve(Ee(m.ganttComponent || "AGanttCell"), {
1985
1981
  key: 0,
1986
- store: R(n),
1987
- "columns-count": R(n).columns.length - l.value,
1982
+ store: R(o),
1983
+ "columns-count": R(o).columns.length - u.value,
1988
1984
  color: x.gantt?.color,
1989
1985
  start: x.gantt?.startIndex,
1990
1986
  end: x.gantt?.endIndex,
@@ -1995,18 +1991,18 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
1995
1991
  style: re({
1996
1992
  textAlign: m?.align || "center",
1997
1993
  minWidth: m?.width || "40ch",
1998
- width: R(n).config.fullWidth ? "auto" : null
1994
+ width: R(o).config.fullWidth ? "auto" : null
1999
1995
  }),
2000
1996
  "onConnection:create": h
2001
1997
  }, null, 40, ["store", "columns-count", "color", "start", "end", "colspan", "pinned", "rowIndex", "colIndex", "style"])) : (C(), ve(Ee(m.cellComponent || "ACell"), {
2002
1998
  key: 1,
2003
- store: R(n),
1999
+ store: R(o),
2004
2000
  pinned: m.pinned,
2005
2001
  rowIndex: x.originalIndex,
2006
2002
  colIndex: b,
2007
2003
  style: re({
2008
2004
  textAlign: m?.align || "center",
2009
- width: R(n).config.fullWidth ? "auto" : null
2005
+ width: R(o).config.fullWidth ? "auto" : null
2010
2006
  }),
2011
2007
  spellcheck: "false"
2012
2008
  }, null, 8, ["store", "pinned", "rowIndex", "colIndex", "style"]))
@@ -2016,28 +2012,28 @@ const qn = { class: "gantt-connection-overlay" }, Jn = {
2016
2012
  }, 1032, ["row", "rowIndex", "store"]))), 128))
2017
2013
  ], !0)
2018
2014
  ]),
2019
- te(g.$slots, "footer", { data: R(n) }, void 0, !0),
2020
- te(g.$slots, "modal", { data: R(n) }, () => [
2021
- oe(mt(At, { store: R(n) }, {
2022
- default: gt(() => [
2023
- (C(), ve(Ee(R(n).modal.component), nt({
2024
- key: `${R(n).modal.rowIndex}:${R(n).modal.colIndex}`,
2025
- "col-index": R(n).modal.colIndex,
2026
- "row-index": R(n).modal.rowIndex,
2027
- store: R(n)
2028
- }, R(n).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
2015
+ te(g.$slots, "footer", { data: R(o) }, void 0, !0),
2016
+ te(g.$slots, "modal", { data: R(o) }, () => [
2017
+ oe(vt(At, { store: R(o) }, {
2018
+ default: mt(() => [
2019
+ (C(), ve(Ee(R(o).modal.component), tt({
2020
+ key: `${R(o).modal.rowIndex}:${R(o).modal.colIndex}`,
2021
+ "col-index": R(o).modal.colIndex,
2022
+ "row-index": R(o).modal.rowIndex,
2023
+ store: R(o)
2024
+ }, R(o).modal.componentProps), null, 16, ["col-index", "row-index", "store"]))
2029
2025
  ]),
2030
2026
  _: 1
2031
2027
  }, 8, ["store"]), [
2032
- [$t, R(n).modal.visible]
2028
+ [Et, R(o).modal.visible]
2033
2029
  ])
2034
2030
  ], !0)
2035
2031
  ], 4)), [
2036
- [R(Yn), R(n).closeModal]
2032
+ [R(Yn), R(o).closeModal]
2037
2033
  ]),
2038
- R(n).isGanttView && R(n).isDependencyGraphEnabled ? (C(), ve(eo, {
2034
+ R(o).isGanttView && R(o).isDependencyGraphEnabled ? (C(), ve(eo, {
2039
2035
  key: 0,
2040
- store: R(n),
2036
+ store: R(o),
2041
2037
  "onConnection:delete": $
2042
2038
  }, null, 8, ["store"])) : q("", !0)
2043
2039
  ]));