@stonecrop/atable 0.15.0 → 0.16.1

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,111 +1,111 @@
1
- import { onMounted as Ie, ref as W, watch as ce, onBeforeUnmount as Nt, computed as T, shallowRef as re, toValue as H, watchEffect as Ft, getCurrentScope as Et, onScopeDispose as Tt, getCurrentInstance as lt, unref as P, nextTick as at, isRef as Wt, toRefs as zt, customRef as St, toRef as Xt, readonly as Gt, defineComponent as Ce, useTemplateRef as de, openBlock as b, createElementBlock as R, normalizeClass as ae, normalizeStyle as pe, createBlock as ve, resolveDynamicComponent as Ne, mergeProps as st, toDisplayString as ye, useCssVars as Ut, onUnmounted as jt, createElementVNode as z, withModifiers as $e, createCommentVNode as _, withDirectives as ue, Fragment as me, renderList as be, vShow as it, renderSlot as he, reactive as Yt, vModelText as Ze, vModelCheckbox as Jt, vModelSelect as qt, createTextVNode as Qt, useModel as gt, inject as Kt, createVNode as wt, withCtx as pt, mergeModels as xt } from "vue";
2
- import { defineStore as _t } from "pinia";
3
- import './assets/index.css';function $t(e, t) {
4
- return Et() ? (Tt(e, t), !0) : !1;
1
+ import { onMounted as Ie, ref as W, watch as ce, onBeforeUnmount as Wt, computed as S, shallowRef as re, toValue as H, watchEffect as zt, getCurrentScope as St, onScopeDispose as $t, getCurrentInstance as at, unref as P, nextTick as st, isRef as Xt, toRefs as Gt, customRef as It, toRef as jt, readonly as Ut, defineComponent as Ce, useTemplateRef as de, openBlock as b, createElementBlock as R, normalizeClass as ae, normalizeStyle as pe, createBlock as ve, resolveDynamicComponent as Ne, mergeProps as it, toDisplayString as ye, useCssVars as Yt, onUnmounted as qt, createElementVNode as z, withModifiers as $e, createCommentVNode as _, withDirectives as ue, Fragment as me, renderList as be, vShow as rt, renderSlot as he, reactive as Jt, vModelText as Ze, vModelCheckbox as Qt, vModelSelect as Kt, createTextVNode as _t, useModel as pt, inject as en, createVNode as xt, withCtx as yt, mergeModels as bt } from "vue";
2
+ import { defineStore as tn } from "pinia";
3
+ import './assets/index.css';function At(e, t) {
4
+ return St() ? ($t(e, t), !0) : !1;
5
5
  }
6
- const en = typeof window < "u" && typeof document < "u";
6
+ const nn = typeof window < "u" && typeof document < "u";
7
7
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
8
- const tn = (e) => e != null, nn = Object.prototype.toString, on = (e) => nn.call(e) === "[object Object]", ln = () => {
8
+ const on = (e) => e != null, ln = Object.prototype.toString, an = (e) => ln.call(e) === "[object Object]", sn = () => {
9
9
  };
10
- function Ue(e) {
10
+ function je(e) {
11
11
  return Array.isArray(e) ? e : [e];
12
12
  }
13
- function an(e, t, n) {
13
+ function rn(e, t, n) {
14
14
  return ce(e, t, {
15
15
  ...n,
16
16
  immediate: !0
17
17
  });
18
18
  }
19
- const De = en ? window : void 0;
19
+ const De = nn ? window : void 0;
20
20
  function Le(e) {
21
21
  var t;
22
22
  const n = H(e);
23
23
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
24
24
  }
25
25
  function Fe(...e) {
26
- const t = (l, u, o, a) => (l.addEventListener(u, o, a), () => l.removeEventListener(u, o, a)), n = T(() => {
27
- const l = Ue(H(e[0])).filter((u) => u != null);
28
- return l.every((u) => typeof u != "string") ? l : void 0;
26
+ const t = (o, u, l, a) => (o.addEventListener(u, l, a), () => o.removeEventListener(u, l, a)), n = S(() => {
27
+ const o = je(H(e[0])).filter((u) => u != null);
28
+ return o.every((u) => typeof u != "string") ? o : void 0;
29
29
  });
30
- return an(() => {
31
- var l, u;
30
+ return rn(() => {
31
+ var o, u;
32
32
  return [
33
- (l = (u = n.value) === null || u === void 0 ? void 0 : u.map((o) => Le(o))) !== null && l !== void 0 ? l : [De].filter((o) => o != null),
34
- Ue(H(n.value ? e[1] : e[0])),
35
- Ue(P(n.value ? e[2] : e[1])),
33
+ (o = (u = n.value) === null || u === void 0 ? void 0 : u.map((l) => Le(l))) !== null && o !== void 0 ? o : [De].filter((l) => l != null),
34
+ je(H(n.value ? e[1] : e[0])),
35
+ je(P(n.value ? e[2] : e[1])),
36
36
  H(n.value ? e[3] : e[2])
37
37
  ];
38
- }, ([l, u, o, a], c, r) => {
39
- if (!l?.length || !u?.length || !o?.length) return;
40
- const s = on(a) ? { ...a } : a, h = l.flatMap((f) => u.flatMap((w) => o.map((L) => t(f, w, L, s))));
38
+ }, ([o, u, l, a], c, r) => {
39
+ if (!o?.length || !u?.length || !l?.length) return;
40
+ const s = an(a) ? { ...a } : a, h = o.flatMap((f) => u.flatMap((w) => l.map((L) => t(f, w, L, s))));
41
41
  r(() => {
42
42
  h.forEach((f) => f());
43
43
  });
44
44
  }, { flush: "post" });
45
45
  }
46
46
  // @__NO_SIDE_EFFECTS__
47
- function sn() {
48
- const e = re(!1), t = lt();
47
+ function cn() {
48
+ const e = re(!1), t = at();
49
49
  return t && Ie(() => {
50
50
  e.value = !0;
51
51
  }, t), e;
52
52
  }
53
53
  // @__NO_SIDE_EFFECTS__
54
- function rn(e) {
55
- const t = /* @__PURE__ */ sn();
56
- return T(() => (t.value, !!e()));
54
+ function un(e) {
55
+ const t = /* @__PURE__ */ cn();
56
+ return S(() => (t.value, !!e()));
57
57
  }
58
- function cn(e, t, n = {}) {
59
- const { window: l = De, ...u } = n;
60
- let o;
61
- const a = /* @__PURE__ */ rn(() => l && "MutationObserver" in l), c = () => {
62
- o && (o.disconnect(), o = void 0);
63
- }, r = ce(T(() => {
64
- const f = Ue(H(e)).map(Le).filter(tn);
58
+ function dn(e, t, n = {}) {
59
+ const { window: o = De, ...u } = n;
60
+ let l;
61
+ const a = /* @__PURE__ */ un(() => o && "MutationObserver" in o), c = () => {
62
+ l && (l.disconnect(), l = void 0);
63
+ }, r = ce(S(() => {
64
+ const f = je(H(e)).map(Le).filter(on);
65
65
  return new Set(f);
66
66
  }), (f) => {
67
- c(), a.value && f.size && (o = new MutationObserver(t), f.forEach((w) => o.observe(w, u)));
67
+ c(), a.value && f.size && (l = new MutationObserver(t), f.forEach((w) => l.observe(w, u)));
68
68
  }, {
69
69
  immediate: !0,
70
70
  flush: "post"
71
- }), s = () => o?.takeRecords(), h = () => {
71
+ }), s = () => l?.takeRecords(), h = () => {
72
72
  r(), c();
73
73
  };
74
- return $t(h), {
74
+ return At(h), {
75
75
  isSupported: a,
76
76
  stop: h,
77
77
  takeRecords: s
78
78
  };
79
79
  }
80
- function un(e, t, n = {}) {
81
- const { window: l = De, document: u = l?.document, flush: o = "sync" } = n;
82
- if (!l || !u) return ln;
80
+ function fn(e, t, n = {}) {
81
+ const { window: o = De, document: u = o?.document, flush: l = "sync" } = n;
82
+ if (!o || !u) return sn;
83
83
  let a;
84
84
  const c = (h) => {
85
85
  a?.(), a = h;
86
- }, r = Ft(() => {
86
+ }, r = zt(() => {
87
87
  const h = Le(e);
88
88
  if (h) {
89
- const { stop: f } = cn(u, (w) => {
89
+ const { stop: f } = dn(u, (w) => {
90
90
  w.map((L) => [...L.removedNodes]).flat().some((L) => L === h || L.contains(h)) && t(w);
91
91
  }, {
92
- window: l,
92
+ window: o,
93
93
  childList: !0,
94
94
  subtree: !0
95
95
  });
96
96
  c(f);
97
97
  }
98
- }, { flush: o }), s = () => {
98
+ }, { flush: l }), s = () => {
99
99
  r(), c();
100
100
  };
101
- return $t(s), s;
101
+ return At(s), s;
102
102
  }
103
103
  // @__NO_SIDE_EFFECTS__
104
- function dn(e = {}) {
104
+ function vn(e = {}) {
105
105
  var t;
106
- const { window: n = De, deep: l = !0, triggerOnRemoval: u = !1 } = e, o = (t = e.document) !== null && t !== void 0 ? t : n?.document, a = () => {
107
- let s = o?.activeElement;
108
- if (l)
106
+ const { window: n = De, deep: o = !0, triggerOnRemoval: u = !1 } = e, l = (t = e.document) !== null && t !== void 0 ? t : n?.document, a = () => {
107
+ let s = l?.activeElement;
108
+ if (o)
109
109
  for (var h; s?.shadowRoot; ) s = s == null || (h = s.shadowRoot) === null || h === void 0 ? void 0 : h.activeElement;
110
110
  return s;
111
111
  }, c = re(), r = () => {
@@ -120,27 +120,27 @@ function dn(e = {}) {
120
120
  h.relatedTarget === null && r();
121
121
  }, s), Fe(n, "focus", r, s);
122
122
  }
123
- return u && un(c, r, { document: o }), r(), c;
123
+ return u && fn(c, r, { document: l }), r(), c;
124
124
  }
125
- const fn = "focusin", vn = "focusout", hn = ":focus-within";
126
- function mn(e, t = {}) {
127
- const { window: n = De } = t, l = T(() => Le(e)), u = re(!1), o = T(() => u.value);
128
- if (!n || !(/* @__PURE__ */ dn(t)).value) return { focused: o };
125
+ const hn = "focusin", mn = "focusout", gn = ":focus-within";
126
+ function wn(e, t = {}) {
127
+ const { window: n = De } = t, o = S(() => Le(e)), u = re(!1), l = S(() => u.value);
128
+ if (!n || !(/* @__PURE__ */ vn(t)).value) return { focused: l };
129
129
  const a = { passive: !0 };
130
- return Fe(l, fn, () => u.value = !0, a), Fe(l, vn, () => {
130
+ return Fe(o, hn, () => u.value = !0, a), Fe(o, mn, () => {
131
131
  var c, r, s;
132
- return u.value = (c = (r = l.value) === null || r === void 0 || (s = r.matches) === null || s === void 0 ? void 0 : s.call(r, hn)) !== null && c !== void 0 ? c : !1;
133
- }, a), { focused: o };
132
+ return u.value = (c = (r = o.value) === null || r === void 0 || (s = r.matches) === null || s === void 0 ? void 0 : s.call(r, gn)) !== null && c !== void 0 ? c : !1;
133
+ }, a), { focused: l };
134
134
  }
135
- function gn(e, { window: t = De, scrollTarget: n } = {}) {
136
- const l = W(!1), u = () => {
135
+ function pn(e, { window: t = De, scrollTarget: n } = {}) {
136
+ const o = W(!1), u = () => {
137
137
  if (!t) return;
138
- const o = t.document, a = Le(e);
138
+ const l = t.document, a = Le(e);
139
139
  if (!a)
140
- l.value = !1;
140
+ o.value = !1;
141
141
  else {
142
142
  const c = a.getBoundingClientRect();
143
- l.value = c.top <= (t.innerHeight || o.documentElement.clientHeight) && c.left <= (t.innerWidth || o.documentElement.clientWidth) && c.bottom >= 0 && c.right >= 0;
143
+ o.value = c.top <= (t.innerHeight || l.documentElement.clientHeight) && c.left <= (t.innerWidth || l.documentElement.clientWidth) && c.bottom >= 0 && c.right >= 0;
144
144
  }
145
145
  };
146
146
  return ce(
@@ -150,179 +150,179 @@ function gn(e, { window: t = De, scrollTarget: n } = {}) {
150
150
  ), t && Fe(n || t, "scroll", u, {
151
151
  capture: !1,
152
152
  passive: !0
153
- }), l;
153
+ }), o;
154
154
  }
155
155
  const ke = (e) => {
156
- let t = gn(e).value;
156
+ let t = pn(e).value;
157
157
  return t = t && e.offsetHeight > 0, t;
158
- }, Me = (e) => e.tabIndex >= 0, yt = (e) => {
158
+ }, Me = (e) => e.tabIndex >= 0, Ct = (e) => {
159
159
  if (e.target instanceof HTMLElement)
160
- return rt(e.target);
161
- }, rt = (e) => {
160
+ return ct(e.target);
161
+ }, ct = (e) => {
162
162
  let t;
163
163
  if (e instanceof HTMLTableCellElement) {
164
164
  const n = e.parentElement?.previousElementSibling;
165
165
  if (n instanceof HTMLTableRowElement) {
166
- const l = Array.from(n.children)[e.cellIndex];
167
- l instanceof HTMLElement && (t = l);
166
+ const o = Array.from(n.children)[e.cellIndex];
167
+ o instanceof HTMLElement && (t = o);
168
168
  }
169
169
  } else if (e instanceof HTMLTableRowElement) {
170
170
  const n = e.previousElementSibling;
171
171
  n instanceof HTMLTableRowElement && (t = n);
172
172
  }
173
- return t && (!Me(t) || !ke(t)) ? rt(t) : t;
174
- }, wn = (e) => {
173
+ return t && (!Me(t) || !ke(t)) ? ct(t) : t;
174
+ }, xn = (e) => {
175
175
  if (!(e.target instanceof HTMLElement)) return;
176
176
  const t = e.target;
177
177
  let n;
178
178
  if (t instanceof HTMLTableCellElement) {
179
- const l = t.parentElement?.parentElement;
180
- if (l) {
181
- const u = l.firstElementChild?.children[t.cellIndex];
179
+ const o = t.parentElement?.parentElement;
180
+ if (o) {
181
+ const u = o.firstElementChild?.children[t.cellIndex];
182
182
  u instanceof HTMLElement && (n = u);
183
183
  }
184
184
  } else if (t instanceof HTMLTableRowElement) {
185
- const l = t.parentElement;
186
- if (l) {
187
- const u = l.firstElementChild;
185
+ const o = t.parentElement;
186
+ if (o) {
187
+ const u = o.firstElementChild;
188
188
  u instanceof HTMLTableRowElement && (n = u);
189
189
  }
190
190
  }
191
- return n && (!Me(n) || !ke(n)) ? ct(n) : n;
192
- }, bt = (e) => {
191
+ return n && (!Me(n) || !ke(n)) ? ut(n) : n;
192
+ }, kt = (e) => {
193
193
  if (e.target instanceof HTMLElement)
194
- return ct(e.target);
195
- }, ct = (e) => {
194
+ return ut(e.target);
195
+ }, ut = (e) => {
196
196
  let t;
197
197
  if (e instanceof HTMLTableCellElement) {
198
198
  const n = e.parentElement?.nextElementSibling;
199
199
  if (n) {
200
- const l = Array.from(n.children)[e.cellIndex];
201
- l instanceof HTMLElement && (t = l);
200
+ const o = Array.from(n.children)[e.cellIndex];
201
+ o instanceof HTMLElement && (t = o);
202
202
  }
203
203
  } else if (e instanceof HTMLTableRowElement) {
204
204
  const n = e.nextElementSibling;
205
205
  n instanceof HTMLTableRowElement && (t = n);
206
206
  }
207
- return t && (!Me(t) || !ke(t)) ? ct(t) : t;
208
- }, pn = (e) => {
207
+ return t && (!Me(t) || !ke(t)) ? ut(t) : t;
208
+ }, yn = (e) => {
209
209
  if (!(e.target instanceof HTMLElement)) return;
210
210
  const t = e.target;
211
211
  let n;
212
212
  if (t instanceof HTMLTableCellElement) {
213
- const l = t.parentElement?.parentElement;
214
- if (l) {
215
- const u = l.lastElementChild?.children[t.cellIndex];
213
+ const o = t.parentElement?.parentElement;
214
+ if (o) {
215
+ const u = o.lastElementChild?.children[t.cellIndex];
216
216
  u instanceof HTMLElement && (n = u);
217
217
  }
218
218
  } else if (t instanceof HTMLTableRowElement) {
219
- const l = t.parentElement;
220
- if (l) {
221
- const u = l.lastElementChild;
219
+ const o = t.parentElement;
220
+ if (o) {
221
+ const u = o.lastElementChild;
222
222
  u instanceof HTMLTableRowElement && (n = u);
223
223
  }
224
224
  }
225
- return n && (!Me(n) || !ke(n)) ? rt(n) : n;
226
- }, Ct = (e) => {
225
+ return n && (!Me(n) || !ke(n)) ? ct(n) : n;
226
+ }, Mt = (e) => {
227
227
  if (e.target instanceof HTMLElement)
228
- return ut(e.target);
229
- }, ut = (e) => {
228
+ return dt(e.target);
229
+ }, dt = (e) => {
230
230
  let t;
231
231
  const n = e.previousElementSibling;
232
232
  if (n instanceof HTMLElement)
233
233
  t = n;
234
234
  else {
235
- const l = e.parentElement?.previousElementSibling?.lastElementChild;
236
- l instanceof HTMLElement && (t = l);
235
+ const o = e.parentElement?.previousElementSibling?.lastElementChild;
236
+ o instanceof HTMLElement && (t = o);
237
237
  }
238
- return t && (!Me(t) || !ke(t)) ? ut(t) : t;
239
- }, kt = (e) => {
238
+ return t && (!Me(t) || !ke(t)) ? dt(t) : t;
239
+ }, Rt = (e) => {
240
240
  if (e.target instanceof HTMLElement)
241
- return dt(e.target);
242
- }, dt = (e) => {
241
+ return ft(e.target);
242
+ }, ft = (e) => {
243
243
  let t;
244
244
  const n = e.nextElementSibling;
245
245
  if (n instanceof HTMLElement)
246
246
  t = n;
247
247
  else {
248
- const l = e.parentElement?.nextElementSibling?.firstElementChild;
249
- l instanceof HTMLElement && (t = l);
248
+ const o = e.parentElement?.nextElementSibling?.firstElementChild;
249
+ o instanceof HTMLElement && (t = o);
250
250
  }
251
- return t && (!Me(t) || !ke(t)) ? dt(t) : t;
252
- }, Mt = (e) => {
251
+ return t && (!Me(t) || !ke(t)) ? ft(t) : t;
252
+ }, Et = (e) => {
253
253
  if (!(e.target instanceof HTMLElement)) return;
254
254
  const t = e.target.parentElement?.firstElementChild, n = t instanceof HTMLElement ? t : null;
255
- return n && (!Me(n) || !ke(n)) ? dt(n) : n;
256
- }, Rt = (e) => {
255
+ return n && (!Me(n) || !ke(n)) ? ft(n) : n;
256
+ }, Tt = (e) => {
257
257
  if (!(e.target instanceof HTMLElement)) return;
258
258
  const t = e.target.parentElement?.lastElementChild, n = t instanceof HTMLElement ? t : null;
259
- return n && (!Me(n) || !ke(n)) ? ut(n) : n;
260
- }, ze = ["alt", "control", "shift", "meta"], xn = {
259
+ return n && (!Me(n) || !ke(n)) ? dt(n) : n;
260
+ }, ze = ["alt", "control", "shift", "meta"], bn = {
261
261
  ArrowUp: "up",
262
262
  ArrowDown: "down",
263
263
  ArrowLeft: "left",
264
264
  ArrowRight: "right"
265
- }, Je = {
265
+ }, qe = {
266
266
  "keydown.up": (e) => {
267
- const t = yt(e);
267
+ const t = Ct(e);
268
268
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
269
269
  },
270
270
  "keydown.down": (e) => {
271
- const t = bt(e);
271
+ const t = kt(e);
272
272
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
273
273
  },
274
274
  "keydown.left": (e) => {
275
- const t = Ct(e);
275
+ const t = Mt(e);
276
276
  e.preventDefault(), e.stopPropagation(), t && t.focus();
277
277
  },
278
278
  "keydown.right": (e) => {
279
- const t = kt(e);
279
+ const t = Rt(e);
280
280
  e.preventDefault(), e.stopPropagation(), t && t.focus();
281
281
  },
282
282
  "keydown.control.up": (e) => {
283
- const t = wn(e);
283
+ const t = xn(e);
284
284
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
285
285
  },
286
286
  "keydown.control.down": (e) => {
287
- const t = pn(e);
287
+ const t = yn(e);
288
288
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
289
289
  },
290
290
  "keydown.control.left": (e) => {
291
- const t = Mt(e);
291
+ const t = Et(e);
292
292
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
293
293
  },
294
294
  "keydown.control.right": (e) => {
295
- const t = Rt(e);
295
+ const t = Tt(e);
296
296
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
297
297
  },
298
298
  "keydown.end": (e) => {
299
- const t = Rt(e);
299
+ const t = Tt(e);
300
300
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
301
301
  },
302
302
  "keydown.enter": (e) => {
303
303
  if (e.target instanceof HTMLElement && e.target instanceof HTMLTableCellElement) {
304
304
  e.preventDefault(), e.stopPropagation();
305
- const t = bt(e);
305
+ const t = kt(e);
306
306
  t && t.focus();
307
307
  }
308
308
  },
309
309
  "keydown.shift.enter": (e) => {
310
310
  if (e.target instanceof HTMLElement && e.target instanceof HTMLTableCellElement) {
311
311
  e.preventDefault(), e.stopPropagation();
312
- const t = yt(e);
312
+ const t = Ct(e);
313
313
  t && t.focus();
314
314
  }
315
315
  },
316
316
  "keydown.home": (e) => {
317
- const t = Mt(e);
317
+ const t = Et(e);
318
318
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
319
319
  },
320
320
  "keydown.tab": (e) => {
321
- const t = kt(e);
321
+ const t = Rt(e);
322
322
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
323
323
  },
324
324
  "keydown.shift.tab": (e) => {
325
- const t = Ct(e);
325
+ const t = Mt(e);
326
326
  t && (e.preventDefault(), e.stopPropagation(), t.focus());
327
327
  }
328
328
  };
@@ -330,32 +330,32 @@ function Ke(e) {
330
330
  let t = null;
331
331
  return e.parent && (typeof e.parent == "string" ? t = document.querySelector(e.parent) : e.parent instanceof HTMLElement ? t = e.parent : t = e.parent.value), t;
332
332
  }
333
- function It(e) {
334
- const t = (o) => {
335
- const a = Ke(o);
333
+ function Ht(e) {
334
+ const t = (l) => {
335
+ const a = Ke(l);
336
336
  let c = [];
337
- if (typeof o.selectors == "string")
338
- c = Array.from(a ? a.querySelectorAll(o.selectors) : document.querySelectorAll(o.selectors));
339
- else if (Array.isArray(o.selectors))
340
- for (const r of o.selectors)
337
+ if (typeof l.selectors == "string")
338
+ c = Array.from(a ? a.querySelectorAll(l.selectors) : document.querySelectorAll(l.selectors));
339
+ else if (Array.isArray(l.selectors))
340
+ for (const r of l.selectors)
341
341
  r instanceof HTMLElement ? c.push(r) : c.push(r.$el);
342
- else if (o.selectors instanceof HTMLElement)
343
- c.push(o.selectors);
344
- else if (o.selectors?.value)
345
- if (Array.isArray(o.selectors.value))
346
- for (const r of o.selectors.value)
342
+ else if (l.selectors instanceof HTMLElement)
343
+ c.push(l.selectors);
344
+ else if (l.selectors?.value)
345
+ if (Array.isArray(l.selectors.value))
346
+ for (const r of l.selectors.value)
347
347
  r instanceof HTMLElement ? c.push(r) : c.push(r.$el);
348
348
  else
349
- c.push(o.selectors.value);
349
+ c.push(l.selectors.value);
350
350
  return c;
351
- }, n = (o) => {
352
- const a = Ke(o);
351
+ }, n = (l) => {
352
+ const a = Ke(l);
353
353
  let c = [];
354
- return o.selectors ? c = t(o) : a && (c = Array.from(a.children).filter((r) => r instanceof HTMLElement).filter((r) => Me(r) && ke(r))), c;
355
- }, l = (o) => (a) => {
356
- const c = xn[a.key] || a.key.toLowerCase();
354
+ return l.selectors ? c = t(l) : a && (c = Array.from(a.children).filter((r) => r instanceof HTMLElement).filter((r) => Me(r) && ke(r))), c;
355
+ }, o = (l) => (a) => {
356
+ const c = bn[a.key] || a.key.toLowerCase();
357
357
  if (ze.includes(c)) return;
358
- const r = o.handlers || Je;
358
+ const r = l.handlers || qe;
359
359
  for (const s of Object.keys(r)) {
360
360
  const [h, ...f] = s.split(".");
361
361
  if (h === "keydown" && f.includes(c)) {
@@ -377,144 +377,144 @@ function It(e) {
377
377
  }
378
378
  }, u = [];
379
379
  Ie(() => {
380
- for (const o of e) {
381
- const a = Ke(o), c = n(o), r = l(o), s = a ? [a] : c;
380
+ for (const l of e) {
381
+ const a = Ke(l), c = n(l), r = o(l), s = a ? [a] : c;
382
382
  for (const h of s) {
383
- const { focused: f } = mn(W(h)), w = ce(f, (L) => {
383
+ const { focused: f } = wn(W(h)), w = ce(f, (L) => {
384
384
  L ? h.addEventListener("keydown", r) : h.removeEventListener("keydown", r);
385
385
  });
386
386
  u.push(w);
387
387
  }
388
388
  }
389
- }), Nt(() => {
390
- for (const o of u)
391
- o();
389
+ }), Wt(() => {
390
+ for (const l of u)
391
+ l();
392
392
  });
393
393
  }
394
- function ft(e, t) {
395
- return Et() ? (Tt(e, t), !0) : !1;
394
+ function vt(e, t) {
395
+ return St() ? ($t(e, t), !0) : !1;
396
396
  }
397
- const At = typeof window < "u" && typeof document < "u";
397
+ const Lt = typeof window < "u" && typeof document < "u";
398
398
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
399
- const yn = (e) => e != null, bn = Object.prototype.toString, Cn = (e) => bn.call(e) === "[object Object]", Se = () => {
399
+ const Cn = (e) => e != null, kn = Object.prototype.toString, Mn = (e) => kn.call(e) === "[object Object]", Se = () => {
400
400
  };
401
- function kn(...e) {
402
- if (e.length !== 1) return Xt(...e);
401
+ function Rn(...e) {
402
+ if (e.length !== 1) return jt(...e);
403
403
  const t = e[0];
404
- return typeof t == "function" ? Gt(St(() => ({
404
+ return typeof t == "function" ? Ut(It(() => ({
405
405
  get: t,
406
406
  set: Se
407
407
  }))) : W(t);
408
408
  }
409
- function Mn(e, t) {
410
- function n(...l) {
411
- return new Promise((u, o) => {
412
- Promise.resolve(e(() => t.apply(this, l), {
409
+ function En(e, t) {
410
+ function n(...o) {
411
+ return new Promise((u, l) => {
412
+ Promise.resolve(e(() => t.apply(this, o), {
413
413
  fn: t,
414
414
  thisArg: this,
415
- args: l
416
- })).then(u).catch(o);
415
+ args: o
416
+ })).then(u).catch(l);
417
417
  });
418
418
  }
419
419
  return n;
420
420
  }
421
- function Rn(e, t = {}) {
422
- let n, l, u = Se;
423
- const o = (r) => {
421
+ function Tn(e, t = {}) {
422
+ let n, o, u = Se;
423
+ const l = (r) => {
424
424
  clearTimeout(r), u(), u = Se;
425
425
  };
426
426
  let a;
427
427
  return (r) => {
428
428
  const s = H(e), h = H(t.maxWait);
429
- return n && o(n), s <= 0 || h !== void 0 && h <= 0 ? (l && (o(l), l = void 0), Promise.resolve(r())) : new Promise((f, w) => {
430
- u = t.rejectOnCancel ? w : f, a = r, h && !l && (l = setTimeout(() => {
431
- n && o(n), l = void 0, f(a());
429
+ return n && l(n), s <= 0 || h !== void 0 && h <= 0 ? (o && (l(o), o = void 0), Promise.resolve(r())) : new Promise((f, w) => {
430
+ u = t.rejectOnCancel ? w : f, a = r, h && !o && (o = setTimeout(() => {
431
+ n && l(n), o = void 0, f(a());
432
432
  }, h)), n = setTimeout(() => {
433
- l && o(l), l = void 0, f(r());
433
+ o && l(o), o = void 0, f(r());
434
434
  }, s);
435
435
  });
436
436
  };
437
437
  }
438
- function je(e) {
438
+ function Ue(e) {
439
439
  return Array.isArray(e) ? e : [e];
440
440
  }
441
- function En(e) {
442
- return lt();
441
+ function Sn(e) {
442
+ return at();
443
443
  }
444
444
  // @__NO_SIDE_EFFECTS__
445
- function Tn(e, t = 200, n = {}) {
446
- return Mn(Rn(t, n), e);
445
+ function $n(e, t = 200, n = {}) {
446
+ return En(Tn(t, n), e);
447
447
  }
448
- function Sn(e, t = {}) {
449
- if (!Wt(e)) return zt(e);
448
+ function In(e, t = {}) {
449
+ if (!Xt(e)) return Gt(e);
450
450
  const n = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
451
- for (const l in e.value) n[l] = St(() => ({
451
+ for (const o in e.value) n[o] = It(() => ({
452
452
  get() {
453
- return e.value[l];
453
+ return e.value[o];
454
454
  },
455
455
  set(u) {
456
- var o;
457
- if (!((o = H(t.replaceRef)) !== null && o !== void 0) || o) if (Array.isArray(e.value)) {
456
+ var l;
457
+ if (!((l = H(t.replaceRef)) !== null && l !== void 0) || l) if (Array.isArray(e.value)) {
458
458
  const a = [...e.value];
459
- a[l] = u, e.value = a;
459
+ a[o] = u, e.value = a;
460
460
  } else {
461
461
  const a = {
462
462
  ...e.value,
463
- [l]: u
463
+ [o]: u
464
464
  };
465
465
  Object.setPrototypeOf(a, Object.getPrototypeOf(e.value)), e.value = a;
466
466
  }
467
- else e.value[l] = u;
467
+ else e.value[o] = u;
468
468
  }
469
469
  }));
470
470
  return n;
471
471
  }
472
- function $n(e, t = !0, n) {
473
- En() ? Ie(e, n) : t ? e() : at(e);
472
+ function An(e, t = !0, n) {
473
+ Sn() ? Ie(e, n) : t ? e() : st(e);
474
474
  }
475
- function In(e, t, n) {
475
+ function Hn(e, t, n) {
476
476
  return ce(e, t, {
477
477
  ...n,
478
478
  immediate: !0
479
479
  });
480
480
  }
481
- const We = At ? window : void 0;
481
+ const We = Lt ? window : void 0;
482
482
  function we(e) {
483
483
  var t;
484
484
  const n = H(e);
485
485
  return (t = n?.$el) !== null && t !== void 0 ? t : n;
486
486
  }
487
487
  function Ee(...e) {
488
- const t = (l, u, o, a) => (l.addEventListener(u, o, a), () => l.removeEventListener(u, o, a)), n = T(() => {
489
- const l = je(H(e[0])).filter((u) => u != null);
490
- return l.every((u) => typeof u != "string") ? l : void 0;
488
+ const t = (o, u, l, a) => (o.addEventListener(u, l, a), () => o.removeEventListener(u, l, a)), n = S(() => {
489
+ const o = Ue(H(e[0])).filter((u) => u != null);
490
+ return o.every((u) => typeof u != "string") ? o : void 0;
491
491
  });
492
- return In(() => {
493
- var l, u;
492
+ return Hn(() => {
493
+ var o, u;
494
494
  return [
495
- (l = (u = n.value) === null || u === void 0 ? void 0 : u.map((o) => we(o))) !== null && l !== void 0 ? l : [We].filter((o) => o != null),
496
- je(H(n.value ? e[1] : e[0])),
497
- je(P(n.value ? e[2] : e[1])),
495
+ (o = (u = n.value) === null || u === void 0 ? void 0 : u.map((l) => we(l))) !== null && o !== void 0 ? o : [We].filter((l) => l != null),
496
+ Ue(H(n.value ? e[1] : e[0])),
497
+ Ue(P(n.value ? e[2] : e[1])),
498
498
  H(n.value ? e[3] : e[2])
499
499
  ];
500
- }, ([l, u, o, a], c, r) => {
501
- if (!l?.length || !u?.length || !o?.length) return;
502
- const s = Cn(a) ? { ...a } : a, h = l.flatMap((f) => u.flatMap((w) => o.map((L) => t(f, w, L, s))));
500
+ }, ([o, u, l, a], c, r) => {
501
+ if (!o?.length || !u?.length || !l?.length) return;
502
+ const s = Mn(a) ? { ...a } : a, h = o.flatMap((f) => u.flatMap((w) => l.map((L) => t(f, w, L, s))));
503
503
  r(() => {
504
504
  h.forEach((f) => f());
505
505
  });
506
506
  }, { flush: "post" });
507
507
  }
508
508
  function ot(e, t, n = {}) {
509
- const { window: l = We, ignore: u = [], capture: o = !0, detectIframe: a = !1, controls: c = !1 } = n;
510
- if (!l) return c ? {
509
+ const { window: o = We, ignore: u = [], capture: l = !0, detectIframe: a = !1, controls: c = !1 } = n;
510
+ if (!o) return c ? {
511
511
  stop: Se,
512
512
  cancel: Se,
513
513
  trigger: Se
514
514
  } : Se;
515
515
  let r = !0;
516
516
  const s = (m) => H(u).some((v) => {
517
- if (typeof v == "string") return Array.from(l.document.querySelectorAll(v)).some((g) => g === m.target || m.composedPath().includes(g));
517
+ if (typeof v == "string") return Array.from(o.document.querySelectorAll(v)).some((g) => g === m.target || m.composedPath().includes(g));
518
518
  {
519
519
  const g = we(v);
520
520
  return g && (m.target === g || m.composedPath().includes(g));
@@ -540,23 +540,23 @@ function ot(e, t, n = {}) {
540
540
  };
541
541
  let L = !1;
542
542
  const Z = [
543
- Ee(l, "click", (m) => {
543
+ Ee(o, "click", (m) => {
544
544
  L || (L = !0, setTimeout(() => {
545
545
  L = !1;
546
546
  }, 0), w(m));
547
547
  }, {
548
548
  passive: !0,
549
- capture: o
549
+ capture: l
550
550
  }),
551
- Ee(l, "pointerdown", (m) => {
551
+ Ee(o, "pointerdown", (m) => {
552
552
  const v = we(e);
553
553
  r = !s(m) && !!(v && !m.composedPath().includes(v));
554
554
  }, { passive: !0 }),
555
- a && Ee(l, "blur", (m) => {
555
+ a && Ee(o, "blur", (m) => {
556
556
  setTimeout(() => {
557
557
  var v;
558
558
  const g = we(e);
559
- ((v = l.document.activeElement) === null || v === void 0 ? void 0 : v.tagName) === "IFRAME" && !g?.contains(l.document.activeElement) && t(m);
559
+ ((v = o.document.activeElement) === null || v === void 0 ? void 0 : v.tagName) === "IFRAME" && !g?.contains(o.document.activeElement) && t(m);
560
560
  }, 0);
561
561
  }, { passive: !0 })
562
562
  ].filter(Boolean), y = () => Z.forEach((m) => m());
@@ -571,34 +571,34 @@ function ot(e, t, n = {}) {
571
571
  } : y;
572
572
  }
573
573
  // @__NO_SIDE_EFFECTS__
574
- function An() {
575
- const e = re(!1), t = lt();
574
+ function Ln() {
575
+ const e = re(!1), t = at();
576
576
  return t && Ie(() => {
577
577
  e.value = !0;
578
578
  }, t), e;
579
579
  }
580
580
  // @__NO_SIDE_EFFECTS__
581
- function Ht(e) {
582
- const t = /* @__PURE__ */ An();
583
- return T(() => (t.value, !!e()));
581
+ function Dt(e) {
582
+ const t = /* @__PURE__ */ Ln();
583
+ return S(() => (t.value, !!e()));
584
584
  }
585
- function Lt(e, t, n = {}) {
586
- const { window: l = We, ...u } = n;
587
- let o;
588
- const a = /* @__PURE__ */ Ht(() => l && "MutationObserver" in l), c = () => {
589
- o && (o.disconnect(), o = void 0);
590
- }, r = ce(T(() => {
591
- const f = je(H(e)).map(we).filter(yn);
585
+ function Ot(e, t, n = {}) {
586
+ const { window: o = We, ...u } = n;
587
+ let l;
588
+ const a = /* @__PURE__ */ Dt(() => o && "MutationObserver" in o), c = () => {
589
+ l && (l.disconnect(), l = void 0);
590
+ }, r = ce(S(() => {
591
+ const f = Ue(H(e)).map(we).filter(Cn);
592
592
  return new Set(f);
593
593
  }), (f) => {
594
- c(), a.value && f.size && (o = new MutationObserver(t), f.forEach((w) => o.observe(w, u)));
594
+ c(), a.value && f.size && (l = new MutationObserver(t), f.forEach((w) => l.observe(w, u)));
595
595
  }, {
596
596
  immediate: !0,
597
597
  flush: "post"
598
- }), s = () => o?.takeRecords(), h = () => {
598
+ }), s = () => l?.takeRecords(), h = () => {
599
599
  r(), c();
600
600
  };
601
- return ft(h), {
601
+ return vt(h), {
602
602
  isSupported: a,
603
603
  stop: h,
604
604
  takeRecords: s
@@ -609,24 +609,24 @@ const Xe = {
609
609
  margin: 30,
610
610
  direction: "both"
611
611
  };
612
- function Hn(e) {
612
+ function Dn(e) {
613
613
  e.scrollLeft > e.scrollWidth - e.clientWidth && (e.scrollLeft = Math.max(0, e.scrollWidth - e.clientWidth)), e.scrollTop > e.scrollHeight - e.clientHeight && (e.scrollTop = Math.max(0, e.scrollHeight - e.clientHeight));
614
614
  }
615
615
  function _e(e, t = {}) {
616
- var n, l, u, o;
616
+ var n, o, u, l;
617
617
  const { pointerTypes: a, preventDefault: c, stopPropagation: r, exact: s, onMove: h, onEnd: f, onStart: w, initialValue: L, axis: Z = "both", draggingElement: y = We, containerElement: m, handle: v = e, buttons: g = [0], restrictInView: k, autoScroll: C = !1 } = t, x = W((n = H(L)) !== null && n !== void 0 ? n : {
618
618
  x: 0,
619
619
  y: 0
620
620
  }), I = W(), X = (E) => a ? a.includes(E.pointerType) : !0, M = (E) => {
621
621
  H(c) && E.preventDefault(), H(r) && E.stopPropagation();
622
- }, V = H(C), N = typeof V == "object" ? {
623
- speed: (l = H(V.speed)) !== null && l !== void 0 ? l : Xe.speed,
624
- margin: (u = H(V.margin)) !== null && u !== void 0 ? u : Xe.margin,
625
- direction: (o = V.direction) !== null && o !== void 0 ? o : Xe.direction
626
- } : Xe, q = (E) => typeof E == "number" ? [E, E] : [E.x, E.y], ee = (E, D, F) => {
627
- const { clientWidth: Q, clientHeight: G, scrollLeft: oe, scrollTop: xe, scrollWidth: Re, scrollHeight: $ } = E, [B, j] = q(N.margin), [U, K] = q(N.speed);
622
+ }, B = H(C), N = typeof B == "object" ? {
623
+ speed: (o = H(B.speed)) !== null && o !== void 0 ? o : Xe.speed,
624
+ margin: (u = H(B.margin)) !== null && u !== void 0 ? u : Xe.margin,
625
+ direction: (l = B.direction) !== null && l !== void 0 ? l : Xe.direction
626
+ } : Xe, J = (E) => typeof E == "number" ? [E, E] : [E.x, E.y], ee = (E, D, F) => {
627
+ const { clientWidth: Q, clientHeight: G, scrollLeft: oe, scrollTop: xe, scrollWidth: Re, scrollHeight: $ } = E, [V, U] = J(N.margin), [j, K] = J(N.speed);
628
628
  let te = 0, le = 0;
629
- (N.direction === "x" || N.direction === "both") && (F.x < B && oe > 0 ? te = -U : F.x + D.width > Q - B && oe < Re - Q && (te = U)), (N.direction === "y" || N.direction === "both") && (F.y < j && xe > 0 ? le = -K : F.y + D.height > G - j && xe < $ - G && (le = K)), (te || le) && E.scrollBy({
629
+ (N.direction === "x" || N.direction === "both") && (F.x < V && oe > 0 ? te = -j : F.x + D.width > Q - V && oe < Re - Q && (te = j)), (N.direction === "y" || N.direction === "both") && (F.y < U && xe > 0 ? le = -K : F.y + D.height > G - U && xe < $ - G && (le = K)), (te || le) && E.scrollBy({
630
630
  left: te,
631
631
  top: le,
632
632
  behavior: "auto"
@@ -647,7 +647,7 @@ function _e(e, t = {}) {
647
647
  }, Oe = (E, D, F, Q) => {
648
648
  const [G, oe] = typeof F == "number" ? [F, F] : [F.x, F.y], { clientWidth: xe, clientHeight: Re } = D;
649
649
  return E.x < G || E.x + Q.width > xe - G || E.y < oe || E.y + Q.height > Re - oe;
650
- }, Ve = () => {
650
+ }, Be = () => {
651
651
  if (H(t.disabled) || !I.value) return;
652
652
  const E = H(m);
653
653
  if (!E) return;
@@ -657,8 +657,8 @@ function _e(e, t = {}) {
657
657
  y: Q - E.scrollTop
658
658
  }, E, N.margin, D) ? ge() : fe();
659
659
  };
660
- H(C) && ce(x, Ve);
661
- const Be = (E) => {
660
+ H(C) && ce(x, Be);
661
+ const Ve = (E) => {
662
662
  var D;
663
663
  if (!H(g).includes(E.button) || H(t.disabled) || !X(E) || H(s) && E.target !== H(e)) return;
664
664
  const F = H(m), Q = F == null || (D = F.getBoundingClientRect) === null || D === void 0 ? void 0 : D.call(F), G = H(e).getBoundingClientRect(), oe = {
@@ -669,7 +669,7 @@ function _e(e, t = {}) {
669
669
  }, Pe = (E) => {
670
670
  if (H(t.disabled) || !X(E) || !I.value) return;
671
671
  const D = H(m);
672
- D instanceof HTMLElement && Hn(D);
672
+ D instanceof HTMLElement && Dn(D);
673
673
  const F = H(e).getBoundingClientRect();
674
674
  let { x: Q, y: G } = x.value;
675
675
  if ((Z === "x" || Z === "both") && (Q = E.clientX - I.value.x, D && (Q = Math.min(Math.max(0, Q), D.scrollWidth - F.width))), (Z === "y" || Z === "both") && (G = E.clientY - I.value.y, D && (G = Math.min(Math.max(0, G), D.scrollHeight - F.height))), H(C) && D && (ne === null && ee(D, F, {
@@ -692,7 +692,7 @@ function _e(e, t = {}) {
692
692
  }, He = (E) => {
693
693
  H(t.disabled) || !X(E) || I.value && (I.value = void 0, C && fe(), f?.(x.value, E), M(E));
694
694
  };
695
- if (At) {
695
+ if (Lt) {
696
696
  const E = () => {
697
697
  var D;
698
698
  return {
@@ -700,31 +700,31 @@ function _e(e, t = {}) {
700
700
  passive: !H(c)
701
701
  };
702
702
  };
703
- Ee(v, "pointerdown", Be, E), Ee(y, "pointermove", Pe, E), Ee(y, "pointerup", He, E);
703
+ Ee(v, "pointerdown", Ve, E), Ee(y, "pointermove", Pe, E), Ee(y, "pointerup", He, E);
704
704
  }
705
705
  return {
706
- ...Sn(x),
706
+ ...In(x),
707
707
  position: x,
708
- isDragging: T(() => !!I.value),
709
- style: T(() => `
708
+ isDragging: S(() => !!I.value),
709
+ style: S(() => `
710
710
  left: ${x.value.x}px;
711
711
  top: ${x.value.y}px;
712
712
  ${C ? "text-wrap: nowrap;" : ""}
713
713
  `)
714
714
  };
715
715
  }
716
- function qe(e, t, n = {}) {
717
- const { window: l = We, ...u } = n;
718
- let o;
719
- const a = /* @__PURE__ */ Ht(() => l && "ResizeObserver" in l), c = () => {
720
- o && (o.disconnect(), o = void 0);
721
- }, r = ce(T(() => {
716
+ function Je(e, t, n = {}) {
717
+ const { window: o = We, ...u } = n;
718
+ let l;
719
+ const a = /* @__PURE__ */ Dt(() => o && "ResizeObserver" in o), c = () => {
720
+ l && (l.disconnect(), l = void 0);
721
+ }, r = ce(S(() => {
722
722
  const h = H(e);
723
723
  return Array.isArray(h) ? h.map((f) => we(f)) : [we(h)];
724
724
  }), (h) => {
725
- if (c(), a.value && l) {
726
- o = new ResizeObserver(t);
727
- for (const f of h) f && o.observe(f, u);
725
+ if (c(), a.value && o) {
726
+ l = new ResizeObserver(t);
727
+ for (const f of h) f && l.observe(f, u);
728
728
  }
729
729
  }, {
730
730
  immediate: !0,
@@ -732,13 +732,13 @@ function qe(e, t, n = {}) {
732
732
  }), s = () => {
733
733
  c(), r();
734
734
  };
735
- return ft(s), {
735
+ return vt(s), {
736
736
  isSupported: a,
737
737
  stop: s
738
738
  };
739
739
  }
740
740
  function Te(e, t = {}) {
741
- const { reset: n = !0, windowResize: l = !0, windowScroll: u = !0, immediate: o = !0, updateTiming: a = "sync" } = t, c = re(0), r = re(0), s = re(0), h = re(0), f = re(0), w = re(0), L = re(0), Z = re(0);
741
+ const { reset: n = !0, windowResize: o = !0, windowScroll: u = !0, immediate: l = !0, updateTiming: a = "sync" } = t, c = re(0), r = re(0), s = re(0), h = re(0), f = re(0), w = re(0), L = re(0), Z = re(0);
742
742
  function y() {
743
743
  const v = we(e);
744
744
  if (!v) {
@@ -751,11 +751,11 @@ function Te(e, t = {}) {
751
751
  function m() {
752
752
  a === "sync" ? y() : a === "next-frame" && requestAnimationFrame(() => y());
753
753
  }
754
- return qe(e, m), ce(() => we(e), (v) => !v && m()), Lt(e, m, { attributeFilter: ["style", "class"] }), u && Ee("scroll", m, {
754
+ return Je(e, m), ce(() => we(e), (v) => !v && m()), Ot(e, m, { attributeFilter: ["style", "class"] }), u && Ee("scroll", m, {
755
755
  capture: !0,
756
756
  passive: !0
757
- }), l && Ee("resize", m, { passive: !0 }), $n(() => {
758
- o && m();
757
+ }), o && Ee("resize", m, { passive: !0 }), An(() => {
758
+ l && m();
759
759
  }), {
760
760
  height: c,
761
761
  bottom: r,
@@ -772,34 +772,34 @@ function et(e) {
772
772
  return typeof Window < "u" && e instanceof Window ? e.document.documentElement : typeof Document < "u" && e instanceof Document ? e.documentElement : e;
773
773
  }
774
774
  const tt = /* @__PURE__ */ new WeakMap();
775
- function Ln(e, t = !1) {
775
+ function On(e, t = !1) {
776
776
  const n = re(t);
777
- let l = "";
778
- ce(kn(e), (a) => {
777
+ let o = "";
778
+ ce(Rn(e), (a) => {
779
779
  const c = et(H(a));
780
780
  if (c) {
781
781
  const r = c;
782
- if (tt.get(r) || tt.set(r, r.style.overflow), r.style.overflow !== "hidden" && (l = r.style.overflow), r.style.overflow === "hidden") return n.value = !0;
782
+ if (tt.get(r) || tt.set(r, r.style.overflow), r.style.overflow !== "hidden" && (o = r.style.overflow), r.style.overflow === "hidden") return n.value = !0;
783
783
  if (n.value) return r.style.overflow = "hidden";
784
784
  }
785
785
  }, { immediate: !0 });
786
786
  const u = () => {
787
787
  const a = et(H(e));
788
788
  !a || n.value || (a.style.overflow = "hidden", n.value = !0);
789
- }, o = () => {
789
+ }, l = () => {
790
790
  const a = et(H(e));
791
- !a || !n.value || (a.style.overflow = l, tt.delete(a), n.value = !1);
791
+ !a || !n.value || (a.style.overflow = o, tt.delete(a), n.value = !1);
792
792
  };
793
- return ft(o), T({
793
+ return vt(l), S({
794
794
  get() {
795
795
  return n.value;
796
796
  },
797
797
  set(a) {
798
- a ? u() : o();
798
+ a ? u() : l();
799
799
  }
800
800
  });
801
801
  }
802
- const Dt = {
802
+ const Bt = {
803
803
  ATextInput: "text",
804
804
  ATextarea: "text",
805
805
  ANumericInput: "number",
@@ -813,88 +813,99 @@ const Dt = {
813
813
  ADropdown: "select",
814
814
  ACodeEditor: "code",
815
815
  AFormLink: "link",
816
- AFileAttach: "attach"
816
+ AFileAttach: "attach",
817
+ AQuantityInput: "quantity"
817
818
  };
818
- function Ot(e) {
819
- return e ? Dt[e] : void 0;
819
+ function ht(e) {
820
+ return e ? Bt[e] : void 0;
820
821
  }
821
- const Dn = {
822
+ const Bn = {
822
823
  AFormLink: "inline",
823
824
  AForm: "expand",
824
825
  ATable: "expand"
825
826
  };
826
827
  [
827
- .../* @__PURE__ */ new Set([...Object.keys(Dt), ...Object.keys(Dn)])
828
+ .../* @__PURE__ */ new Set([...Object.keys(Bt), ...Object.keys(Bn)])
828
829
  ].toSorted();
829
- const On = (e) => {
830
+ const Vn = (e) => {
830
831
  const t = new DOMParser().parseFromString(e, "text/html");
831
832
  return Array.from(t.body.childNodes).some((n) => n.nodeType === 1);
832
- }, Vn = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join("");
833
- function Vt(e, t) {
833
+ }, Pn = (e = 8) => Array.from({ length: e }, () => Math.floor(Math.random() * 16).toString(16)).join(""), Vt = (e) => {
834
+ if (e == null) return "";
835
+ if (typeof e == "object") {
836
+ const t = e.qty ?? "", n = e.uom ?? "";
837
+ return n ? `${t} ${n}`.trim() : String(t);
838
+ }
839
+ return String(e);
840
+ };
841
+ function lt(e) {
842
+ return e !== null && typeof e == "object" && "qty" in e ? Number(e.qty) : Number(e);
843
+ }
844
+ function Pt(e, t) {
834
845
  const n = t[e];
835
846
  if (n.isRoot || n.parent === null || n.parent === void 0)
836
847
  return !0;
837
- const l = n.parent;
838
- return l < 0 || l >= t.length ? !1 : (t[l].childrenOpen || !1) && Vt(l, t);
848
+ const o = n.parent;
849
+ return o < 0 || o >= t.length ? !1 : (t[o].childrenOpen || !1) && Pt(o, t);
839
850
  }
840
- function Bn(e, t, n) {
841
- const l = n.filterType || "text", u = t.value;
842
- if (!u && l !== "dateRange" && l !== "checkbox") return !0;
843
- switch (l) {
851
+ function Zn(e, t, n) {
852
+ const o = n.filterType || "text", u = t.value;
853
+ if (!u && o !== "dateRange" && o !== "checkbox") return !0;
854
+ switch (o) {
844
855
  case "text":
845
856
  return (typeof e == "object" && e !== null ? Object.values(e).join(" ") : String(e || "")).toLowerCase().includes(String(u).toLowerCase());
846
857
  case "number": {
847
- const o = Number(e), a = Number(u);
848
- return !isNaN(o) && !isNaN(a) && o === a;
858
+ const l = lt(e), a = Number(u);
859
+ return !isNaN(l) && !isNaN(a) && l === a;
849
860
  }
850
861
  case "select":
851
862
  return e === u;
852
863
  case "checkbox":
853
864
  return u === !0 ? !!e : !0;
854
865
  case "date": {
855
- let o;
866
+ let l;
856
867
  if (typeof e == "number") {
857
868
  const c = new Date(e), r = (/* @__PURE__ */ new Date()).getFullYear();
858
- o = new Date(r, c.getMonth(), c.getDate());
869
+ l = new Date(r, c.getMonth(), c.getDate());
859
870
  } else
860
- o = new Date(String(e));
871
+ l = new Date(String(e));
861
872
  const a = new Date(String(u));
862
- return o.toDateString() === a.toDateString();
873
+ return l.toDateString() === a.toDateString();
863
874
  }
864
875
  case "dateRange": {
865
- const o = t.startValue, a = t.endValue;
866
- if (!o && !a) return !0;
876
+ const l = t.startValue, a = t.endValue;
877
+ if (!l && !a) return !0;
867
878
  let c;
868
879
  if (typeof e == "number") {
869
880
  const r = new Date(e), s = (/* @__PURE__ */ new Date()).getFullYear();
870
881
  c = new Date(s, r.getMonth(), r.getDate());
871
882
  } else
872
883
  c = new Date(String(e));
873
- return !(o && c < new Date(String(o)) || a && c > new Date(String(a)));
884
+ return !(l && c < new Date(String(l)) || a && c > new Date(String(a)));
874
885
  }
875
886
  default:
876
887
  return !0;
877
888
  }
878
889
  }
879
- function Pn(e, t) {
890
+ function Nn(e, t) {
880
891
  return t && e === 0 && t > 0 ? `${t}ch` : "inherit";
881
892
  }
882
- const Zn = (e) => {
883
- const t = e.id || Vn(), n = e.linkResolver ?? null;
884
- return _t(`table-${t}`, () => {
893
+ const Fn = (e) => {
894
+ const t = e.id || Pn(), n = e.linkResolver ?? null;
895
+ return tn(`table-${t}`, () => {
885
896
  const u = () => {
886
897
  const i = [Object.assign({}, { rowModified: !1 })], d = /* @__PURE__ */ new Set();
887
898
  for (let O = 0; O < a.value.length; O++) {
888
- const S = a.value[O];
889
- S.parent !== null && S.parent !== void 0 && d.add(S.parent);
899
+ const T = a.value[O];
900
+ T.parent !== null && T.parent !== void 0 && d.add(T.parent);
890
901
  }
891
902
  const p = (O) => a.value[O]?.gantt !== void 0, A = (O) => {
892
- for (let S = 0; S < a.value.length; S++)
893
- if (a.value[S].parent === O && (p(S) || A(S)))
903
+ for (let T = 0; T < a.value.length; T++)
904
+ if (a.value[T].parent === O && (p(T) || A(T)))
894
905
  return !0;
895
906
  return !1;
896
- }, J = (O) => {
897
- const S = c.value, Y = S.view === "tree" || S.view === "tree-gantt" ? S.defaultTreeExpansion : void 0;
907
+ }, q = (O) => {
908
+ const T = c.value, Y = T.view === "tree" || T.view === "tree-gantt" ? T.defaultTreeExpansion : void 0;
898
909
  if (!Y) return !0;
899
910
  switch (Y) {
900
911
  case "root":
@@ -910,34 +921,34 @@ const Zn = (e) => {
910
921
  }
911
922
  };
912
923
  for (let O = 0; O < a.value.length; O++) {
913
- const S = a.value[O], Y = S.parent === null || S.parent === void 0, ie = d.has(O);
924
+ const T = a.value[O], Y = T.parent === null || T.parent === void 0, ie = d.has(O);
914
925
  i[O] = {
915
- childrenOpen: J(O),
926
+ childrenOpen: q(O),
916
927
  expanded: !1,
917
- indent: S.indent || 0,
928
+ indent: T.indent || 0,
918
929
  isParent: ie,
919
930
  isRoot: Y,
920
931
  rowModified: !1,
921
932
  open: Y,
922
933
  // This will be recalculated later for non-root nodes
923
- parent: S.parent
934
+ parent: T.parent
924
935
  };
925
936
  }
926
937
  return i;
927
- }, o = W(e.columns), a = W(e.rows), c = W(e.config || {}), r = W({}), s = W({}), h = T(() => {
938
+ }, l = W(e.columns), a = W(e.rows), c = W(e.config || {}), r = W({}), s = W({}), h = S(() => {
928
939
  const i = {};
929
- for (const [d, p] of o.value.entries())
930
- for (const [A, J] of a.value.entries())
931
- i[`${d}:${A}`] = J[p.name];
940
+ for (const [d, p] of l.value.entries())
941
+ for (const [A, q] of a.value.entries())
942
+ i[`${d}:${A}`] = q[p.name];
932
943
  return i;
933
- }), f = T({
944
+ }), f = S({
934
945
  get: () => {
935
946
  const i = u();
936
947
  for (let d = 0; d < i.length; d++)
937
948
  r.value[d] && (i[d].rowModified = r.value[d]), s.value[d] && (s.value[d].childrenOpen !== void 0 && (i[d].childrenOpen = s.value[d].childrenOpen), s.value[d].expanded !== void 0 && (i[d].expanded = s.value[d].expanded));
938
949
  if (x.value)
939
950
  for (let d = 0; d < i.length; d++)
940
- i[d].isRoot || (i[d].open = Vt(d, i));
951
+ i[d].isRoot || (i[d].open = Pt(d, i));
941
952
  return i;
942
953
  },
943
954
  set: (i) => {
@@ -946,42 +957,42 @@ const Zn = (e) => {
946
957
  }), w = W(e.modal || { visible: !1 }), L = W({}), Z = W([]), y = W([]), m = W([]), v = W({
947
958
  column: null,
948
959
  direction: null
949
- }), g = W({}), k = T(() => o.value.some((i) => i.pinned)), C = T(() => c.value.view === "gantt" || c.value.view === "tree-gantt"), x = T(() => c.value.view === "tree" || c.value.view === "tree-gantt"), I = T(() => {
960
+ }), g = W({}), k = S(() => l.value.some((i) => i.pinned)), C = S(() => c.value.view === "gantt" || c.value.view === "tree-gantt"), x = S(() => c.value.view === "tree" || c.value.view === "tree-gantt"), I = S(() => {
950
961
  const i = c.value;
951
962
  return i.view === "gantt" || i.view === "tree-gantt" ? i.dependencyGraph !== !1 : !0;
952
- }), X = T(() => `${Math.ceil(a.value.length / 100 + 1)}ch`), M = T(
963
+ }), X = S(() => `${Math.ceil(a.value.length / 100 + 1)}ch`), M = S(
953
964
  () => c.value.view ? ["list", "tree", "tree-gantt", "list-expansion"].includes(c.value.view) : !1
954
- ), V = T(() => {
965
+ ), B = S(() => {
955
966
  let i = a.value.map((d, p) => ({
956
967
  ...d,
957
968
  originalIndex: p
958
969
  }));
959
970
  if (Object.entries(g.value).forEach(([d, p]) => {
960
- const A = parseInt(d), J = o.value[A];
961
- !J || !(p.value || p.startValue || p.endValue || J.filterType === "checkbox" && p.value !== void 0) || (i = i.filter((S) => {
962
- const Y = S[J.name];
963
- return Bn(Y, p, J);
971
+ const A = parseInt(d), q = l.value[A];
972
+ !q || !(p.value || p.startValue || p.endValue || q.filterType === "checkbox" && p.value !== void 0) || (i = i.filter((T) => {
973
+ const Y = T[q.name];
974
+ return Zn(Y, p, q);
964
975
  }));
965
976
  }), v.value.column !== null && v.value.direction) {
966
- const d = o.value[v.value.column], p = v.value.direction;
967
- i.sort((A, J) => {
968
- let O = A[d.name], S = J[d.name];
969
- O == null && (O = ""), S == null && (S = "");
970
- const Y = Number(O), ie = Number(S);
971
- if (!isNaN(Y) && !isNaN(ie) && O !== "" && S !== "")
977
+ const d = l.value[v.value.column], p = v.value.direction;
978
+ i.sort((A, q) => {
979
+ let O = A[d.name], T = q[d.name];
980
+ O == null && (O = ""), T == null && (T = "");
981
+ const Y = lt(O), ie = lt(T);
982
+ if (!isNaN(Y) && !isNaN(ie) && O !== "" && T !== "")
972
983
  return p === "asc" ? Y - ie : ie - Y;
973
984
  {
974
- const ht = String(O).toLowerCase(), mt = String(S).toLowerCase();
975
- return p === "asc" ? ht.localeCompare(mt) : mt.localeCompare(ht);
985
+ const gt = String(O).toLowerCase(), wt = String(T).toLowerCase();
986
+ return p === "asc" ? gt.localeCompare(wt) : wt.localeCompare(gt);
976
987
  }
977
988
  });
978
989
  }
979
990
  return i;
980
- }), N = (i, d) => h.value[`${i}:${d}`], q = (i, d, p) => {
981
- const A = `${i}:${d}`, J = o.value[i];
991
+ }), N = (i, d) => h.value[`${i}:${d}`], J = (i, d, p) => {
992
+ const A = `${i}:${d}`, q = l.value[i];
982
993
  h.value[A] !== p && (r.value[d] = !0), h.value[A] = p, a.value[d] = {
983
994
  ...a.value[d],
984
- [J.name]: p
995
+ [q.name]: p
985
996
  };
986
997
  }, ee = (i) => {
987
998
  a.value = i;
@@ -989,7 +1000,7 @@ const Zn = (e) => {
989
1000
  const A = `${i}:${d}`;
990
1001
  h.value[A] !== p && (r.value[d] = !0, L.value[A] = p);
991
1002
  }, ge = (i) => {
992
- const d = o.value.indexOf(i) === o.value.length - 1, p = c.value.fullWidth ? i.resizable && !d : i.resizable;
1003
+ const d = l.value.indexOf(i) === l.value.length - 1, p = c.value.fullWidth ? i.resizable && !d : i.resizable;
993
1004
  return {
994
1005
  width: i.width || "40ch",
995
1006
  textAlign: i.align || "center",
@@ -1000,16 +1011,16 @@ const Zn = (e) => {
1000
1011
  }
1001
1012
  };
1002
1013
  }, fe = (i, d) => {
1003
- if (i < 0 || i >= o.value.length) return;
1014
+ if (i < 0 || i >= l.value.length) return;
1004
1015
  const A = Math.max(d, 40);
1005
- o.value[i] = {
1006
- ...o.value[i],
1016
+ l.value[i] = {
1017
+ ...l.value[i],
1007
1018
  width: `${A}px`
1008
1019
  };
1009
1020
  }, Oe = (i) => {
1010
1021
  const d = a.value[i];
1011
1022
  return C.value && d.gantt !== void 0;
1012
- }, Ve = (i) => !x.value || f.value[i].isRoot || f.value[i].open, Be = (i) => !x.value && c.value.view !== "list-expansion" ? "" : x.value && (f.value[i].isRoot || f.value[i].isParent) ? f.value[i].childrenOpen ? "▼" : "►" : c.value.view === "list-expansion" ? f.value[i].expanded ? "▼" : "►" : "", Pe = (i) => {
1023
+ }, Be = (i) => !x.value || f.value[i].isRoot || f.value[i].open, Ve = (i) => !x.value && c.value.view !== "list-expansion" ? "" : x.value && (f.value[i].isRoot || f.value[i].isParent) ? f.value[i].childrenOpen ? "▼" : "►" : c.value.view === "list-expansion" ? f.value[i].expanded ? "▼" : "►" : "", Pe = (i) => {
1013
1024
  if (x.value) {
1014
1025
  const d = s.value[i] || {}, A = !(d.childrenOpen ?? f.value[i].childrenOpen);
1015
1026
  s.value[i] = {
@@ -1036,12 +1047,12 @@ const Zn = (e) => {
1036
1047
  const p = N(i, d);
1037
1048
  return D(i, d, p);
1038
1049
  }, D = (i, d, p) => {
1039
- const A = o.value[i], J = a.value[d], O = A.format;
1050
+ const A = l.value[i], q = a.value[d], O = A.format;
1040
1051
  if (!O) {
1041
- const S = Ot(A.component);
1042
- return S === "boolean" ? p ? "✓" : "✗" : S === "date" ? p != null ? new Date(String(p)).toLocaleDateString() : p : S === "datetime" && p != null ? new Date(String(p)).toLocaleString() : p;
1052
+ const T = ht(A.component);
1053
+ return T === "boolean" ? p ? "✓" : "✗" : T === "date" ? p != null ? new Date(String(p)).toLocaleDateString() : p : T === "datetime" ? p != null ? new Date(String(p)).toLocaleString() : p : T === "quantity" ? Vt(p) : p;
1043
1054
  }
1044
- return typeof O == "function" ? O(p, { table: h.value, row: J, column: A }) : typeof O == "string" ? Function(`"use strict";return (${O})`)()(p, { table: h.value, row: J, column: A }) : p;
1055
+ return typeof O == "function" ? O(p, { table: h.value, row: q, column: A }) : typeof O == "string" ? Function(`"use strict";return (${O})`)()(p, { table: h.value, row: q, column: A }) : p;
1045
1056
  }, F = (i) => {
1046
1057
  i.target instanceof Node && w.value.parent?.contains(i.target) || w.value.visible && (w.value.visible = !1);
1047
1058
  }, Q = (i) => {
@@ -1060,8 +1071,8 @@ const Zn = (e) => {
1060
1071
  const d = y.value.findIndex((p) => p.id === i);
1061
1072
  d >= 0 && y.value.splice(d, 1);
1062
1073
  }, $ = (i, d, p) => {
1063
- const A = y.value.find((S) => S.id === i), J = y.value.find((S) => S.id === d);
1064
- if (!A || !J)
1074
+ const A = y.value.find((T) => T.id === i), q = y.value.find((T) => T.id === d);
1075
+ if (!A || !q)
1065
1076
  return console.warn("Cannot create connection: handle not found"), null;
1066
1077
  const O = {
1067
1078
  id: `connection-${i}-${d}`,
@@ -1070,18 +1081,18 @@ const Zn = (e) => {
1070
1081
  side: A.side
1071
1082
  },
1072
1083
  to: {
1073
- barId: J.barId,
1074
- side: J.side
1084
+ barId: q.barId,
1085
+ side: q.side
1075
1086
  },
1076
1087
  style: p?.style,
1077
1088
  label: p?.label
1078
1089
  };
1079
1090
  return m.value.push(O), O;
1080
- }, B = (i) => {
1091
+ }, V = (i) => {
1081
1092
  const d = m.value.findIndex((p) => p.id === i);
1082
1093
  return d >= 0 ? (m.value.splice(d, 1), !0) : !1;
1083
- }, j = (i) => m.value.filter((d) => d.from.barId === i || d.to.barId === i), U = (i) => y.value.filter((d) => d.barId === i), K = (i) => {
1084
- if (o.value[i].sortable === !1) return;
1094
+ }, U = (i) => m.value.filter((d) => d.from.barId === i || d.to.barId === i), j = (i) => y.value.filter((d) => d.barId === i), K = (i) => {
1095
+ if (l.value[i].sortable === !1) return;
1085
1096
  let p;
1086
1097
  v.value.column === i && v.value.direction === "asc" ? p = "desc" : p = "asc", v.value.column = i, v.value.direction = p;
1087
1098
  }, te = (i, d) => {
@@ -1090,15 +1101,15 @@ const Zn = (e) => {
1090
1101
  delete g.value[i];
1091
1102
  }, se = (i, d = "end") => {
1092
1103
  const p = {};
1093
- for (const J of o.value)
1094
- p[J.name] = "";
1104
+ for (const q of l.value)
1105
+ p[q.name] = "";
1095
1106
  i && Object.assign(p, i);
1096
1107
  let A;
1097
1108
  return d === "start" ? (A = 0, a.value.unshift(p)) : d === "end" ? (A = a.value.length, a.value.push(p)) : (A = Math.max(0, Math.min(d, a.value.length)), a.value.splice(A, 0, p)), A;
1098
1109
  };
1099
1110
  return {
1100
1111
  // state
1101
- columns: o,
1112
+ columns: l,
1102
1113
  config: c,
1103
1114
  connectionHandles: y,
1104
1115
  connectionPaths: m,
@@ -1111,7 +1122,7 @@ const Zn = (e) => {
1111
1122
  table: h,
1112
1123
  updates: L,
1113
1124
  // getters
1114
- filteredRows: V,
1125
+ filteredRows: B,
1115
1126
  hasPinnedColumns: k,
1116
1127
  isGanttView: C,
1117
1128
  isTreeView: x,
@@ -1125,20 +1136,20 @@ const Zn = (e) => {
1125
1136
  clearFilter: le,
1126
1137
  closeModal: F,
1127
1138
  createConnection: $,
1128
- deleteConnection: B,
1139
+ deleteConnection: V,
1129
1140
  deleteRow: (i) => {
1130
1141
  if (i < 0 || i >= a.value.length)
1131
1142
  return null;
1132
1143
  const [d] = a.value.splice(i, 1);
1133
1144
  delete r.value[i], delete s.value[i];
1134
1145
  const p = {}, A = {};
1135
- for (const [J, O] of Object.entries(r.value)) {
1136
- const S = parseInt(J);
1137
- S > i ? p[S - 1] = O : p[S] = O;
1146
+ for (const [q, O] of Object.entries(r.value)) {
1147
+ const T = parseInt(q);
1148
+ T > i ? p[T - 1] = O : p[T] = O;
1138
1149
  }
1139
- for (const [J, O] of Object.entries(s.value)) {
1140
- const S = parseInt(J);
1141
- S > i ? A[S - 1] = O : A[S] = O;
1150
+ for (const [q, O] of Object.entries(s.value)) {
1151
+ const T = parseInt(q);
1152
+ T > i ? A[T - 1] = O : A[T] = O;
1142
1153
  }
1143
1154
  return r.value = p, s.value = A, d;
1144
1155
  },
@@ -1150,11 +1161,11 @@ const Zn = (e) => {
1150
1161
  },
1151
1162
  getCellData: N,
1152
1163
  getCellDisplayValue: E,
1153
- getConnectionsForBar: j,
1164
+ getConnectionsForBar: U,
1154
1165
  getFormattedValue: D,
1155
- getHandlesForBar: U,
1166
+ getHandlesForBar: j,
1156
1167
  getHeaderCellStyle: ge,
1157
- getRowExpandSymbol: Be,
1168
+ getRowExpandSymbol: Ve,
1158
1169
  insertRowAbove: (i, d) => {
1159
1170
  const p = Math.max(0, i);
1160
1171
  return se(d, p);
@@ -1164,29 +1175,29 @@ const Zn = (e) => {
1164
1175
  return se(d, p);
1165
1176
  },
1166
1177
  isRowGantt: Oe,
1167
- isRowVisible: Ve,
1178
+ isRowVisible: Be,
1168
1179
  moveRow: (i, d) => {
1169
1180
  if (i < 0 || i >= a.value.length || d < 0 || d >= a.value.length || i === d)
1170
1181
  return !1;
1171
1182
  const [p] = a.value.splice(i, 1);
1172
1183
  a.value.splice(d, 0, p);
1173
- const A = {}, J = {};
1174
- for (const [O, S] of Object.entries(r.value)) {
1184
+ const A = {}, q = {};
1185
+ for (const [O, T] of Object.entries(r.value)) {
1175
1186
  const Y = parseInt(O);
1176
1187
  let ie = Y;
1177
- Y === i ? ie = d : i < d ? Y > i && Y <= d && (ie = Y - 1) : Y >= d && Y < i && (ie = Y + 1), A[ie] = S;
1188
+ Y === i ? ie = d : i < d ? Y > i && Y <= d && (ie = Y - 1) : Y >= d && Y < i && (ie = Y + 1), A[ie] = T;
1178
1189
  }
1179
- for (const [O, S] of Object.entries(s.value)) {
1190
+ for (const [O, T] of Object.entries(s.value)) {
1180
1191
  const Y = parseInt(O);
1181
1192
  let ie = Y;
1182
- Y === i ? ie = d : i < d ? Y > i && Y <= d && (ie = Y - 1) : Y >= d && Y < i && (ie = Y + 1), J[ie] = S;
1193
+ Y === i ? ie = d : i < d ? Y > i && Y <= d && (ie = Y - 1) : Y >= d && Y < i && (ie = Y + 1), q[ie] = T;
1183
1194
  }
1184
- return r.value = A, s.value = J, !0;
1195
+ return r.value = A, s.value = q, !0;
1185
1196
  },
1186
1197
  registerConnectionHandle: xe,
1187
1198
  registerGanttBar: G,
1188
1199
  resizeColumn: fe,
1189
- setCellData: q,
1200
+ setCellData: J,
1190
1201
  setCellText: ne,
1191
1202
  setFilter: te,
1192
1203
  sortByColumn: K,
@@ -1197,7 +1208,7 @@ const Zn = (e) => {
1197
1208
  updateRows: ee
1198
1209
  };
1199
1210
  })();
1200
- }, Nn = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], Fn = ["innerHTML"], Wn = { key: 2 }, zn = /* @__PURE__ */ Ce({
1211
+ }, Wn = ["data-colindex", "data-rowindex", "data-editable", "contenteditable", "tabindex"], zn = ["innerHTML"], Xn = { key: 2 }, Gn = /* @__PURE__ */ Ce({
1201
1212
  __name: "ACell",
1202
1213
  props: {
1203
1214
  colIndex: {},
@@ -1209,37 +1220,37 @@ const Zn = (e) => {
1209
1220
  debounce: { default: 300 }
1210
1221
  },
1211
1222
  setup(e, { expose: t }) {
1212
- const n = de("cell"), l = e.store.getCellData(e.colIndex, e.rowIndex), u = W(""), o = W(!1), a = e.store.columns[e.colIndex], c = e.store.rows[e.rowIndex], r = a.align || "center", s = a.width || "40ch", h = T(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), f = W(null);
1223
+ const n = de("cell"), o = e.store.getCellData(e.colIndex, e.rowIndex), u = W(""), l = W(!1), a = e.store.columns[e.colIndex], c = e.store.rows[e.rowIndex], r = a.align || "center", s = a.width || "40ch", h = S(() => e.store.getCellDisplayValue(e.colIndex, e.rowIndex)), f = W(null);
1213
1224
  Ie(() => {
1214
1225
  if (!a.linkDoctype) return;
1215
1226
  const M = e.store.getCellData(e.colIndex, e.rowIndex);
1216
1227
  if (M != null && typeof M == "object") {
1217
- const N = M, q = N.displayText ?? N.id;
1218
- (typeof q == "string" || typeof q == "number") && (f.value = String(q));
1228
+ const N = M, J = N.displayText ?? N.id;
1229
+ (typeof J == "string" || typeof J == "number") && (f.value = String(J));
1219
1230
  return;
1220
1231
  }
1221
- const V = e.store.linkResolver;
1222
- !V || typeof M != "string" || M === "" || V(a.linkDoctype, M).then((N) => (N != null && (f.value = N), N));
1232
+ const B = e.store.linkResolver;
1233
+ !B || typeof M != "string" || M === "" || B(a.linkDoctype, M).then((N) => (N != null && (f.value = N), N));
1223
1234
  });
1224
- const w = T(() => f.value ?? h.value), L = T(() => typeof w.value == "string" ? On(w.value) : !1), Z = T(() => ({
1235
+ const w = S(() => f.value ?? h.value), L = S(() => typeof w.value == "string" ? Vn(w.value) : !1), Z = S(() => ({
1225
1236
  textAlign: r,
1226
1237
  width: s,
1227
- fontWeight: o.value ? "bold" : "inherit",
1228
- paddingLeft: Pn(e.colIndex, e.store.display[e.rowIndex]?.indent)
1229
- })), y = T(() => ({
1238
+ fontWeight: l.value ? "bold" : "inherit",
1239
+ paddingLeft: Nn(e.colIndex, e.store.display[e.rowIndex]?.indent)
1240
+ })), y = S(() => ({
1230
1241
  "sticky-column": e.pinned,
1231
- "cell-modified": o.value
1242
+ "cell-modified": l.value
1232
1243
  })), m = () => {
1233
1244
  g(), v();
1234
1245
  }, v = () => {
1235
- const { left: M, bottom: V, width: N, height: q } = Te(n);
1246
+ const { left: M, bottom: B, width: N, height: J } = Te(n);
1236
1247
  a.mask, a.modalComponent && e.store.$patch((ee) => {
1237
- ee.modal.visible = !0, ee.modal.colIndex = e.colIndex, ee.modal.rowIndex = e.rowIndex, ee.modal.left = M.value, ee.modal.bottom = V.value, ee.modal.width = N.value, ee.modal.height = q.value, ee.modal.cell = n.value, typeof a.modalComponent == "function" ? ee.modal.component = a.modalComponent({ table: e.store.table, row: c, column: a }) : ee.modal.component = a.modalComponent, ee.modal.componentProps = a.modalComponentExtraProps;
1248
+ ee.modal.visible = !0, ee.modal.colIndex = e.colIndex, ee.modal.rowIndex = e.rowIndex, ee.modal.left = M.value, ee.modal.bottom = B.value, ee.modal.width = N.value, ee.modal.height = J.value, ee.modal.cell = n.value, typeof a.modalComponent == "function" ? ee.modal.component = a.modalComponent({ table: e.store.table, row: c, column: a }) : ee.modal.component = a.modalComponent, ee.modal.componentProps = a.modalComponentExtraProps;
1238
1249
  });
1239
1250
  };
1240
1251
  if (e.addNavigation) {
1241
1252
  let M = {
1242
- ...Je,
1253
+ ...qe,
1243
1254
  "keydown.f2": v,
1244
1255
  "keydown.alt.up": v,
1245
1256
  "keydown.alt.down": v,
@@ -1249,7 +1260,7 @@ const Zn = (e) => {
1249
1260
  typeof e.addNavigation == "object" && (M = {
1250
1261
  ...M,
1251
1262
  ...e.addNavigation
1252
- }), It([
1263
+ }), Ht([
1253
1264
  {
1254
1265
  selectors: n,
1255
1266
  handlers: M
@@ -1261,8 +1272,8 @@ const Zn = (e) => {
1261
1272
  const M = window.getSelection();
1262
1273
  if (M)
1263
1274
  try {
1264
- const V = document.createRange();
1265
- V.selectNodeContents && (V.selectNodeContents(n.value), M.removeAllRanges(), M.addRange(V));
1275
+ const B = document.createRange();
1276
+ B.selectNodeContents && (B.selectNodeContents(n.value), M.removeAllRanges(), M.addRange(B));
1266
1277
  } catch {
1267
1278
  }
1268
1279
  }
@@ -1272,9 +1283,9 @@ const Zn = (e) => {
1272
1283
  try {
1273
1284
  const M = window.getSelection();
1274
1285
  if (M && M.rangeCount > 0 && n.value) {
1275
- const V = M.getRangeAt(0), N = V.cloneRange();
1286
+ const B = M.getRangeAt(0), N = B.cloneRange();
1276
1287
  if (N.selectNodeContents && N.setEnd)
1277
- return N.selectNodeContents(n.value), N.setEnd(V.endContainer, V.endOffset), N.toString().length;
1288
+ return N.selectNodeContents(n.value), N.setEnd(B.endContainer, B.endOffset), N.toString().length;
1278
1289
  }
1279
1290
  } catch {
1280
1291
  }
@@ -1282,13 +1293,13 @@ const Zn = (e) => {
1282
1293
  }, x = (M) => {
1283
1294
  if (n.value)
1284
1295
  try {
1285
- const V = window.getSelection();
1286
- if (!V) return;
1296
+ const B = window.getSelection();
1297
+ if (!B) return;
1287
1298
  let N = 0;
1288
- const q = document.createTreeWalker ? document.createTreeWalker(n.value, NodeFilter.SHOW_TEXT, null) : null;
1289
- if (!q) return;
1299
+ const J = document.createTreeWalker ? document.createTreeWalker(n.value, NodeFilter.SHOW_TEXT, null) : null;
1300
+ if (!J) return;
1290
1301
  let ee, ne = null;
1291
- for (; ee = q.nextNode(); ) {
1302
+ for (; ee = J.nextNode(); ) {
1292
1303
  const ge = ee, fe = N + ge.textContent.length;
1293
1304
  if (M <= fe && (ne = document.createRange(), ne.setStart && ne.setEnd)) {
1294
1305
  ne.setStart(ge, M - N), ne.setEnd(ge, M - N);
@@ -1296,20 +1307,20 @@ const Zn = (e) => {
1296
1307
  }
1297
1308
  N = fe;
1298
1309
  }
1299
- ne && V.removeAllRanges && V.addRange && (V.removeAllRanges(), V.addRange(ne));
1310
+ ne && B.removeAllRanges && B.addRange && (B.removeAllRanges(), B.addRange(ne));
1300
1311
  } catch {
1301
1312
  }
1302
1313
  }, I = (M) => {
1303
1314
  if (!a.edit) return;
1304
- const V = M.target;
1305
- if (V.textContent === u.value)
1315
+ const B = M.target;
1316
+ if (B.textContent === u.value)
1306
1317
  return;
1307
1318
  const N = C();
1308
- u.value = V.textContent, a.format ? (o.value = V.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, l), e.store.setCellText(e.colIndex, e.rowIndex, V.textContent)) : (o.value = V.textContent !== l, e.store.setCellData(e.colIndex, e.rowIndex, V.textContent)), at().then(() => x(N));
1309
- }, X = /* @__PURE__ */ Tn(I, e.debounce);
1319
+ u.value = B.textContent, a.format ? (l.value = B.textContent !== e.store.getFormattedValue(e.colIndex, e.rowIndex, o), e.store.setCellText(e.colIndex, e.rowIndex, B.textContent)) : (l.value = B.textContent !== o, e.store.setCellData(e.colIndex, e.rowIndex, B.textContent)), st().then(() => x(N));
1320
+ }, X = /* @__PURE__ */ $n(I, e.debounce);
1310
1321
  return t({
1311
1322
  currentData: u
1312
- }), (M, V) => (b(), R("td", {
1323
+ }), (M, B) => (b(), R("td", {
1313
1324
  ref: "cell",
1314
1325
  "data-colindex": e.colIndex,
1315
1326
  "data-rowindex": e.rowIndex,
@@ -1321,26 +1332,26 @@ const Zn = (e) => {
1321
1332
  class: ae(["atable-cell", y.value]),
1322
1333
  onFocus: k,
1323
1334
  onPaste: I,
1324
- onInput: V[0] || (V[0] = //@ts-ignore
1335
+ onInput: B[0] || (B[0] = //@ts-ignore
1325
1336
  (...N) => P(X) && P(X)(...N)),
1326
1337
  onClick: m
1327
1338
  }, [
1328
- P(a).cellComponent ? (b(), ve(Ne(P(a).cellComponent), st({
1339
+ P(a).cellComponent ? (b(), ve(Ne(P(a).cellComponent), it({
1329
1340
  key: 0,
1330
1341
  value: w.value
1331
1342
  }, P(a).cellComponentProps), null, 16, ["value"])) : L.value ? (b(), R("span", {
1332
1343
  key: 1,
1333
1344
  innerHTML: w.value
1334
- }, null, 8, Fn)) : (b(), R("span", Wn, ye(w.value), 1))
1335
- ], 46, Nn));
1345
+ }, null, 8, zn)) : (b(), R("span", Xn, ye(w.value), 1))
1346
+ ], 46, Wn));
1336
1347
  }
1337
- }), Xn = ["colspan"], Gn = {
1348
+ }), jn = ["colspan"], Un = {
1338
1349
  ref: "container",
1339
1350
  class: "gantt-container"
1340
- }, Un = ["data-rowindex", "data-colindex"], jn = {
1351
+ }, Yn = ["data-rowindex", "data-colindex"], qn = {
1341
1352
  key: 2,
1342
1353
  class: "gantt-label"
1343
- }, Yn = ["x1", "y1", "x2", "y2"], Jn = /* @__PURE__ */ Ce({
1354
+ }, Jn = ["x1", "y1", "x2", "y2"], Qn = /* @__PURE__ */ Ce({
1344
1355
  __name: "AGanttCell",
1345
1356
  props: {
1346
1357
  store: {},
@@ -1355,18 +1366,18 @@ const Zn = (e) => {
1355
1366
  },
1356
1367
  emits: ["connection:create"],
1357
1368
  setup(e, { expose: t, emit: n }) {
1358
- Ut(($) => ({
1369
+ Yt(($) => ({
1359
1370
  v564d6da1: u.value,
1360
1371
  v4f540c19: $.colspan
1361
1372
  }));
1362
- const l = n, u = W(e.color.length >= 6 ? e.color : "#cccccc"), o = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, a = de("container"), c = de("bar"), r = de("leftResizeHandle"), s = de("rightResizeHandle"), h = de("leftConnectionHandle"), f = de("rightConnectionHandle"), { width: w } = Te(a), { left: L, right: Z } = Te(c), y = W(e.start), m = W(e.end || y.value + e.colspan), v = W(!1), g = W(!1), k = W(!1), C = W(!1), x = W(!1), I = W({ startX: 0, startY: 0, endX: 0, endY: 0 }), X = T(() => ge.value || ee.value || ne.value), M = T(() => e.colspan > 0 ? w.value / e.colspan : 0), V = T(() => {
1363
- const $ = y.value / e.colspan * 100, B = m.value / e.colspan * 100;
1373
+ const o = n, u = W(e.color.length >= 6 ? e.color : "#cccccc"), l = `gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`, a = de("container"), c = de("bar"), r = de("leftResizeHandle"), s = de("rightResizeHandle"), h = de("leftConnectionHandle"), f = de("rightConnectionHandle"), { width: w } = Te(a), { left: L, right: Z } = Te(c), y = W(e.start), m = W(e.end || y.value + e.colspan), v = W(!1), g = W(!1), k = W(!1), C = W(!1), x = W(!1), I = W({ startX: 0, startY: 0, endX: 0, endY: 0 }), X = S(() => ge.value || ee.value || ne.value), M = S(() => e.colspan > 0 ? w.value / e.colspan : 0), B = S(() => {
1374
+ const $ = y.value / e.colspan * 100, V = m.value / e.colspan * 100;
1364
1375
  return {
1365
1376
  left: `${$}%`,
1366
- width: `${B - $}%`,
1377
+ width: `${V - $}%`,
1367
1378
  backgroundColor: u.value
1368
1379
  };
1369
- }), N = T(() => ({
1380
+ }), N = S(() => ({
1370
1381
  position: "fixed",
1371
1382
  top: 0,
1372
1383
  left: 0,
@@ -1374,15 +1385,15 @@ const Zn = (e) => {
1374
1385
  height: "100vh",
1375
1386
  pointerEvents: "none",
1376
1387
  zIndex: 1e3
1377
- })), q = W({ startX: 0, startPos: 0 }), { isDragging: ee } = _e(r, {
1388
+ })), J = W({ startX: 0, startPos: 0 }), { isDragging: ee } = _e(r, {
1378
1389
  axis: "x",
1379
1390
  onStart: () => fe(L.value, y.value),
1380
1391
  onMove: ({ x: $ }) => Oe($),
1381
- onEnd: ({ x: $ }) => Ve($)
1392
+ onEnd: ({ x: $ }) => Be($)
1382
1393
  }), { isDragging: ne } = _e(s, {
1383
1394
  axis: "x",
1384
1395
  onStart: () => fe(Z.value, m.value),
1385
- onMove: ({ x: $ }) => Be($),
1396
+ onMove: ({ x: $ }) => Ve($),
1386
1397
  onEnd: ({ x: $ }) => Pe($)
1387
1398
  }), { isDragging: ge } = _e(c, {
1388
1399
  exact: !0,
@@ -1393,64 +1404,64 @@ const Zn = (e) => {
1393
1404
  });
1394
1405
  Ie(() => {
1395
1406
  D();
1396
- }), jt(() => {
1407
+ }), qt(() => {
1397
1408
  F();
1398
1409
  });
1399
- function fe($, B) {
1400
- c.value && (c.value.style.transition = "none"), q.value = { startX: $, startPos: B };
1410
+ function fe($, V) {
1411
+ c.value && (c.value.style.transition = "none"), J.value = { startX: $, startPos: V };
1401
1412
  }
1402
1413
  function Oe($) {
1403
1414
  if (!ee.value || !c.value) return;
1404
- const j = ($ - q.value.startX) / M.value, U = Math.max(0, Math.min(m.value - 1, q.value.startPos + j));
1405
- c.value.style.left = `${U / e.colspan * 100}%`, c.value.style.width = `${(m.value - U) / e.colspan * 100}%`;
1415
+ const U = ($ - J.value.startX) / M.value, j = Math.max(0, Math.min(m.value - 1, J.value.startPos + U));
1416
+ c.value.style.left = `${j / e.colspan * 100}%`, c.value.style.width = `${(m.value - j) / e.colspan * 100}%`;
1406
1417
  }
1407
- function Ve($) {
1418
+ function Be($) {
1408
1419
  if (!c.value) return;
1409
- const B = $ - q.value.startX, j = Math.round(B / M.value), U = y.value, K = Math.max(0, Math.min(m.value - 1, q.value.startPos + j));
1420
+ const V = $ - J.value.startX, U = Math.round(V / M.value), j = y.value, K = Math.max(0, Math.min(m.value - 1, J.value.startPos + U));
1410
1421
  y.value = K, e.store.updateGanttBar({
1411
1422
  rowIndex: e.rowIndex,
1412
1423
  colIndex: e.colIndex,
1413
1424
  type: "resize",
1414
1425
  edge: "start",
1415
- oldStart: U,
1426
+ oldStart: j,
1416
1427
  newStart: K,
1417
1428
  end: m.value,
1418
- delta: j,
1419
- oldColspan: m.value - U,
1429
+ delta: U,
1430
+ oldColspan: m.value - j,
1420
1431
  newColspan: m.value - K
1421
1432
  });
1422
1433
  }
1423
- function Be($) {
1434
+ function Ve($) {
1424
1435
  if (!ne.value || !c.value) return;
1425
- const j = ($ - q.value.startX) / M.value, U = Math.max(y.value + 1, Math.min(e.columnsCount, q.value.startPos + j));
1426
- c.value.style.width = `${(U - y.value) / e.colspan * 100}%`;
1436
+ const U = ($ - J.value.startX) / M.value, j = Math.max(y.value + 1, Math.min(e.columnsCount, J.value.startPos + U));
1437
+ c.value.style.width = `${(j - y.value) / e.colspan * 100}%`;
1427
1438
  }
1428
1439
  function Pe($) {
1429
1440
  if (!c.value) return;
1430
- const B = $ - q.value.startX, j = Math.round(B / M.value), U = m.value, K = Math.max(y.value + 1, Math.min(e.columnsCount, q.value.startPos + j));
1441
+ const V = $ - J.value.startX, U = Math.round(V / M.value), j = m.value, K = Math.max(y.value + 1, Math.min(e.columnsCount, J.value.startPos + U));
1431
1442
  m.value = K, e.store.updateGanttBar({
1432
1443
  rowIndex: e.rowIndex,
1433
1444
  colIndex: e.colIndex,
1434
1445
  type: "resize",
1435
1446
  edge: "end",
1436
- oldEnd: U,
1447
+ oldEnd: j,
1437
1448
  newEnd: K,
1438
1449
  start: y.value,
1439
- delta: j,
1440
- oldColspan: U - y.value,
1450
+ delta: U,
1451
+ oldColspan: j - y.value,
1441
1452
  newColspan: K - y.value
1442
1453
  });
1443
1454
  }
1444
1455
  function He($) {
1445
1456
  if (!ge.value || !c.value) return;
1446
- const j = ($ - q.value.startX) / M.value, U = m.value - y.value, K = Math.max(0, Math.min(q.value.startPos + j, e.columnsCount - U));
1457
+ const U = ($ - J.value.startX) / M.value, j = m.value - y.value, K = Math.max(0, Math.min(J.value.startPos + U, e.columnsCount - j));
1447
1458
  c.value.style.left = `${K / e.colspan * 100}%`;
1448
1459
  }
1449
1460
  function E($) {
1450
1461
  if (!c.value) return;
1451
- const B = $ - q.value.startX, j = Math.round(B / M.value), U = m.value - y.value, K = y.value, te = m.value;
1452
- let le = q.value.startPos + j, se = le + U;
1453
- le < 0 ? (le = 0, se = U) : se > e.columnsCount && (se = e.columnsCount, le = se - U), y.value = le, m.value = se, e.store.updateGanttBar({
1462
+ const V = $ - J.value.startX, U = Math.round(V / M.value), j = m.value - y.value, K = y.value, te = m.value;
1463
+ let le = J.value.startPos + U, se = le + j;
1464
+ le < 0 ? (le = 0, se = j) : se > e.columnsCount && (se = e.columnsCount, le = se - j), y.value = le, m.value = se, e.store.updateGanttBar({
1454
1465
  rowIndex: e.rowIndex,
1455
1466
  colIndex: e.colIndex,
1456
1467
  type: "bar",
@@ -1458,41 +1469,41 @@ const Zn = (e) => {
1458
1469
  oldEnd: te,
1459
1470
  newStart: le,
1460
1471
  newEnd: se,
1461
- delta: j,
1472
+ delta: U,
1462
1473
  colspan: se - le
1463
1474
  });
1464
1475
  }
1465
1476
  function D() {
1466
- const { x: $, y: B } = Te(c), { x: j, y: U } = Te(h), { x: K, y: te } = Te(f);
1477
+ const { x: $, y: V } = Te(c), { x: U, y: j } = Te(h), { x: K, y: te } = Te(f);
1467
1478
  e.store.registerGanttBar({
1468
- id: o,
1479
+ id: l,
1469
1480
  rowIndex: e.rowIndex,
1470
1481
  colIndex: e.colIndex,
1471
1482
  startIndex: y,
1472
1483
  endIndex: m,
1473
1484
  color: u,
1474
1485
  label: e.label,
1475
- position: { x: $, y: B }
1486
+ position: { x: $, y: V }
1476
1487
  }), e.store.isDependencyGraphEnabled && (e.store.registerConnectionHandle({
1477
- id: `${o}-connection-left`,
1488
+ id: `${l}-connection-left`,
1478
1489
  rowIndex: e.rowIndex,
1479
1490
  colIndex: e.colIndex,
1480
1491
  side: "left",
1481
- position: { x: j, y: U },
1492
+ position: { x: U, y: j },
1482
1493
  visible: v,
1483
- barId: o
1494
+ barId: l
1484
1495
  }), e.store.registerConnectionHandle({
1485
- id: `${o}-connection-right`,
1496
+ id: `${l}-connection-right`,
1486
1497
  rowIndex: e.rowIndex,
1487
1498
  colIndex: e.colIndex,
1488
1499
  side: "right",
1489
1500
  position: { x: K, y: te },
1490
1501
  visible: g,
1491
- barId: o
1502
+ barId: l
1492
1503
  }));
1493
1504
  }
1494
1505
  function F() {
1495
- e.store.unregisterGanttBar(o), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${o}-connection-left`), e.store.unregisterConnectionHandle(`${o}-connection-right`));
1506
+ e.store.unregisterGanttBar(l), e.store.isDependencyGraphEnabled && (e.store.unregisterConnectionHandle(`${l}-connection-left`), e.store.unregisterConnectionHandle(`${l}-connection-right`));
1496
1507
  }
1497
1508
  function Q() {
1498
1509
  e.store.isDependencyGraphEnabled && (v.value = !0, g.value = !0);
@@ -1500,38 +1511,38 @@ const Zn = (e) => {
1500
1511
  function G() {
1501
1512
  !k.value && !C.value && (v.value = !1, g.value = !1);
1502
1513
  }
1503
- function oe($, B) {
1504
- B.preventDefault(), B.stopPropagation(), x.value = !0, $ === "left" ? k.value = !0 : C.value = !0;
1505
- const j = $ === "left" ? h.value : f.value;
1506
- if (j) {
1507
- const te = j.getBoundingClientRect(), le = te.left + te.width / 2, se = te.top + te.height / 2;
1514
+ function oe($, V) {
1515
+ V.preventDefault(), V.stopPropagation(), x.value = !0, $ === "left" ? k.value = !0 : C.value = !0;
1516
+ const U = $ === "left" ? h.value : f.value;
1517
+ if (U) {
1518
+ const te = U.getBoundingClientRect(), le = te.left + te.width / 2, se = te.top + te.height / 2;
1508
1519
  I.value = { startX: le, startY: se, endX: le, endY: se };
1509
1520
  }
1510
- const U = (te) => {
1521
+ const j = (te) => {
1511
1522
  I.value.endX = te.clientX, I.value.endY = te.clientY;
1512
1523
  }, K = (te) => {
1513
- xe(te, $), Re(U, K);
1524
+ xe(te, $), Re(j, K);
1514
1525
  };
1515
- document.addEventListener("mousemove", U), document.addEventListener("mouseup", K);
1526
+ document.addEventListener("mousemove", j), document.addEventListener("mouseup", K);
1516
1527
  }
1517
- function xe($, B) {
1518
- const U = document.elementFromPoint($.clientX, $.clientY)?.closest(".connection-handle");
1519
- if (U && U !== (B === "left" ? h.value : f.value)) {
1520
- const K = U.closest(".gantt-bar");
1528
+ function xe($, V) {
1529
+ const j = document.elementFromPoint($.clientX, $.clientY)?.closest(".connection-handle");
1530
+ if (j && j !== (V === "left" ? h.value : f.value)) {
1531
+ const K = j.closest(".gantt-bar");
1521
1532
  if (K) {
1522
- const te = parseInt(K.getAttribute("data-rowindex") || "0"), le = parseInt(K.getAttribute("data-colindex") || "0"), se = U.classList.contains("left-connection-handle") ? "left" : "right", vt = `gantt-bar-row-${te}-col-${le}`, Qe = e.store.createConnection(
1523
- `${o}-connection-${B}`,
1524
- `${vt}-connection-${se}`
1533
+ const te = parseInt(K.getAttribute("data-rowindex") || "0"), le = parseInt(K.getAttribute("data-colindex") || "0"), se = j.classList.contains("left-connection-handle") ? "left" : "right", mt = `gantt-bar-row-${te}-col-${le}`, Qe = e.store.createConnection(
1534
+ `${l}-connection-${V}`,
1535
+ `${mt}-connection-${se}`
1525
1536
  );
1526
- Qe && l("connection:create", Qe);
1537
+ Qe && o("connection:create", Qe);
1527
1538
  }
1528
1539
  }
1529
1540
  }
1530
- function Re($, B) {
1531
- x.value = !1, k.value = !1, C.value = !1, document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", B), c.value?.matches(":hover") || G();
1541
+ function Re($, V) {
1542
+ x.value = !1, k.value = !1, C.value = !1, document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", V), c.value?.matches(":hover") || G();
1532
1543
  }
1533
1544
  return t({
1534
- barStyle: V,
1545
+ barStyle: B,
1535
1546
  cleanupConnectionDrag: Re,
1536
1547
  currentEnd: m,
1537
1548
  handleConnectionDrop: xe,
@@ -1540,17 +1551,17 @@ const Zn = (e) => {
1540
1551
  isRightConnectionDragging: C,
1541
1552
  isRightConnectionVisible: g,
1542
1553
  showDragPreview: x
1543
- }), ($, B) => (b(), R("td", {
1554
+ }), ($, V) => (b(), R("td", {
1544
1555
  class: "aganttcell",
1545
1556
  colspan: e.colspan
1546
1557
  }, [
1547
- z("div", Gn, [
1558
+ z("div", Un, [
1548
1559
  z("div", {
1549
1560
  ref: "bar",
1550
1561
  "data-rowindex": e.rowIndex,
1551
1562
  "data-colindex": e.colIndex,
1552
1563
  class: ae(["gantt-bar", { "is-dragging": X.value }]),
1553
- style: pe(V.value),
1564
+ style: pe(B.value),
1554
1565
  onMouseenter: Q,
1555
1566
  onMouseleave: G
1556
1567
  }, [
@@ -1558,34 +1569,34 @@ const Zn = (e) => {
1558
1569
  key: 0,
1559
1570
  ref: "leftConnectionHandle",
1560
1571
  class: ae(["connection-handle left-connection-handle", { visible: v.value, "is-dragging": k.value }]),
1561
- onMousedown: B[0] || (B[0] = $e((j) => oe("left", j), ["stop"]))
1562
- }, [...B[2] || (B[2] = [
1572
+ onMousedown: V[0] || (V[0] = $e((U) => oe("left", U), ["stop"]))
1573
+ }, [...V[2] || (V[2] = [
1563
1574
  z("div", { class: "connection-dot" }, null, -1)
1564
1575
  ])], 34)) : _("", !0),
1565
1576
  e.store.isDependencyGraphEnabled ? (b(), R("div", {
1566
1577
  key: 1,
1567
1578
  ref: "rightConnectionHandle",
1568
1579
  class: ae(["connection-handle right-connection-handle", { visible: g.value, "is-dragging": C.value }]),
1569
- onMousedown: B[1] || (B[1] = $e((j) => oe("right", j), ["stop"]))
1570
- }, [...B[3] || (B[3] = [
1580
+ onMousedown: V[1] || (V[1] = $e((U) => oe("right", U), ["stop"]))
1581
+ }, [...V[3] || (V[3] = [
1571
1582
  z("div", { class: "connection-dot" }, null, -1)
1572
1583
  ])], 34)) : _("", !0),
1573
1584
  z("div", {
1574
1585
  ref: "leftResizeHandle",
1575
1586
  class: ae(["resize-handle left-resize-handle", { "is-dragging": P(ee) }])
1576
- }, [...B[4] || (B[4] = [
1587
+ }, [...V[4] || (V[4] = [
1577
1588
  z("div", { class: "handle-grip" }, null, -1),
1578
1589
  z("div", { class: "vertical-indicator left-indicator" }, null, -1)
1579
1590
  ])], 2),
1580
- e.label ? (b(), R("label", jn, ye(e.label), 1)) : _("", !0),
1591
+ e.label ? (b(), R("label", qn, ye(e.label), 1)) : _("", !0),
1581
1592
  z("div", {
1582
1593
  ref: "rightResizeHandle",
1583
1594
  class: ae(["resize-handle right-resize-handle", { "is-dragging": P(ne) }])
1584
- }, [...B[5] || (B[5] = [
1595
+ }, [...V[5] || (V[5] = [
1585
1596
  z("div", { class: "handle-grip" }, null, -1),
1586
1597
  z("div", { class: "vertical-indicator right-indicator" }, null, -1)
1587
1598
  ])], 2)
1588
- ], 46, Un)
1599
+ ], 46, Yn)
1589
1600
  ], 512),
1590
1601
  e.store.isDependencyGraphEnabled && x.value ? (b(), R("svg", {
1591
1602
  key: 0,
@@ -1599,29 +1610,29 @@ const Zn = (e) => {
1599
1610
  stroke: "#2196f3",
1600
1611
  "stroke-width": "2",
1601
1612
  "stroke-dasharray": "5,5"
1602
- }, null, 8, Yn)
1613
+ }, null, 8, Jn)
1603
1614
  ], 4)) : _("", !0)
1604
- ], 8, Xn));
1615
+ ], 8, jn));
1605
1616
  }
1606
1617
  }), Ae = (e, t) => {
1607
1618
  const n = e.__vccOpts || e;
1608
- for (const [l, u] of t)
1609
- n[l] = u;
1619
+ for (const [o, u] of t)
1620
+ n[o] = u;
1610
1621
  return n;
1611
- }, qn = /* @__PURE__ */ Ae(Jn, [["__scopeId", "data-v-032ef6d9"]]), Qn = `<?xml version="1.0" encoding="UTF-8"?>
1622
+ }, Kn = /* @__PURE__ */ Ae(Qn, [["__scopeId", "data-v-032ef6d9"]]), _n = `<?xml version="1.0" encoding="UTF-8"?>
1612
1623
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
1613
1624
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
1614
1625
  <polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
1615
1626
  </svg>
1616
- `, Kn = `<?xml version="1.0" encoding="UTF-8"?>
1627
+ `, eo = `<?xml version="1.0" encoding="UTF-8"?>
1617
1628
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
1618
1629
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
1619
1630
  <polygon points="46.84 19.99 44.01 17.16 32 29.17 19.99 17.16 17.16 19.99 29.17 32 17.16 44.01 19.99 46.84 32 34.83 44.01 46.84 46.84 44.01 34.83 32 46.84 19.99" style="fill: #000; stroke-width: 0px;"/>
1620
- </svg>`, _n = `<?xml version="1.0" encoding="UTF-8"?>
1631
+ </svg>`, to = `<?xml version="1.0" encoding="UTF-8"?>
1621
1632
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.67">
1622
1633
  <path d="M68.67,16.67h-14.67V2c0-1.1-.9-2-2-2H2C.9,0,0,.9,0,2v50c0,1.1.9,2,2,2h14.67v14.67c0,1.1.9,2,2,2h50c1.1,0,2-.9,2-2V18.67c0-1.1-.9-2-2-2ZM4,4h46v46H4V4ZM66.67,66.67H20.67v-12.67h31.33c1.1,0,2-.9,2-2v-31.33h12.67v46Z" style="fill: #000; stroke-width: 0px;"/>
1623
1634
  <polygon points="41 25 29 25 29 13 25 13 25 25 13 25 13 29 25 29 25 41 29 41 29 29 41 29 41 25" style="fill: #000; stroke-width: 0px;"/>
1624
- </svg>`, eo = `<?xml version="1.0" encoding="UTF-8"?>
1635
+ </svg>`, no = `<?xml version="1.0" encoding="UTF-8"?>
1625
1636
  <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
1626
1637
  <path d="M68.6,45.8v13.7H2v-13.7h66.6M70.6,43.8H0v17.7h70.6v-17.7h0Z"/>
1627
1638
  <path d="M68.6,24.2v13.7H2v-13.7h66.6M70.6,22.2H0v17.7h70.6v-17.7h0Z"/>
@@ -1635,7 +1646,7 @@ const Zn = (e) => {
1635
1646
  <polygon points="70.6 18.7 68.1 18.7 68.1 16.7 68.6 16.7 68.6 16.2 70.6 16.2 70.6 18.7"/>
1636
1647
  <path d="M70.6,13.4h-2v-2.7h2v2.7ZM70.6,8h-2v-2.7h2v2.7Z"/>
1637
1648
  </g>
1638
- </svg>`, to = `<?xml version="1.0" encoding="UTF-8"?>
1649
+ </svg>`, oo = `<?xml version="1.0" encoding="UTF-8"?>
1639
1650
  <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
1640
1651
  <g>
1641
1652
  <polygon points="70.6 45.3 68.6 45.3 68.6 44.8 68.1 44.8 68.1 42.8 70.6 42.8 70.6 45.3"/>
@@ -1649,31 +1660,31 @@ const Zn = (e) => {
1649
1660
  </g>
1650
1661
  <path d="M68.6,23.7v13.7H2v-13.7h66.6M70.6,21.7H0v17.7h70.6v-17.7h0Z"/>
1651
1662
  <path d="M68.6,2v13.7H2V2h66.6M70.6,0H0v17.7h70.6V0h0Z"/>
1652
- </svg>`, no = `<?xml version="1.0" encoding="UTF-8"?>
1663
+ </svg>`, lo = `<?xml version="1.0" encoding="UTF-8"?>
1653
1664
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.64">
1654
1665
  <path d="M70.08,33.9l-9.75-9.75-2.83,2.83,6.33,6.33h-26.51V6.81l6.33,6.33,2.83-2.83L36.75.56c-.75-.75-2.08-.75-2.83,0l-9.75,9.75,2.83,2.83,6.33-6.33v26.5H6.83l6.33-6.33-2.83-2.83L.59,33.9c-.38.38-.59.88-.59,1.41s.21,1.04.59,1.41l9.75,9.75,2.83-2.83-6.33-6.33h26.5v26.51l-6.33-6.33-2.83,2.83,9.75,9.75c.38.38.88.59,1.41.59s1.04-.21,1.41-.59l9.75-9.75-2.83-2.83-6.33,6.33v-26.51h26.51l-6.33,6.33,2.83,2.83,9.75-9.75c.38-.38.59-.88.59-1.41s-.21-1.04-.59-1.41Z" style="fill: #000; stroke-width: 0px;"/>
1655
- </svg>`, oo = `<?xml version="1.0" encoding="UTF-8"?>
1666
+ </svg>`, ao = `<?xml version="1.0" encoding="UTF-8"?>
1656
1667
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
1657
1668
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
1658
1669
  <polygon points="18,20 18,44 46,32" style="fill: #000; stroke-width: 0px;"/>
1659
1670
  </svg>
1660
- `, lo = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 13V3.5M4.5 7 8 3.5 11.5 7" stroke-linecap="round" stroke-linejoin="round"/></svg>', ao = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 3v9.5M4.5 9 8 12.5 11.5 9" stroke-linecap="round" stroke-linejoin="round"/></svg>', so = {
1661
- add: Qn,
1662
- delete: Kn,
1663
- duplicate: _n,
1664
- insertAbove: eo,
1665
- insertBelow: to,
1666
- move: no,
1667
- moveUp: lo,
1668
- moveDown: ao,
1669
- open: oo
1670
- }, io = {
1671
+ `, so = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 13V3.5M4.5 7 8 3.5 11.5 7" stroke-linecap="round" stroke-linejoin="round"/></svg>', io = '<svg viewBox="0 0 16 16" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 3v9.5M4.5 9 8 12.5 11.5 9" stroke-linecap="round" stroke-linejoin="round"/></svg>', ro = {
1672
+ add: _n,
1673
+ delete: eo,
1674
+ duplicate: to,
1675
+ insertAbove: no,
1676
+ insertBelow: oo,
1677
+ move: lo,
1678
+ moveUp: so,
1679
+ moveDown: io,
1680
+ open: ao
1681
+ }, co = {
1671
1682
  key: 0,
1672
1683
  class: "row-actions-dropdown"
1673
- }, ro = ["aria-expanded"], co = ["disabled", "onClick"], uo = ["innerHTML"], fo = { class: "action-label" }, vo = {
1684
+ }, uo = ["aria-expanded"], fo = ["disabled", "onClick"], vo = ["innerHTML"], ho = { class: "action-label" }, mo = {
1674
1685
  key: 1,
1675
1686
  class: "row-actions-icons"
1676
- }, ho = ["title", "aria-label", "disabled", "onClick"], mo = ["innerHTML"], Ye = /* @__PURE__ */ Ce({
1687
+ }, go = ["title", "aria-label", "disabled", "onClick"], wo = ["innerHTML"], Ye = /* @__PURE__ */ Ce({
1677
1688
  __name: "ARowActions",
1678
1689
  props: {
1679
1690
  rowIndex: {},
@@ -1683,7 +1694,7 @@ const Zn = (e) => {
1683
1694
  },
1684
1695
  emits: ["action"],
1685
1696
  setup(e, { emit: t }) {
1686
- const n = e, l = t, u = de("actionsCell"), o = de("toggleButton"), a = W(0), c = W(!1), r = W(!1), s = W({ top: 0, left: 0 }), h = {
1697
+ const n = e, o = t, u = de("actionsCell"), l = de("toggleButton"), a = W(0), c = W(!1), r = W(!1), s = W({ top: 0, left: 0 }), h = {
1687
1698
  add: "Add Record",
1688
1699
  delete: "Delete Record",
1689
1700
  duplicate: "Duplicate Record",
@@ -1693,7 +1704,7 @@ const Zn = (e) => {
1693
1704
  moveUp: "Move Up",
1694
1705
  moveDown: "Move Down",
1695
1706
  open: "Open Record"
1696
- }, f = T(() => {
1707
+ }, f = S(() => {
1697
1708
  const v = [], g = n.config.actions || {}, k = [
1698
1709
  "open",
1699
1710
  "moveUp",
@@ -1708,15 +1719,15 @@ const Zn = (e) => {
1708
1719
  for (const C of k) {
1709
1720
  const x = g[C];
1710
1721
  if (x === !1 || x === void 0) continue;
1711
- let I = !0, X = h[C], M = so[C], V = !1;
1712
- typeof x == "object" && (I = x.enabled !== !1, X = x.label || X, M = x.icon || M, x.disabled && (V = x.disabled(n.rowIndex, n.store))), I && v.push({ type: C, label: X, icon: M, disabled: V });
1722
+ let I = !0, X = h[C], M = ro[C], B = !1;
1723
+ typeof x == "object" && (I = x.enabled !== !1, X = x.label || X, M = x.icon || M, x.disabled && (B = x.disabled(n.rowIndex, n.store))), I && v.push({ type: C, label: X, icon: M, disabled: B });
1713
1724
  }
1714
1725
  return v;
1715
- }), w = T(() => {
1726
+ }), w = S(() => {
1716
1727
  if (n.config.forceDropdown) return !0;
1717
1728
  const v = n.config.dropdownThreshold ?? 150;
1718
1729
  return v === 0 ? !1 : a.value > 0 && a.value < v;
1719
- }), L = T(() => c.value ? r.value ? {
1730
+ }), L = S(() => c.value ? r.value ? {
1720
1731
  position: "fixed",
1721
1732
  bottom: `${window.innerHeight - s.value.top}px`,
1722
1733
  left: `${s.value.left}px`,
@@ -1726,15 +1737,15 @@ const Zn = (e) => {
1726
1737
  top: `${s.value.top}px`,
1727
1738
  left: `${s.value.left}px`
1728
1739
  } : {});
1729
- qe(u, (v) => {
1740
+ Je(u, (v) => {
1730
1741
  const g = v[0];
1731
1742
  g && (a.value = g.contentRect.width);
1732
1743
  });
1733
1744
  const Z = () => {
1734
1745
  c.value || y(), c.value = !c.value;
1735
1746
  }, y = () => {
1736
- if (!o.value) return;
1737
- const v = o.value.getBoundingClientRect(), g = window.innerHeight, k = window.innerWidth, C = f.value.length * 40 + 16, x = 160, I = g - v.bottom, X = v.top;
1747
+ if (!l.value) return;
1748
+ const v = l.value.getBoundingClientRect(), g = window.innerHeight, k = window.innerWidth, C = f.value.length * 40 + 16, x = 160, I = g - v.bottom, X = v.top;
1738
1749
  r.value = I < C && X > C;
1739
1750
  let M = v.left;
1740
1751
  M + x > k && (M = Math.max(0, v.right - x)), s.value = {
@@ -1748,13 +1759,13 @@ const Zn = (e) => {
1748
1759
  const m = (v, g) => {
1749
1760
  c.value = !1;
1750
1761
  const k = n.config.actions?.[v];
1751
- typeof k == "object" && k.handler && k.handler(n.rowIndex, n.store) === !1 || l("action", v, n.rowIndex, g);
1762
+ typeof k == "object" && k.handler && k.handler(n.rowIndex, n.store) === !1 || o("action", v, n.rowIndex, g);
1752
1763
  };
1753
1764
  return (v, g) => (b(), R("td", {
1754
1765
  ref: "actionsCell",
1755
1766
  class: ae(["atable-row-actions", { "sticky-column": e.position === "before-index", "dropdown-active": c.value }])
1756
1767
  }, [
1757
- w.value ? (b(), R("div", io, [
1768
+ w.value ? (b(), R("div", co, [
1758
1769
  z("button", {
1759
1770
  ref: "toggleButton",
1760
1771
  type: "button",
@@ -1764,7 +1775,7 @@ const Zn = (e) => {
1764
1775
  onClick: $e(Z, ["stop"])
1765
1776
  }, [...g[0] || (g[0] = [
1766
1777
  z("span", { class: "dropdown-icon" }, "⋮", -1)
1767
- ])], 8, ro),
1778
+ ])], 8, uo),
1768
1779
  ue(z("div", {
1769
1780
  class: ae(["row-actions-menu", { "menu-flipped": r.value }]),
1770
1781
  style: pe(L.value),
@@ -1781,13 +1792,13 @@ const Zn = (e) => {
1781
1792
  z("span", {
1782
1793
  class: "action-icon",
1783
1794
  innerHTML: k.icon
1784
- }, null, 8, uo),
1785
- z("span", fo, ye(k.label), 1)
1786
- ], 8, co))), 128))
1795
+ }, null, 8, vo),
1796
+ z("span", ho, ye(k.label), 1)
1797
+ ], 8, fo))), 128))
1787
1798
  ], 6), [
1788
- [it, c.value]
1799
+ [rt, c.value]
1789
1800
  ])
1790
- ])) : (b(), R("div", vo, [
1801
+ ])) : (b(), R("div", mo, [
1791
1802
  (b(!0), R(me, null, be(f.value, (k) => (b(), R("button", {
1792
1803
  key: k.type,
1793
1804
  type: "button",
@@ -1800,12 +1811,12 @@ const Zn = (e) => {
1800
1811
  z("span", {
1801
1812
  class: "action-icon",
1802
1813
  innerHTML: k.icon
1803
- }, null, 8, mo)
1804
- ], 8, ho))), 128))
1814
+ }, null, 8, wo)
1815
+ ], 8, go))), 128))
1805
1816
  ]))
1806
1817
  ], 2));
1807
1818
  }
1808
- }), go = ["tabindex"], wo = ["tabindex"], po = ["colspan"], xo = /* @__PURE__ */ Ce({
1819
+ }), po = ["tabindex"], xo = ["tabindex"], yo = ["colspan"], bo = /* @__PURE__ */ Ce({
1809
1820
  __name: "ARow",
1810
1821
  props: {
1811
1822
  rowIndex: {},
@@ -1815,7 +1826,7 @@ const Zn = (e) => {
1815
1826
  },
1816
1827
  emits: ["row:action", "row:click"],
1817
1828
  setup(e, { emit: t }) {
1818
- const n = t, l = de("rowEl"), u = T(() => e.store.isRowVisible(e.rowIndex)), o = T(() => e.store.getRowExpandSymbol(e.rowIndex)), a = T(() => e.store.config.clickable ?? !1), c = T(() => e.store.config.rowActions || { enabled: !1 }), r = T(() => c.value.enabled), s = T(() => c.value.position || "before-index"), h = T(() => e.store.config.view === "list-expansion" && !!e.store.display[e.rowIndex]?.expanded), f = T(() => {
1829
+ const n = t, o = de("rowEl"), u = S(() => e.store.isRowVisible(e.rowIndex)), l = S(() => e.store.getRowExpandSymbol(e.rowIndex)), a = S(() => e.store.config.clickable ?? !1), c = S(() => e.store.config.rowActions || { enabled: !1 }), r = S(() => c.value.enabled), s = S(() => c.value.position || "before-index"), h = S(() => e.store.config.view === "list-expansion" && !!e.store.display[e.rowIndex]?.expanded), f = S(() => {
1819
1830
  const y = e.store.config.view === "uncounted" ? 0 : 1, m = r.value ? 1 : 0;
1820
1831
  return e.store.columns.length + y + m;
1821
1832
  }), w = (y, m, v) => {
@@ -1826,17 +1837,17 @@ const Zn = (e) => {
1826
1837
  }, Z = e.store.config.view === "list-expansion";
1827
1838
  if (e.addNavigation || Z) {
1828
1839
  let y = {};
1829
- e.addNavigation === !0 ? y = { ...Je } : typeof e.addNavigation == "object" && (y = { ...Je, ...e.addNavigation }), Z && !y["keydown.control.g"] && (y["keydown.control.g"] = (m) => {
1840
+ e.addNavigation === !0 ? y = { ...qe } : typeof e.addNavigation == "object" && (y = { ...qe, ...e.addNavigation }), Z && !y["keydown.control.g"] && (y["keydown.control.g"] = (m) => {
1830
1841
  m.stopPropagation(), m.preventDefault(), e.store.toggleRowExpand(e.rowIndex);
1831
- }), It([
1842
+ }), Ht([
1832
1843
  {
1833
- selectors: l,
1844
+ selectors: o,
1834
1845
  handlers: y
1835
1846
  }
1836
1847
  ]);
1837
1848
  }
1838
1849
  return (y, m) => (b(), R(me, null, [
1839
- ue(z("tr", st(y.$attrs, {
1850
+ ue(z("tr", it(y.$attrs, {
1840
1851
  ref: "rowEl",
1841
1852
  tabindex: e.tabIndex,
1842
1853
  class: ["atable-row", { "atable-row-clickable": a.value }],
@@ -1860,12 +1871,12 @@ const Zn = (e) => {
1860
1871
  tabIndex: -1,
1861
1872
  class: ae(["tree-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1862
1873
  onClick: m[0] || (m[0] = (v) => e.store.toggleRowExpand(e.rowIndex))
1863
- }, ye(o.value), 3)) : e.store.config.view === "list-expansion" ? (b(), R("td", {
1874
+ }, ye(l.value), 3)) : e.store.config.view === "list-expansion" ? (b(), R("td", {
1864
1875
  key: 2,
1865
1876
  tabIndex: -1,
1866
1877
  class: ae(["expansion-index", e.store.hasPinnedColumns ? "sticky-index" : ""]),
1867
1878
  onClick: m[1] || (m[1] = (v) => e.store.toggleRowExpand(e.rowIndex))
1868
- }, ye(o.value), 3)) : _("", !0)
1879
+ }, ye(l.value), 3)) : _("", !0)
1869
1880
  ], !0) : _("", !0),
1870
1881
  r.value && s.value === "after-index" ? (b(), ve(Ye, {
1871
1882
  key: 2,
@@ -1884,8 +1895,8 @@ const Zn = (e) => {
1884
1895
  position: s.value,
1885
1896
  onAction: w
1886
1897
  }, null, 8, ["row-index", "store", "config", "position"])) : _("", !0)
1887
- ], 16, go), [
1888
- [it, u.value]
1898
+ ], 16, po), [
1899
+ [rt, u.value]
1889
1900
  ]),
1890
1901
  h.value ? (b(), R("tr", {
1891
1902
  key: 0,
@@ -1902,40 +1913,40 @@ const Zn = (e) => {
1902
1913
  rowIndex: e.rowIndex,
1903
1914
  store: e.store
1904
1915
  }, void 0, !0)
1905
- ], 8, po)
1906
- ], 8, wo)) : _("", !0)
1916
+ ], 8, yo)
1917
+ ], 8, xo)) : _("", !0)
1907
1918
  ], 64));
1908
1919
  }
1909
- }), Bt = /* @__PURE__ */ Ae(xo, [["__scopeId", "data-v-4dd47763"]]), nt = /* @__PURE__ */ new WeakMap(), yo = {
1920
+ }), Zt = /* @__PURE__ */ Ae(bo, [["__scopeId", "data-v-4dd47763"]]), nt = /* @__PURE__ */ new WeakMap(), Co = {
1910
1921
  mounted(e, t) {
1911
1922
  const n = !t.modifiers.bubble;
1912
- let l;
1913
- if (typeof t.value == "function") l = ot(e, t.value, { capture: n });
1923
+ let o;
1924
+ if (typeof t.value == "function") o = ot(e, t.value, { capture: n });
1914
1925
  else {
1915
- const [u, o] = t.value;
1916
- l = ot(e, u, Object.assign({ capture: n }, o));
1926
+ const [u, l] = t.value;
1927
+ o = ot(e, u, Object.assign({ capture: n }, l));
1917
1928
  }
1918
- nt.set(e, l);
1929
+ nt.set(e, o);
1919
1930
  },
1920
1931
  unmounted(e) {
1921
1932
  const t = nt.get(e);
1922
1933
  t && typeof t == "function" ? t() : t?.stop(), nt.delete(e);
1923
1934
  }
1924
- }, bo = { mounted(e, t) {
1925
- typeof t.value == "function" ? qe(e, t.value) : qe(e, ...t.value);
1935
+ }, ko = { mounted(e, t) {
1936
+ typeof t.value == "function" ? Je(e, t.value) : Je(e, ...t.value);
1926
1937
  } };
1927
- function Co() {
1938
+ function Mo() {
1928
1939
  let e = !1;
1929
1940
  const t = re(!1);
1930
- return (n, l) => {
1931
- if (t.value = l.value, e) return;
1941
+ return (n, o) => {
1942
+ if (t.value = o.value, e) return;
1932
1943
  e = !0;
1933
- const u = Ln(n, l.value);
1934
- ce(t, (o) => u.value = o);
1944
+ const u = On(n, o.value);
1945
+ ce(t, (l) => u.value = l);
1935
1946
  };
1936
1947
  }
1937
- Co();
1938
- const ko = { class: "gantt-connection-overlay" }, Mo = {
1948
+ Mo();
1949
+ const Ro = { class: "gantt-connection-overlay" }, Eo = {
1939
1950
  class: "connection-svg",
1940
1951
  style: {
1941
1952
  position: "absolute",
@@ -1946,14 +1957,14 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
1946
1957
  pointerEvents: "none",
1947
1958
  zIndex: 1
1948
1959
  }
1949
- }, Ro = ["d", "stroke-width", "onDblclick"], Eo = ["id", "d", "stroke", "stroke-width", "onDblclick"], To = 0.25, Ge = 16, So = /* @__PURE__ */ Ce({
1960
+ }, To = ["d", "stroke-width", "onDblclick"], So = ["id", "d", "stroke", "stroke-width", "onDblclick"], $o = 0.25, Ge = 16, Io = /* @__PURE__ */ Ce({
1950
1961
  __name: "AGanttConnection",
1951
1962
  props: {
1952
1963
  store: {}
1953
1964
  },
1954
1965
  emits: ["connection:delete"],
1955
1966
  setup(e, { emit: t }) {
1956
- const n = t, l = T(() => e.store.connectionPaths.filter((a) => {
1967
+ const n = t, o = S(() => e.store.connectionPaths.filter((a) => {
1957
1968
  const c = e.store.ganttBars.find((s) => s.id === a.from.barId), r = e.store.ganttBars.find((s) => s.id === a.to.barId);
1958
1969
  return c && r;
1959
1970
  })), u = (a) => {
@@ -1963,13 +1974,13 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
1963
1974
  (X) => X.barId === a.to.barId && X.side === a.to.side
1964
1975
  );
1965
1976
  if (!c || !r) return "";
1966
- const s = c.position.x + Ge / 2, h = c.position.y + Ge / 2, f = r.position.x + Ge / 2, w = r.position.y + Ge / 2, L = Math.abs(f - s), Z = Math.max(L * To, 50), y = s + (a.from.side === "left" ? -Z : Z), m = f + (a.to.side === "left" ? -Z : Z), v = { x: 0.5 * s + 0.5 * y, y: 0.5 * h + 0.5 * h }, g = { x: 0.5 * y + 0.5 * m, y: 0.5 * h + 0.5 * w }, k = { x: 0.5 * m + 0.5 * f, y: 0.5 * w + 0.5 * w }, C = { x: 0.5 * v.x + 0.5 * g.x, y: 0.5 * v.y + 0.5 * g.y }, x = { x: 0.5 * g.x + 0.5 * k.x, y: 0.5 * g.y + 0.5 * k.y }, I = { x: 0.5 * C.x + 0.5 * x.x, y: 0.5 * C.y + 0.5 * x.y };
1977
+ const s = c.position.x + Ge / 2, h = c.position.y + Ge / 2, f = r.position.x + Ge / 2, w = r.position.y + Ge / 2, L = Math.abs(f - s), Z = Math.max(L * $o, 50), y = s + (a.from.side === "left" ? -Z : Z), m = f + (a.to.side === "left" ? -Z : Z), v = { x: 0.5 * s + 0.5 * y, y: 0.5 * h + 0.5 * h }, g = { x: 0.5 * y + 0.5 * m, y: 0.5 * h + 0.5 * w }, k = { x: 0.5 * m + 0.5 * f, y: 0.5 * w + 0.5 * w }, C = { x: 0.5 * v.x + 0.5 * g.x, y: 0.5 * v.y + 0.5 * g.y }, x = { x: 0.5 * g.x + 0.5 * k.x, y: 0.5 * g.y + 0.5 * k.y }, I = { x: 0.5 * C.x + 0.5 * x.x, y: 0.5 * C.y + 0.5 * x.y };
1967
1978
  return `M ${s} ${h} Q ${y} ${h}, ${I.x} ${I.y} Q ${m} ${w}, ${f} ${w}`;
1968
- }, o = (a) => {
1979
+ }, l = (a) => {
1969
1980
  e.store.deleteConnection(a.id) && n("connection:delete", a);
1970
1981
  };
1971
- return (a, c) => (b(), R("div", ko, [
1972
- (b(), R("svg", Mo, [
1982
+ return (a, c) => (b(), R("div", Ro, [
1983
+ (b(), R("svg", Eo, [
1973
1984
  c[0] || (c[0] = z("defs", null, [
1974
1985
  z("path", {
1975
1986
  id: "arrowhead",
@@ -1993,16 +2004,16 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
1993
2004
  })
1994
2005
  ])
1995
2006
  ], -1)),
1996
- (b(!0), R(me, null, be(l.value, (r) => (b(), R("path", {
2007
+ (b(!0), R(me, null, be(o.value, (r) => (b(), R("path", {
1997
2008
  key: `${r.id}-hitbox`,
1998
2009
  d: u(r),
1999
2010
  stroke: "transparent",
2000
2011
  "stroke-width": (r.style?.width || 2) + 10,
2001
2012
  fill: "none",
2002
2013
  class: "connection-hitbox",
2003
- onDblclick: (s) => o(r)
2004
- }, null, 40, Ro))), 128)),
2005
- (b(!0), R(me, null, be(l.value, (r) => (b(), R("path", {
2014
+ onDblclick: (s) => l(r)
2015
+ }, null, 40, To))), 128)),
2016
+ (b(!0), R(me, null, be(o.value, (r) => (b(), R("path", {
2006
2017
  id: r.id,
2007
2018
  key: r.id,
2008
2019
  d: u(r),
@@ -2011,18 +2022,18 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2011
2022
  fill: "none",
2012
2023
  "marker-mid": "url(#arrowhead-marker)",
2013
2024
  class: "connection-path animated-path",
2014
- onDblclick: (s) => o(r)
2015
- }, null, 40, Eo))), 128))
2025
+ onDblclick: (s) => l(r)
2026
+ }, null, 40, So))), 128))
2016
2027
  ]))
2017
2028
  ]));
2018
2029
  }
2019
- }), $o = /* @__PURE__ */ Ae(So, [["__scopeId", "data-v-d5929c98"]]), Io = { class: "column-filter" }, Ao = {
2030
+ }), Ao = /* @__PURE__ */ Ae(Io, [["__scopeId", "data-v-d5929c98"]]), Ho = { class: "column-filter" }, Lo = {
2020
2031
  key: 2,
2021
2032
  class: "checkbox-filter"
2022
- }, Ho = ["value"], Lo = {
2033
+ }, Do = ["value"], Oo = {
2023
2034
  key: 5,
2024
2035
  class: "date-range-filter"
2025
- }, Do = /* @__PURE__ */ Ce({
2036
+ }, Bo = /* @__PURE__ */ Ce({
2026
2037
  __name: "ATableColumnFilter",
2027
2038
  props: {
2028
2039
  column: {},
@@ -2039,15 +2050,16 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2039
2050
  select: "select",
2040
2051
  code: "text",
2041
2052
  link: "text",
2042
- attach: "text"
2043
- }, n = W(""), l = Yt({
2053
+ attach: "text",
2054
+ quantity: "number"
2055
+ }, n = W(""), o = Jt({
2044
2056
  startValue: "",
2045
2057
  endValue: ""
2046
- }), u = T(() => {
2058
+ }), u = S(() => {
2047
2059
  if (e.column.filterType) return e.column.filterType;
2048
- const h = Ot(e.column.component);
2060
+ const h = ht(e.column.component);
2049
2061
  return h ? t[h] : "text";
2050
- }), o = (h) => {
2062
+ }), l = (h) => {
2051
2063
  if (h.filterOptions) return h.filterOptions;
2052
2064
  const f = /* @__PURE__ */ new Set();
2053
2065
  return e.store.rows.forEach((w) => {
@@ -2057,18 +2069,18 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2057
2069
  value: w,
2058
2070
  label: String(w)
2059
2071
  }));
2060
- }, a = T(() => !!(n.value || l.startValue || l.endValue)), c = (h) => {
2072
+ }, a = S(() => !!(n.value || o.startValue || o.endValue)), c = (h) => {
2061
2073
  !h && u.value !== "checkbox" ? (e.store.clearFilter(e.colIndex), n.value = "") : (n.value = h, e.store.setFilter(e.colIndex, { value: h }));
2062
2074
  }, r = (h, f) => {
2063
- h === "start" ? l.startValue = f : l.endValue = f, !l.startValue && !l.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
2075
+ h === "start" ? o.startValue = f : o.endValue = f, !o.startValue && !o.endValue ? e.store.clearFilter(e.colIndex) : e.store.setFilter(e.colIndex, {
2064
2076
  value: null,
2065
- startValue: l.startValue,
2066
- endValue: l.endValue
2077
+ startValue: o.startValue,
2078
+ endValue: o.endValue
2067
2079
  });
2068
2080
  }, s = () => {
2069
- n.value = "", l.startValue = "", l.endValue = "", e.store.clearFilter(e.colIndex);
2081
+ n.value = "", o.startValue = "", o.endValue = "", e.store.clearFilter(e.colIndex);
2070
2082
  };
2071
- return (h, f) => (b(), R("div", Io, [
2083
+ return (h, f) => (b(), R("div", Ho, [
2072
2084
  u.value === "text" ? ue((b(), R("input", {
2073
2085
  key: 0,
2074
2086
  "onUpdate:modelValue": f[0] || (f[0] = (w) => n.value = w),
@@ -2085,14 +2097,14 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2085
2097
  onInput: f[3] || (f[3] = (w) => c(n.value))
2086
2098
  }, null, 544)), [
2087
2099
  [Ze, n.value]
2088
- ]) : u.value === "checkbox" ? (b(), R("label", Ao, [
2100
+ ]) : u.value === "checkbox" ? (b(), R("label", Lo, [
2089
2101
  ue(z("input", {
2090
2102
  "onUpdate:modelValue": f[4] || (f[4] = (w) => n.value = w),
2091
2103
  type: "checkbox",
2092
2104
  class: "filter-checkbox",
2093
2105
  onChange: f[5] || (f[5] = (w) => c(n.value))
2094
2106
  }, null, 544), [
2095
- [Jt, n.value]
2107
+ [Qt, n.value]
2096
2108
  ]),
2097
2109
  z("span", null, ye(e.column.label), 1)
2098
2110
  ])) : u.value === "select" ? ue((b(), R("select", {
@@ -2102,12 +2114,12 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2102
2114
  onChange: f[7] || (f[7] = (w) => c(n.value))
2103
2115
  }, [
2104
2116
  f[15] || (f[15] = z("option", { value: "" }, "All", -1)),
2105
- (b(!0), R(me, null, be(o(e.column), (w) => (b(), R("option", {
2117
+ (b(!0), R(me, null, be(l(e.column), (w) => (b(), R("option", {
2106
2118
  key: w.value || w,
2107
2119
  value: w.value || w
2108
- }, ye(w.label || w), 9, Ho))), 128))
2120
+ }, ye(w.label || w), 9, Do))), 128))
2109
2121
  ], 544)), [
2110
- [qt, n.value]
2122
+ [Kt, n.value]
2111
2123
  ]) : u.value === "date" ? ue((b(), R("input", {
2112
2124
  key: 4,
2113
2125
  "onUpdate:modelValue": f[8] || (f[8] = (w) => n.value = w),
@@ -2116,23 +2128,23 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2116
2128
  onChange: f[9] || (f[9] = (w) => c(n.value))
2117
2129
  }, null, 544)), [
2118
2130
  [Ze, n.value]
2119
- ]) : u.value === "dateRange" ? (b(), R("div", Lo, [
2131
+ ]) : u.value === "dateRange" ? (b(), R("div", Oo, [
2120
2132
  ue(z("input", {
2121
- "onUpdate:modelValue": f[10] || (f[10] = (w) => l.startValue = w),
2133
+ "onUpdate:modelValue": f[10] || (f[10] = (w) => o.startValue = w),
2122
2134
  type: "date",
2123
2135
  class: "filter-input",
2124
- onChange: f[11] || (f[11] = (w) => r("start", l.startValue))
2136
+ onChange: f[11] || (f[11] = (w) => r("start", o.startValue))
2125
2137
  }, null, 544), [
2126
- [Ze, l.startValue]
2138
+ [Ze, o.startValue]
2127
2139
  ]),
2128
2140
  f[16] || (f[16] = z("span", { class: "date-separator" }, "-", -1)),
2129
2141
  ue(z("input", {
2130
- "onUpdate:modelValue": f[12] || (f[12] = (w) => l.endValue = w),
2142
+ "onUpdate:modelValue": f[12] || (f[12] = (w) => o.endValue = w),
2131
2143
  type: "date",
2132
2144
  class: "filter-input",
2133
- onChange: f[13] || (f[13] = (w) => r("end", l.endValue))
2145
+ onChange: f[13] || (f[13] = (w) => r("end", o.endValue))
2134
2146
  }, null, 544), [
2135
- [Ze, l.endValue]
2147
+ [Ze, o.endValue]
2136
2148
  ])
2137
2149
  ])) : u.value === "component" && e.column.filterComponent ? (b(), ve(Ne(e.column.filterComponent), {
2138
2150
  key: 6,
@@ -2150,43 +2162,43 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2150
2162
  }, "×")) : _("", !0)
2151
2163
  ]));
2152
2164
  }
2153
- }), Oo = /* @__PURE__ */ Ae(Do, [["__scopeId", "data-v-b57e3235"]]), Vo = { key: 0 }, Bo = {
2165
+ }), Vo = /* @__PURE__ */ Ae(Bo, [["__scopeId", "data-v-3257dbbe"]]), Po = { key: 0 }, Zo = {
2154
2166
  class: "atable-header-row",
2155
2167
  tabindex: "-1"
2156
- }, Po = {
2168
+ }, No = {
2157
2169
  key: 2,
2158
2170
  class: "row-actions-header"
2159
- }, Zo = ["data-colindex", "onClick"], No = {
2171
+ }, Fo = ["data-colindex", "onClick"], Wo = {
2160
2172
  key: 3,
2161
2173
  class: "row-actions-header"
2162
- }, Fo = {
2174
+ }, zo = {
2163
2175
  key: 0,
2164
2176
  class: "atable-filters-row"
2165
- }, Wo = {
2177
+ }, Xo = {
2166
2178
  key: 2,
2167
2179
  class: "row-actions-header"
2168
- }, zo = {
2180
+ }, Go = {
2169
2181
  key: 3,
2170
2182
  class: "row-actions-header"
2171
- }, Pt = /* @__PURE__ */ Ce({
2183
+ }, Nt = /* @__PURE__ */ Ce({
2172
2184
  __name: "ATableHeader",
2173
2185
  props: {
2174
2186
  columns: {},
2175
2187
  store: {}
2176
2188
  },
2177
2189
  setup(e) {
2178
- const t = T(() => e.columns.filter((a) => a.filterable)), n = T(() => e.store.config.rowActions?.enabled ?? !1), l = T(() => e.store.config.rowActions?.position ?? "before-index"), u = (a) => e.store.sortByColumn(a), o = (a) => {
2190
+ const t = S(() => e.columns.filter((a) => a.filterable)), n = S(() => e.store.config.rowActions?.enabled ?? !1), o = S(() => e.store.config.rowActions?.position ?? "before-index"), u = (a) => e.store.sortByColumn(a), l = (a) => {
2179
2191
  for (const c of a) {
2180
2192
  if (c.borderBoxSize.length === 0) continue;
2181
2193
  const s = c.borderBoxSize[0].inlineSize, h = Number(c.target.dataset.colindex), f = e.store.columns[h]?.width;
2182
2194
  typeof f == "number" && f !== s && e.store.resizeColumn(h, s);
2183
2195
  }
2184
2196
  };
2185
- return (a, c) => e.columns.length ? (b(), R("thead", Vo, [
2186
- z("tr", Bo, [
2187
- n.value && l.value === "before-index" ? (b(), R("th", {
2197
+ return (a, c) => e.columns.length ? (b(), R("thead", Po, [
2198
+ z("tr", Zo, [
2199
+ n.value && o.value === "before-index" ? (b(), R("th", {
2188
2200
  key: 0,
2189
- class: ae(["row-actions-header", { "sticky-column": l.value === "before-index" }])
2201
+ class: ae(["row-actions-header", { "sticky-column": o.value === "before-index" }])
2190
2202
  }, null, 2)) : _("", !0),
2191
2203
  e.store.zeroColumn ? (b(), R("th", {
2192
2204
  key: 1,
@@ -2197,7 +2209,7 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2197
2209
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
2198
2210
  ], "list-index"])
2199
2211
  }, null, 2)) : _("", !0),
2200
- n.value && l.value === "after-index" ? (b(), R("th", Po)) : _("", !0),
2212
+ n.value && o.value === "after-index" ? (b(), R("th", No)) : _("", !0),
2201
2213
  (b(!0), R(me, null, be(e.columns, (r, s) => ue((b(), R("th", {
2202
2214
  key: r.name,
2203
2215
  "data-colindex": s,
@@ -2207,17 +2219,17 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2207
2219
  onClick: (h) => r.sortable !== !1 ? u(s) : void 0
2208
2220
  }, [
2209
2221
  he(a.$slots, "default", {}, () => [
2210
- Qt(ye(r.label || String.fromCharCode(s + 97).toUpperCase()), 1)
2222
+ _t(ye(r.label || String.fromCharCode(s + 97).toUpperCase()), 1)
2211
2223
  ])
2212
- ], 14, Zo)), [
2213
- [P(bo), o]
2224
+ ], 14, Fo)), [
2225
+ [P(ko), l]
2214
2226
  ])), 128)),
2215
- n.value && l.value === "end" ? (b(), R("th", No)) : _("", !0)
2227
+ n.value && o.value === "end" ? (b(), R("th", Wo)) : _("", !0)
2216
2228
  ]),
2217
- t.value.length > 0 ? (b(), R("tr", Fo, [
2218
- n.value && l.value === "before-index" ? (b(), R("th", {
2229
+ t.value.length > 0 ? (b(), R("tr", zo, [
2230
+ n.value && o.value === "before-index" ? (b(), R("th", {
2219
2231
  key: 0,
2220
- class: ae(["row-actions-header", { "sticky-column": l.value === "before-index" }])
2232
+ class: ae(["row-actions-header", { "sticky-column": o.value === "before-index" }])
2221
2233
  }, null, 2)) : _("", !0),
2222
2234
  e.store.zeroColumn ? (b(), R("th", {
2223
2235
  key: 1,
@@ -2227,44 +2239,44 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2227
2239
  e.store.config.view === "list-expansion" ? "list-expansion-index" : ""
2228
2240
  ], "list-index"])
2229
2241
  }, null, 2)) : _("", !0),
2230
- n.value && l.value === "after-index" ? (b(), R("th", Wo)) : _("", !0),
2242
+ n.value && o.value === "after-index" ? (b(), R("th", Xo)) : _("", !0),
2231
2243
  (b(!0), R(me, null, be(e.columns, (r, s) => (b(), R("th", {
2232
2244
  key: `filter-${r.name}`,
2233
2245
  class: ae(`${r.pinned ? "sticky-column" : ""}`),
2234
2246
  style: pe(e.store.getHeaderCellStyle(r))
2235
2247
  }, [
2236
- r.filterable ? (b(), ve(Oo, {
2248
+ r.filterable ? (b(), ve(Vo, {
2237
2249
  key: 0,
2238
2250
  column: r,
2239
2251
  "col-index": s,
2240
2252
  store: e.store
2241
2253
  }, null, 8, ["column", "col-index", "store"])) : _("", !0)
2242
2254
  ], 6))), 128)),
2243
- n.value && l.value === "end" ? (b(), R("th", zo)) : _("", !0)
2255
+ n.value && o.value === "end" ? (b(), R("th", Go)) : _("", !0)
2244
2256
  ])) : _("", !0)
2245
2257
  ])) : _("", !0);
2246
2258
  }
2247
- }), Zt = /* @__PURE__ */ Ce({
2259
+ }), Ft = /* @__PURE__ */ Ce({
2248
2260
  __name: "ATableModal",
2249
2261
  props: {
2250
2262
  store: {}
2251
2263
  },
2252
2264
  setup(e) {
2253
- const t = de("amodal"), { width: n, height: l } = Te(t), u = T(() => {
2265
+ const t = de("amodal"), { width: n, height: o } = Te(t), u = S(() => {
2254
2266
  if (!(e.store.modal.height && e.store.modal.width && e.store.modal.left && e.store.modal.bottom)) return {};
2255
- const o = e.store.modal.cell?.closest("table");
2256
- if (!o) return {};
2257
- const a = o.offsetHeight || 0, c = o.offsetWidth || 0;
2267
+ const l = e.store.modal.cell?.closest("table");
2268
+ if (!l) return {};
2269
+ const a = l.offsetHeight || 0, c = l.offsetWidth || 0;
2258
2270
  let r = e.store.modal.cell?.offsetTop || 0;
2259
- const s = o.querySelector("thead")?.offsetHeight || 0;
2260
- r += s, r = r + l.value < a ? r : r - (l.value + e.store.modal.height);
2271
+ const s = l.querySelector("thead")?.offsetHeight || 0;
2272
+ r += s, r = r + o.value < a ? r : r - (o.value + e.store.modal.height);
2261
2273
  let h = e.store.modal.cell?.offsetLeft || 0;
2262
2274
  return h = h + n.value <= c ? h : h - (n.value - e.store.modal.width), {
2263
2275
  left: `${h}px`,
2264
2276
  top: `${r}px`
2265
2277
  };
2266
2278
  });
2267
- return (o, a) => (b(), R("div", {
2279
+ return (l, a) => (b(), R("div", {
2268
2280
  ref: "amodal",
2269
2281
  class: "amodal",
2270
2282
  tabindex: "-1",
@@ -2274,29 +2286,29 @@ const ko = { class: "gantt-connection-overlay" }, Mo = {
2274
2286
  onInput: a[1] || (a[1] = $e(() => {
2275
2287
  }, ["stop"]))
2276
2288
  }, [
2277
- he(o.$slots, "default")
2289
+ he(l.$slots, "default")
2278
2290
  ], 36));
2279
2291
  }
2280
2292
  });
2281
- function Xo(e) {
2282
- return e.filter((t) => !t.hidden && t.component).map(({ fieldname: t, hidden: n, ...l }) => {
2283
- const u = Object.assign({ name: t }, l);
2284
- return l.doctype && !l.cellComponent && (u.linkDoctype = l.doctype, l.format || (u.format = (o) => {
2285
- if (o == null) return "";
2286
- if (typeof o == "object") {
2287
- const a = o.displayText ?? o.id ?? "";
2293
+ function jo(e) {
2294
+ return e.filter((t) => !t.hidden && t.component).map(({ fieldname: t, hidden: n, ...o }) => {
2295
+ const u = Object.assign({ name: t }, o);
2296
+ return o.doctype && !o.cellComponent && (u.linkDoctype = o.doctype, o.format || (u.format = (l) => {
2297
+ if (l == null) return "";
2298
+ if (typeof l == "object") {
2299
+ const a = l.displayText ?? l.id ?? "";
2288
2300
  return typeof a == "string" || typeof a == "number" ? String(a) : "";
2289
2301
  }
2290
- return String(o);
2291
- })), u;
2302
+ return String(l);
2303
+ })), ht(o.component) === "quantity" && !o.format && (u.format = Vt), u;
2292
2304
  });
2293
2305
  }
2294
- const Go = {
2306
+ const Uo = {
2295
2307
  class: "atable-container",
2296
2308
  style: { position: "relative" }
2297
- }, Uo = /* @__PURE__ */ Ce({
2309
+ }, Yo = /* @__PURE__ */ Ce({
2298
2310
  __name: "ATable",
2299
- props: /* @__PURE__ */ xt({
2311
+ props: /* @__PURE__ */ bt({
2300
2312
  id: { default: "" },
2301
2313
  config: { default: () => new Object() },
2302
2314
  schema: { default: () => [] },
@@ -2307,11 +2319,11 @@ const Go = {
2307
2319
  columns: {},
2308
2320
  columnsModifiers: {}
2309
2321
  }),
2310
- emits: /* @__PURE__ */ xt(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:click", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move", "row:open"], ["update:rows", "update:columns"]),
2322
+ emits: /* @__PURE__ */ bt(["cellUpdate", "gantt:drag", "connection:event", "columns:update", "row:add", "row:click", "row:delete", "row:duplicate", "row:insert-above", "row:insert-below", "row:move", "row:open"], ["update:rows", "update:columns"]),
2311
2323
  setup(e, { expose: t, emit: n }) {
2312
- const l = gt(e, "rows"), u = gt(e, "columns"), o = n, a = de("table"), c = u.value?.length ? u.value : Xo(e.schema ?? []), r = Kt("aformLinkResolver", null), s = Zn({
2324
+ const o = pt(e, "rows"), u = pt(e, "columns"), l = n, a = de("table"), c = u.value?.length ? u.value : jo(e.schema ?? []), r = en("aformLinkResolver", null), s = Fn({
2313
2325
  columns: c,
2314
- rows: l.value,
2326
+ rows: o.value,
2315
2327
  id: e.id,
2316
2328
  config: e.config,
2317
2329
  linkResolver: e.linkResolver ?? r
@@ -2320,19 +2332,19 @@ const Go = {
2320
2332
  if (v === "setCellData" || v === "setCellText") {
2321
2333
  const [x, I, X] = k, M = g.getCellData(x, I);
2322
2334
  C(() => {
2323
- l.value = [...s.rows], o("cellUpdate", { colIndex: x, rowIndex: I, newValue: X, oldValue: M });
2335
+ o.value = [...s.rows], l("cellUpdate", { colIndex: x, rowIndex: I, newValue: X, oldValue: M });
2324
2336
  });
2325
2337
  } else if (v === "updateGanttBar") {
2326
2338
  const [x] = k;
2327
2339
  let I = !1;
2328
2340
  x.type === "resize" ? I = x.oldColspan !== x.newColspan : x.type === "bar" && (I = x.oldStart !== x.newStart || x.oldEnd !== x.newEnd), I && C(() => {
2329
- o("gantt:drag", x);
2341
+ l("gantt:drag", x);
2330
2342
  });
2331
2343
  } else v === "resizeColumn" && C(() => {
2332
- u.value = [...s.columns], o("columns:update", [...s.columns]);
2344
+ u.value = [...s.columns], l("columns:update", [...s.columns]);
2333
2345
  });
2334
2346
  }), ce(
2335
- () => l.value,
2347
+ () => o.value,
2336
2348
  (v) => {
2337
2349
  JSON.stringify(v) !== JSON.stringify(s.rows) && (s.rows = [...v]);
2338
2350
  },
@@ -2340,13 +2352,13 @@ const Go = {
2340
2352
  ), ce(
2341
2353
  u,
2342
2354
  (v) => {
2343
- v && JSON.stringify(v) !== JSON.stringify(s.columns) && (s.columns = [...v], o("columns:update", [...v]));
2355
+ v && JSON.stringify(v) !== JSON.stringify(s.columns) && (s.columns = [...v], l("columns:update", [...v]));
2344
2356
  },
2345
2357
  { deep: !0 }
2346
2358
  ), Ie(() => {
2347
- u.value?.some((v) => v.pinned) && (f(), s.isTreeView && Lt(a, f, { childList: !0, subtree: !0 }));
2359
+ u.value?.some((v) => v.pinned) && (f(), s.isTreeView && Ot(a, f, { childList: !0, subtree: !0 }));
2348
2360
  });
2349
- const h = T(() => s.columns.filter((v) => v.pinned).length), f = () => {
2361
+ const h = S(() => s.columns.filter((v) => v.pinned).length), f = () => {
2350
2362
  const v = a.value, g = v?.rows[0], k = v?.rows[1], C = g ? Array.from(g.cells) : [];
2351
2363
  for (const [x, I] of C.entries()) {
2352
2364
  const X = k?.cells[x];
@@ -2364,7 +2376,7 @@ const Go = {
2364
2376
  if (v.key === "Escape" && s.modal.visible) {
2365
2377
  s.modal.visible = !1;
2366
2378
  const g = s.modal.parent;
2367
- g && at().then(() => g.focus());
2379
+ g && st().then(() => g.focus());
2368
2380
  }
2369
2381
  });
2370
2382
  const w = (v) => {
@@ -2384,57 +2396,57 @@ const Go = {
2384
2396
  // TODO: refactor to API that can detect when data exists in a cell. Might have be custom and not generalizable
2385
2397
  }), g;
2386
2398
  }, L = (v) => {
2387
- o("connection:event", { type: "create", connection: v });
2399
+ l("connection:event", { type: "create", connection: v });
2388
2400
  }, Z = (v) => {
2389
- o("connection:event", { type: "delete", connection: v });
2401
+ l("connection:event", { type: "delete", connection: v });
2390
2402
  }, y = (v, g) => {
2391
2403
  const k = s.rows[v];
2392
- o("row:click", { row: k, rowIndex: v, event: g });
2404
+ l("row:click", { row: k, rowIndex: v, event: g });
2393
2405
  }, m = (v, g, k) => {
2394
2406
  switch (v) {
2395
2407
  case "add": {
2396
2408
  const C = s.addRow({}, g + 1), x = s.rows[C];
2397
- l.value = [...s.rows], o("row:add", { rowIndex: C, row: x });
2409
+ o.value = [...s.rows], l("row:add", { rowIndex: C, row: x });
2398
2410
  break;
2399
2411
  }
2400
2412
  case "delete": {
2401
2413
  const C = s.deleteRow(g);
2402
- C && (l.value = [...s.rows], o("row:delete", { rowIndex: g, row: C }));
2414
+ C && (o.value = [...s.rows], l("row:delete", { rowIndex: g, row: C }));
2403
2415
  break;
2404
2416
  }
2405
2417
  case "duplicate": {
2406
2418
  const C = s.duplicateRow(g);
2407
2419
  if (C >= 0) {
2408
2420
  const x = s.rows[C];
2409
- l.value = [...s.rows], o("row:duplicate", { sourceIndex: g, newIndex: C, row: x });
2421
+ o.value = [...s.rows], l("row:duplicate", { sourceIndex: g, newIndex: C, row: x });
2410
2422
  }
2411
2423
  break;
2412
2424
  }
2413
2425
  case "insertAbove": {
2414
2426
  const C = s.insertRowAbove(g), x = s.rows[C];
2415
- l.value = [...s.rows], o("row:insert-above", { targetIndex: g, newIndex: C, row: x });
2427
+ o.value = [...s.rows], l("row:insert-above", { targetIndex: g, newIndex: C, row: x });
2416
2428
  break;
2417
2429
  }
2418
2430
  case "insertBelow": {
2419
2431
  const C = s.insertRowBelow(g), x = s.rows[C];
2420
- l.value = [...s.rows], o("row:insert-below", { targetIndex: g, newIndex: C, row: x });
2432
+ o.value = [...s.rows], l("row:insert-below", { targetIndex: g, newIndex: C, row: x });
2421
2433
  break;
2422
2434
  }
2423
2435
  case "move": {
2424
- o("row:move", { fromIndex: g, toIndex: -1 });
2436
+ l("row:move", { fromIndex: g, toIndex: -1 });
2425
2437
  break;
2426
2438
  }
2427
2439
  case "moveUp": {
2428
- g > 0 && s.moveRow(g, g - 1) && (l.value = [...s.rows], o("row:move", { fromIndex: g, toIndex: g - 1 }));
2440
+ g > 0 && s.moveRow(g, g - 1) && (o.value = [...s.rows], l("row:move", { fromIndex: g, toIndex: g - 1 }));
2429
2441
  break;
2430
2442
  }
2431
2443
  case "moveDown": {
2432
- g < s.rows.length - 1 && s.moveRow(g, g + 1) && (l.value = [...s.rows], o("row:move", { fromIndex: g, toIndex: g + 1 }));
2444
+ g < s.rows.length - 1 && s.moveRow(g, g + 1) && (o.value = [...s.rows], l("row:move", { fromIndex: g, toIndex: g + 1 }));
2433
2445
  break;
2434
2446
  }
2435
2447
  case "open": {
2436
2448
  const C = s.rows[g];
2437
- o("row:open", { row: C, rowIndex: g, event: k });
2449
+ l("row:open", { row: C, rowIndex: g, event: k });
2438
2450
  break;
2439
2451
  }
2440
2452
  }
@@ -2452,7 +2464,7 @@ const Go = {
2452
2464
  insertRowAbove: s.insertRowAbove,
2453
2465
  insertRowBelow: s.insertRowBelow,
2454
2466
  moveRow: s.moveRow
2455
- }), (v, g) => (b(), R("div", Go, [
2467
+ }), (v, g) => (b(), R("div", Uo, [
2456
2468
  ue((b(), R("table", {
2457
2469
  ref: "table",
2458
2470
  class: "atable",
@@ -2461,14 +2473,14 @@ const Go = {
2461
2473
  })
2462
2474
  }, [
2463
2475
  he(v.$slots, "header", { data: P(s) }, () => [
2464
- wt(Pt, {
2476
+ xt(Nt, {
2465
2477
  columns: P(s).columns,
2466
2478
  store: P(s)
2467
2479
  }, null, 8, ["columns", "store"])
2468
2480
  ], !0),
2469
2481
  z("tbody", null, [
2470
2482
  he(v.$slots, "body", { data: P(s) }, () => [
2471
- (b(!0), R(me, null, be(P(s).filteredRows, (k, C) => (b(), ve(Bt, {
2483
+ (b(!0), R(me, null, be(P(s).filteredRows, (k, C) => (b(), ve(Zt, {
2472
2484
  key: `${k.originalIndex}-${C}`,
2473
2485
  row: k,
2474
2486
  "row-index": k.originalIndex,
@@ -2476,7 +2488,7 @@ const Go = {
2476
2488
  "onRow:action": m,
2477
2489
  "onRow:click": y
2478
2490
  }, {
2479
- default: pt(() => [
2491
+ default: yt(() => [
2480
2492
  (b(!0), R(me, null, be(w(k), (x, I) => (b(), R(me, {
2481
2493
  key: x.name
2482
2494
  }, [
@@ -2517,9 +2529,9 @@ const Go = {
2517
2529
  ]),
2518
2530
  he(v.$slots, "footer", { data: P(s) }, void 0, !0),
2519
2531
  he(v.$slots, "modal", { data: P(s) }, () => [
2520
- ue(wt(Zt, { store: P(s) }, {
2521
- default: pt(() => [
2522
- (b(), ve(Ne(P(s).modal.component), st({
2532
+ ue(xt(Ft, { store: P(s) }, {
2533
+ default: yt(() => [
2534
+ (b(), ve(Ne(P(s).modal.component), it({
2523
2535
  key: `${P(s).modal.rowIndex}:${P(s).modal.colIndex}`,
2524
2536
  "col-index": P(s).modal.colIndex,
2525
2537
  "row-index": P(s).modal.rowIndex,
@@ -2528,61 +2540,61 @@ const Go = {
2528
2540
  ]),
2529
2541
  _: 1
2530
2542
  }, 8, ["store"]), [
2531
- [it, P(s).modal.visible]
2543
+ [rt, P(s).modal.visible]
2532
2544
  ])
2533
2545
  ], !0)
2534
2546
  ], 4)), [
2535
- [P(yo), P(s).closeModal]
2547
+ [P(Co), P(s).closeModal]
2536
2548
  ]),
2537
- P(s).isGanttView && P(s).isDependencyGraphEnabled ? (b(), ve($o, {
2549
+ P(s).isGanttView && P(s).isDependencyGraphEnabled ? (b(), ve(Ao, {
2538
2550
  key: 0,
2539
2551
  store: P(s),
2540
2552
  "onConnection:delete": Z
2541
2553
  }, null, 8, ["store"])) : _("", !0)
2542
2554
  ]));
2543
2555
  }
2544
- }), jo = /* @__PURE__ */ Ae(Uo, [["__scopeId", "data-v-4bfbbeab"]]), Yo = {}, Jo = { class: "aloading" }, qo = { class: "aloading-header" };
2545
- function Qo(e, t) {
2546
- return b(), R("div", Jo, [
2547
- z("h2", qo, [
2556
+ }), qo = /* @__PURE__ */ Ae(Yo, [["__scopeId", "data-v-4bfbbeab"]]), Jo = {}, Qo = { class: "aloading" }, Ko = { class: "aloading-header" };
2557
+ function _o(e, t) {
2558
+ return b(), R("div", Qo, [
2559
+ z("h2", Ko, [
2548
2560
  he(e.$slots, "default", {}, void 0, !0)
2549
2561
  ]),
2550
2562
  t[0] || (t[0] = z("div", { class: "aloading-bar" }, null, -1))
2551
2563
  ]);
2552
2564
  }
2553
- const Ko = /* @__PURE__ */ Ae(Yo, [["render", Qo], ["__scopeId", "data-v-a930a25b"]]), _o = {}, el = { class: "aloading" }, tl = { class: "aloading-header" };
2554
- function nl(e, t) {
2555
- return b(), R("div", el, [
2556
- z("h2", tl, [
2565
+ const el = /* @__PURE__ */ Ae(Jo, [["render", _o], ["__scopeId", "data-v-a930a25b"]]), tl = {}, nl = { class: "aloading" }, ol = { class: "aloading-header" };
2566
+ function ll(e, t) {
2567
+ return b(), R("div", nl, [
2568
+ z("h2", ol, [
2557
2569
  he(e.$slots, "default", {}, void 0, !0)
2558
2570
  ]),
2559
2571
  t[0] || (t[0] = z("div", { class: "aloading-bar" }, null, -1))
2560
2572
  ]);
2561
2573
  }
2562
- const ol = /* @__PURE__ */ Ae(_o, [["render", nl], ["__scopeId", "data-v-e1165876"]]);
2563
- function ul(e) {
2564
- e.component("ACell", zn), e.component("AGanttCell", qn), e.component("ARow", Bt), e.component("ARowActions", Ye), e.component("ATable", jo), e.component("ATableHeader", Pt), e.component("ATableLoading", Ko), e.component("ATableLoadingBar", ol), e.component("ATableModal", Zt);
2574
+ const al = /* @__PURE__ */ Ae(tl, [["render", ll], ["__scopeId", "data-v-e1165876"]]);
2575
+ function fl(e) {
2576
+ e.component("ACell", Gn), e.component("AGanttCell", Kn), e.component("ARow", Zt), e.component("ARowActions", Ye), e.component("ATable", qo), e.component("ATableHeader", Nt), e.component("ATableLoading", el), e.component("ATableLoadingBar", al), e.component("ATableModal", Ft);
2565
2577
  }
2566
2578
  export {
2567
- zn as ACell,
2568
- qn as AGanttCell,
2569
- Bt as ARow,
2579
+ Gn as ACell,
2580
+ Kn as AGanttCell,
2581
+ Zt as ARow,
2570
2582
  Ye as ARowActions,
2571
- jo as ATable,
2572
- Pt as ATableHeader,
2573
- Ko as ATableLoading,
2574
- ol as ATableLoadingBar,
2575
- Zt as ATableModal,
2576
- Qn as AddIcon,
2577
- Kn as DeleteIcon,
2578
- _n as DuplicateIcon,
2579
- eo as InsertAboveIcon,
2580
- to as InsertBelowIcon,
2581
- no as MoveIcon,
2582
- oo as OpenIcon,
2583
- so as actionIcons,
2584
- Zn as createTableStore,
2585
- ul as install,
2586
- Xo as schemaToColumns
2583
+ qo as ATable,
2584
+ Nt as ATableHeader,
2585
+ el as ATableLoading,
2586
+ al as ATableLoadingBar,
2587
+ Ft as ATableModal,
2588
+ _n as AddIcon,
2589
+ eo as DeleteIcon,
2590
+ to as DuplicateIcon,
2591
+ no as InsertAboveIcon,
2592
+ oo as InsertBelowIcon,
2593
+ lo as MoveIcon,
2594
+ ao as OpenIcon,
2595
+ ro as actionIcons,
2596
+ Fn as createTableStore,
2597
+ fl as install,
2598
+ jo as schemaToColumns
2587
2599
  };
2588
2600
  //# sourceMappingURL=atable.js.map