iris-gantt 1.5.8 → 1.6.0

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.
@@ -1,6 +1,6 @@
1
- import _, { useState as G, memo as Ir, forwardRef as wr, useCallback as Je, useEffect as ut, useRef as ft } from "react";
2
- import { Typography as br, Select as Oe, InputNumber as at, Button as Pe, Popover as zr, Tooltip as nt, Input as pt, Space as er, Segmented as Br, Divider as tr, Form as ve, Modal as _t, DatePicker as Sr, ColorPicker as vr, Alert as Hr, Card as dr, List as Jt, Tag as Wr, Menu as Vr } from "antd";
3
- import { FontAwesomeIcon as De } from "@fortawesome/react-fontawesome";
1
+ import A, { useState as G, memo as Ir, forwardRef as wr, useCallback as Je, useEffect as ut, useRef as ft } from "react";
2
+ import { Typography as br, Select as ke, InputNumber as at, Button as Pe, Popover as zr, Tooltip as nt, Input as pt, Space as er, Segmented as Br, Divider as tr, Form as je, Modal as At, DatePicker as Sr, ColorPicker as vr, Alert as Hr, Card as dr, List as Jt, Tag as Wr, Menu as Vr } from "antd";
3
+ import { FontAwesomeIcon as Ee } from "@fortawesome/react-fontawesome";
4
4
  import { faChevronDown as cr, faPlus as ar, faGripVertical as Xr, faChevronRight as Ur, faTimesCircle as qr, faSearchMinus as Gr, faSearchPlus as Jr, faRotateLeft as jr, faFileCsv as Kr, faFileExcel as Zr, faFileCode as Qr, faFilePdf as en, faExclamationTriangle as tn, faLink as Tr, faTrash as Dr, faInfoCircle as rn, faEdit as nn, faCopy as an, faFlag as on, faTasks as sn, faFolder as ln } from "@fortawesome/free-solid-svg-icons";
5
5
  import Mr from "dayjs";
6
6
  var Yt = { exports: {} }, Ft = {};
@@ -8,13 +8,13 @@ var ur;
8
8
  function dn() {
9
9
  if (ur) return Ft;
10
10
  ur = 1;
11
- var e = _, a = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
11
+ var e = A, a = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
12
12
  function b(u, d, p) {
13
- var h, S = {}, x = null, m = null;
14
- p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (m = d.ref);
15
- for (h in d) s.call(d, h) && !c.hasOwnProperty(h) && (S[h] = d[h]);
16
- if (u && u.defaultProps) for (h in d = u.defaultProps, d) S[h] === void 0 && (S[h] = d[h]);
17
- return { $$typeof: a, type: u, key: x, ref: m, props: S, _owner: r.current };
13
+ var h, v = {}, y = null, m = null;
14
+ p !== void 0 && (y = "" + p), d.key !== void 0 && (y = "" + d.key), d.ref !== void 0 && (m = d.ref);
15
+ for (h in d) s.call(d, h) && !c.hasOwnProperty(h) && (v[h] = d[h]);
16
+ if (u && u.defaultProps) for (h in d = u.defaultProps, d) v[h] === void 0 && (v[h] = d[h]);
17
+ return { $$typeof: a, type: u, key: y, ref: m, props: v, _owner: r.current };
18
18
  }
19
19
  return Ft.Fragment = n, Ft.jsx = b, Ft.jsxs = b, Ft;
20
20
  }
@@ -22,54 +22,54 @@ var Rt = {};
22
22
  var pr;
23
23
  function cn() {
24
24
  return pr || (pr = 1, process.env.NODE_ENV !== "production" && (function() {
25
- var e = _, a = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.portal"), s = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), c = /* @__PURE__ */ Symbol.for("react.profiler"), b = /* @__PURE__ */ Symbol.for("react.provider"), u = /* @__PURE__ */ Symbol.for("react.context"), d = /* @__PURE__ */ Symbol.for("react.forward_ref"), p = /* @__PURE__ */ Symbol.for("react.suspense"), h = /* @__PURE__ */ Symbol.for("react.suspense_list"), S = /* @__PURE__ */ Symbol.for("react.memo"), x = /* @__PURE__ */ Symbol.for("react.lazy"), m = /* @__PURE__ */ Symbol.for("react.offscreen"), E = Symbol.iterator, R = "@@iterator";
25
+ var e = A, a = /* @__PURE__ */ Symbol.for("react.element"), n = /* @__PURE__ */ Symbol.for("react.portal"), s = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), c = /* @__PURE__ */ Symbol.for("react.profiler"), b = /* @__PURE__ */ Symbol.for("react.provider"), u = /* @__PURE__ */ Symbol.for("react.context"), d = /* @__PURE__ */ Symbol.for("react.forward_ref"), p = /* @__PURE__ */ Symbol.for("react.suspense"), h = /* @__PURE__ */ Symbol.for("react.suspense_list"), v = /* @__PURE__ */ Symbol.for("react.memo"), y = /* @__PURE__ */ Symbol.for("react.lazy"), m = /* @__PURE__ */ Symbol.for("react.offscreen"), E = Symbol.iterator, F = "@@iterator";
26
26
  function N(o) {
27
27
  if (o === null || typeof o != "object")
28
28
  return null;
29
- var w = E && o[E] || o[R];
30
- return typeof w == "function" ? w : null;
29
+ var x = E && o[E] || o[F];
30
+ return typeof x == "function" ? x : null;
31
31
  }
32
32
  var M = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
33
- function v(o) {
33
+ function S(o) {
34
34
  {
35
- for (var w = arguments.length, L = new Array(w > 1 ? w - 1 : 0), A = 1; A < w; A++)
36
- L[A - 1] = arguments[A];
37
- y("error", o, L);
35
+ for (var x = arguments.length, L = new Array(x > 1 ? x - 1 : 0), _ = 1; _ < x; _++)
36
+ L[_ - 1] = arguments[_];
37
+ w("error", o, L);
38
38
  }
39
39
  }
40
- function y(o, w, L) {
40
+ function w(o, x, L) {
41
41
  {
42
- var A = M.ReactDebugCurrentFrame, te = A.getStackAddendum();
43
- te !== "" && (w += "%s", L = L.concat([te]));
44
- var oe = L.map(function(Z) {
45
- return String(Z);
42
+ var _ = M.ReactDebugCurrentFrame, te = _.getStackAddendum();
43
+ te !== "" && (x += "%s", L = L.concat([te]));
44
+ var oe = L.map(function(Q) {
45
+ return String(Q);
46
46
  });
47
- oe.unshift("Warning: " + w), Function.prototype.apply.call(console[o], console, oe);
47
+ oe.unshift("Warning: " + x), Function.prototype.apply.call(console[o], console, oe);
48
48
  }
49
49
  }
50
- var C = !1, K = !1, W = !1, re = !1, le = !1, j;
50
+ var C = !1, Z = !1, W = !1, re = !1, le = !1, j;
51
51
  j = /* @__PURE__ */ Symbol.for("react.module.reference");
52
52
  function X(o) {
53
- return !!(typeof o == "string" || typeof o == "function" || o === s || o === c || le || o === r || o === p || o === h || re || o === m || C || K || W || typeof o == "object" && o !== null && (o.$$typeof === x || o.$$typeof === S || o.$$typeof === b || o.$$typeof === u || o.$$typeof === d || // This needs to include all possible module reference object
53
+ return !!(typeof o == "string" || typeof o == "function" || o === s || o === c || le || o === r || o === p || o === h || re || o === m || C || Z || W || typeof o == "object" && o !== null && (o.$$typeof === y || o.$$typeof === v || o.$$typeof === b || o.$$typeof === u || o.$$typeof === d || // This needs to include all possible module reference object
54
54
  // types supported by any Flight configuration anywhere since
55
55
  // we don't know which Flight build this will end up being used
56
56
  // with.
57
57
  o.$$typeof === j || o.getModuleId !== void 0));
58
58
  }
59
- function F(o, w, L) {
60
- var A = o.displayName;
61
- if (A)
62
- return A;
63
- var te = w.displayName || w.name || "";
59
+ function R(o, x, L) {
60
+ var _ = o.displayName;
61
+ if (_)
62
+ return _;
63
+ var te = x.displayName || x.name || "";
64
64
  return te !== "" ? L + "(" + te + ")" : L;
65
65
  }
66
- function k(o) {
66
+ function O(o) {
67
67
  return o.displayName || "Context";
68
68
  }
69
69
  function B(o) {
70
70
  if (o == null)
71
71
  return null;
72
- if (typeof o.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
72
+ if (typeof o.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof o == "function")
73
73
  return o.displayName || o.name || null;
74
74
  if (typeof o == "string")
75
75
  return o;
@@ -90,20 +90,20 @@ function cn() {
90
90
  if (typeof o == "object")
91
91
  switch (o.$$typeof) {
92
92
  case u:
93
- var w = o;
94
- return k(w) + ".Consumer";
93
+ var x = o;
94
+ return O(x) + ".Consumer";
95
95
  case b:
96
96
  var L = o;
97
- return k(L._context) + ".Provider";
97
+ return O(L._context) + ".Provider";
98
98
  case d:
99
- return F(o, o.render, "ForwardRef");
100
- case S:
101
- var A = o.displayName || null;
102
- return A !== null ? A : B(o.type) || "Memo";
103
- case x: {
104
- var te = o, oe = te._payload, Z = te._init;
99
+ return R(o, o.render, "ForwardRef");
100
+ case v:
101
+ var _ = o.displayName || null;
102
+ return _ !== null ? _ : B(o.type) || "Memo";
103
+ case y: {
104
+ var te = o, oe = te._payload, Q = te._init;
105
105
  try {
106
- return B(Z(oe));
106
+ return B(Q(oe));
107
107
  } catch {
108
108
  return null;
109
109
  }
@@ -111,14 +111,14 @@ function cn() {
111
111
  }
112
112
  return null;
113
113
  }
114
- var Y = Object.assign, O = 0, Me, be, V, I, ne, de, se;
114
+ var Y = Object.assign, k = 0, De, Se, V, I, ne, de, se;
115
115
  function ue() {
116
116
  }
117
117
  ue.__reactDisabledLog = !0;
118
118
  function z() {
119
119
  {
120
- if (O === 0) {
121
- Me = console.log, be = console.info, V = console.warn, I = console.error, ne = console.group, de = console.groupCollapsed, se = console.groupEnd;
120
+ if (k === 0) {
121
+ De = console.log, Se = console.info, V = console.warn, I = console.error, ne = console.group, de = console.groupCollapsed, se = console.groupEnd;
122
122
  var o = {
123
123
  configurable: !0,
124
124
  enumerable: !0,
@@ -135,12 +135,12 @@ function cn() {
135
135
  groupEnd: o
136
136
  });
137
137
  }
138
- O++;
138
+ k++;
139
139
  }
140
140
  }
141
- function xe() {
141
+ function ye() {
142
142
  {
143
- if (O--, O === 0) {
143
+ if (k--, k === 0) {
144
144
  var o = {
145
145
  configurable: !0,
146
146
  enumerable: !0,
@@ -148,10 +148,10 @@ function cn() {
148
148
  };
149
149
  Object.defineProperties(console, {
150
150
  log: Y({}, o, {
151
- value: Me
151
+ value: De
152
152
  }),
153
153
  info: Y({}, o, {
154
- value: be
154
+ value: Se
155
155
  }),
156
156
  warn: Y({}, o, {
157
157
  value: V
@@ -170,107 +170,107 @@ function cn() {
170
170
  })
171
171
  });
172
172
  }
173
- O < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
173
+ k < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
174
174
  }
175
175
  }
176
- var Ee = M.ReactCurrentDispatcher, Ie;
177
- function Ye(o, w, L) {
176
+ var Le = M.ReactCurrentDispatcher, Ie;
177
+ function Ye(o, x, L) {
178
178
  {
179
179
  if (Ie === void 0)
180
180
  try {
181
181
  throw Error();
182
182
  } catch (te) {
183
- var A = te.stack.trim().match(/\n( *(at )?)/);
184
- Ie = A && A[1] || "";
183
+ var _ = te.stack.trim().match(/\n( *(at )?)/);
184
+ Ie = _ && _[1] || "";
185
185
  }
186
186
  return `
187
187
  ` + Ie + o;
188
188
  }
189
189
  }
190
- var $ = !1, Q;
190
+ var $ = !1, J;
191
191
  {
192
- var Le = typeof WeakMap == "function" ? WeakMap : Map;
193
- Q = new Le();
192
+ var xe = typeof WeakMap == "function" ? WeakMap : Map;
193
+ J = new xe();
194
194
  }
195
- function Qe(o, w) {
195
+ function Qe(o, x) {
196
196
  if (!o || $)
197
197
  return "";
198
198
  {
199
- var L = Q.get(o);
199
+ var L = J.get(o);
200
200
  if (L !== void 0)
201
201
  return L;
202
202
  }
203
- var A;
203
+ var _;
204
204
  $ = !0;
205
205
  var te = Error.prepareStackTrace;
206
206
  Error.prepareStackTrace = void 0;
207
207
  var oe;
208
- oe = Ee.current, Ee.current = null, z();
208
+ oe = Le.current, Le.current = null, z();
209
209
  try {
210
- if (w) {
211
- var Z = function() {
210
+ if (x) {
211
+ var Q = function() {
212
212
  throw Error();
213
213
  };
214
- if (Object.defineProperty(Z.prototype, "props", {
214
+ if (Object.defineProperty(Q.prototype, "props", {
215
215
  set: function() {
216
216
  throw Error();
217
217
  }
218
218
  }), typeof Reflect == "object" && Reflect.construct) {
219
219
  try {
220
- Reflect.construct(Z, []);
220
+ Reflect.construct(Q, []);
221
221
  } catch (Ne) {
222
- A = Ne;
222
+ _ = Ne;
223
223
  }
224
- Reflect.construct(o, [], Z);
224
+ Reflect.construct(o, [], Q);
225
225
  } else {
226
226
  try {
227
- Z.call();
227
+ Q.call();
228
228
  } catch (Ne) {
229
- A = Ne;
229
+ _ = Ne;
230
230
  }
231
- o.call(Z.prototype);
231
+ o.call(Q.prototype);
232
232
  }
233
233
  } else {
234
234
  try {
235
235
  throw Error();
236
236
  } catch (Ne) {
237
- A = Ne;
237
+ _ = Ne;
238
238
  }
239
239
  o();
240
240
  }
241
241
  } catch (Ne) {
242
- if (Ne && A && typeof Ne.stack == "string") {
243
- for (var J = Ne.stack.split(`
244
- `), Re = A.stack.split(`
245
- `), ye = J.length - 1, we = Re.length - 1; ye >= 1 && we >= 0 && J[ye] !== Re[we]; )
246
- we--;
247
- for (; ye >= 1 && we >= 0; ye--, we--)
248
- if (J[ye] !== Re[we]) {
249
- if (ye !== 1 || we !== 1)
242
+ if (Ne && _ && typeof Ne.stack == "string") {
243
+ for (var K = Ne.stack.split(`
244
+ `), Re = _.stack.split(`
245
+ `), we = K.length - 1, be = Re.length - 1; we >= 1 && be >= 0 && K[we] !== Re[be]; )
246
+ be--;
247
+ for (; we >= 1 && be >= 0; we--, be--)
248
+ if (K[we] !== Re[be]) {
249
+ if (we !== 1 || be !== 1)
250
250
  do
251
- if (ye--, we--, we < 0 || J[ye] !== Re[we]) {
251
+ if (we--, be--, be < 0 || K[we] !== Re[be]) {
252
252
  var Be = `
253
- ` + J[ye].replace(" at new ", " at ");
254
- return o.displayName && Be.includes("<anonymous>") && (Be = Be.replace("<anonymous>", o.displayName)), typeof o == "function" && Q.set(o, Be), Be;
253
+ ` + K[we].replace(" at new ", " at ");
254
+ return o.displayName && Be.includes("<anonymous>") && (Be = Be.replace("<anonymous>", o.displayName)), typeof o == "function" && J.set(o, Be), Be;
255
255
  }
256
- while (ye >= 1 && we >= 0);
256
+ while (we >= 1 && be >= 0);
257
257
  break;
258
258
  }
259
259
  }
260
260
  } finally {
261
- $ = !1, Ee.current = oe, xe(), Error.prepareStackTrace = te;
261
+ $ = !1, Le.current = oe, ye(), Error.prepareStackTrace = te;
262
262
  }
263
263
  var Ge = o ? o.displayName || o.name : "", Ze = Ge ? Ye(Ge) : "";
264
- return typeof o == "function" && Q.set(o, Ze), Ze;
264
+ return typeof o == "function" && J.set(o, Ze), Ze;
265
265
  }
266
- function ce(o, w, L) {
266
+ function ce(o, x, L) {
267
267
  return Qe(o, !1);
268
268
  }
269
269
  function me(o) {
270
- var w = o.prototype;
271
- return !!(w && w.isReactComponent);
270
+ var x = o.prototype;
271
+ return !!(x && x.isReactComponent);
272
272
  }
273
- function Fe(o, w, L) {
273
+ function Fe(o, x, L) {
274
274
  if (o == null)
275
275
  return "";
276
276
  if (typeof o == "function")
@@ -287,42 +287,42 @@ function cn() {
287
287
  switch (o.$$typeof) {
288
288
  case d:
289
289
  return ce(o.render);
290
- case S:
291
- return Fe(o.type, w, L);
292
- case x: {
293
- var A = o, te = A._payload, oe = A._init;
290
+ case v:
291
+ return Fe(o.type, x, L);
292
+ case y: {
293
+ var _ = o, te = _._payload, oe = _._init;
294
294
  try {
295
- return Fe(oe(te), w, L);
295
+ return Fe(oe(te), x, L);
296
296
  } catch {
297
297
  }
298
298
  }
299
299
  }
300
300
  return "";
301
301
  }
302
- var pe = Object.prototype.hasOwnProperty, et = {}, Ae = M.ReactDebugCurrentFrame;
302
+ var pe = Object.prototype.hasOwnProperty, et = {}, _e = M.ReactDebugCurrentFrame;
303
303
  function Xe(o) {
304
304
  if (o) {
305
- var w = o._owner, L = Fe(o.type, o._source, w ? w.type : null);
306
- Ae.setExtraStackFrame(L);
305
+ var x = o._owner, L = Fe(o.type, o._source, x ? x.type : null);
306
+ _e.setExtraStackFrame(L);
307
307
  } else
308
- Ae.setExtraStackFrame(null);
308
+ _e.setExtraStackFrame(null);
309
309
  }
310
- function Ue(o, w, L, A, te) {
310
+ function Ue(o, x, L, _, te) {
311
311
  {
312
312
  var oe = Function.call.bind(pe);
313
- for (var Z in o)
314
- if (oe(o, Z)) {
315
- var J = void 0;
313
+ for (var Q in o)
314
+ if (oe(o, Q)) {
315
+ var K = void 0;
316
316
  try {
317
- if (typeof o[Z] != "function") {
318
- var Re = Error((A || "React class") + ": " + L + " type `" + Z + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[Z] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
317
+ if (typeof o[Q] != "function") {
318
+ var Re = Error((_ || "React class") + ": " + L + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
319
319
  throw Re.name = "Invariant Violation", Re;
320
320
  }
321
- J = o[Z](w, Z, A, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
322
- } catch (ye) {
323
- J = ye;
321
+ K = o[Q](x, Q, _, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
322
+ } catch (we) {
323
+ K = we;
324
324
  }
325
- J && !(J instanceof Error) && (Xe(te), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", A || "React class", L, Z, typeof J), Xe(null)), J instanceof Error && !(J.message in et) && (et[J.message] = !0, Xe(te), v("Failed %s type: %s", L, J.message), Xe(null));
325
+ K && !(K instanceof Error) && (Xe(te), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _ || "React class", L, Q, typeof K), Xe(null)), K instanceof Error && !(K.message in et) && (et[K.message] = !0, Xe(te), S("Failed %s type: %s", L, K.message), Xe(null));
326
326
  }
327
327
  }
328
328
  }
@@ -332,7 +332,7 @@ function cn() {
332
332
  }
333
333
  function g(o) {
334
334
  {
335
- var w = typeof Symbol == "function" && Symbol.toStringTag, L = w && o[Symbol.toStringTag] || o.constructor.name || "Object";
335
+ var x = typeof Symbol == "function" && Symbol.toStringTag, L = x && o[Symbol.toStringTag] || o.constructor.name || "Object";
336
336
  return L;
337
337
  }
338
338
  }
@@ -348,7 +348,7 @@ function cn() {
348
348
  }
349
349
  function U(o) {
350
350
  if (D(o))
351
- return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", g(o)), f(o);
351
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", g(o)), f(o);
352
352
  }
353
353
  var q = M.ReactCurrentOwner, ee = {
354
354
  key: !0,
@@ -358,27 +358,27 @@ function cn() {
358
358
  }, ie, $e;
359
359
  function ze(o) {
360
360
  if (pe.call(o, "ref")) {
361
- var w = Object.getOwnPropertyDescriptor(o, "ref").get;
362
- if (w && w.isReactWarning)
361
+ var x = Object.getOwnPropertyDescriptor(o, "ref").get;
362
+ if (x && x.isReactWarning)
363
363
  return !1;
364
364
  }
365
365
  return o.ref !== void 0;
366
366
  }
367
367
  function ge(o) {
368
368
  if (pe.call(o, "key")) {
369
- var w = Object.getOwnPropertyDescriptor(o, "key").get;
370
- if (w && w.isReactWarning)
369
+ var x = Object.getOwnPropertyDescriptor(o, "key").get;
370
+ if (x && x.isReactWarning)
371
371
  return !1;
372
372
  }
373
373
  return o.key !== void 0;
374
374
  }
375
- function tt(o, w) {
375
+ function tt(o, x) {
376
376
  typeof o.ref == "string" && q.current;
377
377
  }
378
- function Ke(o, w) {
378
+ function Ke(o, x) {
379
379
  {
380
380
  var L = function() {
381
- ie || (ie = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", w));
381
+ ie || (ie = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
382
382
  };
383
383
  L.isReactWarning = !0, Object.defineProperty(o, "key", {
384
384
  get: L,
@@ -386,10 +386,10 @@ function cn() {
386
386
  });
387
387
  }
388
388
  }
389
- function st(o, w) {
389
+ function st(o, x) {
390
390
  {
391
391
  var L = function() {
392
- $e || ($e = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", w));
392
+ $e || ($e = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
393
393
  };
394
394
  L.isReactWarning = !0, Object.defineProperty(o, "ref", {
395
395
  get: L,
@@ -397,60 +397,60 @@ function cn() {
397
397
  });
398
398
  }
399
399
  }
400
- var Ce = function(o, w, L, A, te, oe, Z) {
401
- var J = {
400
+ var Ce = function(o, x, L, _, te, oe, Q) {
401
+ var K = {
402
402
  // This tag allows us to uniquely identify this as a React Element
403
403
  $$typeof: a,
404
404
  // Built-in properties that belong on the element
405
405
  type: o,
406
- key: w,
406
+ key: x,
407
407
  ref: L,
408
- props: Z,
408
+ props: Q,
409
409
  // Record the component responsible for creating this element.
410
410
  _owner: oe
411
411
  };
412
- return J._store = {}, Object.defineProperty(J._store, "validated", {
412
+ return K._store = {}, Object.defineProperty(K._store, "validated", {
413
413
  configurable: !1,
414
414
  enumerable: !1,
415
415
  writable: !0,
416
416
  value: !1
417
- }), Object.defineProperty(J, "_self", {
417
+ }), Object.defineProperty(K, "_self", {
418
418
  configurable: !1,
419
419
  enumerable: !1,
420
420
  writable: !1,
421
- value: A
422
- }), Object.defineProperty(J, "_source", {
421
+ value: _
422
+ }), Object.defineProperty(K, "_source", {
423
423
  configurable: !1,
424
424
  enumerable: !1,
425
425
  writable: !1,
426
426
  value: te
427
- }), Object.freeze && (Object.freeze(J.props), Object.freeze(J)), J;
427
+ }), Object.freeze && (Object.freeze(K.props), Object.freeze(K)), K;
428
428
  };
429
- function ht(o, w, L, A, te) {
429
+ function ht(o, x, L, _, te) {
430
430
  {
431
- var oe, Z = {}, J = null, Re = null;
432
- L !== void 0 && (U(L), J = "" + L), ge(w) && (U(w.key), J = "" + w.key), ze(w) && (Re = w.ref, tt(w, te));
433
- for (oe in w)
434
- pe.call(w, oe) && !ee.hasOwnProperty(oe) && (Z[oe] = w[oe]);
431
+ var oe, Q = {}, K = null, Re = null;
432
+ L !== void 0 && (U(L), K = "" + L), ge(x) && (U(x.key), K = "" + x.key), ze(x) && (Re = x.ref, tt(x, te));
433
+ for (oe in x)
434
+ pe.call(x, oe) && !ee.hasOwnProperty(oe) && (Q[oe] = x[oe]);
435
435
  if (o && o.defaultProps) {
436
- var ye = o.defaultProps;
437
- for (oe in ye)
438
- Z[oe] === void 0 && (Z[oe] = ye[oe]);
436
+ var we = o.defaultProps;
437
+ for (oe in we)
438
+ Q[oe] === void 0 && (Q[oe] = we[oe]);
439
439
  }
440
- if (J || Re) {
441
- var we = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
442
- J && Ke(Z, we), Re && st(Z, we);
440
+ if (K || Re) {
441
+ var be = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
442
+ K && Ke(Q, be), Re && st(Q, be);
443
443
  }
444
- return Ce(o, J, Re, te, A, q.current, Z);
444
+ return Ce(o, K, Re, te, _, q.current, Q);
445
445
  }
446
446
  }
447
- var yt = M.ReactCurrentOwner, kt = M.ReactDebugCurrentFrame;
447
+ var xt = M.ReactCurrentOwner, Ot = M.ReactDebugCurrentFrame;
448
448
  function qe(o) {
449
449
  if (o) {
450
- var w = o._owner, L = Fe(o.type, o._source, w ? w.type : null);
451
- kt.setExtraStackFrame(L);
450
+ var x = o._owner, L = Fe(o.type, o._source, x ? x.type : null);
451
+ Ot.setExtraStackFrame(L);
452
452
  } else
453
- kt.setExtraStackFrame(null);
453
+ Ot.setExtraStackFrame(null);
454
454
  }
455
455
  var it;
456
456
  it = !1;
@@ -459,8 +459,8 @@ function cn() {
459
459
  }
460
460
  function Tt() {
461
461
  {
462
- if (yt.current) {
463
- var o = B(yt.current.type);
462
+ if (xt.current) {
463
+ var o = B(xt.current.type);
464
464
  if (o)
465
465
  return `
466
466
 
@@ -475,120 +475,120 @@ Check the render method of \`` + o + "`.";
475
475
  var Dt = {};
476
476
  function Mt(o) {
477
477
  {
478
- var w = Tt();
479
- if (!w) {
478
+ var x = Tt();
479
+ if (!x) {
480
480
  var L = typeof o == "string" ? o : o.displayName || o.name;
481
- L && (w = `
481
+ L && (x = `
482
482
 
483
483
  Check the top-level render call using <` + L + ">.");
484
484
  }
485
- return w;
485
+ return x;
486
486
  }
487
487
  }
488
- function Ot(o, w) {
488
+ function kt(o, x) {
489
489
  {
490
490
  if (!o._store || o._store.validated || o.key != null)
491
491
  return;
492
492
  o._store.validated = !0;
493
- var L = Mt(w);
493
+ var L = Mt(x);
494
494
  if (Dt[L])
495
495
  return;
496
496
  Dt[L] = !0;
497
- var A = "";
498
- o && o._owner && o._owner !== yt.current && (A = " It was passed a child from " + B(o._owner.type) + "."), qe(o), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, A), qe(null);
497
+ var _ = "";
498
+ o && o._owner && o._owner !== xt.current && (_ = " It was passed a child from " + B(o._owner.type) + "."), qe(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, _), qe(null);
499
499
  }
500
500
  }
501
- function Et(o, w) {
501
+ function Et(o, x) {
502
502
  {
503
503
  if (typeof o != "object")
504
504
  return;
505
505
  if (l(o))
506
506
  for (var L = 0; L < o.length; L++) {
507
- var A = o[L];
508
- wt(A) && Ot(A, w);
507
+ var _ = o[L];
508
+ wt(_) && kt(_, x);
509
509
  }
510
510
  else if (wt(o))
511
511
  o._store && (o._store.validated = !0);
512
512
  else if (o) {
513
513
  var te = N(o);
514
514
  if (typeof te == "function" && te !== o.entries)
515
- for (var oe = te.call(o), Z; !(Z = oe.next()).done; )
516
- wt(Z.value) && Ot(Z.value, w);
515
+ for (var oe = te.call(o), Q; !(Q = oe.next()).done; )
516
+ wt(Q.value) && kt(Q.value, x);
517
517
  }
518
518
  }
519
519
  }
520
520
  function lt(o) {
521
521
  {
522
- var w = o.type;
523
- if (w == null || typeof w == "string")
522
+ var x = o.type;
523
+ if (x == null || typeof x == "string")
524
524
  return;
525
525
  var L;
526
- if (typeof w == "function")
527
- L = w.propTypes;
528
- else if (typeof w == "object" && (w.$$typeof === d || // Note: Memo only checks outer props here.
526
+ if (typeof x == "function")
527
+ L = x.propTypes;
528
+ else if (typeof x == "object" && (x.$$typeof === d || // Note: Memo only checks outer props here.
529
529
  // Inner props are checked in the reconciler.
530
- w.$$typeof === S))
531
- L = w.propTypes;
530
+ x.$$typeof === v))
531
+ L = x.propTypes;
532
532
  else
533
533
  return;
534
534
  if (L) {
535
- var A = B(w);
536
- Ue(L, o.props, "prop", A, o);
537
- } else if (w.PropTypes !== void 0 && !it) {
535
+ var _ = B(x);
536
+ Ue(L, o.props, "prop", _, o);
537
+ } else if (x.PropTypes !== void 0 && !it) {
538
538
  it = !0;
539
- var te = B(w);
540
- v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", te || "Unknown");
539
+ var te = B(x);
540
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", te || "Unknown");
541
541
  }
542
- typeof w.getDefaultProps == "function" && !w.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
542
+ typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
543
543
  }
544
544
  }
545
545
  function $t(o) {
546
546
  {
547
- for (var w = Object.keys(o.props), L = 0; L < w.length; L++) {
548
- var A = w[L];
549
- if (A !== "children" && A !== "key") {
550
- qe(o), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", A), qe(null);
547
+ for (var x = Object.keys(o.props), L = 0; L < x.length; L++) {
548
+ var _ = x[L];
549
+ if (_ !== "children" && _ !== "key") {
550
+ qe(o), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), qe(null);
551
551
  break;
552
552
  }
553
553
  }
554
- o.ref !== null && (qe(o), v("Invalid attribute `ref` supplied to `React.Fragment`."), qe(null));
554
+ o.ref !== null && (qe(o), S("Invalid attribute `ref` supplied to `React.Fragment`."), qe(null));
555
555
  }
556
556
  }
557
557
  var Bt = {};
558
- function _e(o, w, L, A, te, oe) {
558
+ function Ae(o, x, L, _, te, oe) {
559
559
  {
560
- var Z = X(o);
561
- if (!Z) {
562
- var J = "";
563
- (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (J += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
560
+ var Q = X(o);
561
+ if (!Q) {
562
+ var K = "";
563
+ (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (K += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
564
564
  var Re = zt();
565
- Re ? J += Re : J += Tt();
566
- var ye;
567
- o === null ? ye = "null" : l(o) ? ye = "array" : o !== void 0 && o.$$typeof === a ? (ye = "<" + (B(o.type) || "Unknown") + " />", J = " Did you accidentally export a JSX literal instead of a component?") : ye = typeof o, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ye, J);
565
+ Re ? K += Re : K += Tt();
566
+ var we;
567
+ o === null ? we = "null" : l(o) ? we = "array" : o !== void 0 && o.$$typeof === a ? (we = "<" + (B(o.type) || "Unknown") + " />", K = " Did you accidentally export a JSX literal instead of a component?") : we = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", we, K);
568
568
  }
569
- var we = ht(o, w, L, te, oe);
570
- if (we == null)
571
- return we;
572
- if (Z) {
573
- var Be = w.children;
569
+ var be = ht(o, x, L, te, oe);
570
+ if (be == null)
571
+ return be;
572
+ if (Q) {
573
+ var Be = x.children;
574
574
  if (Be !== void 0)
575
- if (A)
575
+ if (_)
576
576
  if (l(Be)) {
577
577
  for (var Ge = 0; Ge < Be.length; Ge++)
578
578
  Et(Be[Ge], o);
579
579
  Object.freeze && Object.freeze(Be);
580
580
  } else
581
- v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
581
+ S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
582
582
  else
583
583
  Et(Be, o);
584
584
  }
585
- if (pe.call(w, "key")) {
586
- var Ze = B(o), Ne = Object.keys(w).filter(function(Ut) {
585
+ if (pe.call(x, "key")) {
586
+ var Ze = B(o), Ne = Object.keys(x).filter(function(Ut) {
587
587
  return Ut !== "key";
588
588
  }), bt = Ne.length > 0 ? "{key: someKey, " + Ne.join(": ..., ") + ": ...}" : "{key: someKey}";
589
589
  if (!Bt[Ze + bt]) {
590
590
  var Xt = Ne.length > 0 ? "{" + Ne.join(": ..., ") + ": ...}" : "{}";
591
- v(`A props object containing a "key" prop is being spread into JSX:
591
+ S(`A props object containing a "key" prop is being spread into JSX:
592
592
  let props = %s;
593
593
  <%s {...props} />
594
594
  React keys must be passed directly to JSX without using spread:
@@ -596,14 +596,14 @@ React keys must be passed directly to JSX without using spread:
596
596
  <%s key={someKey} {...props} />`, bt, Ze, Xt, Ze), Bt[Ze + bt] = !0;
597
597
  }
598
598
  }
599
- return o === s ? $t(we) : lt(we), we;
599
+ return o === s ? $t(be) : lt(be), be;
600
600
  }
601
601
  }
602
- function Ht(o, w, L) {
603
- return _e(o, w, L, !0);
602
+ function Ht(o, x, L) {
603
+ return Ae(o, x, L, !0);
604
604
  }
605
- function or(o, w, L) {
606
- return _e(o, w, L, !1);
605
+ function or(o, x, L) {
606
+ return Ae(o, x, L, !1);
607
607
  }
608
608
  var Wt = or, Vt = Ht;
609
609
  Rt.Fragment = s, Rt.jsx = Wt, Rt.jsxs = Vt;
@@ -614,7 +614,7 @@ function un() {
614
614
  return hr || (hr = 1, process.env.NODE_ENV === "production" ? Yt.exports = dn() : Yt.exports = cn()), Yt.exports;
615
615
  }
616
616
  var t = un();
617
- const je = (e, a, n) => {
617
+ const Te = (e, a, n) => {
618
618
  const s = new Date(e);
619
619
  switch (n) {
620
620
  case "hour":
@@ -643,7 +643,7 @@ const je = (e, a, n) => {
643
643
  }, pn = (e, a) => {
644
644
  const n = a.getTime() - e.getTime();
645
645
  return Math.ceil(n / (1e3 * 60 * 60));
646
- }, ke = (e, a) => {
646
+ }, Oe = (e, a) => {
647
647
  const n = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], s = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], r = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], c = {
648
648
  YYYY: e.getFullYear().toString(),
649
649
  YY: e.getFullYear().toString().slice(-2),
@@ -665,7 +665,7 @@ const je = (e, a, n) => {
665
665
  return a === 0 || a === 6;
666
666
  }, Zt = (e, a) => a.some(
667
667
  (n) => n.getFullYear() === e.getFullYear() && n.getMonth() === e.getMonth() && n.getDate() === e.getDate()
668
- ), xt = (e) => {
668
+ ), yt = (e) => {
669
669
  const a = new Date(e);
670
670
  return a.setHours(0, 0, 0, 0), a;
671
671
  }, la = (e) => {
@@ -837,7 +837,7 @@ const jt = (e) => e ? {
837
837
  lineHeight: e.lineHeight || 1.5714285714285714,
838
838
  color: e.fontColor || "rgba(0, 0, 0, 0.88)"
839
839
  }
840
- } : {}, { Text: We, Paragraph: gn } = br, { Option: dt } = Oe, xn = ({
840
+ } : {}, { Text: We, Paragraph: gn } = br, { Option: dt } = ke, yn = ({
841
841
  task: e,
842
842
  allTasks: a,
843
843
  links: n,
@@ -847,39 +847,39 @@ const jt = (e) => e ? {
847
847
  children: b,
848
848
  styleConfig: u
849
849
  }) => {
850
- const d = jt(u), [p, h] = G(!1), [S, x] = G(null), [m, E] = G("e2s"), [R, N] = G("lag"), [M, v] = G(0), [y, C] = G(e.duration), [K, W] = G(!0), re = "day", le = n.find((V) => V.target === e.id), j = !!le, X = _.useMemo(() => a.length === 0 ? /* @__PURE__ */ new Date() : new Date(Math.min(...a.map((V) => V.start.getTime()))), [a]), F = () => {
851
- if (S) {
852
- const V = R === "lag" ? M : -M, I = rr(V, re);
853
- if (y !== e.duration && c) {
854
- const ne = je(new Date(e.start), y, "day");
850
+ const d = jt(u), [p, h] = G(!1), [v, y] = G(null), [m, E] = G("e2s"), [F, N] = G("lag"), [M, S] = G(0), [w, C] = G(e.duration), [Z, W] = G(!0), re = "day", le = n.find((V) => V.target === e.id), j = !!le, X = A.useMemo(() => a.length === 0 ? /* @__PURE__ */ new Date() : new Date(Math.min(...a.map((V) => V.start.getTime()))), [a]), R = () => {
851
+ if (v) {
852
+ const V = F === "lag" ? M : -M, I = rr(V, re);
853
+ if (w !== e.duration && c) {
854
+ const ne = Te(new Date(e.start), w, "day");
855
855
  c({
856
856
  ...e,
857
- duration: y,
857
+ duration: w,
858
858
  end: ne
859
859
  });
860
860
  }
861
- s(S, e.id, m, I), h(!1), k();
861
+ s(v, e.id, m, I), h(!1), O();
862
862
  }
863
- }, k = () => {
864
- x(null), E("e2s"), N("lag"), v(0), C(e.duration);
863
+ }, O = () => {
864
+ y(null), E("e2s"), N("lag"), S(0), C(e.duration);
865
865
  }, B = () => {
866
- le && r && (r(le.id), h(!1), k());
866
+ le && r && (r(le.id), h(!1), O());
867
867
  }, Y = (V) => {
868
868
  if (h(V), V) {
869
869
  if (W(!0), le) {
870
- x(le.source), E(le.type);
870
+ y(le.source), E(le.type);
871
871
  const I = le.lag || 0;
872
- I >= 0 ? (N("lag"), v(I)) : (N("lead"), v(Math.abs(I)));
872
+ I >= 0 ? (N("lag"), S(I)) : (N("lead"), S(Math.abs(I)));
873
873
  } else
874
- k();
874
+ O();
875
875
  C(e.duration);
876
876
  }
877
- }, O = () => {
878
- if (!K) return null;
877
+ }, k = () => {
878
+ if (!Z) return null;
879
879
  const V = m === "e2s", I = m === "s2s", ne = m === "e2e", de = m === "s2e";
880
- let se = 0, ue = 0, z = "", xe = 0, Ee = -1;
881
- V ? (se = 50, ue = 350, xe = 250, Ee = 350, z = "M 250 60 L 300 60 L 300 140 L 348 140") : ne ? (se = 100, ue = 100, xe = 300, Ee = -1, z = "M 300 60 L 350 60 L 350 140 L 302 140") : I ? (se = 250, ue = 250, xe = 250, Ee = -1, z = "M 250 60 L 200 60 L 200 140 L 248 140") : de && (se = 350, ue = 50, xe = 350, Ee = 250, z = "M 350 60 L 300 60 L 300 140 L 252 140");
882
- const Ie = S === "gantt-start-date", Ye = a.find(($) => $.id === S);
880
+ let se = 0, ue = 0, z = "", ye = 0, Le = -1;
881
+ V ? (se = 50, ue = 350, ye = 250, Le = 350, z = "M 250 60 L 300 60 L 300 140 L 348 140") : ne ? (se = 100, ue = 100, ye = 300, Le = -1, z = "M 300 60 L 350 60 L 350 140 L 302 140") : I ? (se = 250, ue = 250, ye = 250, Le = -1, z = "M 250 60 L 200 60 L 200 140 L 248 140") : de && (se = 350, ue = 50, ye = 350, Le = 250, z = "M 350 60 L 300 60 L 300 140 L 252 140");
882
+ const Ie = v === "gantt-start-date", Ye = a.find(($) => $.id === v);
883
883
  return /* @__PURE__ */ t.jsx("div", { style: {
884
884
  width: "100%",
885
885
  height: 90,
@@ -892,8 +892,8 @@ const jt = (e) => e ? {
892
892
  flexShrink: 0
893
893
  }, children: /* @__PURE__ */ t.jsxs("svg", { viewBox: "0 0 600 200", style: { width: "100%", height: "100%" }, preserveAspectRatio: "xMidYMid meet", children: [
894
894
  /* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsx("marker", { id: "arrowhead", markerWidth: "12", markerHeight: "9", refX: "12", refY: "4.5", orient: "auto", children: /* @__PURE__ */ t.jsx("polygon", { points: "0 0, 12 4.5, 0 9", fill: "#8c8c8c" }) }) }),
895
- /* @__PURE__ */ t.jsx("line", { x1: xe, x2: xe, y1: "0", y2: "200", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
896
- Ee !== -1 && /* @__PURE__ */ t.jsx("line", { x1: Ee, x2: Ee, y1: "0", y2: "200", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
895
+ /* @__PURE__ */ t.jsx("line", { x1: ye, x2: ye, y1: "0", y2: "200", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
896
+ Le !== -1 && /* @__PURE__ */ t.jsx("line", { x1: Le, x2: Le, y1: "0", y2: "200", stroke: "#f0f0f0", strokeDasharray: "3,3" }),
897
897
  /* @__PURE__ */ t.jsx("rect", { x: se, y: "35", width: "200", height: "50", rx: "4", fill: "#e6f4ff", stroke: "#91caff", strokeWidth: "2" }),
898
898
  /* @__PURE__ */ t.jsx("text", { x: se + 100, y: "66", fontSize: "15", textAnchor: "middle", fill: "#003a8c", fontWeight: "600", children: Ie ? "Start Date" : Ye ? `Stage ${a.indexOf(Ye) + 1}` : "Predecessor" }),
899
899
  /* @__PURE__ */ t.jsx("rect", { x: ue, y: "115", width: "200", height: "50", rx: "4", fill: "#e6f4ff", stroke: "#91caff", strokeWidth: "2" }),
@@ -903,9 +903,9 @@ const jt = (e) => e ? {
903
903
  ] }),
904
904
  /* @__PURE__ */ t.jsx("path", { d: z, fill: "none", stroke: "#8c8c8c", strokeWidth: "2.5", markerEnd: "url(#arrowhead)" })
905
905
  ] }) });
906
- }, Me = () => {
907
- const V = S === "gantt-start-date", I = a.find((ue) => ue.id === S);
908
- if (!S) return "Select a checklist from the list to see how it will relate to the current stage.";
906
+ }, De = () => {
907
+ const V = v === "gantt-start-date", I = a.find((ue) => ue.id === v);
908
+ if (!v) return "Select a checklist from the list to see how it will relate to the current stage.";
909
909
  const ne = a.indexOf(e) + 1, de = V ? "Start Date" : `Stage ${a.indexOf(I) + 1}`;
910
910
  let se = "";
911
911
  switch (m) {
@@ -924,10 +924,10 @@ const jt = (e) => e ? {
924
924
  }
925
925
  if (M > 0) {
926
926
  const ue = `${M} ${re}${M > 1 ? "s" : ""}`;
927
- R === "lag" ? se += ` + ${ue} delay` : se += ` - ${ue} overlap`;
927
+ F === "lag" ? se += ` + ${ue} delay` : se += ` - ${ue} overlap`;
928
928
  }
929
929
  return se + ".";
930
- }, be = /* @__PURE__ */ t.jsxs("div", { style: {
930
+ }, Se = /* @__PURE__ */ t.jsxs("div", { style: {
931
931
  width: 550,
932
932
  backgroundColor: d.popover?.backgroundColor || "#fff",
933
933
  borderRadius: d.popover?.borderRadius || "8px",
@@ -938,12 +938,12 @@ const jt = (e) => e ? {
938
938
  /* @__PURE__ */ t.jsx(We, { strong: !0, style: { fontSize: "16px", display: "block", marginBottom: 16, color: d.font?.color }, children: "Add Dependency" }),
939
939
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 12, marginBottom: 14 }, children: [
940
940
  /* @__PURE__ */ t.jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(
941
- Oe,
941
+ ke,
942
942
  {
943
943
  showSearch: !0,
944
944
  placeholder: "Select checklist",
945
- value: S,
946
- onChange: x,
945
+ value: v,
946
+ onChange: y,
947
947
  style: { width: "100%" },
948
948
  filterOption: (V, I) => {
949
949
  if (I?.value === "gantt-start-date")
@@ -963,18 +963,18 @@ const jt = (e) => e ? {
963
963
  ] }),
964
964
  /* @__PURE__ */ t.jsxs(We, { type: "secondary", style: { fontSize: "11px" }, children: [
965
965
  "Start: ",
966
- ke(V.start, "MMM D, YYYY")
966
+ Oe(V.start, "MMM D, YYYY")
967
967
  ] })
968
968
  ] }) }, V.id)),
969
969
  /* @__PURE__ */ t.jsx(dt, { value: "gantt-start-date", label: "Start Date", children: /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", flexDirection: "column", padding: "4px 0", borderTop: "1px solid #f0f0f0", marginTop: "4px", paddingTop: "8px" }, children: [
970
970
  /* @__PURE__ */ t.jsx(We, { style: { fontSize: "13px", fontWeight: 600 }, children: "Start Date" }),
971
- /* @__PURE__ */ t.jsx(We, { type: "secondary", style: { fontSize: "11px" }, children: ke(X, "MMM D, YYYY") })
971
+ /* @__PURE__ */ t.jsx(We, { type: "secondary", style: { fontSize: "11px" }, children: Oe(X, "MMM D, YYYY") })
972
972
  ] }) }, "gantt-start-date")
973
973
  ]
974
974
  }
975
975
  ) }),
976
976
  /* @__PURE__ */ t.jsx("div", { style: { width: 100 }, children: /* @__PURE__ */ t.jsxs(
977
- Oe,
977
+ ke,
978
978
  {
979
979
  value: m,
980
980
  onChange: E,
@@ -992,9 +992,9 @@ const jt = (e) => e ? {
992
992
  /* @__PURE__ */ t.jsxs("div", { style: { flex: 1 }, children: [
993
993
  /* @__PURE__ */ t.jsx(We, { style: { fontSize: "12px", display: "block", marginBottom: 6, color: d.font?.color }, children: "Delay type" }),
994
994
  /* @__PURE__ */ t.jsxs(
995
- Oe,
995
+ ke,
996
996
  {
997
- value: R,
997
+ value: F,
998
998
  onChange: N,
999
999
  style: { width: "100%" },
1000
1000
  children: [
@@ -1011,7 +1011,7 @@ const jt = (e) => e ? {
1011
1011
  {
1012
1012
  min: 0,
1013
1013
  value: M,
1014
- onChange: (V) => v(V || 0),
1014
+ onChange: (V) => S(V || 0),
1015
1015
  style: { width: "100%" },
1016
1016
  placeholder: "0"
1017
1017
  }
@@ -1024,7 +1024,7 @@ const jt = (e) => e ? {
1024
1024
  at,
1025
1025
  {
1026
1026
  min: 1,
1027
- value: y,
1027
+ value: w,
1028
1028
  onChange: (V) => C(V || 1),
1029
1029
  style: { width: "100%" },
1030
1030
  placeholder: "Duration"
@@ -1047,25 +1047,25 @@ const jt = (e) => e ? {
1047
1047
  /* @__PURE__ */ t.jsx(
1048
1048
  "a",
1049
1049
  {
1050
- onClick: () => W(!K),
1050
+ onClick: () => W(!Z),
1051
1051
  style: {
1052
1052
  fontSize: "12px",
1053
1053
  color: "#1890ff",
1054
1054
  cursor: "pointer",
1055
1055
  textDecoration: "none"
1056
1056
  },
1057
- children: K ? "Hide preview" : "Show preview"
1057
+ children: Z ? "Hide preview" : "Show preview"
1058
1058
  }
1059
1059
  )
1060
1060
  ] }),
1061
- K && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1062
- O(),
1061
+ Z && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1062
+ k(),
1063
1063
  /* @__PURE__ */ t.jsx(gn, { style: {
1064
1064
  fontSize: "12px",
1065
1065
  color: d.font?.color || "#262626",
1066
1066
  marginBottom: 14,
1067
1067
  lineHeight: "1.5"
1068
- }, children: Me() })
1068
+ }, children: De() })
1069
1069
  ] }),
1070
1070
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", gap: 10 }, children: [
1071
1071
  j && /* @__PURE__ */ t.jsx(
@@ -1083,8 +1083,8 @@ const jt = (e) => e ? {
1083
1083
  Pe,
1084
1084
  {
1085
1085
  type: "primary",
1086
- onClick: F,
1087
- disabled: !S,
1086
+ onClick: R,
1087
+ disabled: !v,
1088
1088
  style: {
1089
1089
  ...d.buttonPrimary,
1090
1090
  minWidth: 100
@@ -1097,7 +1097,7 @@ const jt = (e) => e ? {
1097
1097
  return /* @__PURE__ */ t.jsx(
1098
1098
  zr,
1099
1099
  {
1100
- content: be,
1100
+ content: Se,
1101
1101
  trigger: "click",
1102
1102
  open: p,
1103
1103
  onOpenChange: Y,
@@ -1108,61 +1108,61 @@ const jt = (e) => e ? {
1108
1108
  }
1109
1109
  );
1110
1110
  }, Er = Ir(wr(
1111
- ({ tasks: e, allTasks: a = [], columns: n, selectedTask: s, onTaskClick: r, onTaskContextMenu: c, onTaskUpdate: b, onTaskDragStart: u, onAddTask: d, onAddDependency: p, onRemoveDependency: h, links: S = [], dropIndicator: x, reorderTask: m, styleConfig: E, headerHeight: R }, N) => {
1112
- const M = _.useRef(null);
1113
- _.useImperativeHandle(N, () => M.current);
1114
- const [v, y] = _.useState(null), [C, K] = _.useState(0), W = (j, X = 0) => {
1111
+ ({ tasks: e, allTasks: a = [], columns: n, selectedTask: s, onTaskClick: r, onTaskContextMenu: c, onTaskUpdate: b, onTaskDragStart: u, onAddTask: d, onAddDependency: p, onRemoveDependency: h, links: v = [], dropIndicator: y, reorderTask: m, styleConfig: E, headerHeight: F }, N) => {
1112
+ const M = A.useRef(null);
1113
+ A.useImperativeHandle(N, () => M.current);
1114
+ const [S, w] = A.useState(null), [C, Z] = A.useState(0), W = (j, X = 0) => {
1115
1115
  if (!j.parent) return X;
1116
- const F = e.find((k) => k.id === j.parent);
1117
- return F ? W(F, X + 1) : X;
1116
+ const R = e.find((O) => O.id === j.parent);
1117
+ return R ? W(R, X + 1) : X;
1118
1118
  }, re = (j, X) => {
1119
1119
  if (X === j.duration) return;
1120
- const F = je(new Date(j.start), X, "day");
1120
+ const R = Te(new Date(j.start), X, "day");
1121
1121
  b?.({
1122
1122
  ...j,
1123
1123
  duration: X,
1124
- end: F
1124
+ end: R
1125
1125
  });
1126
1126
  }, le = (j, X) => {
1127
1127
  if (X.template)
1128
1128
  return X.template(j);
1129
1129
  switch (X.name) {
1130
1130
  case "text": {
1131
- const F = W(j);
1132
- return /* @__PURE__ */ t.jsxs("div", { className: "gantt-grid-cell-text", style: { paddingLeft: F * 14 }, children: [
1131
+ const R = W(j);
1132
+ return /* @__PURE__ */ t.jsxs("div", { className: "gantt-grid-cell-text", style: { paddingLeft: R * 14 }, children: [
1133
1133
  /* @__PURE__ */ t.jsx(
1134
1134
  "div",
1135
1135
  {
1136
1136
  className: "gantt-row-drag-handle",
1137
- onMouseDown: (k) => {
1138
- k.preventDefault(), u?.(j.id, k.clientX, k.clientY, "reorder");
1137
+ onMouseDown: (O) => {
1138
+ O.preventDefault(), u?.(j.id, O.clientX, O.clientY, "reorder");
1139
1139
  },
1140
- children: /* @__PURE__ */ t.jsx(De, { icon: Xr })
1140
+ children: /* @__PURE__ */ t.jsx(Ee, { icon: Xr })
1141
1141
  }
1142
1142
  ),
1143
- j.type === "project" ? /* @__PURE__ */ t.jsx("span", { className: "gantt-tree-icon", onClick: (k) => {
1144
- k.stopPropagation(), b?.({ ...j, open: !j.open });
1145
- }, children: /* @__PURE__ */ t.jsx(De, { icon: j.open ? cr : Ur }) }) : /* @__PURE__ */ t.jsx("span", { style: { width: 16, display: "inline-block" } }),
1143
+ j.type === "project" ? /* @__PURE__ */ t.jsx("span", { className: "gantt-tree-icon", onClick: (O) => {
1144
+ O.stopPropagation(), b?.({ ...j, open: !j.open });
1145
+ }, children: /* @__PURE__ */ t.jsx(Ee, { icon: j.open ? cr : Ur }) }) : /* @__PURE__ */ t.jsx("span", { style: { width: 16, display: "inline-block" } }),
1146
1146
  /* @__PURE__ */ t.jsx("span", { className: "gantt-task-name-text", children: j.text })
1147
1147
  ] });
1148
1148
  }
1149
1149
  case "start":
1150
- return ke(j.start, "DD-MM-YYYY");
1150
+ return Oe(j.start, "DD-MM-YYYY");
1151
1151
  case "end":
1152
- return ke(j.end, "DD-MM-YYYY");
1152
+ return Oe(j.end, "DD-MM-YYYY");
1153
1153
  case "duration":
1154
- return v === j.id ? /* @__PURE__ */ t.jsx(
1154
+ return S === j.id ? /* @__PURE__ */ t.jsx(
1155
1155
  at,
1156
1156
  {
1157
1157
  size: "small",
1158
1158
  min: 1,
1159
1159
  value: C,
1160
- onChange: (k) => K(k || 1),
1160
+ onChange: (O) => Z(O || 1),
1161
1161
  onBlur: () => {
1162
- re(j, C), y(null);
1162
+ re(j, C), w(null);
1163
1163
  },
1164
1164
  onPressEnter: () => {
1165
- re(j, C), y(null);
1165
+ re(j, C), w(null);
1166
1166
  },
1167
1167
  autoFocus: !0,
1168
1168
  style: { width: "100%", fontSize: "12px" }
@@ -1170,8 +1170,8 @@ const jt = (e) => e ? {
1170
1170
  ) : /* @__PURE__ */ t.jsxs(
1171
1171
  "div",
1172
1172
  {
1173
- onClick: (k) => {
1174
- k.stopPropagation(), y(j.id), K(j.duration);
1173
+ onClick: (O) => {
1174
+ O.stopPropagation(), w(j.id), Z(j.duration);
1175
1175
  },
1176
1176
  style: {
1177
1177
  backgroundColor: "#fff7e6",
@@ -1192,14 +1192,14 @@ const jt = (e) => e ? {
1192
1192
  }
1193
1193
  );
1194
1194
  case "predecessors": {
1195
- const k = S.filter((B) => B.target === j.id)[0];
1195
+ const O = v.filter((B) => B.target === j.id)[0];
1196
1196
  return /* @__PURE__ */ t.jsx(
1197
- xn,
1197
+ yn,
1198
1198
  {
1199
1199
  task: j,
1200
1200
  allTasks: a,
1201
- links: S,
1202
- onAddDependency: (B, Y, O, Me) => p?.(B, Y, O, Me),
1201
+ links: v,
1202
+ onAddDependency: (B, Y, k, De) => p?.(B, Y, k, De),
1203
1203
  onRemoveDependency: (B) => h?.(B),
1204
1204
  onTaskUpdate: b,
1205
1205
  styleConfig: E,
@@ -1214,8 +1214,8 @@ const jt = (e) => e ? {
1214
1214
  alignItems: "center",
1215
1215
  gap: "4px"
1216
1216
  },
1217
- children: k ? (() => {
1218
- const B = a.find((O) => O.id === k.source), Y = B ? a.indexOf(B) + 1 : 0;
1217
+ children: O ? (() => {
1218
+ const B = a.find((k) => k.id === O.source), Y = B ? a.indexOf(B) + 1 : 0;
1219
1219
  return /* @__PURE__ */ t.jsx(
1220
1220
  "span",
1221
1221
  {
@@ -1228,7 +1228,7 @@ const jt = (e) => e ? {
1228
1228
  borderRadius: "4px",
1229
1229
  whiteSpace: "nowrap"
1230
1230
  },
1231
- children: mn(k, Y)
1231
+ children: mn(O, Y)
1232
1232
  }
1233
1233
  );
1234
1234
  })() : /* @__PURE__ */ t.jsx(
@@ -1256,9 +1256,9 @@ const jt = (e) => e ? {
1256
1256
  {
1257
1257
  type: "primary",
1258
1258
  size: "small",
1259
- icon: /* @__PURE__ */ t.jsx(De, { icon: ar, style: { fontSize: 12 } }),
1260
- onClick: (F) => {
1261
- F.stopPropagation(), d?.(j.id);
1259
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: ar, style: { fontSize: 12 } }),
1260
+ onClick: (R) => {
1261
+ R.stopPropagation(), d?.(j.id);
1262
1262
  },
1263
1263
  title: "Add Subtask",
1264
1264
  style: {
@@ -1294,7 +1294,7 @@ const jt = (e) => e ? {
1294
1294
  }
1295
1295
  };
1296
1296
  return /* @__PURE__ */ t.jsxs("div", { className: "gantt-grid", ref: M, children: [
1297
- /* @__PURE__ */ t.jsx("div", { className: "gantt-grid-header", style: { display: "flex", minWidth: "100%", height: R }, children: n.map((j) => /* @__PURE__ */ t.jsx(
1297
+ /* @__PURE__ */ t.jsx("div", { className: "gantt-grid-header", style: { display: "flex", minWidth: "100%", height: F }, children: n.map((j) => /* @__PURE__ */ t.jsx(
1298
1298
  "div",
1299
1299
  {
1300
1300
  className: "gantt-grid-header-cell",
@@ -1306,50 +1306,50 @@ const jt = (e) => e ? {
1306
1306
  },
1307
1307
  children: j.name === "add" ? /* @__PURE__ */ t.jsx("span", { style: { fontSize: 11, color: "#64748b", fontWeight: 600, whiteSpace: "nowrap" }, children: "Add" }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1308
1308
  j.label,
1309
- j.name === "start" && /* @__PURE__ */ t.jsx(De, { icon: cr, style: { marginLeft: 8, fontSize: 10, color: "#64748b" } })
1309
+ j.name === "start" && /* @__PURE__ */ t.jsx(Ee, { icon: cr, style: { marginLeft: 8, fontSize: 10, color: "#64748b" } })
1310
1310
  ] })
1311
1311
  },
1312
1312
  j.name
1313
1313
  )) }),
1314
1314
  /* @__PURE__ */ t.jsx("div", { className: "gantt-grid-body", children: e.map((j) => {
1315
- const X = m?.id === j.id, F = m?.descendantIds.includes(j.id);
1315
+ const X = m?.id === j.id, R = m?.descendantIds.includes(j.id);
1316
1316
  return /* @__PURE__ */ t.jsxs(
1317
1317
  "div",
1318
1318
  {
1319
- className: `gantt-grid-row ${s === j.id ? "selected" : ""} ${X ? "dragging-row" : ""} ${F ? "descendant-dragging-row" : ""} ${x?.taskId === j.id ? `drop-target-${x.position}` : ""}`,
1319
+ className: `gantt-grid-row ${s === j.id ? "selected" : ""} ${X ? "dragging-row" : ""} ${R ? "descendant-dragging-row" : ""} ${y?.taskId === j.id ? `drop-target-${y.position}` : ""}`,
1320
1320
  onClick: () => r(j.id),
1321
- onContextMenu: (k) => c?.(k, j.id),
1321
+ onContextMenu: (O) => c?.(O, j.id),
1322
1322
  style: {
1323
1323
  display: "flex",
1324
1324
  minWidth: "100%"
1325
1325
  /* Ensure row spans all columns */
1326
1326
  },
1327
1327
  children: [
1328
- n.map((k) => {
1329
- const B = k.name === "add";
1328
+ n.map((O) => {
1329
+ const B = O.name === "add";
1330
1330
  return /* @__PURE__ */ t.jsx(
1331
1331
  "div",
1332
1332
  {
1333
1333
  className: "gantt-grid-cell",
1334
1334
  style: {
1335
- width: k.width,
1336
- minWidth: k.width,
1335
+ width: O.width,
1336
+ minWidth: O.width,
1337
1337
  /* Ensure column maintains width */
1338
- textAlign: k.align || "left",
1338
+ textAlign: O.align || "left",
1339
1339
  display: "flex",
1340
1340
  alignItems: "center",
1341
- justifyContent: B ? "center" : k.name === "text" ? "flex-start" : k.align === "center" ? "center" : k.align === "right" ? "flex-end" : "flex-start",
1341
+ justifyContent: B ? "center" : O.name === "text" ? "flex-start" : O.align === "center" ? "center" : O.align === "right" ? "flex-end" : "flex-start",
1342
1342
  visibility: "visible",
1343
1343
  /* Ensure column is visible */
1344
1344
  opacity: 1
1345
1345
  /* Ensure column is not transparent */
1346
1346
  },
1347
- children: le(j, k)
1347
+ children: le(j, O)
1348
1348
  },
1349
- `${j.id}-${k.name}`
1349
+ `${j.id}-${O.name}`
1350
1350
  );
1351
1351
  }),
1352
- x?.taskId === j.id && /* @__PURE__ */ t.jsx("div", { className: `gantt-drop-indicator ${x.position}` })
1352
+ y?.taskId === j.id && /* @__PURE__ */ t.jsx("div", { className: `gantt-drop-indicator ${y.position}` })
1353
1353
  ]
1354
1354
  },
1355
1355
  j.id
@@ -1359,7 +1359,7 @@ const jt = (e) => e ? {
1359
1359
  }
1360
1360
  ));
1361
1361
  Er.displayName = "Grid";
1362
- const yn = ({
1362
+ const xn = ({
1363
1363
  task: e,
1364
1364
  position: a,
1365
1365
  selected: n,
@@ -1371,31 +1371,33 @@ const yn = ({
1371
1371
  readonly: d = !1,
1372
1372
  baseline: p,
1373
1373
  dependencyRuleDescriptions: h = [],
1374
- tooltipConfig: S
1374
+ tooltipConfig: v
1375
1375
  }) => {
1376
- const x = e.ShowHandle !== void 0 ? e.ShowHandle : !0, m = ($, Q) => {
1377
- d || ($.preventDefault(), $.stopPropagation(), c($.clientX, $.clientY, Q));
1376
+ const y = e.ShowHandle !== void 0 ? e.ShowHandle : !0, m = ($, J) => {
1377
+ d || ($.preventDefault(), $.stopPropagation(), c($.clientX, $.clientY, J));
1378
1378
  }, E = () => {
1379
1379
  const $ = ["gantt-task-bar"];
1380
1380
  if (e.type === "milestone" && $.push("milestone"), e.type === "project" && $.push("project"), n && $.push("selected"), s && $.push("dragging"), e.status) {
1381
- const Q = String(e.status).trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
1382
- Q && $.push(`status-${Q}`);
1381
+ const J = String(e.status).trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
1382
+ J && $.push(`status-${J}`);
1383
1383
  }
1384
1384
  return $.join(" ");
1385
- }, R = () => {
1386
- let $ = a.left, Q = a.width;
1387
- return s && u && (u === "move" ? $ += b : u === "resize-left" ? ($ += b, Q -= b) : u === "resize-right" && (Q += b)), {
1385
+ }, F = () => {
1386
+ let $ = a.left, J = a.width;
1387
+ s && u && (u === "move" ? $ += b : u === "resize-left" ? ($ += b, J -= b) : u === "resize-right" && (J += b));
1388
+ const xe = 20;
1389
+ return e.type === "milestone" && J < xe && ($ -= (xe - J) / 2, J = xe), {
1388
1390
  left: `${$}px`,
1389
- width: `${Math.max(Q, 0)}px`,
1391
+ width: `${Math.max(J, 0)}px`,
1390
1392
  // Color handled by CSS classes (.project, .milestone) or task.color override
1391
1393
  backgroundColor: e.color || void 0
1392
1394
  };
1393
1395
  }, N = ($ = !1) => /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1394
- !d && x && !$ && /* @__PURE__ */ t.jsx(
1396
+ !d && y && !$ && /* @__PURE__ */ t.jsx(
1395
1397
  "div",
1396
1398
  {
1397
1399
  className: "gantt-task-resize-handle gantt-task-resize-left",
1398
- onMouseDown: (Q) => m(Q, "resize-left")
1400
+ onMouseDown: (J) => m(J, "resize-left")
1399
1401
  }
1400
1402
  ),
1401
1403
  !$ && e.type !== "milestone" && /* @__PURE__ */ t.jsx(
@@ -1410,86 +1412,86 @@ const yn = ({
1410
1412
  }
1411
1413
  ),
1412
1414
  /* @__PURE__ */ t.jsx("div", { className: "gantt-task-content", children: !$ && /* @__PURE__ */ t.jsx("span", { className: "gantt-task-text", children: e.text }) }),
1413
- !d && x && !$ && /* @__PURE__ */ t.jsx(
1415
+ !d && y && !$ && /* @__PURE__ */ t.jsx(
1414
1416
  "div",
1415
1417
  {
1416
1418
  className: "gantt-task-resize-handle gantt-task-resize-right",
1417
- onMouseDown: (Q) => m(Q, "resize-right")
1419
+ onMouseDown: (J) => m(J, "resize-right")
1418
1420
  }
1419
1421
  )
1420
- ] }), M = ($, Q) => {
1422
+ ] }), M = ($, J) => {
1421
1423
  if ($ instanceof Date)
1422
- return Number.isNaN($.getTime()) ? Q : $;
1424
+ return Number.isNaN($.getTime()) ? J : $;
1423
1425
  if (typeof $ == "string" || typeof $ == "number") {
1424
- const Le = new Date($);
1425
- return Number.isNaN(Le.getTime()) ? Q : Le;
1426
+ const xe = new Date($);
1427
+ return Number.isNaN(xe.getTime()) ? J : xe;
1426
1428
  }
1427
- return Q;
1428
- }, v = ($) => {
1429
+ return J;
1430
+ }, S = ($) => {
1429
1431
  if (Array.isArray($)) {
1430
- const Q = $.map((Le) => String(Le).trim()).filter(Boolean);
1431
- return Q.length > 0 ? Q : void 0;
1432
+ const J = $.map((xe) => String(xe).trim()).filter(Boolean);
1433
+ return J.length > 0 ? J : void 0;
1432
1434
  }
1433
1435
  if (typeof $ == "string") {
1434
- const Q = $.split(/\r?\n|\|/).map((Le) => Le.trim()).filter(Boolean);
1435
- return Q.length > 0 ? Q : void 0;
1436
+ const J = $.split(/\r?\n|\|/).map((xe) => xe.trim()).filter(Boolean);
1437
+ return J.length > 0 ? J : void 0;
1436
1438
  }
1437
- }, y = e.tooltipConfig ? { ...S, ...e.tooltipConfig } : S, C = y?.dateFormat || "MMM D, YYYY", K = y?.taskNameAccessor?.(e) ?? e.text, W = String(K ?? "").trim() || `Task ${e.id}`, re = y?.taskNameFormatter ? y.taskNameFormatter(W, e) : W, le = M(
1438
- y?.plannedStartAccessor?.(e) ?? e.plannedStart ?? p?.start ?? e.start,
1439
+ }, w = e.tooltipConfig ? { ...v, ...e.tooltipConfig } : v, C = w?.dateFormat || "MMM D, YYYY", Z = w?.taskNameAccessor?.(e) ?? e.text, W = String(Z ?? "").trim() || `Task ${e.id}`, re = w?.taskNameFormatter ? w.taskNameFormatter(W, e) : W, le = M(
1440
+ w?.plannedStartAccessor?.(e) ?? e.plannedStart ?? p?.start ?? e.start,
1439
1441
  e.start
1440
1442
  ), j = M(
1441
- y?.plannedEndAccessor?.(e) ?? e.plannedEnd ?? p?.end ?? e.end,
1443
+ w?.plannedEndAccessor?.(e) ?? e.plannedEnd ?? p?.end ?? e.end,
1442
1444
  e.end
1443
- ), X = y?.plannedDatesFormatter ? y.plannedDatesFormatter(le, j, e) : `${ke(le, C)} - ${ke(j, C)}`, F = M(
1444
- y?.actualStartAccessor?.(e) ?? e.actualStart ?? e.start,
1445
+ ), X = w?.plannedDatesFormatter ? w.plannedDatesFormatter(le, j, e) : `${Oe(le, C)} - ${Oe(j, C)}`, R = M(
1446
+ w?.actualStartAccessor?.(e) ?? e.actualStart ?? e.start,
1445
1447
  e.start
1446
- ), k = M(
1447
- y?.actualEndAccessor?.(e) ?? e.actualEnd ?? e.end,
1448
+ ), O = M(
1449
+ w?.actualEndAccessor?.(e) ?? e.actualEnd ?? e.end,
1448
1450
  e.end
1449
- ), B = y?.actualDatesFormatter ? y.actualDatesFormatter(F, k, e) : `${ke(F, C)} - ${ke(k, C)}`, Y = y?.statusAccessor?.(e) ?? e.status, O = Y != null ? String(Y) : "", Me = y?.statusFormatter ? y.statusFormatter(O, e) : O ? O.replace(/-/g, " ") : y?.emptyStatusText || "Not set", be = y?.ownerAccessor?.(e) ?? e.owner, V = be != null ? String(be).trim() : "", I = V ? y?.ownerFormatter ? y.ownerFormatter(V, e) : V : y?.emptyOwnerText || "", ne = h.length > 0 ? h : e.dependencyRule || [], se = v(
1450
- y?.dependencyRuleAccessor?.(e, ne)
1451
- ) || ne, ue = se.length > 0 ? se.map(($) => y?.dependencyRuleFormatter ? y.dependencyRuleFormatter($, e) : $).join(y?.dependencySeparator || " | ") : y?.emptyDependencyRuleText || "No dependency rule", z = y?.progressAccessor?.(e) ?? e.progress, xe = typeof z == "number" ? z : Number(z), Ee = Number.isFinite(xe) ? xe : e.progress, Ie = y?.progressFormatter ? y.progressFormatter(Ee, e) : `${Ee}%`, Ye = /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip", children: [
1452
- y?.showTaskName !== !1 && /* @__PURE__ */ t.jsx("div", { className: "gantt-tooltip-title", children: re }),
1453
- y?.showPlannedDates !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-dates", children: [
1454
- y?.plannedLabel || "Planned",
1451
+ ), B = w?.actualDatesFormatter ? w.actualDatesFormatter(R, O, e) : `${Oe(R, C)} - ${Oe(O, C)}`, Y = w?.statusAccessor?.(e) ?? e.status, k = Y != null ? String(Y) : "", De = w?.statusFormatter ? w.statusFormatter(k, e) : k ? k.replace(/-/g, " ") : w?.emptyStatusText || "Not set", Se = w?.ownerAccessor?.(e) ?? e.owner, V = Se != null ? String(Se).trim() : "", I = V ? w?.ownerFormatter ? w.ownerFormatter(V, e) : V : w?.emptyOwnerText || "", ne = h.length > 0 ? h : e.dependencyRule || [], se = S(
1452
+ w?.dependencyRuleAccessor?.(e, ne)
1453
+ ) || ne, ue = se.length > 0 ? se.map(($) => w?.dependencyRuleFormatter ? w.dependencyRuleFormatter($, e) : $).join(w?.dependencySeparator || " | ") : w?.emptyDependencyRuleText || "No dependency rule", z = w?.progressAccessor?.(e) ?? e.progress, ye = typeof z == "number" ? z : Number(z), Le = Number.isFinite(ye) ? ye : e.progress, Ie = w?.progressFormatter ? w.progressFormatter(Le, e) : `${Le}%`, Ye = /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip", children: [
1454
+ w?.showTaskName !== !1 && /* @__PURE__ */ t.jsx("div", { className: "gantt-tooltip-title", children: re }),
1455
+ w?.showPlannedDates !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-dates", children: [
1456
+ w?.plannedLabel || "Planned",
1455
1457
  ": ",
1456
1458
  X
1457
1459
  ] }),
1458
- y?.showActualDates !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-dates", children: [
1459
- y?.actualLabel || "Actual",
1460
+ w?.showActualDates !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-dates", children: [
1461
+ w?.actualLabel || "Actual",
1460
1462
  ": ",
1461
1463
  B
1462
1464
  ] }),
1463
- y?.showStatus !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-progress", children: [
1464
- y?.statusLabel || "Status",
1465
+ w?.showStatus !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-progress", children: [
1466
+ w?.statusLabel || "Status",
1465
1467
  ": ",
1466
- Me
1468
+ De
1467
1469
  ] }),
1468
- y?.showOwner !== !1 && I && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-owner", children: [
1469
- y?.ownerLabel || "Owner",
1470
+ w?.showOwner !== !1 && I && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-owner", children: [
1471
+ w?.ownerLabel || "Owner",
1470
1472
  ": ",
1471
1473
  I
1472
1474
  ] }),
1473
- y?.showDependencyRule !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-owner", children: [
1474
- y?.dependencyRuleLabel || "Dependency Rule",
1475
+ w?.showDependencyRule !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-owner", children: [
1476
+ w?.dependencyRuleLabel || "Dependency Rule",
1475
1477
  ": ",
1476
1478
  ue
1477
1479
  ] }),
1478
- y?.showProgress !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-progress", children: [
1479
- y?.progressLabel || "Progress",
1480
+ w?.showProgress !== !1 && /* @__PURE__ */ t.jsxs("div", { className: "gantt-tooltip-progress", children: [
1481
+ w?.progressLabel || "Progress",
1480
1482
  ": ",
1481
1483
  Ie
1482
1484
  ] })
1483
1485
  ] });
1484
1486
  if (e.segments && e.segments.length > 0 || e.onHoldPeriods && e.onHoldPeriods.length > 0) {
1485
1487
  console.log("[TaskBar] " + e.text + " onHold:", e.onHoldPeriods);
1486
- const $ = e.end.getTime() - e.start.getTime(), Q = (e.onHoldPeriods || []).map((ce) => ({
1488
+ const $ = e.end.getTime() - e.start.getTime(), J = (e.onHoldPeriods || []).map((ce) => ({
1487
1489
  startMs: Math.max(ce.start.getTime(), e.start.getTime()),
1488
1490
  endMs: Math.min(ce.end.getTime(), e.end.getTime())
1489
1491
  })).filter((ce) => ce.endMs > ce.startMs).sort((ce, me) => ce.startMs - me.startMs).reduce((ce, me) => {
1490
1492
  const Fe = ce[ce.length - 1];
1491
1493
  return !Fe || me.startMs > Fe.endMs ? (ce.push({ ...me }), ce) : (Fe.endMs = Math.max(Fe.endMs, me.endMs), ce);
1492
- }, []), Le = !!(e.segments && e.segments.length > 0), Qe = Le ? e.segments : [{ start: e.start, end: e.end, duration: e.duration || 0 }];
1494
+ }, []), xe = !!(e.segments && e.segments.length > 0), Qe = xe ? e.segments : [{ start: e.start, end: e.end, duration: e.duration || 0 }];
1493
1495
  return /* @__PURE__ */ t.jsxs("div", { className: "gantt-task-group", children: [
1494
1496
  Qe.map((ce, me) => /* @__PURE__ */ t.jsx(nt, { title: Ye, mouseEnterDelay: 0.5, children: /* @__PURE__ */ t.jsx(
1495
1497
  "div",
@@ -1505,21 +1507,21 @@ const yn = ({
1505
1507
  children: N(me > 0)
1506
1508
  }
1507
1509
  ) }, `seg-${me}`)),
1508
- Q.map((ce, me) => {
1510
+ J.map((ce, me) => {
1509
1511
  const Fe = $ > 0 ? $ : 864e5, pe = ce.endMs - ce.startMs;
1510
1512
  if (pe <= 0) return null;
1511
- const et = a.left + (ce.startMs - e.start.getTime()) / Fe * a.width, Ae = pe / Fe * a.width;
1513
+ const et = a.left + (ce.startMs - e.start.getTime()) / Fe * a.width, _e = pe / Fe * a.width;
1512
1514
  return /* @__PURE__ */ t.jsx(
1513
1515
  "div",
1514
1516
  {
1515
1517
  className: "gantt-on-hold-period",
1516
1518
  style: {
1517
1519
  left: `${et}px`,
1518
- width: `${Ae}px`,
1520
+ width: `${_e}px`,
1519
1521
  // z-index 101: above hover state (100)
1520
1522
  // Always rendered on top regardless of status-* colour
1521
1523
  zIndex: 101,
1522
- opacity: Le ? 0.9 : 0.75,
1524
+ opacity: xe ? 0.9 : 0.75,
1523
1525
  pointerEvents: "none"
1524
1526
  }
1525
1527
  },
@@ -1532,53 +1534,53 @@ const yn = ({
1532
1534
  "div",
1533
1535
  {
1534
1536
  className: E(),
1535
- style: R(),
1537
+ style: F(),
1536
1538
  onClick: r,
1537
1539
  onMouseDown: ($) => m($, "move"),
1538
1540
  children: N()
1539
1541
  }
1540
1542
  ) });
1541
1543
  }, wn = ({ links: e, tasks: a, getTaskPosition: n }) => {
1542
- const s = _.useMemo(() => {
1544
+ const s = A.useMemo(() => {
1543
1545
  const p = /* @__PURE__ */ new Map();
1544
1546
  return a.forEach((h) => p.set(h.id, h)), p;
1545
- }, [a]), r = (p) => s.get(p), c = _.useMemo(() => {
1546
- const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new Map();
1547
- e.forEach((R) => {
1548
- p.set(R.source, (p.get(R.source) || 0) + 1), h.set(R.target, (h.get(R.target) || 0) + 1);
1547
+ }, [a]), r = (p) => s.get(p), c = A.useMemo(() => {
1548
+ const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
1549
+ e.forEach((F) => {
1550
+ p.set(F.source, (p.get(F.source) || 0) + 1), h.set(F.target, (h.get(F.target) || 0) + 1);
1549
1551
  });
1550
1552
  const m = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map();
1551
- return e.forEach((R) => {
1552
- const N = m.get(R.source) || 0;
1553
- S.set(R.id, N), m.set(R.source, N + 1);
1554
- const M = E.get(R.target) || 0;
1555
- x.set(R.id, M), E.set(R.target, M + 1);
1553
+ return e.forEach((F) => {
1554
+ const N = m.get(F.source) || 0;
1555
+ v.set(F.id, N), m.set(F.source, N + 1);
1556
+ const M = E.get(F.target) || 0;
1557
+ y.set(F.id, M), E.set(F.target, M + 1);
1556
1558
  }), {
1557
1559
  outgoingCountByTaskId: p,
1558
1560
  incomingCountByTaskId: h,
1559
- outgoingIndexByLinkId: S,
1560
- incomingIndexByLinkId: x
1561
+ outgoingIndexByLinkId: v,
1562
+ incomingIndexByLinkId: y
1561
1563
  };
1562
- }, [e]), b = _.useMemo(() => {
1564
+ }, [e]), b = A.useMemo(() => {
1563
1565
  let p = 0, h = 0;
1564
- return a.forEach((S) => {
1566
+ return a.forEach((v) => {
1565
1567
  try {
1566
- const x = n(S);
1567
- x && typeof x.left == "number" && typeof x.width == "number" && (p = Math.max(p, x.left + x.width)), x && typeof x.top == "number" && typeof x.height == "number" && (h = Math.max(h, x.top + x.height));
1568
- } catch (x) {
1569
- console.warn("Failed to position task for link rendering:", S.id, x);
1568
+ const y = n(v);
1569
+ y && typeof y.left == "number" && typeof y.width == "number" && (p = Math.max(p, y.left + y.width)), y && typeof y.top == "number" && typeof y.height == "number" && (h = Math.max(h, y.top + y.height));
1570
+ } catch (y) {
1571
+ console.warn("Failed to position task for link rendering:", v.id, y);
1570
1572
  }
1571
1573
  }), {
1572
1574
  width: Math.max(p, 1e3),
1573
1575
  height: Math.max(h, 100)
1574
1576
  };
1575
1577
  }, [a, n]), u = (p, h) => {
1576
- const S = Math.max(3, Math.round(h / 7)), x = Math.max(2, h / 2 - 2);
1577
- return Math.min((p + 1) * S, x);
1578
+ const v = Math.max(3, Math.round(h / 7)), y = Math.max(2, h / 2 - 2);
1579
+ return Math.min((p + 1) * v, y);
1578
1580
  }, d = (p) => {
1579
- const h = r(p.source), S = r(p.target);
1580
- if (!h || !S) return { path: "", arrow: "" };
1581
- const x = n(h), m = n(S), E = (c.outgoingCountByTaskId.get(h.id) || 0) > 0 && (c.incomingCountByTaskId.get(h.id) || 0) > 0, R = (c.outgoingCountByTaskId.get(S.id) || 0) > 0 && (c.incomingCountByTaskId.get(S.id) || 0) > 0, N = x.top + x.height / 2 + (E ? u(c.outgoingIndexByLinkId.get(p.id) || 0, x.height) : 0), M = m.top + m.height / 2 - (R ? u(c.incomingIndexByLinkId.get(p.id) || 0, m.height) : 0), v = {
1581
+ const h = r(p.source), v = r(p.target);
1582
+ if (!h || !v) return { path: "", arrow: "" };
1583
+ const y = n(h), m = n(v), E = (c.outgoingCountByTaskId.get(h.id) || 0) > 0 && (c.incomingCountByTaskId.get(h.id) || 0) > 0, F = (c.outgoingCountByTaskId.get(v.id) || 0) > 0 && (c.incomingCountByTaskId.get(v.id) || 0) > 0, N = y.top + y.height / 2 + (E ? u(c.outgoingIndexByLinkId.get(p.id) || 0, y.height) : 0), M = m.top + m.height / 2 - (F ? u(c.incomingIndexByLinkId.get(p.id) || 0, m.height) : 0), S = {
1582
1584
  sourceStub: 14,
1583
1585
  targetStub: 8,
1584
1586
  detourPadding: 24,
@@ -1589,51 +1591,51 @@ const yn = ({
1589
1591
  arrowStemOverlap: 1,
1590
1592
  chevronNotchDepth: 5
1591
1593
  };
1592
- let y = 0, C = 0, K = 1, W = 1;
1594
+ let w = 0, C = 0, Z = 1, W = 1;
1593
1595
  switch (p.type) {
1594
1596
  case "e2s":
1595
- y = x.left + x.width, C = m.left, K = 1, W = 1;
1597
+ w = y.left + y.width, C = m.left, Z = 1, W = 1;
1596
1598
  break;
1597
1599
  case "s2s":
1598
- y = x.left, C = m.left, K = -1, W = 1;
1600
+ w = y.left, C = m.left, Z = -1, W = 1;
1599
1601
  break;
1600
1602
  case "e2e":
1601
- y = x.left + x.width, C = m.left + m.width, K = 1, W = -1;
1603
+ w = y.left + y.width, C = m.left + m.width, Z = 1, W = -1;
1602
1604
  break;
1603
1605
  case "s2e":
1604
- y = x.left, C = m.left + m.width, K = -1, W = -1;
1606
+ w = y.left, C = m.left + m.width, Z = -1, W = -1;
1605
1607
  break;
1606
1608
  }
1607
- const re = y + K * v.sourceStub, le = C - W * v.arrowGap, j = le - W * v.arrowLength, X = j + W * v.chevronNotchDepth, F = X - W * v.targetStub, k = X + W * v.arrowStemOverlap, B = Math.abs(M - N) > 1;
1609
+ const re = w + Z * S.sourceStub, le = C - W * S.arrowGap, j = le - W * S.arrowLength, X = j + W * S.chevronNotchDepth, R = X - W * S.targetStub, O = X + W * S.arrowStemOverlap, B = Math.abs(M - N) > 1;
1608
1610
  let Y;
1609
1611
  if (B) {
1610
1612
  const ne = M > N;
1611
- let de = ne ? Math.min(x.top + x.height + 6, m.top - 6) : Math.max(x.top - 6, m.top + m.height + 6);
1613
+ let de = ne ? Math.min(y.top + y.height + 6, m.top - 6) : Math.max(y.top - 6, m.top + m.height + 6);
1612
1614
  Math.abs(de - N) < 2 && (de = N + (ne ? 2 : -2)), Math.abs(de - M) < 2 && (de = M + (ne ? -2 : 2)), Y = [
1613
- { x: y, y: N },
1615
+ { x: w, y: N },
1614
1616
  { x: re, y: N },
1615
1617
  { x: re, y: de },
1616
- { x: F, y: de },
1617
- { x: F, y: M },
1618
- { x: k, y: M }
1618
+ { x: R, y: de },
1619
+ { x: R, y: M },
1620
+ { x: O, y: M }
1619
1621
  ];
1620
1622
  } else {
1621
1623
  let I;
1622
- K === W && (K === 1 ? F - re >= v.minHorizontalSpan : re - F >= v.minHorizontalSpan) ? I = (re + F) / 2 : I = K === 1 ? Math.max(y, C) + v.detourPadding : Math.min(y, C) - v.detourPadding, Y = [
1623
- { x: y, y: N },
1624
+ Z === W && (Z === 1 ? R - re >= S.minHorizontalSpan : re - R >= S.minHorizontalSpan) ? I = (re + R) / 2 : I = Z === 1 ? Math.max(w, C) + S.detourPadding : Math.min(w, C) - S.detourPadding, Y = [
1625
+ { x: w, y: N },
1624
1626
  { x: re, y: N },
1625
1627
  { x: I, y: N },
1626
1628
  { x: I, y: M },
1627
- { x: F, y: M },
1628
- { x: k, y: M }
1629
+ { x: R, y: M },
1630
+ { x: O, y: M }
1629
1631
  ];
1630
1632
  }
1631
- const O = Y.filter((I, ne) => {
1633
+ const k = Y.filter((I, ne) => {
1632
1634
  if (ne === 0) return !0;
1633
1635
  const de = Y[ne - 1];
1634
1636
  return Math.abs(I.x - de.x) > 0.5 || Math.abs(I.y - de.y) > 0.5;
1635
- }), Me = O.length > 0 ? O.map((I, ne) => `${ne === 0 ? "M" : "L"} ${I.x},${I.y}`).join(" ") : "", be = v.arrowWidth / 2, V = `M ${j},${M - be} L ${le},${M} L ${j},${M + be} L ${X},${M} Z`;
1636
- return { path: Me, arrow: V };
1637
+ }), De = k.length > 0 ? k.map((I, ne) => `${ne === 0 ? "M" : "L"} ${I.x},${I.y}`).join(" ") : "", Se = S.arrowWidth / 2, V = `M ${j},${M - Se} L ${le},${M} L ${j},${M + Se} L ${X},${M} Z`;
1638
+ return { path: De, arrow: V };
1637
1639
  };
1638
1640
  return e.length === 0 ? null : /* @__PURE__ */ t.jsx(
1639
1641
  "svg",
@@ -1649,9 +1651,9 @@ const yn = ({
1649
1651
  pointerEvents: "none"
1650
1652
  },
1651
1653
  children: e.map((p) => {
1652
- const h = r(p.source), S = r(p.target);
1653
- if (!h || !S) return null;
1654
- const x = d(p), m = x.path, E = x.arrow;
1654
+ const h = r(p.source), v = r(p.target);
1655
+ if (!h || !v) return null;
1656
+ const y = d(p), m = y.path, E = y.arrow;
1655
1657
  return !m || !E ? null : /* @__PURE__ */ t.jsxs("g", { className: "gantt-link", children: [
1656
1658
  /* @__PURE__ */ t.jsx(
1657
1659
  "path",
@@ -1683,51 +1685,52 @@ const yn = ({
1683
1685
  type: null,
1684
1686
  dragDeltaX: 0,
1685
1687
  dragDeltaY: 0
1686
- }), u = Je((h, S, x, m) => {
1687
- const E = e.find((R) => R.id === h);
1688
+ }), u = Je((h, v, y, m) => {
1689
+ const E = e.find((F) => F.id === h);
1688
1690
  E && b({
1689
1691
  taskId: h,
1690
- initialX: S,
1691
- initialY: x,
1692
+ initialX: v,
1693
+ initialY: y,
1692
1694
  initialStart: new Date(E.start),
1693
1695
  initialEnd: new Date(E.end),
1694
1696
  type: m,
1695
1697
  dragDeltaX: 0,
1696
1698
  dragDeltaY: 0
1697
1699
  });
1698
- }, [e]), d = Je((h, S) => {
1700
+ }, [e]), d = Je((h, v) => {
1699
1701
  if (!c.taskId || !c.type) return null;
1700
- const x = h - c.initialX, m = S - c.initialY;
1701
- if (b((y) => ({
1702
- ...y,
1703
- dragDeltaX: x,
1702
+ const y = h - c.initialX, m = v - c.initialY;
1703
+ if (b((C) => ({
1704
+ ...C,
1705
+ dragDeltaX: y,
1704
1706
  dragDeltaY: m
1705
1707
  })), c.type === "reorder") return null;
1706
- const E = e.find((y) => y.id === c.taskId);
1708
+ const E = e.find((C) => C.id === c.taskId);
1707
1709
  if (!E) return null;
1708
- const R = Math.round(x / n);
1709
- let N = new Date(c.initialStart), M = new Date(c.initialEnd);
1710
+ let F = 0, N = s;
1711
+ s === "week" ? (F = Math.round(y / n * 7), N = "day") : s === "month" ? (F = Math.round(y / n * 30), N = "day") : (F = Math.round(y / n) * r, N = s);
1712
+ let M = new Date(c.initialStart), S = new Date(c.initialEnd);
1710
1713
  switch (c.type) {
1711
1714
  case "move":
1712
- N = je(c.initialStart, R * r, s), M = je(c.initialEnd, R * r, s);
1715
+ M = Te(c.initialStart, F, N), S = Te(c.initialEnd, F, N);
1713
1716
  break;
1714
1717
  case "resize-left":
1715
- N = je(c.initialStart, R * r, s), N >= M && (N = je(M, -r, s));
1718
+ M = Te(c.initialStart, F, N), M >= S && (M = Te(S, N === "day" ? -1 : -r, N));
1716
1719
  break;
1717
1720
  case "resize-right":
1718
- M = je(c.initialEnd, R * r, s), M <= N && (M = je(N, r, s));
1721
+ S = Te(c.initialEnd, F, N), S <= M && (S = Te(M, N === "day" ? 1 : r, N));
1719
1722
  break;
1720
1723
  }
1721
- const v = Nt(N, M);
1724
+ const w = Nt(M, S);
1722
1725
  return {
1723
1726
  ...E,
1724
- start: N,
1725
- end: M,
1726
- duration: v
1727
+ start: M,
1728
+ end: S,
1729
+ duration: w
1727
1730
  };
1728
1731
  }, [c, e, n, r, s]), p = Je((h) => {
1729
1732
  if (h && a) {
1730
- const { id: S, ...x } = h, m = c.type;
1733
+ const { id: v, ...y } = h, m = c.type;
1731
1734
  if (m && m !== "reorder") {
1732
1735
  const E = {
1733
1736
  dragType: m,
@@ -1735,9 +1738,9 @@ const yn = ({
1735
1738
  previousEnd: new Date(c.initialEnd),
1736
1739
  previousDuration: Nt(c.initialStart, c.initialEnd)
1737
1740
  };
1738
- a(S, x, E);
1741
+ a(v, y, E);
1739
1742
  } else
1740
- a(S, x);
1743
+ a(v, y);
1741
1744
  }
1742
1745
  b({
1743
1746
  taskId: null,
@@ -1759,7 +1762,7 @@ const yn = ({
1759
1762
  }, mr = (e) => {
1760
1763
  const a = new Date(e.getFullYear(), e.getMonth(), 1);
1761
1764
  return Math.ceil((e.getDate() + a.getDay()) / 7);
1762
- }, fr = (e) => Math.floor(e.getMonth() / 3) + 1, Qt = (e, a, n) => a.unit === "week" ? a.format?.includes("W") ? a.format.replace(/\bW\b/g, String(mr(e))) : `Week ${mr(e)}` : a.unit === "quarter" ? a.format?.includes("Q") ? a.format.replace(/\bQ\b/g, String(fr(e))) : `Q${fr(e)}` : ke(e, a.format || n), Sn = (e, a) => {
1765
+ }, fr = (e) => Math.floor(e.getMonth() / 3) + 1, Qt = (e, a, n) => a.unit === "week" ? a.format?.includes("W") ? a.format.replace(/\bW\b/g, String(mr(e))) : `Week ${mr(e)}` : a.unit === "quarter" ? a.format?.includes("Q") ? a.format.replace(/\bQ\b/g, String(fr(e))) : `Q${fr(e)}` : Oe(e, a.format || n), Sn = (e, a) => {
1763
1766
  const n = new Date(e);
1764
1767
  switch (n.setMinutes(0, 0, 0), a.unit) {
1765
1768
  case "hour": {
@@ -1767,11 +1770,11 @@ const yn = ({
1767
1770
  return n.setHours(s), n;
1768
1771
  }
1769
1772
  case "day": {
1770
- const s = xt(n), r = s.getDate(), c = r - (r - 1) % a.step;
1773
+ const s = yt(n), r = s.getDate(), c = r - (r - 1) % a.step;
1771
1774
  return new Date(s.getFullYear(), s.getMonth(), c);
1772
1775
  }
1773
1776
  case "week": {
1774
- const s = xt(n), r = new Date(s);
1777
+ const s = yt(n), r = new Date(s);
1775
1778
  return r.setDate(s.getDate() - s.getDay()), r;
1776
1779
  }
1777
1780
  case "month":
@@ -1785,20 +1788,20 @@ const yn = ({
1785
1788
  return new Date(s, 0, 1);
1786
1789
  }
1787
1790
  default:
1788
- return xt(n);
1791
+ return yt(n);
1789
1792
  }
1790
- }, Lr = _.memo(
1791
- _.forwardRef(
1792
- ({ tasks: e, links: a, range: n, scales: s, config: r, selectedTask: c, onTaskClick: b, onTaskDragStart: u, onTaskDragEnd: d, onTaskUpdate: p, zoomLevel: h, baselines: S, allowBaselineOnlyMode: x, taskTooltipConfig: m, headerHeight: E }, R) => {
1793
- const N = _.useRef(null), M = _.useCallback((l) => {
1794
- N.current = l, typeof R == "function" ? R(l) : R && (R.current = l);
1795
- }, [R]), [v, y] = G(e), [C, K] = G(a), [W, re] = G(0), le = _.useMemo(
1793
+ }, Lr = A.memo(
1794
+ A.forwardRef(
1795
+ ({ tasks: e, links: a, range: n, scales: s, config: r, selectedTask: c, onTaskClick: b, onTaskDragStart: u, onTaskDragEnd: d, onTaskUpdate: p, zoomLevel: h, baselines: v, allowBaselineOnlyMode: y, taskTooltipConfig: m, headerHeight: E }, F) => {
1796
+ const N = A.useRef(null), M = A.useCallback((l) => {
1797
+ N.current = l, typeof F == "function" ? F(l) : F && (F.current = l);
1798
+ }, [F]), [S, w] = G(e), [C, Z] = G(a), [W, re] = G(0), le = A.useMemo(
1796
1799
  () => Math.max((r.columnWidth || 60) * h, r.minColumnWidth || 0),
1797
1800
  [r.columnWidth, r.minColumnWidth, h]
1798
- ), j = r.baselines && S && S.size > 0, X = _.useMemo(() => {
1801
+ ), j = r.baselines && v && v.size > 0, X = A.useMemo(() => {
1799
1802
  const l = /* @__PURE__ */ new Map();
1800
- return v.forEach((g) => l.set(g.id, g)), l;
1801
- }, [v]), F = _.useMemo(() => {
1803
+ return S.forEach((g) => l.set(g.id, g)), l;
1804
+ }, [S]), R = A.useMemo(() => {
1802
1805
  const l = /* @__PURE__ */ new Map(), g = {
1803
1806
  e2s: "Finish-to-Start",
1804
1807
  s2s: "Start-to-Start",
@@ -1808,24 +1811,24 @@ const yn = ({
1808
1811
  const ee = [...l.get(f) || [], ...U.map((ie) => ie.trim()).filter(Boolean)];
1809
1812
  ee.length > 0 && l.set(f, Array.from(new Set(ee)));
1810
1813
  };
1811
- return v.forEach((f) => {
1814
+ return S.forEach((f) => {
1812
1815
  f.dependencyRule && f.dependencyRule.length > 0 && D(f.id, f.dependencyRule);
1813
1816
  }), C.forEach((f) => {
1814
1817
  const U = X.get(f.source), q = X.get(f.target), ee = U?.text || `Task ${f.source}`, ie = q?.text || `Task ${f.target}`, $e = g[f.type], ze = typeof f.lag == "number" && f.lag !== 0 ? ` (${f.lag > 0 ? "+" : ""}${f.lag} ${f.lagUnit || "day"})` : "", ge = `${ie} depends on ${ee} [${$e}]${ze}`;
1815
1818
  D(f.target, [ge]);
1816
1819
  }), l;
1817
- }, [C, v, X]);
1818
- _.useEffect(() => {
1819
- (e.length !== v.length || e.some((g, D) => {
1820
- const f = v[D];
1820
+ }, [C, S, X]);
1821
+ A.useEffect(() => {
1822
+ (e.length !== S.length || e.some((g, D) => {
1823
+ const f = S[D];
1821
1824
  return !f || g.id !== f.id || g.start.getTime() !== f.start.getTime() || g.end.getTime() !== f.end.getTime() || g.duration !== f.duration;
1822
- })) && y(e);
1823
- }, [e]), _.useEffect(() => {
1825
+ })) && w(e);
1826
+ }, [e]), A.useEffect(() => {
1824
1827
  (a.length !== C.length || a.some((g, D) => {
1825
1828
  const f = C[D];
1826
1829
  return !f || g.id !== f.id || g.source !== f.source || g.target !== f.target || g.type !== f.type;
1827
- })) && K(a);
1828
- }, [a]), _.useEffect(() => {
1830
+ })) && Z(a);
1831
+ }, [a]), A.useEffect(() => {
1829
1832
  const l = N.current?.parentElement;
1830
1833
  if (!l) return;
1831
1834
  const g = () => {
@@ -1842,7 +1845,7 @@ const yn = ({
1842
1845
  });
1843
1846
  return f.observe(D), () => f.disconnect();
1844
1847
  }, []);
1845
- const k = _.useCallback((l) => {
1848
+ const O = A.useCallback((l) => {
1846
1849
  const g = [];
1847
1850
  let D = new Date(n.start);
1848
1851
  for (; D <= n.end; ) {
@@ -1858,7 +1861,7 @@ const yn = ({
1858
1861
  g.push({
1859
1862
  date: new Date(D),
1860
1863
  label: f
1861
- }), D = je(D, l.step, l.unit);
1864
+ }), D = Te(D, l.step, l.unit);
1862
1865
  }
1863
1866
  if (W > 0) {
1864
1867
  const f = Math.floor(W / le);
@@ -1875,51 +1878,51 @@ const yn = ({
1875
1878
  g.push({
1876
1879
  date: new Date(D),
1877
1880
  label: U
1878
- }), D = je(D, l.step, l.unit);
1881
+ }), D = Te(D, l.step, l.unit);
1879
1882
  }
1880
1883
  }
1881
1884
  return g;
1882
- }, [n.start, n.end, W, le]), B = s[1] || s[0], Y = _.useMemo(() => k(B), [k, B]), O = _.useMemo(() => Y.length === 0 || W <= 0 ? le : Math.max(le, W / Y.length), [le, Y.length, W]), Me = x && v.length === 0 && j, be = !!r.timelineView || !!r.timelineViews?.length, V = _.useMemo(() => {
1885
+ }, [n.start, n.end, W, le]), B = s[s.length - 1] || s[0], Y = A.useMemo(() => O(B), [O, B]), k = A.useMemo(() => Y.length === 0 || W <= 0 ? le : Math.max(le, W / Y.length), [le, Y.length, W]), De = y && S.length === 0 && j, Se = !!r.timelineView || !!r.timelineViews?.length, V = A.useMemo(() => {
1883
1886
  if (r.showTimelineHeader === !1) return 0;
1884
- let l = be ? Math.max(s.length - 1, 0) : 2;
1887
+ let l = Se ? Math.max(s.length - 1, 0) : 2;
1885
1888
  if (r.showMonthHeading === !1 && (l = Math.max(0, l - 1)), r.showRangeHeading === !1) {
1886
- const g = be ? Math.max(0, s.length - 2) : 1;
1889
+ const g = Se ? Math.max(0, s.length - 2) : 1;
1887
1890
  l = Math.max(0, l - g);
1888
1891
  }
1889
1892
  return l;
1890
- }, [r.showTimelineHeader, r.showMonthHeading, r.showRangeHeading, be, s.length]), { dragState: I, handleDragStart: ne, handleDrag: de, handleDragEnd: se } = bn(
1891
- v,
1893
+ }, [r.showTimelineHeader, r.showMonthHeading, r.showRangeHeading, Se, s.length]), { dragState: I, handleDragStart: ne, handleDrag: de, handleDragEnd: se } = bn(
1894
+ S,
1892
1895
  p,
1893
- O,
1896
+ k,
1894
1897
  B.unit,
1895
1898
  B.step
1896
- ), ue = _.useCallback((l) => {
1899
+ ), ue = A.useCallback((l) => {
1897
1900
  if (Y.length === 0) return 0;
1898
1901
  const g = l.getTime(), D = Y.length - 1;
1899
1902
  for (let f = 0; f <= D; f++) {
1900
- const U = Y[f], q = U.date.getTime(), ie = (f < D ? Y[f + 1].date : je(U.date, B.step, B.unit)).getTime(), $e = Math.max(ie - q, 1);
1903
+ const U = Y[f], q = U.date.getTime(), ie = (f < D ? Y[f + 1].date : Te(U.date, B.step, B.unit)).getTime(), $e = Math.max(ie - q, 1);
1901
1904
  if (g < q)
1902
- return f * O;
1905
+ return f * k;
1903
1906
  if (g <= ie) {
1904
1907
  const ze = Math.max(0, Math.min((g - q) / $e, 1));
1905
- return (f + ze) * O;
1908
+ return (f + ze) * k;
1906
1909
  }
1907
1910
  }
1908
- return Y.length * O;
1909
- }, [Y, B, O]), z = (l) => {
1911
+ return Y.length * k;
1912
+ }, [Y, B, k]), z = (l) => {
1910
1913
  const g = ue(l.start), D = ue(l.end);
1911
1914
  return {
1912
1915
  left: g,
1913
1916
  width: Math.max(D - g, 0)
1914
1917
  };
1915
- }, xe = (l) => {
1918
+ }, ye = (l) => {
1916
1919
  const g = ue(l.start), D = ue(l.end);
1917
1920
  return {
1918
1921
  left: g,
1919
1922
  width: Math.max(D - g, 0)
1920
1923
  };
1921
- }, Ee = _.useCallback((l) => {
1922
- const g = z(l), D = v.findIndex((ee) => ee.id === l.id);
1924
+ }, Le = A.useCallback((l) => {
1925
+ const g = z(l), D = S.findIndex((ee) => ee.id === l.id);
1923
1926
  let f = r.rowHeight || 48;
1924
1927
  if (N.current) {
1925
1928
  const ee = getComputedStyle(N.current).getPropertyValue("--gantt-row-height");
@@ -1935,73 +1938,73 @@ const yn = ({
1935
1938
  top: D * f + q,
1936
1939
  height: U
1937
1940
  };
1938
- }, [z, v, r.rowHeight, r.taskHeight]), Ie = _.useRef(null), Ye = Je((l) => {
1941
+ }, [z, S, r.rowHeight, r.taskHeight]), Ie = A.useRef(null), Ye = Je((l) => {
1939
1942
  I.taskId && I.type && (Ie.current && cancelAnimationFrame(Ie.current), Ie.current = requestAnimationFrame(() => {
1940
1943
  const g = de(l.clientX, l.clientY);
1941
- g && y(
1944
+ g && w(
1942
1945
  (D) => D.map((f) => f.id === g.id ? g : f)
1943
1946
  );
1944
1947
  }));
1945
1948
  }, [I, de]), $ = Je(() => {
1946
1949
  if (I.taskId) {
1947
- const l = v.find((g) => g.id === I.taskId);
1950
+ const l = S.find((g) => g.id === I.taskId);
1948
1951
  se(l || null), d();
1949
1952
  }
1950
- }, [I, v, se, d]), Q = _.useCallback((l) => {
1953
+ }, [I, S, se, d]), J = A.useCallback((l) => {
1951
1954
  const g = [];
1952
1955
  let D = "", f = "", U = 0;
1953
1956
  return Y.forEach((q) => {
1954
1957
  const ee = Sn(q.date, l), ie = ee.toISOString(), $e = l.unit === "year" ? "YYYY" : l.unit === "month" ? "MMM YYYY" : l.unit === "day" ? "MMM D" : "D", ze = Qt(ee, l, $e);
1955
- ie !== D ? (D && g.push({ key: D, label: f, width: U }), D = ie, f = ze, U = O) : U += O;
1958
+ ie !== D ? (D && g.push({ key: D, label: f, width: U }), D = ie, f = ze, U = k) : U += k;
1956
1959
  }), D && g.push({ key: D, label: f, width: U }), g;
1957
- }, [Y, O]), Le = _.useMemo(() => {
1958
- if (!be) return [];
1960
+ }, [Y, k]), xe = A.useMemo(() => {
1961
+ if (!Se) return [];
1959
1962
  const l = [];
1960
1963
  return s.slice(0, -1).forEach((D) => {
1961
- const f = Q(D);
1964
+ const f = J(D);
1962
1965
  f.length > 0 && l.push(f);
1963
1966
  }), l.push(
1964
1967
  Y.map((D, f) => ({
1965
1968
  key: `secondary-${f}`,
1966
1969
  label: D.label,
1967
- width: O,
1970
+ width: k,
1968
1971
  date: D.date
1969
1972
  }))
1970
1973
  ), l;
1971
- }, [Q, O, be, s, Y]), Qe = _.useCallback(() => {
1974
+ }, [J, k, Se, s, Y]), Qe = A.useCallback(() => {
1972
1975
  const l = [];
1973
1976
  let g = -1, D = -1, f = 0, U = "";
1974
1977
  return Y.forEach((q) => {
1975
- const ee = q.date.getMonth(), ie = q.date.getFullYear(), $e = ke(q.date, "MMM YYYY");
1976
- ee !== g || ie !== D ? (g !== -1 && l.push({ label: U, width: f }), g = ee, D = ie, f = O, U = $e) : f += O;
1978
+ const ee = q.date.getMonth(), ie = q.date.getFullYear(), $e = Oe(q.date, "MMM YYYY");
1979
+ ee !== g || ie !== D ? (g !== -1 && l.push({ label: U, width: f }), g = ee, D = ie, f = k, U = $e) : f += k;
1977
1980
  }), g !== -1 && l.push({ label: U, width: f }), l;
1978
- }, [Y, O]), ce = _.useCallback(() => {
1981
+ }, [Y, k]), ce = A.useCallback(() => {
1979
1982
  const l = [];
1980
1983
  let g = -1, D = 0, f = -1, U = -1, q = "";
1981
1984
  return Y.forEach((ee) => {
1982
- const $e = ee.date.getDate() <= 15 ? 0 : 1, ze = ee.date.getMonth(), ge = ee.date.getFullYear(), tt = ke(ee.date, "MMM"), Ke = new Date(ge, ze + 1, 0).getDate(), st = $e === 0 ? `${tt} 1 - 15` : `${tt} 16 - ${Ke}`;
1983
- $e !== g || ze !== f || ge !== U ? (g !== -1 && l.push({ label: q, width: D }), g = $e, f = ze, U = ge, D = O, q = st) : D += O;
1985
+ const $e = ee.date.getDate() <= 15 ? 0 : 1, ze = ee.date.getMonth(), ge = ee.date.getFullYear(), tt = Oe(ee.date, "MMM"), Ke = new Date(ge, ze + 1, 0).getDate(), st = $e === 0 ? `${tt} 1 - 15` : `${tt} 16 - ${Ke}`;
1986
+ $e !== g || ze !== f || ge !== U ? (g !== -1 && l.push({ label: q, width: D }), g = $e, f = ze, U = ge, D = k, q = st) : D += k;
1984
1987
  }), g !== -1 && l.push({ label: q, width: D }), l;
1985
- }, [Y, O]), me = _.useMemo(() => Qe(), [Qe]), Fe = _.useMemo(() => ce(), [ce]), pe = _.useMemo(() => Y.length * O, [Y.length, O]), et = _.useMemo(() => {
1988
+ }, [Y, k]), me = A.useMemo(() => Qe(), [Qe]), Fe = A.useMemo(() => ce(), [ce]), pe = A.useMemo(() => Y.length * k, [Y.length, k]), et = A.useMemo(() => {
1986
1989
  const l = /* @__PURE__ */ new Date();
1987
1990
  return l.setHours(0, 0, 0, 0), l;
1988
- }, []), Ae = _.useMemo(() => {
1991
+ }, []), _e = A.useMemo(() => {
1989
1992
  if (!r.showTodayLine) return null;
1990
1993
  const l = ue(et);
1991
- return l >= -O && l <= pe + O ? Math.max(0, Math.min(l, pe)) : null;
1992
- }, [r.showTodayLine, et, pe, O, ue]), Xe = _.useMemo(() => {
1994
+ return l >= -k && l <= pe + k ? Math.max(0, Math.min(l, pe)) : null;
1995
+ }, [r.showTodayLine, et, pe, k, ue]), Xe = A.useMemo(() => {
1993
1996
  if (r.projectStartDate)
1994
- return xt(r.projectStartDate);
1995
- if (v.length > 0) {
1996
- const l = v.map((g) => g.start.getTime());
1997
- return xt(new Date(Math.min(...l)));
1997
+ return yt(r.projectStartDate);
1998
+ if (S.length > 0) {
1999
+ const l = S.map((g) => g.start.getTime());
2000
+ return yt(new Date(Math.min(...l)));
1998
2001
  }
1999
2002
  return null;
2000
- }, [r.projectStartDate, v]), Ue = _.useMemo(() => {
2003
+ }, [r.projectStartDate, S]), Ue = A.useMemo(() => {
2001
2004
  if (!r.showProjectStartLine || !Xe) return null;
2002
2005
  const l = ue(Xe);
2003
- return l >= -O && l <= pe + O ? Math.max(0, Math.min(l, pe)) : null;
2004
- }, [r.showProjectStartLine, Xe, pe, O, ue]), ot = `calc(var(--gantt-scale-height, 24px) * ${V})`;
2006
+ return l >= -k && l <= pe + k ? Math.max(0, Math.min(l, pe)) : null;
2007
+ }, [r.showProjectStartLine, Xe, pe, k, ue]), ot = `calc(var(--gantt-scale-height, 24px) * ${V})`;
2005
2008
  return /* @__PURE__ */ t.jsxs(
2006
2009
  "div",
2007
2010
  {
@@ -2012,14 +2015,14 @@ const yn = ({
2012
2015
  style: { width: pe, position: "relative" },
2013
2016
  children: [
2014
2017
  /* @__PURE__ */ t.jsxs("div", { className: "gantt-timeline-header", style: { width: pe, minWidth: pe, position: "relative", height: E }, children: [
2015
- Ae !== null && r.showTodayLine && r.todayLineLabel && r.todayLineLabel !== "" && /* @__PURE__ */ t.jsx(
2018
+ _e !== null && r.showTodayLine && r.todayLineLabel && r.todayLineLabel !== "" && /* @__PURE__ */ t.jsx(
2016
2019
  "div",
2017
2020
  {
2018
2021
  className: "gantt-today-line-label",
2019
2022
  style: {
2020
2023
  position: "absolute",
2021
2024
  top: ot,
2022
- left: `${Ae}px`,
2025
+ left: `${_e}px`,
2023
2026
  transform: "translateX(-50%)",
2024
2027
  backgroundColor: r.todayLineColor || "#ff4d4f",
2025
2028
  color: "#ffffff",
@@ -2064,15 +2067,15 @@ const yn = ({
2064
2067
  children: r.projectStartLineLabel
2065
2068
  }
2066
2069
  ),
2067
- r.showTimelineHeader !== !1 && (be ? Le.map((l, g) => {
2068
- const D = g === 0 ? "gantt-timeline-scale-month" : g === Le.length - 1 ? "gantt-timeline-scale-day" : "gantt-timeline-scale-range";
2070
+ r.showTimelineHeader !== !1 && (Se ? xe.map((l, g) => {
2071
+ const D = g === 0 ? "gantt-timeline-scale-month" : g === xe.length - 1 ? "gantt-timeline-scale-day" : "gantt-timeline-scale-range";
2069
2072
  return /* @__PURE__ */ t.jsx(
2070
2073
  "div",
2071
2074
  {
2072
2075
  className: `gantt-timeline-scale ${D}`,
2073
- style: { width: pe, display: g === 0 && r.showMonthHeading === !1 || g !== 0 && g !== Le.length - 1 && r.showRangeHeading === !1 ? "none" : "flex" },
2076
+ style: { width: pe, display: g === 0 && r.showMonthHeading === !1 || g !== 0 && g !== xe.length - 1 && r.showRangeHeading === !1 ? "none" : "flex" },
2074
2077
  children: l.map((f, U) => {
2075
- const q = g === Le.length - 1, ee = q && f.date ? r.weekends && Kt(f.date) : !1, ie = q && f.date ? r.holidays && Zt(f.date, r.holidays) : !1;
2078
+ const q = g === xe.length - 1, ee = q && f.date ? r.weekends && Kt(f.date) : !1, ie = q && f.date ? r.holidays && Zt(f.date, r.holidays) : !1;
2076
2079
  return /* @__PURE__ */ t.jsx(
2077
2080
  "div",
2078
2081
  {
@@ -2127,9 +2130,9 @@ const yn = ({
2127
2130
  {
2128
2131
  className: `gantt-timeline-cell ${D ? "weekend" : ""} ${f ? "holiday" : ""}`,
2129
2132
  style: {
2130
- width: O,
2131
- minWidth: O,
2132
- maxWidth: O,
2133
+ width: k,
2134
+ minWidth: k,
2135
+ maxWidth: k,
2133
2136
  borderRight: g === Y.length - 1 ? "none" : "var(--wx-gantt-border)"
2134
2137
  },
2135
2138
  children: l.label
@@ -2140,7 +2143,7 @@ const yn = ({
2140
2143
  ] }))
2141
2144
  ] }),
2142
2145
  /* @__PURE__ */ t.jsxs("div", { className: "gantt-timeline-body", style: { width: pe, position: "relative" }, children: [
2143
- Ae !== null && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2146
+ _e !== null && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2144
2147
  r.showTodayLineMarker !== !1 && (() => {
2145
2148
  const l = r.todayLineMarkerSize || 8, g = r.todayLineColor || "#ff4d4f", D = r.todayLineMarkerStyle || "triangle", f = r.todayLineOpacity !== void 0 ? r.todayLineOpacity : 1;
2146
2149
  return D === "triangle" ? /* @__PURE__ */ t.jsx(
@@ -2149,7 +2152,7 @@ const yn = ({
2149
2152
  className: "gantt-today-line-marker",
2150
2153
  style: {
2151
2154
  position: "absolute",
2152
- left: `${Ae}px`,
2155
+ left: `${_e}px`,
2153
2156
  top: "-4px",
2154
2157
  transform: "translateX(-50%)",
2155
2158
  width: 0,
@@ -2168,7 +2171,7 @@ const yn = ({
2168
2171
  className: "gantt-today-line-marker",
2169
2172
  style: {
2170
2173
  position: "absolute",
2171
- left: `${Ae}px`,
2174
+ left: `${_e}px`,
2172
2175
  top: "-6px",
2173
2176
  transform: "translateX(-50%)",
2174
2177
  width: 0,
@@ -2187,7 +2190,7 @@ const yn = ({
2187
2190
  className: "gantt-today-line-marker",
2188
2191
  style: {
2189
2192
  position: "absolute",
2190
- left: `${Ae}px`,
2193
+ left: `${_e}px`,
2191
2194
  top: `-${l / 2}px`,
2192
2195
  transform: "translateX(-50%)",
2193
2196
  width: `${l}px`,
@@ -2207,7 +2210,7 @@ const yn = ({
2207
2210
  className: "gantt-today-line",
2208
2211
  style: {
2209
2212
  position: "absolute",
2210
- left: `${Ae}px`,
2213
+ left: `${_e}px`,
2211
2214
  top: 0,
2212
2215
  bottom: 0,
2213
2216
  width: `${r.todayLineWidth || 1}px`,
@@ -2310,7 +2313,7 @@ const yn = ({
2310
2313
  "div",
2311
2314
  {
2312
2315
  className: `gantt-timeline-grid-column ${D ? "weekend" : ""} ${f ? "holiday" : ""}`,
2313
- style: { width: O, minWidth: O }
2316
+ style: { width: k, minWidth: k }
2314
2317
  },
2315
2318
  g
2316
2319
  );
@@ -2319,12 +2322,12 @@ const yn = ({
2319
2322
  wn,
2320
2323
  {
2321
2324
  links: C,
2322
- tasks: v,
2323
- getTaskPosition: Ee
2325
+ tasks: S,
2326
+ getTaskPosition: Le
2324
2327
  }
2325
2328
  ),
2326
- /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-tasks", style: { width: pe }, children: Me ? Array.from(S?.values() || []).map((l) => {
2327
- const g = xe(l);
2329
+ /* @__PURE__ */ t.jsx("div", { className: "gantt-timeline-tasks", style: { width: pe }, children: De ? Array.from(v?.values() || []).map((l) => {
2330
+ const g = ye(l);
2328
2331
  return /* @__PURE__ */ t.jsx(
2329
2332
  "div",
2330
2333
  {
@@ -2343,8 +2346,8 @@ const yn = ({
2343
2346
  },
2344
2347
  `baseline-only-${l.taskId}`
2345
2348
  );
2346
- }) : v.map((l) => {
2347
- const g = z(l), D = j ? S?.get(l.id) : void 0, f = D ? xe(D) : void 0;
2349
+ }) : S.map((l) => {
2350
+ const g = z(l), D = j ? v?.get(l.id) : void 0, f = D ? ye(D) : void 0;
2348
2351
  return /* @__PURE__ */ t.jsxs(
2349
2352
  "div",
2350
2353
  {
@@ -2362,11 +2365,11 @@ const yn = ({
2362
2365
  }
2363
2366
  ),
2364
2367
  !l.hideBar && /* @__PURE__ */ t.jsx(
2365
- yn,
2368
+ xn,
2366
2369
  {
2367
2370
  task: l,
2368
2371
  baseline: D,
2369
- dependencyRuleDescriptions: F.get(l.id) || [],
2372
+ dependencyRuleDescriptions: R.get(l.id) || [],
2370
2373
  tooltipConfig: m,
2371
2374
  position: g,
2372
2375
  selected: c === l.id,
@@ -2427,7 +2430,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2427
2430
  ) }),
2428
2431
  /* @__PURE__ */ t.jsxs("div", { className: "gantt-filter-right", children: [
2429
2432
  /* @__PURE__ */ t.jsx(
2430
- Oe,
2433
+ ke,
2431
2434
  {
2432
2435
  value: s.status,
2433
2436
  onChange: (d) => c({ status: d }),
@@ -2442,7 +2445,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2442
2445
  }
2443
2446
  ),
2444
2447
  /* @__PURE__ */ t.jsx(
2445
- Oe,
2448
+ ke,
2446
2449
  {
2447
2450
  value: s.priority,
2448
2451
  onChange: (d) => c({ priority: d }),
@@ -2457,7 +2460,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2457
2460
  }
2458
2461
  ),
2459
2462
  /* @__PURE__ */ t.jsx(
2460
- Oe,
2463
+ ke,
2461
2464
  {
2462
2465
  value: s.owner || void 0,
2463
2466
  onChange: (d) => c({ owner: d || "" }),
@@ -2476,7 +2479,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2476
2479
  {
2477
2480
  type: "default",
2478
2481
  danger: !0,
2479
- icon: /* @__PURE__ */ t.jsx(De, { icon: qr }),
2482
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: qr }),
2480
2483
  onClick: b,
2481
2484
  className: "gantt-filter-clear-antd",
2482
2485
  children: n.clearFiltersText || "Clear"
@@ -2484,7 +2487,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2484
2487
  )
2485
2488
  ] })
2486
2489
  ] }) });
2487
- }, ct = (e, a) => e ? typeof e == "string" ? /* @__PURE__ */ t.jsx(De, { icon: a }) : e : /* @__PURE__ */ t.jsx(De, { icon: a }), Tn = ({
2490
+ }, ct = (e, a) => e ? typeof e == "string" ? /* @__PURE__ */ t.jsx(Ee, { icon: a }) : e : /* @__PURE__ */ t.jsx(Ee, { icon: a }), Tn = ({
2488
2491
  zoomLevel: e,
2489
2492
  setZoomLevel: a,
2490
2493
  timelineView: n,
@@ -2496,9 +2499,9 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2496
2499
  onAddTask: d,
2497
2500
  uiConfig: p,
2498
2501
  iconConfig: h = {},
2499
- styleConfig: S
2502
+ styleConfig: v
2500
2503
  }) => {
2501
- const x = jt(S), m = p.showZoomButtons !== !1, E = p.showExportButtons !== !1, R = s.length > 1 && r, N = m && E;
2504
+ const y = jt(v), m = p.showZoomButtons !== !1, E = p.showExportButtons !== !1, F = s.length > 1 && r, N = m && E;
2502
2505
  return /* @__PURE__ */ t.jsxs("div", { className: "gantt-toolbar-wrapper", children: [
2503
2506
  /* @__PURE__ */ t.jsxs("div", { className: "gantt-toolbar", children: [
2504
2507
  /* @__PURE__ */ t.jsx("div", { className: "gantt-toolbar-left", children: /* @__PURE__ */ t.jsx(er, { size: 8, children: p.showAddTaskButton !== !1 && /* @__PURE__ */ t.jsx(
@@ -2507,12 +2510,12 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2507
2510
  type: "primary",
2508
2511
  icon: ct(h.addTask, ar),
2509
2512
  onClick: () => d?.(),
2510
- style: x.buttonPrimary,
2513
+ style: y.buttonPrimary,
2511
2514
  children: p.addTaskButtonText || "New Stage"
2512
2515
  }
2513
2516
  ) }) }),
2514
2517
  /* @__PURE__ */ t.jsx("div", { className: "gantt-toolbar-right", children: /* @__PURE__ */ t.jsxs(er, { size: 4, children: [
2515
- R && n && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2518
+ F && n && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2516
2519
  /* @__PURE__ */ t.jsx(
2517
2520
  Br,
2518
2521
  {
@@ -2530,7 +2533,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2530
2533
  {
2531
2534
  icon: ct(h.zoomOut, Gr),
2532
2535
  onClick: () => a(Math.max(0.5, e - 0.25)),
2533
- style: x.buttonSecondary
2536
+ style: y.buttonSecondary
2534
2537
  }
2535
2538
  ) }),
2536
2539
  /* @__PURE__ */ t.jsx(nt, { title: p.zoomInTooltip || "Zoom In", children: /* @__PURE__ */ t.jsx(
@@ -2538,7 +2541,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2538
2541
  {
2539
2542
  icon: ct(h.zoomIn, Jr),
2540
2543
  onClick: () => a(Math.min(2, e + 0.25)),
2541
- style: x.buttonSecondary
2544
+ style: y.buttonSecondary
2542
2545
  }
2543
2546
  ) }),
2544
2547
  /* @__PURE__ */ t.jsx(nt, { title: p.resetZoomTooltip || "Reset Zoom", children: /* @__PURE__ */ t.jsx(
@@ -2546,7 +2549,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2546
2549
  {
2547
2550
  icon: ct(h.resetZoom, jr),
2548
2551
  onClick: () => a(1),
2549
- style: x.buttonSecondary
2552
+ style: y.buttonSecondary
2550
2553
  }
2551
2554
  ) })
2552
2555
  ] }),
@@ -2557,7 +2560,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2557
2560
  {
2558
2561
  icon: ct(h.exportCSV, Kr),
2559
2562
  onClick: () => c("csv"),
2560
- style: x.buttonSecondary
2563
+ style: y.buttonSecondary
2561
2564
  }
2562
2565
  ) }),
2563
2566
  /* @__PURE__ */ t.jsx(nt, { title: p.exportExcelTooltip || "Export to Excel", children: /* @__PURE__ */ t.jsx(
@@ -2565,7 +2568,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2565
2568
  {
2566
2569
  icon: ct(h.exportExcel, Zr),
2567
2570
  onClick: () => c("excel"),
2568
- style: x.buttonSecondary
2571
+ style: y.buttonSecondary
2569
2572
  }
2570
2573
  ) }),
2571
2574
  /* @__PURE__ */ t.jsx(nt, { title: p.exportJSONTooltip || "Export to JSON", children: /* @__PURE__ */ t.jsx(
@@ -2573,7 +2576,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2573
2576
  {
2574
2577
  icon: ct(h.exportJSON, Qr),
2575
2578
  onClick: () => c("json"),
2576
- style: x.buttonSecondary
2579
+ style: y.buttonSecondary
2577
2580
  }
2578
2581
  ) }),
2579
2582
  /* @__PURE__ */ t.jsx(nt, { title: p.exportPDFTooltip || "Export to PDF", children: /* @__PURE__ */ t.jsx(
@@ -2581,7 +2584,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2581
2584
  {
2582
2585
  icon: ct(h.exportPDF, en),
2583
2586
  onClick: () => c("pdf"),
2584
- style: x.buttonSecondary
2587
+ style: y.buttonSecondary
2585
2588
  }
2586
2589
  ) })
2587
2590
  ] })
@@ -2596,13 +2599,13 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2596
2599
  }
2597
2600
  )
2598
2601
  ] });
2599
- }, { Option: St } = Oe, { TextArea: Dn } = pt, Mn = ({ onCreateTask: e, onClose: a, uiConfig: n = {}, parentId: s, parentTaskName: r, styleConfig: c }) => {
2600
- const [b] = ve.useForm(), u = jt(c), d = (p) => {
2601
- const h = p.start.toDate(), S = new Date(h);
2602
- S.setDate(S.getDate() + (p.duration || 1)), e({
2602
+ }, { Option: St } = ke, { TextArea: Dn } = pt, Mn = ({ onCreateTask: e, onClose: a, uiConfig: n = {}, parentId: s, parentTaskName: r, styleConfig: c }) => {
2603
+ const [b] = je.useForm(), u = jt(c), d = (p) => {
2604
+ const h = p.start.toDate(), v = new Date(h);
2605
+ v.setDate(v.getDate() + (p.duration || 1)), e({
2603
2606
  text: p.text,
2604
2607
  start: h,
2605
- end: S,
2608
+ end: v,
2606
2609
  duration: p.duration || 1,
2607
2610
  progress: p.progress || 0,
2608
2611
  type: p.type,
@@ -2615,7 +2618,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2615
2618
  }, s), a();
2616
2619
  };
2617
2620
  return /* @__PURE__ */ t.jsx(
2618
- _t,
2621
+ At,
2619
2622
  {
2620
2623
  title: s ? (n.taskCreatorTitle || "Create Checklist") + (r ? ` for "${r}"` : "") : n.taskCreatorTitle || "Create New Stage",
2621
2624
  open: !0,
@@ -2632,7 +2635,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2632
2635
  okButtonProps: { style: u.buttonPrimary },
2633
2636
  cancelButtonProps: { style: u.buttonSecondary },
2634
2637
  children: /* @__PURE__ */ t.jsxs(
2635
- ve,
2638
+ je,
2636
2639
  {
2637
2640
  form: b,
2638
2641
  layout: "vertical",
@@ -2647,7 +2650,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2647
2650
  },
2648
2651
  children: [
2649
2652
  /* @__PURE__ */ t.jsx(
2650
- ve.Item,
2653
+ je.Item,
2651
2654
  {
2652
2655
  name: "text",
2653
2656
  label: n.taskNameLabel || "Stage Name",
@@ -2656,40 +2659,40 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2656
2659
  }
2657
2660
  ),
2658
2661
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2659
- /* @__PURE__ */ t.jsx(ve.Item, { name: "type", label: n.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(Oe, { style: u.input, children: [
2662
+ /* @__PURE__ */ t.jsx(je.Item, { name: "type", label: n.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(ke, { style: u.input, children: [
2660
2663
  /* @__PURE__ */ t.jsx(St, { value: "task", children: n.taskTypeOptions?.task || "Stage" }),
2661
2664
  /* @__PURE__ */ t.jsx(St, { value: "milestone", children: n.taskTypeOptions?.milestone || "Milestone" }),
2662
2665
  /* @__PURE__ */ t.jsx(St, { value: "project", children: n.taskTypeOptions?.project || "Project" })
2663
2666
  ] }) }),
2664
- /* @__PURE__ */ t.jsx(ve.Item, { name: "priority", label: n.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(Oe, { style: u.input, children: [
2667
+ /* @__PURE__ */ t.jsx(je.Item, { name: "priority", label: n.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(ke, { style: u.input, children: [
2665
2668
  /* @__PURE__ */ t.jsx(St, { value: "low", children: n.priorityOptions?.low || "Low" }),
2666
2669
  /* @__PURE__ */ t.jsx(St, { value: "medium", children: n.priorityOptions?.medium || "Medium" }),
2667
2670
  /* @__PURE__ */ t.jsx(St, { value: "high", children: n.priorityOptions?.high || "High" })
2668
2671
  ] }) })
2669
2672
  ] }),
2670
2673
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2671
- /* @__PURE__ */ t.jsx(ve.Item, { name: "start", label: n.startDateLabel || "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(Sr, { style: { width: "100%", ...u.input } }) }),
2672
- /* @__PURE__ */ t.jsx(ve.Item, { name: "duration", label: n.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, style: { width: "100%", ...u.input } }) })
2674
+ /* @__PURE__ */ t.jsx(je.Item, { name: "start", label: n.startDateLabel || "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(Sr, { style: { width: "100%", ...u.input } }) }),
2675
+ /* @__PURE__ */ t.jsx(je.Item, { name: "duration", label: n.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, style: { width: "100%", ...u.input } }) })
2673
2676
  ] }),
2674
2677
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2675
- /* @__PURE__ */ t.jsx(ve.Item, { name: "color", label: n.colorLabel || "Color", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(vr, { showText: !0 }) }),
2676
- /* @__PURE__ */ t.jsx(ve.Item, { name: "progress", label: n.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, max: 100, style: { width: "100%", ...u.input } }) })
2678
+ /* @__PURE__ */ t.jsx(je.Item, { name: "color", label: n.colorLabel || "Color", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(vr, { showText: !0 }) }),
2679
+ /* @__PURE__ */ t.jsx(je.Item, { name: "progress", label: n.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, max: 100, style: { width: "100%", ...u.input } }) })
2677
2680
  ] }),
2678
- /* @__PURE__ */ t.jsx(ve.Item, { name: "owner", label: n.ownerLabel || "Owner", children: /* @__PURE__ */ t.jsx(pt, { placeholder: n.ownerPlaceholder || "Assign to...", style: u.input }) }),
2679
- /* @__PURE__ */ t.jsx(ve.Item, { name: "details", label: n.detailsLabel || "Details", children: /* @__PURE__ */ t.jsx(Dn, { placeholder: n.detailsPlaceholder || "Add stage description...", rows: 3, style: u.input }) })
2681
+ /* @__PURE__ */ t.jsx(je.Item, { name: "owner", label: n.ownerLabel || "Owner", children: /* @__PURE__ */ t.jsx(pt, { placeholder: n.ownerPlaceholder || "Assign to...", style: u.input }) }),
2682
+ /* @__PURE__ */ t.jsx(je.Item, { name: "details", label: n.detailsLabel || "Details", children: /* @__PURE__ */ t.jsx(Dn, { placeholder: n.detailsPlaceholder || "Add stage description...", rows: 3, style: u.input }) })
2680
2683
  ]
2681
2684
  }
2682
2685
  )
2683
2686
  }
2684
2687
  );
2685
- }, { Option: vt } = Oe, { TextArea: En } = pt, { confirm: Ln } = _t, Fn = ({ task: e, onUpdate: a, onDelete: n, onClose: s, uiConfig: r = {}, styleConfig: c }) => {
2686
- const [b] = ve.useForm(), u = jt(c), d = (h) => {
2687
- const S = h.start.toDate(), x = new Date(S);
2688
- x.setDate(x.getDate() + (h.duration || 1)), a({
2688
+ }, { Option: vt } = ke, { TextArea: En } = pt, { confirm: Ln } = At, Fn = ({ task: e, onUpdate: a, onDelete: n, onClose: s, uiConfig: r = {}, styleConfig: c }) => {
2689
+ const [b] = je.useForm(), u = jt(c), d = (h) => {
2690
+ const v = h.start.toDate(), y = new Date(v);
2691
+ y.setDate(y.getDate() + (h.duration || 1)), a({
2689
2692
  ...e,
2690
2693
  text: h.text,
2691
- start: S,
2692
- end: x,
2694
+ start: v,
2695
+ end: y,
2693
2696
  duration: h.duration || 1,
2694
2697
  progress: h.progress || 0,
2695
2698
  type: h.type,
@@ -2701,7 +2704,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2701
2704
  }, p = () => {
2702
2705
  Ln({
2703
2706
  title: r.deleteConfirmTitle ? `${r.deleteConfirmTitle}: "${e.text}"?` : `Are you sure you want to delete "${e.text}"?`,
2704
- icon: /* @__PURE__ */ t.jsx(De, { icon: tn, style: { color: "#faad14", marginRight: 8 } }),
2707
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: tn, style: { color: "#faad14", marginRight: 8 } }),
2705
2708
  content: r.deleteConfirmContent || "This action cannot be undone.",
2706
2709
  okText: r.deleteConfirmOkText || "Yes, Delete",
2707
2710
  okType: "danger",
@@ -2712,7 +2715,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2712
2715
  });
2713
2716
  };
2714
2717
  return /* @__PURE__ */ t.jsx(
2715
- _t,
2718
+ At,
2716
2719
  {
2717
2720
  title: r.taskEditorTitle || "Edit Stage",
2718
2721
  open: !0,
@@ -2729,7 +2732,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2729
2732
  header: { borderBottom: `1px solid ${u.modal?.borderColor || "#f0f0f0"}`, marginBottom: 16 }
2730
2733
  },
2731
2734
  children: /* @__PURE__ */ t.jsxs(
2732
- ve,
2735
+ je,
2733
2736
  {
2734
2737
  form: b,
2735
2738
  layout: "vertical",
@@ -2747,7 +2750,7 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2747
2750
  },
2748
2751
  children: [
2749
2752
  /* @__PURE__ */ t.jsx(
2750
- ve.Item,
2753
+ je.Item,
2751
2754
  {
2752
2755
  name: "text",
2753
2756
  label: r.taskNameLabel || "Stage Name",
@@ -2756,33 +2759,33 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2756
2759
  }
2757
2760
  ),
2758
2761
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2759
- /* @__PURE__ */ t.jsx(ve.Item, { name: "type", label: r.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(Oe, { style: u.input, children: [
2762
+ /* @__PURE__ */ t.jsx(je.Item, { name: "type", label: r.typeLabel || "Type", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(ke, { style: u.input, children: [
2760
2763
  /* @__PURE__ */ t.jsx(vt, { value: "task", children: r.taskTypeOptions?.task || "Stage" }),
2761
2764
  /* @__PURE__ */ t.jsx(vt, { value: "milestone", children: r.taskTypeOptions?.milestone || "Milestone" }),
2762
2765
  /* @__PURE__ */ t.jsx(vt, { value: "project", children: r.taskTypeOptions?.project || "Project" })
2763
2766
  ] }) }),
2764
- /* @__PURE__ */ t.jsx(ve.Item, { name: "priority", label: r.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(Oe, { style: u.input, children: [
2767
+ /* @__PURE__ */ t.jsx(je.Item, { name: "priority", label: r.priorityLabel || "Priority", style: { flex: 1 }, children: /* @__PURE__ */ t.jsxs(ke, { style: u.input, children: [
2765
2768
  /* @__PURE__ */ t.jsx(vt, { value: "low", children: r.priorityOptions?.low || "Low" }),
2766
2769
  /* @__PURE__ */ t.jsx(vt, { value: "medium", children: r.priorityOptions?.medium || "Medium" }),
2767
2770
  /* @__PURE__ */ t.jsx(vt, { value: "high", children: r.priorityOptions?.high || "High" })
2768
2771
  ] }) })
2769
2772
  ] }),
2770
2773
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2771
- /* @__PURE__ */ t.jsx(ve.Item, { name: "start", label: r.startDateLabel || "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(Sr, { style: { width: "100%", ...u.input } }) }),
2772
- /* @__PURE__ */ t.jsx(ve.Item, { name: "duration", label: r.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, style: { width: "100%", ...u.input } }) })
2774
+ /* @__PURE__ */ t.jsx(je.Item, { name: "start", label: r.startDateLabel || "Start Date", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(Sr, { style: { width: "100%", ...u.input } }) }),
2775
+ /* @__PURE__ */ t.jsx(je.Item, { name: "duration", label: r.durationLabel || "Duration (days)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, style: { width: "100%", ...u.input } }) })
2773
2776
  ] }),
2774
2777
  /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 16 }, children: [
2775
- /* @__PURE__ */ t.jsx(ve.Item, { name: "color", label: r.colorLabel || "Color", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(vr, { showText: !0 }) }),
2776
- /* @__PURE__ */ t.jsx(ve.Item, { name: "progress", label: r.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, max: 100, style: { width: "100%", ...u.input } }) })
2778
+ /* @__PURE__ */ t.jsx(je.Item, { name: "color", label: r.colorLabel || "Color", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(vr, { showText: !0 }) }),
2779
+ /* @__PURE__ */ t.jsx(je.Item, { name: "progress", label: r.progressLabel || "Progress (%)", style: { flex: 1 }, children: /* @__PURE__ */ t.jsx(at, { min: 0, max: 100, style: { width: "100%", ...u.input } }) })
2777
2780
  ] }),
2778
- /* @__PURE__ */ t.jsx(ve.Item, { name: "owner", label: r.ownerLabel || "Owner", children: /* @__PURE__ */ t.jsx(pt, { placeholder: r.ownerPlaceholder || "Assign to...", style: u.input }) }),
2779
- /* @__PURE__ */ t.jsx(ve.Item, { name: "details", label: r.detailsLabel || "Details", children: /* @__PURE__ */ t.jsx(En, { placeholder: r.detailsPlaceholder || "Add stage description...", rows: 3, style: u.input }) })
2781
+ /* @__PURE__ */ t.jsx(je.Item, { name: "owner", label: r.ownerLabel || "Owner", children: /* @__PURE__ */ t.jsx(pt, { placeholder: r.ownerPlaceholder || "Assign to...", style: u.input }) }),
2782
+ /* @__PURE__ */ t.jsx(je.Item, { name: "details", label: r.detailsLabel || "Details", children: /* @__PURE__ */ t.jsx(En, { placeholder: r.detailsPlaceholder || "Add stage description...", rows: 3, style: u.input }) })
2780
2783
  ]
2781
2784
  }
2782
2785
  )
2783
2786
  }
2784
2787
  );
2785
- }, { Title: Pt, Text: gt, Paragraph: Rn } = br, { Option: rt } = Oe, Pn = ({
2788
+ }, { Title: Pt, Text: gt, Paragraph: Rn } = br, { Option: rt } = ke, Pn = ({
2786
2789
  task: e,
2787
2790
  allTasks: a,
2788
2791
  links: n,
@@ -2792,36 +2795,36 @@ const { Search: vn } = pt, jn = ({ onFilterChange: e, owners: a = [], uiConfig:
2792
2795
  onClose: b,
2793
2796
  styleConfig: u
2794
2797
  }) => {
2795
- const d = jt(u), [p, h] = G(""), [S, x] = G("e2s"), [m, E] = G(0), [R, N] = G("day"), [M, v] = G(e.duration), [y, C] = G(""), K = n.filter((F) => F.target === e.id), W = a.filter((F) => F.id !== e.id && F.id !== e.parent), re = () => {
2798
+ const d = jt(u), [p, h] = G(""), [v, y] = G("e2s"), [m, E] = G(0), [F, N] = G("day"), [M, S] = G(e.duration), [w, C] = G(""), Z = n.filter((R) => R.target === e.id), W = a.filter((R) => R.id !== e.id && R.id !== e.parent), re = () => {
2796
2799
  if (p) {
2797
- const F = rr(m, R);
2800
+ const R = rr(m, F);
2798
2801
  if (M !== e.duration && c) {
2799
- const k = je(new Date(e.start), M, "day");
2802
+ const O = Te(new Date(e.start), M, "day");
2800
2803
  c({
2801
2804
  ...e,
2802
2805
  duration: M,
2803
- end: k
2806
+ end: O
2804
2807
  });
2805
2808
  }
2806
- s(p, e.id, S, F), h(""), E(0), N("day");
2809
+ s(p, e.id, v, R), h(""), E(0), N("day");
2807
2810
  }
2808
2811
  }, le = () => {
2809
- if (!y.trim()) return;
2810
- const F = hn(y.trim());
2811
- if (!F) {
2812
+ if (!w.trim()) return;
2813
+ const R = hn(w.trim());
2814
+ if (!R) {
2812
2815
  alert(`Invalid format. Use: [TaskNumber][Type][+/-][Lag][Unit]
2813
2816
  Example: 3FS+10d`);
2814
2817
  return;
2815
2818
  }
2816
- const k = F.taskNumber - 1, B = a[k];
2819
+ const O = R.taskNumber - 1, B = a[O];
2817
2820
  if (!B) {
2818
- alert(`Task ${F.taskNumber} not found`);
2821
+ alert(`Task ${R.taskNumber} not found`);
2819
2822
  return;
2820
2823
  }
2821
- const Y = fn(F.type), O = rr(F.lag, F.lagUnit);
2822
- s(B.id, e.id, Y, O), C("");
2823
- }, j = (F) => {
2824
- switch (F) {
2824
+ const Y = fn(R.type), k = rr(R.lag, R.lagUnit);
2825
+ s(B.id, e.id, Y, k), C("");
2826
+ }, j = (R) => {
2827
+ switch (R) {
2825
2828
  case "e2s":
2826
2829
  return "Finish-to-Start (FS)";
2827
2830
  case "s2s":
@@ -2831,8 +2834,8 @@ Example: 3FS+10d`);
2831
2834
  case "s2e":
2832
2835
  return "Start-to-Finish (SF)";
2833
2836
  }
2834
- }, X = (F) => {
2835
- switch (F) {
2837
+ }, X = (R) => {
2838
+ switch (R) {
2836
2839
  case "e2s":
2837
2840
  return "blue";
2838
2841
  case "s2s":
@@ -2844,7 +2847,7 @@ Example: 3FS+10d`);
2844
2847
  }
2845
2848
  };
2846
2849
  return /* @__PURE__ */ t.jsx(
2847
- _t,
2850
+ At,
2848
2851
  {
2849
2852
  title: /* @__PURE__ */ t.jsx(Pt, { level: 4, style: { margin: 0, color: d.font?.color }, children: "Dependency Editor" }),
2850
2853
  open: !0,
@@ -2877,7 +2880,7 @@ Example: 3FS+10d`);
2877
2880
  /* @__PURE__ */ t.jsxs("div", { children: [
2878
2881
  /* @__PURE__ */ t.jsx(gt, { style: { display: "block", marginBottom: 8, fontSize: 13, color: d.font?.color }, children: "Predecessor" }),
2879
2882
  /* @__PURE__ */ t.jsx(
2880
- Oe,
2883
+ ke,
2881
2884
  {
2882
2885
  showSearch: !0,
2883
2886
  placeholder: "Select a task",
@@ -2885,23 +2888,23 @@ Example: 3FS+10d`);
2885
2888
  style: { width: "100%", ...d.input },
2886
2889
  value: p,
2887
2890
  onChange: h,
2888
- children: W.map((F) => /* @__PURE__ */ t.jsxs(rt, { value: F.id, children: [
2891
+ children: W.map((R) => /* @__PURE__ */ t.jsxs(rt, { value: R.id, children: [
2889
2892
  "[",
2890
- a.indexOf(F) + 1,
2893
+ a.indexOf(R) + 1,
2891
2894
  "] ",
2892
- F.text
2893
- ] }, F.id))
2895
+ R.text
2896
+ ] }, R.id))
2894
2897
  }
2895
2898
  )
2896
2899
  ] }),
2897
2900
  /* @__PURE__ */ t.jsxs("div", { children: [
2898
2901
  /* @__PURE__ */ t.jsx(gt, { style: { display: "block", marginBottom: 8, fontSize: 13, color: d.font?.color }, children: "Type" }),
2899
2902
  /* @__PURE__ */ t.jsxs(
2900
- Oe,
2903
+ ke,
2901
2904
  {
2902
2905
  style: { width: "100%", ...d.input },
2903
- value: S,
2904
- onChange: x,
2906
+ value: v,
2907
+ onChange: y,
2905
2908
  children: [
2906
2909
  /* @__PURE__ */ t.jsx(rt, { value: "e2s", children: "Finish-to-Start (FS)" }),
2907
2910
  /* @__PURE__ */ t.jsx(rt, { value: "s2s", children: "Start-to-Start (SS)" }),
@@ -2919,17 +2922,17 @@ Example: 3FS+10d`);
2919
2922
  {
2920
2923
  style: { width: "100%", ...d.input },
2921
2924
  value: m,
2922
- onChange: (F) => E(F || 0)
2925
+ onChange: (R) => E(R || 0)
2923
2926
  }
2924
2927
  )
2925
2928
  ] }),
2926
2929
  /* @__PURE__ */ t.jsxs("div", { style: { flex: 1 }, children: [
2927
2930
  /* @__PURE__ */ t.jsx(gt, { style: { display: "block", marginBottom: 8, fontSize: 13, color: d.font?.color }, children: "Units" }),
2928
2931
  /* @__PURE__ */ t.jsxs(
2929
- Oe,
2932
+ ke,
2930
2933
  {
2931
2934
  style: { width: "100%", ...d.input },
2932
- value: R,
2935
+ value: F,
2933
2936
  onChange: N,
2934
2937
  children: [
2935
2938
  /* @__PURE__ */ t.jsx(rt, { value: "day", children: "Days" }),
@@ -2949,7 +2952,7 @@ Example: 3FS+10d`);
2949
2952
  style: { width: "100%", ...d.input },
2950
2953
  min: 1,
2951
2954
  value: M,
2952
- onChange: (F) => v(F || 1)
2955
+ onChange: (R) => S(R || 1)
2953
2956
  }
2954
2957
  )
2955
2958
  ] }),
@@ -2957,7 +2960,7 @@ Example: 3FS+10d`);
2957
2960
  Pe,
2958
2961
  {
2959
2962
  type: "primary",
2960
- icon: /* @__PURE__ */ t.jsx(De, { icon: ar, style: { marginRight: 8 } }),
2963
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: ar, style: { marginRight: 8 } }),
2961
2964
  block: !0,
2962
2965
  onClick: re,
2963
2966
  disabled: !p,
@@ -2989,8 +2992,8 @@ Example: 3FS+10d`);
2989
2992
  pt,
2990
2993
  {
2991
2994
  placeholder: "e.g. 5FS+2d",
2992
- value: y,
2993
- onChange: (F) => C(F.target.value),
2995
+ value: w,
2996
+ onChange: (R) => C(R.target.value),
2994
2997
  onPressEnter: le,
2995
2998
  style: {
2996
2999
  marginBottom: 16,
@@ -3021,10 +3024,10 @@ Example: 3FS+10d`);
3021
3024
  /* @__PURE__ */ t.jsx(
3022
3025
  Jt,
3023
3026
  {
3024
- dataSource: K,
3027
+ dataSource: Z,
3025
3028
  locale: { emptyText: /* @__PURE__ */ t.jsx(gt, { type: "secondary", style: { color: d.font?.color, opacity: 0.5 }, children: "No dependencies added yet." }) },
3026
- renderItem: (F) => {
3027
- const k = a.find((B) => B.id === F.source);
3029
+ renderItem: (R) => {
3030
+ const O = a.find((B) => B.id === R.source);
3028
3031
  return /* @__PURE__ */ t.jsx(
3029
3032
  Jt.Item,
3030
3033
  {
@@ -3041,8 +3044,8 @@ Example: 3FS+10d`);
3041
3044
  {
3042
3045
  type: "text",
3043
3046
  danger: !0,
3044
- icon: /* @__PURE__ */ t.jsx(De, { icon: Dr }),
3045
- onClick: () => r(F.id)
3047
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: Dr }),
3048
+ onClick: () => r(R.id)
3046
3049
  },
3047
3050
  "delete"
3048
3051
  )
@@ -3061,15 +3064,15 @@ Example: 3FS+10d`);
3061
3064
  color: "#fff",
3062
3065
  fontSize: 12,
3063
3066
  fontWeight: "bold"
3064
- }, children: k ? a.indexOf(k) + 1 : "?" }),
3067
+ }, children: O ? a.indexOf(O) + 1 : "?" }),
3065
3068
  title: /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12 }, children: [
3066
- /* @__PURE__ */ t.jsx("span", { style: { fontWeight: 600, color: d.font?.color }, children: k?.text || "Unknown Task" }),
3067
- /* @__PURE__ */ t.jsx(Wr, { color: X(F.type), style: { margin: 0 }, children: j(F.type) })
3069
+ /* @__PURE__ */ t.jsx("span", { style: { fontWeight: 600, color: d.font?.color }, children: O?.text || "Unknown Task" }),
3070
+ /* @__PURE__ */ t.jsx(Wr, { color: X(R.type), style: { margin: 0 }, children: j(R.type) })
3068
3071
  ] }),
3069
3072
  description: /* @__PURE__ */ t.jsx("div", { style: { display: "flex", alignItems: "center", gap: 16, marginTop: 4 }, children: /* @__PURE__ */ t.jsxs("span", { style: { fontSize: 12, color: d.font?.color, opacity: 0.7 }, children: [
3070
- /* @__PURE__ */ t.jsx(De, { icon: Tr, style: { marginRight: 6 } }),
3073
+ /* @__PURE__ */ t.jsx(Ee, { icon: Tr, style: { marginRight: 6 } }),
3071
3074
  "Lag: ",
3072
- F.lag || 0,
3075
+ R.lag || 0,
3073
3076
  " days"
3074
3077
  ] }) })
3075
3078
  }
@@ -3082,7 +3085,7 @@ Example: 3FS+10d`);
3082
3085
  ] }),
3083
3086
  /* @__PURE__ */ t.jsxs("div", { style: { marginTop: 24, padding: "16px", background: "#fff7e6", borderRadius: 8, border: "1px solid #ffe7ba" }, children: [
3084
3087
  /* @__PURE__ */ t.jsxs(Pt, { level: 5, style: { fontSize: 13, marginBottom: 8, display: "flex", alignItems: "center" }, children: [
3085
- /* @__PURE__ */ t.jsx(De, { icon: rn, style: { marginRight: 8, color: "#fa8c16" } }),
3088
+ /* @__PURE__ */ t.jsx(Ee, { icon: rn, style: { marginRight: 8, color: "#fa8c16" } }),
3086
3089
  "Coming soon"
3087
3090
  ] }),
3088
3091
  /* @__PURE__ */ t.jsx(gt, { style: { fontSize: 12, color: "rgba(0,0,0,0.65)" }, children: "Dependency visualization on the chart and automatic lag calculations based on working hours." })
@@ -3102,34 +3105,34 @@ Example: 3FS+10d`);
3102
3105
  onConvertToTask: d,
3103
3106
  onConvertToProject: p,
3104
3107
  onAutoSchedule: h,
3105
- onClose: S,
3106
- styleConfig: x
3108
+ onClose: v,
3109
+ styleConfig: y
3107
3110
  }) => {
3108
- const m = jt(x);
3111
+ const m = jt(y);
3109
3112
  if (!n) return null;
3110
3113
  const E = [
3111
3114
  {
3112
3115
  key: "edit",
3113
3116
  label: "Edit",
3114
- icon: /* @__PURE__ */ t.jsx(De, { icon: nn }),
3117
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: nn }),
3115
3118
  onClick: () => {
3116
- s(), S();
3119
+ s(), v();
3117
3120
  }
3118
3121
  },
3119
3122
  {
3120
3123
  key: "copy",
3121
3124
  label: "Copy",
3122
- icon: /* @__PURE__ */ t.jsx(De, { icon: an }),
3125
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: an }),
3123
3126
  onClick: () => {
3124
- c(), S();
3127
+ c(), v();
3125
3128
  }
3126
3129
  },
3127
3130
  {
3128
3131
  key: "dependencies",
3129
3132
  label: "Dependencies",
3130
- icon: /* @__PURE__ */ t.jsx(De, { icon: Tr }),
3133
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: Tr }),
3131
3134
  onClick: () => {
3132
- b(), S();
3135
+ b(), v();
3133
3136
  }
3134
3137
  },
3135
3138
  {
@@ -3143,28 +3146,28 @@ Example: 3FS+10d`);
3143
3146
  {
3144
3147
  key: "milestone",
3145
3148
  label: "Milestone",
3146
- icon: /* @__PURE__ */ t.jsx(De, { icon: on }),
3149
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: on }),
3147
3150
  disabled: n.type === "milestone",
3148
3151
  onClick: () => {
3149
- u(), S();
3152
+ u(), v();
3150
3153
  }
3151
3154
  },
3152
3155
  {
3153
3156
  key: "task",
3154
3157
  label: "Task",
3155
- icon: /* @__PURE__ */ t.jsx(De, { icon: sn }),
3158
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: sn }),
3156
3159
  disabled: n.type === "task",
3157
3160
  onClick: () => {
3158
- d(), S();
3161
+ d(), v();
3159
3162
  }
3160
3163
  },
3161
3164
  {
3162
3165
  key: "project",
3163
3166
  label: "Project",
3164
- icon: /* @__PURE__ */ t.jsx(De, { icon: ln }),
3167
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: ln }),
3165
3168
  disabled: n.type === "project",
3166
3169
  onClick: () => {
3167
- p(), S();
3170
+ p(), v();
3168
3171
  }
3169
3172
  }
3170
3173
  ]
@@ -3172,9 +3175,9 @@ Example: 3FS+10d`);
3172
3175
  {
3173
3176
  key: "auto-schedule",
3174
3177
  label: "Auto Schedule",
3175
- icon: /* @__PURE__ */ t.jsx(De, { icon: jr }),
3178
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: jr }),
3176
3179
  onClick: () => {
3177
- h?.(), S();
3180
+ h?.(), v();
3178
3181
  }
3179
3182
  },
3180
3183
  {
@@ -3183,10 +3186,10 @@ Example: 3FS+10d`);
3183
3186
  {
3184
3187
  key: "delete",
3185
3188
  label: "Delete",
3186
- icon: /* @__PURE__ */ t.jsx(De, { icon: Dr }),
3189
+ icon: /* @__PURE__ */ t.jsx(Ee, { icon: Dr }),
3187
3190
  danger: !0,
3188
3191
  onClick: () => {
3189
- r(), S();
3192
+ r(), v();
3190
3193
  }
3191
3194
  }
3192
3195
  ];
@@ -3200,7 +3203,7 @@ Example: 3FS+10d`);
3200
3203
  top: `${a}px`,
3201
3204
  zIndex: 1e4
3202
3205
  },
3203
- onClick: (R) => R.stopPropagation(),
3206
+ onClick: (F) => F.stopPropagation(),
3204
3207
  children: /* @__PURE__ */ t.jsx(
3205
3208
  Vr,
3206
3209
  {
@@ -3217,49 +3220,49 @@ Example: 3FS+10d`);
3217
3220
  )
3218
3221
  }
3219
3222
  );
3220
- }, kn = (e, a = []) => {
3223
+ }, On = (e, a = []) => {
3221
3224
  const [n, s] = G([]), [r, c] = G(-1), [b, u] = G(e), [d, p] = G(a);
3222
3225
  ut(() => {
3223
3226
  u(e);
3224
3227
  }, [e]), ut(() => {
3225
3228
  p(a);
3226
3229
  }, [a]);
3227
- const h = Je((v, y, C) => {
3228
- const K = {
3229
- type: v,
3230
- before: y,
3230
+ const h = Je((S, w, C) => {
3231
+ const Z = {
3232
+ type: S,
3233
+ before: w,
3231
3234
  after: C,
3232
3235
  timestamp: Date.now()
3233
3236
  }, W = n.slice(0, r + 1);
3234
- W.push(K), W.length > 50 ? W.shift() : c(r + 1), s(W);
3235
- }, [n, r]), S = Je(() => {
3237
+ W.push(Z), W.length > 50 ? W.shift() : c(r + 1), s(W);
3238
+ }, [n, r]), v = Je(() => {
3236
3239
  if (r < 0) return;
3237
- const v = n[r];
3238
- u(v.before.tasks), p(v.before.links), c(r - 1);
3239
- }, [n, r]), x = Je(() => {
3240
+ const S = n[r];
3241
+ u(S.before.tasks), p(S.before.links), c(r - 1);
3242
+ }, [n, r]), y = Je(() => {
3240
3243
  if (r >= n.length - 1) return;
3241
- const v = n[r + 1];
3242
- u(v.after.tasks), p(v.after.links), c(r + 1);
3243
- }, [n, r]), m = r >= 0, E = r < n.length - 1, R = Je((v) => {
3244
- const y = { tasks: b, links: d }, C = b.map((W) => W.id === v.id ? v : W);
3245
- h("task_update", y, { tasks: C, links: d }), u(C);
3246
- }, [b, d, h]), N = Je((v) => {
3247
- const y = { tasks: b, links: d }, C = [...b, v];
3248
- h("task_create", y, { tasks: C, links: d }), u(C);
3249
- }, [b, d, h]), M = Je((v) => {
3250
- const y = { tasks: b, links: d }, C = b.filter((re) => re.id !== v), K = d.filter((re) => re.source !== v && re.target !== v);
3251
- h("task_delete", y, { tasks: C, links: K }), u(C), p(K);
3244
+ const S = n[r + 1];
3245
+ u(S.after.tasks), p(S.after.links), c(r + 1);
3246
+ }, [n, r]), m = r >= 0, E = r < n.length - 1, F = Je((S) => {
3247
+ const w = { tasks: b, links: d }, C = b.map((W) => W.id === S.id ? S : W);
3248
+ h("task_update", w, { tasks: C, links: d }), u(C);
3249
+ }, [b, d, h]), N = Je((S) => {
3250
+ const w = { tasks: b, links: d }, C = [...b, S];
3251
+ h("task_create", w, { tasks: C, links: d }), u(C);
3252
+ }, [b, d, h]), M = Je((S) => {
3253
+ const w = { tasks: b, links: d }, C = b.filter((re) => re.id !== S), Z = d.filter((re) => re.source !== S && re.target !== S);
3254
+ h("task_delete", w, { tasks: C, links: Z }), u(C), p(Z);
3252
3255
  }, [b, d, h]);
3253
3256
  return {
3254
3257
  tasks: b,
3255
3258
  links: d,
3256
3259
  setTasks: u,
3257
3260
  setLinks: p,
3258
- undo: S,
3259
- redo: x,
3261
+ undo: v,
3262
+ redo: y,
3260
3263
  canUndo: m,
3261
3264
  canRedo: E,
3262
- updateTask: R,
3265
+ updateTask: F,
3263
3266
  createTask: N,
3264
3267
  deleteTask: M,
3265
3268
  saveState: h,
@@ -3271,8 +3274,8 @@ Example: 3FS+10d`);
3271
3274
  s.set(c.id, []), r.set(c.id, []);
3272
3275
  }), a.forEach((c) => {
3273
3276
  c.type === "e2s" && (s.get(c.target)?.push(c.source), r.get(c.source)?.push(c.target));
3274
- }), n.mode === "forward" ? On(e, s, n) : $n(e, r, n);
3275
- }, On = (e, a, n) => {
3277
+ }), n.mode === "forward" ? kn(e, s, n) : $n(e, r, n);
3278
+ }, kn = (e, a, n) => {
3276
3279
  const s = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), c = n.projectStart || /* @__PURE__ */ new Date(), b = (u) => {
3277
3280
  if (r.has(u)) return;
3278
3281
  const d = e.find((E) => E.id === u);
@@ -3281,13 +3284,13 @@ Example: 3FS+10d`);
3281
3284
  p.forEach((E) => b(E));
3282
3285
  let h = c;
3283
3286
  p.forEach((E) => {
3284
- const R = s.get(E);
3285
- R && R.end > h && (h = new Date(R.end));
3287
+ const F = s.get(E);
3288
+ F && F.end > h && (h = new Date(F.end));
3286
3289
  });
3287
- const S = new Date(h), x = je(S, d.duration, "day"), m = {
3290
+ const v = new Date(h), y = Te(v, d.duration, "day"), m = {
3288
3291
  ...d,
3289
- start: S,
3290
- end: x
3292
+ start: v,
3293
+ end: y
3291
3294
  };
3292
3295
  s.set(u, m), r.add(u);
3293
3296
  };
@@ -3303,13 +3306,13 @@ Example: 3FS+10d`);
3303
3306
  p.forEach((E) => b(E));
3304
3307
  let h = c;
3305
3308
  p.forEach((E) => {
3306
- const R = s.get(E);
3307
- R && R.start < h && (h = new Date(R.start));
3309
+ const F = s.get(E);
3310
+ F && F.start < h && (h = new Date(F.start));
3308
3311
  });
3309
- const S = new Date(h), x = je(S, -d.duration, "day"), m = {
3312
+ const v = new Date(h), y = Te(v, -d.duration, "day"), m = {
3310
3313
  ...d,
3311
- start: x,
3312
- end: S
3314
+ start: y,
3315
+ end: v
3313
3316
  };
3314
3317
  s.set(u, m), r.add(u);
3315
3318
  };
@@ -3327,7 +3330,7 @@ Example: 3FS+10d`);
3327
3330
  if (b.start < u.end) {
3328
3331
  const d = n.findIndex((p) => p.id === b.id);
3329
3332
  if (d >= 0) {
3330
- const p = new Date(u.end), h = je(p, b.duration, "day");
3333
+ const p = new Date(u.end), h = Te(p, b.duration, "day");
3331
3334
  n[d] = {
3332
3335
  ...b,
3333
3336
  start: p,
@@ -3354,8 +3357,8 @@ Example: 3FS+10d`);
3354
3357
  const a = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority"], n = e.map((r) => [
3355
3358
  r.id,
3356
3359
  r.text,
3357
- ke(r.start, "YYYY-MM-DD"),
3358
- ke(r.end, "YYYY-MM-DD"),
3360
+ Oe(r.start, "YYYY-MM-DD"),
3361
+ Oe(r.end, "YYYY-MM-DD"),
3359
3362
  r.duration.toString(),
3360
3363
  `${r.progress}%`,
3361
3364
  r.type || "task",
@@ -3371,8 +3374,8 @@ Example: 3FS+10d`);
3371
3374
  const a = ["ID", "Task Name", "Start Date", "End Date", "Duration", "Progress", "Type", "Owner", "Priority", "Details"], n = e.map((r) => [
3372
3375
  r.id,
3373
3376
  r.text,
3374
- ke(r.start, "MM/DD/YYYY"),
3375
- ke(r.end, "MM/DD/YYYY"),
3377
+ Oe(r.start, "MM/DD/YYYY"),
3378
+ Oe(r.end, "MM/DD/YYYY"),
3376
3379
  r.duration.toString(),
3377
3380
  r.progress.toString(),
3378
3381
  r.type || "task",
@@ -3386,7 +3389,7 @@ Example: 3FS+10d`);
3386
3389
  ].join(`
3387
3390
  `);
3388
3391
  It(s, "gantt-tasks.xls", "application/vnd.ms-excel");
3389
- }, kr = (e, a) => {
3392
+ }, Or = (e, a) => {
3390
3393
  const n = {
3391
3394
  tasks: e,
3392
3395
  links: a,
@@ -3394,7 +3397,7 @@ Example: 3FS+10d`);
3394
3397
  version: "1.0"
3395
3398
  }, s = JSON.stringify(n, null, 2);
3396
3399
  It(s, "gantt-project.json", "application/json");
3397
- }, Or = (e) => {
3400
+ }, kr = (e) => {
3398
3401
  const a = `
3399
3402
  GANTT CHART PROJECT
3400
3403
  Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
@@ -3402,8 +3405,8 @@ Generated: ${(/* @__PURE__ */ new Date()).toLocaleString()}
3402
3405
  Tasks:
3403
3406
  ${e.map((n, s) => `
3404
3407
  ${s + 1}. ${n.text}
3405
- Start: ${ke(n.start, "MM/DD/YYYY")}
3406
- End: ${ke(n.end, "MM/DD/YYYY")}
3408
+ Start: ${Oe(n.start, "MM/DD/YYYY")}
3409
+ End: ${Oe(n.end, "MM/DD/YYYY")}
3407
3410
  Duration: ${n.duration} days
3408
3411
  Progress: ${n.progress}%
3409
3412
  ${n.owner ? `Owner: ${n.owner}` : ""}
@@ -3411,7 +3414,7 @@ ${s + 1}. ${n.text}
3411
3414
  `)}
3412
3415
  `.trim();
3413
3416
  It(a, "gantt-report.txt", "text/plain"), alert("PDF export is a simplified text version. For full PDF with charts, a PDF library would be needed.");
3414
- }, An = (e, a, n = "png") => {
3417
+ }, _n = (e, a, n = "png") => {
3415
3418
  if (!document.getElementById(e)) {
3416
3419
  alert("Could not find Gantt chart element to export");
3417
3420
  return;
@@ -3423,8 +3426,8 @@ ${s + 1}. ${n.text}
3423
3426
  alert("Image export requires html2canvas library. Install with: npm install html2canvas");
3424
3427
  }, It = (e, a, n) => {
3425
3428
  const s = new Blob([e], { type: n }), r = URL.createObjectURL(s);
3426
- _n(r, a), URL.revokeObjectURL(r);
3427
- }, _n = (e, a) => {
3429
+ An(r, a), URL.revokeObjectURL(r);
3430
+ }, An = (e, a) => {
3428
3431
  const n = document.createElement("a");
3429
3432
  n.href = e, n.download = a, document.body.appendChild(n), n.click(), document.body.removeChild(n);
3430
3433
  }, In = (e) => new Promise((a, n) => {
@@ -3445,9 +3448,9 @@ ${s + 1}. ${n.text}
3445
3448
  __proto__: null,
3446
3449
  exportToCSV: Pr,
3447
3450
  exportToExcel: Nr,
3448
- exportToImage: An,
3449
- exportToJSON: kr,
3450
- exportToPDF: Or,
3451
+ exportToImage: _n,
3452
+ exportToJSON: Or,
3453
+ exportToPDF: kr,
3451
3454
  importFromJSON: In
3452
3455
  }, Symbol.toStringTag, { value: "Module" })), zn = (e, a) => e.filter((n) => {
3453
3456
  if (a.searchText) {
@@ -3531,7 +3534,7 @@ ${s + 1}. ${n.text}
3531
3534
  ), s = Ve(
3532
3535
  e.end ?? e.endDate ?? e.end_date ?? e.plannedEndDate,
3533
3536
  n
3534
- ), r = s.getTime() < n.getTime() ? n : s, c = Ve(e.plannedStart ?? e.planned_start ?? e.planned_start_date, n), b = Ve(e.plannedEnd ?? e.planned_end ?? e.planned_end_date, r), u = b.getTime() < c.getTime() ? c : b, d = Ve(e.actualStart ?? e.actual_start ?? e.actual_start_date, n), p = Ve(e.actualEnd ?? e.actual_end ?? e.actual_end_date, r), h = p.getTime() < d.getTime() ? d : p, S = Math.max(Math.ceil((r.getTime() - n.getTime()) / $r), 0), x = Bn(e.dependencies ?? e.dependsOn ?? e.depends_on), m = Hn(
3537
+ ), r = s.getTime() < n.getTime() ? n : s, c = Ve(e.plannedStart ?? e.planned_start ?? e.planned_start_date, n), b = Ve(e.plannedEnd ?? e.planned_end ?? e.planned_end_date, r), u = b.getTime() < c.getTime() ? c : b, d = Ve(e.actualStart ?? e.actual_start ?? e.actual_start_date, n), p = Ve(e.actualEnd ?? e.actual_end ?? e.actual_end_date, r), h = p.getTime() < d.getTime() ? d : p, v = Math.max(Math.ceil((r.getTime() - n.getTime()) / $r), 0), y = Bn(e.dependencies ?? e.dependsOn ?? e.depends_on), m = Hn(
3535
3538
  e.dependencyRule ?? e.dependency_rule ?? e.dependencyRuleDescription ?? e.dependency_rule_description
3536
3539
  ), E = Wn(
3537
3540
  Yr(
@@ -3556,7 +3559,7 @@ ${s + 1}. ${n.text}
3556
3559
  plannedEnd: u,
3557
3560
  actualStart: d,
3558
3561
  actualEnd: h,
3559
- duration: nr(e.duration, S),
3562
+ duration: nr(e.duration, v),
3560
3563
  progress: Math.max(0, Math.min(100, nr(e.progress ?? e.progressPercentage ?? e.progress_percentage, 0))),
3561
3564
  type: e.type,
3562
3565
  parent: e.parent !== void 0 && e.parent !== null && String(e.parent).length > 0 ? String(e.parent) : void 0,
@@ -3567,7 +3570,7 @@ ${s + 1}. ${n.text}
3567
3570
  priority: e.priority,
3568
3571
  status: e.status ?? e.currentStatus ?? e.current_status,
3569
3572
  onHoldPeriods: E,
3570
- dependencies: x,
3573
+ dependencies: y,
3571
3574
  dependencyRule: m,
3572
3575
  segments: Vn(e.segments, n, r),
3573
3576
  sequence_id: e.sequence_id,
@@ -3609,7 +3612,7 @@ ${s + 1}. ${n.text}
3609
3612
  ], Kn = [
3610
3613
  { unit: "month", step: 1, format: "MMM" },
3611
3614
  { unit: "day", step: 1, format: "D" }
3612
- ], xr = {
3615
+ ], yr = {
3613
3616
  day: [
3614
3617
  { unit: "month", step: 1, format: "MMM YYYY" },
3615
3618
  { unit: "day", step: 1, format: "D" }
@@ -3622,12 +3625,12 @@ ${s + 1}. ${n.text}
3622
3625
  { unit: "year", step: 1, format: "YYYY" },
3623
3626
  { unit: "month", step: 1, format: "MMM" }
3624
3627
  ]
3625
- }, yr = ["day", "week", "month"], At = (e, a, n) => {
3626
- const s = xt(e);
3628
+ }, xr = ["day", "week", "month"], _t = (e, a, n) => {
3629
+ const s = yt(e);
3627
3630
  switch (a.unit) {
3628
3631
  case "week": {
3629
3632
  const r = s.getDay(), c = n === "start" ? -r : 6 - r;
3630
- return xt(je(s, c, "day"));
3633
+ return yt(Te(s, c, "day"));
3631
3634
  }
3632
3635
  case "month":
3633
3636
  return n === "start" ? new Date(s.getFullYear(), s.getMonth(), 1) : new Date(s.getFullYear(), s.getMonth() + 1, 0);
@@ -3755,52 +3758,52 @@ ${s + 1}. ${n.text}
3755
3758
  on_hold_periods: d,
3756
3759
  onHold: p,
3757
3760
  on_hold: h,
3758
- onhold: S,
3759
- onTaskUpdate: x,
3761
+ onhold: v,
3762
+ onTaskUpdate: y,
3760
3763
  onTaskDragUpdate: m,
3761
3764
  onTaskCreate: E,
3762
- onTaskDelete: R,
3765
+ onTaskDelete: F,
3763
3766
  onLinkCreate: N,
3764
3767
  onLinkDelete: M,
3765
- onTimelineViewChange: v,
3766
- baselines: y,
3768
+ onTimelineViewChange: S,
3769
+ baselines: w,
3767
3770
  showMonthHeading: C,
3768
- showRangeHeading: K,
3771
+ showRangeHeading: Z,
3769
3772
  relativeDayNumbering: W
3770
3773
  }) => {
3771
- const re = { ...Qn, ...s }, le = { ...Zn, ...b }, j = !!(n.timelineView || Array.isArray(n.timelineViews) && n.timelineViews.length > 0 || n.timelineViewScales), X = _.useMemo(() => {
3774
+ const re = { ...Qn, ...s }, le = { ...Zn, ...b }, j = !!(n.timelineView || Array.isArray(n.timelineViews) && n.timelineViews.length > 0 || n.timelineViewScales), X = A.useMemo(() => {
3772
3775
  if (!j) return [];
3773
- const i = Array.isArray(n.timelineViews) && n.timelineViews.length > 0 ? n.timelineViews : yr;
3774
- return Array.from(new Set(i.filter((T) => yr.includes(T))));
3775
- }, [n.timelineViews, j]), F = _.useMemo(
3776
+ const i = Array.isArray(n.timelineViews) && n.timelineViews.length > 0 ? n.timelineViews : xr;
3777
+ return Array.from(new Set(i.filter((T) => xr.includes(T))));
3778
+ }, [n.timelineViews, j]), R = A.useMemo(
3776
3779
  () => ({
3777
- ...xr,
3780
+ ...yr,
3778
3781
  ...n.timelineViewScales
3779
3782
  }),
3780
3783
  [n.timelineViewScales]
3781
- ), k = _.useMemo(() => j && n.timelineView && X.includes(n.timelineView) ? n.timelineView : j && X.length > 0 ? X[0] : "day", [n.timelineView, j, X]), [B, Y] = G(k), O = j && X.includes(B) ? B : k, Me = j ? F[O] || xr[O] : n.scales || Kn, be = j && re.showTimelineViewSwitcher !== !1 && X.length > 1, V = be ? X.map((i) => ({
3784
+ ), O = A.useMemo(() => j && n.timelineView && X.includes(n.timelineView) ? n.timelineView : j && X.length > 0 ? X[0] : "day", [n.timelineView, j, X]), [B, Y] = G(O), k = j && X.includes(B) ? B : O, De = j ? R[k] || yr[k] : n.scales || Kn, Se = j && re.showTimelineViewSwitcher !== !1 && X.length > 1, V = Se ? X.map((i) => ({
3782
3785
  value: i,
3783
3786
  label: re.timelineViewLabels?.[i] || `${i.charAt(0).toUpperCase()}${i.slice(1)}s`
3784
- })) : [], I = _.useMemo(() => {
3787
+ })) : [], I = A.useMemo(() => {
3785
3788
  if (n.showTimelineHeader === !1) return 0;
3786
- let i = j ? Math.max(Me.length - 1, 0) : 2;
3787
- if ((C === !1 || n.showMonthHeading === !1) && (i = Math.max(0, i - 1)), K === !1 || n.showRangeHeading === !1) {
3788
- const T = j ? Math.max(0, Me.length - 2) : 1;
3789
+ let i = j ? Math.max(De.length - 1, 0) : 2;
3790
+ if ((C === !1 || n.showMonthHeading === !1) && (i = Math.max(0, i - 1)), Z === !1 || n.showRangeHeading === !1) {
3791
+ const T = j ? Math.max(0, De.length - 2) : 1;
3789
3792
  i = Math.max(0, i - T);
3790
3793
  }
3791
3794
  return i + 1;
3792
- }, [n.showTimelineHeader, n.showMonthHeading, C, n.showRangeHeading, K, j, Me.length]), ne = _.useMemo(() => {
3795
+ }, [n.showTimelineHeader, n.showMonthHeading, C, n.showRangeHeading, Z, j, De.length]), ne = A.useMemo(() => {
3793
3796
  const i = {};
3794
3797
  return r.primary && (i["--wx-gantt-primary"] = r.primary), r.primarySelected && (i["--wx-gantt-primary-selected"] = r.primarySelected), r.success && (i["--wx-gantt-success"] = r.success), r.warning && (i["--wx-gantt-warning"] = r.warning), r.danger && (i["--wx-gantt-danger"] = r.danger), r.background && (i["--wx-gantt-background"] = r.background), r.backgroundAlt && (i["--wx-gantt-background-alt"] = r.backgroundAlt), r.backgroundHover && (i["--wx-gantt-background-hover"] = r.backgroundHover), r.selectColor && (i["--wx-gantt-select-color"] = r.selectColor), r.taskColor && (i["--wx-gantt-task-color"] = r.taskColor), r.taskFillColor && (i["--wx-gantt-task-fill-color"] = r.taskFillColor), r.projectColor && (i["--wx-gantt-project-color"] = r.projectColor), r.milestoneColor && (i["--wx-gantt-milestone-color"] = r.milestoneColor), r.fontColor && (i["--wx-gantt-font-color"] = r.fontColor), r.fontColorAlt && (i["--wx-gantt-font-color-alt"] = r.fontColorAlt), r.iconColor && (i["--wx-gantt-icon-color"] = r.iconColor), r.borderColor && (i["--wx-gantt-border-color"] = r.borderColor), r.fontFamily && (i["--wx-gantt-font-family"] = r.fontFamily), r.fontMono && (i["--wx-gantt-font-mono"] = r.fontMono), r.fontSize && (i["--wx-gantt-font-size"] = r.fontSize), r.fontWeight && (i["--wx-gantt-font-weight"] = String(r.fontWeight)), r.lineHeight && (i["--wx-gantt-line-height"] = String(r.lineHeight)), r.spacingXS && (i["--gantt-spacing-xs"] = r.spacingXS), r.spacingSM && (i["--gantt-spacing-sm"] = r.spacingSM), r.spacingMD && (i["--gantt-spacing-md"] = r.spacingMD), r.spacingLG && (i["--gantt-spacing-lg"] = r.spacingLG), r.customCSSVariables && Object.entries(r.customCSSVariables).forEach(([T, P]) => {
3795
3798
  i[T.startsWith("--") ? T : `--${T}`] = P;
3796
3799
  }), i["--gantt-header-rows"] = String(I), i;
3797
- }, [r, I]), de = _.useMemo(() => {
3800
+ }, [r, I]), de = A.useMemo(() => {
3798
3801
  const i = Yr(
3799
3802
  u,
3800
3803
  d,
3801
3804
  p,
3802
3805
  h,
3803
- S
3806
+ v
3804
3807
  );
3805
3808
  if (i.length === 0) return [];
3806
3809
  const T = /* @__PURE__ */ new Date();
@@ -3808,32 +3811,32 @@ ${s + 1}. ${n.text}
3808
3811
  start: Ve(P.start, T),
3809
3812
  end: Ve(P.end, T)
3810
3813
  })).filter((P) => P.end.getTime() > P.start.getTime());
3811
- }, [u, d, p, h, S]), se = _.useMemo(() => {
3814
+ }, [u, d, p, h, v]), se = A.useMemo(() => {
3812
3815
  const i = Un(e);
3813
3816
  return Gn(i, de);
3814
3817
  }, [e, de]), ue = Array.isArray(a) ? a : [], {
3815
3818
  tasks: z,
3816
- links: xe,
3817
- setTasks: Ee,
3819
+ links: ye,
3820
+ setTasks: Le,
3818
3821
  setLinks: Ie,
3819
3822
  undo: Ye,
3820
3823
  redo: $,
3821
- updateTask: Q,
3822
- createTask: Le,
3824
+ updateTask: J,
3825
+ createTask: xe,
3823
3826
  deleteTask: Qe,
3824
3827
  saveState: ce
3825
- } = kn(se, ue), [me, Fe] = G(z), [pe, et] = G(null), [Ae, Xe] = G(null), [Ue, ot] = G(!1), [l, g] = G(void 0), [D, f] = G(void 0), [U, q] = G(!1), [ee, ie] = G(null), [$e, ze] = G(null), [ge, tt] = G(null), [Ke, st] = G(null), [Ce, ht] = G(null), [yt, kt] = G(1), [qe, it] = G(() => y && y.size > 0 ? y : se.length > 0 ? Yn(se) : /* @__PURE__ */ new Map());
3828
+ } = On(se, ue), [me, Fe] = G(z), [pe, et] = G(null), [_e, Xe] = G(null), [Ue, ot] = G(!1), [l, g] = G(void 0), [D, f] = G(void 0), [U, q] = G(!1), [ee, ie] = G(null), [$e, ze] = G(null), [ge, tt] = G(null), [Ke, st] = G(null), [Ce, ht] = G(null), [xt, Ot] = G(1), [qe, it] = G(() => w && w.size > 0 ? w : se.length > 0 ? Yn(se) : /* @__PURE__ */ new Map());
3826
3829
  ut(() => {
3827
- y && y.size > 0 && it(y);
3828
- }, [y]), ut(() => {
3829
- j && Y(k);
3830
- }, [j, k]);
3830
+ w && w.size > 0 && it(w);
3831
+ }, [w]), ut(() => {
3832
+ j && Y(O);
3833
+ }, [j, O]);
3831
3834
  const [wt] = G(n.theme || "light"), [Tt, zt] = G({
3832
3835
  searchText: "",
3833
3836
  status: "all",
3834
3837
  priority: "all",
3835
3838
  owner: ""
3836
- }), Dt = ft(null), Mt = ft(null), Ot = ft(null), Et = ft(null), lt = ft(null), $t = ft(null), _e = {
3839
+ }), Dt = ft(null), Mt = ft(null), kt = ft(null), Et = ft(null), lt = ft(null), $t = ft(null), Ae = {
3837
3840
  ...{
3838
3841
  columns: n.columns || Jn(s),
3839
3842
  readonly: !1,
@@ -3894,15 +3897,15 @@ ${s + 1}. ${n.text}
3894
3897
  // Marker style
3895
3898
  },
3896
3899
  ...n,
3897
- scales: Me,
3898
- timelineView: j ? O : n.timelineView,
3900
+ scales: De,
3901
+ timelineView: j ? k : n.timelineView,
3899
3902
  timelineViews: j ? X : n.timelineViews,
3900
- timelineViewScales: j ? F : n.timelineViewScales,
3903
+ timelineViewScales: j ? R : n.timelineViewScales,
3901
3904
  // IMPORTANT: Re-apply baselines after spread so undefined from config doesn't override the default.
3902
3905
  // baselines should always be true unless the user explicitly passes false.
3903
3906
  baselines: n.baselines !== !1,
3904
3907
  showMonthHeading: C !== void 0 ? C : n.showMonthHeading,
3905
- showRangeHeading: K !== void 0 ? K : n.showRangeHeading,
3908
+ showRangeHeading: Z !== void 0 ? Z : n.showRangeHeading,
3906
3909
  relativeDayNumbering: W !== void 0 ? W : n.relativeDayNumbering
3907
3910
  };
3908
3911
  ut(() => {
@@ -3910,15 +3913,15 @@ ${s + 1}. ${n.text}
3910
3913
  Fe(((P) => {
3911
3914
  const H = [], ae = (fe) => {
3912
3915
  if (!fe) return !1;
3913
- const Se = P.find((Te) => Te.id === fe);
3914
- return Se && !Se.open && Se.type === "project" ? !0 : ae(Se?.parent);
3916
+ const ve = P.find((Me) => Me.id === fe);
3917
+ return ve && !ve.open && ve.type === "project" ? !0 : ae(ve?.parent);
3915
3918
  };
3916
3919
  return P.forEach((fe) => {
3917
3920
  ae(fe.parent) || H.push(fe);
3918
3921
  }), H;
3919
3922
  })(i));
3920
3923
  }, [z, Tt]);
3921
- const Ht = _.useMemo(() => {
3924
+ const Ht = A.useMemo(() => {
3922
3925
  if (!z || !Array.isArray(z)) return [];
3923
3926
  try {
3924
3927
  return Array.from(new Set(z.map((i) => i?.owner).filter(Boolean)));
@@ -3926,25 +3929,25 @@ ${s + 1}. ${n.text}
3926
3929
  return console.warn("Error extracting owners:", i), [];
3927
3930
  }
3928
3931
  }, [z]), Wt = (() => {
3929
- const i = Me[1] || Me[0], T = me.length > 0 ? me : z;
3932
+ const i = De[De.length - 1] || De[0], T = me.length > 0 ? me : z;
3930
3933
  if (T.length === 0) {
3931
- const Se = /* @__PURE__ */ new Date();
3934
+ const ve = /* @__PURE__ */ new Date();
3932
3935
  return {
3933
- start: At(je(Se, -30, "day"), i, "start"),
3934
- end: At(je(Se, 60, "day"), i, "end")
3936
+ start: _t(Te(ve, -30, "day"), i, "start"),
3937
+ end: _t(Te(ve, 60, "day"), i, "end")
3935
3938
  };
3936
3939
  }
3937
- const P = T.map((Se) => Se.start.getTime()), H = T.map((Se) => Se.end.getTime()), ae = new Date(Math.min(...P)), fe = new Date(Math.max(...H));
3940
+ const P = T.map((ve) => ve.start.getTime()), H = T.map((ve) => ve.end.getTime()), ae = new Date(Math.min(...P)), fe = new Date(Math.max(...H));
3938
3941
  return {
3939
- start: At(je(ae, -7, "day"), i, "start"),
3940
- end: At(fe, i, "end")
3942
+ start: _t(Te(ae, -7, "day"), i, "start"),
3943
+ end: _t(fe, i, "end")
3941
3944
  };
3942
3945
  })(), Vt = (i) => {
3943
- !X.includes(i) || i === O || (Y(i), v?.(i));
3946
+ !X.includes(i) || i === k || (Y(i), S?.(i));
3944
3947
  }, o = (i) => {
3945
3948
  et(i);
3946
- }, w = (i, T) => {
3947
- if (_e.readonly) return;
3949
+ }, x = (i, T) => {
3950
+ if (Ae.readonly) return;
3948
3951
  i.preventDefault();
3949
3952
  const P = z.find((H) => H.id === T);
3950
3953
  P && ht({ x: i.clientX, y: i.clientY, task: P });
@@ -3954,27 +3957,27 @@ ${s + 1}. ${n.text}
3954
3957
  ...i,
3955
3958
  id: `task-${Date.now()}`,
3956
3959
  text: `${i.text} (Copy)`,
3957
- start: je(i.start, 7, "day"),
3958
- end: je(i.end, 7, "day")
3960
+ start: Te(i.start, 7, "day"),
3961
+ end: Te(i.end, 7, "day")
3959
3962
  };
3960
- Le(T), E && E(T);
3961
- }, A = (i) => {
3963
+ xe(T), E && E(T);
3964
+ }, _ = (i) => {
3962
3965
  if (!Ce?.task) return;
3963
3966
  const T = { ...Ce.task, type: i };
3964
- Q(T), x && x(T);
3965
- }, te = _.useCallback((i, T) => {
3967
+ J(T), y && y(T);
3968
+ }, te = A.useCallback((i, T) => {
3966
3969
  let P = [];
3967
3970
  return T.filter((ae) => ae.parent === i).forEach((ae) => {
3968
3971
  P.push(ae.id), P = [...P, ...te(ae.id, T)];
3969
3972
  }), P;
3970
- }, []), oe = (i, T) => (i ?? null) === (T ?? null), Z = (i, T, P, H) => {
3971
- if (!_e.readonly)
3973
+ }, []), oe = (i, T) => (i ?? null) === (T ?? null), Q = (i, T, P, H) => {
3974
+ if (!Ae.readonly)
3972
3975
  if (H === "reorder") {
3973
- const ae = me.findIndex((Se) => Se.id === i), fe = te(i, z);
3976
+ const ae = me.findIndex((ve) => ve.id === i), fe = te(i, z);
3974
3977
  tt({ id: i, initialIndex: ae, currentX: T, currentY: P, descendantIds: fe }), document.body.classList.add("gantt-dragging");
3975
3978
  } else
3976
3979
  ze(i);
3977
- }, J = () => {
3980
+ }, K = () => {
3978
3981
  if (ge && Ke) {
3979
3982
  const i = z.find((P) => P.id === ge.id), T = z.find((P) => P.id === Ke.taskId);
3980
3983
  if (i && T && i.id !== T.id) {
@@ -3982,30 +3985,30 @@ ${s + 1}. ${n.text}
3982
3985
  if (!P.includes(T.id)) {
3983
3986
  const H = [...z], ae = (Ke.position === "inside" ? T.id : T.parent) ?? void 0, fe = H.findIndex((he) => he.id === i.id);
3984
3987
  fe !== -1 && (H[fe] = { ...H[fe], parent: ae });
3985
- const Se = H.filter((he) => P.includes(he.id)), Te = H.filter((he) => !P.includes(he.id));
3986
- let He = Te.findIndex((he) => he.id === T.id);
3988
+ const ve = H.filter((he) => P.includes(he.id)), Me = H.filter((he) => !P.includes(he.id));
3989
+ let He = Me.findIndex((he) => he.id === T.id);
3987
3990
  if (Ke.position === "inside") {
3988
- const he = [T.id, ...te(T.id, Te)], Gt = he[he.length - 1];
3989
- He = Te.findIndex((_r) => _r.id === Gt) + 1;
3991
+ const he = [T.id, ...te(T.id, Me)], Gt = he[he.length - 1];
3992
+ He = Me.findIndex((Ar) => Ar.id === Gt) + 1;
3990
3993
  } else if (Ke.position === "below") {
3991
- const he = te(T.id, Te);
3992
- he.length > 0 ? He = Te.findIndex((Gt) => Gt.id === he[he.length - 1]) + 1 : He++;
3994
+ const he = te(T.id, Me);
3995
+ he.length > 0 ? He = Me.findIndex((Gt) => Gt.id === he[he.length - 1]) + 1 : He++;
3993
3996
  }
3994
- He < 0 && (He = Te.length);
3995
- const Lt = { tasks: [...z], links: [...xe] };
3996
- Te.splice(He, 0, ...Se), Ee(Te), ce("task_update", Lt, { tasks: Te, links: xe });
3997
- const mt = z.filter((he) => oe(he.parent, i.parent)).findIndex((he) => he.id === i.id) + 1, sr = Te.filter((he) => oe(he.parent, ae)).findIndex((he) => he.id === i.id) + 1, ir = {
3997
+ He < 0 && (He = Me.length);
3998
+ const Lt = { tasks: [...z], links: [...ye] };
3999
+ Me.splice(He, 0, ...ve), Le(Me), ce("task_update", Lt, { tasks: Me, links: ye });
4000
+ const mt = z.filter((he) => oe(he.parent, i.parent)).findIndex((he) => he.id === i.id) + 1, sr = Me.filter((he) => oe(he.parent, ae)).findIndex((he) => he.id === i.id) + 1, ir = {
3998
4001
  currentSequenceId: mt,
3999
4002
  targetSequenceId: sr,
4000
4003
  targetStageId: ae ?? null
4001
- }, lr = Te.find((he) => he.id === i.id);
4004
+ }, lr = Me.find((he) => he.id === i.id);
4002
4005
  if (lr) {
4003
4006
  const he = {
4004
4007
  ...lr,
4005
4008
  sequence_id: sr,
4006
4009
  stage_id: ae ?? null
4007
4010
  };
4008
- x && x(he, ir), m && m({
4011
+ y && y(he, ir), m && m({
4009
4012
  task: he,
4010
4013
  previousTask: i,
4011
4014
  dragType: "reorder",
@@ -4016,33 +4019,33 @@ ${s + 1}. ${n.text}
4016
4019
  }
4017
4020
  }
4018
4021
  ze(null), tt(null), st(null), document.body.classList.remove("gantt-dragging");
4019
- }, Re = ft(null), ye = _.useCallback((i) => {
4022
+ }, Re = ft(null), we = A.useCallback((i) => {
4020
4023
  if (ge) {
4021
4024
  const { clientX: T, clientY: P } = i;
4022
4025
  Re.current && cancelAnimationFrame(Re.current), Re.current = requestAnimationFrame(() => {
4023
- const H = _e.rowHeight || 48, ae = Mt.current?.querySelector(".gantt-grid-body");
4026
+ const H = Ae.rowHeight || 48, ae = Mt.current?.querySelector(".gantt-grid-body");
4024
4027
  if (!ae || me.length === 0) {
4025
4028
  st(null);
4026
4029
  return;
4027
4030
  }
4028
- const fe = ae.getBoundingClientRect(), Se = P - fe.top + ae.scrollTop;
4029
- let Te = Math.floor(Se / H);
4030
- Te = Math.max(0, Math.min(Te, me.length - 1));
4031
- const He = me[Te];
4031
+ const fe = ae.getBoundingClientRect(), ve = P - fe.top + ae.scrollTop;
4032
+ let Me = Math.floor(ve / H);
4033
+ Me = Math.max(0, Math.min(Me, me.length - 1));
4034
+ const He = me[Me];
4032
4035
  if (He) {
4033
4036
  if (He.id === ge.id || ge.descendantIds.includes(He.id)) {
4034
4037
  st(null), tt((qt) => qt ? { ...qt, currentX: T, currentY: P } : null);
4035
4038
  return;
4036
4039
  }
4037
- const Ct = Se - Te * H;
4040
+ const Ct = ve - Me * H;
4038
4041
  let mt = "above";
4039
4042
  He.type !== "milestone" ? Ct < H * 0.3 ? mt = "above" : Ct > H * 0.7 ? mt = "below" : mt = "inside" : mt = Ct < H / 2 ? "above" : "below", st({ taskId: He.id, position: mt });
4040
4043
  }
4041
4044
  tt((Lt) => Lt ? { ...Lt, currentX: T, currentY: P } : null);
4042
4045
  });
4043
4046
  }
4044
- }, [ge, me, _e.rowHeight]), we = () => {
4045
- ge && J();
4047
+ }, [ge, me, Ae.rowHeight]), be = () => {
4048
+ ge && K();
4046
4049
  }, Be = (i, T) => {
4047
4050
  const P = {
4048
4051
  ...i,
@@ -4050,7 +4053,7 @@ ${s + 1}. ${n.text}
4050
4053
  parent: T
4051
4054
  // Set parent if provided (for subtasks)
4052
4055
  };
4053
- Le(P);
4056
+ xe(P);
4054
4057
  const H = {
4055
4058
  taskId: P.id,
4056
4059
  start: new Date(P.start),
@@ -4063,21 +4066,21 @@ ${s + 1}. ${n.text}
4063
4066
  return fe.set(P.id, H), fe;
4064
4067
  }), E && E(P);
4065
4068
  }, Ge = (i) => {
4066
- Q(i), x && x(i);
4069
+ J(i), y && y(i);
4067
4070
  }, Ze = (i) => {
4068
4071
  Qe(i), it((T) => {
4069
4072
  const P = new Map(T);
4070
4073
  return P.delete(i), P;
4071
- }), R && R(i);
4074
+ }), F && F(i);
4072
4075
  }, Ne = (i, T, P, H) => {
4073
4076
  const ae = { id: `link-${Date.now()}`, source: i, target: T, type: P, lag: H };
4074
- Ie([...xe, ae]), N && N(ae);
4077
+ Ie([...ye, ae]), N && N(ae);
4075
4078
  }, bt = (i) => {
4076
- const T = xe.filter((P) => P.id !== i);
4079
+ const T = ye.filter((P) => P.id !== i);
4077
4080
  Ie(T), M && M(i);
4078
4081
  };
4079
4082
  ut(() => {
4080
- if (y && y.size > 0)
4083
+ if (w && w.size > 0)
4081
4084
  return;
4082
4085
  const i = new Map(qe);
4083
4086
  let T = !1;
@@ -4094,7 +4097,7 @@ ${s + 1}. ${n.text}
4094
4097
  qe.forEach((H, ae) => {
4095
4098
  P.has(ae) || (i.delete(ae), T = !0);
4096
4099
  }), T && it(i);
4097
- }, [z, y]), ut(() => {
4100
+ }, [z, w]), ut(() => {
4098
4101
  const i = (T) => {
4099
4102
  (T.ctrlKey || T.metaKey) && (T.key === "z" && !T.shiftKey ? (T.preventDefault(), Ye()) : (T.key === "y" || T.key === "z" && T.shiftKey) && (T.preventDefault(), $()));
4100
4103
  };
@@ -4119,9 +4122,9 @@ ${s + 1}. ${n.text}
4119
4122
  height: n.containerHeight || "100%",
4120
4123
  minHeight: n.containerMinHeight || "400px"
4121
4124
  }, Ut = {
4122
- "--gantt-row-height": `${_e.rowHeight || 48}px`,
4125
+ "--gantt-row-height": `${Ae.rowHeight || 48}px`,
4123
4126
  "--gantt-header-rows": String(I)
4124
- }, Ar = n.gridWidth ? { "--gantt-grid-width": n.gridWidth } : {};
4127
+ }, _r = n.gridWidth ? { "--gantt-grid-width": n.gridWidth } : {};
4125
4128
  return /* @__PURE__ */ t.jsxs(
4126
4129
  "div",
4127
4130
  {
@@ -4132,20 +4135,20 @@ ${s + 1}. ${n.text}
4132
4135
  /* @__PURE__ */ t.jsxs(
4133
4136
  "div",
4134
4137
  {
4135
- className: `gantt-container theme-${_e.theme}`,
4138
+ className: `gantt-container theme-${Ae.theme}`,
4136
4139
  ref: Et,
4137
- style: { ...Ar, ...Ut },
4140
+ style: { ..._r, ...Ut },
4138
4141
  children: [
4139
4142
  /* @__PURE__ */ t.jsx(
4140
4143
  Tn,
4141
4144
  {
4142
- zoomLevel: yt,
4143
- setZoomLevel: kt,
4144
- timelineView: be ? O : void 0,
4145
+ zoomLevel: xt,
4146
+ setZoomLevel: Ot,
4147
+ timelineView: Se ? k : void 0,
4145
4148
  timelineViewOptions: V,
4146
- onTimelineViewChange: be ? Vt : void 0,
4149
+ onTimelineViewChange: Se ? Vt : void 0,
4147
4150
  onExport: (i) => {
4148
- i === "csv" && Pr(z), i === "excel" && Nr(z), i === "json" && kr(z, xe), i === "pdf" && Or(z);
4151
+ i === "csv" && Pr(z), i === "excel" && Nr(z), i === "json" && Or(z, ye), i === "pdf" && kr(z);
4149
4152
  },
4150
4153
  onFilterChange: (i) => zt(i),
4151
4154
  owners: Ht || [],
@@ -4162,18 +4165,18 @@ ${s + 1}. ${n.text}
4162
4165
  styleConfig: r
4163
4166
  }
4164
4167
  ),
4165
- /* @__PURE__ */ t.jsxs("div", { className: "gantt-layout", ref: Ot, onMouseMove: ye, onMouseUp: we, onMouseLeave: we, children: [
4168
+ /* @__PURE__ */ t.jsxs("div", { className: "gantt-layout", ref: kt, onMouseMove: we, onMouseUp: be, onMouseLeave: be, children: [
4166
4169
  /* @__PURE__ */ t.jsx(
4167
4170
  Er,
4168
4171
  {
4169
4172
  ref: Mt,
4170
4173
  tasks: me,
4171
- columns: _e.columns || [],
4174
+ columns: Ae.columns || [],
4172
4175
  selectedTask: pe,
4173
4176
  onTaskClick: o,
4174
- onTaskContextMenu: w,
4177
+ onTaskContextMenu: x,
4175
4178
  onTaskUpdate: Ge,
4176
- onTaskDragStart: Z,
4179
+ onTaskDragStart: Q,
4177
4180
  onAddTask: (i) => {
4178
4181
  if (i) {
4179
4182
  const T = z.find((P) => P.id === i);
@@ -4188,13 +4191,13 @@ ${s + 1}. ${n.text}
4188
4191
  const T = z.find((P) => P.id === i);
4189
4192
  T && (ie(T), q(!0));
4190
4193
  },
4191
- links: xe,
4194
+ links: ye,
4192
4195
  allTasks: z,
4193
4196
  dropIndicator: Ke,
4194
4197
  reorderTask: ge,
4195
4198
  iconConfig: c,
4196
4199
  styleConfig: r,
4197
- headerHeight: (_e.scaleHeight || 28) * I
4200
+ headerHeight: (Ae.scaleHeight || 28) * I
4198
4201
  }
4199
4202
  ),
4200
4203
  /* @__PURE__ */ t.jsx(
@@ -4202,10 +4205,10 @@ ${s + 1}. ${n.text}
4202
4205
  {
4203
4206
  ref: Dt,
4204
4207
  tasks: me,
4205
- links: xe,
4208
+ links: ye,
4206
4209
  range: Wt,
4207
- scales: _e.scales,
4208
- config: _e,
4210
+ scales: Ae.scales,
4211
+ config: Ae,
4209
4212
  selectedTask: pe,
4210
4213
  draggedTask: $e,
4211
4214
  onTaskClick: () => {
@@ -4215,7 +4218,7 @@ ${s + 1}. ${n.text}
4215
4218
  onTaskDragEnd: () => {
4216
4219
  },
4217
4220
  onTaskUpdate: (i, T, P) => {
4218
- const H = z.find((Se) => Se.id === i);
4221
+ const H = z.find((ve) => ve.id === i);
4219
4222
  if (!H) return;
4220
4223
  const ae = { ...H }, fe = { ...H, ...T };
4221
4224
  Ge(fe), P && m && m({
@@ -4224,10 +4227,10 @@ ${s + 1}. ${n.text}
4224
4227
  dragType: P.dragType
4225
4228
  });
4226
4229
  },
4227
- zoomLevel: yt,
4230
+ zoomLevel: xt,
4228
4231
  baselines: qe,
4229
4232
  taskTooltipConfig: le,
4230
- headerHeight: (_e.scaleHeight || 28) * I
4233
+ headerHeight: (Ae.scaleHeight || 28) * I
4231
4234
  }
4232
4235
  )
4233
4236
  ] }),
@@ -4244,13 +4247,13 @@ ${s + 1}. ${n.text}
4244
4247
  styleConfig: r
4245
4248
  }
4246
4249
  ),
4247
- Ae && /* @__PURE__ */ t.jsx(Fn, { task: Ae, onUpdate: Ge, onDelete: Ze, onClose: () => Xe(null), uiConfig: re, styleConfig: r }),
4250
+ _e && /* @__PURE__ */ t.jsx(Fn, { task: _e, onUpdate: Ge, onDelete: Ze, onClose: () => Xe(null), uiConfig: re, styleConfig: r }),
4248
4251
  U && ee && /* @__PURE__ */ t.jsx(
4249
4252
  Pn,
4250
4253
  {
4251
4254
  task: ee,
4252
4255
  allTasks: z,
4253
- links: xe,
4256
+ links: ye,
4254
4257
  onAddDependency: Ne,
4255
4258
  onRemoveDependency: bt,
4256
4259
  onTaskUpdate: Ge,
@@ -4280,13 +4283,13 @@ ${s + 1}. ${n.text}
4280
4283
  onDependencies: () => {
4281
4284
  Ce.task && (ie(Ce.task), q(!0));
4282
4285
  },
4283
- onConvertToMilestone: () => A("milestone"),
4284
- onConvertToTask: () => A("task"),
4285
- onConvertToProject: () => A("project"),
4286
+ onConvertToMilestone: () => _("milestone"),
4287
+ onConvertToTask: () => _("task"),
4288
+ onConvertToProject: () => _("project"),
4286
4289
  onClose: () => ht(null),
4287
4290
  onAutoSchedule: () => {
4288
- const i = Rr(z, xe, { mode: "forward" });
4289
- Ee(i), ht(null);
4291
+ const i = Rr(z, ye, { mode: "forward" });
4292
+ Le(i), ht(null);
4290
4293
  },
4291
4294
  iconConfig: c,
4292
4295
  styleConfig: r
@@ -4296,15 +4299,15 @@ ${s + 1}. ${n.text}
4296
4299
  ge && (() => {
4297
4300
  const i = z.find((He) => He.id === ge.id);
4298
4301
  if (!i) return null;
4299
- const T = Number.isFinite(ge.currentX) ? ge.currentX : 0, P = Number.isFinite(ge.currentY) ? ge.currentY : 0, H = _e.rowHeight || 48, fe = Et.current?.getBoundingClientRect(), Se = fe ? T - fe.left + 12 : T + 12, Te = fe ? P - fe.top + 12 : P + 12;
4302
+ const T = Number.isFinite(ge.currentX) ? ge.currentX : 0, P = Number.isFinite(ge.currentY) ? ge.currentY : 0, H = Ae.rowHeight || 48, fe = Et.current?.getBoundingClientRect(), ve = fe ? T - fe.left + 12 : T + 12, Me = fe ? P - fe.top + 12 : P + 12;
4300
4303
  return /* @__PURE__ */ t.jsxs(
4301
4304
  "div",
4302
4305
  {
4303
4306
  className: "gantt-drag-preview",
4304
4307
  style: {
4305
4308
  height: H,
4306
- top: Te,
4307
- left: Se,
4309
+ top: Me,
4310
+ left: ve,
4308
4311
  position: "absolute",
4309
4312
  pointerEvents: "none",
4310
4313
  zIndex: 9999,
@@ -4336,45 +4339,45 @@ ${s + 1}. ${n.text}
4336
4339
  const b = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = (m, E = /* @__PURE__ */ new Set()) => {
4337
4340
  if (E.has(m)) return;
4338
4341
  E.add(m);
4339
- const R = e.find((M) => M.id === m);
4340
- if (!R) return;
4342
+ const F = e.find((M) => M.id === m);
4343
+ if (!F) return;
4341
4344
  const N = c.get(m) || [];
4342
4345
  if (N.length === 0)
4343
- b.set(m, 0), u.set(m, R.duration);
4346
+ b.set(m, 0), u.set(m, F.duration);
4344
4347
  else {
4345
4348
  let M = 0;
4346
- N.forEach((v) => {
4347
- d(v, E);
4348
- const y = u.get(v) || 0;
4349
- M = Math.max(M, y);
4350
- }), b.set(m, M), u.set(m, M + R.duration);
4349
+ N.forEach((S) => {
4350
+ d(S, E);
4351
+ const w = u.get(S) || 0;
4352
+ M = Math.max(M, w);
4353
+ }), b.set(m, M), u.set(m, M + F.duration);
4351
4354
  }
4352
4355
  };
4353
4356
  e.forEach((m) => d(m.id));
4354
- const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), S = Math.max(...Array.from(u.values())), x = (m, E = /* @__PURE__ */ new Set()) => {
4357
+ const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map(), v = Math.max(...Array.from(u.values())), y = (m, E = /* @__PURE__ */ new Set()) => {
4355
4358
  if (E.has(m)) return;
4356
4359
  E.add(m);
4357
- const R = e.find((M) => M.id === m);
4358
- if (!R) return;
4360
+ const F = e.find((M) => M.id === m);
4361
+ if (!F) return;
4359
4362
  const N = r.get(m) || [];
4360
4363
  if (N.length === 0)
4361
- h.set(m, S), p.set(m, S - R.duration);
4364
+ h.set(m, v), p.set(m, v - F.duration);
4362
4365
  else {
4363
4366
  let M = 1 / 0;
4364
- N.forEach((v) => {
4365
- x(v, E);
4366
- const y = p.get(v) || 0;
4367
- M = Math.min(M, y);
4368
- }), h.set(m, M), p.set(m, M - R.duration);
4367
+ N.forEach((S) => {
4368
+ y(S, E);
4369
+ const w = p.get(S) || 0;
4370
+ M = Math.min(M, w);
4371
+ }), h.set(m, M), p.set(m, M - F.duration);
4369
4372
  }
4370
4373
  };
4371
- return e.forEach((m) => x(m.id)), e.forEach((m) => {
4374
+ return e.forEach((m) => y(m.id)), e.forEach((m) => {
4372
4375
  const E = b.get(m.id) || 0, N = (p.get(m.id) || 0) - E;
4373
4376
  s.set(m.id, N), Math.abs(N) < 0.01 && n.add(m.id);
4374
4377
  }), {
4375
4378
  criticalTasks: n,
4376
4379
  taskFloats: s,
4377
- projectDuration: S
4380
+ projectDuration: v
4378
4381
  };
4379
4382
  }, ta = (e, a) => a.criticalTasks.has(e), ra = (e, a) => a.taskFloats.get(e) || 0, ha = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4380
4383
  __proto__: null,
@@ -4391,21 +4394,21 @@ export {
4391
4394
  jn as FilterSearch,
4392
4395
  pa as Gantt,
4393
4396
  Er as Grid,
4394
- yn as TaskBar,
4397
+ xn as TaskBar,
4395
4398
  Mn as TaskCreator,
4396
4399
  Fn as TaskEditor,
4397
4400
  Lr as Timeline,
4398
4401
  Tn as Toolbar,
4399
- je as addToDate,
4402
+ Te as addToDate,
4400
4403
  zn as applyFilters,
4401
4404
  da as calculateDuration,
4402
4405
  Yn as createBaseline,
4403
- ke as formatDate,
4406
+ Oe as formatDate,
4404
4407
  Nt as getDaysBetween,
4405
4408
  la as getEndOfDay,
4406
4409
  pn as getHoursBetween,
4407
- xt as getStartOfDay,
4410
+ yt as getStartOfDay,
4408
4411
  Zt as isHoliday,
4409
4412
  Kt as isWeekend,
4410
- kn as useUndoRedo
4413
+ On as useUndoRedo
4411
4414
  };