vlite3 1.5.0 → 1.5.2

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.
Files changed (41) hide show
  1. package/components/Button.vue.js +2 -2
  2. package/components/Button.vue2.js +10 -10
  3. package/components/CategoryManager/CategoryManager.vue2.js +3 -3
  4. package/components/Chart/GanttChart.vue.d.ts +92 -2
  5. package/components/Chart/GanttChart.vue.js +2 -2
  6. package/components/Chart/GanttChart.vue2.js +1028 -878
  7. package/components/Chart/GanttChartDateUtils.js +28 -24
  8. package/components/Chart/index.d.ts +1 -1
  9. package/components/Chart/types.d.ts +88 -1
  10. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  11. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  12. package/components/DataTable/DataTable.vue.js +1 -1
  13. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  14. package/components/Form/{AccordionView.vue.js → AccordionView.vue2.js} +1 -1
  15. package/components/Form/index.vue2.js +1 -1
  16. package/components/Kanban/Kanban.vue.d.ts +6 -5
  17. package/components/Kanban/Kanban.vue.js +1 -1
  18. package/components/Kanban/Kanban.vue2.js +139 -118
  19. package/components/Kanban/groupKanbanData.d.ts +36 -0
  20. package/components/Kanban/groupKanbanData.js +72 -0
  21. package/components/Kanban/index.d.ts +1 -0
  22. package/components/Kanban/types.d.ts +17 -0
  23. package/components/NavbarCommandPalette.vue.js +1 -1
  24. package/components/PanZoomViewport/PanZoomViewport.vue.d.ts +1 -1
  25. package/components/RichTextEditor/RichTextEditor.vue.js +4 -4
  26. package/components/RichTextEditor/RichTextLinkPopover.vue3.js +2 -2
  27. package/components/RichTextEditor/RichTextToolbar.vue3.js +2 -2
  28. package/components/Screen/Screen.vue.js +80 -82
  29. package/components/Screen/ScreenFilter.vue.js +3 -3
  30. package/components/Screen/components/ScreenAddAction.vue.js +32 -32
  31. package/components/Screen/components/ScreenHeaderTitle.vue.js +11 -11
  32. package/components/Screen/components/ScreenToolbar.vue.d.ts +9 -0
  33. package/components/Screen/components/ScreenToolbar.vue.js +85 -52
  34. package/components/ToastNotification.vue.js +2 -2
  35. package/components/ToastNotification.vue2.js +38 -36
  36. package/index.js +426 -421
  37. package/package.json +1 -1
  38. package/style.css +10 -1
  39. /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
  40. /package/components/RichTextEditor/{RichTextLinkPopover.vue2.js → RichTextLinkPopover.vue.js} +0 -0
  41. /package/components/RichTextEditor/{RichTextToolbar.vue2.js → RichTextToolbar.vue.js} +0 -0
@@ -1,51 +1,50 @@
1
- import { defineComponent as Wn, ref as m, computed as D, watch as me, onMounted as An, onUnmounted as En, openBlock as d, createElementBlock as v, createElementVNode as s, createCommentVNode as p, createStaticVNode as Rn, normalizeStyle as E, Fragment as C, renderList as z, normalizeClass as xe, toDisplayString as I, unref as X, withDirectives as Bn, vShow as Pn, withKeys as je, withModifiers as zt, createBlock as Hn, Teleport as _n, createTextVNode as Xt, nextTick as Ue } from "vue";
2
- import { CHART_COLORS as zn, getColor as Xn, animateProgress as Gn } from "./utils.js";
3
- import { resolveGanttScheduleDependencyEdges as Gt, ganttDependencyEdgeKey as qn, ganttDependencyTypeLabel as qt, getGanttDependencyEdgeScrollDelta as Ft, getGanttDependencyConnectorPosition as Fn, validateGanttDependencyLink as Je, describeGanttDependencyLinkValidation as Qe, findGanttDependencyBarAtPoint as Yn } from "./GanttChartDependencyUtils.js";
4
- import { routeGanttDependencyConnectors as On, ganttConnectorPreviewPath as Vn, ganttConnectorArrowPath as Kn } from "./GanttChartConnectorRouting.js";
5
- import { parseGanttDate as we, ganttAddDays as Nn, ganttStartOfWeek as Zn, ganttStartOfMonth as jn, ganttDateToX as Un, ganttCalendarDaysBetween as Jn, ganttDaysToPx as Qn, ganttPxToDays as eo } from "./GanttChartDateUtils.js";
6
- import { ganttPreviewBarGeometry as to, computeGanttInteractionPreview as no } from "./GanttChartResizePreviewUtils.js";
7
- import { placeGanttTaskTooltip as oo, isGanttPointerNearConnector as ao } from "./GanttChartTooltipUtils.js";
8
- const lo = {
1
+ import { defineComponent as ao, ref as h, computed as b, watch as fe, onMounted as lo, nextTick as Me, onUnmounted as ro, openBlock as v, createElementBlock as f, createElementVNode as u, createCommentVNode as m, normalizeStyle as A, normalizeClass as ge, Fragment as T, renderList as O, toDisplayString as S, unref as X, withDirectives as so, vShow as io, withKeys as st, withModifiers as rn, createBlock as it, Teleport as uo } from "vue";
2
+ import co from "../Persona.vue.js";
3
+ import vo from "../AvatarGroup/AvatarGroup.vue.js";
4
+ import { CHART_COLORS as fo, getColor as go, animateProgress as yo } from "./utils.js";
5
+ import { resolveGanttScheduleDependencyEdges as sn, ganttDependencyEdgeKey as po, ganttDependencyTypeLabel as un, getGanttDependencyEdgeScrollDelta as cn, getGanttDependencyConnectorPosition as ho, validateGanttDependencyLink as ut, describeGanttDependencyLinkValidation as ct, findGanttDependencyBarAtPoint as mo } from "./GanttChartDependencyUtils.js";
6
+ import { routeGanttDependencyConnectors as ko, ganttConnectorPreviewPath as xo, ganttConnectorArrowPath as bo } from "./GanttChartConnectorRouting.js";
7
+ import { parseGanttDate as oe, formatGanttLocalDate as wo, ganttAddDays as Do, ganttStartOfWeek as Io, ganttStartOfMonth as So, ganttDateToX as Mo, ganttColumnBoundaryX as Co, ganttCalendarDaysBetween as $o, ganttDaysToPx as Lo, ganttPxToDays as To } from "./GanttChartDateUtils.js";
8
+ import { ganttPreviewBarGeometry as Wo, computeGanttInteractionPreview as Ao } from "./GanttChartResizePreviewUtils.js";
9
+ import { placeGanttTaskTooltip as Eo, isGanttPointerNearConnector as Po } from "./GanttChartTooltipUtils.js";
10
+ const Ro = {
9
11
  key: 0,
10
12
  class: "vlite-gantt-toolbar"
11
- }, ro = {
13
+ }, Bo = {
12
14
  key: 0,
13
15
  class: "vlite-gantt-legend-blocked",
14
16
  role: "note",
15
17
  "aria-label": "Legend: blocked task"
16
- }, so = {
17
- key: 1,
18
- class: "vlite-gantt-zoom-controls"
19
- }, io = ["disabled"], uo = ["disabled"], co = { class: "vlite-gantt-wrapper" }, vo = ["onClick"], fo = { class: "text-xs font-bold text-foreground uppercase tracking-wide" }, go = { class: "vlite-gantt-group-count" }, yo = ["onClick"], po = { class: "truncate text-xs font-medium text-foreground" }, ho = {
18
+ }, Ho = { class: "vlite-gantt-wrapper" }, _o = {
19
+ key: 0,
20
+ class: "text-xs font-semibold text-muted-foreground uppercase tracking-wider"
21
+ }, zo = ["aria-label", "aria-expanded"], Xo = ["onClick"], Go = { class: "text-xs font-bold text-foreground uppercase tracking-wide" }, Fo = { class: "vlite-gantt-group-count" }, Oo = ["title", "onClick"], qo = { class: "truncate text-xs font-medium text-foreground" }, Vo = {
20
22
  key: 0,
21
23
  class: "vlite-gantt-progress-badge"
22
- }, ko = ["width", "height"], mo = ["x1", "x2", "y2"], xo = ["x", "y"], wo = ["x", "y"], bo = ["width", "height"], Do = ["id"], Io = ["stop-color"], $o = ["stop-color"], Mo = ["id"], So = ["stop-color"], Lo = ["stop-color"], Co = ["id"], To = ["x1", "x2", "y2"], Wo = ["y1", "x2", "y2"], Ao = ["y", "width", "height"], Eo = ["aria-label"], Ro = ["d", "tabindex", "onClick", "onKeydown", "onMouseenter", "onFocus"], Bo = ["d", "stroke", "stroke-width", "stroke-opacity"], Po = ["d", "fill", "fill-opacity"], Ho = ["transform", "aria-label", "onKeydown"], _o = ["onMouseenter"], zo = ["d", "fill", "stroke", "opacity", "onMouseenter", "onMousemove", "onClick"], Xo = ["d", "fill"], Go = ["d", "fill"], qo = ["d", "fill"], Fo = ["d", "fill"], Yo = ["d"], Oo = ["transform"], Vo = ["x", "y", "width", "height", "onMouseenter", "onMousemove", "onMousedown", "onClick"], Ko = ["x", "y", "width", "height", "rx", "ry"], No = ["x", "y", "height"], Zo = ["x", "y", "height"], jo = ["data-name", "x", "y", "fill", "opacity"], Uo = ["transform", "aria-label", "onPointerdown", "onKeydown", "onFocus", "onMouseenter"], Jo = {
24
+ }, Zo = ["width", "height"], Yo = ["x1", "x2", "y2", "stroke-opacity"], Ko = ["x", "y"], No = ["x", "y"], Uo = ["width", "height"], jo = ["id"], Jo = ["stop-color"], Qo = ["stop-color"], ea = ["id"], ta = ["stop-color"], na = ["stop-color"], oa = ["id"], aa = ["x1", "x2", "y2", "stroke-opacity"], la = ["y1", "x2", "y2", "stroke-opacity"], ra = ["y", "width", "height"], sa = ["aria-label"], ia = ["d", "tabindex", "onClick", "onKeydown", "onMouseenter", "onFocus"], ua = ["d", "stroke", "stroke-width", "stroke-opacity"], ca = ["d", "fill", "fill-opacity"], da = ["transform", "aria-label", "onKeydown"], va = ["onMouseenter"], fa = ["d", "fill", "stroke", "opacity", "onMouseenter", "onMousemove", "onClick"], ga = ["d", "fill"], ya = ["d", "fill"], pa = ["d", "fill"], ha = ["d", "fill"], ma = ["d"], ka = ["transform"], xa = ["x", "y", "width", "height", "onMouseenter", "onMousemove", "onMousedown", "onClick"], ba = ["x", "y", "width", "height", "rx", "ry"], wa = ["x", "y", "height"], Da = ["x", "y", "height"], Ia = ["data-name", "x", "y", "fill", "opacity"], Sa = ["transform", "aria-label", "onPointerdown", "onKeydown", "onFocus", "onMouseenter"], Ma = {
23
25
  key: 3,
24
26
  class: "pointer-events-none"
25
- }, Qo = ["x", "y", "width", "height", "rx", "stroke", "stroke-dasharray"], ea = ["x", "y", "fill"], ta = {
27
+ }, Ca = ["x", "y", "width", "height", "rx", "stroke", "stroke-dasharray"], $a = ["x", "y", "fill"], La = {
26
28
  key: 2,
27
29
  class: "vlite-gantt-link-preview pointer-events-none"
28
- }, na = ["x1", "y1", "x2", "y2", "stroke", "stroke-dasharray", "stroke-opacity"], oa = ["cx", "cy", "fill", "fill-opacity"], aa = { key: 3 }, la = ["x1", "x2", "y2", "stroke"], ra = ["cx", "fill"], sa = ["x", "fill"], ia = {
30
+ }, Ta = ["x1", "y1", "x2", "y2", "stroke", "stroke-dasharray", "stroke-opacity"], Wa = ["cx", "cy", "fill", "fill-opacity"], Aa = { key: 3 }, Ea = ["x1", "x2", "y2", "stroke"], Pa = ["cx", "fill"], Ra = ["x", "fill"], Ba = {
29
31
  class: "sr-only",
30
32
  role: "status",
31
33
  "aria-live": "polite",
32
34
  "aria-atomic": "true"
33
- }, ua = { class: "font-semibold text-xs mb-1.5" }, ca = { class: "flex items-center gap-1.5 text-[11px] text-muted-foreground mb-1" }, da = { class: "text-[10px] text-muted-foreground" }, va = {
35
+ }, Ha = { class: "font-semibold text-xs mb-1.5" }, _a = { class: "flex items-center gap-1.5 text-[11px] text-muted-foreground mb-1" }, za = { class: "text-[10px] text-muted-foreground" }, Xa = {
34
36
  key: 0,
35
37
  class: "mt-1.5 flex items-center gap-2"
36
- }, fa = { class: "vlite-gantt-tooltip-progress-track" }, ga = { class: "text-[10px] font-semibold" }, ya = {
38
+ }, Ga = { class: "vlite-gantt-tooltip-progress-track" }, Fa = { class: "text-[10px] font-semibold" }, Oa = {
37
39
  key: 1,
38
40
  class: "vlite-gantt-tooltip-blocked mt-1.5"
39
- }, pa = {
41
+ }, qa = {
40
42
  key: 2,
41
43
  class: "text-[10px] text-muted-foreground mt-1 opacity-60"
42
- }, ha = {
44
+ }, Va = {
43
45
  key: 3,
44
- class: "text-[9px] text-muted-foreground mt-1.5 opacity-40"
45
- }, ka = {
46
- key: 4,
47
- class: "text-[9px] text-muted-foreground mt-1 opacity-40"
48
- }, et = "#eab308", Yt = 8, ma = 7, Ot = 6.5, xa = 10, La = /* @__PURE__ */ Wn({
46
+ class: "mt-2 pt-2 border-t border-border/60"
47
+ }, Za = 40, dn = 6, dt = "#eab308", vn = 8, Ya = 7, fn = 6.5, Ka = 10, al = /* @__PURE__ */ ao({
49
48
  __name: "GanttChart",
50
49
  props: {
51
50
  tasks: {},
@@ -56,6 +55,7 @@ const lo = {
56
55
  barHeight: { default: 28 },
57
56
  sidebarWidth: { default: 220 },
58
57
  showGrid: { type: Boolean, default: !0 },
58
+ gridOpacity: { default: 0.15 },
59
59
  showTooltip: { type: Boolean, default: !0 },
60
60
  showLabels: { type: Boolean, default: !0 },
61
61
  showProgress: { type: Boolean, default: !0 },
@@ -63,170 +63,286 @@ const lo = {
63
63
  showTodayLine: { type: Boolean, default: !0 },
64
64
  showHeader: { type: Boolean, default: !0 },
65
65
  animate: { type: Boolean, default: !0 },
66
- colors: { default: () => zn },
66
+ colors: { default: () => fo },
67
67
  todayColor: { default: "var(--color-danger)" },
68
68
  locale: { default: "en-US" },
69
69
  draggable: { type: Boolean, default: !0 },
70
70
  editableDependencies: { type: Boolean, default: !1 },
71
71
  cascadeDependencies: { type: Boolean, default: !1 },
72
- zoom: { type: Boolean, default: !0 }
72
+ zoom: { type: Boolean, default: !0 },
73
+ minZoom: { default: 0.2 },
74
+ maxZoom: { default: 5 },
75
+ zoomStep: { default: 0.2 },
76
+ visiblePeriodCount: {},
77
+ minColumnWidth: {},
78
+ timelineStart: {},
79
+ timelineEnd: {},
80
+ rangePadding: { default: 0 },
81
+ preserveCenterDate: { type: Boolean, default: !0 },
82
+ collapsibleSidebar: { type: Boolean, default: !0 },
83
+ defaultSidebarCollapsed: { type: Boolean, default: !1 }
73
84
  },
74
- emits: ["task-click", "task-hover", "task-update", "dependency-create", "dependency-delete"],
75
- setup(c, { emit: Vt }) {
76
- const u = c, J = Vt;
77
- function tt(e) {
78
- return we(e);
85
+ emits: ["task-click", "task-hover", "task-update", "dependency-create", "dependency-delete", "zoom-change", "sidebar-toggle"],
86
+ setup(d, { expose: gn, emit: yn }) {
87
+ const r = d, q = yn;
88
+ function vt(e) {
89
+ return oe(e);
79
90
  }
80
- function nt(e, n) {
81
- return Jn(e, n);
91
+ function ft(e, n) {
92
+ return $o(e, n);
82
93
  }
83
- function O(e, n) {
84
- return Nn(e, n);
94
+ function ae(e, n) {
95
+ return Do(e, n);
85
96
  }
86
- function Kt(e) {
87
- return Zn(e);
97
+ function Oe(e) {
98
+ return Io(e);
88
99
  }
89
- function Nt(e) {
90
- return jn(e);
100
+ function qe(e) {
101
+ return So(e);
91
102
  }
92
- const be = m(), R = m(), re = m(800);
93
- let Pe = null;
94
- function Zt() {
95
- be.value && (Pe = new ResizeObserver((e) => {
103
+ const Ce = h(), I = h(), N = h(800);
104
+ let Ve = null;
105
+ function pn() {
106
+ Ce.value && (Ve = new ResizeObserver((e) => {
96
107
  const n = Math.round(e[0].contentRect.width || 800);
97
- Math.abs(re.value - n) > 0.5 && (re.value = n);
98
- }), Pe.observe(be.value), re.value = Math.round(be.value.clientWidth || 800));
99
- }
100
- const x = D(
101
- () => u.tasks.map((e, n) => ({
108
+ Math.abs(N.value - n) > 0.5 && (N.value = n);
109
+ }), Ve.observe(Ce.value), N.value = Math.round(Ce.value.clientWidth || 800));
110
+ }
111
+ const M = h(r.defaultSidebarCollapsed), le = b(
112
+ () => r.collapsibleSidebar && M.value ? Za : r.sidebarWidth
113
+ );
114
+ function gt() {
115
+ if (!r.collapsibleSidebar) return;
116
+ const e = Ye.value;
117
+ M.value = !M.value, q("sidebar-toggle", M.value), e && Me(() => Ke(e, "center"));
118
+ }
119
+ const k = b(
120
+ () => r.tasks.map((e, n) => ({
102
121
  ...e,
103
- _start: tt(e.start),
104
- _end: tt(e.end),
105
- _color: e.color ?? Xn(u.colors, n),
122
+ _start: vt(e.start),
123
+ _end: vt(e.end),
124
+ _color: e.color ?? go(r.colors, n),
106
125
  _index: n
107
126
  }))
108
- ), ot = D(() => x.value.some((e) => e.blocked)), De = m(/* @__PURE__ */ new Set());
109
- function jt(e) {
110
- const n = new Set(De.value);
111
- n.has(e) ? n.delete(e) : n.add(e), De.value = n;
127
+ ), yt = b(() => k.value.some((e) => e.blocked)), $e = h(/* @__PURE__ */ new Set());
128
+ function hn(e) {
129
+ const n = new Set($e.value);
130
+ n.has(e) ? n.delete(e) : n.add(e), $e.value = n;
112
131
  }
113
- const He = D(() => {
132
+ const Ze = b(() => {
114
133
  const e = /* @__PURE__ */ new Map(), n = [];
115
- for (const t of x.value)
134
+ for (const t of k.value)
116
135
  t.group ? (e.has(t.group) || e.set(t.group, []), e.get(t.group).push(t)) : n.push(t);
117
136
  return { grouped: e, ungrouped: n };
118
- }), se = D(() => {
137
+ }), ye = b(() => {
119
138
  const e = [];
120
- for (const [n, t] of He.value.grouped)
121
- if (e.push({ type: "group-header", group: n }), !De.value.has(n)) for (const o of t) e.push({ type: "task", group: n, task: o });
122
- for (const n of He.value.ungrouped) e.push({ type: "task", task: n });
139
+ for (const [n, t] of Ze.value.grouped)
140
+ if (e.push({ type: "group-header", group: n }), !$e.value.has(n)) for (const o of t) e.push({ type: "task", group: n, task: o });
141
+ for (const n of Ze.value.ungrouped) e.push({ type: "task", task: n });
123
142
  return e;
124
- }), Ie = D(() => {
125
- if (!x.value.length) {
126
- const l = we(/* @__PURE__ */ new Date());
127
- return { start: O(l, -7), end: O(l, 30) };
143
+ });
144
+ function pt(e, n) {
145
+ return new Date(e.getFullYear(), e.getMonth() + n, 1, 0, 0, 0, 0);
146
+ }
147
+ const U = b(() => {
148
+ const e = r.timelineStart ? oe(r.timelineStart) : null, n = r.timelineEnd ? oe(r.timelineEnd) : null;
149
+ let t, o;
150
+ if (k.value.length) {
151
+ t = k.value[0]._start, o = k.value[0]._end;
152
+ for (const g of k.value)
153
+ g._start < t && (t = g._start), g._end > o && (o = g._end);
154
+ } else {
155
+ const g = oe(/* @__PURE__ */ new Date());
156
+ t = g, o = g;
128
157
  }
129
- let e = x.value[0]._start, n = x.value[0]._end;
130
- for (const l of x.value)
131
- l._start < e && (e = l._start), l._end > n && (n = l._end);
132
- const t = u.viewMode === "day" ? 2 : u.viewMode === "week" ? 5 : 15;
133
- let o = O(e, -t), a = O(n, t);
134
- return u.viewMode === "week" ? o = Kt(o) : u.viewMode === "month" ? o = Nt(o) : o = we(o), { start: o, end: a };
135
- }), $ = m(1);
136
- let Q = null;
137
- function Ut(e) {
138
- if (u.zoom && (e.ctrlKey || e.metaKey)) {
139
- e.preventDefault();
140
- const n = R.value;
141
- if (!n) return;
142
- const t = n.getBoundingClientRect(), o = e.clientX - t.left, l = (Q !== null ? Q : n.scrollLeft) + o, f = $.value;
143
- let g = f * Math.exp(-e.deltaY * 5e-3);
144
- if (g = Math.max(0.2, Math.min(g, 5)), g === f) return;
145
- $.value = g;
146
- const k = g / f;
147
- Q = l * k - o, Ue(() => {
148
- R.value && Q !== null && (R.value.scrollLeft = Q, Q = null);
149
- });
158
+ e && (t = e), n && (o = n);
159
+ const a = Math.max(0, Math.floor(r.rangePadding));
160
+ if (r.viewMode === "month") {
161
+ const g = qe(e || t), p = n ? qe(n) : pt(o, a);
162
+ return { start: g, end: p < g ? g : p };
150
163
  }
164
+ const l = Oe(e || t), c = n || ae(Oe(o), 6 + 7 * a);
165
+ return { start: l, end: c < l ? l : c };
166
+ }), C = h(1);
167
+ let re = null;
168
+ function ht(e) {
169
+ return Math.max(r.minZoom, Math.min(e, r.maxZoom));
151
170
  }
152
- function Jt() {
153
- const e = R.value;
154
- if (!e) {
155
- $.value = Math.min($.value + 0.2, 5);
171
+ function mn() {
172
+ return {
173
+ zoom: C.value,
174
+ canZoomIn: C.value < r.maxZoom,
175
+ canZoomOut: C.value > r.minZoom,
176
+ min: r.minZoom,
177
+ max: r.maxZoom
178
+ };
179
+ }
180
+ fe(C, () => q("zoom-change", mn()));
181
+ function Le(e, n) {
182
+ const t = I.value, o = C.value, a = ht(e);
183
+ if (a === o) return;
184
+ if (!t) {
185
+ C.value = a;
156
186
  return;
157
187
  }
158
- const n = e.clientWidth / 2, t = e.scrollLeft + n, o = $.value;
159
- $.value = Math.min(o + 0.2, 5);
160
- const a = $.value / o;
161
- Ue(() => e.scrollLeft = t * a - n);
188
+ const l = t.clientWidth / 2, c = t.scrollLeft + l;
189
+ C.value = a;
190
+ const g = a / o;
191
+ Me(() => {
192
+ I.value && (I.value.scrollLeft = c * g - l);
193
+ });
162
194
  }
163
- function Qt() {
164
- const e = R.value;
165
- if (!e) {
166
- $.value = Math.max($.value - 0.2, 0.2);
167
- return;
195
+ function kn(e) {
196
+ if (r.zoom && (e.ctrlKey || e.metaKey)) {
197
+ e.preventDefault();
198
+ const n = I.value;
199
+ if (!n) return;
200
+ const t = n.getBoundingClientRect(), o = e.clientX - t.left, l = (re !== null ? re : n.scrollLeft) + o, c = C.value, g = ht(c * Math.exp(-e.deltaY * 5e-3));
201
+ if (g === c) return;
202
+ C.value = g;
203
+ const p = g / c;
204
+ re = l * p - o, Me(() => {
205
+ I.value && re !== null && (I.value.scrollLeft = re, re = null);
206
+ });
168
207
  }
169
- const n = e.clientWidth / 2, t = e.scrollLeft + n, o = $.value;
170
- $.value = Math.max(o - 0.2, 0.2);
171
- const a = $.value / o;
172
- Ue(() => e.scrollLeft = t * a - n);
173
208
  }
174
- const _e = D(() => {
175
- const e = [], { start: n, end: t } = Ie.value;
209
+ function xn() {
210
+ Le(C.value + r.zoomStep);
211
+ }
212
+ function bn() {
213
+ Le(C.value - r.zoomStep);
214
+ }
215
+ function wn(e) {
216
+ Le(e);
217
+ }
218
+ function Dn() {
219
+ Le(1);
220
+ }
221
+ const Te = b(() => {
222
+ const e = [], { start: n, end: t } = U.value;
176
223
  let o = new Date(n);
177
- if (u.viewMode === "day")
224
+ if (r.viewMode === "day")
178
225
  for (; o <= t; )
179
- e.push(o), o = O(o, 1);
180
- else if (u.viewMode === "week")
226
+ e.push(o), o = ae(o, 1);
227
+ else if (r.viewMode === "week")
181
228
  for (; o <= t; )
182
- e.push(o), o = O(o, 7);
229
+ e.push(o), o = ae(o, 7);
183
230
  else
184
231
  for (; o <= t; )
185
232
  e.push(o), o = new Date(o.getFullYear(), o.getMonth() + 1, 1);
186
233
  return e;
187
- }), ie = D(() => {
188
- let n = { day: 40, week: 120, month: 180 }[u.viewMode] * $.value;
189
- const t = Math.max(0, re.value - u.sidebarWidth), o = _e.value.length;
190
- return o > 0 && n * o < t && (n = t / o), n;
191
- }), at = D(() => {
192
- const e = ie.value;
193
- return _e.value.map((n, t) => {
194
- let o = "", a = "";
195
- return u.viewMode === "day" ? (o = n.toLocaleDateString(u.locale, { day: "numeric" }), a = n.toLocaleDateString(u.locale, { weekday: "short" })) : u.viewMode === "week" ? (o = n.toLocaleDateString(u.locale, { month: "short", day: "numeric" }), a = `W${en(n)}`) : (o = n.toLocaleDateString(u.locale, { month: "long" }), a = String(n.getFullYear())), { label: o, sublabel: a, x: t * e, width: e };
196
- });
234
+ }), mt = {
235
+ day: { min: 44, defaultVisible: 7 },
236
+ week: { min: 96, defaultVisible: 4 },
237
+ // 1.7 one full month plus a peek at the next, hinting more to scroll.
238
+ month: { min: 130, defaultVisible: 1.7 }
239
+ }, In = b(() => {
240
+ const e = mt[r.viewMode], n = Te.value.length || 1, t = r.visiblePeriodCount && r.visiblePeriodCount > 0 ? r.visiblePeriodCount : e.defaultVisible;
241
+ return Math.max(1, Math.min(t, n));
242
+ }), G = b(() => {
243
+ const e = mt[r.viewMode], n = r.minColumnWidth != null ? r.minColumnWidth : e.min, t = Math.max(0, N.value - le.value);
244
+ if (t <= 0) return n * C.value;
245
+ const o = t / In.value;
246
+ return Math.max(n, o) * C.value;
247
+ }), We = h(0), Sn = b(() => {
248
+ const e = G.value, n = Te.value.length;
249
+ if (e <= 0 || n === 0) return { start: 0, end: n };
250
+ const t = Math.max(0, N.value - le.value) || e, o = Math.floor(We.value / e) - dn, a = Math.ceil((We.value + t) / e) + dn;
251
+ return {
252
+ start: Math.max(0, o),
253
+ end: Math.min(n, Math.max(0, a))
254
+ };
255
+ });
256
+ function Mn(e) {
257
+ return r.viewMode === "day" ? {
258
+ label: e.toLocaleDateString(r.locale, { day: "numeric" }),
259
+ sublabel: e.toLocaleDateString(r.locale, { weekday: "short" })
260
+ } : r.viewMode === "week" ? {
261
+ label: e.toLocaleDateString(r.locale, { month: "short", day: "numeric" }),
262
+ sublabel: `W${Cn(e)}`
263
+ } : {
264
+ label: e.toLocaleDateString(r.locale, { month: "long" }),
265
+ sublabel: String(e.getFullYear())
266
+ };
267
+ }
268
+ const kt = b(() => {
269
+ const e = G.value, { start: n, end: t } = Sn.value, o = Te.value, a = [];
270
+ for (let l = n; l < t; l++) {
271
+ const c = o[l], { label: g, sublabel: p } = Mn(c);
272
+ a.push({ key: wo(c), label: g, sublabel: p, x: l * e, width: e });
273
+ }
274
+ return a;
197
275
  });
198
- function en(e) {
276
+ function Cn(e) {
199
277
  const n = new Date(e.getTime());
200
278
  n.setHours(0, 0, 0, 0), n.setDate(n.getDate() + 3 - (n.getDay() + 6) % 7);
201
279
  const t = new Date(n.getFullYear(), 0, 4);
202
280
  return 1 + Math.round(((n.getTime() - t.getTime()) / 864e5 - 3 + (t.getDay() + 6) % 7) / 7);
203
281
  }
204
- const ee = D(() => _e.value.length * ie.value), te = D(() => u.showHeader ? 56 : 0), ne = D(() => {
205
- const e = se.value.length * u.rowHeight;
206
- return Math.max(u.height || e, e);
282
+ const se = b(() => Te.value.length * G.value), ie = b(() => r.showHeader ? 56 : 0), ue = b(() => {
283
+ const e = ye.value.length * r.rowHeight;
284
+ return Math.max(r.height || e, e);
207
285
  });
208
- function $e(e) {
209
- return Un(e, Ie.value.start, u.viewMode, ie.value);
286
+ function Ae(e) {
287
+ return Mo(e, U.value.start, r.viewMode, G.value);
210
288
  }
211
- function tn(e) {
212
- return eo(e, u.viewMode, ie.value);
289
+ function $n(e) {
290
+ return To(e, r.viewMode, G.value);
213
291
  }
214
- function nn(e) {
215
- return Qn(e, u.viewMode, ie.value);
292
+ function Ln(e) {
293
+ return Lo(e, r.viewMode, G.value);
294
+ }
295
+ function Tn(e) {
296
+ const n = U.value.start, t = G.value || 1;
297
+ if (r.viewMode === "month") {
298
+ const a = e / t, l = Math.floor(a), c = pt(n, l), g = new Date(c.getFullYear(), c.getMonth() + 1, 0).getDate();
299
+ return ae(c, Math.round((a - l) * g));
300
+ }
301
+ const o = r.viewMode === "week" ? e / t * 7 : e / t;
302
+ return ae(n, Math.round(o));
303
+ }
304
+ const Ye = h(null);
305
+ function xt() {
306
+ return Math.max(0, N.value - le.value) || (I.value?.clientWidth ?? 0);
307
+ }
308
+ function bt() {
309
+ I.value && (Ye.value = Tn(I.value.scrollLeft + xt() / 2));
310
+ }
311
+ function Ke(e, n = "start") {
312
+ const t = I.value;
313
+ if (!t) return;
314
+ const o = Co(e, U.value.start, r.viewMode, G.value), a = xt();
315
+ let l = o;
316
+ n === "center" && (l = o - a / 2 + G.value / 2);
317
+ const c = Math.max(0, t.scrollWidth - a);
318
+ t.scrollLeft = Math.max(0, Math.min(l, c)), We.value = t.scrollLeft, bt();
319
+ }
320
+ function wt() {
321
+ const e = oe(/* @__PURE__ */ new Date()), { start: n, end: t } = U.value;
322
+ if (e >= n && e <= t) return e;
323
+ if (k.value.length) {
324
+ let o = k.value[0]._start;
325
+ for (const a of k.value) a._start < o && (o = a._start);
326
+ return o;
327
+ }
328
+ return n;
216
329
  }
217
- const w = D(() => {
218
- const e = Re.value;
219
- return se.value.reduce((n, t, o) => {
330
+ function Dt() {
331
+ Ke(wt(), "start");
332
+ }
333
+ const w = b(() => {
334
+ const e = Ge.value;
335
+ return ye.value.reduce((n, t, o) => {
220
336
  if (t.type !== "task" || !t.task) return n;
221
- const a = t.task, l = $e(a._start), f = $e(a._end), g = Math.max(8, f - l), k = g * e, b = o * u.rowHeight + (u.rowHeight - u.barHeight) / 2, A = a.progress != null ? g * Math.min(100, a.progress) / 100 * e : 0;
222
- return n.push({ task: a, x: l, y: b, fullW: g, w: k, progressW: A, rowIndex: o }), n;
337
+ const a = t.task, l = Ae(a._start), c = Ae(a._end), g = Math.max(8, c - l), p = g * e, D = o * r.rowHeight + (r.rowHeight - r.barHeight) / 2, R = a.progress != null ? g * Math.min(100, a.progress) / 100 * e : 0;
338
+ return n.push({ task: a, x: l, y: D, fullW: g, w: p, progressW: R, rowIndex: o }), n;
223
339
  }, []);
224
- }), lt = D(() => {
340
+ }), It = b(() => {
225
341
  const e = /* @__PURE__ */ new Map();
226
342
  for (const n of w.value) e.set(n.task.id, n);
227
343
  return e;
228
- }), V = D(() => {
229
- if (!u.showDependencies) return [];
344
+ }), j = b(() => {
345
+ if (!r.showDependencies) return [];
230
346
  const e = /* @__PURE__ */ new Map();
231
347
  for (const t of w.value)
232
348
  e.set(t.task.id, {
@@ -234,140 +350,140 @@ const lo = {
234
350
  x: t.x,
235
351
  y: t.y,
236
352
  w: t.fullW,
237
- h: u.barHeight,
353
+ h: r.barHeight,
238
354
  row: t.rowIndex,
239
355
  milestone: t.task.milestone
240
356
  });
241
- const n = Gt(x.value).map((t) => ({
357
+ const n = sn(k.value).map((t) => ({
242
358
  predecessorId: t.predecessorId,
243
359
  successorId: t.successorId,
244
- key: qn(t.predecessorId, t.successorId)
360
+ key: po(t.predecessorId, t.successorId)
245
361
  }));
246
- return On(n, e, {
247
- rowHeight: u.rowHeight,
248
- barHeight: u.barHeight,
249
- chartWidth: ee.value,
250
- chartHeight: ne.value,
362
+ return ko(n, e, {
363
+ rowHeight: r.rowHeight,
364
+ barHeight: r.barHeight,
365
+ chartWidth: se.value,
366
+ chartHeight: ue.value,
251
367
  cornerRadius: 5
252
368
  });
253
- }), G = m(null);
254
- function rt(e) {
255
- i.active || r.active || h.value || (G.value = e);
369
+ }), V = h(null);
370
+ function St(e) {
371
+ i.active || s.active || x.value || (V.value = e);
256
372
  }
257
- function st() {
258
- G.value = null;
373
+ function Mt() {
374
+ V.value = null;
259
375
  }
260
- const it = /* @__PURE__ */ new Map();
261
- function on(e, n) {
262
- it.set(n, e ?? null);
376
+ const Ct = /* @__PURE__ */ new Map();
377
+ function Wn(e, n) {
378
+ Ct.set(n, e ?? null);
263
379
  }
264
- function ut(e, n, t) {
265
- const o = it.get(e);
380
+ function $t(e, n, t) {
381
+ const o = Ct.get(e);
266
382
  if (!o) return;
267
383
  const a = o.querySelector('[data-dep-part="hit"]');
268
384
  a && a.setAttribute("d", n);
269
385
  const l = o.querySelector('[data-dep-part="line"]');
270
386
  l && l.setAttribute("d", n);
271
- const f = o.querySelector('[data-dep-part="arrow"]');
272
- f && f.setAttribute("d", t);
387
+ const c = o.querySelector('[data-dep-part="arrow"]');
388
+ c && c.setAttribute("d", t);
273
389
  }
274
- function ct(e) {
275
- if (!u.showDependencies || !V.value.length) return;
276
- const n = u.barHeight * 0.4;
277
- for (const t of V.value) {
390
+ function Lt(e) {
391
+ if (!r.showDependencies || !j.value.length) return;
392
+ const n = r.barHeight * 0.4;
393
+ for (const t of j.value) {
278
394
  const o = e.get(t.predecessorId), a = e.get(t.successorId);
279
395
  if (!o && !a) continue;
280
- const l = lt.value.get(t.predecessorId), f = lt.value.get(t.successorId);
281
- if (!l || !f) continue;
282
- const g = (o?.geo?.x ?? l.x) + (o?.dx ?? 0), k = o?.geo?.fullW ?? l.fullW, b = (a?.geo?.x ?? f.x) + (a?.dx ?? 0), A = a?.geo?.fullW ?? f.fullW, pe = l.task.milestone ? g + k / 2 + n : g + k, he = l.y + u.barHeight / 2, ae = f.task.milestone ? b + A / 2 - n : b, le = f.y + u.barHeight / 2;
283
- ut(
396
+ const l = It.value.get(t.predecessorId), c = It.value.get(t.successorId);
397
+ if (!l || !c) continue;
398
+ const g = (o?.geo?.x ?? l.x) + (o?.dx ?? 0), p = o?.geo?.fullW ?? l.fullW, D = (a?.geo?.x ?? c.x) + (a?.dx ?? 0), R = a?.geo?.fullW ?? c.fullW, De = l.task.milestone ? g + p / 2 + n : g + p, Ie = l.y + r.barHeight / 2, de = c.task.milestone ? D + R / 2 - n : D, ve = c.y + r.barHeight / 2;
399
+ $t(
284
400
  t.key,
285
- Vn(pe, he, ae, le, u.rowHeight, u.barHeight),
286
- Kn(ae, le)
401
+ xo(De, Ie, de, ve, r.rowHeight, r.barHeight),
402
+ bo(de, ve)
287
403
  );
288
404
  }
289
405
  }
290
- function ze() {
291
- for (const e of V.value)
292
- ut(e.key, e.d, e.ad);
406
+ function Ne() {
407
+ for (const e of j.value)
408
+ $t(e.key, e.d, e.ad);
293
409
  }
294
- const L = m(null), ue = D(() => L.value ? V.value.find((e) => e.key === L.value) ?? null : null), an = D(() => {
295
- const e = ue.value;
410
+ const W = h(null), pe = b(() => W.value ? j.value.find((e) => e.key === W.value) ?? null : null), An = b(() => {
411
+ const e = pe.value;
296
412
  if (!e) return "Delete dependency";
297
- const n = x.value.find((o) => o.id === e.predecessorId)?.name ?? e.predecessorId, t = x.value.find((o) => o.id === e.successorId)?.name ?? e.successorId;
413
+ const n = k.value.find((o) => o.id === e.predecessorId)?.name ?? e.predecessorId, t = k.value.find((o) => o.id === e.successorId)?.name ?? e.successorId;
298
414
  return `Delete dependency from ${n} to ${t}`;
299
- }), dt = D(() => {
415
+ }), Tt = b(() => {
300
416
  const e = /* @__PURE__ */ new Map();
301
- for (const n of x.value) e.set(n.id, n.name);
417
+ for (const n of k.value) e.set(n.id, n.name);
302
418
  return e;
303
419
  });
304
- function vt(e) {
305
- const n = dt.value.get(e.predecessorId) ?? e.predecessorId, t = dt.value.get(e.successorId) ?? e.successorId;
420
+ function Wt(e) {
421
+ const n = Tt.value.get(e.predecessorId) ?? e.predecessorId, t = Tt.value.get(e.successorId) ?? e.successorId;
306
422
  return `${t} is waiting on ${n} · ${n} is blocking ${t}`;
307
423
  }
308
- function K(e) {
309
- return L.value === e;
424
+ function J(e) {
425
+ return W.value === e;
310
426
  }
311
- function ce(e = !1) {
312
- L.value && (L.value = null, e && W("Dependency deselected"));
427
+ function he(e = !1) {
428
+ W.value && (W.value = null, e && P("Dependency deselected"));
313
429
  }
314
- function ft(e, n) {
315
- if (!u.editableDependencies || r.active || i.active) return;
316
- e.preventDefault(), e.stopPropagation(), L.value = n.key;
317
- const t = x.value.find((a) => a.id === n.predecessorId), o = x.value.find((a) => a.id === n.successorId);
318
- W(
430
+ function At(e, n) {
431
+ if (!r.editableDependencies || s.active || i.active) return;
432
+ e.preventDefault(), e.stopPropagation(), W.value = n.key;
433
+ const t = k.value.find((a) => a.id === n.predecessorId), o = k.value.find((a) => a.id === n.successorId);
434
+ P(
319
435
  `Dependency selected from ${t?.name ?? n.predecessorId} to ${o?.name ?? n.successorId}. Press Delete to remove, or Escape to deselect.`
320
436
  );
321
437
  }
322
- function ln(e) {
323
- e.preventDefault(), e.stopPropagation(), Me();
438
+ function En(e) {
439
+ e.preventDefault(), e.stopPropagation(), Ee();
324
440
  }
325
- function Me() {
326
- const e = ue.value;
327
- if (!e || !u.editableDependencies) return;
328
- const n = x.value.find((a) => a.id === e.predecessorId), t = x.value.find((a) => a.id === e.successorId);
441
+ function Ee() {
442
+ const e = pe.value;
443
+ if (!e || !r.editableDependencies) return;
444
+ const n = k.value.find((a) => a.id === e.predecessorId), t = k.value.find((a) => a.id === e.successorId);
329
445
  if (!n || !t) {
330
- ce();
446
+ he();
331
447
  return;
332
448
  }
333
449
  const o = {
334
450
  predecessorId: e.predecessorId,
335
451
  successorId: e.successorId,
336
- predecessor: Ae(n),
337
- successor: Ae(t),
452
+ predecessor: ze(n),
453
+ successor: ze(t),
338
454
  type: "waiting-on",
339
- typeLabel: qt("waiting-on")
455
+ typeLabel: un("waiting-on")
340
456
  };
341
- L.value = null, W(`Dependency removed from ${n.name} to ${t.name}`), J("dependency-delete", o);
457
+ W.value = null, P(`Dependency removed from ${n.name} to ${t.name}`), q("dependency-delete", o);
342
458
  }
343
- function rn(e) {
344
- !L.value || e.target?.closest?.(".vlite-gantt-dep-group, .vlite-gantt-dep-delete, .vlite-gantt-dep-connector") || ce();
459
+ function Pn(e) {
460
+ !W.value || e.target?.closest?.(".vlite-gantt-dep-group, .vlite-gantt-dep-delete, .vlite-gantt-dep-connector") || he();
345
461
  }
346
- function Xe(e) {
347
- if (!(!L.value || r.active || h.value)) {
462
+ function Ue(e) {
463
+ if (!(!W.value || s.active || x.value)) {
348
464
  if (e.key === "Escape") {
349
- e.preventDefault(), ce(!0);
465
+ e.preventDefault(), he(!0);
350
466
  return;
351
467
  }
352
468
  if (e.key === "Delete" || e.key === "Backspace") {
353
469
  const n = e.target?.tagName;
354
470
  if (n === "INPUT" || n === "TEXTAREA" || e.target?.isContentEditable) return;
355
- e.preventDefault(), Me();
471
+ e.preventDefault(), Ee();
356
472
  }
357
473
  }
358
474
  }
359
- me(L, (e, n) => {
360
- e && !n && document.addEventListener("keydown", Xe), !e && n && document.removeEventListener("keydown", Xe);
475
+ fe(W, (e, n) => {
476
+ e && !n && document.addEventListener("keydown", Ue), !e && n && document.removeEventListener("keydown", Ue);
361
477
  });
362
- const de = D(() => {
363
- const e = we(/* @__PURE__ */ new Date());
364
- return $e(e);
365
- }), Se = D(() => {
366
- const e = we(/* @__PURE__ */ new Date());
367
- return e >= Ie.value.start && e <= Ie.value.end;
478
+ const me = b(() => {
479
+ const e = oe(/* @__PURE__ */ new Date());
480
+ return Ae(e);
481
+ }), Pe = b(() => {
482
+ const e = oe(/* @__PURE__ */ new Date());
483
+ return e >= U.value.start && e <= U.value.end;
368
484
  });
369
- function sn() {
370
- !R.value || !Se.value || R.value.scrollTo({ left: Math.max(0, de.value - (re.value - u.sidebarWidth) / 2), behavior: "smooth" });
485
+ function Et() {
486
+ !I.value || !Pe.value || I.value.scrollTo({ left: Math.max(0, me.value - (N.value - le.value) / 2), behavior: "smooth" });
371
487
  }
372
488
  let i = {
373
489
  active: !1,
@@ -381,7 +497,7 @@ const lo = {
381
497
  affectedIds: /* @__PURE__ */ new Set(),
382
498
  // cascade set
383
499
  rafId: 0
384
- }, r = {
500
+ }, s = {
385
501
  active: !1,
386
502
  sourceId: "",
387
503
  sourceIndex: -1,
@@ -394,14 +510,14 @@ const lo = {
394
510
  keyboard: !1,
395
511
  keyboardTargetIndex: -1
396
512
  };
397
- const B = m(!1), N = m(""), q = m(null), Le = m(null), ve = m("default"), h = m(!1), oe = m(""), fe = m(null), S = m("none"), T = m(null), Ge = m(""), Ce = m(null), M = m(!1), Z = m([]), _ = m(null);
398
- function un(e, n) {
399
- Z.value[n] = e;
513
+ const B = h(!1), Q = h(""), Z = h(null), Re = h(null), ke = h("default"), x = h(!1), ce = h(""), xe = h(null), L = h("none"), E = h(null), je = h(""), Be = h(null), $ = h(!1), ee = h([]), F = h(null);
514
+ function Rn(e, n) {
515
+ ee.value[n] = e;
400
516
  }
401
- function cn(e) {
517
+ function Bn(e) {
402
518
  const n = /* @__PURE__ */ new Set();
403
- if (!u.cascadeDependencies) return n;
404
- const t = Gt(x.value), o = [e];
519
+ if (!r.cascadeDependencies) return n;
520
+ const t = sn(k.value), o = [e];
405
521
  for (; o.length; ) {
406
522
  const a = o.shift();
407
523
  for (const l of t)
@@ -409,214 +525,214 @@ const lo = {
409
525
  }
410
526
  return n;
411
527
  }
412
- function gt(e, n) {
413
- if (!u.draggable || n.task.milestone) return "move";
528
+ function Pt(e, n) {
529
+ if (!r.draggable || n.task.milestone) return "move";
414
530
  const t = e.currentTarget.closest("svg");
415
531
  if (!t) return "move";
416
532
  const o = e.clientX - t.getBoundingClientRect().left;
417
- return o < n.x + Yt ? "resize-left" : o > n.x + n.fullW - Yt ? "resize-right" : "move";
533
+ return o < n.x + vn ? "resize-left" : o > n.x + n.fullW - vn ? "resize-right" : "move";
418
534
  }
419
- function dn(e, n) {
420
- if (!u.draggable || r.active || h.value) return;
535
+ function Hn(e, n) {
536
+ if (!r.draggable || s.active || x.value) return;
421
537
  const t = w.value[n];
422
538
  if (!t || t.task.milestone) return;
423
539
  e.preventDefault(), e.stopPropagation();
424
- const o = gt(e, t);
425
- i.active = !0, i.barIndex = n, i.taskId = t.task.id, i.mode = o, i.startMouseX = e.clientX, i.pxDelta = 0, i.origStart = new Date(t.task._start), i.origEnd = new Date(t.task._end), i.affectedIds = o === "move" ? cn(t.task.id) : /* @__PURE__ */ new Set(), B.value = !0, N.value = t.task.id, y.value = null, M.value = !1, G.value = null, H.value = n, ge = "", document.addEventListener("mousemove", pt), document.addEventListener("mouseup", $t), document.addEventListener("pointercancel", kt), document.addEventListener("keydown", ht), document.body.style.cursor = o === "move" ? "grabbing" : "ew-resize", document.body.style.userSelect = "none", W(
540
+ const o = Pt(e, t);
541
+ i.active = !0, i.barIndex = n, i.taskId = t.task.id, i.mode = o, i.startMouseX = e.clientX, i.pxDelta = 0, i.origStart = new Date(t.task._start), i.origEnd = new Date(t.task._end), i.affectedIds = o === "move" ? Bn(t.task.id) : /* @__PURE__ */ new Set(), B.value = !0, Q.value = t.task.id, y.value = null, $.value = !1, V.value = null, _.value = n, be = "", document.addEventListener("mousemove", Bt), document.addEventListener("mouseup", Vt), document.addEventListener("pointercancel", _t), document.addEventListener("keydown", Ht), document.body.style.cursor = o === "move" ? "grabbing" : "ew-resize", document.body.style.userSelect = "none", P(
426
542
  o === "move" ? `Moving ${t.task.name}` : `Resizing ${t.task.name}. Preview dates update as you drag.`
427
543
  );
428
544
  }
429
- function yt() {
545
+ function Rt() {
430
546
  if (!i.origStart || !i.origEnd) return null;
431
- const e = nt(i.origStart, i.origEnd);
432
- return no({
547
+ const e = ft(i.origStart, i.origEnd);
548
+ return Ao({
433
549
  mode: i.mode,
434
550
  pxDelta: i.pxDelta,
435
551
  origStart: i.origStart,
436
552
  origEnd: i.origEnd,
437
553
  origDurationDays: e,
438
- pxToDays: tn,
439
- daysToPx: nn,
440
- addDays: O
554
+ pxToDays: $n,
555
+ daysToPx: Ln,
556
+ addDays: ae
441
557
  });
442
558
  }
443
- function pt(e) {
559
+ function Bt(e) {
444
560
  if (!i.active) return;
445
561
  i.pxDelta = e.clientX - i.startMouseX;
446
- const n = R.value;
562
+ const n = I.value;
447
563
  if (n) {
448
- const t = n.getBoundingClientRect(), { dx: o, dy: a } = Ft(e.clientX, e.clientY, {
564
+ const t = n.getBoundingClientRect(), { dx: o, dy: a } = cn(e.clientX, e.clientY, {
449
565
  left: t.left,
450
566
  top: t.top,
451
567
  right: t.right,
452
568
  bottom: t.bottom
453
569
  });
454
- (o || a) && (n.scrollLeft += o, n.scrollTop += a, U.value && (U.value.scrollTop = n.scrollTop));
570
+ (o || a) && (n.scrollLeft += o, n.scrollTop += a, ne.value && (ne.value.scrollTop = n.scrollTop));
455
571
  }
456
- cancelAnimationFrame(i.rafId), i.rafId = requestAnimationFrame(vn);
457
- }
458
- function ht(e) {
459
- i.active && e.key === "Escape" && (e.preventDefault(), We(i.mode === "move" ? "Move cancelled" : "Resize cancelled"));
460
- }
461
- function kt() {
462
- We(i.mode === "move" ? "Move cancelled" : "Resize cancelled");
463
- }
464
- function mt(e, n) {
465
- const { x: t, y: o, fullW: a, progressW: l } = n, f = u.barHeight, g = u.barRadius, k = e.querySelector('[data-gantt-part="bg"]');
466
- k && k.setAttribute("d", P(t, o, a, f, g));
467
- const b = e.querySelector('[data-gantt-part="progress"]');
468
- b && (l > 0 ? (b.setAttribute("d", P(t, o, Math.min(l, a), f, g)), b.style.display = "") : b.style.display = "none");
469
- const A = e.querySelector('[data-gantt-part="fill"]');
470
- A && A.setAttribute("d", P(t, o, a, f, g));
471
- const pe = e.querySelector('[data-gantt-part="hitbox"]');
472
- pe && (pe.setAttribute("x", String(t)), pe.setAttribute("width", String(a)));
473
- const he = e.querySelector('[data-gantt-part="highlight"]');
474
- he && (he.setAttribute("x", String(t)), he.setAttribute("width", String(a)));
475
- const ae = e.querySelector('[data-gantt-part="handle-left"]');
476
- ae && (ae.setAttribute("x", String(t)), ae.style.display = "");
477
- const le = e.querySelector('[data-gantt-part="handle-right"]');
478
- le && (le.setAttribute("x", String(t + a - 4)), le.style.display = "");
479
- const Pt = e.querySelector('[data-gantt-part="blocked-hatch"]');
480
- Pt && Pt.setAttribute("d", P(t, o, a, f, g));
481
- const Ht = e.querySelector('[data-gantt-part="blocked-outline"]');
482
- Ht && Ht.setAttribute("d", P(t, o, a, f, g));
483
- const Be = e.querySelector('[data-gantt-part="blocked-lock"]');
484
- Be && Be.setAttribute("transform", `translate(${t + 10}, ${o + f / 2})`);
485
- const ke = e.querySelector('[data-gantt-part="label"]');
486
- if (ke) {
487
- ke.setAttribute("x", String(t + (Be ? 24 : 12))), ke.style.display = a > 60 ? "" : "none";
488
- const _t = ke.getAttribute("data-name");
489
- _t && (ke.textContent = Et(_t, a, !!Be));
572
+ cancelAnimationFrame(i.rafId), i.rafId = requestAnimationFrame(_n);
573
+ }
574
+ function Ht(e) {
575
+ i.active && e.key === "Escape" && (e.preventDefault(), _e(i.mode === "move" ? "Move cancelled" : "Resize cancelled"));
576
+ }
577
+ function _t() {
578
+ _e(i.mode === "move" ? "Move cancelled" : "Resize cancelled");
579
+ }
580
+ function zt(e, n) {
581
+ const { x: t, y: o, fullW: a, progressW: l } = n, c = r.barHeight, g = r.barRadius, p = e.querySelector('[data-gantt-part="bg"]');
582
+ p && p.setAttribute("d", H(t, o, a, c, g));
583
+ const D = e.querySelector('[data-gantt-part="progress"]');
584
+ D && (l > 0 ? (D.setAttribute("d", H(t, o, Math.min(l, a), c, g)), D.style.display = "") : D.style.display = "none");
585
+ const R = e.querySelector('[data-gantt-part="fill"]');
586
+ R && R.setAttribute("d", H(t, o, a, c, g));
587
+ const De = e.querySelector('[data-gantt-part="hitbox"]');
588
+ De && (De.setAttribute("x", String(t)), De.setAttribute("width", String(a)));
589
+ const Ie = e.querySelector('[data-gantt-part="highlight"]');
590
+ Ie && (Ie.setAttribute("x", String(t)), Ie.setAttribute("width", String(a)));
591
+ const de = e.querySelector('[data-gantt-part="handle-left"]');
592
+ de && (de.setAttribute("x", String(t)), de.style.display = "");
593
+ const ve = e.querySelector('[data-gantt-part="handle-right"]');
594
+ ve && (ve.setAttribute("x", String(t + a - 4)), ve.style.display = "");
595
+ const on = e.querySelector('[data-gantt-part="blocked-hatch"]');
596
+ on && on.setAttribute("d", H(t, o, a, c, g));
597
+ const an = e.querySelector('[data-gantt-part="blocked-outline"]');
598
+ an && an.setAttribute("d", H(t, o, a, c, g));
599
+ const Fe = e.querySelector('[data-gantt-part="blocked-lock"]');
600
+ Fe && Fe.setAttribute("transform", `translate(${t + 10}, ${o + c / 2})`);
601
+ const Se = e.querySelector('[data-gantt-part="label"]');
602
+ if (Se) {
603
+ Se.setAttribute("x", String(t + (Fe ? 24 : 12))), Se.style.display = a > 60 ? "" : "none";
604
+ const ln = Se.getAttribute("data-name");
605
+ ln && (Se.textContent = Qt(ln, a, !!Fe));
490
606
  }
491
607
  }
492
- function xt(e) {
493
- const n = w.value[e], t = Z.value[e];
608
+ function Xt(e) {
609
+ const n = w.value[e], t = ee.value[e];
494
610
  if (!n || !t || n.task.milestone) return;
495
611
  t.style.transform = "", t.removeAttribute("data-resize-px");
496
612
  const o = n.task.progress != null ? n.fullW * Math.min(100, n.task.progress) / 100 : 0;
497
- mt(t, {
613
+ zt(t, {
498
614
  x: n.x,
499
615
  y: n.y,
500
616
  fullW: n.fullW,
501
617
  progressW: o
502
618
  });
503
619
  }
504
- const wt = { month: "short", day: "numeric", year: "numeric" };
505
- function Te(e, n) {
506
- return `${e.toLocaleDateString(u.locale, wt)} — ${n.toLocaleDateString(u.locale, wt)}`;
620
+ const Gt = { month: "short", day: "numeric", year: "numeric" };
621
+ function He(e, n) {
622
+ return `${e.toLocaleDateString(r.locale, Gt)} — ${n.toLocaleDateString(r.locale, Gt)}`;
507
623
  }
508
- function bt(e, n, t, o, a) {
509
- if (!_.value) return;
510
- const l = Te(e, n), f = t + a / 2, g = o - 22, k = Math.max(148, l.length * 6.2);
511
- _.value.style.display = "";
512
- const b = _.value.querySelector("rect"), A = _.value.querySelector("text");
513
- b && (b.setAttribute("x", String(f - k / 2)), b.setAttribute("y", String(g - 8)), b.setAttribute("width", String(k))), A && (A.setAttribute("x", String(f)), A.setAttribute("y", String(g + 2)), A.textContent = l);
624
+ function Ft(e, n, t, o, a) {
625
+ if (!F.value) return;
626
+ const l = He(e, n), c = t + a / 2, g = o - 22, p = Math.max(148, l.length * 6.2);
627
+ F.value.style.display = "";
628
+ const D = F.value.querySelector("rect"), R = F.value.querySelector("text");
629
+ D && (D.setAttribute("x", String(c - p / 2)), D.setAttribute("y", String(g - 8)), D.setAttribute("width", String(p))), R && (R.setAttribute("x", String(c)), R.setAttribute("y", String(g + 2)), R.textContent = l);
514
630
  }
515
- let ge = "";
516
- function Dt(e) {
517
- e !== ge && (ge = e, W(e));
631
+ let be = "";
632
+ function Ot(e) {
633
+ e !== be && (be = e, P(e));
518
634
  }
519
- function vn() {
520
- const e = w.value[i.barIndex], n = Z.value[i.barIndex];
635
+ function _n() {
636
+ const e = w.value[i.barIndex], n = ee.value[i.barIndex];
521
637
  if (!e || !n || !i.origStart || !i.origEnd) return;
522
- const t = yt();
638
+ const t = Rt();
523
639
  if (!t) return;
524
640
  if (i.mode === "move") {
525
641
  const l = t.clampedPxDelta;
526
642
  if (n.style.transform = `translateX(${l}px)`, i.affectedIds.size > 0) {
527
643
  for (let g = 0; g < w.value.length; g++)
528
644
  if (i.affectedIds.has(w.value[g].task.id)) {
529
- const k = Z.value[g];
530
- k && (k.style.transform = `translateX(${l}px)`);
645
+ const p = ee.value[g];
646
+ p && (p.style.transform = `translateX(${l}px)`);
531
647
  }
532
648
  }
533
- const f = /* @__PURE__ */ new Map([[e.task.id, { dx: l }]]);
534
- for (const g of i.affectedIds) f.set(g, { dx: l });
535
- ct(f), bt(
649
+ const c = /* @__PURE__ */ new Map([[e.task.id, { dx: l }]]);
650
+ for (const g of i.affectedIds) c.set(g, { dx: l });
651
+ Lt(c), Ft(
536
652
  t.start,
537
653
  t.end,
538
654
  e.x + l,
539
655
  e.y,
540
656
  e.fullW
541
- ), Dt(`${e.task.name}: ${Te(t.start, t.end)}`);
657
+ ), Ot(`${e.task.name}: ${He(t.start, t.end)}`);
542
658
  return;
543
659
  }
544
660
  n.style.transform = "";
545
- const o = to({
661
+ const o = Wo({
546
662
  start: t.start,
547
663
  end: t.end,
548
- dateToX: $e
664
+ dateToX: Ae
549
665
  }), a = e.fullW > 0 ? e.progressW / e.fullW : 0;
550
- mt(n, {
666
+ zt(n, {
551
667
  x: o.x,
552
668
  y: e.y,
553
669
  fullW: o.fullW,
554
670
  progressW: o.fullW * a
555
- }), ct(/* @__PURE__ */ new Map([[e.task.id, { geo: { x: o.x, fullW: o.fullW } }]])), bt(t.start, t.end, o.x, e.y, o.fullW), Dt(`${e.task.name}: ${Te(t.start, t.end)}`);
671
+ }), Lt(/* @__PURE__ */ new Map([[e.task.id, { geo: { x: o.x, fullW: o.fullW } }]])), Ft(t.start, t.end, o.x, e.y, o.fullW), Ot(`${e.task.name}: ${He(t.start, t.end)}`);
556
672
  }
557
- function It() {
558
- document.removeEventListener("mousemove", pt), document.removeEventListener("mouseup", $t), document.removeEventListener("pointercancel", kt), document.removeEventListener("keydown", ht), document.body.style.cursor = "", document.body.style.userSelect = "", cancelAnimationFrame(i.rafId);
673
+ function qt() {
674
+ document.removeEventListener("mousemove", Bt), document.removeEventListener("mouseup", Vt), document.removeEventListener("pointercancel", _t), document.removeEventListener("keydown", Ht), document.body.style.cursor = "", document.body.style.userSelect = "", cancelAnimationFrame(i.rafId);
559
675
  }
560
- function We(e) {
676
+ function _e(e) {
561
677
  if (!i.active) return;
562
- It();
678
+ qt();
563
679
  const n = i.barIndex;
564
680
  if (i.mode === "move")
565
- for (const t of Z.value)
681
+ for (const t of ee.value)
566
682
  t && (t.style.transform = "", t.removeAttribute("data-resize-px"));
567
- else n >= 0 && xt(n);
568
- ze(), _.value && (_.value.style.display = "none"), i.active = !1, i.barIndex = -1, i.taskId = "", i.pxDelta = 0, i.origStart = null, i.origEnd = null, i.affectedIds.clear(), B.value = !1, N.value = "", H.value = null, ge = "", e && W(e);
683
+ else n >= 0 && Xt(n);
684
+ Ne(), F.value && (F.value.style.display = "none"), i.active = !1, i.barIndex = -1, i.taskId = "", i.pxDelta = 0, i.origStart = null, i.origEnd = null, i.affectedIds.clear(), B.value = !1, Q.value = "", _.value = null, be = "", e && P(e);
569
685
  }
570
- function $t() {
686
+ function Vt() {
571
687
  if (!i.active) return;
572
- const e = yt(), n = i.mode, t = i.taskId, o = i.barIndex;
573
- if (It(), !!e && Math.abs(e.snappedDays) > 0.1 && e) {
574
- const l = x.value.find((f) => f.id === t);
575
- if (l && (J("task-update", l, { start: e.start, end: e.end }), W(`Updated ${l.name} to ${Te(e.start, e.end)}`)), n === "move") {
576
- for (const f of Z.value)
577
- f && (f.style.transform = "", f.removeAttribute("data-resize-px"));
578
- ze();
688
+ const e = Rt(), n = i.mode, t = i.taskId, o = i.barIndex;
689
+ if (qt(), !!e && Math.abs(e.snappedDays) > 0.1 && e) {
690
+ const l = k.value.find((c) => c.id === t);
691
+ if (l && (q("task-update", l, { start: e.start, end: e.end }), P(`Updated ${l.name} to ${He(e.start, e.end)}`)), n === "move") {
692
+ for (const c of ee.value)
693
+ c && (c.style.transform = "", c.removeAttribute("data-resize-px"));
694
+ Ne();
579
695
  }
580
696
  } else {
581
697
  if (n === "move")
582
- for (const l of Z.value)
698
+ for (const l of ee.value)
583
699
  l && (l.style.transform = "", l.removeAttribute("data-resize-px"));
584
- else o >= 0 && xt(o);
585
- ze();
700
+ else o >= 0 && Xt(o);
701
+ Ne();
586
702
  }
587
- _.value && (_.value.style.display = "none"), i.active = !1, i.barIndex = -1, i.taskId = "", i.pxDelta = 0, i.origStart = null, i.origEnd = null, i.affectedIds.clear(), B.value = !1, N.value = "", H.value = null, ge = "";
703
+ F.value && (F.value.style.display = "none"), i.active = !1, i.barIndex = -1, i.taskId = "", i.pxDelta = 0, i.origStart = null, i.origEnd = null, i.affectedIds.clear(), B.value = !1, Q.value = "", _.value = null, be = "";
588
704
  }
589
- function qe(e, n) {
590
- if (r.active || h.value) {
591
- ve.value = "crosshair";
705
+ function Je(e, n) {
706
+ if (s.active || x.value) {
707
+ ke.value = "crosshair";
592
708
  return;
593
709
  }
594
- if (i.active || !u.draggable || n.task.milestone) {
595
- ve.value = i.active ? "grabbing" : "pointer";
710
+ if (i.active || !r.draggable || n.task.milestone) {
711
+ ke.value = i.active ? "grabbing" : "pointer";
596
712
  return;
597
713
  }
598
- ve.value = gt(e, n) === "move" ? "grab" : "ew-resize";
714
+ ke.value = Pt(e, n) === "move" ? "grab" : "ew-resize";
599
715
  }
600
- function Ae(e) {
716
+ function ze(e) {
601
717
  const { _start: n, _end: t, _color: o, _index: a, ...l } = e;
602
718
  return l;
603
719
  }
604
- function Fe(e, n) {
605
- const t = Ce.value;
720
+ function Qe(e, n) {
721
+ const t = Be.value;
606
722
  if (!t) return { x: 0, y: 0 };
607
723
  const o = t.getBoundingClientRect();
608
724
  return { x: e - o.left, y: n - o.top };
609
725
  }
610
- function F(e) {
611
- return Fn(
726
+ function Y(e) {
727
+ return ho(
612
728
  { id: e.task.id, x: e.x, y: e.y, fullW: e.fullW, milestone: e.task.milestone },
613
- u.barHeight
729
+ r.barHeight
614
730
  );
615
731
  }
616
- function fn(e) {
617
- return !u.editableDependencies || i.active || B.value ? !1 : h.value && oe.value === w.value[e]?.task.id ? !0 : q.value === e || Le.value === e;
732
+ function zn(e) {
733
+ return !r.editableDependencies || i.active || B.value ? !1 : x.value && ce.value === w.value[e]?.task.id ? !0 : Z.value === e || Re.value === e;
618
734
  }
619
- function gn() {
735
+ function Xn() {
620
736
  return w.value.map((e) => ({
621
737
  id: e.task.id,
622
738
  x: e.x,
@@ -625,201 +741,216 @@ const lo = {
625
741
  milestone: e.task.milestone
626
742
  }));
627
743
  }
628
- function W(e) {
629
- Ge.value = "", requestAnimationFrame(() => {
630
- Ge.value = e;
744
+ function P(e) {
745
+ je.value = "", requestAnimationFrame(() => {
746
+ je.value = e;
631
747
  });
632
748
  }
633
- function ye() {
634
- const e = w.value.find((t) => t.task.id === r.sourceId);
749
+ function we() {
750
+ const e = w.value.find((t) => t.task.id === s.sourceId);
635
751
  if (!e) {
636
- T.value = null;
752
+ E.value = null;
637
753
  return;
638
754
  }
639
- const n = F(e);
640
- T.value = {
755
+ const n = Y(e);
756
+ E.value = {
641
757
  x1: n.cx,
642
758
  y1: n.cy,
643
- x2: r.pointerX,
644
- y2: r.pointerY
759
+ x2: s.pointerX,
760
+ y2: s.pointerY
645
761
  };
646
762
  }
647
- function Ee(e) {
648
- if (r.targetId = e, fe.value = e, !e || e === r.sourceId) {
649
- r.targetValid = !1, S.value = e ? "invalid" : "none";
763
+ function Xe(e) {
764
+ if (s.targetId = e, xe.value = e, !e || e === s.sourceId) {
765
+ s.targetValid = !1, L.value = e ? "invalid" : "none";
650
766
  return;
651
767
  }
652
- const n = Je(x.value, r.sourceId, e);
653
- r.targetValid = n.valid, S.value = n.valid ? "valid" : "invalid";
654
- }
655
- function Ye(e, n) {
656
- const t = Fe(e, n);
657
- r.pointerX = t.x, r.pointerY = t.y;
658
- const o = Yn(gn(), t.x, t.y, u.barHeight), a = o && o.id !== r.sourceId ? o.id : o?.id === r.sourceId ? r.sourceId : null;
659
- Ee(a), ye();
660
- const l = R.value;
768
+ const n = ut(k.value, s.sourceId, e);
769
+ s.targetValid = n.valid, L.value = n.valid ? "valid" : "invalid";
770
+ }
771
+ function et(e, n) {
772
+ const t = Qe(e, n);
773
+ s.pointerX = t.x, s.pointerY = t.y;
774
+ const o = mo(Xn(), t.x, t.y, r.barHeight), a = o && o.id !== s.sourceId ? o.id : o?.id === s.sourceId ? s.sourceId : null;
775
+ Xe(a), we();
776
+ const l = I.value;
661
777
  if (l) {
662
- const f = l.getBoundingClientRect(), { dx: g, dy: k } = Ft(e, n, {
663
- left: f.left,
664
- top: f.top,
665
- right: f.right,
666
- bottom: f.bottom
778
+ const c = l.getBoundingClientRect(), { dx: g, dy: p } = cn(e, n, {
779
+ left: c.left,
780
+ top: c.top,
781
+ right: c.right,
782
+ bottom: c.bottom
667
783
  });
668
- (g || k) && (cancelAnimationFrame(r.scrollRafId), r.scrollRafId = requestAnimationFrame(() => {
669
- l.scrollLeft += g, l.scrollTop += k, U.value && (U.value.scrollTop = l.scrollTop);
670
- const b = Fe(e, n);
671
- r.pointerX = b.x, r.pointerY = b.y, ye();
784
+ (g || p) && (cancelAnimationFrame(s.scrollRafId), s.scrollRafId = requestAnimationFrame(() => {
785
+ l.scrollLeft += g, l.scrollTop += p, ne.value && (ne.value.scrollTop = l.scrollTop);
786
+ const D = Qe(e, n);
787
+ s.pointerX = D.x, s.pointerY = D.y, we();
672
788
  }));
673
789
  }
674
790
  }
675
- function Mt() {
676
- document.removeEventListener("pointermove", Ct), document.removeEventListener("pointerup", Tt), document.removeEventListener("pointercancel", Wt), document.removeEventListener("keydown", At);
677
- }
678
- function j(e) {
679
- !r.active && !h.value || (Mt(), cancelAnimationFrame(r.rafId), cancelAnimationFrame(r.scrollRafId), document.body.style.cursor = "", document.body.style.userSelect = "", r.active = !1, r.sourceId = "", r.sourceIndex = -1, r.targetId = null, r.targetValid = !1, r.keyboard = !1, r.keyboardTargetIndex = -1, h.value = !1, oe.value = "", fe.value = null, S.value = "none", T.value = null, M.value = !1, e && W(e));
680
- }
681
- function St() {
682
- if (!r.active) return;
683
- const e = r.sourceId, n = r.targetId;
684
- if (!(r.targetValid && !!n) || !n) {
685
- j(
686
- n ? Qe(
687
- Je(x.value, e, n),
688
- x.value.find((f) => f.id === e)?.name ?? e,
689
- x.value.find((f) => f.id === n)?.name ?? n
791
+ function Zt() {
792
+ document.removeEventListener("pointermove", Nt), document.removeEventListener("pointerup", Ut), document.removeEventListener("pointercancel", jt), document.removeEventListener("keydown", Jt);
793
+ }
794
+ function te(e) {
795
+ !s.active && !x.value || (Zt(), cancelAnimationFrame(s.rafId), cancelAnimationFrame(s.scrollRafId), document.body.style.cursor = "", document.body.style.userSelect = "", s.active = !1, s.sourceId = "", s.sourceIndex = -1, s.targetId = null, s.targetValid = !1, s.keyboard = !1, s.keyboardTargetIndex = -1, x.value = !1, ce.value = "", xe.value = null, L.value = "none", E.value = null, $.value = !1, e && P(e));
796
+ }
797
+ function Yt() {
798
+ if (!s.active) return;
799
+ const e = s.sourceId, n = s.targetId;
800
+ if (!(s.targetValid && !!n) || !n) {
801
+ te(
802
+ n ? ct(
803
+ ut(k.value, e, n),
804
+ k.value.find((c) => c.id === e)?.name ?? e,
805
+ k.value.find((c) => c.id === n)?.name ?? n
690
806
  ) : "Dependency linking cancelled"
691
807
  );
692
808
  return;
693
809
  }
694
- const o = x.value.find((f) => f.id === e), a = x.value.find((f) => f.id === n);
810
+ const o = k.value.find((c) => c.id === e), a = k.value.find((c) => c.id === n);
695
811
  if (!o || !a) {
696
- j("Dependency linking cancelled");
812
+ te("Dependency linking cancelled");
697
813
  return;
698
814
  }
699
815
  const l = {
700
816
  predecessorId: e,
701
817
  successorId: n,
702
- predecessor: Ae(o),
703
- successor: Ae(a),
818
+ predecessor: ze(o),
819
+ successor: ze(a),
704
820
  type: "waiting-on",
705
- typeLabel: qt("waiting-on")
821
+ typeLabel: un("waiting-on")
706
822
  };
707
- W(
708
- Qe(
823
+ P(
824
+ ct(
709
825
  { valid: !0 },
710
826
  o.name,
711
827
  a.name
712
828
  )
713
- ), Mt(), cancelAnimationFrame(r.rafId), cancelAnimationFrame(r.scrollRafId), document.body.style.cursor = "", document.body.style.userSelect = "", r.active = !1, r.sourceId = "", r.sourceIndex = -1, r.targetId = null, r.targetValid = !1, r.keyboard = !1, r.keyboardTargetIndex = -1, h.value = !1, oe.value = "", fe.value = null, S.value = "none", T.value = null, M.value = !1, J("dependency-create", l);
829
+ ), Zt(), cancelAnimationFrame(s.rafId), cancelAnimationFrame(s.scrollRafId), document.body.style.cursor = "", document.body.style.userSelect = "", s.active = !1, s.sourceId = "", s.sourceIndex = -1, s.targetId = null, s.targetValid = !1, s.keyboard = !1, s.keyboardTargetIndex = -1, x.value = !1, ce.value = "", xe.value = null, L.value = "none", E.value = null, $.value = !1, q("dependency-create", l);
714
830
  }
715
- function Lt(e, n, t, o = !1) {
716
- if (!u.editableDependencies || i.active || B.value) return;
831
+ function Kt(e, n, t, o = !1) {
832
+ if (!r.editableDependencies || i.active || B.value) return;
717
833
  const a = w.value[e];
718
834
  if (!a) return;
719
- ce(), r.active = !0, r.sourceId = a.task.id, r.sourceIndex = e, r.keyboard = o, r.keyboardTargetIndex = -1, h.value = !0, oe.value = a.task.id, y.value = null, M.value = !0, G.value = null, H.value = e;
720
- const l = F(a);
721
- o ? (r.pointerX = l.cx + 40, r.pointerY = l.cy, Ee(null)) : Ye(n, t), ye(), W(`Linking from ${a.task.name}. Drop on a target task, or press Escape to cancel.`), document.addEventListener("pointermove", Ct), document.addEventListener("pointerup", Tt), document.addEventListener("pointercancel", Wt), document.addEventListener("keydown", At), document.body.style.cursor = "crosshair", document.body.style.userSelect = "none";
835
+ he(), s.active = !0, s.sourceId = a.task.id, s.sourceIndex = e, s.keyboard = o, s.keyboardTargetIndex = -1, x.value = !0, ce.value = a.task.id, y.value = null, $.value = !0, V.value = null, _.value = e;
836
+ const l = Y(a);
837
+ o ? (s.pointerX = l.cx + 40, s.pointerY = l.cy, Xe(null)) : et(n, t), we(), P(`Linking from ${a.task.name}. Drop on a target task, or press Escape to cancel.`), document.addEventListener("pointermove", Nt), document.addEventListener("pointerup", Ut), document.addEventListener("pointercancel", jt), document.addEventListener("keydown", Jt), document.body.style.cursor = "crosshair", document.body.style.userSelect = "none";
722
838
  }
723
- function Ct(e) {
724
- !r.active || r.keyboard || (cancelAnimationFrame(r.rafId), r.rafId = requestAnimationFrame(() => Ye(e.clientX, e.clientY)));
839
+ function Nt(e) {
840
+ !s.active || s.keyboard || (cancelAnimationFrame(s.rafId), s.rafId = requestAnimationFrame(() => et(e.clientX, e.clientY)));
725
841
  }
726
- function Tt(e) {
727
- !r.active || r.keyboard || (Ye(e.clientX, e.clientY), St());
842
+ function Ut(e) {
843
+ !s.active || s.keyboard || (et(e.clientX, e.clientY), Yt());
728
844
  }
729
- function Wt() {
730
- j("Dependency linking cancelled");
845
+ function jt() {
846
+ te("Dependency linking cancelled");
731
847
  }
732
- function Oe(e) {
848
+ function tt(e) {
733
849
  const n = w.value;
734
850
  if (!n.length) return;
735
- const t = n.map((k, b) => ({ b: k, i: b })).filter(({ b: k }) => k.task.id !== r.sourceId);
851
+ const t = n.map((p, D) => ({ b: p, i: D })).filter(({ b: p }) => p.task.id !== s.sourceId);
736
852
  if (!t.length) {
737
- Ee(null), ye();
853
+ Xe(null), we();
738
854
  return;
739
855
  }
740
- let o = t.findIndex(({ b: k }) => k.task.id === r.targetId);
856
+ let o = t.findIndex(({ b: p }) => p.task.id === s.targetId);
741
857
  o < 0 && (o = e === 1 ? -1 : 0), o = (o + e + t.length) % t.length;
742
858
  const a = t[o];
743
- r.keyboardTargetIndex = a.i;
744
- const l = F(a.b);
745
- r.pointerX = a.b.task.milestone ? a.b.x + a.b.fullW / 2 : a.b.x, r.pointerY = l.cy, Ee(a.b.task.id), ye();
746
- const f = Je(x.value, r.sourceId, a.b.task.id), g = x.value.find((k) => k.id === r.sourceId)?.name ?? r.sourceId;
747
- W(
748
- f.valid ? `Target ${a.b.task.name}. Press Enter to create dependency.` : Qe(f, g, a.b.task.name)
859
+ s.keyboardTargetIndex = a.i;
860
+ const l = Y(a.b);
861
+ s.pointerX = a.b.task.milestone ? a.b.x + a.b.fullW / 2 : a.b.x, s.pointerY = l.cy, Xe(a.b.task.id), we();
862
+ const c = ut(k.value, s.sourceId, a.b.task.id), g = k.value.find((p) => p.id === s.sourceId)?.name ?? s.sourceId;
863
+ P(
864
+ c.valid ? `Target ${a.b.task.name}. Press Enter to create dependency.` : ct(c, g, a.b.task.name)
749
865
  );
750
866
  }
751
- function At(e) {
752
- if (r.active) {
867
+ function Jt(e) {
868
+ if (s.active) {
753
869
  if (e.key === "Escape") {
754
- e.preventDefault(), j("Dependency linking cancelled");
870
+ e.preventDefault(), te("Dependency linking cancelled");
755
871
  return;
756
872
  }
757
- r.keyboard && (e.key === "ArrowDown" || e.key === "ArrowRight" ? (e.preventDefault(), Oe(1)) : e.key === "ArrowUp" || e.key === "ArrowLeft" ? (e.preventDefault(), Oe(-1)) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), St()));
873
+ s.keyboard && (e.key === "ArrowDown" || e.key === "ArrowRight" ? (e.preventDefault(), tt(1)) : e.key === "ArrowUp" || e.key === "ArrowLeft" ? (e.preventDefault(), tt(-1)) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), Yt()));
758
874
  }
759
875
  }
760
- function yn(e, n) {
761
- !u.editableDependencies || i.active || (e.preventDefault(), e.stopPropagation(), y.value = null, M.value = !0, Lt(n, e.clientX, e.clientY, !1));
876
+ function Gn(e, n) {
877
+ !r.editableDependencies || i.active || (e.preventDefault(), e.stopPropagation(), y.value = null, $.value = !0, Kt(n, e.clientX, e.clientY, !1));
762
878
  }
763
- function pn(e, n) {
764
- if (!(!u.editableDependencies || i.active || h.value) && (e.key === "Enter" || e.key === " ")) {
879
+ function Fn(e, n) {
880
+ if (!(!r.editableDependencies || i.active || x.value) && (e.key === "Enter" || e.key === " ")) {
765
881
  e.preventDefault(), e.stopPropagation();
766
882
  const t = w.value[n];
767
883
  if (!t) return;
768
884
  y.value = null;
769
- const o = F(t), l = Ce.value?.getBoundingClientRect(), f = (l?.left ?? 0) + o.cx, g = (l?.top ?? 0) + o.cy;
770
- Lt(n, f, g, !0), Oe(1);
885
+ const o = Y(t), l = Be.value?.getBoundingClientRect(), c = (l?.left ?? 0) + o.cx, g = (l?.top ?? 0) + o.cy;
886
+ Kt(n, c, g, !0), tt(1);
771
887
  }
772
888
  }
773
- function hn(e) {
774
- Le.value = e, q.value = e, y.value = null;
889
+ function On(e) {
890
+ Re.value = e, Z.value = e, y.value = null;
775
891
  }
776
- function kn() {
777
- Le.value = null, M.value = !1, h.value || (q.value = null);
892
+ function qn() {
893
+ Re.value = null, $.value = !1, x.value || (Z.value = null);
778
894
  }
779
- function mn(e) {
780
- return !h.value || oe.value === e ? "" : fe.value !== e ? "vlite-gantt-link-candidate" : S.value === "valid" ? "vlite-gantt-link-target-valid" : "vlite-gantt-link-target-invalid";
895
+ function Vn(e) {
896
+ return !x.value || ce.value === e ? "" : xe.value !== e ? "vlite-gantt-link-candidate" : L.value === "valid" ? "vlite-gantt-link-target-valid" : "vlite-gantt-link-target-invalid";
781
897
  }
782
- const Re = m(u.animate ? 0 : 1);
783
- let Ve = null;
784
- function Ke() {
785
- Ve?.(), Re.value = 0, Ve = Gn(900, (e) => Re.value = e);
786
- }
787
- An(() => {
788
- Zt(), u.animate && Ke();
789
- }), me(() => u.viewMode, () => {
790
- $.value = 1, u.animate && Ke();
791
- }), me(() => u.tasks.length, () => {
792
- u.animate && Ke();
793
- }), me(() => u.tasks, () => {
794
- i.active && (u.tasks.some((n) => n.id === i.taskId) || We(i.mode === "move" ? "Move cancelled because task was removed" : "Resize cancelled because task was removed")), (r.active || h.value) && j("Dependency linking cancelled because tasks changed"), L.value && !V.value.some((e) => e.key === L.value) && (L.value = null), G.value && !V.value.some((e) => e.key === G.value) && (G.value = null);
795
- }), me(() => u.editableDependencies, (e) => {
796
- e || ((r.active || h.value) && j("Dependency linking cancelled"), ce());
797
- }), En(() => {
798
- Ve?.(), Pe?.disconnect(), We(), document.removeEventListener("keydown", Xe), j();
898
+ const Ge = h(r.animate ? 0 : 1);
899
+ let nt = null;
900
+ function ot() {
901
+ nt?.(), Ge.value = 0, nt = yo(900, (e) => Ge.value = e);
902
+ }
903
+ lo(() => {
904
+ pn(), r.animate && ot(), Me(Dt);
905
+ }), fe(() => r.viewMode, () => {
906
+ const e = r.preserveCenterDate ? Ye.value ?? wt() : null;
907
+ C.value = 1, r.animate && ot(), Me(() => {
908
+ e ? Ke(e, "center") : Dt();
909
+ });
910
+ }), fe(() => r.tasks.length, () => {
911
+ r.animate && ot();
912
+ }), fe(() => r.tasks, () => {
913
+ i.active && (r.tasks.some((n) => n.id === i.taskId) || _e(i.mode === "move" ? "Move cancelled because task was removed" : "Resize cancelled because task was removed")), (s.active || x.value) && te("Dependency linking cancelled because tasks changed"), W.value && !j.value.some((e) => e.key === W.value) && (W.value = null), V.value && !j.value.some((e) => e.key === V.value) && (V.value = null);
914
+ }), fe(() => r.editableDependencies, (e) => {
915
+ e || ((s.active || x.value) && te("Dependency linking cancelled"), he());
916
+ }), ro(() => {
917
+ nt?.(), Ve?.disconnect(), _e(), document.removeEventListener("keydown", Ue), te();
918
+ }), gn({
919
+ zoomIn: xn,
920
+ zoomOut: bn,
921
+ setZoom: wn,
922
+ resetZoom: Dn,
923
+ scrollToToday: Et,
924
+ /** Current zoom level (read-only). */
925
+ getZoom: () => C.value,
926
+ /** Collapse / expand the task sidebar. */
927
+ toggleSidebar: gt,
928
+ /** Whether the sidebar is currently collapsed (read-only). */
929
+ isSidebarCollapsed: () => M.value
799
930
  });
800
- function Et(e, n, t) {
801
- const o = n - (t ? 24 : 12) - xa;
802
- if (o < Ot * 3) return "";
803
- const a = Math.floor(o / Ot);
931
+ function Qt(e, n, t) {
932
+ const o = n - (t ? 24 : 12) - Ka;
933
+ if (o < fn * 3) return "";
934
+ const a = Math.floor(o / fn);
804
935
  return e.length <= a ? e : `${e.slice(0, Math.max(1, a - 1)).trimEnd()}…`;
805
936
  }
806
- function P(e, n, t, o, a) {
937
+ function H(e, n, t, o, a) {
807
938
  const l = Math.min(a, t / 2, o / 2);
808
939
  return l <= 0 || t <= 0 ? `M${e},${n}h${t}v${o}h${-t}Z` : `M${e + l},${n}h${t - 2 * l}q${l},0 ${l},${l}v${o - 2 * l}q0,${l} ${-l},${l}h${-(t - 2 * l)}q${-l},0 ${-l},${-l}v${-(o - 2 * l)}q0,${-l} ${l},${-l}Z`;
809
940
  }
810
- function xn(e, n, t) {
941
+ function Zn(e, n, t) {
811
942
  return `M${e},${n - t}L${e + t},${n}L${e},${n + t}L${e - t},${n}Z`;
812
943
  }
813
- const y = m(null), H = m(null);
814
- function wn(e) {
944
+ const y = h(null), _ = h(null);
945
+ function Yn(e) {
815
946
  const n = e;
816
947
  return !n || typeof n.closest != "function" ? !1 : !!n.closest(".vlite-gantt-bar-group");
817
948
  }
818
- function bn(e) {
819
- if (!u.editableDependencies) return null;
820
- const n = Ce.value;
949
+ function Kn(e) {
950
+ if (!r.editableDependencies) return null;
951
+ const n = Be.value;
821
952
  if (!n) return null;
822
- const t = n.getBoundingClientRect(), o = F(e), a = 14;
953
+ const t = n.getBoundingClientRect(), o = Y(e), a = 14;
823
954
  return {
824
955
  left: t.left + o.cx - a,
825
956
  top: t.top + o.cy - a,
@@ -827,100 +958,122 @@ const lo = {
827
958
  bottom: t.top + o.cy + a
828
959
  };
829
960
  }
830
- function Dn(e, n, t) {
831
- if (!u.editableDependencies) return !1;
832
- if (M.value) return !0;
833
- const o = Fe(e, n), a = F(t);
834
- return ao(o.x, o.y, a.cx, a.cy);
961
+ function Nn(e, n, t) {
962
+ if (!r.editableDependencies) return !1;
963
+ if ($.value) return !0;
964
+ const o = Qe(e, n), a = Y(t);
965
+ return Po(o.x, o.y, a.cx, a.cy);
835
966
  }
836
- function Ne(e, n) {
837
- if (!u.showTooltip || i.active || r.active || h.value) {
967
+ function at(e, n) {
968
+ if (!r.showTooltip || i.active || s.active || x.value) {
838
969
  y.value = null;
839
970
  return;
840
971
  }
841
972
  const t = w.value[n];
842
973
  if (!t) return;
843
- if (Dn(e.clientX, e.clientY, t)) {
974
+ if (Nn(e.clientX, e.clientY, t)) {
844
975
  y.value = null;
845
976
  return;
846
977
  }
847
- const o = t.task, a = oo({
978
+ const o = t.task, a = Eo({
848
979
  pointerX: e.clientX,
849
980
  pointerY: e.clientY,
850
981
  viewportWidth: window.innerWidth,
851
982
  viewportHeight: window.innerHeight,
852
- avoid: bn(t)
983
+ avoid: Kn(t)
853
984
  });
854
985
  y.value = {
855
986
  left: a.left,
856
987
  top: a.top,
857
988
  task: o,
858
- startStr: o._start.toLocaleDateString(u.locale, { month: "short", day: "numeric", year: "numeric" }),
859
- endStr: o._end.toLocaleDateString(u.locale, { month: "short", day: "numeric", year: "numeric" })
989
+ startStr: o._start.toLocaleDateString(r.locale, { month: "short", day: "numeric", year: "numeric" }),
990
+ endStr: o._end.toLocaleDateString(r.locale, { month: "short", day: "numeric", year: "numeric" })
860
991
  };
861
992
  }
862
- function In(e = !0) {
863
- y.value = null, H.value = null, M.value = !1, Le.value == null && (q.value = null), ve.value = "default", e && J("task-hover", null);
993
+ function Un(e = !0) {
994
+ y.value = null, _.value = null, $.value = !1, Re.value == null && (Z.value = null), ke.value = "default", e && q("task-hover", null);
864
995
  }
865
- function $n(e, n) {
866
- if (i.active || r.active || h.value) return;
867
- q.value = n, H.value = n;
996
+ function jn(e, n) {
997
+ if (i.active || s.active || x.value) return;
998
+ Z.value = n, _.value = n;
868
999
  const t = w.value[n];
869
1000
  if (!t) return;
870
- J("task-hover", t.task), qe(e, t);
1001
+ q("task-hover", t.task), Je(e, t);
871
1002
  const o = !!e.target?.closest?.(".vlite-gantt-dep-connector");
872
- M.value = o, o ? y.value = null : Ne(e, n);
1003
+ $.value = o, o ? y.value = null : at(e, n);
873
1004
  }
874
- function Mn() {
875
- i.active || r.active || h.value || In(!0);
1005
+ function Jn() {
1006
+ i.active || s.active || x.value || Un(!0);
876
1007
  }
877
- function Rt(e, n) {
878
- if (i.active || r.active || h.value) return;
879
- M.value = !1, q.value = n, H.value = n;
1008
+ function en(e, n) {
1009
+ if (i.active || s.active || x.value) return;
1010
+ $.value = !1, Z.value = n, _.value = n;
880
1011
  const t = w.value[n];
881
- t && (qe(e, t), Ne(e, n));
1012
+ t && (Je(e, t), at(e, n));
882
1013
  }
883
- function Bt(e, n) {
884
- if (i.active || r.active || h.value) return;
885
- M.value = !1;
1014
+ function tn(e, n) {
1015
+ if (i.active || s.active || x.value) return;
1016
+ $.value = !1;
886
1017
  const t = w.value[n];
887
- t && qe(e, t), Ne(e, n);
1018
+ t && Je(e, t), at(e, n);
888
1019
  }
889
- function Sn(e) {
890
- i.active || r.active || h.value || (M.value = !0, q.value = e, H.value = e, y.value = null);
1020
+ function Qn(e) {
1021
+ i.active || s.active || x.value || ($.value = !0, Z.value = e, _.value = e, y.value = null);
891
1022
  }
892
- function Ln(e) {
893
- if (!(i.active || r.active || h.value)) {
894
- if (wn(e.relatedTarget) && !e.relatedTarget?.closest?.(".vlite-gantt-dep-connector")) {
895
- M.value = !1;
1023
+ function eo(e) {
1024
+ if (!(i.active || s.active || x.value)) {
1025
+ if (Yn(e.relatedTarget) && !e.relatedTarget?.closest?.(".vlite-gantt-dep-connector")) {
1026
+ $.value = !1;
896
1027
  return;
897
1028
  }
898
- M.value = !1, y.value = null;
1029
+ $.value = !1, y.value = null;
899
1030
  }
900
1031
  }
901
- function Ze(e) {
902
- !i.active && !r.active && J("task-click", e);
1032
+ function lt(e) {
1033
+ !i.active && !s.active && q("task-click", e);
903
1034
  }
904
- const U = m();
905
- function Cn(e) {
906
- U.value && (U.value.scrollTop = e.target.scrollTop);
1035
+ const ne = h();
1036
+ let rt = !1;
1037
+ function to(e) {
1038
+ const n = e.target;
1039
+ ne.value && (ne.value.scrollTop = n.scrollTop), rt || (rt = !0, requestAnimationFrame(() => {
1040
+ rt = !1, I.value && (We.value = I.value.scrollLeft, bt());
1041
+ }));
907
1042
  }
908
- const Y = Math.random().toString(36).slice(2, 7);
909
- function Tn(e, n) {
910
- const t = Math.ceil(nt(e, n));
1043
+ const K = Math.random().toString(36).slice(2, 7);
1044
+ function no(e, n) {
1045
+ const t = Math.ceil(ft(e, n));
911
1046
  if (t <= 1) return "1 day";
912
1047
  if (t < 7) return `${t} days`;
913
1048
  const o = Math.floor(t / 7), a = t % 7;
914
1049
  return a === 0 ? `${o} week${o > 1 ? "s" : ""}` : `${o}w ${a}d`;
915
1050
  }
916
- return (e, n) => (d(), v("div", {
1051
+ function z(e) {
1052
+ return (e.assignees ?? []).filter((n) => n && (n.name || n.src || n.fallback));
1053
+ }
1054
+ function nn(e) {
1055
+ if (e.fallback) return e.fallback;
1056
+ if (!e.name) return;
1057
+ const n = e.name.trim().split(/\s+/);
1058
+ return (n[0][0] + (n.length > 1 ? n[n.length - 1][0] : "")).toUpperCase();
1059
+ }
1060
+ function oo(e) {
1061
+ return z(e).map((n) => ({
1062
+ src: n.src,
1063
+ alt: n.alt ?? n.name,
1064
+ fallback: nn(n),
1065
+ heading: n.name,
1066
+ text: n.role
1067
+ }));
1068
+ }
1069
+ return (e, n) => (v(), f("div", {
917
1070
  ref_key: "containerRef",
918
- ref: be,
1071
+ ref: Ce,
919
1072
  class: "vlite-gantt-chart w-full select-none"
920
1073
  }, [
921
- c.showTodayLine && Se.value || c.zoom || ot.value ? (d(), v("div", lo, [
922
- ot.value ? (d(), v("span", ro, [...n[1] || (n[1] = [
923
- s("svg", {
1074
+ d.showTodayLine && Pe.value || yt.value ? (v(), f("div", Ro, [
1075
+ yt.value ? (v(), f("span", Bo, [...n[1] || (n[1] = [
1076
+ u("svg", {
924
1077
  width: "12",
925
1078
  height: "12",
926
1079
  viewBox: "0 0 24 24",
@@ -930,67 +1083,23 @@ const lo = {
930
1083
  "stroke-linecap": "round",
931
1084
  "stroke-linejoin": "round"
932
1085
  }, [
933
- s("rect", {
1086
+ u("rect", {
934
1087
  x: "5",
935
1088
  y: "11",
936
1089
  width: "14",
937
1090
  height: "9",
938
1091
  rx: "2"
939
1092
  }),
940
- s("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })
1093
+ u("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })
941
1094
  ], -1),
942
- s("span", null, "Blocked", -1)
943
- ])])) : p("", !0),
944
- c.zoom ? (d(), v("div", so, [
945
- s("button", {
946
- class: "vlite-gantt-btn",
947
- onClick: Qt,
948
- disabled: $.value <= 0.4
949
- }, [...n[2] || (n[2] = [
950
- s("svg", {
951
- width: "12",
952
- height: "12",
953
- viewBox: "0 0 24 24",
954
- fill: "none",
955
- stroke: "currentColor",
956
- "stroke-width": "2.5",
957
- "stroke-linecap": "round",
958
- "stroke-linejoin": "round"
959
- }, [
960
- s("circle", {
961
- cx: "11",
962
- cy: "11",
963
- r: "8"
964
- }),
965
- s("line", {
966
- x1: "21",
967
- y1: "21",
968
- x2: "16.65",
969
- y2: "16.65"
970
- }),
971
- s("line", {
972
- x1: "8",
973
- y1: "11",
974
- x2: "14",
975
- y2: "11"
976
- })
977
- ], -1),
978
- s("span", null, "Zoom Out", -1)
979
- ])], 8, io),
980
- s("button", {
981
- class: "vlite-gantt-btn",
982
- onClick: Jt,
983
- disabled: $.value >= 3
984
- }, [...n[3] || (n[3] = [
985
- Rn('<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" data-v-94a48eeb><circle cx="11" cy="11" r="8" data-v-94a48eeb></circle><line x1="21" y1="21" x2="16.65" y2="16.65" data-v-94a48eeb></line><line x1="11" y1="8" x2="11" y2="14" data-v-94a48eeb></line><line x1="8" y1="11" x2="14" y2="11" data-v-94a48eeb></line></svg><span data-v-94a48eeb>Zoom In</span>', 2)
986
- ])], 8, uo)
987
- ])) : p("", !0),
988
- c.showTodayLine && Se.value ? (d(), v("button", {
989
- key: 2,
1095
+ u("span", null, "Blocked", -1)
1096
+ ])])) : m("", !0),
1097
+ d.showTodayLine && Pe.value ? (v(), f("button", {
1098
+ key: 1,
990
1099
  class: "vlite-gantt-btn",
991
- onClick: sn
992
- }, [...n[4] || (n[4] = [
993
- s("svg", {
1100
+ onClick: Et
1101
+ }, [...n[2] || (n[2] = [
1102
+ u("svg", {
994
1103
  width: "12",
995
1104
  height: "12",
996
1105
  viewBox: "0 0 24 24",
@@ -1000,196 +1109,226 @@ const lo = {
1000
1109
  "stroke-linecap": "round",
1001
1110
  "stroke-linejoin": "round"
1002
1111
  }, [
1003
- s("circle", {
1112
+ u("circle", {
1004
1113
  cx: "12",
1005
1114
  cy: "12",
1006
1115
  r: "10"
1007
1116
  }),
1008
- s("line", {
1117
+ u("line", {
1009
1118
  x1: "12",
1010
1119
  y1: "8",
1011
1120
  x2: "12",
1012
1121
  y2: "12"
1013
1122
  }),
1014
- s("line", {
1123
+ u("line", {
1015
1124
  x1: "12",
1016
1125
  y1: "16",
1017
1126
  x2: "12.01",
1018
1127
  y2: "16"
1019
1128
  })
1020
1129
  ], -1),
1021
- s("span", null, "Today", -1)
1022
- ])])) : p("", !0)
1023
- ])) : p("", !0),
1024
- s("div", co, [
1025
- s("div", {
1026
- class: "vlite-gantt-sidebar",
1027
- style: E({ width: `${c.sidebarWidth}px`, minWidth: `${c.sidebarWidth}px` })
1130
+ u("span", null, "Today", -1)
1131
+ ])])) : m("", !0)
1132
+ ])) : m("", !0),
1133
+ u("div", Ho, [
1134
+ u("div", {
1135
+ class: ge(["vlite-gantt-sidebar", { "vlite-gantt-sidebar-collapsed": d.collapsibleSidebar && M.value }]),
1136
+ style: A({ width: `${le.value}px`, minWidth: `${le.value}px` })
1028
1137
  }, [
1029
- c.showHeader ? (d(), v("div", {
1138
+ d.showHeader ? (v(), f("div", {
1030
1139
  key: 0,
1031
1140
  class: "vlite-gantt-sidebar-header",
1032
- style: E({ height: `${te.value}px` })
1033
- }, [...n[5] || (n[5] = [
1034
- s("span", { class: "text-xs font-semibold text-muted-foreground uppercase tracking-wider" }, "Tasks", -1)
1035
- ])], 4)) : p("", !0),
1036
- s("div", {
1141
+ style: A({ height: `${ie.value}px` })
1142
+ }, [
1143
+ d.collapsibleSidebar && M.value ? m("", !0) : (v(), f("span", _o, "Tasks")),
1144
+ d.collapsibleSidebar ? (v(), f("button", {
1145
+ key: 1,
1146
+ type: "button",
1147
+ class: "vlite-gantt-sidebar-toggle",
1148
+ "aria-label": M.value ? "Expand task sidebar" : "Collapse task sidebar",
1149
+ "aria-expanded": !M.value,
1150
+ onClick: gt
1151
+ }, [
1152
+ (v(), f("svg", {
1153
+ width: "16",
1154
+ height: "16",
1155
+ viewBox: "0 0 24 24",
1156
+ fill: "none",
1157
+ stroke: "currentColor",
1158
+ "stroke-width": "2.5",
1159
+ "stroke-linecap": "round",
1160
+ "stroke-linejoin": "round",
1161
+ style: A({ transform: M.value ? "rotate(180deg)" : "none" })
1162
+ }, [...n[3] || (n[3] = [
1163
+ u("polyline", { points: "15 18 9 12 15 6" }, null, -1)
1164
+ ])], 4))
1165
+ ], 8, zo)) : m("", !0)
1166
+ ], 4)) : m("", !0),
1167
+ u("div", {
1037
1168
  ref_key: "sidebarRef",
1038
- ref: U,
1169
+ ref: ne,
1039
1170
  class: "vlite-gantt-sidebar-body",
1040
- style: E({ height: `${ne.value}px` })
1171
+ style: A({ height: `${ue.value}px` })
1041
1172
  }, [
1042
- (d(!0), v(C, null, z(se.value, (t, o) => (d(), v("div", {
1173
+ (v(!0), f(T, null, O(ye.value, (t, o) => (v(), f("div", {
1043
1174
  key: `s-${o}`,
1044
1175
  class: "vlite-gantt-sidebar-row",
1045
- style: E({ height: `${c.rowHeight}px` })
1176
+ style: A({ height: `${d.rowHeight}px` })
1046
1177
  }, [
1047
- t.type === "group-header" ? (d(), v("button", {
1048
- key: 0,
1049
- class: "vlite-gantt-group-toggle",
1050
- onClick: (a) => jt(t.group)
1051
- }, [
1052
- (d(), v("svg", {
1053
- class: xe(["vlite-gantt-chevron", { "vlite-gantt-chevron-collapsed": De.value.has(t.group) }]),
1054
- width: "14",
1055
- height: "14",
1056
- viewBox: "0 0 24 24",
1057
- fill: "none",
1058
- stroke: "currentColor",
1059
- "stroke-width": "2.5",
1060
- "stroke-linecap": "round",
1061
- "stroke-linejoin": "round"
1062
- }, [...n[6] || (n[6] = [
1063
- s("polyline", { points: "6 9 12 15 18 9" }, null, -1)
1064
- ])], 2)),
1065
- s("span", fo, I(t.group), 1),
1066
- s("span", go, I(He.value.grouped.get(t.group)?.length ?? 0), 1)
1067
- ], 8, vo)) : (d(), v("div", {
1178
+ t.type === "group-header" ? (v(), f(T, { key: 0 }, [
1179
+ d.collapsibleSidebar && M.value ? m("", !0) : (v(), f("button", {
1180
+ key: 0,
1181
+ class: "vlite-gantt-group-toggle",
1182
+ onClick: (a) => hn(t.group)
1183
+ }, [
1184
+ (v(), f("svg", {
1185
+ class: ge(["vlite-gantt-chevron", { "vlite-gantt-chevron-collapsed": $e.value.has(t.group) }]),
1186
+ width: "14",
1187
+ height: "14",
1188
+ viewBox: "0 0 24 24",
1189
+ fill: "none",
1190
+ stroke: "currentColor",
1191
+ "stroke-width": "2.5",
1192
+ "stroke-linecap": "round",
1193
+ "stroke-linejoin": "round"
1194
+ }, [...n[4] || (n[4] = [
1195
+ u("polyline", { points: "6 9 12 15 18 9" }, null, -1)
1196
+ ])], 2)),
1197
+ u("span", Go, S(t.group), 1),
1198
+ u("span", Fo, S(Ze.value.grouped.get(t.group)?.length ?? 0), 1)
1199
+ ], 8, Xo))
1200
+ ], 64)) : (v(), f("div", {
1068
1201
  key: 1,
1069
- class: xe(["vlite-gantt-task-name", {
1070
- "vlite-gantt-task-name-grouped": !!t.group,
1071
- "vlite-gantt-task-name-dragging": B.value && N.value === t.task?.id
1202
+ class: ge(["vlite-gantt-task-name", {
1203
+ "vlite-gantt-task-name-grouped": !!t.group && !(d.collapsibleSidebar && M.value),
1204
+ "vlite-gantt-task-name-collapsed": d.collapsibleSidebar && M.value,
1205
+ "vlite-gantt-task-name-dragging": B.value && Q.value === t.task?.id
1072
1206
  }]),
1073
- onClick: (a) => t.task && Ze(t.task)
1207
+ title: d.collapsibleSidebar && M.value ? t.task?.name : void 0,
1208
+ onClick: (a) => t.task && lt(t.task)
1074
1209
  }, [
1075
- s("span", {
1210
+ u("span", {
1076
1211
  class: "vlite-gantt-task-dot",
1077
- style: E({ backgroundColor: t.task?._color })
1212
+ style: A({ backgroundColor: t.task?._color })
1078
1213
  }, null, 4),
1079
- s("span", po, I(t.task?.name), 1),
1080
- c.showProgress && t.task?.progress != null ? (d(), v("span", ho, I(t.task.progress) + "%", 1)) : p("", !0)
1081
- ], 10, yo))
1214
+ d.collapsibleSidebar && M.value ? m("", !0) : (v(), f(T, { key: 0 }, [
1215
+ u("span", qo, S(t.task?.name), 1),
1216
+ d.showProgress && t.task?.progress != null ? (v(), f("span", Vo, S(t.task.progress) + "%", 1)) : m("", !0)
1217
+ ], 64))
1218
+ ], 10, Oo))
1082
1219
  ], 4))), 128))
1083
1220
  ], 4)
1084
- ], 4),
1085
- s("div", {
1221
+ ], 6),
1222
+ u("div", {
1086
1223
  ref_key: "timelineRef",
1087
- ref: R,
1224
+ ref: I,
1088
1225
  class: "vlite-gantt-timeline",
1089
- onScroll: Cn,
1090
- onWheel: Ut
1226
+ onScroll: to,
1227
+ onWheel: kn
1091
1228
  }, [
1092
- c.showHeader ? (d(), v("div", {
1229
+ d.showHeader ? (v(), f("div", {
1093
1230
  key: 0,
1094
1231
  class: "vlite-gantt-timeline-header",
1095
- style: E({ height: `${te.value}px`, width: `${ee.value}px` })
1232
+ style: A({ height: `${ie.value}px`, width: `${se.value}px` })
1096
1233
  }, [
1097
- (d(), v("svg", {
1098
- width: ee.value,
1099
- height: te.value,
1234
+ (v(), f("svg", {
1235
+ width: se.value,
1236
+ height: ie.value,
1100
1237
  class: "overflow-visible"
1101
1238
  }, [
1102
- (d(!0), v(C, null, z(at.value, (t, o) => (d(), v("g", { key: o }, [
1103
- s("line", {
1239
+ (v(!0), f(T, null, O(kt.value, (t) => (v(), f("g", {
1240
+ key: t.key
1241
+ }, [
1242
+ u("line", {
1104
1243
  x1: t.x,
1105
1244
  y1: 0,
1106
1245
  x2: t.x,
1107
- y2: te.value,
1246
+ y2: ie.value,
1108
1247
  stroke: "currentColor",
1109
- "stroke-opacity": "0.06"
1110
- }, null, 8, mo),
1111
- s("text", {
1248
+ "stroke-opacity": d.gridOpacity
1249
+ }, null, 8, Yo),
1250
+ u("text", {
1112
1251
  x: t.x + t.width / 2,
1113
- y: te.value / 2 - 5,
1252
+ y: ie.value / 2 - 5,
1114
1253
  "text-anchor": "middle",
1115
1254
  "dominant-baseline": "middle",
1116
1255
  "font-size": "11",
1117
1256
  "font-weight": "600",
1118
1257
  class: "fill-foreground"
1119
- }, I(t.label), 9, xo),
1120
- t.sublabel ? (d(), v("text", {
1258
+ }, S(t.label), 9, Ko),
1259
+ t.sublabel ? (v(), f("text", {
1121
1260
  key: 0,
1122
1261
  x: t.x + t.width / 2,
1123
- y: te.value / 2 + 11,
1262
+ y: ie.value / 2 + 11,
1124
1263
  "text-anchor": "middle",
1125
1264
  "dominant-baseline": "middle",
1126
1265
  "font-size": "10",
1127
1266
  class: "fill-muted-foreground"
1128
- }, I(t.sublabel), 9, wo)) : p("", !0)
1267
+ }, S(t.sublabel), 9, No)) : m("", !0)
1129
1268
  ]))), 128))
1130
- ], 8, ko))
1131
- ], 4)) : p("", !0),
1132
- s("div", {
1269
+ ], 8, Zo))
1270
+ ], 4)) : m("", !0),
1271
+ u("div", {
1133
1272
  class: "vlite-gantt-timeline-body",
1134
- style: E({ height: `${ne.value}px` })
1273
+ style: A({ height: `${ue.value}px` })
1135
1274
  }, [
1136
- (d(), v("svg", {
1275
+ (v(), f("svg", {
1137
1276
  ref_key: "timelineSvgRef",
1138
- ref: Ce,
1139
- width: ee.value,
1140
- height: ne.value,
1277
+ ref: Be,
1278
+ width: se.value,
1279
+ height: ue.value,
1141
1280
  role: "img",
1142
1281
  "aria-label": "Gantt chart",
1143
- class: xe(["overflow-visible", { "vlite-gantt-linking": h.value }]),
1144
- onPointerdown: rn
1282
+ class: ge(["overflow-visible", { "vlite-gantt-linking": x.value }]),
1283
+ onPointerdown: Pn
1145
1284
  }, [
1146
- s("defs", null, [
1147
- (d(!0), v(C, null, z(w.value, (t, o) => (d(), v("linearGradient", {
1285
+ u("defs", null, [
1286
+ (v(!0), f(T, null, O(w.value, (t, o) => (v(), f("linearGradient", {
1148
1287
  key: `g${o}`,
1149
- id: `gg-${X(Y)}-${o}`,
1288
+ id: `gg-${X(K)}-${o}`,
1150
1289
  x1: "0",
1151
1290
  y1: "0",
1152
1291
  x2: "1",
1153
1292
  y2: "0"
1154
1293
  }, [
1155
- s("stop", {
1294
+ u("stop", {
1156
1295
  offset: "0%",
1157
1296
  "stop-color": t.task._color,
1158
1297
  "stop-opacity": "1"
1159
- }, null, 8, Io),
1160
- s("stop", {
1298
+ }, null, 8, Jo),
1299
+ u("stop", {
1161
1300
  offset: "100%",
1162
1301
  "stop-color": t.task._color,
1163
1302
  "stop-opacity": "0.75"
1164
- }, null, 8, $o)
1165
- ], 8, Do))), 128)),
1166
- (d(!0), v(C, null, z(w.value, (t, o) => (d(), v("linearGradient", {
1303
+ }, null, 8, Qo)
1304
+ ], 8, jo))), 128)),
1305
+ (v(!0), f(T, null, O(w.value, (t, o) => (v(), f("linearGradient", {
1167
1306
  key: `p${o}`,
1168
- id: `gp-${X(Y)}-${o}`,
1307
+ id: `gp-${X(K)}-${o}`,
1169
1308
  x1: "0",
1170
1309
  y1: "0",
1171
1310
  x2: "1",
1172
1311
  y2: "0"
1173
1312
  }, [
1174
- s("stop", {
1313
+ u("stop", {
1175
1314
  offset: "0%",
1176
1315
  "stop-color": t.task._color,
1177
1316
  "stop-opacity": "0.35"
1178
- }, null, 8, So),
1179
- s("stop", {
1317
+ }, null, 8, ta),
1318
+ u("stop", {
1180
1319
  offset: "100%",
1181
1320
  "stop-color": t.task._color,
1182
1321
  "stop-opacity": "0.15"
1183
- }, null, 8, Lo)
1184
- ], 8, Mo))), 128)),
1185
- s("pattern", {
1186
- id: `gb-${X(Y)}`,
1322
+ }, null, 8, na)
1323
+ ], 8, ea))), 128)),
1324
+ u("pattern", {
1325
+ id: `gb-${X(K)}`,
1187
1326
  width: "6",
1188
1327
  height: "6",
1189
1328
  patternUnits: "userSpaceOnUse",
1190
1329
  patternTransform: "rotate(45)"
1191
- }, [...n[7] || (n[7] = [
1192
- s("line", {
1330
+ }, [...n[5] || (n[5] = [
1331
+ u("line", {
1193
1332
  x1: "0",
1194
1333
  y1: "0",
1195
1334
  x2: "0",
@@ -1198,52 +1337,52 @@ const lo = {
1198
1337
  "stroke-width": "2",
1199
1338
  "stroke-opacity": "0.3"
1200
1339
  }, null, -1)
1201
- ])], 8, Co)
1340
+ ])], 8, oa)
1202
1341
  ]),
1203
- c.showGrid ? (d(!0), v(C, { key: 0 }, z(at.value, (t, o) => (d(), v("line", {
1204
- key: o,
1342
+ d.showGrid ? (v(!0), f(T, { key: 0 }, O(kt.value, (t) => (v(), f("line", {
1343
+ key: t.key,
1205
1344
  x1: t.x,
1206
1345
  y1: 0,
1207
1346
  x2: t.x,
1208
- y2: ne.value,
1347
+ y2: ue.value,
1209
1348
  stroke: "currentColor",
1210
- "stroke-opacity": "0.06",
1349
+ "stroke-opacity": d.gridOpacity,
1211
1350
  "stroke-dasharray": "4 4"
1212
- }, null, 8, To))), 128)) : p("", !0),
1213
- (d(!0), v(C, null, z(se.value, (t, o) => (d(), v("line", {
1351
+ }, null, 8, aa))), 128)) : m("", !0),
1352
+ (v(!0), f(T, null, O(ye.value, (t, o) => (v(), f("line", {
1214
1353
  key: o,
1215
1354
  x1: 0,
1216
- y1: (o + 1) * c.rowHeight,
1217
- x2: ee.value,
1218
- y2: (o + 1) * c.rowHeight,
1355
+ y1: (o + 1) * d.rowHeight,
1356
+ x2: se.value,
1357
+ y2: (o + 1) * d.rowHeight,
1219
1358
  stroke: "currentColor",
1220
- "stroke-opacity": "0.04"
1221
- }, null, 8, Wo))), 128)),
1222
- (d(!0), v(C, null, z(se.value, (t, o) => Bn((d(), v("rect", {
1359
+ "stroke-opacity": d.gridOpacity
1360
+ }, null, 8, la))), 128)),
1361
+ (v(!0), f(T, null, O(ye.value, (t, o) => so((v(), f("rect", {
1223
1362
  key: `bg${o}`,
1224
1363
  x: 0,
1225
- y: o * c.rowHeight,
1226
- width: ee.value,
1227
- height: c.rowHeight,
1364
+ y: o * d.rowHeight,
1365
+ width: se.value,
1366
+ height: d.rowHeight,
1228
1367
  fill: "currentColor",
1229
1368
  "fill-opacity": "0.02"
1230
- }, null, 8, Ao)), [
1231
- [Pn, t.type === "group-header"]
1369
+ }, null, 8, ra)), [
1370
+ [io, t.type === "group-header"]
1232
1371
  ])), 128)),
1233
- (d(!0), v(C, null, z(V.value, (t) => (d(), v("g", {
1372
+ (v(!0), f(T, null, O(j.value, (t) => (v(), f("g", {
1234
1373
  key: t.key,
1235
1374
  ref_for: !0,
1236
- ref: (o) => on(o, t.key),
1237
- class: xe(["vlite-gantt-dep-group", {
1238
- "vlite-gantt-dep-selectable": c.editableDependencies,
1239
- "vlite-gantt-dep-active": K(t.key),
1240
- "vlite-gantt-dep-hovered": G.value === t.key && !K(t.key)
1375
+ ref: (o) => Wn(o, t.key),
1376
+ class: ge(["vlite-gantt-dep-group", {
1377
+ "vlite-gantt-dep-selectable": d.editableDependencies,
1378
+ "vlite-gantt-dep-active": J(t.key),
1379
+ "vlite-gantt-dep-hovered": V.value === t.key && !J(t.key)
1241
1380
  }]),
1242
1381
  role: "img",
1243
- "aria-label": vt(t)
1382
+ "aria-label": Wt(t)
1244
1383
  }, [
1245
- s("title", null, I(vt(t)), 1),
1246
- s("path", {
1384
+ u("title", null, S(Wt(t)), 1),
1385
+ u("path", {
1247
1386
  d: t.d,
1248
1387
  "data-dep-part": "hit",
1249
1388
  stroke: "transparent",
@@ -1252,293 +1391,293 @@ const lo = {
1252
1391
  "stroke-linejoin": "round",
1253
1392
  "stroke-linecap": "round",
1254
1393
  class: "vlite-gantt-dep-hit",
1255
- tabindex: c.editableDependencies ? 0 : void 0,
1256
- onClick: (o) => ft(o, t),
1257
- onKeydown: je((o) => ft(o, t), ["enter"]),
1258
- onMouseenter: (o) => rt(t.key),
1259
- onMouseleave: st,
1260
- onFocus: (o) => rt(t.key),
1261
- onBlur: st
1262
- }, null, 40, Ro),
1263
- s("path", {
1394
+ tabindex: d.editableDependencies ? 0 : void 0,
1395
+ onClick: (o) => At(o, t),
1396
+ onKeydown: st((o) => At(o, t), ["enter"]),
1397
+ onMouseenter: (o) => St(t.key),
1398
+ onMouseleave: Mt,
1399
+ onFocus: (o) => St(t.key),
1400
+ onBlur: Mt
1401
+ }, null, 40, ia),
1402
+ u("path", {
1264
1403
  d: t.d,
1265
1404
  "data-dep-part": "line",
1266
- stroke: K(t.key) ? et : "var(--color-muted-foreground)",
1267
- "stroke-width": K(t.key) ? 2.5 : 1.5,
1268
- "stroke-opacity": K(t.key) ? 1 : 0.45,
1405
+ stroke: J(t.key) ? dt : "var(--color-muted-foreground)",
1406
+ "stroke-width": J(t.key) ? 2.5 : 1.5,
1407
+ "stroke-opacity": J(t.key) ? 1 : 0.45,
1269
1408
  fill: "none",
1270
1409
  "stroke-linejoin": "round",
1271
1410
  class: "vlite-gantt-dep-line pointer-events-none"
1272
- }, null, 8, Bo),
1273
- s("path", {
1411
+ }, null, 8, ua),
1412
+ u("path", {
1274
1413
  d: t.ad,
1275
1414
  "data-dep-part": "arrow",
1276
- fill: K(t.key) ? et : "var(--color-muted-foreground)",
1277
- "fill-opacity": K(t.key) ? 1 : 0.6,
1415
+ fill: J(t.key) ? dt : "var(--color-muted-foreground)",
1416
+ "fill-opacity": J(t.key) ? 1 : 0.6,
1278
1417
  class: "vlite-gantt-dep-arrowhead pointer-events-none"
1279
- }, null, 8, Po)
1280
- ], 10, Eo))), 128)),
1281
- c.editableDependencies && ue.value ? (d(), v("g", {
1418
+ }, null, 8, ca)
1419
+ ], 10, sa))), 128)),
1420
+ d.editableDependencies && pe.value ? (v(), f("g", {
1282
1421
  key: 1,
1283
1422
  class: "vlite-gantt-dep-delete",
1284
- transform: `translate(${ue.value.midX}, ${ue.value.midY})`,
1423
+ transform: `translate(${pe.value.midX}, ${pe.value.midY})`,
1285
1424
  role: "button",
1286
1425
  tabindex: "0",
1287
1426
  focusable: "true",
1288
- "aria-label": an.value,
1289
- onClick: ln,
1427
+ "aria-label": An.value,
1428
+ onClick: En,
1290
1429
  onKeydown: [
1291
- je(zt(Me, ["prevent"]), ["enter"]),
1292
- je(zt(Me, ["prevent"]), ["space"])
1430
+ st(rn(Ee, ["prevent"]), ["enter"]),
1431
+ st(rn(Ee, ["prevent"]), ["space"])
1293
1432
  ]
1294
1433
  }, [
1295
- n[8] || (n[8] = s("circle", {
1434
+ n[6] || (n[6] = u("circle", {
1296
1435
  r: "11",
1297
1436
  fill: "transparent"
1298
1437
  }, null, -1)),
1299
- s("circle", {
1438
+ u("circle", {
1300
1439
  r: "8",
1301
- fill: et,
1440
+ fill: dt,
1302
1441
  stroke: "var(--color-background)",
1303
1442
  "stroke-width": "1.5"
1304
1443
  }),
1305
- n[9] || (n[9] = s("path", {
1444
+ n[7] || (n[7] = u("path", {
1306
1445
  d: "M -3 -3 L 3 3 M 3 -3 L -3 3",
1307
1446
  stroke: "var(--color-background)",
1308
1447
  "stroke-width": "1.75",
1309
1448
  "stroke-linecap": "round",
1310
1449
  class: "pointer-events-none"
1311
1450
  }, null, -1))
1312
- ], 40, Ho)) : p("", !0),
1313
- (d(!0), v(C, null, z(w.value, (t, o) => (d(), v("g", {
1451
+ ], 40, da)) : m("", !0),
1452
+ (v(!0), f(T, null, O(w.value, (t, o) => (v(), f("g", {
1314
1453
  key: t.task.id,
1315
1454
  ref_for: !0,
1316
- ref: (a) => un(a, o),
1317
- class: xe(["vlite-gantt-bar-group", [
1318
- { "vlite-gantt-bar-dragging": B.value && (N.value === t.task.id || X(i).affectedIds.has(t.task.id)) },
1319
- mn(t.task.id),
1320
- { "vlite-gantt-link-source": h.value && oe.value === t.task.id }
1455
+ ref: (a) => Rn(a, o),
1456
+ class: ge(["vlite-gantt-bar-group", [
1457
+ { "vlite-gantt-bar-dragging": B.value && (Q.value === t.task.id || X(i).affectedIds.has(t.task.id)) },
1458
+ Vn(t.task.id),
1459
+ { "vlite-gantt-link-source": x.value && ce.value === t.task.id }
1321
1460
  ]]),
1322
- onMouseenter: (a) => $n(a, o),
1323
- onMouseleave: Mn
1461
+ onMouseenter: (a) => jn(a, o),
1462
+ onMouseleave: Jn
1324
1463
  }, [
1325
- t.task.milestone ? (d(), v("path", {
1464
+ t.task.milestone ? (v(), f("path", {
1326
1465
  key: 0,
1327
- d: xn(t.x + t.fullW / 2, t.y + c.barHeight / 2, c.barHeight * 0.4),
1328
- fill: `url(#gg-${X(Y)}-${o})`,
1466
+ d: Zn(t.x + t.fullW / 2, t.y + d.barHeight / 2, d.barHeight * 0.4),
1467
+ fill: `url(#gg-${X(K)}-${o})`,
1329
1468
  stroke: t.task._color,
1330
1469
  "stroke-width": "1.5",
1331
1470
  "stroke-opacity": "0.6",
1332
1471
  class: "cursor-pointer",
1333
- opacity: H.value === o ? 0.9 : 1,
1334
- onMouseenter: (a) => Rt(a, o),
1335
- onMousemove: (a) => Bt(a, o),
1336
- onClick: (a) => Ze(t.task)
1337
- }, null, 40, zo)) : (d(), v(C, { key: 1 }, [
1338
- s("path", {
1472
+ opacity: _.value === o ? 0.9 : 1,
1473
+ onMouseenter: (a) => en(a, o),
1474
+ onMousemove: (a) => tn(a, o),
1475
+ onClick: (a) => lt(t.task)
1476
+ }, null, 40, fa)) : (v(), f(T, { key: 1 }, [
1477
+ u("path", {
1339
1478
  "data-gantt-part": "bg",
1340
- d: P(t.x, t.y, t.fullW, c.barHeight, c.barRadius),
1341
- fill: `url(#gp-${X(Y)}-${o})`,
1479
+ d: H(t.x, t.y, t.fullW, d.barHeight, d.barRadius),
1480
+ fill: `url(#gp-${X(K)}-${o})`,
1342
1481
  class: "pointer-events-none"
1343
- }, null, 8, Xo),
1344
- c.showProgress && t.progressW > 0 ? (d(), v("path", {
1482
+ }, null, 8, ga),
1483
+ d.showProgress && t.progressW > 0 ? (v(), f("path", {
1345
1484
  key: 0,
1346
1485
  "data-gantt-part": "progress",
1347
- d: P(t.x, t.y, Math.min(t.progressW, t.fullW), c.barHeight, c.barRadius),
1348
- fill: `url(#gg-${X(Y)}-${o})`,
1486
+ d: H(t.x, t.y, Math.min(t.progressW, t.fullW), d.barHeight, d.barRadius),
1487
+ fill: `url(#gg-${X(K)}-${o})`,
1349
1488
  class: "pointer-events-none"
1350
- }, null, 8, Go)) : p("", !0),
1351
- c.showProgress ? p("", !0) : (d(), v("path", {
1489
+ }, null, 8, ya)) : m("", !0),
1490
+ d.showProgress ? m("", !0) : (v(), f("path", {
1352
1491
  key: 1,
1353
1492
  "data-gantt-part": "fill",
1354
- d: P(t.x, t.y, t.w, c.barHeight, c.barRadius),
1355
- fill: `url(#gg-${X(Y)}-${o})`,
1493
+ d: H(t.x, t.y, t.w, d.barHeight, d.barRadius),
1494
+ fill: `url(#gg-${X(K)}-${o})`,
1356
1495
  class: "pointer-events-none"
1357
- }, null, 8, qo)),
1358
- t.task.blocked ? (d(), v(C, { key: 2 }, [
1359
- s("path", {
1496
+ }, null, 8, pa)),
1497
+ t.task.blocked ? (v(), f(T, { key: 2 }, [
1498
+ u("path", {
1360
1499
  "data-gantt-part": "blocked-hatch",
1361
- d: P(t.x, t.y, t.fullW, c.barHeight, c.barRadius),
1362
- fill: `url(#gb-${X(Y)})`,
1500
+ d: H(t.x, t.y, t.fullW, d.barHeight, d.barRadius),
1501
+ fill: `url(#gb-${X(K)})`,
1363
1502
  class: "pointer-events-none"
1364
- }, null, 8, Fo),
1365
- s("path", {
1503
+ }, null, 8, ha),
1504
+ u("path", {
1366
1505
  "data-gantt-part": "blocked-outline",
1367
- d: P(t.x, t.y, t.fullW, c.barHeight, c.barRadius),
1506
+ d: H(t.x, t.y, t.fullW, d.barHeight, d.barRadius),
1368
1507
  fill: "none",
1369
1508
  stroke: "var(--color-danger)",
1370
1509
  "stroke-width": "1.5",
1371
1510
  "stroke-opacity": "0.9",
1372
1511
  "stroke-dasharray": "4 3",
1373
1512
  class: "pointer-events-none"
1374
- }, null, 8, Yo),
1375
- s("g", {
1513
+ }, null, 8, ma),
1514
+ u("g", {
1376
1515
  "data-gantt-part": "blocked-lock",
1377
- transform: `translate(${t.x + 10}, ${t.y + c.barHeight / 2})`,
1516
+ transform: `translate(${t.x + 10}, ${t.y + d.barHeight / 2})`,
1378
1517
  class: "pointer-events-none"
1379
- }, [...n[10] || (n[10] = [
1380
- s("circle", {
1518
+ }, [...n[8] || (n[8] = [
1519
+ u("circle", {
1381
1520
  r: "7",
1382
1521
  fill: "var(--color-danger)"
1383
1522
  }, null, -1),
1384
- s("path", {
1523
+ u("path", {
1385
1524
  d: "M -2 -0.5 v -1.3 a 2 2 0 0 1 4 0 v 1.3 M -3 -0.5 h 6 v 3.8 h -6 Z",
1386
1525
  fill: "none",
1387
1526
  stroke: "var(--color-background)",
1388
1527
  "stroke-width": "1.2",
1389
1528
  "stroke-linejoin": "round"
1390
1529
  }, null, -1)
1391
- ])], 8, Oo)
1392
- ], 64)) : p("", !0),
1393
- s("rect", {
1530
+ ])], 8, ka)
1531
+ ], 64)) : m("", !0),
1532
+ u("rect", {
1394
1533
  "data-gantt-part": "hitbox",
1395
1534
  x: t.x,
1396
1535
  y: t.y,
1397
1536
  width: t.fullW,
1398
- height: c.barHeight,
1537
+ height: d.barHeight,
1399
1538
  fill: "transparent",
1400
- style: E({ cursor: ve.value }),
1401
- onMouseenter: (a) => Rt(a, o),
1402
- onMousemove: (a) => Bt(a, o),
1403
- onMousedown: (a) => dn(a, o),
1404
- onClick: (a) => Ze(t.task)
1405
- }, null, 44, Vo),
1406
- H.value === o || B.value && N.value === t.task.id ? (d(), v("rect", {
1539
+ style: A({ cursor: ke.value }),
1540
+ onMouseenter: (a) => en(a, o),
1541
+ onMousemove: (a) => tn(a, o),
1542
+ onMousedown: (a) => Hn(a, o),
1543
+ onClick: (a) => lt(t.task)
1544
+ }, null, 44, xa),
1545
+ _.value === o || B.value && Q.value === t.task.id ? (v(), f("rect", {
1407
1546
  key: 3,
1408
1547
  "data-gantt-part": "highlight",
1409
1548
  x: t.x,
1410
1549
  y: t.y,
1411
1550
  width: t.fullW,
1412
- height: c.barHeight,
1413
- rx: c.barRadius,
1414
- ry: c.barRadius,
1551
+ height: d.barHeight,
1552
+ rx: d.barRadius,
1553
+ ry: d.barRadius,
1415
1554
  fill: "currentColor",
1416
1555
  "fill-opacity": "0.06",
1417
1556
  class: "pointer-events-none"
1418
- }, null, 8, Ko)) : p("", !0),
1419
- c.draggable && !t.task.milestone && (q.value === o || B.value && N.value === t.task.id) ? (d(), v(C, { key: 4 }, [
1420
- s("rect", {
1557
+ }, null, 8, ba)) : m("", !0),
1558
+ d.draggable && !t.task.milestone && (Z.value === o || B.value && Q.value === t.task.id) ? (v(), f(T, { key: 4 }, [
1559
+ u("rect", {
1421
1560
  "data-gantt-part": "handle-left",
1422
1561
  x: t.x,
1423
1562
  y: t.y + 4,
1424
1563
  width: "4",
1425
- height: c.barHeight - 8,
1564
+ height: d.barHeight - 8,
1426
1565
  rx: "2",
1427
1566
  fill: "currentColor",
1428
1567
  "fill-opacity": "0.4",
1429
1568
  class: "pointer-events-none"
1430
- }, null, 8, No),
1431
- s("rect", {
1569
+ }, null, 8, wa),
1570
+ u("rect", {
1432
1571
  "data-gantt-part": "handle-right",
1433
1572
  x: t.x + t.fullW - 4,
1434
1573
  y: t.y + 4,
1435
1574
  width: "4",
1436
- height: c.barHeight - 8,
1575
+ height: d.barHeight - 8,
1437
1576
  rx: "2",
1438
1577
  fill: "currentColor",
1439
1578
  "fill-opacity": "0.4",
1440
1579
  class: "pointer-events-none"
1441
- }, null, 8, Zo)
1442
- ], 64)) : p("", !0),
1443
- c.showLabels && t.fullW > 60 ? (d(), v("text", {
1580
+ }, null, 8, Da)
1581
+ ], 64)) : m("", !0),
1582
+ d.showLabels && t.fullW > 60 ? (v(), f("text", {
1444
1583
  key: 5,
1445
1584
  "data-gantt-part": "label",
1446
1585
  "data-name": t.task.name,
1447
1586
  x: t.x + (t.task.blocked ? 24 : 12),
1448
- y: t.y + c.barHeight / 2,
1587
+ y: t.y + d.barHeight / 2,
1449
1588
  "dominant-baseline": "middle",
1450
1589
  "font-size": "11",
1451
1590
  "font-weight": "600",
1452
- fill: c.showProgress ? "currentColor" : "white",
1453
- opacity: Re.value > 0.3 ? 0.85 : 0,
1591
+ fill: d.showProgress ? "currentColor" : "white",
1592
+ opacity: Ge.value > 0.3 ? 0.85 : 0,
1454
1593
  class: "pointer-events-none"
1455
- }, I(Et(t.task.name, t.fullW, t.task.blocked)), 9, jo)) : p("", !0)
1594
+ }, S(Qt(t.task.name, t.fullW, t.task.blocked)), 9, Ia)) : m("", !0)
1456
1595
  ], 64)),
1457
- c.editableDependencies && fn(o) ? (d(), v("g", {
1596
+ d.editableDependencies && zn(o) ? (v(), f("g", {
1458
1597
  key: 2,
1459
1598
  class: "vlite-gantt-dep-connector",
1460
- transform: `translate(${F(t).cx}, ${F(t).cy})`,
1599
+ transform: `translate(${Y(t).cx}, ${Y(t).cy})`,
1461
1600
  role: "button",
1462
1601
  tabindex: "0",
1463
1602
  focusable: "true",
1464
1603
  "aria-label": `Create dependency from ${t.task.name}`,
1465
- onPointerdown: (a) => yn(a, o),
1466
- onKeydown: (a) => pn(a, o),
1467
- onFocus: (a) => hn(o),
1468
- onBlur: kn,
1469
- onMouseenter: (a) => Sn(o),
1470
- onMouseleave: n[0] || (n[0] = (a) => Ln(a))
1604
+ onPointerdown: (a) => Gn(a, o),
1605
+ onKeydown: (a) => Fn(a, o),
1606
+ onFocus: (a) => On(o),
1607
+ onBlur: qn,
1608
+ onMouseenter: (a) => Qn(o),
1609
+ onMouseleave: n[0] || (n[0] = (a) => eo(a))
1471
1610
  }, [
1472
- n[11] || (n[11] = s("circle", {
1611
+ n[9] || (n[9] = u("circle", {
1473
1612
  r: "11",
1474
1613
  fill: "transparent",
1475
1614
  class: "vlite-gantt-dep-connector-hit"
1476
1615
  }, null, -1)),
1477
- s("circle", {
1478
- r: ma,
1616
+ u("circle", {
1617
+ r: Ya,
1479
1618
  class: "vlite-gantt-dep-connector-disc",
1480
1619
  fill: "var(--color-background)",
1481
1620
  stroke: "var(--color-foreground)",
1482
1621
  "stroke-width": "1.5"
1483
1622
  }),
1484
- n[12] || (n[12] = s("path", {
1623
+ n[10] || (n[10] = u("path", {
1485
1624
  d: "M -3.5 0 H 3.5 M 0 -3.5 V 3.5",
1486
1625
  stroke: "var(--color-foreground)",
1487
1626
  "stroke-width": "1.5",
1488
1627
  "stroke-linecap": "round",
1489
1628
  class: "pointer-events-none"
1490
1629
  }, null, -1))
1491
- ], 40, Uo)) : p("", !0),
1492
- h.value && fe.value === t.task.id ? (d(), v("g", Jo, [
1493
- s("rect", {
1630
+ ], 40, Sa)) : m("", !0),
1631
+ x.value && xe.value === t.task.id ? (v(), f("g", Ma, [
1632
+ u("rect", {
1494
1633
  x: t.x - 3,
1495
1634
  y: t.y - 3,
1496
1635
  width: t.fullW + 6,
1497
- height: c.barHeight + 6,
1498
- rx: c.barRadius + 2,
1636
+ height: d.barHeight + 6,
1637
+ rx: d.barRadius + 2,
1499
1638
  fill: "none",
1500
- stroke: S.value === "valid" ? "var(--color-success)" : "var(--color-danger)",
1639
+ stroke: L.value === "valid" ? "var(--color-success)" : "var(--color-danger)",
1501
1640
  "stroke-width": "2",
1502
- "stroke-dasharray": S.value === "valid" ? "0" : "5 3"
1503
- }, null, 8, Qo),
1504
- s("text", {
1641
+ "stroke-dasharray": L.value === "valid" ? "0" : "5 3"
1642
+ }, null, 8, Ca),
1643
+ u("text", {
1505
1644
  x: t.x + t.fullW + 10,
1506
- y: t.y + c.barHeight / 2,
1645
+ y: t.y + d.barHeight / 2,
1507
1646
  "dominant-baseline": "middle",
1508
1647
  "font-size": "11",
1509
1648
  "font-weight": "700",
1510
- fill: S.value === "valid" ? "var(--color-success)" : "var(--color-danger)"
1511
- }, I(S.value === "valid" ? "✓" : "✕"), 9, ea)
1512
- ])) : p("", !0)
1513
- ], 42, _o))), 128)),
1514
- h.value && T.value ? (d(), v("g", ta, [
1515
- s("line", {
1516
- x1: T.value.x1,
1517
- y1: T.value.y1,
1518
- x2: T.value.x2,
1519
- y2: T.value.y2,
1520
- stroke: S.value === "invalid" ? "var(--color-danger)" : "var(--color-primary)",
1649
+ fill: L.value === "valid" ? "var(--color-success)" : "var(--color-danger)"
1650
+ }, S(L.value === "valid" ? "✓" : "✕"), 9, $a)
1651
+ ])) : m("", !0)
1652
+ ], 42, va))), 128)),
1653
+ x.value && E.value ? (v(), f("g", La, [
1654
+ u("line", {
1655
+ x1: E.value.x1,
1656
+ y1: E.value.y1,
1657
+ x2: E.value.x2,
1658
+ y2: E.value.y2,
1659
+ stroke: L.value === "invalid" ? "var(--color-danger)" : "var(--color-primary)",
1521
1660
  "stroke-width": "2",
1522
- "stroke-dasharray": S.value === "invalid" ? "2 4" : "6 4",
1661
+ "stroke-dasharray": L.value === "invalid" ? "2 4" : "6 4",
1523
1662
  "stroke-linecap": "round",
1524
- "stroke-opacity": S.value === "none" ? 0.55 : 0.9
1525
- }, null, 8, na),
1526
- s("circle", {
1527
- cx: T.value.x2,
1528
- cy: T.value.y2,
1663
+ "stroke-opacity": L.value === "none" ? 0.55 : 0.9
1664
+ }, null, 8, Ta),
1665
+ u("circle", {
1666
+ cx: E.value.x2,
1667
+ cy: E.value.y2,
1529
1668
  r: "4",
1530
- fill: S.value === "invalid" ? "var(--color-danger)" : "var(--color-primary)",
1531
- "fill-opacity": S.value === "none" ? 0.55 : 0.9
1532
- }, null, 8, oa)
1533
- ])) : p("", !0),
1534
- s("g", {
1669
+ fill: L.value === "invalid" ? "var(--color-danger)" : "var(--color-primary)",
1670
+ "fill-opacity": L.value === "none" ? 0.55 : 0.9
1671
+ }, null, 8, Wa)
1672
+ ])) : m("", !0),
1673
+ u("g", {
1535
1674
  ref_key: "dragLabelRef",
1536
- ref: _,
1675
+ ref: F,
1537
1676
  style: { display: "none" },
1538
1677
  "pointer-events": "none",
1539
1678
  "aria-hidden": "true"
1540
- }, [...n[13] || (n[13] = [
1541
- s("rect", {
1679
+ }, [...n[11] || (n[11] = [
1680
+ u("rect", {
1542
1681
  x: "0",
1543
1682
  y: "0",
1544
1683
  width: "148",
@@ -1547,7 +1686,7 @@ const lo = {
1547
1686
  fill: "var(--color-foreground)",
1548
1687
  "fill-opacity": "0.85"
1549
1688
  }, null, -1),
1550
- s("text", {
1689
+ u("text", {
1551
1690
  x: "0",
1552
1691
  y: "0",
1553
1692
  "text-anchor": "middle",
@@ -1557,68 +1696,68 @@ const lo = {
1557
1696
  fill: "var(--color-background)"
1558
1697
  }, null, -1)
1559
1698
  ])], 512),
1560
- c.showTodayLine && Se.value ? (d(), v("g", aa, [
1561
- s("line", {
1562
- x1: de.value,
1699
+ d.showTodayLine && Pe.value ? (v(), f("g", Aa, [
1700
+ u("line", {
1701
+ x1: me.value,
1563
1702
  y1: 0,
1564
- x2: de.value,
1565
- y2: ne.value,
1566
- stroke: c.todayColor,
1703
+ x2: me.value,
1704
+ y2: ue.value,
1705
+ stroke: d.todayColor,
1567
1706
  "stroke-width": "2",
1568
1707
  "stroke-opacity": "0.7",
1569
1708
  "stroke-dasharray": "6 3"
1570
- }, null, 8, la),
1571
- s("circle", {
1572
- cx: de.value,
1709
+ }, null, 8, Ea),
1710
+ u("circle", {
1711
+ cx: me.value,
1573
1712
  cy: 0,
1574
1713
  r: "4",
1575
- fill: c.todayColor,
1714
+ fill: d.todayColor,
1576
1715
  "fill-opacity": "0.9"
1577
- }, null, 8, ra),
1578
- s("text", {
1579
- x: de.value,
1716
+ }, null, 8, Pa),
1717
+ u("text", {
1718
+ x: me.value,
1580
1719
  y: -8,
1581
1720
  "text-anchor": "middle",
1582
1721
  "font-size": "9",
1583
1722
  "font-weight": "700",
1584
- fill: c.todayColor,
1723
+ fill: d.todayColor,
1585
1724
  "fill-opacity": "0.9"
1586
- }, "TODAY", 8, sa)
1587
- ])) : p("", !0)
1588
- ], 42, bo))
1725
+ }, "TODAY", 8, Ra)
1726
+ ])) : m("", !0)
1727
+ ], 42, Uo))
1589
1728
  ], 4)
1590
1729
  ], 544)
1591
1730
  ]),
1592
- s("div", ia, I(Ge.value), 1),
1593
- (d(), Hn(_n, { to: "body" }, [
1594
- y.value && !B.value && !h.value && !M.value ? (d(), v("div", {
1731
+ u("div", Ba, S(je.value), 1),
1732
+ (v(), it(uo, { to: "body" }, [
1733
+ y.value && !B.value && !x.value && !$.value ? (v(), f("div", {
1595
1734
  key: 0,
1596
1735
  class: "vlite-chart-tooltip",
1597
- style: E({ left: `${y.value.left}px`, top: `${y.value.top}px` })
1736
+ style: A({ left: `${y.value.left}px`, top: `${y.value.top}px` })
1598
1737
  }, [
1599
- s("div", ua, I(y.value.task.name), 1),
1600
- s("div", ca, [
1601
- s("span", {
1738
+ u("div", Ha, S(y.value.task.name), 1),
1739
+ u("div", _a, [
1740
+ u("span", {
1602
1741
  class: "w-2 h-2 rounded-sm shrink-0",
1603
- style: E({ backgroundColor: y.value.task._color ?? y.value.task.color })
1742
+ style: A({ backgroundColor: y.value.task._color ?? y.value.task.color })
1604
1743
  }, null, 4),
1605
- s("span", null, I(y.value.startStr) + " — " + I(y.value.endStr), 1)
1744
+ u("span", null, S(y.value.startStr) + " — " + S(y.value.endStr), 1)
1606
1745
  ]),
1607
- s("div", da, I(Tn(y.value.task._start, y.value.task._end)), 1),
1608
- c.showProgress && y.value.task.progress != null ? (d(), v("div", va, [
1609
- s("div", fa, [
1610
- s("div", {
1746
+ u("div", za, S(no(y.value.task._start, y.value.task._end)), 1),
1747
+ d.showProgress && y.value.task.progress != null ? (v(), f("div", Xa, [
1748
+ u("div", Ga, [
1749
+ u("div", {
1611
1750
  class: "vlite-gantt-tooltip-progress-fill",
1612
- style: E({
1751
+ style: A({
1613
1752
  width: `${y.value.task.progress}%`,
1614
1753
  backgroundColor: y.value.task._color ?? y.value.task.color
1615
1754
  })
1616
1755
  }, null, 4)
1617
1756
  ]),
1618
- s("span", ga, I(y.value.task.progress) + "%", 1)
1619
- ])) : p("", !0),
1620
- y.value.task.blocked ? (d(), v("div", ya, [
1621
- n[14] || (n[14] = s("svg", {
1757
+ u("span", Fa, S(y.value.task.progress) + "%", 1)
1758
+ ])) : m("", !0),
1759
+ y.value.task.blocked ? (v(), f("div", Oa, [
1760
+ n[12] || (n[12] = u("svg", {
1622
1761
  width: "10",
1623
1762
  height: "10",
1624
1763
  viewBox: "0 0 24 24",
@@ -1628,30 +1767,41 @@ const lo = {
1628
1767
  "stroke-linecap": "round",
1629
1768
  "stroke-linejoin": "round"
1630
1769
  }, [
1631
- s("rect", {
1770
+ u("rect", {
1632
1771
  x: "5",
1633
1772
  y: "11",
1634
1773
  width: "14",
1635
1774
  height: "9",
1636
1775
  rx: "2"
1637
1776
  }),
1638
- s("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })
1777
+ u("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })
1639
1778
  ], -1)),
1640
- s("span", null, I(y.value.task.blockedReason || "Blocked"), 1)
1641
- ])) : p("", !0),
1642
- y.value.task.group ? (d(), v("div", pa, I(y.value.task.group), 1)) : p("", !0),
1643
- c.draggable && !y.value.task.milestone ? (d(), v("div", ha, [
1644
- n[15] || (n[15] = Xt(" Drag to move · Edges to resize ", -1)),
1645
- c.cascadeDependencies ? (d(), v(C, { key: 0 }, [
1646
- Xt(" · Dependents follow")
1647
- ], 64)) : p("", !0)
1648
- ])) : p("", !0),
1649
- c.editableDependencies ? (d(), v("div", ka, " Drag the + connector to link a dependency ")) : p("", !0)
1650
- ], 4)) : p("", !0)
1779
+ u("span", null, S(y.value.task.blockedReason || "Blocked"), 1)
1780
+ ])) : m("", !0),
1781
+ y.value.task.group ? (v(), f("div", qa, S(y.value.task.group), 1)) : m("", !0),
1782
+ z(y.value.task).length ? (v(), f("div", Va, [
1783
+ z(y.value.task).length === 1 ? (v(), it(co, {
1784
+ key: 0,
1785
+ src: z(y.value.task)[0].src,
1786
+ alt: z(y.value.task)[0].alt || z(y.value.task)[0].name,
1787
+ fallback: nn(z(y.value.task)[0]),
1788
+ label: z(y.value.task)[0].name,
1789
+ "secondary-label": z(y.value.task)[0].role,
1790
+ presence: z(y.value.task)[0].presence,
1791
+ size: "xs"
1792
+ }, null, 8, ["src", "alt", "fallback", "label", "secondary-label", "presence"])) : (v(), it(X(vo), {
1793
+ key: 1,
1794
+ items: oo(y.value.task),
1795
+ max: 5,
1796
+ size: "xs",
1797
+ overlap: "sm"
1798
+ }, null, 8, ["items"]))
1799
+ ])) : m("", !0)
1800
+ ], 4)) : m("", !0)
1651
1801
  ]))
1652
1802
  ], 512));
1653
1803
  }
1654
1804
  });
1655
1805
  export {
1656
- La as default
1806
+ al as default
1657
1807
  };