UNPKG

82.8 kBJavaScriptView Raw
1import { I as qe, J as Ge, R as je, K as Qe, L as Yn, M as te, N as Fn, O as ee, W as Un, Y as Ln, P as An, c as Tt, s as En, g as In, z as Wn, A as On, b as zn, a as Nn, Q as nt, m as Hn, B as Pn, e as Vn, x as Rn, l as de, j as Nt, k as Bn, f as Zn } from "./mermaid-9357f3d0.js";
2import { b as Xn, t as Ue, c as qn, a as Gn, l as jn } from "./linear-e84f7512.js";
3import { i as Qn } from "./init-f9637058.js";
4function Jn(t, e) {
5 let n;
6 if (e === void 0)
7 for (const r of t)
8 r != null && (n < r || n === void 0 && r >= r) && (n = r);
9 else {
10 let r = -1;
11 for (let i of t)
12 (i = e(i, ++r, t)) != null && (n < i || n === void 0 && i >= i) && (n = i);
13 }
14 return n;
15}
16function Kn(t, e) {
17 let n;
18 if (e === void 0)
19 for (const r of t)
20 r != null && (n > r || n === void 0 && r >= r) && (n = r);
21 else {
22 let r = -1;
23 for (let i of t)
24 (i = e(i, ++r, t)) != null && (n > i || n === void 0 && i >= i) && (n = i);
25 }
26 return n;
27}
28function $n(t) {
29 return t;
30}
31var Vt = 1, ne = 2, me = 3, Ht = 4, Le = 1e-6;
32function tr(t) {
33 return "translate(" + t + ",0)";
34}
35function er(t) {
36 return "translate(0," + t + ")";
37}
38function nr(t) {
39 return (e) => +t(e);
40}
41function rr(t, e) {
42 return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
43}
44function ir() {
45 return !this.__axis;
46}
47function Je(t, e) {
48 var n = [], r = null, i = null, a = 6, s = 6, g = 3, k = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, p = t === Vt || t === Ht ? -1 : 1, T = t === Ht || t === ne ? "x" : "y", _ = t === Vt || t === me ? tr : er;
49 function x(v) {
50 var E = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), M = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : $n), N = Math.max(a, 0) + g, V = e.range(), Q = +V[0] + k, H = +V[V.length - 1] + k, P = (e.bandwidth ? rr : nr)(e.copy(), k), R = v.selection ? v.selection() : v, w = R.selectAll(".domain").data([null]), O = R.selectAll(".tick").data(E, e).order(), b = O.exit(), l = O.enter().append("g").attr("class", "tick"), h = O.select("line"), d = O.select("text");
51 w = w.merge(w.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), O = O.merge(l), h = h.merge(l.append("line").attr("stroke", "currentColor").attr(T + "2", p * a)), d = d.merge(l.append("text").attr("fill", "currentColor").attr(T, p * N).attr("dy", t === Vt ? "0em" : t === me ? "0.71em" : "0.32em")), v !== R && (w = w.transition(v), O = O.transition(v), h = h.transition(v), d = d.transition(v), b = b.transition(v).attr("opacity", Le).attr("transform", function(c) {
52 return isFinite(c = P(c)) ? _(c + k) : this.getAttribute("transform");
53 }), l.attr("opacity", Le).attr("transform", function(c) {
54 var D = this.parentNode.__axis;
55 return _((D && isFinite(D = D(c)) ? D : P(c)) + k);
56 })), b.remove(), w.attr("d", t === Ht || t === ne ? s ? "M" + p * s + "," + Q + "H" + k + "V" + H + "H" + p * s : "M" + k + "," + Q + "V" + H : s ? "M" + Q + "," + p * s + "V" + k + "H" + H + "V" + p * s : "M" + Q + "," + k + "H" + H), O.attr("opacity", 1).attr("transform", function(c) {
57 return _(P(c) + k);
58 }), h.attr(T + "2", p * a), d.attr(T, p * N).text(M), R.filter(ir).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === ne ? "start" : t === Ht ? "end" : "middle"), R.each(function() {
59 this.__axis = P;
60 });
61 }
62 return x.scale = function(v) {
63 return arguments.length ? (e = v, x) : e;
64 }, x.ticks = function() {
65 return n = Array.from(arguments), x;
66 }, x.tickArguments = function(v) {
67 return arguments.length ? (n = v == null ? [] : Array.from(v), x) : n.slice();
68 }, x.tickValues = function(v) {
69 return arguments.length ? (r = v == null ? null : Array.from(v), x) : r && r.slice();
70 }, x.tickFormat = function(v) {
71 return arguments.length ? (i = v, x) : i;
72 }, x.tickSize = function(v) {
73 return arguments.length ? (a = s = +v, x) : a;
74 }, x.tickSizeInner = function(v) {
75 return arguments.length ? (a = +v, x) : a;
76 }, x.tickSizeOuter = function(v) {
77 return arguments.length ? (s = +v, x) : s;
78 }, x.tickPadding = function(v) {
79 return arguments.length ? (g = +v, x) : g;
80 }, x.offset = function(v) {
81 return arguments.length ? (k = +v, x) : k;
82 }, x;
83}
84function ar(t) {
85 return Je(Vt, t);
86}
87function sr(t) {
88 return Je(me, t);
89}
90const or = Math.PI / 180, cr = 180 / Math.PI, Zt = 18, Ke = 0.96422, $e = 1, tn = 0.82521, en = 4 / 29, bt = 6 / 29, nn = 3 * bt * bt, ur = bt * bt * bt;
91function rn(t) {
92 if (t instanceof ct)
93 return new ct(t.l, t.a, t.b, t.opacity);
94 if (t instanceof lt)
95 return an(t);
96 t instanceof je || (t = Yn(t));
97 var e = se(t.r), n = se(t.g), r = se(t.b), i = re((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / $e), a, s;
98 return e === n && n === r ? a = s = i : (a = re((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / Ke), s = re((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / tn)), new ct(116 * i - 16, 500 * (a - i), 200 * (i - s), t.opacity);
99}
100function lr(t, e, n, r) {
101 return arguments.length === 1 ? rn(t) : new ct(t, e, n, r ?? 1);
102}
103function ct(t, e, n, r) {
104 this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
105}
106qe(ct, lr, Ge(Qe, {
107 brighter(t) {
108 return new ct(this.l + Zt * (t ?? 1), this.a, this.b, this.opacity);
109 },
110 darker(t) {
111 return new ct(this.l - Zt * (t ?? 1), this.a, this.b, this.opacity);
112 },
113 rgb() {
114 var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
115 return e = Ke * ie(e), t = $e * ie(t), n = tn * ie(n), new je(
116 ae(3.1338561 * e - 1.6168667 * t - 0.4906146 * n),
117 ae(-0.9787684 * e + 1.9161415 * t + 0.033454 * n),
118 ae(0.0719453 * e - 0.2289914 * t + 1.4052427 * n),
119 this.opacity
120 );
121 }
122}));
123function re(t) {
124 return t > ur ? Math.pow(t, 1 / 3) : t / nn + en;
125}
126function ie(t) {
127 return t > bt ? t * t * t : nn * (t - en);
128}
129function ae(t) {
130 return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
131}
132function se(t) {
133 return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
134}
135function fr(t) {
136 if (t instanceof lt)
137 return new lt(t.h, t.c, t.l, t.opacity);
138 if (t instanceof ct || (t = rn(t)), t.a === 0 && t.b === 0)
139 return new lt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
140 var e = Math.atan2(t.b, t.a) * cr;
141 return new lt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
142}
143function ge(t, e, n, r) {
144 return arguments.length === 1 ? fr(t) : new lt(t, e, n, r ?? 1);
145}
146function lt(t, e, n, r) {
147 this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
148}
149function an(t) {
150 if (isNaN(t.h))
151 return new ct(t.l, 0, 0, t.opacity);
152 var e = t.h * or;
153 return new ct(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
154}
155qe(lt, ge, Ge(Qe, {
156 brighter(t) {
157 return new lt(this.h, this.c, this.l + Zt * (t ?? 1), this.opacity);
158 },
159 darker(t) {
160 return new lt(this.h, this.c, this.l - Zt * (t ?? 1), this.opacity);
161 },
162 rgb() {
163 return an(this).rgb();
164 }
165}));
166function hr(t) {
167 return function(e, n) {
168 var r = t((e = ge(e)).h, (n = ge(n)).h), i = te(e.c, n.c), a = te(e.l, n.l), s = te(e.opacity, n.opacity);
169 return function(g) {
170 return e.h = r(g), e.c = i(g), e.l = a(g), e.opacity = s(g), e + "";
171 };
172 };
173}
174const dr = hr(Fn);
175function mr(t, e) {
176 t = t.slice();
177 var n = 0, r = t.length - 1, i = t[n], a = t[r], s;
178 return a < i && (s = n, n = r, r = s, s = i, i = a, a = s), t[n] = e.floor(i), t[r] = e.ceil(a), t;
179}
180var oe = /* @__PURE__ */ new Date(), ce = /* @__PURE__ */ new Date();
181function tt(t, e, n, r) {
182 function i(a) {
183 return t(a = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+a)), a;
184 }
185 return i.floor = function(a) {
186 return t(a = /* @__PURE__ */ new Date(+a)), a;
187 }, i.ceil = function(a) {
188 return t(a = new Date(a - 1)), e(a, 1), t(a), a;
189 }, i.round = function(a) {
190 var s = i(a), g = i.ceil(a);
191 return a - s < g - a ? s : g;
192 }, i.offset = function(a, s) {
193 return e(a = /* @__PURE__ */ new Date(+a), s == null ? 1 : Math.floor(s)), a;
194 }, i.range = function(a, s, g) {
195 var k = [], p;
196 if (a = i.ceil(a), g = g == null ? 1 : Math.floor(g), !(a < s) || !(g > 0))
197 return k;
198 do
199 k.push(p = /* @__PURE__ */ new Date(+a)), e(a, g), t(a);
200 while (p < a && a < s);
201 return k;
202 }, i.filter = function(a) {
203 return tt(function(s) {
204 if (s >= s)
205 for (; t(s), !a(s); )
206 s.setTime(s - 1);
207 }, function(s, g) {
208 if (s >= s)
209 if (g < 0)
210 for (; ++g <= 0; )
211 for (; e(s, -1), !a(s); )
212 ;
213 else
214 for (; --g >= 0; )
215 for (; e(s, 1), !a(s); )
216 ;
217 });
218 }, n && (i.count = function(a, s) {
219 return oe.setTime(+a), ce.setTime(+s), t(oe), t(ce), Math.floor(n(oe, ce));
220 }, i.every = function(a) {
221 return a = Math.floor(a), !isFinite(a) || !(a > 0) ? null : a > 1 ? i.filter(r ? function(s) {
222 return r(s) % a === 0;
223 } : function(s) {
224 return i.count(0, s) % a === 0;
225 }) : i;
226 }), i;
227}
228var Xt = tt(function() {
229}, function(t, e) {
230 t.setTime(+t + e);
231}, function(t, e) {
232 return e - t;
233});
234Xt.every = function(t) {
235 return t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? tt(function(e) {
236 e.setTime(Math.floor(e / t) * t);
237 }, function(e, n) {
238 e.setTime(+e + n * t);
239 }, function(e, n) {
240 return (n - e) / t;
241 }) : Xt;
242};
243const gr = Xt;
244Xt.range;
245const ft = 1e3, st = ft * 60, mt = st * 60, gt = mt * 24, Te = gt * 7, Ae = gt * 30, ue = gt * 365;
246var sn = tt(function(t) {
247 t.setTime(t - t.getMilliseconds());
248}, function(t, e) {
249 t.setTime(+t + e * ft);
250}, function(t, e) {
251 return (e - t) / ft;
252}, function(t) {
253 return t.getUTCSeconds();
254});
255const Et = sn;
256sn.range;
257var on = tt(function(t) {
258 t.setTime(t - t.getMilliseconds() - t.getSeconds() * ft);
259}, function(t, e) {
260 t.setTime(+t + e * st);
261}, function(t, e) {
262 return (e - t) / st;
263}, function(t) {
264 return t.getMinutes();
265});
266const qt = on;
267on.range;
268var cn = tt(function(t) {
269 t.setTime(t - t.getMilliseconds() - t.getSeconds() * ft - t.getMinutes() * st);
270}, function(t, e) {
271 t.setTime(+t + e * mt);
272}, function(t, e) {
273 return (e - t) / mt;
274}, function(t) {
275 return t.getHours();
276});
277const Gt = cn;
278cn.range;
279var un = tt(
280 (t) => t.setHours(0, 0, 0, 0),
281 (t, e) => t.setDate(t.getDate() + e),
282 (t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * st) / gt,
283 (t) => t.getDate() - 1
284);
285const wt = un;
286un.range;
287function kt(t) {
288 return tt(function(e) {
289 e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0);
290 }, function(e, n) {
291 e.setDate(e.getDate() + n * 7);
292 }, function(e, n) {
293 return (n - e - (n.getTimezoneOffset() - e.getTimezoneOffset()) * st) / Te;
294 });
295}
296var Dt = kt(0), jt = kt(1), yr = kt(2), kr = kt(3), Ct = kt(4), vr = kt(5), pr = kt(6);
297Dt.range;
298jt.range;
299yr.range;
300kr.range;
301Ct.range;
302vr.range;
303pr.range;
304var ln = tt(function(t) {
305 t.setDate(1), t.setHours(0, 0, 0, 0);
306}, function(t, e) {
307 t.setMonth(t.getMonth() + e);
308}, function(t, e) {
309 return e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12;
310}, function(t) {
311 return t.getMonth();
312});
313const Qt = ln;
314ln.range;
315var be = tt(function(t) {
316 t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
317}, function(t, e) {
318 t.setFullYear(t.getFullYear() + e);
319}, function(t, e) {
320 return e.getFullYear() - t.getFullYear();
321}, function(t) {
322 return t.getFullYear();
323});
324be.every = function(t) {
325 return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : tt(function(e) {
326 e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
327 }, function(e, n) {
328 e.setFullYear(e.getFullYear() + n * t);
329 });
330};
331const yt = be;
332be.range;
333var fn = tt(function(t) {
334 t.setUTCHours(0, 0, 0, 0);
335}, function(t, e) {
336 t.setUTCDate(t.getUTCDate() + e);
337}, function(t, e) {
338 return (e - t) / gt;
339}, function(t) {
340 return t.getUTCDate() - 1;
341});
342const hn = fn;
343fn.range;
344function vt(t) {
345 return tt(function(e) {
346 e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0);
347 }, function(e, n) {
348 e.setUTCDate(e.getUTCDate() + n * 7);
349 }, function(e, n) {
350 return (n - e) / Te;
351 });
352}
353var dn = vt(0), Jt = vt(1), Tr = vt(2), br = vt(3), Mt = vt(4), xr = vt(5), wr = vt(6);
354dn.range;
355Jt.range;
356Tr.range;
357br.range;
358Mt.range;
359xr.range;
360wr.range;
361var xe = tt(function(t) {
362 t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
363}, function(t, e) {
364 t.setUTCFullYear(t.getUTCFullYear() + e);
365}, function(t, e) {
366 return e.getUTCFullYear() - t.getUTCFullYear();
367}, function(t) {
368 return t.getUTCFullYear();
369});
370xe.every = function(t) {
371 return !isFinite(t = Math.floor(t)) || !(t > 0) ? null : tt(function(e) {
372 e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
373 }, function(e, n) {
374 e.setUTCFullYear(e.getUTCFullYear() + n * t);
375 });
376};
377const It = xe;
378xe.range;
379function Dr(t, e, n, r, i, a) {
380 const s = [
381 [Et, 1, ft],
382 [Et, 5, 5 * ft],
383 [Et, 15, 15 * ft],
384 [Et, 30, 30 * ft],
385 [a, 1, st],
386 [a, 5, 5 * st],
387 [a, 15, 15 * st],
388 [a, 30, 30 * st],
389 [i, 1, mt],
390 [i, 3, 3 * mt],
391 [i, 6, 6 * mt],
392 [i, 12, 12 * mt],
393 [r, 1, gt],
394 [r, 2, 2 * gt],
395 [n, 1, Te],
396 [e, 1, Ae],
397 [e, 3, 3 * Ae],
398 [t, 1, ue]
399 ];
400 function g(p, T, _) {
401 const x = T < p;
402 x && ([p, T] = [T, p]);
403 const v = _ && typeof _.range == "function" ? _ : k(p, T, _), E = v ? v.range(p, +T + 1) : [];
404 return x ? E.reverse() : E;
405 }
406 function k(p, T, _) {
407 const x = Math.abs(T - p) / _, v = Xn(([, , N]) => N).right(s, x);
408 if (v === s.length)
409 return t.every(Ue(p / ue, T / ue, _));
410 if (v === 0)
411 return gr.every(Math.max(Ue(p, T, _), 1));
412 const [E, M] = s[x / s[v - 1][2] < s[v][2] / x ? v - 1 : v];
413 return E.every(M);
414 }
415 return [g, k];
416}
417const [Cr, Mr] = Dr(yt, Qt, Dt, wt, Gt, qt);
418function le(t) {
419 if (0 <= t.y && t.y < 100) {
420 var e = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
421 return e.setFullYear(t.y), e;
422 }
423 return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L);
424}
425function fe(t) {
426 if (0 <= t.y && t.y < 100) {
427 var e = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
428 return e.setUTCFullYear(t.y), e;
429 }
430 return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L));
431}
432function Ft(t, e, n) {
433 return { y: t, m: e, d: n, H: 0, M: 0, S: 0, L: 0 };
434}
435function Sr(t) {
436 var e = t.dateTime, n = t.date, r = t.time, i = t.periods, a = t.days, s = t.shortDays, g = t.months, k = t.shortMonths, p = Ut(i), T = Lt(i), _ = Ut(a), x = Lt(a), v = Ut(s), E = Lt(s), M = Ut(g), N = Lt(g), V = Ut(k), Q = Lt(k), H = {
437 a: J,
438 A: $,
439 b: dt,
440 B: m,
441 c: null,
442 d: Ne,
443 e: Ne,
444 f: Qr,
445 g: si,
446 G: ci,
447 H: qr,
448 I: Gr,
449 j: jr,
450 L: mn,
451 m: Jr,
452 M: Kr,
453 p: S,
454 q: Y,
455 Q: Ve,
456 s: Re,
457 S: $r,
458 u: ti,
459 U: ei,
460 V: ni,
461 w: ri,
462 W: ii,
463 x: null,
464 X: null,
465 y: ai,
466 Y: oi,
467 Z: ui,
468 "%": Pe
469 }, P = {
470 a: F,
471 A,
472 b: B,
473 B: z,
474 c: null,
475 d: He,
476 e: He,
477 f: di,
478 g: wi,
479 G: Ci,
480 H: li,
481 I: fi,
482 j: hi,
483 L: yn,
484 m: mi,
485 M: gi,
486 p: Yt,
487 q,
488 Q: Ve,
489 s: Re,
490 S: yi,
491 u: ki,
492 U: vi,
493 V: pi,
494 w: Ti,
495 W: bi,
496 x: null,
497 X: null,
498 y: xi,
499 Y: Di,
500 Z: Mi,
501 "%": Pe
502 }, R = {
503 a: h,
504 A: d,
505 b: c,
506 B: D,
507 c: o,
508 d: Oe,
509 e: Oe,
510 f: Rr,
511 g: We,
512 G: Ie,
513 H: ze,
514 I: ze,
515 j: Nr,
516 L: Vr,
517 m: zr,
518 M: Hr,
519 p: l,
520 q: Or,
521 Q: Zr,
522 s: Xr,
523 S: Pr,
524 u: Lr,
525 U: Ar,
526 V: Er,
527 w: Ur,
528 W: Ir,
529 x: I,
530 X: f,
531 y: We,
532 Y: Ie,
533 Z: Wr,
534 "%": Br
535 };
536 H.x = w(n, H), H.X = w(r, H), H.c = w(e, H), P.x = w(n, P), P.X = w(r, P), P.c = w(e, P);
537 function w(y, C) {
538 return function(U) {
539 var u = [], Z = -1, L = 0, K = y.length, G, it, rt;
540 for (U instanceof Date || (U = /* @__PURE__ */ new Date(+U)); ++Z < K; )
541 y.charCodeAt(Z) === 37 && (u.push(y.slice(L, Z)), (it = Ee[G = y.charAt(++Z)]) != null ? G = y.charAt(++Z) : it = G === "e" ? " " : "0", (rt = C[G]) && (G = rt(U, it)), u.push(G), L = Z + 1);
542 return u.push(y.slice(L, Z)), u.join("");
543 };
544 }
545 function O(y, C) {
546 return function(U) {
547 var u = Ft(1900, void 0, 1), Z = b(u, y, U += "", 0), L, K;
548 if (Z != U.length)
549 return null;
550 if ("Q" in u)
551 return new Date(u.Q);
552 if ("s" in u)
553 return new Date(u.s * 1e3 + ("L" in u ? u.L : 0));
554 if (C && !("Z" in u) && (u.Z = 0), "p" in u && (u.H = u.H % 12 + u.p * 12), u.m === void 0 && (u.m = "q" in u ? u.q : 0), "V" in u) {
555 if (u.V < 1 || u.V > 53)
556 return null;
557 "w" in u || (u.w = 1), "Z" in u ? (L = fe(Ft(u.y, 0, 1)), K = L.getUTCDay(), L = K > 4 || K === 0 ? Jt.ceil(L) : Jt(L), L = hn.offset(L, (u.V - 1) * 7), u.y = L.getUTCFullYear(), u.m = L.getUTCMonth(), u.d = L.getUTCDate() + (u.w + 6) % 7) : (L = le(Ft(u.y, 0, 1)), K = L.getDay(), L = K > 4 || K === 0 ? jt.ceil(L) : jt(L), L = wt.offset(L, (u.V - 1) * 7), u.y = L.getFullYear(), u.m = L.getMonth(), u.d = L.getDate() + (u.w + 6) % 7);
558 } else
559 ("W" in u || "U" in u) && ("w" in u || (u.w = "u" in u ? u.u % 7 : "W" in u ? 1 : 0), K = "Z" in u ? fe(Ft(u.y, 0, 1)).getUTCDay() : le(Ft(u.y, 0, 1)).getDay(), u.m = 0, u.d = "W" in u ? (u.w + 6) % 7 + u.W * 7 - (K + 5) % 7 : u.w + u.U * 7 - (K + 6) % 7);
560 return "Z" in u ? (u.H += u.Z / 100 | 0, u.M += u.Z % 100, fe(u)) : le(u);
561 };
562 }
563 function b(y, C, U, u) {
564 for (var Z = 0, L = C.length, K = U.length, G, it; Z < L; ) {
565 if (u >= K)
566 return -1;
567 if (G = C.charCodeAt(Z++), G === 37) {
568 if (G = C.charAt(Z++), it = R[G in Ee ? C.charAt(Z++) : G], !it || (u = it(y, U, u)) < 0)
569 return -1;
570 } else if (G != U.charCodeAt(u++))
571 return -1;
572 }
573 return u;
574 }
575 function l(y, C, U) {
576 var u = p.exec(C.slice(U));
577 return u ? (y.p = T.get(u[0].toLowerCase()), U + u[0].length) : -1;
578 }
579 function h(y, C, U) {
580 var u = v.exec(C.slice(U));
581 return u ? (y.w = E.get(u[0].toLowerCase()), U + u[0].length) : -1;
582 }
583 function d(y, C, U) {
584 var u = _.exec(C.slice(U));
585 return u ? (y.w = x.get(u[0].toLowerCase()), U + u[0].length) : -1;
586 }
587 function c(y, C, U) {
588 var u = V.exec(C.slice(U));
589 return u ? (y.m = Q.get(u[0].toLowerCase()), U + u[0].length) : -1;
590 }
591 function D(y, C, U) {
592 var u = M.exec(C.slice(U));
593 return u ? (y.m = N.get(u[0].toLowerCase()), U + u[0].length) : -1;
594 }
595 function o(y, C, U) {
596 return b(y, e, C, U);
597 }
598 function I(y, C, U) {
599 return b(y, n, C, U);
600 }
601 function f(y, C, U) {
602 return b(y, r, C, U);
603 }
604 function J(y) {
605 return s[y.getDay()];
606 }
607 function $(y) {
608 return a[y.getDay()];
609 }
610 function dt(y) {
611 return k[y.getMonth()];
612 }
613 function m(y) {
614 return g[y.getMonth()];
615 }
616 function S(y) {
617 return i[+(y.getHours() >= 12)];
618 }
619 function Y(y) {
620 return 1 + ~~(y.getMonth() / 3);
621 }
622 function F(y) {
623 return s[y.getUTCDay()];
624 }
625 function A(y) {
626 return a[y.getUTCDay()];
627 }
628 function B(y) {
629 return k[y.getUTCMonth()];
630 }
631 function z(y) {
632 return g[y.getUTCMonth()];
633 }
634 function Yt(y) {
635 return i[+(y.getUTCHours() >= 12)];
636 }
637 function q(y) {
638 return 1 + ~~(y.getUTCMonth() / 3);
639 }
640 return {
641 format: function(y) {
642 var C = w(y += "", H);
643 return C.toString = function() {
644 return y;
645 }, C;
646 },
647 parse: function(y) {
648 var C = O(y += "", !1);
649 return C.toString = function() {
650 return y;
651 }, C;
652 },
653 utcFormat: function(y) {
654 var C = w(y += "", P);
655 return C.toString = function() {
656 return y;
657 }, C;
658 },
659 utcParse: function(y) {
660 var C = O(y += "", !0);
661 return C.toString = function() {
662 return y;
663 }, C;
664 }
665 };
666}
667var Ee = { "-": "", _: " ", 0: "0" }, j = /^\s*\d+/, _r = /^%/, Yr = /[\\^$*+?|[\]().{}]/g;
668function W(t, e, n) {
669 var r = t < 0 ? "-" : "", i = (r ? -t : t) + "", a = i.length;
670 return r + (a < n ? new Array(n - a + 1).join(e) + i : i);
671}
672function Fr(t) {
673 return t.replace(Yr, "\\$&");
674}
675function Ut(t) {
676 return new RegExp("^(?:" + t.map(Fr).join("|") + ")", "i");
677}
678function Lt(t) {
679 return new Map(t.map((e, n) => [e.toLowerCase(), n]));
680}
681function Ur(t, e, n) {
682 var r = j.exec(e.slice(n, n + 1));
683 return r ? (t.w = +r[0], n + r[0].length) : -1;
684}
685function Lr(t, e, n) {
686 var r = j.exec(e.slice(n, n + 1));
687 return r ? (t.u = +r[0], n + r[0].length) : -1;
688}
689function Ar(t, e, n) {
690 var r = j.exec(e.slice(n, n + 2));
691 return r ? (t.U = +r[0], n + r[0].length) : -1;
692}
693function Er(t, e, n) {
694 var r = j.exec(e.slice(n, n + 2));
695 return r ? (t.V = +r[0], n + r[0].length) : -1;
696}
697function Ir(t, e, n) {
698 var r = j.exec(e.slice(n, n + 2));
699 return r ? (t.W = +r[0], n + r[0].length) : -1;
700}
701function Ie(t, e, n) {
702 var r = j.exec(e.slice(n, n + 4));
703 return r ? (t.y = +r[0], n + r[0].length) : -1;
704}
705function We(t, e, n) {
706 var r = j.exec(e.slice(n, n + 2));
707 return r ? (t.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
708}
709function Wr(t, e, n) {
710 var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n, n + 6));
711 return r ? (t.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
712}
713function Or(t, e, n) {
714 var r = j.exec(e.slice(n, n + 1));
715 return r ? (t.q = r[0] * 3 - 3, n + r[0].length) : -1;
716}
717function zr(t, e, n) {
718 var r = j.exec(e.slice(n, n + 2));
719 return r ? (t.m = r[0] - 1, n + r[0].length) : -1;
720}
721function Oe(t, e, n) {
722 var r = j.exec(e.slice(n, n + 2));
723 return r ? (t.d = +r[0], n + r[0].length) : -1;
724}
725function Nr(t, e, n) {
726 var r = j.exec(e.slice(n, n + 3));
727 return r ? (t.m = 0, t.d = +r[0], n + r[0].length) : -1;
728}
729function ze(t, e, n) {
730 var r = j.exec(e.slice(n, n + 2));
731 return r ? (t.H = +r[0], n + r[0].length) : -1;
732}
733function Hr(t, e, n) {
734 var r = j.exec(e.slice(n, n + 2));
735 return r ? (t.M = +r[0], n + r[0].length) : -1;
736}
737function Pr(t, e, n) {
738 var r = j.exec(e.slice(n, n + 2));
739 return r ? (t.S = +r[0], n + r[0].length) : -1;
740}
741function Vr(t, e, n) {
742 var r = j.exec(e.slice(n, n + 3));
743 return r ? (t.L = +r[0], n + r[0].length) : -1;
744}
745function Rr(t, e, n) {
746 var r = j.exec(e.slice(n, n + 6));
747 return r ? (t.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
748}
749function Br(t, e, n) {
750 var r = _r.exec(e.slice(n, n + 1));
751 return r ? n + r[0].length : -1;
752}
753function Zr(t, e, n) {
754 var r = j.exec(e.slice(n));
755 return r ? (t.Q = +r[0], n + r[0].length) : -1;
756}
757function Xr(t, e, n) {
758 var r = j.exec(e.slice(n));
759 return r ? (t.s = +r[0], n + r[0].length) : -1;
760}
761function Ne(t, e) {
762 return W(t.getDate(), e, 2);
763}
764function qr(t, e) {
765 return W(t.getHours(), e, 2);
766}
767function Gr(t, e) {
768 return W(t.getHours() % 12 || 12, e, 2);
769}
770function jr(t, e) {
771 return W(1 + wt.count(yt(t), t), e, 3);
772}
773function mn(t, e) {
774 return W(t.getMilliseconds(), e, 3);
775}
776function Qr(t, e) {
777 return mn(t, e) + "000";
778}
779function Jr(t, e) {
780 return W(t.getMonth() + 1, e, 2);
781}
782function Kr(t, e) {
783 return W(t.getMinutes(), e, 2);
784}
785function $r(t, e) {
786 return W(t.getSeconds(), e, 2);
787}
788function ti(t) {
789 var e = t.getDay();
790 return e === 0 ? 7 : e;
791}
792function ei(t, e) {
793 return W(Dt.count(yt(t) - 1, t), e, 2);
794}
795function gn(t) {
796 var e = t.getDay();
797 return e >= 4 || e === 0 ? Ct(t) : Ct.ceil(t);
798}
799function ni(t, e) {
800 return t = gn(t), W(Ct.count(yt(t), t) + (yt(t).getDay() === 4), e, 2);
801}
802function ri(t) {
803 return t.getDay();
804}
805function ii(t, e) {
806 return W(jt.count(yt(t) - 1, t), e, 2);
807}
808function ai(t, e) {
809 return W(t.getFullYear() % 100, e, 2);
810}
811function si(t, e) {
812 return t = gn(t), W(t.getFullYear() % 100, e, 2);
813}
814function oi(t, e) {
815 return W(t.getFullYear() % 1e4, e, 4);
816}
817function ci(t, e) {
818 var n = t.getDay();
819 return t = n >= 4 || n === 0 ? Ct(t) : Ct.ceil(t), W(t.getFullYear() % 1e4, e, 4);
820}
821function ui(t) {
822 var e = t.getTimezoneOffset();
823 return (e > 0 ? "-" : (e *= -1, "+")) + W(e / 60 | 0, "0", 2) + W(e % 60, "0", 2);
824}
825function He(t, e) {
826 return W(t.getUTCDate(), e, 2);
827}
828function li(t, e) {
829 return W(t.getUTCHours(), e, 2);
830}
831function fi(t, e) {
832 return W(t.getUTCHours() % 12 || 12, e, 2);
833}
834function hi(t, e) {
835 return W(1 + hn.count(It(t), t), e, 3);
836}
837function yn(t, e) {
838 return W(t.getUTCMilliseconds(), e, 3);
839}
840function di(t, e) {
841 return yn(t, e) + "000";
842}
843function mi(t, e) {
844 return W(t.getUTCMonth() + 1, e, 2);
845}
846function gi(t, e) {
847 return W(t.getUTCMinutes(), e, 2);
848}
849function yi(t, e) {
850 return W(t.getUTCSeconds(), e, 2);
851}
852function ki(t) {
853 var e = t.getUTCDay();
854 return e === 0 ? 7 : e;
855}
856function vi(t, e) {
857 return W(dn.count(It(t) - 1, t), e, 2);
858}
859function kn(t) {
860 var e = t.getUTCDay();
861 return e >= 4 || e === 0 ? Mt(t) : Mt.ceil(t);
862}
863function pi(t, e) {
864 return t = kn(t), W(Mt.count(It(t), t) + (It(t).getUTCDay() === 4), e, 2);
865}
866function Ti(t) {
867 return t.getUTCDay();
868}
869function bi(t, e) {
870 return W(Jt.count(It(t) - 1, t), e, 2);
871}
872function xi(t, e) {
873 return W(t.getUTCFullYear() % 100, e, 2);
874}
875function wi(t, e) {
876 return t = kn(t), W(t.getUTCFullYear() % 100, e, 2);
877}
878function Di(t, e) {
879 return W(t.getUTCFullYear() % 1e4, e, 4);
880}
881function Ci(t, e) {
882 var n = t.getUTCDay();
883 return t = n >= 4 || n === 0 ? Mt(t) : Mt.ceil(t), W(t.getUTCFullYear() % 1e4, e, 4);
884}
885function Mi() {
886 return "+0000";
887}
888function Pe() {
889 return "%";
890}
891function Ve(t) {
892 return +t;
893}
894function Re(t) {
895 return Math.floor(+t / 1e3);
896}
897var pt, Kt;
898Si({
899 dateTime: "%x, %X",
900 date: "%-m/%-d/%Y",
901 time: "%-I:%M:%S %p",
902 periods: ["AM", "PM"],
903 days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
904 shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
905 months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
906 shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
907});
908function Si(t) {
909 return pt = Sr(t), Kt = pt.format, pt.parse, pt.utcFormat, pt.utcParse, pt;
910}
911function _i(t) {
912 return new Date(t);
913}
914function Yi(t) {
915 return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
916}
917function vn(t, e, n, r, i, a, s, g, k, p) {
918 var T = qn(), _ = T.invert, x = T.domain, v = p(".%L"), E = p(":%S"), M = p("%I:%M"), N = p("%I %p"), V = p("%a %d"), Q = p("%b %d"), H = p("%B"), P = p("%Y");
919 function R(w) {
920 return (k(w) < w ? v : g(w) < w ? E : s(w) < w ? M : a(w) < w ? N : r(w) < w ? i(w) < w ? V : Q : n(w) < w ? H : P)(w);
921 }
922 return T.invert = function(w) {
923 return new Date(_(w));
924 }, T.domain = function(w) {
925 return arguments.length ? x(Array.from(w, Yi)) : x().map(_i);
926 }, T.ticks = function(w) {
927 var O = x();
928 return t(O[0], O[O.length - 1], w ?? 10);
929 }, T.tickFormat = function(w, O) {
930 return O == null ? R : p(O);
931 }, T.nice = function(w) {
932 var O = x();
933 return (!w || typeof w.range != "function") && (w = e(O[0], O[O.length - 1], w ?? 10)), w ? x(mr(O, w)) : T;
934 }, T.copy = function() {
935 return Gn(T, vn(t, e, n, r, i, a, s, g, k, p));
936 }, T;
937}
938function Fi() {
939 return Qn.apply(vn(Cr, Mr, yt, Qt, Dt, wt, Gt, qt, Et, Kt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
940}
941var ye = function() {
942 var t = function(b, l, h, d) {
943 for (h = h || {}, d = b.length; d--; h[b[d]] = l)
944 ;
945 return h;
946 }, e = [1, 3], n = [1, 5], r = [7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 28, 35, 40], i = [1, 15], a = [1, 16], s = [1, 17], g = [1, 18], k = [1, 19], p = [1, 20], T = [1, 21], _ = [1, 22], x = [1, 23], v = [1, 24], E = [1, 25], M = [1, 26], N = [1, 27], V = [1, 29], Q = [1, 31], H = [1, 34], P = [5, 7, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 25, 26, 28, 35, 40], R = {
947 trace: function() {
948 },
949 yy: {},
950 symbols_: { error: 2, start: 3, directive: 4, gantt: 5, document: 6, EOF: 7, line: 8, SPACE: 9, statement: 10, NL: 11, dateFormat: 12, inclusiveEndDates: 13, topAxis: 14, axisFormat: 15, tickInterval: 16, excludes: 17, includes: 18, todayMarker: 19, title: 20, acc_title: 21, acc_title_value: 22, acc_descr: 23, acc_descr_value: 24, acc_descr_multiline_value: 25, section: 26, clickStatement: 27, taskTxt: 28, taskData: 29, openDirective: 30, typeDirective: 31, closeDirective: 32, ":": 33, argDirective: 34, click: 35, callbackname: 36, callbackargs: 37, href: 38, clickStatementDebug: 39, open_directive: 40, type_directive: 41, arg_directive: 42, close_directive: 43, $accept: 0, $end: 1 },
951 terminals_: { 2: "error", 5: "gantt", 7: "EOF", 9: "SPACE", 11: "NL", 12: "dateFormat", 13: "inclusiveEndDates", 14: "topAxis", 15: "axisFormat", 16: "tickInterval", 17: "excludes", 18: "includes", 19: "todayMarker", 20: "title", 21: "acc_title", 22: "acc_title_value", 23: "acc_descr", 24: "acc_descr_value", 25: "acc_descr_multiline_value", 26: "section", 28: "taskTxt", 29: "taskData", 33: ":", 35: "click", 36: "callbackname", 37: "callbackargs", 38: "href", 40: "open_directive", 41: "type_directive", 42: "arg_directive", 43: "close_directive" },
952 productions_: [0, [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [8, 1], [8, 1], [8, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 2], [10, 1], [4, 4], [4, 6], [27, 2], [27, 3], [27, 3], [27, 4], [27, 3], [27, 4], [27, 2], [39, 2], [39, 3], [39, 3], [39, 4], [39, 3], [39, 4], [39, 2], [30, 1], [31, 1], [34, 1], [32, 1]],
953 performAction: function(l, h, d, c, D, o, I) {
954 var f = o.length - 1;
955 switch (D) {
956 case 2:
957 return o[f - 1];
958 case 3:
959 this.$ = [];
960 break;
961 case 4:
962 o[f - 1].push(o[f]), this.$ = o[f - 1];
963 break;
964 case 5:
965 case 6:
966 this.$ = o[f];
967 break;
968 case 7:
969 case 8:
970 this.$ = [];
971 break;
972 case 9:
973 c.setDateFormat(o[f].substr(11)), this.$ = o[f].substr(11);
974 break;
975 case 10:
976 c.enableInclusiveEndDates(), this.$ = o[f].substr(18);
977 break;
978 case 11:
979 c.TopAxis(), this.$ = o[f].substr(8);
980 break;
981 case 12:
982 c.setAxisFormat(o[f].substr(11)), this.$ = o[f].substr(11);
983 break;
984 case 13:
985 c.setTickInterval(o[f].substr(13)), this.$ = o[f].substr(13);
986 break;
987 case 14:
988 c.setExcludes(o[f].substr(9)), this.$ = o[f].substr(9);
989 break;
990 case 15:
991 c.setIncludes(o[f].substr(9)), this.$ = o[f].substr(9);
992 break;
993 case 16:
994 c.setTodayMarker(o[f].substr(12)), this.$ = o[f].substr(12);
995 break;
996 case 17:
997 c.setDiagramTitle(o[f].substr(6)), this.$ = o[f].substr(6);
998 break;
999 case 18:
1000 this.$ = o[f].trim(), c.setAccTitle(this.$);
1001 break;
1002 case 19:
1003 case 20:
1004 this.$ = o[f].trim(), c.setAccDescription(this.$);
1005 break;
1006 case 21:
1007 c.addSection(o[f].substr(8)), this.$ = o[f].substr(8);
1008 break;
1009 case 23:
1010 c.addTask(o[f - 1], o[f]), this.$ = "task";
1011 break;
1012 case 27:
1013 this.$ = o[f - 1], c.setClickEvent(o[f - 1], o[f], null);
1014 break;
1015 case 28:
1016 this.$ = o[f - 2], c.setClickEvent(o[f - 2], o[f - 1], o[f]);
1017 break;
1018 case 29:
1019 this.$ = o[f - 2], c.setClickEvent(o[f - 2], o[f - 1], null), c.setLink(o[f - 2], o[f]);
1020 break;
1021 case 30:
1022 this.$ = o[f - 3], c.setClickEvent(o[f - 3], o[f - 2], o[f - 1]), c.setLink(o[f - 3], o[f]);
1023 break;
1024 case 31:
1025 this.$ = o[f - 2], c.setClickEvent(o[f - 2], o[f], null), c.setLink(o[f - 2], o[f - 1]);
1026 break;
1027 case 32:
1028 this.$ = o[f - 3], c.setClickEvent(o[f - 3], o[f - 1], o[f]), c.setLink(o[f - 3], o[f - 2]);
1029 break;
1030 case 33:
1031 this.$ = o[f - 1], c.setLink(o[f - 1], o[f]);
1032 break;
1033 case 34:
1034 case 40:
1035 this.$ = o[f - 1] + " " + o[f];
1036 break;
1037 case 35:
1038 case 36:
1039 case 38:
1040 this.$ = o[f - 2] + " " + o[f - 1] + " " + o[f];
1041 break;
1042 case 37:
1043 case 39:
1044 this.$ = o[f - 3] + " " + o[f - 2] + " " + o[f - 1] + " " + o[f];
1045 break;
1046 case 41:
1047 c.parseDirective("%%{", "open_directive");
1048 break;
1049 case 42:
1050 c.parseDirective(o[f], "type_directive");
1051 break;
1052 case 43:
1053 o[f] = o[f].trim().replace(/'/g, '"'), c.parseDirective(o[f], "arg_directive");
1054 break;
1055 case 44:
1056 c.parseDirective("}%%", "close_directive", "gantt");
1057 break;
1058 }
1059 },
1060 table: [{ 3: 1, 4: 2, 5: e, 30: 4, 40: n }, { 1: [3] }, { 3: 6, 4: 2, 5: e, 30: 4, 40: n }, t(r, [2, 3], { 6: 7 }), { 31: 8, 41: [1, 9] }, { 41: [2, 41] }, { 1: [2, 1] }, { 4: 30, 7: [1, 10], 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: i, 13: a, 14: s, 15: g, 16: k, 17: p, 18: T, 19: _, 20: x, 21: v, 23: E, 25: M, 26: N, 27: 28, 28: V, 30: 4, 35: Q, 40: n }, { 32: 32, 33: [1, 33], 43: H }, t([33, 43], [2, 42]), t(r, [2, 8], { 1: [2, 2] }), t(r, [2, 4]), { 4: 30, 10: 35, 12: i, 13: a, 14: s, 15: g, 16: k, 17: p, 18: T, 19: _, 20: x, 21: v, 23: E, 25: M, 26: N, 27: 28, 28: V, 30: 4, 35: Q, 40: n }, t(r, [2, 6]), t(r, [2, 7]), t(r, [2, 9]), t(r, [2, 10]), t(r, [2, 11]), t(r, [2, 12]), t(r, [2, 13]), t(r, [2, 14]), t(r, [2, 15]), t(r, [2, 16]), t(r, [2, 17]), { 22: [1, 36] }, { 24: [1, 37] }, t(r, [2, 20]), t(r, [2, 21]), t(r, [2, 22]), { 29: [1, 38] }, t(r, [2, 24]), { 36: [1, 39], 38: [1, 40] }, { 11: [1, 41] }, { 34: 42, 42: [1, 43] }, { 11: [2, 44] }, t(r, [2, 5]), t(r, [2, 18]), t(r, [2, 19]), t(r, [2, 23]), t(r, [2, 27], { 37: [1, 44], 38: [1, 45] }), t(r, [2, 33], { 36: [1, 46] }), t(P, [2, 25]), { 32: 47, 43: H }, { 43: [2, 43] }, t(r, [2, 28], { 38: [1, 48] }), t(r, [2, 29]), t(r, [2, 31], { 37: [1, 49] }), { 11: [1, 50] }, t(r, [2, 30]), t(r, [2, 32]), t(P, [2, 26])],
1061 defaultActions: { 5: [2, 41], 6: [2, 1], 34: [2, 44], 43: [2, 43] },
1062 parseError: function(l, h) {
1063 if (h.recoverable)
1064 this.trace(l);
1065 else {
1066 var d = new Error(l);
1067 throw d.hash = h, d;
1068 }
1069 },
1070 parse: function(l) {
1071 var h = this, d = [0], c = [], D = [null], o = [], I = this.table, f = "", J = 0, $ = 0, dt = 2, m = 1, S = o.slice.call(arguments, 1), Y = Object.create(this.lexer), F = { yy: {} };
1072 for (var A in this.yy)
1073 Object.prototype.hasOwnProperty.call(this.yy, A) && (F.yy[A] = this.yy[A]);
1074 Y.setInput(l, F.yy), F.yy.lexer = Y, F.yy.parser = this, typeof Y.yylloc > "u" && (Y.yylloc = {});
1075 var B = Y.yylloc;
1076 o.push(B);
1077 var z = Y.options && Y.options.ranges;
1078 typeof F.yy.parseError == "function" ? this.parseError = F.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1079 function Yt() {
1080 var rt;
1081 return rt = c.pop() || Y.lex() || m, typeof rt != "number" && (rt instanceof Array && (c = rt, rt = c.pop()), rt = h.symbols_[rt] || rt), rt;
1082 }
1083 for (var q, y, C, U, u = {}, Z, L, K, G; ; ) {
1084 if (y = d[d.length - 1], this.defaultActions[y] ? C = this.defaultActions[y] : ((q === null || typeof q > "u") && (q = Yt()), C = I[y] && I[y][q]), typeof C > "u" || !C.length || !C[0]) {
1085 var it = "";
1086 G = [];
1087 for (Z in I[y])
1088 this.terminals_[Z] && Z > dt && G.push("'" + this.terminals_[Z] + "'");
1089 Y.showPosition ? it = "Parse error on line " + (J + 1) + `:
1090` + Y.showPosition() + `
1091Expecting ` + G.join(", ") + ", got '" + (this.terminals_[q] || q) + "'" : it = "Parse error on line " + (J + 1) + ": Unexpected " + (q == m ? "end of input" : "'" + (this.terminals_[q] || q) + "'"), this.parseError(it, {
1092 text: Y.match,
1093 token: this.terminals_[q] || q,
1094 line: Y.yylineno,
1095 loc: B,
1096 expected: G
1097 });
1098 }
1099 if (C[0] instanceof Array && C.length > 1)
1100 throw new Error("Parse Error: multiple actions possible at state: " + y + ", token: " + q);
1101 switch (C[0]) {
1102 case 1:
1103 d.push(q), D.push(Y.yytext), o.push(Y.yylloc), d.push(C[1]), q = null, $ = Y.yyleng, f = Y.yytext, J = Y.yylineno, B = Y.yylloc;
1104 break;
1105 case 2:
1106 if (L = this.productions_[C[1]][1], u.$ = D[D.length - L], u._$ = {
1107 first_line: o[o.length - (L || 1)].first_line,
1108 last_line: o[o.length - 1].last_line,
1109 first_column: o[o.length - (L || 1)].first_column,
1110 last_column: o[o.length - 1].last_column
1111 }, z && (u._$.range = [
1112 o[o.length - (L || 1)].range[0],
1113 o[o.length - 1].range[1]
1114 ]), U = this.performAction.apply(u, [
1115 f,
1116 $,
1117 J,
1118 F.yy,
1119 C[1],
1120 D,
1121 o
1122 ].concat(S)), typeof U < "u")
1123 return U;
1124 L && (d = d.slice(0, -1 * L * 2), D = D.slice(0, -1 * L), o = o.slice(0, -1 * L)), d.push(this.productions_[C[1]][0]), D.push(u.$), o.push(u._$), K = I[d[d.length - 2]][d[d.length - 1]], d.push(K);
1125 break;
1126 case 3:
1127 return !0;
1128 }
1129 }
1130 return !0;
1131 }
1132 }, w = function() {
1133 var b = {
1134 EOF: 1,
1135 parseError: function(h, d) {
1136 if (this.yy.parser)
1137 this.yy.parser.parseError(h, d);
1138 else
1139 throw new Error(h);
1140 },
1141 // resets the lexer, sets new input
1142 setInput: function(l, h) {
1143 return this.yy = h || this.yy || {}, this._input = l, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1144 first_line: 1,
1145 first_column: 0,
1146 last_line: 1,
1147 last_column: 0
1148 }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1149 },
1150 // consumes and returns one char from the input
1151 input: function() {
1152 var l = this._input[0];
1153 this.yytext += l, this.yyleng++, this.offset++, this.match += l, this.matched += l;
1154 var h = l.match(/(?:\r\n?|\n).*/g);
1155 return h ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), l;
1156 },
1157 // unshifts one char (or a string) into the input
1158 unput: function(l) {
1159 var h = l.length, d = l.split(/(?:\r\n?|\n)/g);
1160 this._input = l + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - h), this.offset -= h;
1161 var c = this.match.split(/(?:\r\n?|\n)/g);
1162 this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), d.length - 1 && (this.yylineno -= d.length - 1);
1163 var D = this.yylloc.range;
1164 return this.yylloc = {
1165 first_line: this.yylloc.first_line,
1166 last_line: this.yylineno + 1,
1167 first_column: this.yylloc.first_column,
1168 last_column: d ? (d.length === c.length ? this.yylloc.first_column : 0) + c[c.length - d.length].length - d[0].length : this.yylloc.first_column - h
1169 }, this.options.ranges && (this.yylloc.range = [D[0], D[0] + this.yyleng - h]), this.yyleng = this.yytext.length, this;
1170 },
1171 // When called from action, caches matched text and appends it on next action
1172 more: function() {
1173 return this._more = !0, this;
1174 },
1175 // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
1176 reject: function() {
1177 if (this.options.backtrack_lexer)
1178 this._backtrack = !0;
1179 else
1180 return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
1181` + this.showPosition(), {
1182 text: "",
1183 token: null,
1184 line: this.yylineno
1185 });
1186 return this;
1187 },
1188 // retain first n characters of the match
1189 less: function(l) {
1190 this.unput(this.match.slice(l));
1191 },
1192 // displays already matched input, i.e. for error messages
1193 pastInput: function() {
1194 var l = this.matched.substr(0, this.matched.length - this.match.length);
1195 return (l.length > 20 ? "..." : "") + l.substr(-20).replace(/\n/g, "");
1196 },
1197 // displays upcoming input, i.e. for error messages
1198 upcomingInput: function() {
1199 var l = this.match;
1200 return l.length < 20 && (l += this._input.substr(0, 20 - l.length)), (l.substr(0, 20) + (l.length > 20 ? "..." : "")).replace(/\n/g, "");
1201 },
1202 // displays the character position where the lexing error occurred, i.e. for error messages
1203 showPosition: function() {
1204 var l = this.pastInput(), h = new Array(l.length + 1).join("-");
1205 return l + this.upcomingInput() + `
1206` + h + "^";
1207 },
1208 // test the lexed token: return FALSE when not a match, otherwise return token
1209 test_match: function(l, h) {
1210 var d, c, D;
1211 if (this.options.backtrack_lexer && (D = {
1212 yylineno: this.yylineno,
1213 yylloc: {
1214 first_line: this.yylloc.first_line,
1215 last_line: this.last_line,
1216 first_column: this.yylloc.first_column,
1217 last_column: this.yylloc.last_column
1218 },
1219 yytext: this.yytext,
1220 match: this.match,
1221 matches: this.matches,
1222 matched: this.matched,
1223 yyleng: this.yyleng,
1224 offset: this.offset,
1225 _more: this._more,
1226 _input: this._input,
1227 yy: this.yy,
1228 conditionStack: this.conditionStack.slice(0),
1229 done: this.done
1230 }, this.options.ranges && (D.yylloc.range = this.yylloc.range.slice(0))), c = l[0].match(/(?:\r\n?|\n).*/g), c && (this.yylineno += c.length), this.yylloc = {
1231 first_line: this.yylloc.last_line,
1232 last_line: this.yylineno + 1,
1233 first_column: this.yylloc.last_column,
1234 last_column: c ? c[c.length - 1].length - c[c.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + l[0].length
1235 }, this.yytext += l[0], this.match += l[0], this.matches = l, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(l[0].length), this.matched += l[0], d = this.performAction.call(this, this.yy, this, h, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), d)
1236 return d;
1237 if (this._backtrack) {
1238 for (var o in D)
1239 this[o] = D[o];
1240 return !1;
1241 }
1242 return !1;
1243 },
1244 // return next match in input
1245 next: function() {
1246 if (this.done)
1247 return this.EOF;
1248 this._input || (this.done = !0);
1249 var l, h, d, c;
1250 this._more || (this.yytext = "", this.match = "");
1251 for (var D = this._currentRules(), o = 0; o < D.length; o++)
1252 if (d = this._input.match(this.rules[D[o]]), d && (!h || d[0].length > h[0].length)) {
1253 if (h = d, c = o, this.options.backtrack_lexer) {
1254 if (l = this.test_match(d, D[o]), l !== !1)
1255 return l;
1256 if (this._backtrack) {
1257 h = !1;
1258 continue;
1259 } else
1260 return !1;
1261 } else if (!this.options.flex)
1262 break;
1263 }
1264 return h ? (l = this.test_match(h, D[c]), l !== !1 ? l : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
1265` + this.showPosition(), {
1266 text: "",
1267 token: null,
1268 line: this.yylineno
1269 });
1270 },
1271 // return next match that has a token
1272 lex: function() {
1273 var h = this.next();
1274 return h || this.lex();
1275 },
1276 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1277 begin: function(h) {
1278 this.conditionStack.push(h);
1279 },
1280 // pop the previously active lexer condition state off the condition stack
1281 popState: function() {
1282 var h = this.conditionStack.length - 1;
1283 return h > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1284 },
1285 // produce the lexer rule set which is active for the currently active lexer condition state
1286 _currentRules: function() {
1287 return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1288 },
1289 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1290 topState: function(h) {
1291 return h = this.conditionStack.length - 1 - Math.abs(h || 0), h >= 0 ? this.conditionStack[h] : "INITIAL";
1292 },
1293 // alias for begin(condition)
1294 pushState: function(h) {
1295 this.begin(h);
1296 },
1297 // return the number of states currently on the stack
1298 stateStackSize: function() {
1299 return this.conditionStack.length;
1300 },
1301 options: { "case-insensitive": !0 },
1302 performAction: function(h, d, c, D) {
1303 switch (c) {
1304 case 0:
1305 return this.begin("open_directive"), 40;
1306 case 1:
1307 return this.begin("type_directive"), 41;
1308 case 2:
1309 return this.popState(), this.begin("arg_directive"), 33;
1310 case 3:
1311 return this.popState(), this.popState(), 43;
1312 case 4:
1313 return 42;
1314 case 5:
1315 return this.begin("acc_title"), 21;
1316 case 6:
1317 return this.popState(), "acc_title_value";
1318 case 7:
1319 return this.begin("acc_descr"), 23;
1320 case 8:
1321 return this.popState(), "acc_descr_value";
1322 case 9:
1323 this.begin("acc_descr_multiline");
1324 break;
1325 case 10:
1326 this.popState();
1327 break;
1328 case 11:
1329 return "acc_descr_multiline_value";
1330 case 12:
1331 break;
1332 case 13:
1333 break;
1334 case 14:
1335 break;
1336 case 15:
1337 return 11;
1338 case 16:
1339 break;
1340 case 17:
1341 break;
1342 case 18:
1343 break;
1344 case 19:
1345 this.begin("href");
1346 break;
1347 case 20:
1348 this.popState();
1349 break;
1350 case 21:
1351 return 38;
1352 case 22:
1353 this.begin("callbackname");
1354 break;
1355 case 23:
1356 this.popState();
1357 break;
1358 case 24:
1359 this.popState(), this.begin("callbackargs");
1360 break;
1361 case 25:
1362 return 36;
1363 case 26:
1364 this.popState();
1365 break;
1366 case 27:
1367 return 37;
1368 case 28:
1369 this.begin("click");
1370 break;
1371 case 29:
1372 this.popState();
1373 break;
1374 case 30:
1375 return 35;
1376 case 31:
1377 return 5;
1378 case 32:
1379 return 12;
1380 case 33:
1381 return 13;
1382 case 34:
1383 return 14;
1384 case 35:
1385 return 15;
1386 case 36:
1387 return 16;
1388 case 37:
1389 return 18;
1390 case 38:
1391 return 17;
1392 case 39:
1393 return 19;
1394 case 40:
1395 return "date";
1396 case 41:
1397 return 20;
1398 case 42:
1399 return "accDescription";
1400 case 43:
1401 return 26;
1402 case 44:
1403 return 28;
1404 case 45:
1405 return 29;
1406 case 46:
1407 return 33;
1408 case 47:
1409 return 7;
1410 case 48:
1411 return "INVALID";
1412 }
1413 },
1414 rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
1415 conditions: { acc_descr_multiline: { rules: [10, 11], inclusive: !1 }, acc_descr: { rules: [8], inclusive: !1 }, acc_title: { rules: [6], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, callbackargs: { rules: [26, 27], inclusive: !1 }, callbackname: { rules: [23, 24, 25], inclusive: !1 }, href: { rules: [20, 21], inclusive: !1 }, click: { rules: [29, 30], inclusive: !1 }, INITIAL: { rules: [0, 5, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 22, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], inclusive: !0 } }
1416 };
1417 return b;
1418 }();
1419 R.lexer = w;
1420 function O() {
1421 this.yy = {};
1422 }
1423 return O.prototype = R, R.Parser = O, new O();
1424}();
1425ye.parser = ye;
1426const Ui = ye;
1427var Li = "isoweek";
1428const Ai = function(t, e, n) {
1429 var r = function(k, p) {
1430 var T = (p ? n.utc : n)().year(k).startOf(Ln), _ = 4 - T.isoWeekday();
1431 return T.isoWeekday() > 4 && (_ += 7), T.add(_, ee);
1432 }, i = function(k) {
1433 return k.add(4 - k.isoWeekday(), ee);
1434 }, a = e.prototype;
1435 a.isoWeekYear = function() {
1436 var g = i(this);
1437 return g.year();
1438 }, a.isoWeek = function(g) {
1439 if (!this.$utils().u(g))
1440 return this.add((g - this.isoWeek()) * 7, ee);
1441 var k = i(this), p = r(this.isoWeekYear(), this.$u);
1442 return k.diff(p, Un) + 1;
1443 }, a.isoWeekday = function(g) {
1444 return this.$utils().u(g) ? this.day() || 7 : this.day(this.day() % 7 ? g : g - 7);
1445 };
1446 var s = a.startOf;
1447 a.startOf = function(g, k) {
1448 var p = this.$utils(), T = p.u(k) ? !0 : k, _ = p.p(g);
1449 return _ === Li ? T ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : s.bind(this)(g, k);
1450 };
1451};
1452var Ei = function(e) {
1453 return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(n, r, i) {
1454 return r || i.slice(1);
1455 });
1456}, Ii = {
1457 LTS: "h:mm:ss A",
1458 LT: "h:mm A",
1459 L: "MM/DD/YYYY",
1460 LL: "MMMM D, YYYY",
1461 LLL: "MMMM D, YYYY h:mm A",
1462 LLLL: "dddd, MMMM D, YYYY h:mm A"
1463}, Wi = function(e, n) {
1464 return e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(r, i, a) {
1465 var s = a && a.toUpperCase();
1466 return i || n[a] || Ii[a] || Ei(n[s]);
1467 });
1468}, Oi = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, zi = /\d/, Pt = /\d\d/, Ni = /\d{3}/, Hi = /\d{4}/, at = /\d\d?/, Pi = /[+-]?\d+/, Vi = /[+-]\d\d:?(\d\d)?|Z/, At = /\d*[^-_:/,()\s\d]+/, ht = {}, pn = function(e) {
1469 return e = +e, e + (e > 68 ? 1900 : 2e3);
1470};
1471function Ri(t) {
1472 if (!t || t === "Z")
1473 return 0;
1474 var e = t.match(/([+-]|\d\d)/g), n = +(e[1] * 60) + (+e[2] || 0);
1475 return n === 0 ? 0 : e[0] === "+" ? -n : n;
1476}
1477var et = function(e) {
1478 return function(n) {
1479 this[e] = +n;
1480 };
1481}, Be = [Vi, function(t) {
1482 var e = this.zone || (this.zone = {});
1483 e.offset = Ri(t);
1484}], he = function(e) {
1485 var n = ht[e];
1486 return n && (n.indexOf ? n : n.s.concat(n.f));
1487}, Ze = function(e, n) {
1488 var r, i = ht, a = i.meridiem;
1489 if (!a)
1490 r = e === (n ? "pm" : "PM");
1491 else
1492 for (var s = 1; s <= 24; s += 1)
1493 if (e.indexOf(a(s, 0, n)) > -1) {
1494 r = s > 12;
1495 break;
1496 }
1497 return r;
1498}, Bi = {
1499 A: [At, function(t) {
1500 this.afternoon = Ze(t, !1);
1501 }],
1502 a: [At, function(t) {
1503 this.afternoon = Ze(t, !0);
1504 }],
1505 S: [zi, function(t) {
1506 this.milliseconds = +t * 100;
1507 }],
1508 SS: [Pt, function(t) {
1509 this.milliseconds = +t * 10;
1510 }],
1511 SSS: [Ni, function(t) {
1512 this.milliseconds = +t;
1513 }],
1514 s: [at, et("seconds")],
1515 ss: [at, et("seconds")],
1516 m: [at, et("minutes")],
1517 mm: [at, et("minutes")],
1518 H: [at, et("hours")],
1519 h: [at, et("hours")],
1520 HH: [at, et("hours")],
1521 hh: [at, et("hours")],
1522 D: [at, et("day")],
1523 DD: [Pt, et("day")],
1524 Do: [At, function(t) {
1525 var e = ht, n = e.ordinal, r = t.match(/\d+/);
1526 if (this.day = r[0], !!n)
1527 for (var i = 1; i <= 31; i += 1)
1528 n(i).replace(/\[|\]/g, "") === t && (this.day = i);
1529 }],
1530 M: [at, et("month")],
1531 MM: [Pt, et("month")],
1532 MMM: [At, function(t) {
1533 var e = he("months"), n = he("monthsShort"), r = (n || e.map(function(i) {
1534 return i.slice(0, 3);
1535 })).indexOf(t) + 1;
1536 if (r < 1)
1537 throw new Error();
1538 this.month = r % 12 || r;
1539 }],
1540 MMMM: [At, function(t) {
1541 var e = he("months"), n = e.indexOf(t) + 1;
1542 if (n < 1)
1543 throw new Error();
1544 this.month = n % 12 || n;
1545 }],
1546 Y: [Pi, et("year")],
1547 YY: [Pt, function(t) {
1548 this.year = pn(t);
1549 }],
1550 YYYY: [Hi, et("year")],
1551 Z: Be,
1552 ZZ: Be
1553};
1554function Zi(t) {
1555 var e = t.afternoon;
1556 if (e !== void 0) {
1557 var n = t.hours;
1558 e ? n < 12 && (t.hours += 12) : n === 12 && (t.hours = 0), delete t.afternoon;
1559 }
1560}
1561function Xi(t) {
1562 t = Wi(t, ht && ht.formats);
1563 for (var e = t.match(Oi), n = e.length, r = 0; r < n; r += 1) {
1564 var i = e[r], a = Bi[i], s = a && a[0], g = a && a[1];
1565 g ? e[r] = {
1566 regex: s,
1567 parser: g
1568 } : e[r] = i.replace(/^\[|\]$/g, "");
1569 }
1570 return function(k) {
1571 for (var p = {}, T = 0, _ = 0; T < n; T += 1) {
1572 var x = e[T];
1573 if (typeof x == "string")
1574 _ += x.length;
1575 else {
1576 var v = x.regex, E = x.parser, M = k.slice(_), N = v.exec(M), V = N[0];
1577 E.call(p, V), k = k.replace(V, "");
1578 }
1579 }
1580 return Zi(p), p;
1581 };
1582}
1583var qi = function(e, n, r) {
1584 try {
1585 if (["x", "X"].indexOf(n) > -1)
1586 return new Date((n === "X" ? 1e3 : 1) * e);
1587 var i = Xi(n), a = i(e), s = a.year, g = a.month, k = a.day, p = a.hours, T = a.minutes, _ = a.seconds, x = a.milliseconds, v = a.zone, E = /* @__PURE__ */ new Date(), M = k || (!s && !g ? E.getDate() : 1), N = s || E.getFullYear(), V = 0;
1588 s && !g || (V = g > 0 ? g - 1 : E.getMonth());
1589 var Q = p || 0, H = T || 0, P = _ || 0, R = x || 0;
1590 return v ? new Date(Date.UTC(N, V, M, Q, H, P, R + v.offset * 60 * 1e3)) : r ? new Date(Date.UTC(N, V, M, Q, H, P, R)) : new Date(N, V, M, Q, H, P, R);
1591 } catch {
1592 return /* @__PURE__ */ new Date("");
1593 }
1594};
1595const Gi = function(t, e, n) {
1596 n.p.customParseFormat = !0, t && t.parseTwoDigitYear && (pn = t.parseTwoDigitYear);
1597 var r = e.prototype, i = r.parse;
1598 r.parse = function(a) {
1599 var s = a.date, g = a.utc, k = a.args;
1600 this.$u = g;
1601 var p = k[1];
1602 if (typeof p == "string") {
1603 var T = k[2] === !0, _ = k[3] === !0, x = T || _, v = k[2];
1604 _ && (v = k[2]), ht = this.$locale(), !T && v && (ht = n.Ls[v]), this.$d = qi(s, p, g), this.init(), v && v !== !0 && (this.$L = this.locale(v).$L), x && s != this.format(p) && (this.$d = /* @__PURE__ */ new Date("")), ht = {};
1605 } else if (p instanceof Array)
1606 for (var E = p.length, M = 1; M <= E; M += 1) {
1607 k[1] = p[M - 1];
1608 var N = n.apply(this, k);
1609 if (N.isValid()) {
1610 this.$d = N.$d, this.$L = N.$L, this.init();
1611 break;
1612 }
1613 M === E && (this.$d = /* @__PURE__ */ new Date(""));
1614 }
1615 else
1616 i.call(this, a);
1617 };
1618}, ji = function(t, e) {
1619 var n = e.prototype, r = n.format;
1620 n.format = function(i) {
1621 var a = this, s = this.$locale();
1622 if (!this.isValid())
1623 return r.bind(this)(i);
1624 var g = this.$utils(), k = i || An, p = k.replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(T) {
1625 switch (T) {
1626 case "Q":
1627 return Math.ceil((a.$M + 1) / 3);
1628 case "Do":
1629 return s.ordinal(a.$D);
1630 case "gggg":
1631 return a.weekYear();
1632 case "GGGG":
1633 return a.isoWeekYear();
1634 case "wo":
1635 return s.ordinal(a.week(), "W");
1636 case "w":
1637 case "ww":
1638 return g.s(a.week(), T === "w" ? 1 : 2, "0");
1639 case "W":
1640 case "WW":
1641 return g.s(a.isoWeek(), T === "W" ? 1 : 2, "0");
1642 case "k":
1643 case "kk":
1644 return g.s(String(a.$H === 0 ? 24 : a.$H), T === "k" ? 1 : 2, "0");
1645 case "X":
1646 return Math.floor(a.$d.getTime() / 1e3);
1647 case "x":
1648 return a.$d.getTime();
1649 case "z":
1650 return "[" + a.offsetName() + "]";
1651 case "zzz":
1652 return "[" + a.offsetName("long") + "]";
1653 default:
1654 return T;
1655 }
1656 });
1657 return r.bind(this)(p);
1658 };
1659};
1660nt.extend(Ai);
1661nt.extend(Gi);
1662nt.extend(ji);
1663let ot = "", we = "", De, Ce = "", Wt = [], Ot = [], Me = {}, Se = [], $t = [], St = "", _e = "";
1664const Tn = ["active", "done", "crit", "milestone"];
1665let Ye = [], zt = !1, Fe = !1, ke = 0;
1666const Qi = function(t, e, n) {
1667 Hn.parseDirective(this, t, e, n);
1668}, Ji = function() {
1669 Se = [], $t = [], St = "", Ye = [], Rt = 0, pe = void 0, Bt = void 0, X = [], ot = "", we = "", _e = "", De = void 0, Ce = "", Wt = [], Ot = [], zt = !1, Fe = !1, ke = 0, Me = {}, Pn();
1670}, Ki = function(t) {
1671 we = t;
1672}, $i = function() {
1673 return we;
1674}, ta = function(t) {
1675 De = t;
1676}, ea = function() {
1677 return De;
1678}, na = function(t) {
1679 Ce = t;
1680}, ra = function() {
1681 return Ce;
1682}, ia = function(t) {
1683 ot = t;
1684}, aa = function() {
1685 zt = !0;
1686}, sa = function() {
1687 return zt;
1688}, oa = function() {
1689 Fe = !0;
1690}, ca = function() {
1691 return Fe;
1692}, ua = function(t) {
1693 _e = t;
1694}, la = function() {
1695 return _e;
1696}, fa = function() {
1697 return ot;
1698}, ha = function(t) {
1699 Wt = t.toLowerCase().split(/[\s,]+/);
1700}, da = function() {
1701 return Wt;
1702}, ma = function(t) {
1703 Ot = t.toLowerCase().split(/[\s,]+/);
1704}, ga = function() {
1705 return Ot;
1706}, ya = function() {
1707 return Me;
1708}, ka = function(t) {
1709 St = t, Se.push(t);
1710}, va = function() {
1711 return Se;
1712}, pa = function() {
1713 let t = Xe();
1714 const e = 10;
1715 let n = 0;
1716 for (; !t && n < e; )
1717 t = Xe(), n++;
1718 return $t = X, $t;
1719}, bn = function(t, e, n, r) {
1720 return r.includes(t.format(e.trim())) ? !1 : t.isoWeekday() >= 6 && n.includes("weekends") || n.includes(t.format("dddd").toLowerCase()) ? !0 : n.includes(t.format(e.trim()));
1721}, xn = function(t, e, n, r) {
1722 if (!n.length || t.manualEndTime)
1723 return;
1724 let i;
1725 t.startTime instanceof Date ? i = nt(t.startTime) : i = nt(t.startTime, e, !0), i = i.add(1, "d");
1726 let a;
1727 t.endTime instanceof Date ? a = nt(t.endTime) : a = nt(t.endTime, e, !0);
1728 const [s, g] = Ta(
1729 i,
1730 a,
1731 e,
1732 n,
1733 r
1734 );
1735 t.endTime = s.toDate(), t.renderEndTime = g;
1736}, Ta = function(t, e, n, r, i) {
1737 let a = !1, s = null;
1738 for (; t <= e; )
1739 a || (s = e.toDate()), a = bn(t, n, r, i), a && (e = e.add(1, "d")), t = t.add(1, "d");
1740 return [e, s];
1741}, ve = function(t, e, n) {
1742 n = n.trim();
1743 const i = /^after\s+([\d\w- ]+)/.exec(n.trim());
1744 if (i !== null) {
1745 let s = null;
1746 if (i[1].split(" ").forEach(function(g) {
1747 let k = _t(g);
1748 k !== void 0 && (s ? k.endTime > s.endTime && (s = k) : s = k);
1749 }), s)
1750 return s.endTime;
1751 {
1752 const g = /* @__PURE__ */ new Date();
1753 return g.setHours(0, 0, 0, 0), g;
1754 }
1755 }
1756 let a = nt(n, e.trim(), !0);
1757 if (a.isValid())
1758 return a.toDate();
1759 {
1760 de.debug("Invalid date:" + n), de.debug("With date format:" + e.trim());
1761 const s = new Date(n);
1762 if (s === void 0 || isNaN(s.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
1763 // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
1764 // This can cause virtually infinite loops while rendering, so for the
1765 // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
1766 // invalid.
1767 s.getFullYear() < -1e4 || s.getFullYear() > 1e4)
1768 throw new Error("Invalid date:" + n);
1769 return s;
1770 }
1771}, wn = function(t) {
1772 const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
1773 return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
1774}, Dn = function(t, e, n, r = !1) {
1775 n = n.trim();
1776 let i = nt(n, e.trim(), !0);
1777 if (i.isValid())
1778 return r && (i = i.add(1, "d")), i.toDate();
1779 let a = nt(t);
1780 const [s, g] = wn(n);
1781 if (!Number.isNaN(s)) {
1782 const k = a.add(s, g);
1783 k.isValid() && (a = k);
1784 }
1785 return a.toDate();
1786};
1787let Rt = 0;
1788const xt = function(t) {
1789 return t === void 0 ? (Rt = Rt + 1, "task" + Rt) : t;
1790}, ba = function(t, e) {
1791 let n;
1792 e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1793 const r = n.split(","), i = {};
1794 _n(r, i, Tn);
1795 for (let s = 0; s < r.length; s++)
1796 r[s] = r[s].trim();
1797 let a = "";
1798 switch (r.length) {
1799 case 1:
1800 i.id = xt(), i.startTime = t.endTime, a = r[0];
1801 break;
1802 case 2:
1803 i.id = xt(), i.startTime = ve(void 0, ot, r[0]), a = r[1];
1804 break;
1805 case 3:
1806 i.id = xt(r[0]), i.startTime = ve(void 0, ot, r[1]), a = r[2];
1807 break;
1808 }
1809 return a && (i.endTime = Dn(i.startTime, ot, a, zt), i.manualEndTime = nt(a, "YYYY-MM-DD", !0).isValid(), xn(i, ot, Ot, Wt)), i;
1810}, xa = function(t, e) {
1811 let n;
1812 e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1813 const r = n.split(","), i = {};
1814 _n(r, i, Tn);
1815 for (let a = 0; a < r.length; a++)
1816 r[a] = r[a].trim();
1817 switch (r.length) {
1818 case 1:
1819 i.id = xt(), i.startTime = {
1820 type: "prevTaskEnd",
1821 id: t
1822 }, i.endTime = {
1823 data: r[0]
1824 };
1825 break;
1826 case 2:
1827 i.id = xt(), i.startTime = {
1828 type: "getStartDate",
1829 startData: r[0]
1830 }, i.endTime = {
1831 data: r[1]
1832 };
1833 break;
1834 case 3:
1835 i.id = xt(r[0]), i.startTime = {
1836 type: "getStartDate",
1837 startData: r[1]
1838 }, i.endTime = {
1839 data: r[2]
1840 };
1841 break;
1842 }
1843 return i;
1844};
1845let pe, Bt, X = [];
1846const Cn = {}, wa = function(t, e) {
1847 const n = {
1848 section: St,
1849 type: St,
1850 processed: !1,
1851 manualEndTime: !1,
1852 renderEndTime: null,
1853 raw: { data: e },
1854 task: t,
1855 classes: []
1856 }, r = xa(Bt, e);
1857 n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = Bt, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.order = ke, ke++;
1858 const i = X.push(n);
1859 Bt = n.id, Cn[n.id] = i - 1;
1860}, _t = function(t) {
1861 const e = Cn[t];
1862 return X[e];
1863}, Da = function(t, e) {
1864 const n = {
1865 section: St,
1866 type: St,
1867 description: t,
1868 task: t,
1869 classes: []
1870 }, r = ba(pe, e);
1871 n.startTime = r.startTime, n.endTime = r.endTime, n.id = r.id, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, pe = n, $t.push(n);
1872}, Xe = function() {
1873 const t = function(n) {
1874 const r = X[n];
1875 let i = "";
1876 switch (X[n].raw.startTime.type) {
1877 case "prevTaskEnd": {
1878 const a = _t(r.prevTaskId);
1879 r.startTime = a.endTime;
1880 break;
1881 }
1882 case "getStartDate":
1883 i = ve(void 0, ot, X[n].raw.startTime.startData), i && (X[n].startTime = i);
1884 break;
1885 }
1886 return X[n].startTime && (X[n].endTime = Dn(
1887 X[n].startTime,
1888 ot,
1889 X[n].raw.endTime.data,
1890 zt
1891 ), X[n].endTime && (X[n].processed = !0, X[n].manualEndTime = nt(
1892 X[n].raw.endTime.data,
1893 "YYYY-MM-DD",
1894 !0
1895 ).isValid(), xn(X[n], ot, Ot, Wt))), X[n].processed;
1896 };
1897 let e = !0;
1898 for (const [n, r] of X.entries())
1899 t(n), e = e && r.processed;
1900 return e;
1901}, Ca = function(t, e) {
1902 let n = e;
1903 Tt().securityLevel !== "loose" && (n = Vn(e)), t.split(",").forEach(function(r) {
1904 _t(r) !== void 0 && (Sn(r, () => {
1905 window.open(n, "_self");
1906 }), Me[r] = n);
1907 }), Mn(t, "clickable");
1908}, Mn = function(t, e) {
1909 t.split(",").forEach(function(n) {
1910 let r = _t(n);
1911 r !== void 0 && r.classes.push(e);
1912 });
1913}, Ma = function(t, e, n) {
1914 if (Tt().securityLevel !== "loose" || e === void 0)
1915 return;
1916 let r = [];
1917 if (typeof n == "string") {
1918 r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1919 for (let a = 0; a < r.length; a++) {
1920 let s = r[a].trim();
1921 s.charAt(0) === '"' && s.charAt(s.length - 1) === '"' && (s = s.substr(1, s.length - 2)), r[a] = s;
1922 }
1923 }
1924 r.length === 0 && r.push(t), _t(t) !== void 0 && Sn(t, () => {
1925 Rn.runFunc(e, ...r);
1926 });
1927}, Sn = function(t, e) {
1928 Ye.push(
1929 function() {
1930 const n = document.querySelector(`[id="${t}"]`);
1931 n !== null && n.addEventListener("click", function() {
1932 e();
1933 });
1934 },
1935 function() {
1936 const n = document.querySelector(`[id="${t}-text"]`);
1937 n !== null && n.addEventListener("click", function() {
1938 e();
1939 });
1940 }
1941 );
1942}, Sa = function(t, e, n) {
1943 t.split(",").forEach(function(r) {
1944 Ma(r, e, n);
1945 }), Mn(t, "clickable");
1946}, _a = function(t) {
1947 Ye.forEach(function(e) {
1948 e(t);
1949 });
1950}, Ya = {
1951 parseDirective: Qi,
1952 getConfig: () => Tt().gantt,
1953 clear: Ji,
1954 setDateFormat: ia,
1955 getDateFormat: fa,
1956 enableInclusiveEndDates: aa,
1957 endDatesAreInclusive: sa,
1958 enableTopAxis: oa,
1959 topAxisEnabled: ca,
1960 setAxisFormat: Ki,
1961 getAxisFormat: $i,
1962 setTickInterval: ta,
1963 getTickInterval: ea,
1964 setTodayMarker: na,
1965 getTodayMarker: ra,
1966 setAccTitle: En,
1967 getAccTitle: In,
1968 setDiagramTitle: Wn,
1969 getDiagramTitle: On,
1970 setDisplayMode: ua,
1971 getDisplayMode: la,
1972 setAccDescription: zn,
1973 getAccDescription: Nn,
1974 addSection: ka,
1975 getSections: va,
1976 getTasks: pa,
1977 addTask: wa,
1978 findTaskById: _t,
1979 addTaskOrg: Da,
1980 setIncludes: ha,
1981 getIncludes: da,
1982 setExcludes: ma,
1983 getExcludes: ga,
1984 setClickEvent: Sa,
1985 setLink: Ca,
1986 getLinks: ya,
1987 bindFunctions: _a,
1988 parseDuration: wn,
1989 isInvalidDate: bn
1990};
1991function _n(t, e, n) {
1992 let r = !0;
1993 for (; r; )
1994 r = !1, n.forEach(function(i) {
1995 const a = "^\\s*" + i + "\\s*$", s = new RegExp(a);
1996 t[0].match(s) && (e[i] = !0, t.shift(1), r = !0);
1997 });
1998}
1999const Fa = function() {
2000 de.debug("Something is calling, setConf, remove the call");
2001}, Ua = (t, e) => {
2002 let n = [...t].map(() => -1 / 0), r = [...t].sort((a, s) => a.startTime - s.startTime || a.order - s.order), i = 0;
2003 for (const a of r)
2004 for (let s = 0; s < n.length; s++)
2005 if (a.startTime >= n[s]) {
2006 n[s] = a.endTime, a.order = s + e, s > i && (i = s);
2007 break;
2008 }
2009 return i;
2010};
2011let ut;
2012const La = function(t, e, n, r) {
2013 const i = Tt().gantt, a = Tt().securityLevel;
2014 let s;
2015 a === "sandbox" && (s = Nt("#i" + e));
2016 const g = a === "sandbox" ? Nt(s.nodes()[0].contentDocument.body) : Nt("body"), k = a === "sandbox" ? s.nodes()[0].contentDocument : document, p = k.getElementById(e);
2017 ut = p.parentElement.offsetWidth, ut === void 0 && (ut = 1200), i.useWidth !== void 0 && (ut = i.useWidth);
2018 const T = r.db.getTasks();
2019 let _ = [];
2020 for (const b of T)
2021 _.push(b.type);
2022 _ = O(_);
2023 const x = {};
2024 let v = 2 * i.topPadding;
2025 if (r.db.getDisplayMode() === "compact" || i.displayMode === "compact") {
2026 const b = {};
2027 for (const h of T)
2028 b[h.section] === void 0 ? b[h.section] = [h] : b[h.section].push(h);
2029 let l = 0;
2030 for (const h of Object.keys(b)) {
2031 const d = Ua(b[h], l) + 1;
2032 l += d, v += d * (i.barHeight + i.barGap), x[h] = d;
2033 }
2034 } else {
2035 v += T.length * (i.barHeight + i.barGap);
2036 for (const b of _)
2037 x[b] = T.filter((l) => l.type === b).length;
2038 }
2039 p.setAttribute("viewBox", "0 0 " + ut + " " + v);
2040 const E = g.select(`[id="${e}"]`), M = Fi().domain([
2041 Kn(T, function(b) {
2042 return b.startTime;
2043 }),
2044 Jn(T, function(b) {
2045 return b.endTime;
2046 })
2047 ]).rangeRound([0, ut - i.leftPadding - i.rightPadding]);
2048 function N(b, l) {
2049 const h = b.startTime, d = l.startTime;
2050 let c = 0;
2051 return h > d ? c = 1 : h < d && (c = -1), c;
2052 }
2053 T.sort(N), V(T, ut, v), Bn(E, v, ut, i.useMaxWidth), E.append("text").text(r.db.getDiagramTitle()).attr("x", ut / 2).attr("y", i.titleTopMargin).attr("class", "titleText");
2054 function V(b, l, h) {
2055 const d = i.barHeight, c = d + i.barGap, D = i.topPadding, o = i.leftPadding, I = jn().domain([0, _.length]).range(["#00B9FA", "#F95002"]).interpolate(dr);
2056 H(
2057 c,
2058 D,
2059 o,
2060 l,
2061 h,
2062 b,
2063 r.db.getExcludes(),
2064 r.db.getIncludes()
2065 ), P(o, D, l, h), Q(b, c, D, o, d, I, l), R(c, D), w(o, D, l, h);
2066 }
2067 function Q(b, l, h, d, c, D, o) {
2068 const f = [...new Set(b.map((m) => m.order))].map((m) => b.find((S) => S.order === m));
2069 E.append("g").selectAll("rect").data(f).enter().append("rect").attr("x", 0).attr("y", function(m, S) {
2070 return S = m.order, S * l + h - 2;
2071 }).attr("width", function() {
2072 return o - i.rightPadding / 2;
2073 }).attr("height", l).attr("class", function(m) {
2074 for (const [S, Y] of _.entries())
2075 if (m.type === Y)
2076 return "section section" + S % i.numberSectionStyles;
2077 return "section section0";
2078 });
2079 const J = E.append("g").selectAll("rect").data(b).enter(), $ = r.db.getLinks();
2080 if (J.append("rect").attr("id", function(m) {
2081 return m.id;
2082 }).attr("rx", 3).attr("ry", 3).attr("x", function(m) {
2083 return m.milestone ? M(m.startTime) + d + 0.5 * (M(m.endTime) - M(m.startTime)) - 0.5 * c : M(m.startTime) + d;
2084 }).attr("y", function(m, S) {
2085 return S = m.order, S * l + h;
2086 }).attr("width", function(m) {
2087 return m.milestone ? c : M(m.renderEndTime || m.endTime) - M(m.startTime);
2088 }).attr("height", c).attr("transform-origin", function(m, S) {
2089 return S = m.order, (M(m.startTime) + d + 0.5 * (M(m.endTime) - M(m.startTime))).toString() + "px " + (S * l + h + 0.5 * c).toString() + "px";
2090 }).attr("class", function(m) {
2091 const S = "task";
2092 let Y = "";
2093 m.classes.length > 0 && (Y = m.classes.join(" "));
2094 let F = 0;
2095 for (const [B, z] of _.entries())
2096 m.type === z && (F = B % i.numberSectionStyles);
2097 let A = "";
2098 return m.active ? m.crit ? A += " activeCrit" : A = " active" : m.done ? m.crit ? A = " doneCrit" : A = " done" : m.crit && (A += " crit"), A.length === 0 && (A = " task"), m.milestone && (A = " milestone " + A), A += F, A += " " + Y, S + A;
2099 }), J.append("text").attr("id", function(m) {
2100 return m.id + "-text";
2101 }).text(function(m) {
2102 return m.task;
2103 }).attr("font-size", i.fontSize).attr("x", function(m) {
2104 let S = M(m.startTime), Y = M(m.renderEndTime || m.endTime);
2105 m.milestone && (S += 0.5 * (M(m.endTime) - M(m.startTime)) - 0.5 * c), m.milestone && (Y = S + c);
2106 const F = this.getBBox().width;
2107 return F > Y - S ? Y + F + 1.5 * i.leftPadding > o ? S + d - 5 : Y + d + 5 : (Y - S) / 2 + S + d;
2108 }).attr("y", function(m, S) {
2109 return S = m.order, S * l + i.barHeight / 2 + (i.fontSize / 2 - 2) + h;
2110 }).attr("text-height", c).attr("class", function(m) {
2111 const S = M(m.startTime);
2112 let Y = M(m.endTime);
2113 m.milestone && (Y = S + c);
2114 const F = this.getBBox().width;
2115 let A = "";
2116 m.classes.length > 0 && (A = m.classes.join(" "));
2117 let B = 0;
2118 for (const [Yt, q] of _.entries())
2119 m.type === q && (B = Yt % i.numberSectionStyles);
2120 let z = "";
2121 return m.active && (m.crit ? z = "activeCritText" + B : z = "activeText" + B), m.done ? m.crit ? z = z + " doneCritText" + B : z = z + " doneText" + B : m.crit && (z = z + " critText" + B), m.milestone && (z += " milestoneText"), F > Y - S ? Y + F + 1.5 * i.leftPadding > o ? A + " taskTextOutsideLeft taskTextOutside" + B + " " + z : A + " taskTextOutsideRight taskTextOutside" + B + " " + z + " width-" + F : A + " taskText taskText" + B + " " + z + " width-" + F;
2122 }), Tt().securityLevel === "sandbox") {
2123 let m;
2124 m = Nt("#i" + e);
2125 const S = m.nodes()[0].contentDocument;
2126 J.filter(function(Y) {
2127 return $[Y.id] !== void 0;
2128 }).each(function(Y) {
2129 var F = S.querySelector("#" + Y.id), A = S.querySelector("#" + Y.id + "-text");
2130 const B = F.parentNode;
2131 var z = S.createElement("a");
2132 z.setAttribute("xlink:href", $[Y.id]), z.setAttribute("target", "_top"), B.appendChild(z), z.appendChild(F), z.appendChild(A);
2133 });
2134 }
2135 }
2136 function H(b, l, h, d, c, D, o, I) {
2137 const f = D.reduce(
2138 (F, { startTime: A }) => F ? Math.min(F, A) : A,
2139 0
2140 ), J = D.reduce((F, { endTime: A }) => F ? Math.max(F, A) : A, 0), $ = r.db.getDateFormat();
2141 if (!f || !J)
2142 return;
2143 const dt = [];
2144 let m = null, S = nt(f);
2145 for (; S.valueOf() <= J; )
2146 r.db.isInvalidDate(S, $, o, I) ? m ? m.end = S : m = {
2147 start: S,
2148 end: S
2149 } : m && (dt.push(m), m = null), S = S.add(1, "d");
2150 E.append("g").selectAll("rect").data(dt).enter().append("rect").attr("id", function(F) {
2151 return "exclude-" + F.start.format("YYYY-MM-DD");
2152 }).attr("x", function(F) {
2153 return M(F.start) + h;
2154 }).attr("y", i.gridLineStartPadding).attr("width", function(F) {
2155 const A = F.end.add(1, "day");
2156 return M(A) - M(F.start);
2157 }).attr("height", c - l - i.gridLineStartPadding).attr("transform-origin", function(F, A) {
2158 return (M(F.start) + h + 0.5 * (M(F.end) - M(F.start))).toString() + "px " + (A * b + 0.5 * c).toString() + "px";
2159 }).attr("class", "exclude-range");
2160 }
2161 function P(b, l, h, d) {
2162 let c = sr(M).tickSize(-d + l + i.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
2163 const o = /^([1-9]\d*)(minute|hour|day|week|month)$/.exec(
2164 r.db.getTickInterval() || i.tickInterval
2165 );
2166 if (o !== null) {
2167 const I = o[1];
2168 switch (o[2]) {
2169 case "minute":
2170 c.ticks(qt.every(I));
2171 break;
2172 case "hour":
2173 c.ticks(Gt.every(I));
2174 break;
2175 case "day":
2176 c.ticks(wt.every(I));
2177 break;
2178 case "week":
2179 c.ticks(Dt.every(I));
2180 break;
2181 case "month":
2182 c.ticks(Qt.every(I));
2183 break;
2184 }
2185 }
2186 if (E.append("g").attr("class", "grid").attr("transform", "translate(" + b + ", " + (d - 50) + ")").call(c).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || i.topAxis) {
2187 let I = ar(M).tickSize(-d + l + i.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
2188 if (o !== null) {
2189 const f = o[1];
2190 switch (o[2]) {
2191 case "minute":
2192 I.ticks(qt.every(f));
2193 break;
2194 case "hour":
2195 I.ticks(Gt.every(f));
2196 break;
2197 case "day":
2198 I.ticks(wt.every(f));
2199 break;
2200 case "week":
2201 I.ticks(Dt.every(f));
2202 break;
2203 case "month":
2204 I.ticks(Qt.every(f));
2205 break;
2206 }
2207 }
2208 E.append("g").attr("class", "grid").attr("transform", "translate(" + b + ", " + l + ")").call(I).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
2209 }
2210 }
2211 function R(b, l) {
2212 let h = 0;
2213 const d = Object.keys(x).map((c) => [c, x[c]]);
2214 E.append("g").selectAll("text").data(d).enter().append(function(c) {
2215 const D = c[0].split(Zn.lineBreakRegex), o = -(D.length - 1) / 2, I = k.createElementNS("http://www.w3.org/2000/svg", "text");
2216 I.setAttribute("dy", o + "em");
2217 for (const [f, J] of D.entries()) {
2218 const $ = k.createElementNS("http://www.w3.org/2000/svg", "tspan");
2219 $.setAttribute("alignment-baseline", "central"), $.setAttribute("x", "10"), f > 0 && $.setAttribute("dy", "1em"), $.textContent = J, I.appendChild($);
2220 }
2221 return I;
2222 }).attr("x", 10).attr("y", function(c, D) {
2223 if (D > 0)
2224 for (let o = 0; o < D; o++)
2225 return h += d[D - 1][1], c[1] * b / 2 + h * b + l;
2226 else
2227 return c[1] * b / 2 + l;
2228 }).attr("font-size", i.sectionFontSize).attr("class", function(c) {
2229 for (const [D, o] of _.entries())
2230 if (c[0] === o)
2231 return "sectionTitle sectionTitle" + D % i.numberSectionStyles;
2232 return "sectionTitle";
2233 });
2234 }
2235 function w(b, l, h, d) {
2236 const c = r.db.getTodayMarker();
2237 if (c === "off")
2238 return;
2239 const D = E.append("g").attr("class", "today"), o = /* @__PURE__ */ new Date(), I = D.append("line");
2240 I.attr("x1", M(o) + b).attr("x2", M(o) + b).attr("y1", i.titleTopMargin).attr("y2", d - i.titleTopMargin).attr("class", "today"), c !== "" && I.attr("style", c.replace(/,/g, ";"));
2241 }
2242 function O(b) {
2243 const l = {}, h = [];
2244 for (let d = 0, c = b.length; d < c; ++d)
2245 Object.prototype.hasOwnProperty.call(l, b[d]) || (l[b[d]] = !0, h.push(b[d]));
2246 return h;
2247 }
2248}, Aa = {
2249 setConf: Fa,
2250 draw: La
2251}, Ea = (t) => `
2252 .mermaid-main-font {
2253 font-family: "trebuchet ms", verdana, arial, sans-serif;
2254 font-family: var(--mermaid-font-family);
2255 }
2256 .exclude-range {
2257 fill: ${t.excludeBkgColor};
2258 }
2259
2260 .section {
2261 stroke: none;
2262 opacity: 0.2;
2263 }
2264
2265 .section0 {
2266 fill: ${t.sectionBkgColor};
2267 }
2268
2269 .section2 {
2270 fill: ${t.sectionBkgColor2};
2271 }
2272
2273 .section1,
2274 .section3 {
2275 fill: ${t.altSectionBkgColor};
2276 opacity: 0.2;
2277 }
2278
2279 .sectionTitle0 {
2280 fill: ${t.titleColor};
2281 }
2282
2283 .sectionTitle1 {
2284 fill: ${t.titleColor};
2285 }
2286
2287 .sectionTitle2 {
2288 fill: ${t.titleColor};
2289 }
2290
2291 .sectionTitle3 {
2292 fill: ${t.titleColor};
2293 }
2294
2295 .sectionTitle {
2296 text-anchor: start;
2297 // font-size: ${t.ganttFontSize};
2298 // text-height: 14px;
2299 font-family: 'trebuchet ms', verdana, arial, sans-serif;
2300 font-family: var(--mermaid-font-family);
2301
2302 }
2303
2304
2305 /* Grid and axis */
2306
2307 .grid .tick {
2308 stroke: ${t.gridColor};
2309 opacity: 0.8;
2310 shape-rendering: crispEdges;
2311 text {
2312 font-family: ${t.fontFamily};
2313 fill: ${t.textColor};
2314 }
2315 }
2316
2317 .grid path {
2318 stroke-width: 0;
2319 }
2320
2321
2322 /* Today line */
2323
2324 .today {
2325 fill: none;
2326 stroke: ${t.todayLineColor};
2327 stroke-width: 2px;
2328 }
2329
2330
2331 /* Task styling */
2332
2333 /* Default task */
2334
2335 .task {
2336 stroke-width: 2;
2337 }
2338
2339 .taskText {
2340 text-anchor: middle;
2341 font-family: 'trebuchet ms', verdana, arial, sans-serif;
2342 font-family: var(--mermaid-font-family);
2343 }
2344
2345 // .taskText:not([font-size]) {
2346 // font-size: ${t.ganttFontSize};
2347 // }
2348
2349 .taskTextOutsideRight {
2350 fill: ${t.taskTextDarkColor};
2351 text-anchor: start;
2352 // font-size: ${t.ganttFontSize};
2353 font-family: 'trebuchet ms', verdana, arial, sans-serif;
2354 font-family: var(--mermaid-font-family);
2355
2356 }
2357
2358 .taskTextOutsideLeft {
2359 fill: ${t.taskTextDarkColor};
2360 text-anchor: end;
2361 // font-size: ${t.ganttFontSize};
2362 }
2363
2364 /* Special case clickable */
2365 .task.clickable {
2366 cursor: pointer;
2367 }
2368 .taskText.clickable {
2369 cursor: pointer;
2370 fill: ${t.taskTextClickableColor} !important;
2371 font-weight: bold;
2372 }
2373
2374 .taskTextOutsideLeft.clickable {
2375 cursor: pointer;
2376 fill: ${t.taskTextClickableColor} !important;
2377 font-weight: bold;
2378 }
2379
2380 .taskTextOutsideRight.clickable {
2381 cursor: pointer;
2382 fill: ${t.taskTextClickableColor} !important;
2383 font-weight: bold;
2384 }
2385
2386 /* Specific task settings for the sections*/
2387
2388 .taskText0,
2389 .taskText1,
2390 .taskText2,
2391 .taskText3 {
2392 fill: ${t.taskTextColor};
2393 }
2394
2395 .task0,
2396 .task1,
2397 .task2,
2398 .task3 {
2399 fill: ${t.taskBkgColor};
2400 stroke: ${t.taskBorderColor};
2401 }
2402
2403 .taskTextOutside0,
2404 .taskTextOutside2
2405 {
2406 fill: ${t.taskTextOutsideColor};
2407 }
2408
2409 .taskTextOutside1,
2410 .taskTextOutside3 {
2411 fill: ${t.taskTextOutsideColor};
2412 }
2413
2414
2415 /* Active task */
2416
2417 .active0,
2418 .active1,
2419 .active2,
2420 .active3 {
2421 fill: ${t.activeTaskBkgColor};
2422 stroke: ${t.activeTaskBorderColor};
2423 }
2424
2425 .activeText0,
2426 .activeText1,
2427 .activeText2,
2428 .activeText3 {
2429 fill: ${t.taskTextDarkColor} !important;
2430 }
2431
2432
2433 /* Completed task */
2434
2435 .done0,
2436 .done1,
2437 .done2,
2438 .done3 {
2439 stroke: ${t.doneTaskBorderColor};
2440 fill: ${t.doneTaskBkgColor};
2441 stroke-width: 2;
2442 }
2443
2444 .doneText0,
2445 .doneText1,
2446 .doneText2,
2447 .doneText3 {
2448 fill: ${t.taskTextDarkColor} !important;
2449 }
2450
2451
2452 /* Tasks on the critical line */
2453
2454 .crit0,
2455 .crit1,
2456 .crit2,
2457 .crit3 {
2458 stroke: ${t.critBorderColor};
2459 fill: ${t.critBkgColor};
2460 stroke-width: 2;
2461 }
2462
2463 .activeCrit0,
2464 .activeCrit1,
2465 .activeCrit2,
2466 .activeCrit3 {
2467 stroke: ${t.critBorderColor};
2468 fill: ${t.activeTaskBkgColor};
2469 stroke-width: 2;
2470 }
2471
2472 .doneCrit0,
2473 .doneCrit1,
2474 .doneCrit2,
2475 .doneCrit3 {
2476 stroke: ${t.critBorderColor};
2477 fill: ${t.doneTaskBkgColor};
2478 stroke-width: 2;
2479 cursor: pointer;
2480 shape-rendering: crispEdges;
2481 }
2482
2483 .milestone {
2484 transform: rotate(45deg) scale(0.8,0.8);
2485 }
2486
2487 .milestoneText {
2488 font-style: italic;
2489 }
2490 .doneCritText0,
2491 .doneCritText1,
2492 .doneCritText2,
2493 .doneCritText3 {
2494 fill: ${t.taskTextDarkColor} !important;
2495 }
2496
2497 .activeCritText0,
2498 .activeCritText1,
2499 .activeCritText2,
2500 .activeCritText3 {
2501 fill: ${t.taskTextDarkColor} !important;
2502 }
2503
2504 .titleText {
2505 text-anchor: middle;
2506 font-size: 18px;
2507 fill: ${t.textColor} ;
2508 font-family: 'trebuchet ms', verdana, arial, sans-serif;
2509 font-family: var(--mermaid-font-family);
2510 }
2511`, Ia = Ea, Na = {
2512 parser: Ui,
2513 db: Ya,
2514 renderer: Aa,
2515 styles: Ia
2516};
2517export {
2518 Na as diagram
2519};