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