@schmitech/chatbot-widget 0.5.3 → 0.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.
Files changed (64) hide show
  1. package/dist/_basePickBy-C3-QE0dl-5eQ6L29l.js +152 -0
  2. package/dist/_baseUniq-CstiM9Lp-AFR_Ns0a.js +615 -0
  3. package/dist/arc-W3NKKXLI-DHbDwLx0.js +84 -0
  4. package/dist/architecture-U656AL7Q-fn9wJZsH-BLoGjtkP.js +6 -0
  5. package/dist/architectureDiagram-VXUJARFQ-zzJsgPC6-C4OfUE0m.js +4667 -0
  6. package/dist/blockDiagram-VD42YOAC-D-In4h7h-BYXdRmeG.js +2266 -0
  7. package/dist/c4Diagram-YG6GDRKO-DBs8r9gh-BdLuHgPT.js +1582 -0
  8. package/dist/channel-RBWQyMSg-Cx0HUumY.js +6 -0
  9. package/dist/chatbot-widget.bundle.js +4473 -1556
  10. package/dist/chatbot-widget.css +1 -1
  11. package/dist/chatbot-widget.es.js +12 -63659
  12. package/dist/chatbot-widget.umd.js +4472 -1555
  13. package/dist/chunk-4BX2VUAB-BqD7w0AR-CbA2613c.js +10 -0
  14. package/dist/chunk-55IACEB6-D8pvDVEJ-DrL4SJSR.js +9 -0
  15. package/dist/chunk-B4BG7PRW-Dwma1pSy-BWjG5dc6.js +1375 -0
  16. package/dist/chunk-DI55MBZ5-BY2XXvZz-DbAvz3Pq.js +1383 -0
  17. package/dist/chunk-FMBD7UC4-BeiLbQ8U-BNaZTCv4.js +20 -0
  18. package/dist/chunk-QN33PNHL-BkO3hOeq-DkU1EzGA.js +21 -0
  19. package/dist/chunk-QZHKN3VN-Cwlo2qTG-DMmeZmp5.js +16 -0
  20. package/dist/chunk-TZMSLE5B-BnXK-OiF-RfzVsOBe.js +65 -0
  21. package/dist/classDiagram-2ON5EDUG-Crd6O69V-kCZrFOLN.js +17 -0
  22. package/dist/classDiagram-v2-WZHVMYZB-Crd6O69V-kCZrFOLN.js +17 -0
  23. package/dist/clone-CfLgyC8S-DsDOh4B4.js +9 -0
  24. package/dist/config/index.d.ts +4 -2
  25. package/dist/cose-bilkent-S5V4N54A-DKeVcPDK-de_7nZTY.js +2609 -0
  26. package/dist/cytoscape.esm-CjI2IsL8-Be2K4mI6.js +18723 -0
  27. package/dist/dagre-6UL2VRFP-BPf604Df-BhZs6zCq.js +448 -0
  28. package/dist/diagram-PSM6KHXK-DeLcpEV3-qb4rujeN.js +532 -0
  29. package/dist/diagram-QEK2KX5R-C_5RR1NJ-C5kZWmRl.js +222 -0
  30. package/dist/diagram-S2PKOQOG-DVx43aon-4nlw6iDz.js +144 -0
  31. package/dist/erDiagram-Q2GNP2WA-DgUeO5_h-DHc9Yphl.js +841 -0
  32. package/dist/flowDiagram-NV44I4VS-C5HQUzU9-DHjbmAtJ.js +1628 -0
  33. package/dist/ganttDiagram-JELNMOA3-DgSZ1ixF-C3hJs_k9.js +1936 -0
  34. package/dist/gitGraph-F6HP7TQM-UL7-Bx1s-Cog5rj3j.js +6 -0
  35. package/dist/gitGraphDiagram-NY62KEGX-DY5loT9K-CEcKQNrM.js +713 -0
  36. package/dist/graph-BfwqPHx6-DErF9dBN.js +248 -0
  37. package/dist/index-B5s_uaP2.js +124168 -0
  38. package/dist/index-BAOVR-xx-thst7Pu6.js +13251 -0
  39. package/dist/info-NVLQJR56-BsqQ0RXQ-BcYgZCCY.js +6 -0
  40. package/dist/infoDiagram-WHAUD3N6-DIqQ6vCk-BuiAAMSH.js +25 -0
  41. package/dist/journeyDiagram-XKPGCS4Q-DXjg3S3r-Byi_TGXs.js +835 -0
  42. package/dist/kanban-definition-3W4ZIXB7-Uxt7Am6n-jy96nA-g.js +721 -0
  43. package/dist/layout-CSfkE668-BjigbqJL.js +1333 -0
  44. package/dist/mermaid-parser.core-LjuO4CL3-BLqmPe8-.js +12891 -0
  45. package/dist/mindmap-definition-VGOIOE7T-DXwVuAPE-SK4e1Sse.js +787 -0
  46. package/dist/packet-BFZMPI3H-DJWkrKrV-BamBev9S.js +6 -0
  47. package/dist/pie-7BOR55EZ-DC8hTFwn-D1bcIQbR.js +6 -0
  48. package/dist/pieDiagram-ADFJNKIX-Cj0EHHtj-Dbr09c-S.js +161 -0
  49. package/dist/quadrantDiagram-AYHSOK5B-CnLDz007-Ci0DQl2T.js +1024 -0
  50. package/dist/radar-NHE76QYJ-Bijk-Fk9-9nAmDCMr.js +6 -0
  51. package/dist/requirementDiagram-UZGBJVZJ-rDaI-8Be-CSEc4S33.js +851 -0
  52. package/dist/sankeyDiagram-TZEHDZUN-A0YO8ixs-Zj8Z0j0n.js +810 -0
  53. package/dist/sequenceDiagram-WL72ISMW-BFF7TtP7-Dcofckjv.js +2519 -0
  54. package/dist/shared/styles.d.ts +1 -1
  55. package/dist/stateDiagram-FKZM4ZOC-ofFsB7HJ-BJBX12rE.js +264 -0
  56. package/dist/stateDiagram-v2-4FDKWEC3-CEZFbksU-BywmU88h.js +17 -0
  57. package/dist/timeline-definition-IT6M3QCI-5W361ZNm-MP_ufVe7.js +800 -0
  58. package/dist/treemap-KMMF4GRG-pGRoYcSn-BeZ7sXgP.js +6 -0
  59. package/dist/ui/Message.d.ts +1 -5
  60. package/dist/ui/MessagesList.d.ts +1 -5
  61. package/dist/utils/contentFiltering.d.ts +12 -0
  62. package/dist/xychartDiagram-PRI3JC2R-CSr0GxaP-DBgCtplP.js +1297 -0
  63. package/package.json +3 -3
  64. package/dist/ui/TypingEffect.d.ts +0 -18
@@ -0,0 +1,1936 @@
1
+ import { x as d, B as Ne, h as ze, z as He, w as Ge, g as Ve, u as Be, p as lt, f as bt, V as Re, W as Xe, X as Ue, G as qe, Y as Qe, Z as U, a as st, a0 as re, a1 as se, a2 as je, a3 as Ze, a4 as Je, a5 as Ke, a6 as tn, a7 as en, a8 as nn, a9 as ae, aa as oe, ab as ce, ac as le, ad as ue, n as rn, l as sn, L as an, ae as Et, v as on, af as ve, ag as cn, ah as be, ai as xe, aj as Te, ak as ln, D as St } from "./index-B5s_uaP2.js";
2
+ typeof window < "u" && (window.global = window);
3
+ function un(t) {
4
+ return t;
5
+ }
6
+ var Tt = 1, At = 2, Wt = 3, xt = 4, de = 1e-6;
7
+ function dn(t) {
8
+ return "translate(" + t + ",0)";
9
+ }
10
+ function hn(t) {
11
+ return "translate(0," + t + ")";
12
+ }
13
+ function fn(t) {
14
+ return (e) => +t(e);
15
+ }
16
+ function mn(t, e) {
17
+ return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
18
+ }
19
+ function yn() {
20
+ return !this.__axis;
21
+ }
22
+ function we(t, e) {
23
+ var n = [], r = null, s = null, l = 6, k = 6, $ = 3, Y = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, S = t === Tt || t === xt ? -1 : 1, w = t === xt || t === At ? "x" : "y", F = t === Tt || t === Wt ? dn : hn;
24
+ function _(D) {
25
+ var z = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), A = s ?? (e.tickFormat ? e.tickFormat.apply(e, n) : un), T = Math.max(l, 0) + $, C = e.range(), O = +C[0] + Y, L = +C[C.length - 1] + Y, H = (e.bandwidth ? mn : fn)(e.copy(), Y), G = D.selection ? D.selection() : D, I = G.selectAll(".domain").data([null]), g = G.selectAll(".tick").data(z, e).order(), y = g.exit(), h = g.enter().append("g").attr("class", "tick"), b = g.select("line"), v = g.select("text");
26
+ I = I.merge(I.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), g = g.merge(h), b = b.merge(h.append("line").attr("stroke", "currentColor").attr(w + "2", S * l)), v = v.merge(h.append("text").attr("fill", "currentColor").attr(w, S * T).attr("dy", t === Tt ? "0em" : t === Wt ? "0.71em" : "0.32em")), D !== G && (I = I.transition(D), g = g.transition(D), b = b.transition(D), v = v.transition(D), y = y.transition(D).attr("opacity", de).attr("transform", function(p) {
27
+ return isFinite(p = H(p)) ? F(p + Y) : this.getAttribute("transform");
28
+ }), h.attr("opacity", de).attr("transform", function(p) {
29
+ var m = this.parentNode.__axis;
30
+ return F((m && isFinite(m = m(p)) ? m : H(p)) + Y);
31
+ })), y.remove(), I.attr("d", t === xt || t === At ? k ? "M" + S * k + "," + O + "H" + Y + "V" + L + "H" + S * k : "M" + Y + "," + O + "V" + L : k ? "M" + O + "," + S * k + "V" + Y + "H" + L + "V" + S * k : "M" + O + "," + Y + "H" + L), g.attr("opacity", 1).attr("transform", function(p) {
32
+ return F(H(p) + Y);
33
+ }), b.attr(w + "2", S * l), v.attr(w, S * T).text(A), G.filter(yn).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === At ? "start" : t === xt ? "end" : "middle"), G.each(function() {
34
+ this.__axis = H;
35
+ });
36
+ }
37
+ return _.scale = function(D) {
38
+ return arguments.length ? (e = D, _) : e;
39
+ }, _.ticks = function() {
40
+ return n = Array.from(arguments), _;
41
+ }, _.tickArguments = function(D) {
42
+ return arguments.length ? (n = D == null ? [] : Array.from(D), _) : n.slice();
43
+ }, _.tickValues = function(D) {
44
+ return arguments.length ? (r = D == null ? null : Array.from(D), _) : r && r.slice();
45
+ }, _.tickFormat = function(D) {
46
+ return arguments.length ? (s = D, _) : s;
47
+ }, _.tickSize = function(D) {
48
+ return arguments.length ? (l = k = +D, _) : l;
49
+ }, _.tickSizeInner = function(D) {
50
+ return arguments.length ? (l = +D, _) : l;
51
+ }, _.tickSizeOuter = function(D) {
52
+ return arguments.length ? (k = +D, _) : k;
53
+ }, _.tickPadding = function(D) {
54
+ return arguments.length ? ($ = +D, _) : $;
55
+ }, _.offset = function(D) {
56
+ return arguments.length ? (Y = +D, _) : Y;
57
+ }, _;
58
+ }
59
+ function kn(t) {
60
+ return we(Tt, t);
61
+ }
62
+ function pn(t) {
63
+ return we(Wt, t);
64
+ }
65
+ const gn = Math.PI / 180, vn = 180 / Math.PI, _t = 18, $e = 0.96422, _e = 1, De = 0.82521, Me = 4 / 29, ut = 6 / 29, Se = 3 * ut * ut, bn = ut * ut * ut;
66
+ function Ce(t) {
67
+ if (t instanceof tt) return new tt(t.l, t.a, t.b, t.opacity);
68
+ if (t instanceof nt) return Ee(t);
69
+ t instanceof ve || (t = cn(t));
70
+ var e = Ft(t.r), n = Ft(t.g), r = Ft(t.b), s = It((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / _e), l, k;
71
+ return e === n && n === r ? l = k = s : (l = It((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / $e), k = It((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / De)), new tt(116 * s - 16, 500 * (l - s), 200 * (s - k), t.opacity);
72
+ }
73
+ function xn(t, e, n, r) {
74
+ return arguments.length === 1 ? Ce(t) : new tt(t, e, n, r ?? 1);
75
+ }
76
+ function tt(t, e, n, r) {
77
+ this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
78
+ }
79
+ be(tt, xn, xe(Te, {
80
+ brighter(t) {
81
+ return new tt(this.l + _t * (t ?? 1), this.a, this.b, this.opacity);
82
+ },
83
+ darker(t) {
84
+ return new tt(this.l - _t * (t ?? 1), this.a, this.b, this.opacity);
85
+ },
86
+ rgb() {
87
+ var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
88
+ return e = $e * Yt(e), t = _e * Yt(t), n = De * Yt(n), new ve(
89
+ Lt(3.1338561 * e - 1.6168667 * t - 0.4906146 * n),
90
+ Lt(-0.9787684 * e + 1.9161415 * t + 0.033454 * n),
91
+ Lt(0.0719453 * e - 0.2289914 * t + 1.4052427 * n),
92
+ this.opacity
93
+ );
94
+ }
95
+ }));
96
+ function It(t) {
97
+ return t > bn ? Math.pow(t, 1 / 3) : t / Se + Me;
98
+ }
99
+ function Yt(t) {
100
+ return t > ut ? t * t * t : Se * (t - Me);
101
+ }
102
+ function Lt(t) {
103
+ return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
104
+ }
105
+ function Ft(t) {
106
+ return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
107
+ }
108
+ function Tn(t) {
109
+ if (t instanceof nt) return new nt(t.h, t.c, t.l, t.opacity);
110
+ if (t instanceof tt || (t = Ce(t)), t.a === 0 && t.b === 0) return new nt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
111
+ var e = Math.atan2(t.b, t.a) * vn;
112
+ return new nt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
113
+ }
114
+ function Pt(t, e, n, r) {
115
+ return arguments.length === 1 ? Tn(t) : new nt(t, e, n, r ?? 1);
116
+ }
117
+ function nt(t, e, n, r) {
118
+ this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
119
+ }
120
+ function Ee(t) {
121
+ if (isNaN(t.h)) return new tt(t.l, 0, 0, t.opacity);
122
+ var e = t.h * gn;
123
+ return new tt(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
124
+ }
125
+ be(nt, Pt, xe(Te, {
126
+ brighter(t) {
127
+ return new nt(this.h, this.c, this.l + _t * (t ?? 1), this.opacity);
128
+ },
129
+ darker(t) {
130
+ return new nt(this.h, this.c, this.l - _t * (t ?? 1), this.opacity);
131
+ },
132
+ rgb() {
133
+ return Ee(this).rgb();
134
+ }
135
+ }));
136
+ function wn(t) {
137
+ return function(e, n) {
138
+ var r = t((e = Pt(e)).h, (n = Pt(n)).h), s = Et(e.c, n.c), l = Et(e.l, n.l), k = Et(e.opacity, n.opacity);
139
+ return function($) {
140
+ return e.h = r($), e.c = s($), e.l = l($), e.opacity = k($), e + "";
141
+ };
142
+ };
143
+ }
144
+ const $n = wn(ln);
145
+ var Nt = { exports: {} }, _n = Nt.exports, he;
146
+ function Dn() {
147
+ return he || (he = 1, function(t, e) {
148
+ (function(n, r) {
149
+ t.exports = r();
150
+ })(_n, function() {
151
+ var n = "day";
152
+ return function(r, s, l) {
153
+ var k = function(S) {
154
+ return S.add(4 - S.isoWeekday(), n);
155
+ }, $ = s.prototype;
156
+ $.isoWeekYear = function() {
157
+ return k(this).year();
158
+ }, $.isoWeek = function(S) {
159
+ if (!this.$utils().u(S)) return this.add(7 * (S - this.isoWeek()), n);
160
+ var w, F, _, D, z = k(this), A = (w = this.isoWeekYear(), F = this.$u, _ = (F ? l.utc : l)().year(w).startOf("year"), D = 4 - _.isoWeekday(), _.isoWeekday() > 4 && (D += 7), _.add(D, n));
161
+ return z.diff(A, "week") + 1;
162
+ }, $.isoWeekday = function(S) {
163
+ return this.$utils().u(S) ? this.day() || 7 : this.day(this.day() % 7 ? S : S - 7);
164
+ };
165
+ var Y = $.startOf;
166
+ $.startOf = function(S, w) {
167
+ var F = this.$utils(), _ = !!F.u(w) || w;
168
+ return F.p(S) === "isoweek" ? _ ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : Y.bind(this)(S, w);
169
+ };
170
+ };
171
+ });
172
+ }(Nt)), Nt.exports;
173
+ }
174
+ var Mn = Dn();
175
+ const Sn = /* @__PURE__ */ St(Mn);
176
+ var zt = { exports: {} }, Cn = zt.exports, fe;
177
+ function En() {
178
+ return fe || (fe = 1, function(t, e) {
179
+ (function(n, r) {
180
+ t.exports = r();
181
+ })(Cn, function() {
182
+ var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, s = /\d/, l = /\d\d/, k = /\d\d?/, $ = /\d*[^-_:/,()\s\d]+/, Y = {}, S = function(T) {
183
+ return (T = +T) + (T > 68 ? 1900 : 2e3);
184
+ }, w = function(T) {
185
+ return function(C) {
186
+ this[T] = +C;
187
+ };
188
+ }, F = [/[+-]\d\d:?(\d\d)?|Z/, function(T) {
189
+ (this.zone || (this.zone = {})).offset = function(C) {
190
+ if (!C || C === "Z") return 0;
191
+ var O = C.match(/([+-]|\d\d)/g), L = 60 * O[1] + (+O[2] || 0);
192
+ return L === 0 ? 0 : O[0] === "+" ? -L : L;
193
+ }(T);
194
+ }], _ = function(T) {
195
+ var C = Y[T];
196
+ return C && (C.indexOf ? C : C.s.concat(C.f));
197
+ }, D = function(T, C) {
198
+ var O, L = Y.meridiem;
199
+ if (L) {
200
+ for (var H = 1; H <= 24; H += 1) if (T.indexOf(L(H, 0, C)) > -1) {
201
+ O = H > 12;
202
+ break;
203
+ }
204
+ } else O = T === (C ? "pm" : "PM");
205
+ return O;
206
+ }, z = { A: [$, function(T) {
207
+ this.afternoon = D(T, !1);
208
+ }], a: [$, function(T) {
209
+ this.afternoon = D(T, !0);
210
+ }], Q: [s, function(T) {
211
+ this.month = 3 * (T - 1) + 1;
212
+ }], S: [s, function(T) {
213
+ this.milliseconds = 100 * +T;
214
+ }], SS: [l, function(T) {
215
+ this.milliseconds = 10 * +T;
216
+ }], SSS: [/\d{3}/, function(T) {
217
+ this.milliseconds = +T;
218
+ }], s: [k, w("seconds")], ss: [k, w("seconds")], m: [k, w("minutes")], mm: [k, w("minutes")], H: [k, w("hours")], h: [k, w("hours")], HH: [k, w("hours")], hh: [k, w("hours")], D: [k, w("day")], DD: [l, w("day")], Do: [$, function(T) {
219
+ var C = Y.ordinal, O = T.match(/\d+/);
220
+ if (this.day = O[0], C) for (var L = 1; L <= 31; L += 1) C(L).replace(/\[|\]/g, "") === T && (this.day = L);
221
+ }], w: [k, w("week")], ww: [l, w("week")], M: [k, w("month")], MM: [l, w("month")], MMM: [$, function(T) {
222
+ var C = _("months"), O = (_("monthsShort") || C.map(function(L) {
223
+ return L.slice(0, 3);
224
+ })).indexOf(T) + 1;
225
+ if (O < 1) throw new Error();
226
+ this.month = O % 12 || O;
227
+ }], MMMM: [$, function(T) {
228
+ var C = _("months").indexOf(T) + 1;
229
+ if (C < 1) throw new Error();
230
+ this.month = C % 12 || C;
231
+ }], Y: [/[+-]?\d+/, w("year")], YY: [l, function(T) {
232
+ this.year = S(T);
233
+ }], YYYY: [/\d{4}/, w("year")], Z: F, ZZ: F };
234
+ function A(T) {
235
+ var C, O;
236
+ C = T, O = Y && Y.formats;
237
+ for (var L = (T = C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(b, v, p) {
238
+ var m = p && p.toUpperCase();
239
+ return v || O[p] || n[p] || O[m].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(c, f, u) {
240
+ return f || u.slice(1);
241
+ });
242
+ })).match(r), H = L.length, G = 0; G < H; G += 1) {
243
+ var I = L[G], g = z[I], y = g && g[0], h = g && g[1];
244
+ L[G] = h ? { regex: y, parser: h } : I.replace(/^\[|\]$/g, "");
245
+ }
246
+ return function(b) {
247
+ for (var v = {}, p = 0, m = 0; p < H; p += 1) {
248
+ var c = L[p];
249
+ if (typeof c == "string") m += c.length;
250
+ else {
251
+ var f = c.regex, u = c.parser, x = b.slice(m), i = f.exec(x)[0];
252
+ u.call(v, i), b = b.replace(i, "");
253
+ }
254
+ }
255
+ return function(a) {
256
+ var o = a.afternoon;
257
+ if (o !== void 0) {
258
+ var M = a.hours;
259
+ o ? M < 12 && (a.hours += 12) : M === 12 && (a.hours = 0), delete a.afternoon;
260
+ }
261
+ }(v), v;
262
+ };
263
+ }
264
+ return function(T, C, O) {
265
+ O.p.customParseFormat = !0, T && T.parseTwoDigitYear && (S = T.parseTwoDigitYear);
266
+ var L = C.prototype, H = L.parse;
267
+ L.parse = function(G) {
268
+ var I = G.date, g = G.utc, y = G.args;
269
+ this.$u = g;
270
+ var h = y[1];
271
+ if (typeof h == "string") {
272
+ var b = y[2] === !0, v = y[3] === !0, p = b || v, m = y[2];
273
+ v && (m = y[2]), Y = this.$locale(), !b && m && (Y = O.Ls[m]), this.$d = function(x, i, a, o) {
274
+ try {
275
+ if (["x", "X"].indexOf(i) > -1) return new Date((i === "X" ? 1e3 : 1) * x);
276
+ var M = A(i)(x), W = M.year, E = M.month, P = M.day, N = M.hours, V = M.minutes, Z = M.seconds, ft = M.milliseconds, ot = M.zone, gt = M.week, mt = /* @__PURE__ */ new Date(), ct = P || (W || E ? 1 : mt.getDate()), R = W || mt.getFullYear(), j = 0;
277
+ W && !E || (j = E > 0 ? E - 1 : mt.getMonth());
278
+ var X, rt = N || 0, J = V || 0, it = Z || 0, q = ft || 0;
279
+ return ot ? new Date(Date.UTC(R, j, ct, rt, J, it, q + 60 * ot.offset * 1e3)) : a ? new Date(Date.UTC(R, j, ct, rt, J, it, q)) : (X = new Date(R, j, ct, rt, J, it, q), gt && (X = o(X).week(gt).toDate()), X);
280
+ } catch {
281
+ return /* @__PURE__ */ new Date("");
282
+ }
283
+ }(I, h, g, O), this.init(), m && m !== !0 && (this.$L = this.locale(m).$L), p && I != this.format(h) && (this.$d = /* @__PURE__ */ new Date("")), Y = {};
284
+ } else if (h instanceof Array) for (var c = h.length, f = 1; f <= c; f += 1) {
285
+ y[1] = h[f - 1];
286
+ var u = O.apply(this, y);
287
+ if (u.isValid()) {
288
+ this.$d = u.$d, this.$L = u.$L, this.init();
289
+ break;
290
+ }
291
+ f === c && (this.$d = /* @__PURE__ */ new Date(""));
292
+ }
293
+ else H.call(this, G);
294
+ };
295
+ };
296
+ });
297
+ }(zt)), zt.exports;
298
+ }
299
+ var An = En();
300
+ const In = /* @__PURE__ */ St(An);
301
+ var Ht = { exports: {} }, Yn = Ht.exports, me;
302
+ function Ln() {
303
+ return me || (me = 1, function(t, e) {
304
+ (function(n, r) {
305
+ t.exports = r();
306
+ })(Yn, function() {
307
+ return function(n, r) {
308
+ var s = r.prototype, l = s.format;
309
+ s.format = function(k) {
310
+ var $ = this, Y = this.$locale();
311
+ if (!this.isValid()) return l.bind(this)(k);
312
+ var S = this.$utils(), w = (k || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(F) {
313
+ switch (F) {
314
+ case "Q":
315
+ return Math.ceil(($.$M + 1) / 3);
316
+ case "Do":
317
+ return Y.ordinal($.$D);
318
+ case "gggg":
319
+ return $.weekYear();
320
+ case "GGGG":
321
+ return $.isoWeekYear();
322
+ case "wo":
323
+ return Y.ordinal($.week(), "W");
324
+ case "w":
325
+ case "ww":
326
+ return S.s($.week(), F === "w" ? 1 : 2, "0");
327
+ case "W":
328
+ case "WW":
329
+ return S.s($.isoWeek(), F === "W" ? 1 : 2, "0");
330
+ case "k":
331
+ case "kk":
332
+ return S.s(String($.$H === 0 ? 24 : $.$H), F === "k" ? 1 : 2, "0");
333
+ case "X":
334
+ return Math.floor($.$d.getTime() / 1e3);
335
+ case "x":
336
+ return $.$d.getTime();
337
+ case "z":
338
+ return "[" + $.offsetName() + "]";
339
+ case "zzz":
340
+ return "[" + $.offsetName("long") + "]";
341
+ default:
342
+ return F;
343
+ }
344
+ });
345
+ return l.bind(this)(w);
346
+ };
347
+ };
348
+ });
349
+ }(Ht)), Ht.exports;
350
+ }
351
+ var Fn = Ln();
352
+ const On = /* @__PURE__ */ St(Fn);
353
+ var Gt = { exports: {} }, Wn = Gt.exports, ye;
354
+ function Pn() {
355
+ return ye || (ye = 1, function(t, e) {
356
+ (function(n, r) {
357
+ t.exports = r();
358
+ })(Wn, function() {
359
+ var n, r, s = 1e3, l = 6e4, k = 36e5, $ = 864e5, Y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, S = 31536e6, w = 2628e6, F = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, _ = { years: S, months: w, days: $, hours: k, minutes: l, seconds: s, milliseconds: 1, weeks: 6048e5 }, D = function(I) {
360
+ return I instanceof H;
361
+ }, z = function(I, g, y) {
362
+ return new H(I, y, g.$l);
363
+ }, A = function(I) {
364
+ return r.p(I) + "s";
365
+ }, T = function(I) {
366
+ return I < 0;
367
+ }, C = function(I) {
368
+ return T(I) ? Math.ceil(I) : Math.floor(I);
369
+ }, O = function(I) {
370
+ return Math.abs(I);
371
+ }, L = function(I, g) {
372
+ return I ? T(I) ? { negative: !0, format: "" + O(I) + g } : { negative: !1, format: "" + I + g } : { negative: !1, format: "" };
373
+ }, H = function() {
374
+ function I(y, h, b) {
375
+ var v = this;
376
+ if (this.$d = {}, this.$l = b, y === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), h) return z(y * _[A(h)], this);
377
+ if (typeof y == "number") return this.$ms = y, this.parseFromMilliseconds(), this;
378
+ if (typeof y == "object") return Object.keys(y).forEach(function(c) {
379
+ v.$d[A(c)] = y[c];
380
+ }), this.calMilliseconds(), this;
381
+ if (typeof y == "string") {
382
+ var p = y.match(F);
383
+ if (p) {
384
+ var m = p.slice(2).map(function(c) {
385
+ return c != null ? Number(c) : 0;
386
+ });
387
+ return this.$d.years = m[0], this.$d.months = m[1], this.$d.weeks = m[2], this.$d.days = m[3], this.$d.hours = m[4], this.$d.minutes = m[5], this.$d.seconds = m[6], this.calMilliseconds(), this;
388
+ }
389
+ }
390
+ return this;
391
+ }
392
+ var g = I.prototype;
393
+ return g.calMilliseconds = function() {
394
+ var y = this;
395
+ this.$ms = Object.keys(this.$d).reduce(function(h, b) {
396
+ return h + (y.$d[b] || 0) * _[b];
397
+ }, 0);
398
+ }, g.parseFromMilliseconds = function() {
399
+ var y = this.$ms;
400
+ this.$d.years = C(y / S), y %= S, this.$d.months = C(y / w), y %= w, this.$d.days = C(y / $), y %= $, this.$d.hours = C(y / k), y %= k, this.$d.minutes = C(y / l), y %= l, this.$d.seconds = C(y / s), y %= s, this.$d.milliseconds = y;
401
+ }, g.toISOString = function() {
402
+ var y = L(this.$d.years, "Y"), h = L(this.$d.months, "M"), b = +this.$d.days || 0;
403
+ this.$d.weeks && (b += 7 * this.$d.weeks);
404
+ var v = L(b, "D"), p = L(this.$d.hours, "H"), m = L(this.$d.minutes, "M"), c = this.$d.seconds || 0;
405
+ this.$d.milliseconds && (c += this.$d.milliseconds / 1e3, c = Math.round(1e3 * c) / 1e3);
406
+ var f = L(c, "S"), u = y.negative || h.negative || v.negative || p.negative || m.negative || f.negative, x = p.format || m.format || f.format ? "T" : "", i = (u ? "-" : "") + "P" + y.format + h.format + v.format + x + p.format + m.format + f.format;
407
+ return i === "P" || i === "-P" ? "P0D" : i;
408
+ }, g.toJSON = function() {
409
+ return this.toISOString();
410
+ }, g.format = function(y) {
411
+ var h = y || "YYYY-MM-DDTHH:mm:ss", b = { Y: this.$d.years, YY: r.s(this.$d.years, 2, "0"), YYYY: r.s(this.$d.years, 4, "0"), M: this.$d.months, MM: r.s(this.$d.months, 2, "0"), D: this.$d.days, DD: r.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: r.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: r.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: r.s(this.$d.seconds, 2, "0"), SSS: r.s(this.$d.milliseconds, 3, "0") };
412
+ return h.replace(Y, function(v, p) {
413
+ return p || String(b[v]);
414
+ });
415
+ }, g.as = function(y) {
416
+ return this.$ms / _[A(y)];
417
+ }, g.get = function(y) {
418
+ var h = this.$ms, b = A(y);
419
+ return b === "milliseconds" ? h %= 1e3 : h = b === "weeks" ? C(h / _[b]) : this.$d[b], h || 0;
420
+ }, g.add = function(y, h, b) {
421
+ var v;
422
+ return v = h ? y * _[A(h)] : D(y) ? y.$ms : z(y, this).$ms, z(this.$ms + v * (b ? -1 : 1), this);
423
+ }, g.subtract = function(y, h) {
424
+ return this.add(y, h, !0);
425
+ }, g.locale = function(y) {
426
+ var h = this.clone();
427
+ return h.$l = y, h;
428
+ }, g.clone = function() {
429
+ return z(this.$ms, this);
430
+ }, g.humanize = function(y) {
431
+ return n().add(this.$ms, "ms").locale(this.$l).fromNow(!y);
432
+ }, g.valueOf = function() {
433
+ return this.asMilliseconds();
434
+ }, g.milliseconds = function() {
435
+ return this.get("milliseconds");
436
+ }, g.asMilliseconds = function() {
437
+ return this.as("milliseconds");
438
+ }, g.seconds = function() {
439
+ return this.get("seconds");
440
+ }, g.asSeconds = function() {
441
+ return this.as("seconds");
442
+ }, g.minutes = function() {
443
+ return this.get("minutes");
444
+ }, g.asMinutes = function() {
445
+ return this.as("minutes");
446
+ }, g.hours = function() {
447
+ return this.get("hours");
448
+ }, g.asHours = function() {
449
+ return this.as("hours");
450
+ }, g.days = function() {
451
+ return this.get("days");
452
+ }, g.asDays = function() {
453
+ return this.as("days");
454
+ }, g.weeks = function() {
455
+ return this.get("weeks");
456
+ }, g.asWeeks = function() {
457
+ return this.as("weeks");
458
+ }, g.months = function() {
459
+ return this.get("months");
460
+ }, g.asMonths = function() {
461
+ return this.as("months");
462
+ }, g.years = function() {
463
+ return this.get("years");
464
+ }, g.asYears = function() {
465
+ return this.as("years");
466
+ }, I;
467
+ }(), G = function(I, g, y) {
468
+ return I.add(g.years() * y, "y").add(g.months() * y, "M").add(g.days() * y, "d").add(g.hours() * y, "h").add(g.minutes() * y, "m").add(g.seconds() * y, "s").add(g.milliseconds() * y, "ms");
469
+ };
470
+ return function(I, g, y) {
471
+ n = y, r = y().$utils(), y.duration = function(v, p) {
472
+ var m = y.locale();
473
+ return z(v, { $l: m }, p);
474
+ }, y.isDuration = D;
475
+ var h = g.prototype.add, b = g.prototype.subtract;
476
+ g.prototype.add = function(v, p) {
477
+ return D(v) ? G(this, v, 1) : h.bind(this)(v, p);
478
+ }, g.prototype.subtract = function(v, p) {
479
+ return D(v) ? G(this, v, -1) : b.bind(this)(v, p);
480
+ };
481
+ };
482
+ });
483
+ }(Gt)), Gt.exports;
484
+ }
485
+ var Nn = Pn();
486
+ const zn = /* @__PURE__ */ St(Nn);
487
+ var Vt = function() {
488
+ var t = /* @__PURE__ */ d(function(m, c, f, u) {
489
+ for (f = f || {}, u = m.length; u--; f[m[u]] = c) ;
490
+ return f;
491
+ }, "o"), e = [6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 38, 40], n = [1, 26], r = [1, 27], s = [1, 28], l = [1, 29], k = [1, 30], $ = [1, 31], Y = [1, 32], S = [1, 33], w = [1, 34], F = [1, 9], _ = [1, 10], D = [1, 11], z = [1, 12], A = [1, 13], T = [1, 14], C = [1, 15], O = [1, 16], L = [1, 19], H = [1, 20], G = [1, 21], I = [1, 22], g = [1, 23], y = [1, 25], h = [1, 35], b = {
492
+ trace: /* @__PURE__ */ d(function() {
493
+ }, "trace"),
494
+ yy: {},
495
+ symbols_: { error: 2, start: 3, gantt: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NL: 10, weekday: 11, weekday_monday: 12, weekday_tuesday: 13, weekday_wednesday: 14, weekday_thursday: 15, weekday_friday: 16, weekday_saturday: 17, weekday_sunday: 18, weekend: 19, weekend_friday: 20, weekend_saturday: 21, dateFormat: 22, inclusiveEndDates: 23, topAxis: 24, axisFormat: 25, tickInterval: 26, excludes: 27, includes: 28, todayMarker: 29, title: 30, acc_title: 31, acc_title_value: 32, acc_descr: 33, acc_descr_value: 34, acc_descr_multiline_value: 35, section: 36, clickStatement: 37, taskTxt: 38, taskData: 39, click: 40, callbackname: 41, callbackargs: 42, href: 43, clickStatementDebug: 44, $accept: 0, $end: 1 },
496
+ terminals_: { 2: "error", 4: "gantt", 6: "EOF", 8: "SPACE", 10: "NL", 12: "weekday_monday", 13: "weekday_tuesday", 14: "weekday_wednesday", 15: "weekday_thursday", 16: "weekday_friday", 17: "weekday_saturday", 18: "weekday_sunday", 20: "weekend_friday", 21: "weekend_saturday", 22: "dateFormat", 23: "inclusiveEndDates", 24: "topAxis", 25: "axisFormat", 26: "tickInterval", 27: "excludes", 28: "includes", 29: "todayMarker", 30: "title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "section", 38: "taskTxt", 39: "taskData", 40: "click", 41: "callbackname", 42: "callbackargs", 43: "href" },
497
+ productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [11, 1], [19, 1], [19, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [37, 2], [37, 3], [37, 3], [37, 4], [37, 3], [37, 4], [37, 2], [44, 2], [44, 3], [44, 3], [44, 4], [44, 3], [44, 4], [44, 2]],
498
+ performAction: /* @__PURE__ */ d(function(m, c, f, u, x, i, a) {
499
+ var o = i.length - 1;
500
+ switch (x) {
501
+ case 1:
502
+ return i[o - 1];
503
+ case 2:
504
+ this.$ = [];
505
+ break;
506
+ case 3:
507
+ i[o - 1].push(i[o]), this.$ = i[o - 1];
508
+ break;
509
+ case 4:
510
+ case 5:
511
+ this.$ = i[o];
512
+ break;
513
+ case 6:
514
+ case 7:
515
+ this.$ = [];
516
+ break;
517
+ case 8:
518
+ u.setWeekday("monday");
519
+ break;
520
+ case 9:
521
+ u.setWeekday("tuesday");
522
+ break;
523
+ case 10:
524
+ u.setWeekday("wednesday");
525
+ break;
526
+ case 11:
527
+ u.setWeekday("thursday");
528
+ break;
529
+ case 12:
530
+ u.setWeekday("friday");
531
+ break;
532
+ case 13:
533
+ u.setWeekday("saturday");
534
+ break;
535
+ case 14:
536
+ u.setWeekday("sunday");
537
+ break;
538
+ case 15:
539
+ u.setWeekend("friday");
540
+ break;
541
+ case 16:
542
+ u.setWeekend("saturday");
543
+ break;
544
+ case 17:
545
+ u.setDateFormat(i[o].substr(11)), this.$ = i[o].substr(11);
546
+ break;
547
+ case 18:
548
+ u.enableInclusiveEndDates(), this.$ = i[o].substr(18);
549
+ break;
550
+ case 19:
551
+ u.TopAxis(), this.$ = i[o].substr(8);
552
+ break;
553
+ case 20:
554
+ u.setAxisFormat(i[o].substr(11)), this.$ = i[o].substr(11);
555
+ break;
556
+ case 21:
557
+ u.setTickInterval(i[o].substr(13)), this.$ = i[o].substr(13);
558
+ break;
559
+ case 22:
560
+ u.setExcludes(i[o].substr(9)), this.$ = i[o].substr(9);
561
+ break;
562
+ case 23:
563
+ u.setIncludes(i[o].substr(9)), this.$ = i[o].substr(9);
564
+ break;
565
+ case 24:
566
+ u.setTodayMarker(i[o].substr(12)), this.$ = i[o].substr(12);
567
+ break;
568
+ case 27:
569
+ u.setDiagramTitle(i[o].substr(6)), this.$ = i[o].substr(6);
570
+ break;
571
+ case 28:
572
+ this.$ = i[o].trim(), u.setAccTitle(this.$);
573
+ break;
574
+ case 29:
575
+ case 30:
576
+ this.$ = i[o].trim(), u.setAccDescription(this.$);
577
+ break;
578
+ case 31:
579
+ u.addSection(i[o].substr(8)), this.$ = i[o].substr(8);
580
+ break;
581
+ case 33:
582
+ u.addTask(i[o - 1], i[o]), this.$ = "task";
583
+ break;
584
+ case 34:
585
+ this.$ = i[o - 1], u.setClickEvent(i[o - 1], i[o], null);
586
+ break;
587
+ case 35:
588
+ this.$ = i[o - 2], u.setClickEvent(i[o - 2], i[o - 1], i[o]);
589
+ break;
590
+ case 36:
591
+ this.$ = i[o - 2], u.setClickEvent(i[o - 2], i[o - 1], null), u.setLink(i[o - 2], i[o]);
592
+ break;
593
+ case 37:
594
+ this.$ = i[o - 3], u.setClickEvent(i[o - 3], i[o - 2], i[o - 1]), u.setLink(i[o - 3], i[o]);
595
+ break;
596
+ case 38:
597
+ this.$ = i[o - 2], u.setClickEvent(i[o - 2], i[o], null), u.setLink(i[o - 2], i[o - 1]);
598
+ break;
599
+ case 39:
600
+ this.$ = i[o - 3], u.setClickEvent(i[o - 3], i[o - 1], i[o]), u.setLink(i[o - 3], i[o - 2]);
601
+ break;
602
+ case 40:
603
+ this.$ = i[o - 1], u.setLink(i[o - 1], i[o]);
604
+ break;
605
+ case 41:
606
+ case 47:
607
+ this.$ = i[o - 1] + " " + i[o];
608
+ break;
609
+ case 42:
610
+ case 43:
611
+ case 45:
612
+ this.$ = i[o - 2] + " " + i[o - 1] + " " + i[o];
613
+ break;
614
+ case 44:
615
+ case 46:
616
+ this.$ = i[o - 3] + " " + i[o - 2] + " " + i[o - 1] + " " + i[o];
617
+ break;
618
+ }
619
+ }, "anonymous"),
620
+ table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: n, 13: r, 14: s, 15: l, 16: k, 17: $, 18: Y, 19: 18, 20: S, 21: w, 22: F, 23: _, 24: D, 25: z, 26: A, 27: T, 28: C, 29: O, 30: L, 31: H, 33: G, 35: I, 36: g, 37: 24, 38: y, 40: h }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 36, 11: 17, 12: n, 13: r, 14: s, 15: l, 16: k, 17: $, 18: Y, 19: 18, 20: S, 21: w, 22: F, 23: _, 24: D, 25: z, 26: A, 27: T, 28: C, 29: O, 30: L, 31: H, 33: G, 35: I, 36: g, 37: 24, 38: y, 40: h }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 17]), t(e, [2, 18]), t(e, [2, 19]), t(e, [2, 20]), t(e, [2, 21]), t(e, [2, 22]), t(e, [2, 23]), t(e, [2, 24]), t(e, [2, 25]), t(e, [2, 26]), t(e, [2, 27]), { 32: [1, 37] }, { 34: [1, 38] }, t(e, [2, 30]), t(e, [2, 31]), t(e, [2, 32]), { 39: [1, 39] }, t(e, [2, 8]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 11]), t(e, [2, 12]), t(e, [2, 13]), t(e, [2, 14]), t(e, [2, 15]), t(e, [2, 16]), { 41: [1, 40], 43: [1, 41] }, t(e, [2, 4]), t(e, [2, 28]), t(e, [2, 29]), t(e, [2, 33]), t(e, [2, 34], { 42: [1, 42], 43: [1, 43] }), t(e, [2, 40], { 41: [1, 44] }), t(e, [2, 35], { 43: [1, 45] }), t(e, [2, 36]), t(e, [2, 38], { 42: [1, 46] }), t(e, [2, 37]), t(e, [2, 39])],
621
+ defaultActions: {},
622
+ parseError: /* @__PURE__ */ d(function(m, c) {
623
+ if (c.recoverable)
624
+ this.trace(m);
625
+ else {
626
+ var f = new Error(m);
627
+ throw f.hash = c, f;
628
+ }
629
+ }, "parseError"),
630
+ parse: /* @__PURE__ */ d(function(m) {
631
+ var c = this, f = [0], u = [], x = [null], i = [], a = this.table, o = "", M = 0, W = 0, E = 2, P = 1, N = i.slice.call(arguments, 1), V = Object.create(this.lexer), Z = { yy: {} };
632
+ for (var ft in this.yy)
633
+ Object.prototype.hasOwnProperty.call(this.yy, ft) && (Z.yy[ft] = this.yy[ft]);
634
+ V.setInput(m, Z.yy), Z.yy.lexer = V, Z.yy.parser = this, typeof V.yylloc > "u" && (V.yylloc = {});
635
+ var ot = V.yylloc;
636
+ i.push(ot);
637
+ var gt = V.options && V.options.ranges;
638
+ typeof Z.yy.parseError == "function" ? this.parseError = Z.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
639
+ function mt(Q) {
640
+ f.length = f.length - 2 * Q, x.length = x.length - Q, i.length = i.length - Q;
641
+ }
642
+ d(mt, "popStack");
643
+ function ct() {
644
+ var Q;
645
+ return Q = u.pop() || V.lex() || P, typeof Q != "number" && (Q instanceof Array && (u = Q, Q = u.pop()), Q = c.symbols_[Q] || Q), Q;
646
+ }
647
+ d(ct, "lex");
648
+ for (var R, j, X, rt, J = {}, it, q, ie, vt; ; ) {
649
+ if (j = f[f.length - 1], this.defaultActions[j] ? X = this.defaultActions[j] : ((R === null || typeof R > "u") && (R = ct()), X = a[j] && a[j][R]), typeof X > "u" || !X.length || !X[0]) {
650
+ var Ct = "";
651
+ vt = [];
652
+ for (it in a[j])
653
+ this.terminals_[it] && it > E && vt.push("'" + this.terminals_[it] + "'");
654
+ V.showPosition ? Ct = "Parse error on line " + (M + 1) + `:
655
+ ` + V.showPosition() + `
656
+ Expecting ` + vt.join(", ") + ", got '" + (this.terminals_[R] || R) + "'" : Ct = "Parse error on line " + (M + 1) + ": Unexpected " + (R == P ? "end of input" : "'" + (this.terminals_[R] || R) + "'"), this.parseError(Ct, {
657
+ text: V.match,
658
+ token: this.terminals_[R] || R,
659
+ line: V.yylineno,
660
+ loc: ot,
661
+ expected: vt
662
+ });
663
+ }
664
+ if (X[0] instanceof Array && X.length > 1)
665
+ throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + R);
666
+ switch (X[0]) {
667
+ case 1:
668
+ f.push(R), x.push(V.yytext), i.push(V.yylloc), f.push(X[1]), R = null, W = V.yyleng, o = V.yytext, M = V.yylineno, ot = V.yylloc;
669
+ break;
670
+ case 2:
671
+ if (q = this.productions_[X[1]][1], J.$ = x[x.length - q], J._$ = {
672
+ first_line: i[i.length - (q || 1)].first_line,
673
+ last_line: i[i.length - 1].last_line,
674
+ first_column: i[i.length - (q || 1)].first_column,
675
+ last_column: i[i.length - 1].last_column
676
+ }, gt && (J._$.range = [
677
+ i[i.length - (q || 1)].range[0],
678
+ i[i.length - 1].range[1]
679
+ ]), rt = this.performAction.apply(J, [
680
+ o,
681
+ W,
682
+ M,
683
+ Z.yy,
684
+ X[1],
685
+ x,
686
+ i
687
+ ].concat(N)), typeof rt < "u")
688
+ return rt;
689
+ q && (f = f.slice(0, -1 * q * 2), x = x.slice(0, -1 * q), i = i.slice(0, -1 * q)), f.push(this.productions_[X[1]][0]), x.push(J.$), i.push(J._$), ie = a[f[f.length - 2]][f[f.length - 1]], f.push(ie);
690
+ break;
691
+ case 3:
692
+ return !0;
693
+ }
694
+ }
695
+ return !0;
696
+ }, "parse")
697
+ }, v = /* @__PURE__ */ function() {
698
+ var m = {
699
+ EOF: 1,
700
+ parseError: /* @__PURE__ */ d(function(c, f) {
701
+ if (this.yy.parser)
702
+ this.yy.parser.parseError(c, f);
703
+ else
704
+ throw new Error(c);
705
+ }, "parseError"),
706
+ // resets the lexer, sets new input
707
+ setInput: /* @__PURE__ */ d(function(c, f) {
708
+ return this.yy = f || this.yy || {}, this._input = c, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
709
+ first_line: 1,
710
+ first_column: 0,
711
+ last_line: 1,
712
+ last_column: 0
713
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
714
+ }, "setInput"),
715
+ // consumes and returns one char from the input
716
+ input: /* @__PURE__ */ d(function() {
717
+ var c = this._input[0];
718
+ this.yytext += c, this.yyleng++, this.offset++, this.match += c, this.matched += c;
719
+ var f = c.match(/(?:\r\n?|\n).*/g);
720
+ return f ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), c;
721
+ }, "input"),
722
+ // unshifts one char (or a string) into the input
723
+ unput: /* @__PURE__ */ d(function(c) {
724
+ var f = c.length, u = c.split(/(?:\r\n?|\n)/g);
725
+ this._input = c + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - f), this.offset -= f;
726
+ var x = this.match.split(/(?:\r\n?|\n)/g);
727
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), u.length - 1 && (this.yylineno -= u.length - 1);
728
+ var i = this.yylloc.range;
729
+ return this.yylloc = {
730
+ first_line: this.yylloc.first_line,
731
+ last_line: this.yylineno + 1,
732
+ first_column: this.yylloc.first_column,
733
+ last_column: u ? (u.length === x.length ? this.yylloc.first_column : 0) + x[x.length - u.length].length - u[0].length : this.yylloc.first_column - f
734
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - f]), this.yyleng = this.yytext.length, this;
735
+ }, "unput"),
736
+ // When called from action, caches matched text and appends it on next action
737
+ more: /* @__PURE__ */ d(function() {
738
+ return this._more = !0, this;
739
+ }, "more"),
740
+ // 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.
741
+ reject: /* @__PURE__ */ d(function() {
742
+ if (this.options.backtrack_lexer)
743
+ this._backtrack = !0;
744
+ else
745
+ 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).
746
+ ` + this.showPosition(), {
747
+ text: "",
748
+ token: null,
749
+ line: this.yylineno
750
+ });
751
+ return this;
752
+ }, "reject"),
753
+ // retain first n characters of the match
754
+ less: /* @__PURE__ */ d(function(c) {
755
+ this.unput(this.match.slice(c));
756
+ }, "less"),
757
+ // displays already matched input, i.e. for error messages
758
+ pastInput: /* @__PURE__ */ d(function() {
759
+ var c = this.matched.substr(0, this.matched.length - this.match.length);
760
+ return (c.length > 20 ? "..." : "") + c.substr(-20).replace(/\n/g, "");
761
+ }, "pastInput"),
762
+ // displays upcoming input, i.e. for error messages
763
+ upcomingInput: /* @__PURE__ */ d(function() {
764
+ var c = this.match;
765
+ return c.length < 20 && (c += this._input.substr(0, 20 - c.length)), (c.substr(0, 20) + (c.length > 20 ? "..." : "")).replace(/\n/g, "");
766
+ }, "upcomingInput"),
767
+ // displays the character position where the lexing error occurred, i.e. for error messages
768
+ showPosition: /* @__PURE__ */ d(function() {
769
+ var c = this.pastInput(), f = new Array(c.length + 1).join("-");
770
+ return c + this.upcomingInput() + `
771
+ ` + f + "^";
772
+ }, "showPosition"),
773
+ // test the lexed token: return FALSE when not a match, otherwise return token
774
+ test_match: /* @__PURE__ */ d(function(c, f) {
775
+ var u, x, i;
776
+ if (this.options.backtrack_lexer && (i = {
777
+ yylineno: this.yylineno,
778
+ yylloc: {
779
+ first_line: this.yylloc.first_line,
780
+ last_line: this.last_line,
781
+ first_column: this.yylloc.first_column,
782
+ last_column: this.yylloc.last_column
783
+ },
784
+ yytext: this.yytext,
785
+ match: this.match,
786
+ matches: this.matches,
787
+ matched: this.matched,
788
+ yyleng: this.yyleng,
789
+ offset: this.offset,
790
+ _more: this._more,
791
+ _input: this._input,
792
+ yy: this.yy,
793
+ conditionStack: this.conditionStack.slice(0),
794
+ done: this.done
795
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), x = c[0].match(/(?:\r\n?|\n).*/g), x && (this.yylineno += x.length), this.yylloc = {
796
+ first_line: this.yylloc.last_line,
797
+ last_line: this.yylineno + 1,
798
+ first_column: this.yylloc.last_column,
799
+ last_column: x ? x[x.length - 1].length - x[x.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + c[0].length
800
+ }, this.yytext += c[0], this.match += c[0], this.matches = c, 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(c[0].length), this.matched += c[0], u = this.performAction.call(this, this.yy, this, f, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), u)
801
+ return u;
802
+ if (this._backtrack) {
803
+ for (var a in i)
804
+ this[a] = i[a];
805
+ return !1;
806
+ }
807
+ return !1;
808
+ }, "test_match"),
809
+ // return next match in input
810
+ next: /* @__PURE__ */ d(function() {
811
+ if (this.done)
812
+ return this.EOF;
813
+ this._input || (this.done = !0);
814
+ var c, f, u, x;
815
+ this._more || (this.yytext = "", this.match = "");
816
+ for (var i = this._currentRules(), a = 0; a < i.length; a++)
817
+ if (u = this._input.match(this.rules[i[a]]), u && (!f || u[0].length > f[0].length)) {
818
+ if (f = u, x = a, this.options.backtrack_lexer) {
819
+ if (c = this.test_match(u, i[a]), c !== !1)
820
+ return c;
821
+ if (this._backtrack) {
822
+ f = !1;
823
+ continue;
824
+ } else
825
+ return !1;
826
+ } else if (!this.options.flex)
827
+ break;
828
+ }
829
+ return f ? (c = this.test_match(f, i[x]), c !== !1 ? c : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
830
+ ` + this.showPosition(), {
831
+ text: "",
832
+ token: null,
833
+ line: this.yylineno
834
+ });
835
+ }, "next"),
836
+ // return next match that has a token
837
+ lex: /* @__PURE__ */ d(function() {
838
+ var c = this.next();
839
+ return c || this.lex();
840
+ }, "lex"),
841
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
842
+ begin: /* @__PURE__ */ d(function(c) {
843
+ this.conditionStack.push(c);
844
+ }, "begin"),
845
+ // pop the previously active lexer condition state off the condition stack
846
+ popState: /* @__PURE__ */ d(function() {
847
+ var c = this.conditionStack.length - 1;
848
+ return c > 0 ? this.conditionStack.pop() : this.conditionStack[0];
849
+ }, "popState"),
850
+ // produce the lexer rule set which is active for the currently active lexer condition state
851
+ _currentRules: /* @__PURE__ */ d(function() {
852
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
853
+ }, "_currentRules"),
854
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
855
+ topState: /* @__PURE__ */ d(function(c) {
856
+ return c = this.conditionStack.length - 1 - Math.abs(c || 0), c >= 0 ? this.conditionStack[c] : "INITIAL";
857
+ }, "topState"),
858
+ // alias for begin(condition)
859
+ pushState: /* @__PURE__ */ d(function(c) {
860
+ this.begin(c);
861
+ }, "pushState"),
862
+ // return the number of states currently on the stack
863
+ stateStackSize: /* @__PURE__ */ d(function() {
864
+ return this.conditionStack.length;
865
+ }, "stateStackSize"),
866
+ options: { "case-insensitive": !0 },
867
+ performAction: /* @__PURE__ */ d(function(c, f, u, x) {
868
+ switch (u) {
869
+ case 0:
870
+ return this.begin("open_directive"), "open_directive";
871
+ case 1:
872
+ return this.begin("acc_title"), 31;
873
+ case 2:
874
+ return this.popState(), "acc_title_value";
875
+ case 3:
876
+ return this.begin("acc_descr"), 33;
877
+ case 4:
878
+ return this.popState(), "acc_descr_value";
879
+ case 5:
880
+ this.begin("acc_descr_multiline");
881
+ break;
882
+ case 6:
883
+ this.popState();
884
+ break;
885
+ case 7:
886
+ return "acc_descr_multiline_value";
887
+ case 8:
888
+ break;
889
+ case 9:
890
+ break;
891
+ case 10:
892
+ break;
893
+ case 11:
894
+ return 10;
895
+ case 12:
896
+ break;
897
+ case 13:
898
+ break;
899
+ case 14:
900
+ this.begin("href");
901
+ break;
902
+ case 15:
903
+ this.popState();
904
+ break;
905
+ case 16:
906
+ return 43;
907
+ case 17:
908
+ this.begin("callbackname");
909
+ break;
910
+ case 18:
911
+ this.popState();
912
+ break;
913
+ case 19:
914
+ this.popState(), this.begin("callbackargs");
915
+ break;
916
+ case 20:
917
+ return 41;
918
+ case 21:
919
+ this.popState();
920
+ break;
921
+ case 22:
922
+ return 42;
923
+ case 23:
924
+ this.begin("click");
925
+ break;
926
+ case 24:
927
+ this.popState();
928
+ break;
929
+ case 25:
930
+ return 40;
931
+ case 26:
932
+ return 4;
933
+ case 27:
934
+ return 22;
935
+ case 28:
936
+ return 23;
937
+ case 29:
938
+ return 24;
939
+ case 30:
940
+ return 25;
941
+ case 31:
942
+ return 26;
943
+ case 32:
944
+ return 28;
945
+ case 33:
946
+ return 27;
947
+ case 34:
948
+ return 29;
949
+ case 35:
950
+ return 12;
951
+ case 36:
952
+ return 13;
953
+ case 37:
954
+ return 14;
955
+ case 38:
956
+ return 15;
957
+ case 39:
958
+ return 16;
959
+ case 40:
960
+ return 17;
961
+ case 41:
962
+ return 18;
963
+ case 42:
964
+ return 20;
965
+ case 43:
966
+ return 21;
967
+ case 44:
968
+ return "date";
969
+ case 45:
970
+ return 30;
971
+ case 46:
972
+ return "accDescription";
973
+ case 47:
974
+ return 36;
975
+ case 48:
976
+ return 38;
977
+ case 49:
978
+ return 39;
979
+ case 50:
980
+ return ":";
981
+ case 51:
982
+ return 6;
983
+ case 52:
984
+ return "INVALID";
985
+ }
986
+ }, "anonymous"),
987
+ rules: [/^(?:%%\{)/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, /^(?: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, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:weekend\s+friday\b)/i, /^(?:weekend\s+saturday\b)/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],
988
+ conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, callbackargs: { rules: [21, 22], inclusive: !1 }, callbackname: { rules: [18, 19, 20], inclusive: !1 }, href: { rules: [15, 16], inclusive: !1 }, click: { rules: [24, 25], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], inclusive: !0 } }
989
+ };
990
+ return m;
991
+ }();
992
+ b.lexer = v;
993
+ function p() {
994
+ this.yy = {};
995
+ }
996
+ return d(p, "Parser"), p.prototype = b, b.Parser = p, new p();
997
+ }();
998
+ Vt.parser = Vt;
999
+ var Hn = Vt;
1000
+ U.extend(Sn);
1001
+ U.extend(In);
1002
+ U.extend(On);
1003
+ var ke = { friday: 5, saturday: 6 }, K = "", Ut = "", qt = void 0, Qt = "", yt = [], kt = [], jt = /* @__PURE__ */ new Map(), Zt = [], Dt = [], ht = "", Jt = "", Ae = ["active", "done", "crit", "milestone", "vert"], Kt = [], pt = !1, te = !1, ee = "sunday", Mt = "saturday", Bt = 0, Gn = /* @__PURE__ */ d(function() {
1004
+ Zt = [], Dt = [], ht = "", Kt = [], wt = 0, Xt = void 0, $t = void 0, B = [], K = "", Ut = "", Jt = "", qt = void 0, Qt = "", yt = [], kt = [], pt = !1, te = !1, Bt = 0, jt = /* @__PURE__ */ new Map(), an(), ee = "sunday", Mt = "saturday";
1005
+ }, "clear"), Vn = /* @__PURE__ */ d(function(t) {
1006
+ Ut = t;
1007
+ }, "setAxisFormat"), Bn = /* @__PURE__ */ d(function() {
1008
+ return Ut;
1009
+ }, "getAxisFormat"), Rn = /* @__PURE__ */ d(function(t) {
1010
+ qt = t;
1011
+ }, "setTickInterval"), Xn = /* @__PURE__ */ d(function() {
1012
+ return qt;
1013
+ }, "getTickInterval"), Un = /* @__PURE__ */ d(function(t) {
1014
+ Qt = t;
1015
+ }, "setTodayMarker"), qn = /* @__PURE__ */ d(function() {
1016
+ return Qt;
1017
+ }, "getTodayMarker"), Qn = /* @__PURE__ */ d(function(t) {
1018
+ K = t;
1019
+ }, "setDateFormat"), jn = /* @__PURE__ */ d(function() {
1020
+ pt = !0;
1021
+ }, "enableInclusiveEndDates"), Zn = /* @__PURE__ */ d(function() {
1022
+ return pt;
1023
+ }, "endDatesAreInclusive"), Jn = /* @__PURE__ */ d(function() {
1024
+ te = !0;
1025
+ }, "enableTopAxis"), Kn = /* @__PURE__ */ d(function() {
1026
+ return te;
1027
+ }, "topAxisEnabled"), ti = /* @__PURE__ */ d(function(t) {
1028
+ Jt = t;
1029
+ }, "setDisplayMode"), ei = /* @__PURE__ */ d(function() {
1030
+ return Jt;
1031
+ }, "getDisplayMode"), ni = /* @__PURE__ */ d(function() {
1032
+ return K;
1033
+ }, "getDateFormat"), ii = /* @__PURE__ */ d(function(t) {
1034
+ yt = t.toLowerCase().split(/[\s,]+/);
1035
+ }, "setIncludes"), ri = /* @__PURE__ */ d(function() {
1036
+ return yt;
1037
+ }, "getIncludes"), si = /* @__PURE__ */ d(function(t) {
1038
+ kt = t.toLowerCase().split(/[\s,]+/);
1039
+ }, "setExcludes"), ai = /* @__PURE__ */ d(function() {
1040
+ return kt;
1041
+ }, "getExcludes"), oi = /* @__PURE__ */ d(function() {
1042
+ return jt;
1043
+ }, "getLinks"), ci = /* @__PURE__ */ d(function(t) {
1044
+ ht = t, Zt.push(t);
1045
+ }, "addSection"), li = /* @__PURE__ */ d(function() {
1046
+ return Zt;
1047
+ }, "getSections"), ui = /* @__PURE__ */ d(function() {
1048
+ let t = pe();
1049
+ const e = 10;
1050
+ let n = 0;
1051
+ for (; !t && n < e; )
1052
+ t = pe(), n++;
1053
+ return Dt = B, Dt;
1054
+ }, "getTasks"), Ie = /* @__PURE__ */ d(function(t, e, n, r) {
1055
+ const s = t.format(e.trim()), l = t.format("YYYY-MM-DD");
1056
+ return r.includes(s) || r.includes(l) ? !1 : n.includes("weekends") && (t.isoWeekday() === ke[Mt] || t.isoWeekday() === ke[Mt] + 1) || n.includes(t.format("dddd").toLowerCase()) ? !0 : n.includes(s) || n.includes(l);
1057
+ }, "isInvalidDate"), di = /* @__PURE__ */ d(function(t) {
1058
+ ee = t;
1059
+ }, "setWeekday"), hi = /* @__PURE__ */ d(function() {
1060
+ return ee;
1061
+ }, "getWeekday"), fi = /* @__PURE__ */ d(function(t) {
1062
+ Mt = t;
1063
+ }, "setWeekend"), Ye = /* @__PURE__ */ d(function(t, e, n, r) {
1064
+ if (!n.length || t.manualEndTime)
1065
+ return;
1066
+ let s;
1067
+ t.startTime instanceof Date ? s = U(t.startTime) : s = U(t.startTime, e, !0), s = s.add(1, "d");
1068
+ let l;
1069
+ t.endTime instanceof Date ? l = U(t.endTime) : l = U(t.endTime, e, !0);
1070
+ const [k, $] = mi(
1071
+ s,
1072
+ l,
1073
+ e,
1074
+ n,
1075
+ r
1076
+ );
1077
+ t.endTime = k.toDate(), t.renderEndTime = $;
1078
+ }, "checkTaskDates"), mi = /* @__PURE__ */ d(function(t, e, n, r, s) {
1079
+ let l = !1, k = null;
1080
+ for (; t <= e; )
1081
+ l || (k = e.toDate()), l = Ie(t, n, r, s), l && (e = e.add(1, "d")), t = t.add(1, "d");
1082
+ return [e, k];
1083
+ }, "fixTaskDates"), Rt = /* @__PURE__ */ d(function(t, e, n) {
1084
+ if (n = n.trim(), (/* @__PURE__ */ d((l) => {
1085
+ const k = l.trim();
1086
+ return k === "x" || k === "X";
1087
+ }, "isTimestampFormat"))(e) && /^\d+$/.test(n))
1088
+ return new Date(Number(n));
1089
+ const r = /^after\s+(?<ids>[\d\w- ]+)/.exec(n);
1090
+ if (r !== null) {
1091
+ let l = null;
1092
+ for (const $ of r.groups.ids.split(" ")) {
1093
+ let Y = at($);
1094
+ Y !== void 0 && (!l || Y.endTime > l.endTime) && (l = Y);
1095
+ }
1096
+ if (l)
1097
+ return l.endTime;
1098
+ const k = /* @__PURE__ */ new Date();
1099
+ return k.setHours(0, 0, 0, 0), k;
1100
+ }
1101
+ let s = U(n, e.trim(), !0);
1102
+ if (s.isValid())
1103
+ return s.toDate();
1104
+ {
1105
+ st.debug("Invalid date:" + n), st.debug("With date format:" + e.trim());
1106
+ const l = new Date(n);
1107
+ if (l === void 0 || isNaN(l.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
1108
+ // huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
1109
+ // This can cause virtually infinite loops while rendering, so for the
1110
+ // purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
1111
+ // invalid.
1112
+ l.getFullYear() < -1e4 || l.getFullYear() > 1e4)
1113
+ throw new Error("Invalid date:" + n);
1114
+ return l;
1115
+ }
1116
+ }, "getStartDate"), Le = /* @__PURE__ */ d(function(t) {
1117
+ const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
1118
+ return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
1119
+ }, "parseDuration"), Fe = /* @__PURE__ */ d(function(t, e, n, r = !1) {
1120
+ n = n.trim();
1121
+ const s = /^until\s+(?<ids>[\d\w- ]+)/.exec(n);
1122
+ if (s !== null) {
1123
+ let S = null;
1124
+ for (const F of s.groups.ids.split(" ")) {
1125
+ let _ = at(F);
1126
+ _ !== void 0 && (!S || _.startTime < S.startTime) && (S = _);
1127
+ }
1128
+ if (S)
1129
+ return S.startTime;
1130
+ const w = /* @__PURE__ */ new Date();
1131
+ return w.setHours(0, 0, 0, 0), w;
1132
+ }
1133
+ let l = U(n, e.trim(), !0);
1134
+ if (l.isValid())
1135
+ return r && (l = l.add(1, "d")), l.toDate();
1136
+ let k = U(t);
1137
+ const [$, Y] = Le(n);
1138
+ if (!Number.isNaN($)) {
1139
+ const S = k.add($, Y);
1140
+ S.isValid() && (k = S);
1141
+ }
1142
+ return k.toDate();
1143
+ }, "getEndDate"), wt = 0, dt = /* @__PURE__ */ d(function(t) {
1144
+ return t === void 0 ? (wt = wt + 1, "task" + wt) : t;
1145
+ }, "parseId"), yi = /* @__PURE__ */ d(function(t, e) {
1146
+ let n;
1147
+ e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1148
+ const r = n.split(","), s = {};
1149
+ ne(r, s, Ae);
1150
+ for (let k = 0; k < r.length; k++)
1151
+ r[k] = r[k].trim();
1152
+ let l = "";
1153
+ switch (r.length) {
1154
+ case 1:
1155
+ s.id = dt(), s.startTime = t.endTime, l = r[0];
1156
+ break;
1157
+ case 2:
1158
+ s.id = dt(), s.startTime = Rt(void 0, K, r[0]), l = r[1];
1159
+ break;
1160
+ case 3:
1161
+ s.id = dt(r[0]), s.startTime = Rt(void 0, K, r[1]), l = r[2];
1162
+ break;
1163
+ }
1164
+ return l && (s.endTime = Fe(s.startTime, K, l, pt), s.manualEndTime = U(l, "YYYY-MM-DD", !0).isValid(), Ye(s, K, kt, yt)), s;
1165
+ }, "compileData"), ki = /* @__PURE__ */ d(function(t, e) {
1166
+ let n;
1167
+ e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
1168
+ const r = n.split(","), s = {};
1169
+ ne(r, s, Ae);
1170
+ for (let l = 0; l < r.length; l++)
1171
+ r[l] = r[l].trim();
1172
+ switch (r.length) {
1173
+ case 1:
1174
+ s.id = dt(), s.startTime = {
1175
+ type: "prevTaskEnd",
1176
+ id: t
1177
+ }, s.endTime = {
1178
+ data: r[0]
1179
+ };
1180
+ break;
1181
+ case 2:
1182
+ s.id = dt(), s.startTime = {
1183
+ type: "getStartDate",
1184
+ startData: r[0]
1185
+ }, s.endTime = {
1186
+ data: r[1]
1187
+ };
1188
+ break;
1189
+ case 3:
1190
+ s.id = dt(r[0]), s.startTime = {
1191
+ type: "getStartDate",
1192
+ startData: r[1]
1193
+ }, s.endTime = {
1194
+ data: r[2]
1195
+ };
1196
+ break;
1197
+ }
1198
+ return s;
1199
+ }, "parseData"), Xt, $t, B = [], Oe = {}, pi = /* @__PURE__ */ d(function(t, e) {
1200
+ const n = {
1201
+ section: ht,
1202
+ type: ht,
1203
+ processed: !1,
1204
+ manualEndTime: !1,
1205
+ renderEndTime: null,
1206
+ raw: { data: e },
1207
+ task: t,
1208
+ classes: []
1209
+ }, r = ki($t, e);
1210
+ n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = $t, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, n.order = Bt, Bt++;
1211
+ const s = B.push(n);
1212
+ $t = n.id, Oe[n.id] = s - 1;
1213
+ }, "addTask"), at = /* @__PURE__ */ d(function(t) {
1214
+ const e = Oe[t];
1215
+ return B[e];
1216
+ }, "findTaskById"), gi = /* @__PURE__ */ d(function(t, e) {
1217
+ const n = {
1218
+ section: ht,
1219
+ type: ht,
1220
+ description: t,
1221
+ task: t,
1222
+ classes: []
1223
+ }, r = yi(Xt, e);
1224
+ 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, n.vert = r.vert, Xt = n, Dt.push(n);
1225
+ }, "addTaskOrg"), pe = /* @__PURE__ */ d(function() {
1226
+ const t = /* @__PURE__ */ d(function(n) {
1227
+ const r = B[n];
1228
+ let s = "";
1229
+ switch (B[n].raw.startTime.type) {
1230
+ case "prevTaskEnd": {
1231
+ const l = at(r.prevTaskId);
1232
+ r.startTime = l.endTime;
1233
+ break;
1234
+ }
1235
+ case "getStartDate":
1236
+ s = Rt(void 0, K, B[n].raw.startTime.startData), s && (B[n].startTime = s);
1237
+ break;
1238
+ }
1239
+ return B[n].startTime && (B[n].endTime = Fe(
1240
+ B[n].startTime,
1241
+ K,
1242
+ B[n].raw.endTime.data,
1243
+ pt
1244
+ ), B[n].endTime && (B[n].processed = !0, B[n].manualEndTime = U(
1245
+ B[n].raw.endTime.data,
1246
+ "YYYY-MM-DD",
1247
+ !0
1248
+ ).isValid(), Ye(B[n], K, kt, yt))), B[n].processed;
1249
+ }, "compileTask");
1250
+ let e = !0;
1251
+ for (const [n, r] of B.entries())
1252
+ t(n), e = e && r.processed;
1253
+ return e;
1254
+ }, "compileTasks"), vi = /* @__PURE__ */ d(function(t, e) {
1255
+ let n = e;
1256
+ lt().securityLevel !== "loose" && (n = sn.sanitizeUrl(e)), t.split(",").forEach(function(r) {
1257
+ at(r) !== void 0 && (Pe(r, () => {
1258
+ window.open(n, "_self");
1259
+ }), jt.set(r, n));
1260
+ }), We(t, "clickable");
1261
+ }, "setLink"), We = /* @__PURE__ */ d(function(t, e) {
1262
+ t.split(",").forEach(function(n) {
1263
+ let r = at(n);
1264
+ r !== void 0 && r.classes.push(e);
1265
+ });
1266
+ }, "setClass"), bi = /* @__PURE__ */ d(function(t, e, n) {
1267
+ if (lt().securityLevel !== "loose" || e === void 0)
1268
+ return;
1269
+ let r = [];
1270
+ if (typeof n == "string") {
1271
+ r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
1272
+ for (let s = 0; s < r.length; s++) {
1273
+ let l = r[s].trim();
1274
+ l.startsWith('"') && l.endsWith('"') && (l = l.substr(1, l.length - 2)), r[s] = l;
1275
+ }
1276
+ }
1277
+ r.length === 0 && r.push(t), at(t) !== void 0 && Pe(t, () => {
1278
+ on.runFunc(e, ...r);
1279
+ });
1280
+ }, "setClickFun"), Pe = /* @__PURE__ */ d(function(t, e) {
1281
+ Kt.push(
1282
+ function() {
1283
+ const n = document.querySelector(`[id="${t}"]`);
1284
+ n !== null && n.addEventListener("click", function() {
1285
+ e();
1286
+ });
1287
+ },
1288
+ function() {
1289
+ const n = document.querySelector(`[id="${t}-text"]`);
1290
+ n !== null && n.addEventListener("click", function() {
1291
+ e();
1292
+ });
1293
+ }
1294
+ );
1295
+ }, "pushFun"), xi = /* @__PURE__ */ d(function(t, e, n) {
1296
+ t.split(",").forEach(function(r) {
1297
+ bi(r, e, n);
1298
+ }), We(t, "clickable");
1299
+ }, "setClickEvent"), Ti = /* @__PURE__ */ d(function(t) {
1300
+ Kt.forEach(function(e) {
1301
+ e(t);
1302
+ });
1303
+ }, "bindFunctions"), wi = {
1304
+ getConfig: /* @__PURE__ */ d(() => lt().gantt, "getConfig"),
1305
+ clear: Gn,
1306
+ setDateFormat: Qn,
1307
+ getDateFormat: ni,
1308
+ enableInclusiveEndDates: jn,
1309
+ endDatesAreInclusive: Zn,
1310
+ enableTopAxis: Jn,
1311
+ topAxisEnabled: Kn,
1312
+ setAxisFormat: Vn,
1313
+ getAxisFormat: Bn,
1314
+ setTickInterval: Rn,
1315
+ getTickInterval: Xn,
1316
+ setTodayMarker: Un,
1317
+ getTodayMarker: qn,
1318
+ setAccTitle: Be,
1319
+ getAccTitle: Ve,
1320
+ setDiagramTitle: Ge,
1321
+ getDiagramTitle: He,
1322
+ setDisplayMode: ti,
1323
+ getDisplayMode: ei,
1324
+ setAccDescription: ze,
1325
+ getAccDescription: Ne,
1326
+ addSection: ci,
1327
+ getSections: li,
1328
+ getTasks: ui,
1329
+ addTask: pi,
1330
+ findTaskById: at,
1331
+ addTaskOrg: gi,
1332
+ setIncludes: ii,
1333
+ getIncludes: ri,
1334
+ setExcludes: si,
1335
+ getExcludes: ai,
1336
+ setClickEvent: xi,
1337
+ setLink: vi,
1338
+ getLinks: oi,
1339
+ bindFunctions: Ti,
1340
+ parseDuration: Le,
1341
+ isInvalidDate: Ie,
1342
+ setWeekday: di,
1343
+ getWeekday: hi,
1344
+ setWeekend: fi
1345
+ };
1346
+ function ne(t, e, n) {
1347
+ let r = !0;
1348
+ for (; r; )
1349
+ r = !1, n.forEach(function(s) {
1350
+ const l = "^\\s*" + s + "\\s*$", k = new RegExp(l);
1351
+ t[0].match(k) && (e[s] = !0, t.shift(1), r = !0);
1352
+ });
1353
+ }
1354
+ d(ne, "getTaskTags");
1355
+ U.extend(zn);
1356
+ var $i = /* @__PURE__ */ d(function() {
1357
+ st.debug("Something is calling, setConf, remove the call");
1358
+ }, "setConf"), ge = {
1359
+ monday: nn,
1360
+ tuesday: en,
1361
+ wednesday: tn,
1362
+ thursday: Ke,
1363
+ friday: Je,
1364
+ saturday: Ze,
1365
+ sunday: je
1366
+ }, _i = /* @__PURE__ */ d((t, e) => {
1367
+ let n = [...t].map(() => -1 / 0), r = [...t].sort((l, k) => l.startTime - k.startTime || l.order - k.order), s = 0;
1368
+ for (const l of r)
1369
+ for (let k = 0; k < n.length; k++)
1370
+ if (l.startTime >= n[k]) {
1371
+ n[k] = l.endTime, l.order = k + e, k > s && (s = k);
1372
+ break;
1373
+ }
1374
+ return s;
1375
+ }, "getMaxIntersections"), et, Ot = 1e4, Di = /* @__PURE__ */ d(function(t, e, n, r) {
1376
+ const s = lt().gantt, l = lt().securityLevel;
1377
+ let k;
1378
+ l === "sandbox" && (k = bt("#i" + e));
1379
+ const $ = l === "sandbox" ? bt(k.nodes()[0].contentDocument.body) : bt("body"), Y = l === "sandbox" ? k.nodes()[0].contentDocument : document, S = Y.getElementById(e);
1380
+ et = S.parentElement.offsetWidth, et === void 0 && (et = 1200), s.useWidth !== void 0 && (et = s.useWidth);
1381
+ const w = r.db.getTasks();
1382
+ let F = [];
1383
+ for (const h of w)
1384
+ F.push(h.type);
1385
+ F = y(F);
1386
+ const _ = {};
1387
+ let D = 2 * s.topPadding;
1388
+ if (r.db.getDisplayMode() === "compact" || s.displayMode === "compact") {
1389
+ const h = {};
1390
+ for (const v of w)
1391
+ h[v.section] === void 0 ? h[v.section] = [v] : h[v.section].push(v);
1392
+ let b = 0;
1393
+ for (const v of Object.keys(h)) {
1394
+ const p = _i(h[v], b) + 1;
1395
+ b += p, D += p * (s.barHeight + s.barGap), _[v] = p;
1396
+ }
1397
+ } else {
1398
+ D += w.length * (s.barHeight + s.barGap);
1399
+ for (const h of F)
1400
+ _[h] = w.filter((b) => b.type === h).length;
1401
+ }
1402
+ S.setAttribute("viewBox", "0 0 " + et + " " + D);
1403
+ const z = $.select(`[id="${e}"]`), A = Re().domain([
1404
+ Xe(w, function(h) {
1405
+ return h.startTime;
1406
+ }),
1407
+ Ue(w, function(h) {
1408
+ return h.endTime;
1409
+ })
1410
+ ]).rangeRound([0, et - s.leftPadding - s.rightPadding]);
1411
+ function T(h, b) {
1412
+ const v = h.startTime, p = b.startTime;
1413
+ let m = 0;
1414
+ return v > p ? m = 1 : v < p && (m = -1), m;
1415
+ }
1416
+ d(T, "taskCompare"), w.sort(T), C(w, et, D), qe(z, D, et, s.useMaxWidth), z.append("text").text(r.db.getDiagramTitle()).attr("x", et / 2).attr("y", s.titleTopMargin).attr("class", "titleText");
1417
+ function C(h, b, v) {
1418
+ const p = s.barHeight, m = p + s.barGap, c = s.topPadding, f = s.leftPadding, u = Qe().domain([0, F.length]).range(["#00B9FA", "#F95002"]).interpolate($n);
1419
+ L(
1420
+ m,
1421
+ c,
1422
+ f,
1423
+ b,
1424
+ v,
1425
+ h,
1426
+ r.db.getExcludes(),
1427
+ r.db.getIncludes()
1428
+ ), G(f, c, b, v), O(h, m, c, f, p, u, b), I(m, c), g(f, c, b, v);
1429
+ }
1430
+ d(C, "makeGantt");
1431
+ function O(h, b, v, p, m, c, f) {
1432
+ h.sort((a, o) => a.vert === o.vert ? 0 : a.vert ? 1 : -1);
1433
+ const u = [...new Set(h.map((a) => a.order))].map((a) => h.find((o) => o.order === a));
1434
+ z.append("g").selectAll("rect").data(u).enter().append("rect").attr("x", 0).attr("y", function(a, o) {
1435
+ return o = a.order, o * b + v - 2;
1436
+ }).attr("width", function() {
1437
+ return f - s.rightPadding / 2;
1438
+ }).attr("height", b).attr("class", function(a) {
1439
+ for (const [o, M] of F.entries())
1440
+ if (a.type === M)
1441
+ return "section section" + o % s.numberSectionStyles;
1442
+ return "section section0";
1443
+ }).enter();
1444
+ const x = z.append("g").selectAll("rect").data(h).enter(), i = r.db.getLinks();
1445
+ if (x.append("rect").attr("id", function(a) {
1446
+ return a.id;
1447
+ }).attr("rx", 3).attr("ry", 3).attr("x", function(a) {
1448
+ return a.milestone ? A(a.startTime) + p + 0.5 * (A(a.endTime) - A(a.startTime)) - 0.5 * m : A(a.startTime) + p;
1449
+ }).attr("y", function(a, o) {
1450
+ return o = a.order, a.vert ? s.gridLineStartPadding : o * b + v;
1451
+ }).attr("width", function(a) {
1452
+ return a.milestone ? m : a.vert ? 0.08 * m : A(a.renderEndTime || a.endTime) - A(a.startTime);
1453
+ }).attr("height", function(a) {
1454
+ return a.vert ? w.length * (s.barHeight + s.barGap) + s.barHeight * 2 : m;
1455
+ }).attr("transform-origin", function(a, o) {
1456
+ return o = a.order, (A(a.startTime) + p + 0.5 * (A(a.endTime) - A(a.startTime))).toString() + "px " + (o * b + v + 0.5 * m).toString() + "px";
1457
+ }).attr("class", function(a) {
1458
+ const o = "task";
1459
+ let M = "";
1460
+ a.classes.length > 0 && (M = a.classes.join(" "));
1461
+ let W = 0;
1462
+ for (const [P, N] of F.entries())
1463
+ a.type === N && (W = P % s.numberSectionStyles);
1464
+ let E = "";
1465
+ return a.active ? a.crit ? E += " activeCrit" : E = " active" : a.done ? a.crit ? E = " doneCrit" : E = " done" : a.crit && (E += " crit"), E.length === 0 && (E = " task"), a.milestone && (E = " milestone " + E), a.vert && (E = " vert " + E), E += W, E += " " + M, o + E;
1466
+ }), x.append("text").attr("id", function(a) {
1467
+ return a.id + "-text";
1468
+ }).text(function(a) {
1469
+ return a.task;
1470
+ }).attr("font-size", s.fontSize).attr("x", function(a) {
1471
+ let o = A(a.startTime), M = A(a.renderEndTime || a.endTime);
1472
+ if (a.milestone && (o += 0.5 * (A(a.endTime) - A(a.startTime)) - 0.5 * m, M = o + m), a.vert)
1473
+ return A(a.startTime) + p;
1474
+ const W = this.getBBox().width;
1475
+ return W > M - o ? M + W + 1.5 * s.leftPadding > f ? o + p - 5 : M + p + 5 : (M - o) / 2 + o + p;
1476
+ }).attr("y", function(a, o) {
1477
+ return a.vert ? s.gridLineStartPadding + w.length * (s.barHeight + s.barGap) + 60 : (o = a.order, o * b + s.barHeight / 2 + (s.fontSize / 2 - 2) + v);
1478
+ }).attr("text-height", m).attr("class", function(a) {
1479
+ const o = A(a.startTime);
1480
+ let M = A(a.endTime);
1481
+ a.milestone && (M = o + m);
1482
+ const W = this.getBBox().width;
1483
+ let E = "";
1484
+ a.classes.length > 0 && (E = a.classes.join(" "));
1485
+ let P = 0;
1486
+ for (const [V, Z] of F.entries())
1487
+ a.type === Z && (P = V % s.numberSectionStyles);
1488
+ let N = "";
1489
+ return a.active && (a.crit ? N = "activeCritText" + P : N = "activeText" + P), a.done ? a.crit ? N = N + " doneCritText" + P : N = N + " doneText" + P : a.crit && (N = N + " critText" + P), a.milestone && (N += " milestoneText"), a.vert && (N += " vertText"), W > M - o ? M + W + 1.5 * s.leftPadding > f ? E + " taskTextOutsideLeft taskTextOutside" + P + " " + N : E + " taskTextOutsideRight taskTextOutside" + P + " " + N + " width-" + W : E + " taskText taskText" + P + " " + N + " width-" + W;
1490
+ }), lt().securityLevel === "sandbox") {
1491
+ let a;
1492
+ a = bt("#i" + e);
1493
+ const o = a.nodes()[0].contentDocument;
1494
+ x.filter(function(M) {
1495
+ return i.has(M.id);
1496
+ }).each(function(M) {
1497
+ var W = o.querySelector("#" + M.id), E = o.querySelector("#" + M.id + "-text");
1498
+ const P = W.parentNode;
1499
+ var N = o.createElement("a");
1500
+ N.setAttribute("xlink:href", i.get(M.id)), N.setAttribute("target", "_top"), P.appendChild(N), N.appendChild(W), N.appendChild(E);
1501
+ });
1502
+ }
1503
+ }
1504
+ d(O, "drawRects");
1505
+ function L(h, b, v, p, m, c, f, u) {
1506
+ if (f.length === 0 && u.length === 0)
1507
+ return;
1508
+ let x, i;
1509
+ for (const { startTime: E, endTime: P } of c)
1510
+ (x === void 0 || E < x) && (x = E), (i === void 0 || P > i) && (i = P);
1511
+ if (!x || !i)
1512
+ return;
1513
+ if (U(i).diff(U(x), "year") > 5) {
1514
+ st.warn(
1515
+ "The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
1516
+ );
1517
+ return;
1518
+ }
1519
+ const a = r.db.getDateFormat(), o = [];
1520
+ let M = null, W = U(x);
1521
+ for (; W.valueOf() <= i; )
1522
+ r.db.isInvalidDate(W, a, f, u) ? M ? M.end = W : M = {
1523
+ start: W,
1524
+ end: W
1525
+ } : M && (o.push(M), M = null), W = W.add(1, "d");
1526
+ z.append("g").selectAll("rect").data(o).enter().append("rect").attr("id", (E) => "exclude-" + E.start.format("YYYY-MM-DD")).attr("x", (E) => A(E.start.startOf("day")) + v).attr("y", s.gridLineStartPadding).attr("width", (E) => A(E.end.endOf("day")) - A(E.start.startOf("day"))).attr("height", m - b - s.gridLineStartPadding).attr("transform-origin", function(E, P) {
1527
+ return (A(E.start) + v + 0.5 * (A(E.end) - A(E.start))).toString() + "px " + (P * h + 0.5 * m).toString() + "px";
1528
+ }).attr("class", "exclude-range");
1529
+ }
1530
+ d(L, "drawExcludeDays");
1531
+ function H(h, b, v, p) {
1532
+ if (v <= 0 || h > b)
1533
+ return 1 / 0;
1534
+ const m = b - h, c = U.duration({ [p ?? "day"]: v }).asMilliseconds();
1535
+ return c <= 0 ? 1 / 0 : Math.ceil(m / c);
1536
+ }
1537
+ d(H, "getEstimatedTickCount");
1538
+ function G(h, b, v, p) {
1539
+ const m = r.db.getDateFormat(), c = r.db.getAxisFormat();
1540
+ let f;
1541
+ c ? f = c : m === "D" ? f = "%d" : f = s.axisFormat ?? "%Y-%m-%d";
1542
+ let u = pn(A).tickSize(-p + b + s.gridLineStartPadding).tickFormat(re(f));
1543
+ const x = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(
1544
+ r.db.getTickInterval() || s.tickInterval
1545
+ );
1546
+ if (x !== null) {
1547
+ const i = parseInt(x[1], 10);
1548
+ if (isNaN(i) || i <= 0)
1549
+ st.warn(
1550
+ `Invalid tick interval value: "${x[1]}". Skipping custom tick interval.`
1551
+ );
1552
+ else {
1553
+ const a = x[2], o = r.db.getWeekday() || s.weekday, M = A.domain(), W = M[0], E = M[1], P = H(W, E, i, a);
1554
+ if (P > Ot)
1555
+ st.warn(
1556
+ `The tick interval "${i}${a}" would generate ${P} ticks, which exceeds the maximum allowed (${Ot}). This may indicate an invalid date or time range. Skipping custom tick interval.`
1557
+ );
1558
+ else
1559
+ switch (a) {
1560
+ case "millisecond":
1561
+ u.ticks(ue.every(i));
1562
+ break;
1563
+ case "second":
1564
+ u.ticks(le.every(i));
1565
+ break;
1566
+ case "minute":
1567
+ u.ticks(ce.every(i));
1568
+ break;
1569
+ case "hour":
1570
+ u.ticks(oe.every(i));
1571
+ break;
1572
+ case "day":
1573
+ u.ticks(ae.every(i));
1574
+ break;
1575
+ case "week":
1576
+ u.ticks(ge[o].every(i));
1577
+ break;
1578
+ case "month":
1579
+ u.ticks(se.every(i));
1580
+ break;
1581
+ }
1582
+ }
1583
+ }
1584
+ if (z.append("g").attr("class", "grid").attr("transform", "translate(" + h + ", " + (p - 50) + ")").call(u).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || s.topAxis) {
1585
+ let i = kn(A).tickSize(-p + b + s.gridLineStartPadding).tickFormat(re(f));
1586
+ if (x !== null) {
1587
+ const a = parseInt(x[1], 10);
1588
+ if (isNaN(a) || a <= 0)
1589
+ st.warn(
1590
+ `Invalid tick interval value: "${x[1]}". Skipping custom tick interval.`
1591
+ );
1592
+ else {
1593
+ const o = x[2], M = r.db.getWeekday() || s.weekday, W = A.domain(), E = W[0], P = W[1];
1594
+ if (H(E, P, a, o) <= Ot)
1595
+ switch (o) {
1596
+ case "millisecond":
1597
+ i.ticks(ue.every(a));
1598
+ break;
1599
+ case "second":
1600
+ i.ticks(le.every(a));
1601
+ break;
1602
+ case "minute":
1603
+ i.ticks(ce.every(a));
1604
+ break;
1605
+ case "hour":
1606
+ i.ticks(oe.every(a));
1607
+ break;
1608
+ case "day":
1609
+ i.ticks(ae.every(a));
1610
+ break;
1611
+ case "week":
1612
+ i.ticks(ge[M].every(a));
1613
+ break;
1614
+ case "month":
1615
+ i.ticks(se.every(a));
1616
+ break;
1617
+ }
1618
+ }
1619
+ }
1620
+ z.append("g").attr("class", "grid").attr("transform", "translate(" + h + ", " + b + ")").call(i).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
1621
+ }
1622
+ }
1623
+ d(G, "makeGrid");
1624
+ function I(h, b) {
1625
+ let v = 0;
1626
+ const p = Object.keys(_).map((m) => [m, _[m]]);
1627
+ z.append("g").selectAll("text").data(p).enter().append(function(m) {
1628
+ const c = m[0].split(rn.lineBreakRegex), f = -(c.length - 1) / 2, u = Y.createElementNS("http://www.w3.org/2000/svg", "text");
1629
+ u.setAttribute("dy", f + "em");
1630
+ for (const [x, i] of c.entries()) {
1631
+ const a = Y.createElementNS("http://www.w3.org/2000/svg", "tspan");
1632
+ a.setAttribute("alignment-baseline", "central"), a.setAttribute("x", "10"), x > 0 && a.setAttribute("dy", "1em"), a.textContent = i, u.appendChild(a);
1633
+ }
1634
+ return u;
1635
+ }).attr("x", 10).attr("y", function(m, c) {
1636
+ if (c > 0)
1637
+ for (let f = 0; f < c; f++)
1638
+ return v += p[c - 1][1], m[1] * h / 2 + v * h + b;
1639
+ else
1640
+ return m[1] * h / 2 + b;
1641
+ }).attr("font-size", s.sectionFontSize).attr("class", function(m) {
1642
+ for (const [c, f] of F.entries())
1643
+ if (m[0] === f)
1644
+ return "sectionTitle sectionTitle" + c % s.numberSectionStyles;
1645
+ return "sectionTitle";
1646
+ });
1647
+ }
1648
+ d(I, "vertLabels");
1649
+ function g(h, b, v, p) {
1650
+ const m = r.db.getTodayMarker();
1651
+ if (m === "off")
1652
+ return;
1653
+ const c = z.append("g").attr("class", "today"), f = /* @__PURE__ */ new Date(), u = c.append("line");
1654
+ u.attr("x1", A(f) + h).attr("x2", A(f) + h).attr("y1", s.titleTopMargin).attr("y2", p - s.titleTopMargin).attr("class", "today"), m !== "" && u.attr("style", m.replace(/,/g, ";"));
1655
+ }
1656
+ d(g, "drawToday");
1657
+ function y(h) {
1658
+ const b = {}, v = [];
1659
+ for (let p = 0, m = h.length; p < m; ++p)
1660
+ Object.prototype.hasOwnProperty.call(b, h[p]) || (b[h[p]] = !0, v.push(h[p]));
1661
+ return v;
1662
+ }
1663
+ d(y, "checkUnique");
1664
+ }, "draw"), Mi = {
1665
+ setConf: $i,
1666
+ draw: Di
1667
+ }, Si = /* @__PURE__ */ d((t) => `
1668
+ .mermaid-main-font {
1669
+ font-family: ${t.fontFamily};
1670
+ }
1671
+
1672
+ .exclude-range {
1673
+ fill: ${t.excludeBkgColor};
1674
+ }
1675
+
1676
+ .section {
1677
+ stroke: none;
1678
+ opacity: 0.2;
1679
+ }
1680
+
1681
+ .section0 {
1682
+ fill: ${t.sectionBkgColor};
1683
+ }
1684
+
1685
+ .section2 {
1686
+ fill: ${t.sectionBkgColor2};
1687
+ }
1688
+
1689
+ .section1,
1690
+ .section3 {
1691
+ fill: ${t.altSectionBkgColor};
1692
+ opacity: 0.2;
1693
+ }
1694
+
1695
+ .sectionTitle0 {
1696
+ fill: ${t.titleColor};
1697
+ }
1698
+
1699
+ .sectionTitle1 {
1700
+ fill: ${t.titleColor};
1701
+ }
1702
+
1703
+ .sectionTitle2 {
1704
+ fill: ${t.titleColor};
1705
+ }
1706
+
1707
+ .sectionTitle3 {
1708
+ fill: ${t.titleColor};
1709
+ }
1710
+
1711
+ .sectionTitle {
1712
+ text-anchor: start;
1713
+ font-family: ${t.fontFamily};
1714
+ }
1715
+
1716
+
1717
+ /* Grid and axis */
1718
+
1719
+ .grid .tick {
1720
+ stroke: ${t.gridColor};
1721
+ opacity: 0.8;
1722
+ shape-rendering: crispEdges;
1723
+ }
1724
+
1725
+ .grid .tick text {
1726
+ font-family: ${t.fontFamily};
1727
+ fill: ${t.textColor};
1728
+ }
1729
+
1730
+ .grid path {
1731
+ stroke-width: 0;
1732
+ }
1733
+
1734
+
1735
+ /* Today line */
1736
+
1737
+ .today {
1738
+ fill: none;
1739
+ stroke: ${t.todayLineColor};
1740
+ stroke-width: 2px;
1741
+ }
1742
+
1743
+
1744
+ /* Task styling */
1745
+
1746
+ /* Default task */
1747
+
1748
+ .task {
1749
+ stroke-width: 2;
1750
+ }
1751
+
1752
+ .taskText {
1753
+ text-anchor: middle;
1754
+ font-family: ${t.fontFamily};
1755
+ }
1756
+
1757
+ .taskTextOutsideRight {
1758
+ fill: ${t.taskTextDarkColor};
1759
+ text-anchor: start;
1760
+ font-family: ${t.fontFamily};
1761
+ }
1762
+
1763
+ .taskTextOutsideLeft {
1764
+ fill: ${t.taskTextDarkColor};
1765
+ text-anchor: end;
1766
+ }
1767
+
1768
+
1769
+ /* Special case clickable */
1770
+
1771
+ .task.clickable {
1772
+ cursor: pointer;
1773
+ }
1774
+
1775
+ .taskText.clickable {
1776
+ cursor: pointer;
1777
+ fill: ${t.taskTextClickableColor} !important;
1778
+ font-weight: bold;
1779
+ }
1780
+
1781
+ .taskTextOutsideLeft.clickable {
1782
+ cursor: pointer;
1783
+ fill: ${t.taskTextClickableColor} !important;
1784
+ font-weight: bold;
1785
+ }
1786
+
1787
+ .taskTextOutsideRight.clickable {
1788
+ cursor: pointer;
1789
+ fill: ${t.taskTextClickableColor} !important;
1790
+ font-weight: bold;
1791
+ }
1792
+
1793
+
1794
+ /* Specific task settings for the sections*/
1795
+
1796
+ .taskText0,
1797
+ .taskText1,
1798
+ .taskText2,
1799
+ .taskText3 {
1800
+ fill: ${t.taskTextColor};
1801
+ }
1802
+
1803
+ .task0,
1804
+ .task1,
1805
+ .task2,
1806
+ .task3 {
1807
+ fill: ${t.taskBkgColor};
1808
+ stroke: ${t.taskBorderColor};
1809
+ }
1810
+
1811
+ .taskTextOutside0,
1812
+ .taskTextOutside2
1813
+ {
1814
+ fill: ${t.taskTextOutsideColor};
1815
+ }
1816
+
1817
+ .taskTextOutside1,
1818
+ .taskTextOutside3 {
1819
+ fill: ${t.taskTextOutsideColor};
1820
+ }
1821
+
1822
+
1823
+ /* Active task */
1824
+
1825
+ .active0,
1826
+ .active1,
1827
+ .active2,
1828
+ .active3 {
1829
+ fill: ${t.activeTaskBkgColor};
1830
+ stroke: ${t.activeTaskBorderColor};
1831
+ }
1832
+
1833
+ .activeText0,
1834
+ .activeText1,
1835
+ .activeText2,
1836
+ .activeText3 {
1837
+ fill: ${t.taskTextDarkColor} !important;
1838
+ }
1839
+
1840
+
1841
+ /* Completed task */
1842
+
1843
+ .done0,
1844
+ .done1,
1845
+ .done2,
1846
+ .done3 {
1847
+ stroke: ${t.doneTaskBorderColor};
1848
+ fill: ${t.doneTaskBkgColor};
1849
+ stroke-width: 2;
1850
+ }
1851
+
1852
+ .doneText0,
1853
+ .doneText1,
1854
+ .doneText2,
1855
+ .doneText3 {
1856
+ fill: ${t.taskTextDarkColor} !important;
1857
+ }
1858
+
1859
+
1860
+ /* Tasks on the critical line */
1861
+
1862
+ .crit0,
1863
+ .crit1,
1864
+ .crit2,
1865
+ .crit3 {
1866
+ stroke: ${t.critBorderColor};
1867
+ fill: ${t.critBkgColor};
1868
+ stroke-width: 2;
1869
+ }
1870
+
1871
+ .activeCrit0,
1872
+ .activeCrit1,
1873
+ .activeCrit2,
1874
+ .activeCrit3 {
1875
+ stroke: ${t.critBorderColor};
1876
+ fill: ${t.activeTaskBkgColor};
1877
+ stroke-width: 2;
1878
+ }
1879
+
1880
+ .doneCrit0,
1881
+ .doneCrit1,
1882
+ .doneCrit2,
1883
+ .doneCrit3 {
1884
+ stroke: ${t.critBorderColor};
1885
+ fill: ${t.doneTaskBkgColor};
1886
+ stroke-width: 2;
1887
+ cursor: pointer;
1888
+ shape-rendering: crispEdges;
1889
+ }
1890
+
1891
+ .milestone {
1892
+ transform: rotate(45deg) scale(0.8,0.8);
1893
+ }
1894
+
1895
+ .milestoneText {
1896
+ font-style: italic;
1897
+ }
1898
+ .doneCritText0,
1899
+ .doneCritText1,
1900
+ .doneCritText2,
1901
+ .doneCritText3 {
1902
+ fill: ${t.taskTextDarkColor} !important;
1903
+ }
1904
+
1905
+ .vert {
1906
+ stroke: ${t.vertLineColor};
1907
+ }
1908
+
1909
+ .vertText {
1910
+ font-size: 15px;
1911
+ text-anchor: middle;
1912
+ fill: ${t.vertLineColor} !important;
1913
+ }
1914
+
1915
+ .activeCritText0,
1916
+ .activeCritText1,
1917
+ .activeCritText2,
1918
+ .activeCritText3 {
1919
+ fill: ${t.taskTextDarkColor} !important;
1920
+ }
1921
+
1922
+ .titleText {
1923
+ text-anchor: middle;
1924
+ font-size: 18px;
1925
+ fill: ${t.titleColor || t.textColor};
1926
+ font-family: ${t.fontFamily};
1927
+ }
1928
+ `, "getStyles"), Ci = Si, Ai = {
1929
+ parser: Hn,
1930
+ db: wi,
1931
+ renderer: Mi,
1932
+ styles: Ci
1933
+ };
1934
+ export {
1935
+ Ai as diagram
1936
+ };