local-operator-ui 0.9.2 → 0.10.1
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.
- package/out/main/index.jsc +0 -0
- package/out/preload/index.jsc +0 -0
- package/out/renderer/assets/_basePickBy-B5zFlqYH.js +195 -0
- package/out/renderer/assets/_baseUniq-BIR69pjE.js +835 -0
- package/out/renderer/assets/arc-vi2cZvnf.js +131 -0
- package/out/renderer/assets/architectureDiagram-IEHRJDOE-DChvv_dX.js +8653 -0
- package/out/renderer/assets/blockDiagram-JOT3LUYC-CEFfNRQ0.js +3585 -0
- package/out/renderer/assets/c4Diagram-VJAJSXHY-CMcq-0y4.js +2487 -0
- package/out/renderer/assets/channel-DxrUxepG.js +7 -0
- package/out/renderer/assets/chunk-4BMEZGHF-CLG9UTTy.js +16 -0
- package/out/renderer/assets/chunk-A2AXSNBT-OvwzTsRA.js +1827 -0
- package/out/renderer/assets/chunk-AEK57VVT-BNwaQxQ1.js +1953 -0
- package/out/renderer/assets/chunk-D6G4REZN-9hk0KigE.js +108 -0
- package/out/renderer/assets/chunk-RZ5BOZE2-BAS8OFkl.js +34 -0
- package/out/renderer/assets/chunk-XZIHB7SX-BBBrevk8.js +19 -0
- package/out/renderer/assets/classDiagram-GIVACNV2-B26ENMdv.js +21 -0
- package/out/renderer/assets/classDiagram-v2-COTLJTTW-B26ENMdv.js +21 -0
- package/out/renderer/assets/clone-BnNWUSJZ.js +8 -0
- package/out/renderer/assets/cytoscape.esm-C0AOj4uS.js +30062 -0
- package/out/renderer/assets/dagre-OKDRZEBW-CrmhwUSU.js +695 -0
- package/out/renderer/assets/diagram-SSKATNLV-BdqHkj-I.js +304 -0
- package/out/renderer/assets/diagram-VNBRO52H-CKrL77xr.js +193 -0
- package/out/renderer/assets/erDiagram-Q7BY3M3F-Tt0aLhGI.js +1160 -0
- package/out/renderer/assets/flowDiagram-4HSFHLVR-CcH5VigW.js +2324 -0
- package/out/renderer/assets/{fonts-Bx8fKQfu.js → fonts-Dt5cFjOU.js} +178 -178
- package/out/renderer/assets/ganttDiagram-APWFNJXF-Bi0xeYEe.js +2500 -0
- package/out/renderer/assets/gitGraphDiagram-7IBYFJ6S-CGwSvQwC.js +1204 -0
- package/out/renderer/assets/graph-Db6INjYz.js +424 -0
- package/out/renderer/assets/{index-DtFlp8rf.js → index-Bfd-2Oc6.js} +2 -2
- package/out/renderer/assets/{index-Cf8ixUbJ.js → index-CtRI8g3Q.js} +104853 -76337
- package/out/renderer/assets/{index-n_d5-ePx.js → index-DiYn4yiw.js} +2 -2
- package/out/renderer/assets/{index-0vP6mKPB.css → index-Dtwjgp5_.css} +9 -0
- package/out/renderer/assets/infoDiagram-PH2N3AL5-Ge-A0ZLx.js +33 -0
- package/out/renderer/assets/{installer-Cn81GyOR.js → installer-lVyomCxI.js} +1 -1
- package/out/renderer/assets/journeyDiagram-U35MCT3I-D_NUNOvR.js +1199 -0
- package/out/renderer/assets/kanban-definition-NDS4AKOZ-klQOxYYr.js +1046 -0
- package/out/renderer/assets/layout-s692bBPh.js +2060 -0
- package/out/renderer/assets/mindmap-definition-ALO5MXBD-CTAoaran.js +5836 -0
- package/out/renderer/assets/pieDiagram-IB7DONF6-C2fGlnMA.js +239 -0
- package/out/renderer/assets/quadrantDiagram-7GDLP6J5-BHT2tkE6.js +1340 -0
- package/out/renderer/assets/radar-MK3ICKWK-DgJ2QYDL.js +16935 -0
- package/out/renderer/assets/requirementDiagram-KVF5MWMF-PPbRo3RD.js +1163 -0
- package/out/renderer/assets/sankeyDiagram-QLVOVGJD-DqyHobM6.js +1201 -0
- package/out/renderer/assets/sequenceDiagram-X6HHIX6F-BLS88slX.js +3415 -0
- package/out/renderer/assets/stateDiagram-DGXRK772-Dy2hiNJa.js +467 -0
- package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-DjXWM0hu.js +21 -0
- package/out/renderer/assets/timeline-definition-BDJGKUSR-lE2dNCpN.js +1223 -0
- package/out/renderer/assets/xychartDiagram-VJFVF3MP-DfYmDcNz.js +1800 -0
- package/out/renderer/index.html +5 -5
- package/out/renderer/installer.html +2 -2
- package/package.json +4 -1
|
@@ -0,0 +1,2500 @@
|
|
|
1
|
+
import { b5 as Rgb, b6 as rgbConvert, b7 as define, b8 as extend, b9 as Color, ba as nogamma, bb as hue, _ as __name, g as getAccDescription, s as setAccDescription, t as getDiagramTitle, q as setDiagramTitle, a as getAccTitle, b as setAccTitle, c as getConfig2, d as select, bc as time, bd as min, be as max, e as configureSvgSize, a2 as linear, bf as dayjs2, l as log, bg as timeFormat, bh as timeMonth, bi as timeSunday, bj as timeSaturday, bk as timeFriday, bl as timeThursday, bm as timeWednesday, bn as timeTuesday, bo as timeMonday, bp as timeDay, bq as timeHour, br as timeMinute, bs as second, bt as millisecond, k as common_default, j as distExports, z as clear, u as utils_default } from "./index-CtRI8g3Q.js";
|
|
2
|
+
import { g as getDefaultExportFromCjs } from "./fonts-Dt5cFjOU.js";
|
|
3
|
+
function identity(x) {
|
|
4
|
+
return x;
|
|
5
|
+
}
|
|
6
|
+
var top = 1, right = 2, bottom = 3, left = 4, epsilon = 1e-6;
|
|
7
|
+
function translateX(x) {
|
|
8
|
+
return "translate(" + x + ",0)";
|
|
9
|
+
}
|
|
10
|
+
function translateY(y) {
|
|
11
|
+
return "translate(0," + y + ")";
|
|
12
|
+
}
|
|
13
|
+
function number(scale) {
|
|
14
|
+
return (d) => +scale(d);
|
|
15
|
+
}
|
|
16
|
+
function center(scale, offset) {
|
|
17
|
+
offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;
|
|
18
|
+
if (scale.round()) offset = Math.round(offset);
|
|
19
|
+
return (d) => +scale(d) + offset;
|
|
20
|
+
}
|
|
21
|
+
function entering() {
|
|
22
|
+
return !this.__axis;
|
|
23
|
+
}
|
|
24
|
+
function axis(orient, scale) {
|
|
25
|
+
var tickArguments = [], tickValues = null, tickFormat = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k = orient === top || orient === left ? -1 : 1, x = orient === left || orient === right ? "x" : "y", transform = orient === top || orient === bottom ? translateX : translateY;
|
|
26
|
+
function axis2(context) {
|
|
27
|
+
var values = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain() : tickValues, format = tickFormat == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity : tickFormat, spacing = Math.max(tickSizeInner, 0) + tickPadding, range = scale.range(), range0 = +range[0] + offset, range1 = +range[range.length - 1] + offset, position = (scale.bandwidth ? center : number)(scale.copy(), offset), selection = context.selection ? context.selection() : context, path = selection.selectAll(".domain").data([null]), tick = selection.selectAll(".tick").data(values, scale).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line = tick.select("line"), text = tick.select("text");
|
|
28
|
+
path = path.merge(path.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor"));
|
|
29
|
+
tick = tick.merge(tickEnter);
|
|
30
|
+
line = line.merge(tickEnter.append("line").attr("stroke", "currentColor").attr(x + "2", k * tickSizeInner));
|
|
31
|
+
text = text.merge(tickEnter.append("text").attr("fill", "currentColor").attr(x, k * spacing).attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em"));
|
|
32
|
+
if (context !== selection) {
|
|
33
|
+
path = path.transition(context);
|
|
34
|
+
tick = tick.transition(context);
|
|
35
|
+
line = line.transition(context);
|
|
36
|
+
text = text.transition(context);
|
|
37
|
+
tickExit = tickExit.transition(context).attr("opacity", epsilon).attr("transform", function(d) {
|
|
38
|
+
return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute("transform");
|
|
39
|
+
});
|
|
40
|
+
tickEnter.attr("opacity", epsilon).attr("transform", function(d) {
|
|
41
|
+
var p = this.parentNode.__axis;
|
|
42
|
+
return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
tickExit.remove();
|
|
46
|
+
path.attr("d", orient === left || orient === right ? tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1 : tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1);
|
|
47
|
+
tick.attr("opacity", 1).attr("transform", function(d) {
|
|
48
|
+
return transform(position(d) + offset);
|
|
49
|
+
});
|
|
50
|
+
line.attr(x + "2", k * tickSizeInner);
|
|
51
|
+
text.attr(x, k * spacing).text(format);
|
|
52
|
+
selection.filter(entering).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle");
|
|
53
|
+
selection.each(function() {
|
|
54
|
+
this.__axis = position;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
axis2.scale = function(_) {
|
|
58
|
+
return arguments.length ? (scale = _, axis2) : scale;
|
|
59
|
+
};
|
|
60
|
+
axis2.ticks = function() {
|
|
61
|
+
return tickArguments = Array.from(arguments), axis2;
|
|
62
|
+
};
|
|
63
|
+
axis2.tickArguments = function(_) {
|
|
64
|
+
return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis2) : tickArguments.slice();
|
|
65
|
+
};
|
|
66
|
+
axis2.tickValues = function(_) {
|
|
67
|
+
return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis2) : tickValues && tickValues.slice();
|
|
68
|
+
};
|
|
69
|
+
axis2.tickFormat = function(_) {
|
|
70
|
+
return arguments.length ? (tickFormat = _, axis2) : tickFormat;
|
|
71
|
+
};
|
|
72
|
+
axis2.tickSize = function(_) {
|
|
73
|
+
return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis2) : tickSizeInner;
|
|
74
|
+
};
|
|
75
|
+
axis2.tickSizeInner = function(_) {
|
|
76
|
+
return arguments.length ? (tickSizeInner = +_, axis2) : tickSizeInner;
|
|
77
|
+
};
|
|
78
|
+
axis2.tickSizeOuter = function(_) {
|
|
79
|
+
return arguments.length ? (tickSizeOuter = +_, axis2) : tickSizeOuter;
|
|
80
|
+
};
|
|
81
|
+
axis2.tickPadding = function(_) {
|
|
82
|
+
return arguments.length ? (tickPadding = +_, axis2) : tickPadding;
|
|
83
|
+
};
|
|
84
|
+
axis2.offset = function(_) {
|
|
85
|
+
return arguments.length ? (offset = +_, axis2) : offset;
|
|
86
|
+
};
|
|
87
|
+
return axis2;
|
|
88
|
+
}
|
|
89
|
+
function axisTop(scale) {
|
|
90
|
+
return axis(top, scale);
|
|
91
|
+
}
|
|
92
|
+
function axisBottom(scale) {
|
|
93
|
+
return axis(bottom, scale);
|
|
94
|
+
}
|
|
95
|
+
const radians = Math.PI / 180;
|
|
96
|
+
const degrees = 180 / Math.PI;
|
|
97
|
+
const K = 18, Xn = 0.96422, Yn = 1, Zn = 0.82521, t0 = 4 / 29, t1 = 6 / 29, t2 = 3 * t1 * t1, t3 = t1 * t1 * t1;
|
|
98
|
+
function labConvert(o) {
|
|
99
|
+
if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
|
|
100
|
+
if (o instanceof Hcl) return hcl2lab(o);
|
|
101
|
+
if (!(o instanceof Rgb)) o = rgbConvert(o);
|
|
102
|
+
var r = rgb2lrgb(o.r), g = rgb2lrgb(o.g), b = rgb2lrgb(o.b), y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
|
|
103
|
+
if (r === g && g === b) x = z = y;
|
|
104
|
+
else {
|
|
105
|
+
x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
|
|
106
|
+
z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
|
|
107
|
+
}
|
|
108
|
+
return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
|
|
109
|
+
}
|
|
110
|
+
function lab(l, a, b, opacity) {
|
|
111
|
+
return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
|
|
112
|
+
}
|
|
113
|
+
function Lab(l, a, b, opacity) {
|
|
114
|
+
this.l = +l;
|
|
115
|
+
this.a = +a;
|
|
116
|
+
this.b = +b;
|
|
117
|
+
this.opacity = +opacity;
|
|
118
|
+
}
|
|
119
|
+
define(Lab, lab, extend(Color, {
|
|
120
|
+
brighter(k) {
|
|
121
|
+
return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
122
|
+
},
|
|
123
|
+
darker(k) {
|
|
124
|
+
return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
|
|
125
|
+
},
|
|
126
|
+
rgb() {
|
|
127
|
+
var y = (this.l + 16) / 116, x = isNaN(this.a) ? y : y + this.a / 500, z = isNaN(this.b) ? y : y - this.b / 200;
|
|
128
|
+
x = Xn * lab2xyz(x);
|
|
129
|
+
y = Yn * lab2xyz(y);
|
|
130
|
+
z = Zn * lab2xyz(z);
|
|
131
|
+
return new Rgb(
|
|
132
|
+
lrgb2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
|
|
133
|
+
lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.033454 * z),
|
|
134
|
+
lrgb2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
|
|
135
|
+
this.opacity
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}));
|
|
139
|
+
function xyz2lab(t) {
|
|
140
|
+
return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
|
|
141
|
+
}
|
|
142
|
+
function lab2xyz(t) {
|
|
143
|
+
return t > t1 ? t * t * t : t2 * (t - t0);
|
|
144
|
+
}
|
|
145
|
+
function lrgb2rgb(x) {
|
|
146
|
+
return 255 * (x <= 31308e-7 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
|
|
147
|
+
}
|
|
148
|
+
function rgb2lrgb(x) {
|
|
149
|
+
return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
150
|
+
}
|
|
151
|
+
function hclConvert(o) {
|
|
152
|
+
if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
|
|
153
|
+
if (!(o instanceof Lab)) o = labConvert(o);
|
|
154
|
+
if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
|
|
155
|
+
var h = Math.atan2(o.b, o.a) * degrees;
|
|
156
|
+
return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
|
|
157
|
+
}
|
|
158
|
+
function hcl$1(h, c, l, opacity) {
|
|
159
|
+
return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
|
|
160
|
+
}
|
|
161
|
+
function Hcl(h, c, l, opacity) {
|
|
162
|
+
this.h = +h;
|
|
163
|
+
this.c = +c;
|
|
164
|
+
this.l = +l;
|
|
165
|
+
this.opacity = +opacity;
|
|
166
|
+
}
|
|
167
|
+
function hcl2lab(o) {
|
|
168
|
+
if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
|
|
169
|
+
var h = o.h * radians;
|
|
170
|
+
return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
|
|
171
|
+
}
|
|
172
|
+
define(Hcl, hcl$1, extend(Color, {
|
|
173
|
+
brighter(k) {
|
|
174
|
+
return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
|
|
175
|
+
},
|
|
176
|
+
darker(k) {
|
|
177
|
+
return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
|
|
178
|
+
},
|
|
179
|
+
rgb() {
|
|
180
|
+
return hcl2lab(this).rgb();
|
|
181
|
+
}
|
|
182
|
+
}));
|
|
183
|
+
function hcl(hue2) {
|
|
184
|
+
return function(start, end) {
|
|
185
|
+
var h = hue2((start = hcl$1(start)).h, (end = hcl$1(end)).h), c = nogamma(start.c, end.c), l = nogamma(start.l, end.l), opacity = nogamma(start.opacity, end.opacity);
|
|
186
|
+
return function(t) {
|
|
187
|
+
start.h = h(t);
|
|
188
|
+
start.c = c(t);
|
|
189
|
+
start.l = l(t);
|
|
190
|
+
start.opacity = opacity(t);
|
|
191
|
+
return start + "";
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
const interpolateHcl = hcl(hue);
|
|
196
|
+
var isoWeek$1 = { exports: {} };
|
|
197
|
+
var isoWeek = isoWeek$1.exports;
|
|
198
|
+
var hasRequiredIsoWeek;
|
|
199
|
+
function requireIsoWeek() {
|
|
200
|
+
if (hasRequiredIsoWeek) return isoWeek$1.exports;
|
|
201
|
+
hasRequiredIsoWeek = 1;
|
|
202
|
+
(function(module, exports) {
|
|
203
|
+
!function(e, t) {
|
|
204
|
+
module.exports = t();
|
|
205
|
+
}(isoWeek, function() {
|
|
206
|
+
var e = "day";
|
|
207
|
+
return function(t, i, s) {
|
|
208
|
+
var a = function(t4) {
|
|
209
|
+
return t4.add(4 - t4.isoWeekday(), e);
|
|
210
|
+
}, d = i.prototype;
|
|
211
|
+
d.isoWeekYear = function() {
|
|
212
|
+
return a(this).year();
|
|
213
|
+
}, d.isoWeek = function(t4) {
|
|
214
|
+
if (!this.$utils().u(t4)) return this.add(7 * (t4 - this.isoWeek()), e);
|
|
215
|
+
var i2, d2, n2, o, r = a(this), u = (i2 = this.isoWeekYear(), d2 = this.$u, n2 = (d2 ? s.utc : s)().year(i2).startOf("year"), o = 4 - n2.isoWeekday(), n2.isoWeekday() > 4 && (o += 7), n2.add(o, e));
|
|
216
|
+
return r.diff(u, "week") + 1;
|
|
217
|
+
}, d.isoWeekday = function(e2) {
|
|
218
|
+
return this.$utils().u(e2) ? this.day() || 7 : this.day(this.day() % 7 ? e2 : e2 - 7);
|
|
219
|
+
};
|
|
220
|
+
var n = d.startOf;
|
|
221
|
+
d.startOf = function(e2, t4) {
|
|
222
|
+
var i2 = this.$utils(), s2 = !!i2.u(t4) || t4;
|
|
223
|
+
return "isoweek" === i2.p(e2) ? s2 ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : n.bind(this)(e2, t4);
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
});
|
|
227
|
+
})(isoWeek$1);
|
|
228
|
+
return isoWeek$1.exports;
|
|
229
|
+
}
|
|
230
|
+
var isoWeekExports = requireIsoWeek();
|
|
231
|
+
const dayjsIsoWeek = /* @__PURE__ */ getDefaultExportFromCjs(isoWeekExports);
|
|
232
|
+
var customParseFormat$1 = { exports: {} };
|
|
233
|
+
var customParseFormat = customParseFormat$1.exports;
|
|
234
|
+
var hasRequiredCustomParseFormat;
|
|
235
|
+
function requireCustomParseFormat() {
|
|
236
|
+
if (hasRequiredCustomParseFormat) return customParseFormat$1.exports;
|
|
237
|
+
hasRequiredCustomParseFormat = 1;
|
|
238
|
+
(function(module, exports) {
|
|
239
|
+
!function(e, t) {
|
|
240
|
+
module.exports = t();
|
|
241
|
+
}(customParseFormat, function() {
|
|
242
|
+
var e = { 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" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) {
|
|
243
|
+
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
244
|
+
};
|
|
245
|
+
var f = function(e2) {
|
|
246
|
+
return function(t4) {
|
|
247
|
+
this[e2] = +t4;
|
|
248
|
+
};
|
|
249
|
+
}, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
|
|
250
|
+
(this.zone || (this.zone = {})).offset = function(e3) {
|
|
251
|
+
if (!e3) return 0;
|
|
252
|
+
if ("Z" === e3) return 0;
|
|
253
|
+
var t4 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t4[1] + (+t4[2] || 0);
|
|
254
|
+
return 0 === n2 ? 0 : "+" === t4[0] ? -n2 : n2;
|
|
255
|
+
}(e2);
|
|
256
|
+
}], u = function(e2) {
|
|
257
|
+
var t4 = s[e2];
|
|
258
|
+
return t4 && (t4.indexOf ? t4 : t4.s.concat(t4.f));
|
|
259
|
+
}, d = function(e2, t4) {
|
|
260
|
+
var n2, r2 = s.meridiem;
|
|
261
|
+
if (r2) {
|
|
262
|
+
for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t4)) > -1) {
|
|
263
|
+
n2 = i2 > 12;
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
} else n2 = e2 === (t4 ? "pm" : "PM");
|
|
267
|
+
return n2;
|
|
268
|
+
}, c = { A: [o, function(e2) {
|
|
269
|
+
this.afternoon = d(e2, false);
|
|
270
|
+
}], a: [o, function(e2) {
|
|
271
|
+
this.afternoon = d(e2, true);
|
|
272
|
+
}], Q: [n, function(e2) {
|
|
273
|
+
this.month = 3 * (e2 - 1) + 1;
|
|
274
|
+
}], S: [n, function(e2) {
|
|
275
|
+
this.milliseconds = 100 * +e2;
|
|
276
|
+
}], SS: [r, function(e2) {
|
|
277
|
+
this.milliseconds = 10 * +e2;
|
|
278
|
+
}], SSS: [/\d{3}/, function(e2) {
|
|
279
|
+
this.milliseconds = +e2;
|
|
280
|
+
}], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) {
|
|
281
|
+
var t4 = s.ordinal, n2 = e2.match(/\d+/);
|
|
282
|
+
if (this.day = n2[0], t4) for (var r2 = 1; r2 <= 31; r2 += 1) t4(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
|
|
283
|
+
}], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) {
|
|
284
|
+
var t4 = u("months"), n2 = (u("monthsShort") || t4.map(function(e3) {
|
|
285
|
+
return e3.slice(0, 3);
|
|
286
|
+
})).indexOf(e2) + 1;
|
|
287
|
+
if (n2 < 1) throw new Error();
|
|
288
|
+
this.month = n2 % 12 || n2;
|
|
289
|
+
}], MMMM: [o, function(e2) {
|
|
290
|
+
var t4 = u("months").indexOf(e2) + 1;
|
|
291
|
+
if (t4 < 1) throw new Error();
|
|
292
|
+
this.month = t4 % 12 || t4;
|
|
293
|
+
}], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) {
|
|
294
|
+
this.year = a(e2);
|
|
295
|
+
}], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h };
|
|
296
|
+
function l(n2) {
|
|
297
|
+
var r2, i2;
|
|
298
|
+
r2 = n2, i2 = s && s.formats;
|
|
299
|
+
for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t4, n3, r3) {
|
|
300
|
+
var o3 = r3 && r3.toUpperCase();
|
|
301
|
+
return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t5, n4) {
|
|
302
|
+
return t5 || n4.slice(1);
|
|
303
|
+
});
|
|
304
|
+
})).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
305
|
+
var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l2 = u2 && u2[1];
|
|
306
|
+
o2[f2] = l2 ? { regex: d2, parser: l2 } : h2.replace(/^\[|\]$/g, "");
|
|
307
|
+
}
|
|
308
|
+
return function(e2) {
|
|
309
|
+
for (var t4 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
|
|
310
|
+
var i3 = o2[n3];
|
|
311
|
+
if ("string" == typeof i3) r3 += i3.length;
|
|
312
|
+
else {
|
|
313
|
+
var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0];
|
|
314
|
+
f3.call(t4, u3), e2 = e2.replace(u3, "");
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return function(e3) {
|
|
318
|
+
var t5 = e3.afternoon;
|
|
319
|
+
if (void 0 !== t5) {
|
|
320
|
+
var n4 = e3.hours;
|
|
321
|
+
t5 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
|
|
322
|
+
}
|
|
323
|
+
}(t4), t4;
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
return function(e2, t4, n2) {
|
|
327
|
+
n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear);
|
|
328
|
+
var r2 = t4.prototype, i2 = r2.parse;
|
|
329
|
+
r2.parse = function(e3) {
|
|
330
|
+
var t5 = e3.date, r3 = e3.utc, o2 = e3.args;
|
|
331
|
+
this.$u = r3;
|
|
332
|
+
var a2 = o2[1];
|
|
333
|
+
if ("string" == typeof a2) {
|
|
334
|
+
var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2];
|
|
335
|
+
h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = function(e4, t6, n3, r4) {
|
|
336
|
+
try {
|
|
337
|
+
if (["x", "X"].indexOf(t6) > -1) return new Date(("X" === t6 ? 1e3 : 1) * e4);
|
|
338
|
+
var i3 = l(t6)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0;
|
|
339
|
+
o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth());
|
|
340
|
+
var D, w2 = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0;
|
|
341
|
+
return c3 ? new Date(Date.UTC(p, v, Y, w2, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w2, g, y, L)) : (D = new Date(p, v, Y, w2, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D);
|
|
342
|
+
} catch (e5) {
|
|
343
|
+
return /* @__PURE__ */ new Date("");
|
|
344
|
+
}
|
|
345
|
+
}(t5, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t5 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
|
|
346
|
+
} else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) {
|
|
347
|
+
o2[1] = a2[m - 1];
|
|
348
|
+
var M = n2.apply(this, o2);
|
|
349
|
+
if (M.isValid()) {
|
|
350
|
+
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
m === c2 && (this.$d = /* @__PURE__ */ new Date(""));
|
|
354
|
+
}
|
|
355
|
+
else i2.call(this, e3);
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
});
|
|
359
|
+
})(customParseFormat$1);
|
|
360
|
+
return customParseFormat$1.exports;
|
|
361
|
+
}
|
|
362
|
+
var customParseFormatExports = requireCustomParseFormat();
|
|
363
|
+
const dayjsCustomParseFormat = /* @__PURE__ */ getDefaultExportFromCjs(customParseFormatExports);
|
|
364
|
+
var advancedFormat$1 = { exports: {} };
|
|
365
|
+
var advancedFormat = advancedFormat$1.exports;
|
|
366
|
+
var hasRequiredAdvancedFormat;
|
|
367
|
+
function requireAdvancedFormat() {
|
|
368
|
+
if (hasRequiredAdvancedFormat) return advancedFormat$1.exports;
|
|
369
|
+
hasRequiredAdvancedFormat = 1;
|
|
370
|
+
(function(module, exports) {
|
|
371
|
+
!function(e, t) {
|
|
372
|
+
module.exports = t();
|
|
373
|
+
}(advancedFormat, function() {
|
|
374
|
+
return function(e, t) {
|
|
375
|
+
var r = t.prototype, n = r.format;
|
|
376
|
+
r.format = function(e2) {
|
|
377
|
+
var t4 = this, r2 = this.$locale();
|
|
378
|
+
if (!this.isValid()) return n.bind(this)(e2);
|
|
379
|
+
var s = this.$utils(), a = (e2 || "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(e3) {
|
|
380
|
+
switch (e3) {
|
|
381
|
+
case "Q":
|
|
382
|
+
return Math.ceil((t4.$M + 1) / 3);
|
|
383
|
+
case "Do":
|
|
384
|
+
return r2.ordinal(t4.$D);
|
|
385
|
+
case "gggg":
|
|
386
|
+
return t4.weekYear();
|
|
387
|
+
case "GGGG":
|
|
388
|
+
return t4.isoWeekYear();
|
|
389
|
+
case "wo":
|
|
390
|
+
return r2.ordinal(t4.week(), "W");
|
|
391
|
+
case "w":
|
|
392
|
+
case "ww":
|
|
393
|
+
return s.s(t4.week(), "w" === e3 ? 1 : 2, "0");
|
|
394
|
+
case "W":
|
|
395
|
+
case "WW":
|
|
396
|
+
return s.s(t4.isoWeek(), "W" === e3 ? 1 : 2, "0");
|
|
397
|
+
case "k":
|
|
398
|
+
case "kk":
|
|
399
|
+
return s.s(String(0 === t4.$H ? 24 : t4.$H), "k" === e3 ? 1 : 2, "0");
|
|
400
|
+
case "X":
|
|
401
|
+
return Math.floor(t4.$d.getTime() / 1e3);
|
|
402
|
+
case "x":
|
|
403
|
+
return t4.$d.getTime();
|
|
404
|
+
case "z":
|
|
405
|
+
return "[" + t4.offsetName() + "]";
|
|
406
|
+
case "zzz":
|
|
407
|
+
return "[" + t4.offsetName("long") + "]";
|
|
408
|
+
default:
|
|
409
|
+
return e3;
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
return n.bind(this)(a);
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
});
|
|
416
|
+
})(advancedFormat$1);
|
|
417
|
+
return advancedFormat$1.exports;
|
|
418
|
+
}
|
|
419
|
+
var advancedFormatExports = requireAdvancedFormat();
|
|
420
|
+
const dayjsAdvancedFormat = /* @__PURE__ */ getDefaultExportFromCjs(advancedFormatExports);
|
|
421
|
+
var parser = function() {
|
|
422
|
+
var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
|
|
423
|
+
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
|
|
424
|
+
return o2;
|
|
425
|
+
}, "o"), $V0 = [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], $V1 = [1, 26], $V2 = [1, 27], $V3 = [1, 28], $V4 = [1, 29], $V5 = [1, 30], $V6 = [1, 31], $V7 = [1, 32], $V8 = [1, 33], $V9 = [1, 34], $Va = [1, 9], $Vb = [1, 10], $Vc = [1, 11], $Vd = [1, 12], $Ve = [1, 13], $Vf = [1, 14], $Vg = [1, 15], $Vh = [1, 16], $Vi = [1, 19], $Vj = [1, 20], $Vk = [1, 21], $Vl = [1, 22], $Vm = [1, 23], $Vn = [1, 25], $Vo = [1, 35];
|
|
426
|
+
var parser2 = {
|
|
427
|
+
trace: /* @__PURE__ */ __name(function trace() {
|
|
428
|
+
}, "trace"),
|
|
429
|
+
yy: {},
|
|
430
|
+
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 },
|
|
431
|
+
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" },
|
|
432
|
+
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]],
|
|
433
|
+
performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
434
|
+
var $0 = $$.length - 1;
|
|
435
|
+
switch (yystate) {
|
|
436
|
+
case 1:
|
|
437
|
+
return $$[$0 - 1];
|
|
438
|
+
case 2:
|
|
439
|
+
this.$ = [];
|
|
440
|
+
break;
|
|
441
|
+
case 3:
|
|
442
|
+
$$[$0 - 1].push($$[$0]);
|
|
443
|
+
this.$ = $$[$0 - 1];
|
|
444
|
+
break;
|
|
445
|
+
case 4:
|
|
446
|
+
case 5:
|
|
447
|
+
this.$ = $$[$0];
|
|
448
|
+
break;
|
|
449
|
+
case 6:
|
|
450
|
+
case 7:
|
|
451
|
+
this.$ = [];
|
|
452
|
+
break;
|
|
453
|
+
case 8:
|
|
454
|
+
yy.setWeekday("monday");
|
|
455
|
+
break;
|
|
456
|
+
case 9:
|
|
457
|
+
yy.setWeekday("tuesday");
|
|
458
|
+
break;
|
|
459
|
+
case 10:
|
|
460
|
+
yy.setWeekday("wednesday");
|
|
461
|
+
break;
|
|
462
|
+
case 11:
|
|
463
|
+
yy.setWeekday("thursday");
|
|
464
|
+
break;
|
|
465
|
+
case 12:
|
|
466
|
+
yy.setWeekday("friday");
|
|
467
|
+
break;
|
|
468
|
+
case 13:
|
|
469
|
+
yy.setWeekday("saturday");
|
|
470
|
+
break;
|
|
471
|
+
case 14:
|
|
472
|
+
yy.setWeekday("sunday");
|
|
473
|
+
break;
|
|
474
|
+
case 15:
|
|
475
|
+
yy.setWeekend("friday");
|
|
476
|
+
break;
|
|
477
|
+
case 16:
|
|
478
|
+
yy.setWeekend("saturday");
|
|
479
|
+
break;
|
|
480
|
+
case 17:
|
|
481
|
+
yy.setDateFormat($$[$0].substr(11));
|
|
482
|
+
this.$ = $$[$0].substr(11);
|
|
483
|
+
break;
|
|
484
|
+
case 18:
|
|
485
|
+
yy.enableInclusiveEndDates();
|
|
486
|
+
this.$ = $$[$0].substr(18);
|
|
487
|
+
break;
|
|
488
|
+
case 19:
|
|
489
|
+
yy.TopAxis();
|
|
490
|
+
this.$ = $$[$0].substr(8);
|
|
491
|
+
break;
|
|
492
|
+
case 20:
|
|
493
|
+
yy.setAxisFormat($$[$0].substr(11));
|
|
494
|
+
this.$ = $$[$0].substr(11);
|
|
495
|
+
break;
|
|
496
|
+
case 21:
|
|
497
|
+
yy.setTickInterval($$[$0].substr(13));
|
|
498
|
+
this.$ = $$[$0].substr(13);
|
|
499
|
+
break;
|
|
500
|
+
case 22:
|
|
501
|
+
yy.setExcludes($$[$0].substr(9));
|
|
502
|
+
this.$ = $$[$0].substr(9);
|
|
503
|
+
break;
|
|
504
|
+
case 23:
|
|
505
|
+
yy.setIncludes($$[$0].substr(9));
|
|
506
|
+
this.$ = $$[$0].substr(9);
|
|
507
|
+
break;
|
|
508
|
+
case 24:
|
|
509
|
+
yy.setTodayMarker($$[$0].substr(12));
|
|
510
|
+
this.$ = $$[$0].substr(12);
|
|
511
|
+
break;
|
|
512
|
+
case 27:
|
|
513
|
+
yy.setDiagramTitle($$[$0].substr(6));
|
|
514
|
+
this.$ = $$[$0].substr(6);
|
|
515
|
+
break;
|
|
516
|
+
case 28:
|
|
517
|
+
this.$ = $$[$0].trim();
|
|
518
|
+
yy.setAccTitle(this.$);
|
|
519
|
+
break;
|
|
520
|
+
case 29:
|
|
521
|
+
case 30:
|
|
522
|
+
this.$ = $$[$0].trim();
|
|
523
|
+
yy.setAccDescription(this.$);
|
|
524
|
+
break;
|
|
525
|
+
case 31:
|
|
526
|
+
yy.addSection($$[$0].substr(8));
|
|
527
|
+
this.$ = $$[$0].substr(8);
|
|
528
|
+
break;
|
|
529
|
+
case 33:
|
|
530
|
+
yy.addTask($$[$0 - 1], $$[$0]);
|
|
531
|
+
this.$ = "task";
|
|
532
|
+
break;
|
|
533
|
+
case 34:
|
|
534
|
+
this.$ = $$[$0 - 1];
|
|
535
|
+
yy.setClickEvent($$[$0 - 1], $$[$0], null);
|
|
536
|
+
break;
|
|
537
|
+
case 35:
|
|
538
|
+
this.$ = $$[$0 - 2];
|
|
539
|
+
yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
|
|
540
|
+
break;
|
|
541
|
+
case 36:
|
|
542
|
+
this.$ = $$[$0 - 2];
|
|
543
|
+
yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null);
|
|
544
|
+
yy.setLink($$[$0 - 2], $$[$0]);
|
|
545
|
+
break;
|
|
546
|
+
case 37:
|
|
547
|
+
this.$ = $$[$0 - 3];
|
|
548
|
+
yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
|
|
549
|
+
yy.setLink($$[$0 - 3], $$[$0]);
|
|
550
|
+
break;
|
|
551
|
+
case 38:
|
|
552
|
+
this.$ = $$[$0 - 2];
|
|
553
|
+
yy.setClickEvent($$[$0 - 2], $$[$0], null);
|
|
554
|
+
yy.setLink($$[$0 - 2], $$[$0 - 1]);
|
|
555
|
+
break;
|
|
556
|
+
case 39:
|
|
557
|
+
this.$ = $$[$0 - 3];
|
|
558
|
+
yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]);
|
|
559
|
+
yy.setLink($$[$0 - 3], $$[$0 - 2]);
|
|
560
|
+
break;
|
|
561
|
+
case 40:
|
|
562
|
+
this.$ = $$[$0 - 1];
|
|
563
|
+
yy.setLink($$[$0 - 1], $$[$0]);
|
|
564
|
+
break;
|
|
565
|
+
case 41:
|
|
566
|
+
case 47:
|
|
567
|
+
this.$ = $$[$0 - 1] + " " + $$[$0];
|
|
568
|
+
break;
|
|
569
|
+
case 42:
|
|
570
|
+
case 43:
|
|
571
|
+
case 45:
|
|
572
|
+
this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
|
|
573
|
+
break;
|
|
574
|
+
case 44:
|
|
575
|
+
case 46:
|
|
576
|
+
this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
}, "anonymous"),
|
|
580
|
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: 18, 20: $V8, 21: $V9, 22: $Va, 23: $Vb, 24: $Vc, 25: $Vd, 26: $Ve, 27: $Vf, 28: $Vg, 29: $Vh, 30: $Vi, 31: $Vj, 33: $Vk, 35: $Vl, 36: $Vm, 37: 24, 38: $Vn, 40: $Vo }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 36, 11: 17, 12: $V1, 13: $V2, 14: $V3, 15: $V4, 16: $V5, 17: $V6, 18: $V7, 19: 18, 20: $V8, 21: $V9, 22: $Va, 23: $Vb, 24: $Vc, 25: $Vd, 26: $Ve, 27: $Vf, 28: $Vg, 29: $Vh, 30: $Vi, 31: $Vj, 33: $Vk, 35: $Vl, 36: $Vm, 37: 24, 38: $Vn, 40: $Vo }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 17]), o($V0, [2, 18]), o($V0, [2, 19]), o($V0, [2, 20]), o($V0, [2, 21]), o($V0, [2, 22]), o($V0, [2, 23]), o($V0, [2, 24]), o($V0, [2, 25]), o($V0, [2, 26]), o($V0, [2, 27]), { 32: [1, 37] }, { 34: [1, 38] }, o($V0, [2, 30]), o($V0, [2, 31]), o($V0, [2, 32]), { 39: [1, 39] }, o($V0, [2, 8]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 11]), o($V0, [2, 12]), o($V0, [2, 13]), o($V0, [2, 14]), o($V0, [2, 15]), o($V0, [2, 16]), { 41: [1, 40], 43: [1, 41] }, o($V0, [2, 4]), o($V0, [2, 28]), o($V0, [2, 29]), o($V0, [2, 33]), o($V0, [2, 34], { 42: [1, 42], 43: [1, 43] }), o($V0, [2, 40], { 41: [1, 44] }), o($V0, [2, 35], { 43: [1, 45] }), o($V0, [2, 36]), o($V0, [2, 38], { 42: [1, 46] }), o($V0, [2, 37]), o($V0, [2, 39])],
|
|
581
|
+
defaultActions: {},
|
|
582
|
+
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
583
|
+
if (hash.recoverable) {
|
|
584
|
+
this.trace(str);
|
|
585
|
+
} else {
|
|
586
|
+
var error = new Error(str);
|
|
587
|
+
error.hash = hash;
|
|
588
|
+
throw error;
|
|
589
|
+
}
|
|
590
|
+
}, "parseError"),
|
|
591
|
+
parse: /* @__PURE__ */ __name(function parse(input) {
|
|
592
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
|
593
|
+
var args = lstack.slice.call(arguments, 1);
|
|
594
|
+
var lexer2 = Object.create(this.lexer);
|
|
595
|
+
var sharedState = { yy: {} };
|
|
596
|
+
for (var k in this.yy) {
|
|
597
|
+
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
598
|
+
sharedState.yy[k] = this.yy[k];
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
lexer2.setInput(input, sharedState.yy);
|
|
602
|
+
sharedState.yy.lexer = lexer2;
|
|
603
|
+
sharedState.yy.parser = this;
|
|
604
|
+
if (typeof lexer2.yylloc == "undefined") {
|
|
605
|
+
lexer2.yylloc = {};
|
|
606
|
+
}
|
|
607
|
+
var yyloc = lexer2.yylloc;
|
|
608
|
+
lstack.push(yyloc);
|
|
609
|
+
var ranges = lexer2.options && lexer2.options.ranges;
|
|
610
|
+
if (typeof sharedState.yy.parseError === "function") {
|
|
611
|
+
this.parseError = sharedState.yy.parseError;
|
|
612
|
+
} else {
|
|
613
|
+
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
614
|
+
}
|
|
615
|
+
function popStack(n) {
|
|
616
|
+
stack.length = stack.length - 2 * n;
|
|
617
|
+
vstack.length = vstack.length - n;
|
|
618
|
+
lstack.length = lstack.length - n;
|
|
619
|
+
}
|
|
620
|
+
__name(popStack, "popStack");
|
|
621
|
+
function lex() {
|
|
622
|
+
var token;
|
|
623
|
+
token = tstack.pop() || lexer2.lex() || EOF;
|
|
624
|
+
if (typeof token !== "number") {
|
|
625
|
+
if (token instanceof Array) {
|
|
626
|
+
tstack = token;
|
|
627
|
+
token = tstack.pop();
|
|
628
|
+
}
|
|
629
|
+
token = self.symbols_[token] || token;
|
|
630
|
+
}
|
|
631
|
+
return token;
|
|
632
|
+
}
|
|
633
|
+
__name(lex, "lex");
|
|
634
|
+
var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
|
635
|
+
while (true) {
|
|
636
|
+
state = stack[stack.length - 1];
|
|
637
|
+
if (this.defaultActions[state]) {
|
|
638
|
+
action = this.defaultActions[state];
|
|
639
|
+
} else {
|
|
640
|
+
if (symbol === null || typeof symbol == "undefined") {
|
|
641
|
+
symbol = lex();
|
|
642
|
+
}
|
|
643
|
+
action = table[state] && table[state][symbol];
|
|
644
|
+
}
|
|
645
|
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
646
|
+
var errStr = "";
|
|
647
|
+
expected = [];
|
|
648
|
+
for (p in table[state]) {
|
|
649
|
+
if (this.terminals_[p] && p > TERROR) {
|
|
650
|
+
expected.push("'" + this.terminals_[p] + "'");
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
if (lexer2.showPosition) {
|
|
654
|
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
655
|
+
} else {
|
|
656
|
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
657
|
+
}
|
|
658
|
+
this.parseError(errStr, {
|
|
659
|
+
text: lexer2.match,
|
|
660
|
+
token: this.terminals_[symbol] || symbol,
|
|
661
|
+
line: lexer2.yylineno,
|
|
662
|
+
loc: yyloc,
|
|
663
|
+
expected
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
if (action[0] instanceof Array && action.length > 1) {
|
|
667
|
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
668
|
+
}
|
|
669
|
+
switch (action[0]) {
|
|
670
|
+
case 1:
|
|
671
|
+
stack.push(symbol);
|
|
672
|
+
vstack.push(lexer2.yytext);
|
|
673
|
+
lstack.push(lexer2.yylloc);
|
|
674
|
+
stack.push(action[1]);
|
|
675
|
+
symbol = null;
|
|
676
|
+
{
|
|
677
|
+
yyleng = lexer2.yyleng;
|
|
678
|
+
yytext = lexer2.yytext;
|
|
679
|
+
yylineno = lexer2.yylineno;
|
|
680
|
+
yyloc = lexer2.yylloc;
|
|
681
|
+
}
|
|
682
|
+
break;
|
|
683
|
+
case 2:
|
|
684
|
+
len = this.productions_[action[1]][1];
|
|
685
|
+
yyval.$ = vstack[vstack.length - len];
|
|
686
|
+
yyval._$ = {
|
|
687
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
688
|
+
last_line: lstack[lstack.length - 1].last_line,
|
|
689
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
690
|
+
last_column: lstack[lstack.length - 1].last_column
|
|
691
|
+
};
|
|
692
|
+
if (ranges) {
|
|
693
|
+
yyval._$.range = [
|
|
694
|
+
lstack[lstack.length - (len || 1)].range[0],
|
|
695
|
+
lstack[lstack.length - 1].range[1]
|
|
696
|
+
];
|
|
697
|
+
}
|
|
698
|
+
r = this.performAction.apply(yyval, [
|
|
699
|
+
yytext,
|
|
700
|
+
yyleng,
|
|
701
|
+
yylineno,
|
|
702
|
+
sharedState.yy,
|
|
703
|
+
action[1],
|
|
704
|
+
vstack,
|
|
705
|
+
lstack
|
|
706
|
+
].concat(args));
|
|
707
|
+
if (typeof r !== "undefined") {
|
|
708
|
+
return r;
|
|
709
|
+
}
|
|
710
|
+
if (len) {
|
|
711
|
+
stack = stack.slice(0, -1 * len * 2);
|
|
712
|
+
vstack = vstack.slice(0, -1 * len);
|
|
713
|
+
lstack = lstack.slice(0, -1 * len);
|
|
714
|
+
}
|
|
715
|
+
stack.push(this.productions_[action[1]][0]);
|
|
716
|
+
vstack.push(yyval.$);
|
|
717
|
+
lstack.push(yyval._$);
|
|
718
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
719
|
+
stack.push(newState);
|
|
720
|
+
break;
|
|
721
|
+
case 3:
|
|
722
|
+
return true;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
return true;
|
|
726
|
+
}, "parse")
|
|
727
|
+
};
|
|
728
|
+
var lexer = /* @__PURE__ */ function() {
|
|
729
|
+
var lexer2 = {
|
|
730
|
+
EOF: 1,
|
|
731
|
+
parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
|
|
732
|
+
if (this.yy.parser) {
|
|
733
|
+
this.yy.parser.parseError(str, hash);
|
|
734
|
+
} else {
|
|
735
|
+
throw new Error(str);
|
|
736
|
+
}
|
|
737
|
+
}, "parseError"),
|
|
738
|
+
// resets the lexer, sets new input
|
|
739
|
+
setInput: /* @__PURE__ */ __name(function(input, yy) {
|
|
740
|
+
this.yy = yy || this.yy || {};
|
|
741
|
+
this._input = input;
|
|
742
|
+
this._more = this._backtrack = this.done = false;
|
|
743
|
+
this.yylineno = this.yyleng = 0;
|
|
744
|
+
this.yytext = this.matched = this.match = "";
|
|
745
|
+
this.conditionStack = ["INITIAL"];
|
|
746
|
+
this.yylloc = {
|
|
747
|
+
first_line: 1,
|
|
748
|
+
first_column: 0,
|
|
749
|
+
last_line: 1,
|
|
750
|
+
last_column: 0
|
|
751
|
+
};
|
|
752
|
+
if (this.options.ranges) {
|
|
753
|
+
this.yylloc.range = [0, 0];
|
|
754
|
+
}
|
|
755
|
+
this.offset = 0;
|
|
756
|
+
return this;
|
|
757
|
+
}, "setInput"),
|
|
758
|
+
// consumes and returns one char from the input
|
|
759
|
+
input: /* @__PURE__ */ __name(function() {
|
|
760
|
+
var ch = this._input[0];
|
|
761
|
+
this.yytext += ch;
|
|
762
|
+
this.yyleng++;
|
|
763
|
+
this.offset++;
|
|
764
|
+
this.match += ch;
|
|
765
|
+
this.matched += ch;
|
|
766
|
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
767
|
+
if (lines) {
|
|
768
|
+
this.yylineno++;
|
|
769
|
+
this.yylloc.last_line++;
|
|
770
|
+
} else {
|
|
771
|
+
this.yylloc.last_column++;
|
|
772
|
+
}
|
|
773
|
+
if (this.options.ranges) {
|
|
774
|
+
this.yylloc.range[1]++;
|
|
775
|
+
}
|
|
776
|
+
this._input = this._input.slice(1);
|
|
777
|
+
return ch;
|
|
778
|
+
}, "input"),
|
|
779
|
+
// unshifts one char (or a string) into the input
|
|
780
|
+
unput: /* @__PURE__ */ __name(function(ch) {
|
|
781
|
+
var len = ch.length;
|
|
782
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
783
|
+
this._input = ch + this._input;
|
|
784
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
785
|
+
this.offset -= len;
|
|
786
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
787
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
|
788
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
789
|
+
if (lines.length - 1) {
|
|
790
|
+
this.yylineno -= lines.length - 1;
|
|
791
|
+
}
|
|
792
|
+
var r = this.yylloc.range;
|
|
793
|
+
this.yylloc = {
|
|
794
|
+
first_line: this.yylloc.first_line,
|
|
795
|
+
last_line: this.yylineno + 1,
|
|
796
|
+
first_column: this.yylloc.first_column,
|
|
797
|
+
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
798
|
+
};
|
|
799
|
+
if (this.options.ranges) {
|
|
800
|
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
801
|
+
}
|
|
802
|
+
this.yyleng = this.yytext.length;
|
|
803
|
+
return this;
|
|
804
|
+
}, "unput"),
|
|
805
|
+
// When called from action, caches matched text and appends it on next action
|
|
806
|
+
more: /* @__PURE__ */ __name(function() {
|
|
807
|
+
this._more = true;
|
|
808
|
+
return this;
|
|
809
|
+
}, "more"),
|
|
810
|
+
// 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.
|
|
811
|
+
reject: /* @__PURE__ */ __name(function() {
|
|
812
|
+
if (this.options.backtrack_lexer) {
|
|
813
|
+
this._backtrack = true;
|
|
814
|
+
} else {
|
|
815
|
+
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).\n" + this.showPosition(), {
|
|
816
|
+
text: "",
|
|
817
|
+
token: null,
|
|
818
|
+
line: this.yylineno
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
return this;
|
|
822
|
+
}, "reject"),
|
|
823
|
+
// retain first n characters of the match
|
|
824
|
+
less: /* @__PURE__ */ __name(function(n) {
|
|
825
|
+
this.unput(this.match.slice(n));
|
|
826
|
+
}, "less"),
|
|
827
|
+
// displays already matched input, i.e. for error messages
|
|
828
|
+
pastInput: /* @__PURE__ */ __name(function() {
|
|
829
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
830
|
+
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
831
|
+
}, "pastInput"),
|
|
832
|
+
// displays upcoming input, i.e. for error messages
|
|
833
|
+
upcomingInput: /* @__PURE__ */ __name(function() {
|
|
834
|
+
var next = this.match;
|
|
835
|
+
if (next.length < 20) {
|
|
836
|
+
next += this._input.substr(0, 20 - next.length);
|
|
837
|
+
}
|
|
838
|
+
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
839
|
+
}, "upcomingInput"),
|
|
840
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
841
|
+
showPosition: /* @__PURE__ */ __name(function() {
|
|
842
|
+
var pre = this.pastInput();
|
|
843
|
+
var c = new Array(pre.length + 1).join("-");
|
|
844
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
845
|
+
}, "showPosition"),
|
|
846
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
847
|
+
test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
|
|
848
|
+
var token, lines, backup;
|
|
849
|
+
if (this.options.backtrack_lexer) {
|
|
850
|
+
backup = {
|
|
851
|
+
yylineno: this.yylineno,
|
|
852
|
+
yylloc: {
|
|
853
|
+
first_line: this.yylloc.first_line,
|
|
854
|
+
last_line: this.last_line,
|
|
855
|
+
first_column: this.yylloc.first_column,
|
|
856
|
+
last_column: this.yylloc.last_column
|
|
857
|
+
},
|
|
858
|
+
yytext: this.yytext,
|
|
859
|
+
match: this.match,
|
|
860
|
+
matches: this.matches,
|
|
861
|
+
matched: this.matched,
|
|
862
|
+
yyleng: this.yyleng,
|
|
863
|
+
offset: this.offset,
|
|
864
|
+
_more: this._more,
|
|
865
|
+
_input: this._input,
|
|
866
|
+
yy: this.yy,
|
|
867
|
+
conditionStack: this.conditionStack.slice(0),
|
|
868
|
+
done: this.done
|
|
869
|
+
};
|
|
870
|
+
if (this.options.ranges) {
|
|
871
|
+
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
875
|
+
if (lines) {
|
|
876
|
+
this.yylineno += lines.length;
|
|
877
|
+
}
|
|
878
|
+
this.yylloc = {
|
|
879
|
+
first_line: this.yylloc.last_line,
|
|
880
|
+
last_line: this.yylineno + 1,
|
|
881
|
+
first_column: this.yylloc.last_column,
|
|
882
|
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
883
|
+
};
|
|
884
|
+
this.yytext += match[0];
|
|
885
|
+
this.match += match[0];
|
|
886
|
+
this.matches = match;
|
|
887
|
+
this.yyleng = this.yytext.length;
|
|
888
|
+
if (this.options.ranges) {
|
|
889
|
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
890
|
+
}
|
|
891
|
+
this._more = false;
|
|
892
|
+
this._backtrack = false;
|
|
893
|
+
this._input = this._input.slice(match[0].length);
|
|
894
|
+
this.matched += match[0];
|
|
895
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
896
|
+
if (this.done && this._input) {
|
|
897
|
+
this.done = false;
|
|
898
|
+
}
|
|
899
|
+
if (token) {
|
|
900
|
+
return token;
|
|
901
|
+
} else if (this._backtrack) {
|
|
902
|
+
for (var k in backup) {
|
|
903
|
+
this[k] = backup[k];
|
|
904
|
+
}
|
|
905
|
+
return false;
|
|
906
|
+
}
|
|
907
|
+
return false;
|
|
908
|
+
}, "test_match"),
|
|
909
|
+
// return next match in input
|
|
910
|
+
next: /* @__PURE__ */ __name(function() {
|
|
911
|
+
if (this.done) {
|
|
912
|
+
return this.EOF;
|
|
913
|
+
}
|
|
914
|
+
if (!this._input) {
|
|
915
|
+
this.done = true;
|
|
916
|
+
}
|
|
917
|
+
var token, match, tempMatch, index;
|
|
918
|
+
if (!this._more) {
|
|
919
|
+
this.yytext = "";
|
|
920
|
+
this.match = "";
|
|
921
|
+
}
|
|
922
|
+
var rules = this._currentRules();
|
|
923
|
+
for (var i = 0; i < rules.length; i++) {
|
|
924
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
925
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
926
|
+
match = tempMatch;
|
|
927
|
+
index = i;
|
|
928
|
+
if (this.options.backtrack_lexer) {
|
|
929
|
+
token = this.test_match(tempMatch, rules[i]);
|
|
930
|
+
if (token !== false) {
|
|
931
|
+
return token;
|
|
932
|
+
} else if (this._backtrack) {
|
|
933
|
+
match = false;
|
|
934
|
+
continue;
|
|
935
|
+
} else {
|
|
936
|
+
return false;
|
|
937
|
+
}
|
|
938
|
+
} else if (!this.options.flex) {
|
|
939
|
+
break;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
if (match) {
|
|
944
|
+
token = this.test_match(match, rules[index]);
|
|
945
|
+
if (token !== false) {
|
|
946
|
+
return token;
|
|
947
|
+
}
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
if (this._input === "") {
|
|
951
|
+
return this.EOF;
|
|
952
|
+
} else {
|
|
953
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
954
|
+
text: "",
|
|
955
|
+
token: null,
|
|
956
|
+
line: this.yylineno
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
}, "next"),
|
|
960
|
+
// return next match that has a token
|
|
961
|
+
lex: /* @__PURE__ */ __name(function lex() {
|
|
962
|
+
var r = this.next();
|
|
963
|
+
if (r) {
|
|
964
|
+
return r;
|
|
965
|
+
} else {
|
|
966
|
+
return this.lex();
|
|
967
|
+
}
|
|
968
|
+
}, "lex"),
|
|
969
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
970
|
+
begin: /* @__PURE__ */ __name(function begin(condition) {
|
|
971
|
+
this.conditionStack.push(condition);
|
|
972
|
+
}, "begin"),
|
|
973
|
+
// pop the previously active lexer condition state off the condition stack
|
|
974
|
+
popState: /* @__PURE__ */ __name(function popState() {
|
|
975
|
+
var n = this.conditionStack.length - 1;
|
|
976
|
+
if (n > 0) {
|
|
977
|
+
return this.conditionStack.pop();
|
|
978
|
+
} else {
|
|
979
|
+
return this.conditionStack[0];
|
|
980
|
+
}
|
|
981
|
+
}, "popState"),
|
|
982
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
983
|
+
_currentRules: /* @__PURE__ */ __name(function _currentRules() {
|
|
984
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
985
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
986
|
+
} else {
|
|
987
|
+
return this.conditions["INITIAL"].rules;
|
|
988
|
+
}
|
|
989
|
+
}, "_currentRules"),
|
|
990
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
991
|
+
topState: /* @__PURE__ */ __name(function topState(n) {
|
|
992
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
993
|
+
if (n >= 0) {
|
|
994
|
+
return this.conditionStack[n];
|
|
995
|
+
} else {
|
|
996
|
+
return "INITIAL";
|
|
997
|
+
}
|
|
998
|
+
}, "topState"),
|
|
999
|
+
// alias for begin(condition)
|
|
1000
|
+
pushState: /* @__PURE__ */ __name(function pushState(condition) {
|
|
1001
|
+
this.begin(condition);
|
|
1002
|
+
}, "pushState"),
|
|
1003
|
+
// return the number of states currently on the stack
|
|
1004
|
+
stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
|
|
1005
|
+
return this.conditionStack.length;
|
|
1006
|
+
}, "stateStackSize"),
|
|
1007
|
+
options: { "case-insensitive": true },
|
|
1008
|
+
performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
1009
|
+
switch ($avoiding_name_collisions) {
|
|
1010
|
+
case 0:
|
|
1011
|
+
this.begin("open_directive");
|
|
1012
|
+
return "open_directive";
|
|
1013
|
+
case 1:
|
|
1014
|
+
this.begin("acc_title");
|
|
1015
|
+
return 31;
|
|
1016
|
+
case 2:
|
|
1017
|
+
this.popState();
|
|
1018
|
+
return "acc_title_value";
|
|
1019
|
+
case 3:
|
|
1020
|
+
this.begin("acc_descr");
|
|
1021
|
+
return 33;
|
|
1022
|
+
case 4:
|
|
1023
|
+
this.popState();
|
|
1024
|
+
return "acc_descr_value";
|
|
1025
|
+
case 5:
|
|
1026
|
+
this.begin("acc_descr_multiline");
|
|
1027
|
+
break;
|
|
1028
|
+
case 6:
|
|
1029
|
+
this.popState();
|
|
1030
|
+
break;
|
|
1031
|
+
case 7:
|
|
1032
|
+
return "acc_descr_multiline_value";
|
|
1033
|
+
case 8:
|
|
1034
|
+
break;
|
|
1035
|
+
case 9:
|
|
1036
|
+
break;
|
|
1037
|
+
case 10:
|
|
1038
|
+
break;
|
|
1039
|
+
case 11:
|
|
1040
|
+
return 10;
|
|
1041
|
+
case 12:
|
|
1042
|
+
break;
|
|
1043
|
+
case 13:
|
|
1044
|
+
break;
|
|
1045
|
+
case 14:
|
|
1046
|
+
this.begin("href");
|
|
1047
|
+
break;
|
|
1048
|
+
case 15:
|
|
1049
|
+
this.popState();
|
|
1050
|
+
break;
|
|
1051
|
+
case 16:
|
|
1052
|
+
return 43;
|
|
1053
|
+
case 17:
|
|
1054
|
+
this.begin("callbackname");
|
|
1055
|
+
break;
|
|
1056
|
+
case 18:
|
|
1057
|
+
this.popState();
|
|
1058
|
+
break;
|
|
1059
|
+
case 19:
|
|
1060
|
+
this.popState();
|
|
1061
|
+
this.begin("callbackargs");
|
|
1062
|
+
break;
|
|
1063
|
+
case 20:
|
|
1064
|
+
return 41;
|
|
1065
|
+
case 21:
|
|
1066
|
+
this.popState();
|
|
1067
|
+
break;
|
|
1068
|
+
case 22:
|
|
1069
|
+
return 42;
|
|
1070
|
+
case 23:
|
|
1071
|
+
this.begin("click");
|
|
1072
|
+
break;
|
|
1073
|
+
case 24:
|
|
1074
|
+
this.popState();
|
|
1075
|
+
break;
|
|
1076
|
+
case 25:
|
|
1077
|
+
return 40;
|
|
1078
|
+
case 26:
|
|
1079
|
+
return 4;
|
|
1080
|
+
case 27:
|
|
1081
|
+
return 22;
|
|
1082
|
+
case 28:
|
|
1083
|
+
return 23;
|
|
1084
|
+
case 29:
|
|
1085
|
+
return 24;
|
|
1086
|
+
case 30:
|
|
1087
|
+
return 25;
|
|
1088
|
+
case 31:
|
|
1089
|
+
return 26;
|
|
1090
|
+
case 32:
|
|
1091
|
+
return 28;
|
|
1092
|
+
case 33:
|
|
1093
|
+
return 27;
|
|
1094
|
+
case 34:
|
|
1095
|
+
return 29;
|
|
1096
|
+
case 35:
|
|
1097
|
+
return 12;
|
|
1098
|
+
case 36:
|
|
1099
|
+
return 13;
|
|
1100
|
+
case 37:
|
|
1101
|
+
return 14;
|
|
1102
|
+
case 38:
|
|
1103
|
+
return 15;
|
|
1104
|
+
case 39:
|
|
1105
|
+
return 16;
|
|
1106
|
+
case 40:
|
|
1107
|
+
return 17;
|
|
1108
|
+
case 41:
|
|
1109
|
+
return 18;
|
|
1110
|
+
case 42:
|
|
1111
|
+
return 20;
|
|
1112
|
+
case 43:
|
|
1113
|
+
return 21;
|
|
1114
|
+
case 44:
|
|
1115
|
+
return "date";
|
|
1116
|
+
case 45:
|
|
1117
|
+
return 30;
|
|
1118
|
+
case 46:
|
|
1119
|
+
return "accDescription";
|
|
1120
|
+
case 47:
|
|
1121
|
+
return 36;
|
|
1122
|
+
case 48:
|
|
1123
|
+
return 38;
|
|
1124
|
+
case 49:
|
|
1125
|
+
return 39;
|
|
1126
|
+
case 50:
|
|
1127
|
+
return ":";
|
|
1128
|
+
case 51:
|
|
1129
|
+
return 6;
|
|
1130
|
+
case 52:
|
|
1131
|
+
return "INVALID";
|
|
1132
|
+
}
|
|
1133
|
+
}, "anonymous"),
|
|
1134
|
+
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],
|
|
1135
|
+
conditions: { "acc_descr_multiline": { "rules": [6, 7], "inclusive": false }, "acc_descr": { "rules": [4], "inclusive": false }, "acc_title": { "rules": [2], "inclusive": false }, "callbackargs": { "rules": [21, 22], "inclusive": false }, "callbackname": { "rules": [18, 19, 20], "inclusive": false }, "href": { "rules": [15, 16], "inclusive": false }, "click": { "rules": [24, 25], "inclusive": false }, "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": true } }
|
|
1136
|
+
};
|
|
1137
|
+
return lexer2;
|
|
1138
|
+
}();
|
|
1139
|
+
parser2.lexer = lexer;
|
|
1140
|
+
function Parser() {
|
|
1141
|
+
this.yy = {};
|
|
1142
|
+
}
|
|
1143
|
+
__name(Parser, "Parser");
|
|
1144
|
+
Parser.prototype = parser2;
|
|
1145
|
+
parser2.Parser = Parser;
|
|
1146
|
+
return new Parser();
|
|
1147
|
+
}();
|
|
1148
|
+
parser.parser = parser;
|
|
1149
|
+
var gantt_default = parser;
|
|
1150
|
+
dayjs2.extend(dayjsIsoWeek);
|
|
1151
|
+
dayjs2.extend(dayjsCustomParseFormat);
|
|
1152
|
+
dayjs2.extend(dayjsAdvancedFormat);
|
|
1153
|
+
var WEEKEND_START_DAY = { friday: 5, saturday: 6 };
|
|
1154
|
+
var dateFormat = "";
|
|
1155
|
+
var axisFormat = "";
|
|
1156
|
+
var tickInterval = void 0;
|
|
1157
|
+
var todayMarker = "";
|
|
1158
|
+
var includes = [];
|
|
1159
|
+
var excludes = [];
|
|
1160
|
+
var links = /* @__PURE__ */ new Map();
|
|
1161
|
+
var sections = [];
|
|
1162
|
+
var tasks = [];
|
|
1163
|
+
var currentSection = "";
|
|
1164
|
+
var displayMode = "";
|
|
1165
|
+
var tags = ["active", "done", "crit", "milestone"];
|
|
1166
|
+
var funs = [];
|
|
1167
|
+
var inclusiveEndDates = false;
|
|
1168
|
+
var topAxis = false;
|
|
1169
|
+
var weekday = "sunday";
|
|
1170
|
+
var weekend = "saturday";
|
|
1171
|
+
var lastOrder = 0;
|
|
1172
|
+
var clear2 = /* @__PURE__ */ __name(function() {
|
|
1173
|
+
sections = [];
|
|
1174
|
+
tasks = [];
|
|
1175
|
+
currentSection = "";
|
|
1176
|
+
funs = [];
|
|
1177
|
+
taskCnt = 0;
|
|
1178
|
+
lastTask = void 0;
|
|
1179
|
+
lastTaskID = void 0;
|
|
1180
|
+
rawTasks = [];
|
|
1181
|
+
dateFormat = "";
|
|
1182
|
+
axisFormat = "";
|
|
1183
|
+
displayMode = "";
|
|
1184
|
+
tickInterval = void 0;
|
|
1185
|
+
todayMarker = "";
|
|
1186
|
+
includes = [];
|
|
1187
|
+
excludes = [];
|
|
1188
|
+
inclusiveEndDates = false;
|
|
1189
|
+
topAxis = false;
|
|
1190
|
+
lastOrder = 0;
|
|
1191
|
+
links = /* @__PURE__ */ new Map();
|
|
1192
|
+
clear();
|
|
1193
|
+
weekday = "sunday";
|
|
1194
|
+
weekend = "saturday";
|
|
1195
|
+
}, "clear");
|
|
1196
|
+
var setAxisFormat = /* @__PURE__ */ __name(function(txt) {
|
|
1197
|
+
axisFormat = txt;
|
|
1198
|
+
}, "setAxisFormat");
|
|
1199
|
+
var getAxisFormat = /* @__PURE__ */ __name(function() {
|
|
1200
|
+
return axisFormat;
|
|
1201
|
+
}, "getAxisFormat");
|
|
1202
|
+
var setTickInterval = /* @__PURE__ */ __name(function(txt) {
|
|
1203
|
+
tickInterval = txt;
|
|
1204
|
+
}, "setTickInterval");
|
|
1205
|
+
var getTickInterval = /* @__PURE__ */ __name(function() {
|
|
1206
|
+
return tickInterval;
|
|
1207
|
+
}, "getTickInterval");
|
|
1208
|
+
var setTodayMarker = /* @__PURE__ */ __name(function(txt) {
|
|
1209
|
+
todayMarker = txt;
|
|
1210
|
+
}, "setTodayMarker");
|
|
1211
|
+
var getTodayMarker = /* @__PURE__ */ __name(function() {
|
|
1212
|
+
return todayMarker;
|
|
1213
|
+
}, "getTodayMarker");
|
|
1214
|
+
var setDateFormat = /* @__PURE__ */ __name(function(txt) {
|
|
1215
|
+
dateFormat = txt;
|
|
1216
|
+
}, "setDateFormat");
|
|
1217
|
+
var enableInclusiveEndDates = /* @__PURE__ */ __name(function() {
|
|
1218
|
+
inclusiveEndDates = true;
|
|
1219
|
+
}, "enableInclusiveEndDates");
|
|
1220
|
+
var endDatesAreInclusive = /* @__PURE__ */ __name(function() {
|
|
1221
|
+
return inclusiveEndDates;
|
|
1222
|
+
}, "endDatesAreInclusive");
|
|
1223
|
+
var enableTopAxis = /* @__PURE__ */ __name(function() {
|
|
1224
|
+
topAxis = true;
|
|
1225
|
+
}, "enableTopAxis");
|
|
1226
|
+
var topAxisEnabled = /* @__PURE__ */ __name(function() {
|
|
1227
|
+
return topAxis;
|
|
1228
|
+
}, "topAxisEnabled");
|
|
1229
|
+
var setDisplayMode = /* @__PURE__ */ __name(function(txt) {
|
|
1230
|
+
displayMode = txt;
|
|
1231
|
+
}, "setDisplayMode");
|
|
1232
|
+
var getDisplayMode = /* @__PURE__ */ __name(function() {
|
|
1233
|
+
return displayMode;
|
|
1234
|
+
}, "getDisplayMode");
|
|
1235
|
+
var getDateFormat = /* @__PURE__ */ __name(function() {
|
|
1236
|
+
return dateFormat;
|
|
1237
|
+
}, "getDateFormat");
|
|
1238
|
+
var setIncludes = /* @__PURE__ */ __name(function(txt) {
|
|
1239
|
+
includes = txt.toLowerCase().split(/[\s,]+/);
|
|
1240
|
+
}, "setIncludes");
|
|
1241
|
+
var getIncludes = /* @__PURE__ */ __name(function() {
|
|
1242
|
+
return includes;
|
|
1243
|
+
}, "getIncludes");
|
|
1244
|
+
var setExcludes = /* @__PURE__ */ __name(function(txt) {
|
|
1245
|
+
excludes = txt.toLowerCase().split(/[\s,]+/);
|
|
1246
|
+
}, "setExcludes");
|
|
1247
|
+
var getExcludes = /* @__PURE__ */ __name(function() {
|
|
1248
|
+
return excludes;
|
|
1249
|
+
}, "getExcludes");
|
|
1250
|
+
var getLinks = /* @__PURE__ */ __name(function() {
|
|
1251
|
+
return links;
|
|
1252
|
+
}, "getLinks");
|
|
1253
|
+
var addSection = /* @__PURE__ */ __name(function(txt) {
|
|
1254
|
+
currentSection = txt;
|
|
1255
|
+
sections.push(txt);
|
|
1256
|
+
}, "addSection");
|
|
1257
|
+
var getSections = /* @__PURE__ */ __name(function() {
|
|
1258
|
+
return sections;
|
|
1259
|
+
}, "getSections");
|
|
1260
|
+
var getTasks = /* @__PURE__ */ __name(function() {
|
|
1261
|
+
let allItemsProcessed = compileTasks();
|
|
1262
|
+
const maxDepth = 10;
|
|
1263
|
+
let iterationCount = 0;
|
|
1264
|
+
while (!allItemsProcessed && iterationCount < maxDepth) {
|
|
1265
|
+
allItemsProcessed = compileTasks();
|
|
1266
|
+
iterationCount++;
|
|
1267
|
+
}
|
|
1268
|
+
tasks = rawTasks;
|
|
1269
|
+
return tasks;
|
|
1270
|
+
}, "getTasks");
|
|
1271
|
+
var isInvalidDate = /* @__PURE__ */ __name(function(date, dateFormat2, excludes2, includes2) {
|
|
1272
|
+
if (includes2.includes(date.format(dateFormat2.trim()))) {
|
|
1273
|
+
return false;
|
|
1274
|
+
}
|
|
1275
|
+
if (excludes2.includes("weekends") && (date.isoWeekday() === WEEKEND_START_DAY[weekend] || date.isoWeekday() === WEEKEND_START_DAY[weekend] + 1)) {
|
|
1276
|
+
return true;
|
|
1277
|
+
}
|
|
1278
|
+
if (excludes2.includes(date.format("dddd").toLowerCase())) {
|
|
1279
|
+
return true;
|
|
1280
|
+
}
|
|
1281
|
+
return excludes2.includes(date.format(dateFormat2.trim()));
|
|
1282
|
+
}, "isInvalidDate");
|
|
1283
|
+
var setWeekday = /* @__PURE__ */ __name(function(txt) {
|
|
1284
|
+
weekday = txt;
|
|
1285
|
+
}, "setWeekday");
|
|
1286
|
+
var getWeekday = /* @__PURE__ */ __name(function() {
|
|
1287
|
+
return weekday;
|
|
1288
|
+
}, "getWeekday");
|
|
1289
|
+
var setWeekend = /* @__PURE__ */ __name(function(startDay) {
|
|
1290
|
+
weekend = startDay;
|
|
1291
|
+
}, "setWeekend");
|
|
1292
|
+
var checkTaskDates = /* @__PURE__ */ __name(function(task, dateFormat2, excludes2, includes2) {
|
|
1293
|
+
if (!excludes2.length || task.manualEndTime) {
|
|
1294
|
+
return;
|
|
1295
|
+
}
|
|
1296
|
+
let startTime;
|
|
1297
|
+
if (task.startTime instanceof Date) {
|
|
1298
|
+
startTime = dayjs2(task.startTime);
|
|
1299
|
+
} else {
|
|
1300
|
+
startTime = dayjs2(task.startTime, dateFormat2, true);
|
|
1301
|
+
}
|
|
1302
|
+
startTime = startTime.add(1, "d");
|
|
1303
|
+
let originalEndTime;
|
|
1304
|
+
if (task.endTime instanceof Date) {
|
|
1305
|
+
originalEndTime = dayjs2(task.endTime);
|
|
1306
|
+
} else {
|
|
1307
|
+
originalEndTime = dayjs2(task.endTime, dateFormat2, true);
|
|
1308
|
+
}
|
|
1309
|
+
const [fixedEndTime, renderEndTime] = fixTaskDates(
|
|
1310
|
+
startTime,
|
|
1311
|
+
originalEndTime,
|
|
1312
|
+
dateFormat2,
|
|
1313
|
+
excludes2,
|
|
1314
|
+
includes2
|
|
1315
|
+
);
|
|
1316
|
+
task.endTime = fixedEndTime.toDate();
|
|
1317
|
+
task.renderEndTime = renderEndTime;
|
|
1318
|
+
}, "checkTaskDates");
|
|
1319
|
+
var fixTaskDates = /* @__PURE__ */ __name(function(startTime, endTime, dateFormat2, excludes2, includes2) {
|
|
1320
|
+
let invalid = false;
|
|
1321
|
+
let renderEndTime = null;
|
|
1322
|
+
while (startTime <= endTime) {
|
|
1323
|
+
if (!invalid) {
|
|
1324
|
+
renderEndTime = endTime.toDate();
|
|
1325
|
+
}
|
|
1326
|
+
invalid = isInvalidDate(startTime, dateFormat2, excludes2, includes2);
|
|
1327
|
+
if (invalid) {
|
|
1328
|
+
endTime = endTime.add(1, "d");
|
|
1329
|
+
}
|
|
1330
|
+
startTime = startTime.add(1, "d");
|
|
1331
|
+
}
|
|
1332
|
+
return [endTime, renderEndTime];
|
|
1333
|
+
}, "fixTaskDates");
|
|
1334
|
+
var getStartDate = /* @__PURE__ */ __name(function(prevTime, dateFormat2, str) {
|
|
1335
|
+
str = str.trim();
|
|
1336
|
+
const afterRePattern = /^after\s+(?<ids>[\d\w- ]+)/;
|
|
1337
|
+
const afterStatement = afterRePattern.exec(str);
|
|
1338
|
+
if (afterStatement !== null) {
|
|
1339
|
+
let latestTask = null;
|
|
1340
|
+
for (const id of afterStatement.groups.ids.split(" ")) {
|
|
1341
|
+
let task = findTaskById(id);
|
|
1342
|
+
if (task !== void 0 && (!latestTask || task.endTime > latestTask.endTime)) {
|
|
1343
|
+
latestTask = task;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
if (latestTask) {
|
|
1347
|
+
return latestTask.endTime;
|
|
1348
|
+
}
|
|
1349
|
+
const today = /* @__PURE__ */ new Date();
|
|
1350
|
+
today.setHours(0, 0, 0, 0);
|
|
1351
|
+
return today;
|
|
1352
|
+
}
|
|
1353
|
+
let mDate = dayjs2(str, dateFormat2.trim(), true);
|
|
1354
|
+
if (mDate.isValid()) {
|
|
1355
|
+
return mDate.toDate();
|
|
1356
|
+
} else {
|
|
1357
|
+
log.debug("Invalid date:" + str);
|
|
1358
|
+
log.debug("With date format:" + dateFormat2.trim());
|
|
1359
|
+
const d = new Date(str);
|
|
1360
|
+
if (d === void 0 || isNaN(d.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
|
|
1361
|
+
// huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
|
|
1362
|
+
// This can cause virtually infinite loops while rendering, so for the
|
|
1363
|
+
// purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
|
|
1364
|
+
// invalid.
|
|
1365
|
+
d.getFullYear() < -1e4 || d.getFullYear() > 1e4) {
|
|
1366
|
+
throw new Error("Invalid date:" + str);
|
|
1367
|
+
}
|
|
1368
|
+
return d;
|
|
1369
|
+
}
|
|
1370
|
+
}, "getStartDate");
|
|
1371
|
+
var parseDuration = /* @__PURE__ */ __name(function(str) {
|
|
1372
|
+
const statement = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(str.trim());
|
|
1373
|
+
if (statement !== null) {
|
|
1374
|
+
return [Number.parseFloat(statement[1]), statement[2]];
|
|
1375
|
+
}
|
|
1376
|
+
return [NaN, "ms"];
|
|
1377
|
+
}, "parseDuration");
|
|
1378
|
+
var getEndDate = /* @__PURE__ */ __name(function(prevTime, dateFormat2, str, inclusive = false) {
|
|
1379
|
+
str = str.trim();
|
|
1380
|
+
const untilRePattern = /^until\s+(?<ids>[\d\w- ]+)/;
|
|
1381
|
+
const untilStatement = untilRePattern.exec(str);
|
|
1382
|
+
if (untilStatement !== null) {
|
|
1383
|
+
let earliestTask = null;
|
|
1384
|
+
for (const id of untilStatement.groups.ids.split(" ")) {
|
|
1385
|
+
let task = findTaskById(id);
|
|
1386
|
+
if (task !== void 0 && (!earliestTask || task.startTime < earliestTask.startTime)) {
|
|
1387
|
+
earliestTask = task;
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
if (earliestTask) {
|
|
1391
|
+
return earliestTask.startTime;
|
|
1392
|
+
}
|
|
1393
|
+
const today = /* @__PURE__ */ new Date();
|
|
1394
|
+
today.setHours(0, 0, 0, 0);
|
|
1395
|
+
return today;
|
|
1396
|
+
}
|
|
1397
|
+
let parsedDate = dayjs2(str, dateFormat2.trim(), true);
|
|
1398
|
+
if (parsedDate.isValid()) {
|
|
1399
|
+
if (inclusive) {
|
|
1400
|
+
parsedDate = parsedDate.add(1, "d");
|
|
1401
|
+
}
|
|
1402
|
+
return parsedDate.toDate();
|
|
1403
|
+
}
|
|
1404
|
+
let endTime = dayjs2(prevTime);
|
|
1405
|
+
const [durationValue, durationUnit] = parseDuration(str);
|
|
1406
|
+
if (!Number.isNaN(durationValue)) {
|
|
1407
|
+
const newEndTime = endTime.add(durationValue, durationUnit);
|
|
1408
|
+
if (newEndTime.isValid()) {
|
|
1409
|
+
endTime = newEndTime;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
return endTime.toDate();
|
|
1413
|
+
}, "getEndDate");
|
|
1414
|
+
var taskCnt = 0;
|
|
1415
|
+
var parseId = /* @__PURE__ */ __name(function(idStr) {
|
|
1416
|
+
if (idStr === void 0) {
|
|
1417
|
+
taskCnt = taskCnt + 1;
|
|
1418
|
+
return "task" + taskCnt;
|
|
1419
|
+
}
|
|
1420
|
+
return idStr;
|
|
1421
|
+
}, "parseId");
|
|
1422
|
+
var compileData = /* @__PURE__ */ __name(function(prevTask, dataStr) {
|
|
1423
|
+
let ds;
|
|
1424
|
+
if (dataStr.substr(0, 1) === ":") {
|
|
1425
|
+
ds = dataStr.substr(1, dataStr.length);
|
|
1426
|
+
} else {
|
|
1427
|
+
ds = dataStr;
|
|
1428
|
+
}
|
|
1429
|
+
const data = ds.split(",");
|
|
1430
|
+
const task = {};
|
|
1431
|
+
getTaskTags(data, task, tags);
|
|
1432
|
+
for (let i = 0; i < data.length; i++) {
|
|
1433
|
+
data[i] = data[i].trim();
|
|
1434
|
+
}
|
|
1435
|
+
let endTimeData = "";
|
|
1436
|
+
switch (data.length) {
|
|
1437
|
+
case 1:
|
|
1438
|
+
task.id = parseId();
|
|
1439
|
+
task.startTime = prevTask.endTime;
|
|
1440
|
+
endTimeData = data[0];
|
|
1441
|
+
break;
|
|
1442
|
+
case 2:
|
|
1443
|
+
task.id = parseId();
|
|
1444
|
+
task.startTime = getStartDate(void 0, dateFormat, data[0]);
|
|
1445
|
+
endTimeData = data[1];
|
|
1446
|
+
break;
|
|
1447
|
+
case 3:
|
|
1448
|
+
task.id = parseId(data[0]);
|
|
1449
|
+
task.startTime = getStartDate(void 0, dateFormat, data[1]);
|
|
1450
|
+
endTimeData = data[2];
|
|
1451
|
+
break;
|
|
1452
|
+
}
|
|
1453
|
+
if (endTimeData) {
|
|
1454
|
+
task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);
|
|
1455
|
+
task.manualEndTime = dayjs2(endTimeData, "YYYY-MM-DD", true).isValid();
|
|
1456
|
+
checkTaskDates(task, dateFormat, excludes, includes);
|
|
1457
|
+
}
|
|
1458
|
+
return task;
|
|
1459
|
+
}, "compileData");
|
|
1460
|
+
var parseData = /* @__PURE__ */ __name(function(prevTaskId, dataStr) {
|
|
1461
|
+
let ds;
|
|
1462
|
+
if (dataStr.substr(0, 1) === ":") {
|
|
1463
|
+
ds = dataStr.substr(1, dataStr.length);
|
|
1464
|
+
} else {
|
|
1465
|
+
ds = dataStr;
|
|
1466
|
+
}
|
|
1467
|
+
const data = ds.split(",");
|
|
1468
|
+
const task = {};
|
|
1469
|
+
getTaskTags(data, task, tags);
|
|
1470
|
+
for (let i = 0; i < data.length; i++) {
|
|
1471
|
+
data[i] = data[i].trim();
|
|
1472
|
+
}
|
|
1473
|
+
switch (data.length) {
|
|
1474
|
+
case 1:
|
|
1475
|
+
task.id = parseId();
|
|
1476
|
+
task.startTime = {
|
|
1477
|
+
type: "prevTaskEnd",
|
|
1478
|
+
id: prevTaskId
|
|
1479
|
+
};
|
|
1480
|
+
task.endTime = {
|
|
1481
|
+
data: data[0]
|
|
1482
|
+
};
|
|
1483
|
+
break;
|
|
1484
|
+
case 2:
|
|
1485
|
+
task.id = parseId();
|
|
1486
|
+
task.startTime = {
|
|
1487
|
+
type: "getStartDate",
|
|
1488
|
+
startData: data[0]
|
|
1489
|
+
};
|
|
1490
|
+
task.endTime = {
|
|
1491
|
+
data: data[1]
|
|
1492
|
+
};
|
|
1493
|
+
break;
|
|
1494
|
+
case 3:
|
|
1495
|
+
task.id = parseId(data[0]);
|
|
1496
|
+
task.startTime = {
|
|
1497
|
+
type: "getStartDate",
|
|
1498
|
+
startData: data[1]
|
|
1499
|
+
};
|
|
1500
|
+
task.endTime = {
|
|
1501
|
+
data: data[2]
|
|
1502
|
+
};
|
|
1503
|
+
break;
|
|
1504
|
+
}
|
|
1505
|
+
return task;
|
|
1506
|
+
}, "parseData");
|
|
1507
|
+
var lastTask;
|
|
1508
|
+
var lastTaskID;
|
|
1509
|
+
var rawTasks = [];
|
|
1510
|
+
var taskDb = {};
|
|
1511
|
+
var addTask = /* @__PURE__ */ __name(function(descr, data) {
|
|
1512
|
+
const rawTask = {
|
|
1513
|
+
section: currentSection,
|
|
1514
|
+
type: currentSection,
|
|
1515
|
+
processed: false,
|
|
1516
|
+
manualEndTime: false,
|
|
1517
|
+
renderEndTime: null,
|
|
1518
|
+
raw: { data },
|
|
1519
|
+
task: descr,
|
|
1520
|
+
classes: []
|
|
1521
|
+
};
|
|
1522
|
+
const taskInfo = parseData(lastTaskID, data);
|
|
1523
|
+
rawTask.raw.startTime = taskInfo.startTime;
|
|
1524
|
+
rawTask.raw.endTime = taskInfo.endTime;
|
|
1525
|
+
rawTask.id = taskInfo.id;
|
|
1526
|
+
rawTask.prevTaskId = lastTaskID;
|
|
1527
|
+
rawTask.active = taskInfo.active;
|
|
1528
|
+
rawTask.done = taskInfo.done;
|
|
1529
|
+
rawTask.crit = taskInfo.crit;
|
|
1530
|
+
rawTask.milestone = taskInfo.milestone;
|
|
1531
|
+
rawTask.order = lastOrder;
|
|
1532
|
+
lastOrder++;
|
|
1533
|
+
const pos = rawTasks.push(rawTask);
|
|
1534
|
+
lastTaskID = rawTask.id;
|
|
1535
|
+
taskDb[rawTask.id] = pos - 1;
|
|
1536
|
+
}, "addTask");
|
|
1537
|
+
var findTaskById = /* @__PURE__ */ __name(function(id) {
|
|
1538
|
+
const pos = taskDb[id];
|
|
1539
|
+
return rawTasks[pos];
|
|
1540
|
+
}, "findTaskById");
|
|
1541
|
+
var addTaskOrg = /* @__PURE__ */ __name(function(descr, data) {
|
|
1542
|
+
const newTask = {
|
|
1543
|
+
section: currentSection,
|
|
1544
|
+
type: currentSection,
|
|
1545
|
+
description: descr,
|
|
1546
|
+
task: descr,
|
|
1547
|
+
classes: []
|
|
1548
|
+
};
|
|
1549
|
+
const taskInfo = compileData(lastTask, data);
|
|
1550
|
+
newTask.startTime = taskInfo.startTime;
|
|
1551
|
+
newTask.endTime = taskInfo.endTime;
|
|
1552
|
+
newTask.id = taskInfo.id;
|
|
1553
|
+
newTask.active = taskInfo.active;
|
|
1554
|
+
newTask.done = taskInfo.done;
|
|
1555
|
+
newTask.crit = taskInfo.crit;
|
|
1556
|
+
newTask.milestone = taskInfo.milestone;
|
|
1557
|
+
lastTask = newTask;
|
|
1558
|
+
tasks.push(newTask);
|
|
1559
|
+
}, "addTaskOrg");
|
|
1560
|
+
var compileTasks = /* @__PURE__ */ __name(function() {
|
|
1561
|
+
const compileTask = /* @__PURE__ */ __name(function(pos) {
|
|
1562
|
+
const task = rawTasks[pos];
|
|
1563
|
+
let startTime = "";
|
|
1564
|
+
switch (rawTasks[pos].raw.startTime.type) {
|
|
1565
|
+
case "prevTaskEnd": {
|
|
1566
|
+
const prevTask = findTaskById(task.prevTaskId);
|
|
1567
|
+
task.startTime = prevTask.endTime;
|
|
1568
|
+
break;
|
|
1569
|
+
}
|
|
1570
|
+
case "getStartDate":
|
|
1571
|
+
startTime = getStartDate(void 0, dateFormat, rawTasks[pos].raw.startTime.startData);
|
|
1572
|
+
if (startTime) {
|
|
1573
|
+
rawTasks[pos].startTime = startTime;
|
|
1574
|
+
}
|
|
1575
|
+
break;
|
|
1576
|
+
}
|
|
1577
|
+
if (rawTasks[pos].startTime) {
|
|
1578
|
+
rawTasks[pos].endTime = getEndDate(
|
|
1579
|
+
rawTasks[pos].startTime,
|
|
1580
|
+
dateFormat,
|
|
1581
|
+
rawTasks[pos].raw.endTime.data,
|
|
1582
|
+
inclusiveEndDates
|
|
1583
|
+
);
|
|
1584
|
+
if (rawTasks[pos].endTime) {
|
|
1585
|
+
rawTasks[pos].processed = true;
|
|
1586
|
+
rawTasks[pos].manualEndTime = dayjs2(
|
|
1587
|
+
rawTasks[pos].raw.endTime.data,
|
|
1588
|
+
"YYYY-MM-DD",
|
|
1589
|
+
true
|
|
1590
|
+
).isValid();
|
|
1591
|
+
checkTaskDates(rawTasks[pos], dateFormat, excludes, includes);
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
return rawTasks[pos].processed;
|
|
1595
|
+
}, "compileTask");
|
|
1596
|
+
let allProcessed = true;
|
|
1597
|
+
for (const [i, rawTask] of rawTasks.entries()) {
|
|
1598
|
+
compileTask(i);
|
|
1599
|
+
allProcessed = allProcessed && rawTask.processed;
|
|
1600
|
+
}
|
|
1601
|
+
return allProcessed;
|
|
1602
|
+
}, "compileTasks");
|
|
1603
|
+
var setLink = /* @__PURE__ */ __name(function(ids, _linkStr) {
|
|
1604
|
+
let linkStr = _linkStr;
|
|
1605
|
+
if (getConfig2().securityLevel !== "loose") {
|
|
1606
|
+
linkStr = distExports.sanitizeUrl(_linkStr);
|
|
1607
|
+
}
|
|
1608
|
+
ids.split(",").forEach(function(id) {
|
|
1609
|
+
let rawTask = findTaskById(id);
|
|
1610
|
+
if (rawTask !== void 0) {
|
|
1611
|
+
pushFun(id, () => {
|
|
1612
|
+
window.open(linkStr, "_self");
|
|
1613
|
+
});
|
|
1614
|
+
links.set(id, linkStr);
|
|
1615
|
+
}
|
|
1616
|
+
});
|
|
1617
|
+
setClass(ids, "clickable");
|
|
1618
|
+
}, "setLink");
|
|
1619
|
+
var setClass = /* @__PURE__ */ __name(function(ids, className) {
|
|
1620
|
+
ids.split(",").forEach(function(id) {
|
|
1621
|
+
let rawTask = findTaskById(id);
|
|
1622
|
+
if (rawTask !== void 0) {
|
|
1623
|
+
rawTask.classes.push(className);
|
|
1624
|
+
}
|
|
1625
|
+
});
|
|
1626
|
+
}, "setClass");
|
|
1627
|
+
var setClickFun = /* @__PURE__ */ __name(function(id, functionName, functionArgs) {
|
|
1628
|
+
if (getConfig2().securityLevel !== "loose") {
|
|
1629
|
+
return;
|
|
1630
|
+
}
|
|
1631
|
+
if (functionName === void 0) {
|
|
1632
|
+
return;
|
|
1633
|
+
}
|
|
1634
|
+
let argList = [];
|
|
1635
|
+
if (typeof functionArgs === "string") {
|
|
1636
|
+
argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
|
1637
|
+
for (let i = 0; i < argList.length; i++) {
|
|
1638
|
+
let item = argList[i].trim();
|
|
1639
|
+
if (item.startsWith('"') && item.endsWith('"')) {
|
|
1640
|
+
item = item.substr(1, item.length - 2);
|
|
1641
|
+
}
|
|
1642
|
+
argList[i] = item;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
if (argList.length === 0) {
|
|
1646
|
+
argList.push(id);
|
|
1647
|
+
}
|
|
1648
|
+
let rawTask = findTaskById(id);
|
|
1649
|
+
if (rawTask !== void 0) {
|
|
1650
|
+
pushFun(id, () => {
|
|
1651
|
+
utils_default.runFunc(functionName, ...argList);
|
|
1652
|
+
});
|
|
1653
|
+
}
|
|
1654
|
+
}, "setClickFun");
|
|
1655
|
+
var pushFun = /* @__PURE__ */ __name(function(id, callbackFunction) {
|
|
1656
|
+
funs.push(
|
|
1657
|
+
function() {
|
|
1658
|
+
const elem = document.querySelector(`[id="${id}"]`);
|
|
1659
|
+
if (elem !== null) {
|
|
1660
|
+
elem.addEventListener("click", function() {
|
|
1661
|
+
callbackFunction();
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1664
|
+
},
|
|
1665
|
+
function() {
|
|
1666
|
+
const elem = document.querySelector(`[id="${id}-text"]`);
|
|
1667
|
+
if (elem !== null) {
|
|
1668
|
+
elem.addEventListener("click", function() {
|
|
1669
|
+
callbackFunction();
|
|
1670
|
+
});
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
);
|
|
1674
|
+
}, "pushFun");
|
|
1675
|
+
var setClickEvent = /* @__PURE__ */ __name(function(ids, functionName, functionArgs) {
|
|
1676
|
+
ids.split(",").forEach(function(id) {
|
|
1677
|
+
setClickFun(id, functionName, functionArgs);
|
|
1678
|
+
});
|
|
1679
|
+
setClass(ids, "clickable");
|
|
1680
|
+
}, "setClickEvent");
|
|
1681
|
+
var bindFunctions = /* @__PURE__ */ __name(function(element) {
|
|
1682
|
+
funs.forEach(function(fun) {
|
|
1683
|
+
fun(element);
|
|
1684
|
+
});
|
|
1685
|
+
}, "bindFunctions");
|
|
1686
|
+
var ganttDb_default = {
|
|
1687
|
+
getConfig: /* @__PURE__ */ __name(() => getConfig2().gantt, "getConfig"),
|
|
1688
|
+
clear: clear2,
|
|
1689
|
+
setDateFormat,
|
|
1690
|
+
getDateFormat,
|
|
1691
|
+
enableInclusiveEndDates,
|
|
1692
|
+
endDatesAreInclusive,
|
|
1693
|
+
enableTopAxis,
|
|
1694
|
+
topAxisEnabled,
|
|
1695
|
+
setAxisFormat,
|
|
1696
|
+
getAxisFormat,
|
|
1697
|
+
setTickInterval,
|
|
1698
|
+
getTickInterval,
|
|
1699
|
+
setTodayMarker,
|
|
1700
|
+
getTodayMarker,
|
|
1701
|
+
setAccTitle,
|
|
1702
|
+
getAccTitle,
|
|
1703
|
+
setDiagramTitle,
|
|
1704
|
+
getDiagramTitle,
|
|
1705
|
+
setDisplayMode,
|
|
1706
|
+
getDisplayMode,
|
|
1707
|
+
setAccDescription,
|
|
1708
|
+
getAccDescription,
|
|
1709
|
+
addSection,
|
|
1710
|
+
getSections,
|
|
1711
|
+
getTasks,
|
|
1712
|
+
addTask,
|
|
1713
|
+
findTaskById,
|
|
1714
|
+
addTaskOrg,
|
|
1715
|
+
setIncludes,
|
|
1716
|
+
getIncludes,
|
|
1717
|
+
setExcludes,
|
|
1718
|
+
getExcludes,
|
|
1719
|
+
setClickEvent,
|
|
1720
|
+
setLink,
|
|
1721
|
+
getLinks,
|
|
1722
|
+
bindFunctions,
|
|
1723
|
+
parseDuration,
|
|
1724
|
+
isInvalidDate,
|
|
1725
|
+
setWeekday,
|
|
1726
|
+
getWeekday,
|
|
1727
|
+
setWeekend
|
|
1728
|
+
};
|
|
1729
|
+
function getTaskTags(data, task, tags2) {
|
|
1730
|
+
let matchFound = true;
|
|
1731
|
+
while (matchFound) {
|
|
1732
|
+
matchFound = false;
|
|
1733
|
+
tags2.forEach(function(t) {
|
|
1734
|
+
const pattern = "^\\s*" + t + "\\s*$";
|
|
1735
|
+
const regex = new RegExp(pattern);
|
|
1736
|
+
if (data[0].match(regex)) {
|
|
1737
|
+
task[t] = true;
|
|
1738
|
+
data.shift(1);
|
|
1739
|
+
matchFound = true;
|
|
1740
|
+
}
|
|
1741
|
+
});
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
__name(getTaskTags, "getTaskTags");
|
|
1745
|
+
var setConf = /* @__PURE__ */ __name(function() {
|
|
1746
|
+
log.debug("Something is calling, setConf, remove the call");
|
|
1747
|
+
}, "setConf");
|
|
1748
|
+
var mapWeekdayToTimeFunction = {
|
|
1749
|
+
monday: timeMonday,
|
|
1750
|
+
tuesday: timeTuesday,
|
|
1751
|
+
wednesday: timeWednesday,
|
|
1752
|
+
thursday: timeThursday,
|
|
1753
|
+
friday: timeFriday,
|
|
1754
|
+
saturday: timeSaturday,
|
|
1755
|
+
sunday: timeSunday
|
|
1756
|
+
};
|
|
1757
|
+
var getMaxIntersections = /* @__PURE__ */ __name((tasks2, orderOffset) => {
|
|
1758
|
+
let timeline = [...tasks2].map(() => -Infinity);
|
|
1759
|
+
let sorted = [...tasks2].sort((a, b) => a.startTime - b.startTime || a.order - b.order);
|
|
1760
|
+
let maxIntersections = 0;
|
|
1761
|
+
for (const element of sorted) {
|
|
1762
|
+
for (let j = 0; j < timeline.length; j++) {
|
|
1763
|
+
if (element.startTime >= timeline[j]) {
|
|
1764
|
+
timeline[j] = element.endTime;
|
|
1765
|
+
element.order = j + orderOffset;
|
|
1766
|
+
if (j > maxIntersections) {
|
|
1767
|
+
maxIntersections = j;
|
|
1768
|
+
}
|
|
1769
|
+
break;
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
return maxIntersections;
|
|
1774
|
+
}, "getMaxIntersections");
|
|
1775
|
+
var w;
|
|
1776
|
+
var draw = /* @__PURE__ */ __name(function(text, id, version, diagObj) {
|
|
1777
|
+
const conf = getConfig2().gantt;
|
|
1778
|
+
const securityLevel = getConfig2().securityLevel;
|
|
1779
|
+
let sandboxElement;
|
|
1780
|
+
if (securityLevel === "sandbox") {
|
|
1781
|
+
sandboxElement = select("#i" + id);
|
|
1782
|
+
}
|
|
1783
|
+
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
|
|
1784
|
+
const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
|
|
1785
|
+
const elem = doc.getElementById(id);
|
|
1786
|
+
w = elem.parentElement.offsetWidth;
|
|
1787
|
+
if (w === void 0) {
|
|
1788
|
+
w = 1200;
|
|
1789
|
+
}
|
|
1790
|
+
if (conf.useWidth !== void 0) {
|
|
1791
|
+
w = conf.useWidth;
|
|
1792
|
+
}
|
|
1793
|
+
const taskArray = diagObj.db.getTasks();
|
|
1794
|
+
let categories = [];
|
|
1795
|
+
for (const element of taskArray) {
|
|
1796
|
+
categories.push(element.type);
|
|
1797
|
+
}
|
|
1798
|
+
categories = checkUnique(categories);
|
|
1799
|
+
const categoryHeights = {};
|
|
1800
|
+
let h = 2 * conf.topPadding;
|
|
1801
|
+
if (diagObj.db.getDisplayMode() === "compact" || conf.displayMode === "compact") {
|
|
1802
|
+
const categoryElements = {};
|
|
1803
|
+
for (const element of taskArray) {
|
|
1804
|
+
if (categoryElements[element.section] === void 0) {
|
|
1805
|
+
categoryElements[element.section] = [element];
|
|
1806
|
+
} else {
|
|
1807
|
+
categoryElements[element.section].push(element);
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
let intersections = 0;
|
|
1811
|
+
for (const category of Object.keys(categoryElements)) {
|
|
1812
|
+
const categoryHeight = getMaxIntersections(categoryElements[category], intersections) + 1;
|
|
1813
|
+
intersections += categoryHeight;
|
|
1814
|
+
h += categoryHeight * (conf.barHeight + conf.barGap);
|
|
1815
|
+
categoryHeights[category] = categoryHeight;
|
|
1816
|
+
}
|
|
1817
|
+
} else {
|
|
1818
|
+
h += taskArray.length * (conf.barHeight + conf.barGap);
|
|
1819
|
+
for (const category of categories) {
|
|
1820
|
+
categoryHeights[category] = taskArray.filter((task) => task.type === category).length;
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
elem.setAttribute("viewBox", "0 0 " + w + " " + h);
|
|
1824
|
+
const svg = root.select(`[id="${id}"]`);
|
|
1825
|
+
const timeScale = time().domain([
|
|
1826
|
+
min(taskArray, function(d) {
|
|
1827
|
+
return d.startTime;
|
|
1828
|
+
}),
|
|
1829
|
+
max(taskArray, function(d) {
|
|
1830
|
+
return d.endTime;
|
|
1831
|
+
})
|
|
1832
|
+
]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
|
|
1833
|
+
function taskCompare(a, b) {
|
|
1834
|
+
const taskA = a.startTime;
|
|
1835
|
+
const taskB = b.startTime;
|
|
1836
|
+
let result = 0;
|
|
1837
|
+
if (taskA > taskB) {
|
|
1838
|
+
result = 1;
|
|
1839
|
+
} else if (taskA < taskB) {
|
|
1840
|
+
result = -1;
|
|
1841
|
+
}
|
|
1842
|
+
return result;
|
|
1843
|
+
}
|
|
1844
|
+
__name(taskCompare, "taskCompare");
|
|
1845
|
+
taskArray.sort(taskCompare);
|
|
1846
|
+
makeGantt(taskArray, w, h);
|
|
1847
|
+
configureSvgSize(svg, h, w, conf.useMaxWidth);
|
|
1848
|
+
svg.append("text").text(diagObj.db.getDiagramTitle()).attr("x", w / 2).attr("y", conf.titleTopMargin).attr("class", "titleText");
|
|
1849
|
+
function makeGantt(tasks2, pageWidth, pageHeight) {
|
|
1850
|
+
const barHeight = conf.barHeight;
|
|
1851
|
+
const gap = barHeight + conf.barGap;
|
|
1852
|
+
const topPadding = conf.topPadding;
|
|
1853
|
+
const leftPadding = conf.leftPadding;
|
|
1854
|
+
const colorScale = linear().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(interpolateHcl);
|
|
1855
|
+
drawExcludeDays(
|
|
1856
|
+
gap,
|
|
1857
|
+
topPadding,
|
|
1858
|
+
leftPadding,
|
|
1859
|
+
pageWidth,
|
|
1860
|
+
pageHeight,
|
|
1861
|
+
tasks2,
|
|
1862
|
+
diagObj.db.getExcludes(),
|
|
1863
|
+
diagObj.db.getIncludes()
|
|
1864
|
+
);
|
|
1865
|
+
makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
|
|
1866
|
+
drawRects(tasks2, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth);
|
|
1867
|
+
vertLabels(gap, topPadding);
|
|
1868
|
+
drawToday(leftPadding, topPadding, pageWidth, pageHeight);
|
|
1869
|
+
}
|
|
1870
|
+
__name(makeGantt, "makeGantt");
|
|
1871
|
+
function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w2) {
|
|
1872
|
+
const uniqueTaskOrderIds = [...new Set(theArray.map((item) => item.order))];
|
|
1873
|
+
const uniqueTasks = uniqueTaskOrderIds.map((id2) => theArray.find((item) => item.order === id2));
|
|
1874
|
+
svg.append("g").selectAll("rect").data(uniqueTasks).enter().append("rect").attr("x", 0).attr("y", function(d, i) {
|
|
1875
|
+
i = d.order;
|
|
1876
|
+
return i * theGap + theTopPad - 2;
|
|
1877
|
+
}).attr("width", function() {
|
|
1878
|
+
return w2 - conf.rightPadding / 2;
|
|
1879
|
+
}).attr("height", theGap).attr("class", function(d) {
|
|
1880
|
+
for (const [i, category] of categories.entries()) {
|
|
1881
|
+
if (d.type === category) {
|
|
1882
|
+
return "section section" + i % conf.numberSectionStyles;
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
return "section section0";
|
|
1886
|
+
});
|
|
1887
|
+
const rectangles = svg.append("g").selectAll("rect").data(theArray).enter();
|
|
1888
|
+
const links2 = diagObj.db.getLinks();
|
|
1889
|
+
rectangles.append("rect").attr("id", function(d) {
|
|
1890
|
+
return d.id;
|
|
1891
|
+
}).attr("rx", 3).attr("ry", 3).attr("x", function(d) {
|
|
1892
|
+
if (d.milestone) {
|
|
1893
|
+
return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
|
|
1894
|
+
}
|
|
1895
|
+
return timeScale(d.startTime) + theSidePad;
|
|
1896
|
+
}).attr("y", function(d, i) {
|
|
1897
|
+
i = d.order;
|
|
1898
|
+
return i * theGap + theTopPad;
|
|
1899
|
+
}).attr("width", function(d) {
|
|
1900
|
+
if (d.milestone) {
|
|
1901
|
+
return theBarHeight;
|
|
1902
|
+
}
|
|
1903
|
+
return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
|
|
1904
|
+
}).attr("height", theBarHeight).attr("transform-origin", function(d, i) {
|
|
1905
|
+
i = d.order;
|
|
1906
|
+
return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + "px " + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + "px";
|
|
1907
|
+
}).attr("class", function(d) {
|
|
1908
|
+
const res = "task";
|
|
1909
|
+
let classStr = "";
|
|
1910
|
+
if (d.classes.length > 0) {
|
|
1911
|
+
classStr = d.classes.join(" ");
|
|
1912
|
+
}
|
|
1913
|
+
let secNum = 0;
|
|
1914
|
+
for (const [i, category] of categories.entries()) {
|
|
1915
|
+
if (d.type === category) {
|
|
1916
|
+
secNum = i % conf.numberSectionStyles;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
let taskClass = "";
|
|
1920
|
+
if (d.active) {
|
|
1921
|
+
if (d.crit) {
|
|
1922
|
+
taskClass += " activeCrit";
|
|
1923
|
+
} else {
|
|
1924
|
+
taskClass = " active";
|
|
1925
|
+
}
|
|
1926
|
+
} else if (d.done) {
|
|
1927
|
+
if (d.crit) {
|
|
1928
|
+
taskClass = " doneCrit";
|
|
1929
|
+
} else {
|
|
1930
|
+
taskClass = " done";
|
|
1931
|
+
}
|
|
1932
|
+
} else {
|
|
1933
|
+
if (d.crit) {
|
|
1934
|
+
taskClass += " crit";
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1937
|
+
if (taskClass.length === 0) {
|
|
1938
|
+
taskClass = " task";
|
|
1939
|
+
}
|
|
1940
|
+
if (d.milestone) {
|
|
1941
|
+
taskClass = " milestone " + taskClass;
|
|
1942
|
+
}
|
|
1943
|
+
taskClass += secNum;
|
|
1944
|
+
taskClass += " " + classStr;
|
|
1945
|
+
return res + taskClass;
|
|
1946
|
+
});
|
|
1947
|
+
rectangles.append("text").attr("id", function(d) {
|
|
1948
|
+
return d.id + "-text";
|
|
1949
|
+
}).text(function(d) {
|
|
1950
|
+
return d.task;
|
|
1951
|
+
}).attr("font-size", conf.fontSize).attr("x", function(d) {
|
|
1952
|
+
let startX = timeScale(d.startTime);
|
|
1953
|
+
let endX = timeScale(d.renderEndTime || d.endTime);
|
|
1954
|
+
if (d.milestone) {
|
|
1955
|
+
startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
|
|
1956
|
+
}
|
|
1957
|
+
if (d.milestone) {
|
|
1958
|
+
endX = startX + theBarHeight;
|
|
1959
|
+
}
|
|
1960
|
+
const textWidth = this.getBBox().width;
|
|
1961
|
+
if (textWidth > endX - startX) {
|
|
1962
|
+
if (endX + textWidth + 1.5 * conf.leftPadding > w2) {
|
|
1963
|
+
return startX + theSidePad - 5;
|
|
1964
|
+
} else {
|
|
1965
|
+
return endX + theSidePad + 5;
|
|
1966
|
+
}
|
|
1967
|
+
} else {
|
|
1968
|
+
return (endX - startX) / 2 + startX + theSidePad;
|
|
1969
|
+
}
|
|
1970
|
+
}).attr("y", function(d, i) {
|
|
1971
|
+
i = d.order;
|
|
1972
|
+
return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
|
|
1973
|
+
}).attr("text-height", theBarHeight).attr("class", function(d) {
|
|
1974
|
+
const startX = timeScale(d.startTime);
|
|
1975
|
+
let endX = timeScale(d.endTime);
|
|
1976
|
+
if (d.milestone) {
|
|
1977
|
+
endX = startX + theBarHeight;
|
|
1978
|
+
}
|
|
1979
|
+
const textWidth = this.getBBox().width;
|
|
1980
|
+
let classStr = "";
|
|
1981
|
+
if (d.classes.length > 0) {
|
|
1982
|
+
classStr = d.classes.join(" ");
|
|
1983
|
+
}
|
|
1984
|
+
let secNum = 0;
|
|
1985
|
+
for (const [i, category] of categories.entries()) {
|
|
1986
|
+
if (d.type === category) {
|
|
1987
|
+
secNum = i % conf.numberSectionStyles;
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
let taskType = "";
|
|
1991
|
+
if (d.active) {
|
|
1992
|
+
if (d.crit) {
|
|
1993
|
+
taskType = "activeCritText" + secNum;
|
|
1994
|
+
} else {
|
|
1995
|
+
taskType = "activeText" + secNum;
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
if (d.done) {
|
|
1999
|
+
if (d.crit) {
|
|
2000
|
+
taskType = taskType + " doneCritText" + secNum;
|
|
2001
|
+
} else {
|
|
2002
|
+
taskType = taskType + " doneText" + secNum;
|
|
2003
|
+
}
|
|
2004
|
+
} else {
|
|
2005
|
+
if (d.crit) {
|
|
2006
|
+
taskType = taskType + " critText" + secNum;
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
if (d.milestone) {
|
|
2010
|
+
taskType += " milestoneText";
|
|
2011
|
+
}
|
|
2012
|
+
if (textWidth > endX - startX) {
|
|
2013
|
+
if (endX + textWidth + 1.5 * conf.leftPadding > w2) {
|
|
2014
|
+
return classStr + " taskTextOutsideLeft taskTextOutside" + secNum + " " + taskType;
|
|
2015
|
+
} else {
|
|
2016
|
+
return classStr + " taskTextOutsideRight taskTextOutside" + secNum + " " + taskType + " width-" + textWidth;
|
|
2017
|
+
}
|
|
2018
|
+
} else {
|
|
2019
|
+
return classStr + " taskText taskText" + secNum + " " + taskType + " width-" + textWidth;
|
|
2020
|
+
}
|
|
2021
|
+
});
|
|
2022
|
+
const securityLevel2 = getConfig2().securityLevel;
|
|
2023
|
+
if (securityLevel2 === "sandbox") {
|
|
2024
|
+
let sandboxElement2;
|
|
2025
|
+
sandboxElement2 = select("#i" + id);
|
|
2026
|
+
const doc2 = sandboxElement2.nodes()[0].contentDocument;
|
|
2027
|
+
rectangles.filter(function(d) {
|
|
2028
|
+
return links2.has(d.id);
|
|
2029
|
+
}).each(function(o) {
|
|
2030
|
+
var taskRect = doc2.querySelector("#" + o.id);
|
|
2031
|
+
var taskText = doc2.querySelector("#" + o.id + "-text");
|
|
2032
|
+
const oldParent = taskRect.parentNode;
|
|
2033
|
+
var Link = doc2.createElement("a");
|
|
2034
|
+
Link.setAttribute("xlink:href", links2.get(o.id));
|
|
2035
|
+
Link.setAttribute("target", "_top");
|
|
2036
|
+
oldParent.appendChild(Link);
|
|
2037
|
+
Link.appendChild(taskRect);
|
|
2038
|
+
Link.appendChild(taskText);
|
|
2039
|
+
});
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
__name(drawRects, "drawRects");
|
|
2043
|
+
function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) {
|
|
2044
|
+
if (excludes2.length === 0 && includes2.length === 0) {
|
|
2045
|
+
return;
|
|
2046
|
+
}
|
|
2047
|
+
let minTime;
|
|
2048
|
+
let maxTime;
|
|
2049
|
+
for (const { startTime, endTime } of tasks2) {
|
|
2050
|
+
if (minTime === void 0 || startTime < minTime) {
|
|
2051
|
+
minTime = startTime;
|
|
2052
|
+
}
|
|
2053
|
+
if (maxTime === void 0 || endTime > maxTime) {
|
|
2054
|
+
maxTime = endTime;
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
if (!minTime || !maxTime) {
|
|
2058
|
+
return;
|
|
2059
|
+
}
|
|
2060
|
+
if (dayjs2(maxTime).diff(dayjs2(minTime), "year") > 5) {
|
|
2061
|
+
log.warn(
|
|
2062
|
+
"The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
|
|
2063
|
+
);
|
|
2064
|
+
return;
|
|
2065
|
+
}
|
|
2066
|
+
const dateFormat2 = diagObj.db.getDateFormat();
|
|
2067
|
+
const excludeRanges = [];
|
|
2068
|
+
let range = null;
|
|
2069
|
+
let d = dayjs2(minTime);
|
|
2070
|
+
while (d.valueOf() <= maxTime) {
|
|
2071
|
+
if (diagObj.db.isInvalidDate(d, dateFormat2, excludes2, includes2)) {
|
|
2072
|
+
if (!range) {
|
|
2073
|
+
range = {
|
|
2074
|
+
start: d,
|
|
2075
|
+
end: d
|
|
2076
|
+
};
|
|
2077
|
+
} else {
|
|
2078
|
+
range.end = d;
|
|
2079
|
+
}
|
|
2080
|
+
} else {
|
|
2081
|
+
if (range) {
|
|
2082
|
+
excludeRanges.push(range);
|
|
2083
|
+
range = null;
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
d = d.add(1, "d");
|
|
2087
|
+
}
|
|
2088
|
+
const rectangles = svg.append("g").selectAll("rect").data(excludeRanges).enter();
|
|
2089
|
+
rectangles.append("rect").attr("id", function(d2) {
|
|
2090
|
+
return "exclude-" + d2.start.format("YYYY-MM-DD");
|
|
2091
|
+
}).attr("x", function(d2) {
|
|
2092
|
+
return timeScale(d2.start) + theSidePad;
|
|
2093
|
+
}).attr("y", conf.gridLineStartPadding).attr("width", function(d2) {
|
|
2094
|
+
const renderEnd = d2.end.add(1, "day");
|
|
2095
|
+
return timeScale(renderEnd) - timeScale(d2.start);
|
|
2096
|
+
}).attr("height", h2 - theTopPad - conf.gridLineStartPadding).attr("transform-origin", function(d2, i) {
|
|
2097
|
+
return (timeScale(d2.start) + theSidePad + 0.5 * (timeScale(d2.end) - timeScale(d2.start))).toString() + "px " + (i * theGap + 0.5 * h2).toString() + "px";
|
|
2098
|
+
}).attr("class", "exclude-range");
|
|
2099
|
+
}
|
|
2100
|
+
__name(drawExcludeDays, "drawExcludeDays");
|
|
2101
|
+
function makeGrid(theSidePad, theTopPad, w2, h2) {
|
|
2102
|
+
let bottomXAxis = axisBottom(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d"));
|
|
2103
|
+
const reTickInterval = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/;
|
|
2104
|
+
const resultTickInterval = reTickInterval.exec(
|
|
2105
|
+
diagObj.db.getTickInterval() || conf.tickInterval
|
|
2106
|
+
);
|
|
2107
|
+
if (resultTickInterval !== null) {
|
|
2108
|
+
const every = resultTickInterval[1];
|
|
2109
|
+
const interval = resultTickInterval[2];
|
|
2110
|
+
const weekday2 = diagObj.db.getWeekday() || conf.weekday;
|
|
2111
|
+
switch (interval) {
|
|
2112
|
+
case "millisecond":
|
|
2113
|
+
bottomXAxis.ticks(millisecond.every(every));
|
|
2114
|
+
break;
|
|
2115
|
+
case "second":
|
|
2116
|
+
bottomXAxis.ticks(second.every(every));
|
|
2117
|
+
break;
|
|
2118
|
+
case "minute":
|
|
2119
|
+
bottomXAxis.ticks(timeMinute.every(every));
|
|
2120
|
+
break;
|
|
2121
|
+
case "hour":
|
|
2122
|
+
bottomXAxis.ticks(timeHour.every(every));
|
|
2123
|
+
break;
|
|
2124
|
+
case "day":
|
|
2125
|
+
bottomXAxis.ticks(timeDay.every(every));
|
|
2126
|
+
break;
|
|
2127
|
+
case "week":
|
|
2128
|
+
bottomXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every));
|
|
2129
|
+
break;
|
|
2130
|
+
case "month":
|
|
2131
|
+
bottomXAxis.ticks(timeMonth.every(every));
|
|
2132
|
+
break;
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + (h2 - 50) + ")").call(bottomXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em");
|
|
2136
|
+
if (diagObj.db.topAxisEnabled() || conf.topAxis) {
|
|
2137
|
+
let topXAxis = axisTop(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d"));
|
|
2138
|
+
if (resultTickInterval !== null) {
|
|
2139
|
+
const every = resultTickInterval[1];
|
|
2140
|
+
const interval = resultTickInterval[2];
|
|
2141
|
+
const weekday2 = diagObj.db.getWeekday() || conf.weekday;
|
|
2142
|
+
switch (interval) {
|
|
2143
|
+
case "millisecond":
|
|
2144
|
+
topXAxis.ticks(millisecond.every(every));
|
|
2145
|
+
break;
|
|
2146
|
+
case "second":
|
|
2147
|
+
topXAxis.ticks(second.every(every));
|
|
2148
|
+
break;
|
|
2149
|
+
case "minute":
|
|
2150
|
+
topXAxis.ticks(timeMinute.every(every));
|
|
2151
|
+
break;
|
|
2152
|
+
case "hour":
|
|
2153
|
+
topXAxis.ticks(timeHour.every(every));
|
|
2154
|
+
break;
|
|
2155
|
+
case "day":
|
|
2156
|
+
topXAxis.ticks(timeDay.every(every));
|
|
2157
|
+
break;
|
|
2158
|
+
case "week":
|
|
2159
|
+
topXAxis.ticks(mapWeekdayToTimeFunction[weekday2].every(every));
|
|
2160
|
+
break;
|
|
2161
|
+
case "month":
|
|
2162
|
+
topXAxis.ticks(timeMonth.every(every));
|
|
2163
|
+
break;
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
svg.append("g").attr("class", "grid").attr("transform", "translate(" + theSidePad + ", " + theTopPad + ")").call(topXAxis).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
__name(makeGrid, "makeGrid");
|
|
2170
|
+
function vertLabels(theGap, theTopPad) {
|
|
2171
|
+
let prevGap = 0;
|
|
2172
|
+
const numOccurrences = Object.keys(categoryHeights).map((d) => [d, categoryHeights[d]]);
|
|
2173
|
+
svg.append("g").selectAll("text").data(numOccurrences).enter().append(function(d) {
|
|
2174
|
+
const rows = d[0].split(common_default.lineBreakRegex);
|
|
2175
|
+
const dy = -(rows.length - 1) / 2;
|
|
2176
|
+
const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
2177
|
+
svgLabel.setAttribute("dy", dy + "em");
|
|
2178
|
+
for (const [j, row] of rows.entries()) {
|
|
2179
|
+
const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
2180
|
+
tspan.setAttribute("alignment-baseline", "central");
|
|
2181
|
+
tspan.setAttribute("x", "10");
|
|
2182
|
+
if (j > 0) {
|
|
2183
|
+
tspan.setAttribute("dy", "1em");
|
|
2184
|
+
}
|
|
2185
|
+
tspan.textContent = row;
|
|
2186
|
+
svgLabel.appendChild(tspan);
|
|
2187
|
+
}
|
|
2188
|
+
return svgLabel;
|
|
2189
|
+
}).attr("x", 10).attr("y", function(d, i) {
|
|
2190
|
+
if (i > 0) {
|
|
2191
|
+
for (let j = 0; j < i; j++) {
|
|
2192
|
+
prevGap += numOccurrences[i - 1][1];
|
|
2193
|
+
return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
|
|
2194
|
+
}
|
|
2195
|
+
} else {
|
|
2196
|
+
return d[1] * theGap / 2 + theTopPad;
|
|
2197
|
+
}
|
|
2198
|
+
}).attr("font-size", conf.sectionFontSize).attr("class", function(d) {
|
|
2199
|
+
for (const [i, category] of categories.entries()) {
|
|
2200
|
+
if (d[0] === category) {
|
|
2201
|
+
return "sectionTitle sectionTitle" + i % conf.numberSectionStyles;
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
return "sectionTitle";
|
|
2205
|
+
});
|
|
2206
|
+
}
|
|
2207
|
+
__name(vertLabels, "vertLabels");
|
|
2208
|
+
function drawToday(theSidePad, theTopPad, w2, h2) {
|
|
2209
|
+
const todayMarker2 = diagObj.db.getTodayMarker();
|
|
2210
|
+
if (todayMarker2 === "off") {
|
|
2211
|
+
return;
|
|
2212
|
+
}
|
|
2213
|
+
const todayG = svg.append("g").attr("class", "today");
|
|
2214
|
+
const today = /* @__PURE__ */ new Date();
|
|
2215
|
+
const todayLine = todayG.append("line");
|
|
2216
|
+
todayLine.attr("x1", timeScale(today) + theSidePad).attr("x2", timeScale(today) + theSidePad).attr("y1", conf.titleTopMargin).attr("y2", h2 - conf.titleTopMargin).attr("class", "today");
|
|
2217
|
+
if (todayMarker2 !== "") {
|
|
2218
|
+
todayLine.attr("style", todayMarker2.replace(/,/g, ";"));
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
__name(drawToday, "drawToday");
|
|
2222
|
+
function checkUnique(arr) {
|
|
2223
|
+
const hash = {};
|
|
2224
|
+
const result = [];
|
|
2225
|
+
for (let i = 0, l = arr.length; i < l; ++i) {
|
|
2226
|
+
if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) {
|
|
2227
|
+
hash[arr[i]] = true;
|
|
2228
|
+
result.push(arr[i]);
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
return result;
|
|
2232
|
+
}
|
|
2233
|
+
__name(checkUnique, "checkUnique");
|
|
2234
|
+
}, "draw");
|
|
2235
|
+
var ganttRenderer_default = {
|
|
2236
|
+
setConf,
|
|
2237
|
+
draw
|
|
2238
|
+
};
|
|
2239
|
+
var getStyles = /* @__PURE__ */ __name((options) => `
|
|
2240
|
+
.mermaid-main-font {
|
|
2241
|
+
font-family: ${options.fontFamily};
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
.exclude-range {
|
|
2245
|
+
fill: ${options.excludeBkgColor};
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
.section {
|
|
2249
|
+
stroke: none;
|
|
2250
|
+
opacity: 0.2;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
.section0 {
|
|
2254
|
+
fill: ${options.sectionBkgColor};
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
.section2 {
|
|
2258
|
+
fill: ${options.sectionBkgColor2};
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
.section1,
|
|
2262
|
+
.section3 {
|
|
2263
|
+
fill: ${options.altSectionBkgColor};
|
|
2264
|
+
opacity: 0.2;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
.sectionTitle0 {
|
|
2268
|
+
fill: ${options.titleColor};
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
.sectionTitle1 {
|
|
2272
|
+
fill: ${options.titleColor};
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
.sectionTitle2 {
|
|
2276
|
+
fill: ${options.titleColor};
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
.sectionTitle3 {
|
|
2280
|
+
fill: ${options.titleColor};
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
.sectionTitle {
|
|
2284
|
+
text-anchor: start;
|
|
2285
|
+
font-family: ${options.fontFamily};
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
/* Grid and axis */
|
|
2290
|
+
|
|
2291
|
+
.grid .tick {
|
|
2292
|
+
stroke: ${options.gridColor};
|
|
2293
|
+
opacity: 0.8;
|
|
2294
|
+
shape-rendering: crispEdges;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
.grid .tick text {
|
|
2298
|
+
font-family: ${options.fontFamily};
|
|
2299
|
+
fill: ${options.textColor};
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
.grid path {
|
|
2303
|
+
stroke-width: 0;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
|
|
2307
|
+
/* Today line */
|
|
2308
|
+
|
|
2309
|
+
.today {
|
|
2310
|
+
fill: none;
|
|
2311
|
+
stroke: ${options.todayLineColor};
|
|
2312
|
+
stroke-width: 2px;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
|
|
2316
|
+
/* Task styling */
|
|
2317
|
+
|
|
2318
|
+
/* Default task */
|
|
2319
|
+
|
|
2320
|
+
.task {
|
|
2321
|
+
stroke-width: 2;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
.taskText {
|
|
2325
|
+
text-anchor: middle;
|
|
2326
|
+
font-family: ${options.fontFamily};
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
.taskTextOutsideRight {
|
|
2330
|
+
fill: ${options.taskTextDarkColor};
|
|
2331
|
+
text-anchor: start;
|
|
2332
|
+
font-family: ${options.fontFamily};
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
.taskTextOutsideLeft {
|
|
2336
|
+
fill: ${options.taskTextDarkColor};
|
|
2337
|
+
text-anchor: end;
|
|
2338
|
+
}
|
|
2339
|
+
|
|
2340
|
+
|
|
2341
|
+
/* Special case clickable */
|
|
2342
|
+
|
|
2343
|
+
.task.clickable {
|
|
2344
|
+
cursor: pointer;
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
.taskText.clickable {
|
|
2348
|
+
cursor: pointer;
|
|
2349
|
+
fill: ${options.taskTextClickableColor} !important;
|
|
2350
|
+
font-weight: bold;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
.taskTextOutsideLeft.clickable {
|
|
2354
|
+
cursor: pointer;
|
|
2355
|
+
fill: ${options.taskTextClickableColor} !important;
|
|
2356
|
+
font-weight: bold;
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
.taskTextOutsideRight.clickable {
|
|
2360
|
+
cursor: pointer;
|
|
2361
|
+
fill: ${options.taskTextClickableColor} !important;
|
|
2362
|
+
font-weight: bold;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
/* Specific task settings for the sections*/
|
|
2367
|
+
|
|
2368
|
+
.taskText0,
|
|
2369
|
+
.taskText1,
|
|
2370
|
+
.taskText2,
|
|
2371
|
+
.taskText3 {
|
|
2372
|
+
fill: ${options.taskTextColor};
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
.task0,
|
|
2376
|
+
.task1,
|
|
2377
|
+
.task2,
|
|
2378
|
+
.task3 {
|
|
2379
|
+
fill: ${options.taskBkgColor};
|
|
2380
|
+
stroke: ${options.taskBorderColor};
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
.taskTextOutside0,
|
|
2384
|
+
.taskTextOutside2
|
|
2385
|
+
{
|
|
2386
|
+
fill: ${options.taskTextOutsideColor};
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
.taskTextOutside1,
|
|
2390
|
+
.taskTextOutside3 {
|
|
2391
|
+
fill: ${options.taskTextOutsideColor};
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
|
|
2395
|
+
/* Active task */
|
|
2396
|
+
|
|
2397
|
+
.active0,
|
|
2398
|
+
.active1,
|
|
2399
|
+
.active2,
|
|
2400
|
+
.active3 {
|
|
2401
|
+
fill: ${options.activeTaskBkgColor};
|
|
2402
|
+
stroke: ${options.activeTaskBorderColor};
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
.activeText0,
|
|
2406
|
+
.activeText1,
|
|
2407
|
+
.activeText2,
|
|
2408
|
+
.activeText3 {
|
|
2409
|
+
fill: ${options.taskTextDarkColor} !important;
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
/* Completed task */
|
|
2414
|
+
|
|
2415
|
+
.done0,
|
|
2416
|
+
.done1,
|
|
2417
|
+
.done2,
|
|
2418
|
+
.done3 {
|
|
2419
|
+
stroke: ${options.doneTaskBorderColor};
|
|
2420
|
+
fill: ${options.doneTaskBkgColor};
|
|
2421
|
+
stroke-width: 2;
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
.doneText0,
|
|
2425
|
+
.doneText1,
|
|
2426
|
+
.doneText2,
|
|
2427
|
+
.doneText3 {
|
|
2428
|
+
fill: ${options.taskTextDarkColor} !important;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
|
|
2432
|
+
/* Tasks on the critical line */
|
|
2433
|
+
|
|
2434
|
+
.crit0,
|
|
2435
|
+
.crit1,
|
|
2436
|
+
.crit2,
|
|
2437
|
+
.crit3 {
|
|
2438
|
+
stroke: ${options.critBorderColor};
|
|
2439
|
+
fill: ${options.critBkgColor};
|
|
2440
|
+
stroke-width: 2;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
.activeCrit0,
|
|
2444
|
+
.activeCrit1,
|
|
2445
|
+
.activeCrit2,
|
|
2446
|
+
.activeCrit3 {
|
|
2447
|
+
stroke: ${options.critBorderColor};
|
|
2448
|
+
fill: ${options.activeTaskBkgColor};
|
|
2449
|
+
stroke-width: 2;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
.doneCrit0,
|
|
2453
|
+
.doneCrit1,
|
|
2454
|
+
.doneCrit2,
|
|
2455
|
+
.doneCrit3 {
|
|
2456
|
+
stroke: ${options.critBorderColor};
|
|
2457
|
+
fill: ${options.doneTaskBkgColor};
|
|
2458
|
+
stroke-width: 2;
|
|
2459
|
+
cursor: pointer;
|
|
2460
|
+
shape-rendering: crispEdges;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
.milestone {
|
|
2464
|
+
transform: rotate(45deg) scale(0.8,0.8);
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
.milestoneText {
|
|
2468
|
+
font-style: italic;
|
|
2469
|
+
}
|
|
2470
|
+
.doneCritText0,
|
|
2471
|
+
.doneCritText1,
|
|
2472
|
+
.doneCritText2,
|
|
2473
|
+
.doneCritText3 {
|
|
2474
|
+
fill: ${options.taskTextDarkColor} !important;
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
.activeCritText0,
|
|
2478
|
+
.activeCritText1,
|
|
2479
|
+
.activeCritText2,
|
|
2480
|
+
.activeCritText3 {
|
|
2481
|
+
fill: ${options.taskTextDarkColor} !important;
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
.titleText {
|
|
2485
|
+
text-anchor: middle;
|
|
2486
|
+
font-size: 18px;
|
|
2487
|
+
fill: ${options.titleColor || options.textColor};
|
|
2488
|
+
font-family: ${options.fontFamily};
|
|
2489
|
+
}
|
|
2490
|
+
`, "getStyles");
|
|
2491
|
+
var styles_default = getStyles;
|
|
2492
|
+
var diagram = {
|
|
2493
|
+
parser: gantt_default,
|
|
2494
|
+
db: ganttDb_default,
|
|
2495
|
+
renderer: ganttRenderer_default,
|
|
2496
|
+
styles: styles_default
|
|
2497
|
+
};
|
|
2498
|
+
export {
|
|
2499
|
+
diagram
|
|
2500
|
+
};
|