@readme/markdown 7.7.1 → 7.7.3

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