UnisKB/static/admin/assets/ganttDiagram-LVOFAZNH-CNjm5...

268 lines
57 KiB
JavaScript
Raw Normal View History

import{e6 as Jt,e7 as Sn,e8 as Kt,e9 as $t,ea as en,eb as it,ec as Fn,d4 as Un,_ as f,g as En,s as In,q as An,p as Ln,a as Wn,b as Yn,c as _e,d as qe,e as On,ed as ee,l as Je,k as Nn,j as Hn,y as Vn,u as Pn,ee as Rn,ef as zn}from"./admin-BkqzSx7d.js";import{b as Bn,t as Lt,c as qn,a as Zn,l as Xn}from"./linear-CE1y2BCt.js";import{i as jn}from"./init-Gi6I4Gst.js";import"./defaultLocale-C4B-KCzX.js";function Gn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Qn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Jn(e){return e}var Xe=1,at=2,gt=3,Ze=4,Wt=1e-6;function Kn(e){return"translate("+e+",0)"}function $n(e){return"translate(0,"+e+")"}function er(e){return t=>+e(t)}function tr(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function nr(){return!this.__axis}function tn(e,t){var n=[],r=null,i=null,a=6,s=6,D=3,S=typeof window<"u"&&window.devicePixelRatio>1?0:.5,k=e===Xe||e===Ze?-1:1,p=e===Ze||e===at?"x":"y",A=e===Xe||e===gt?Kn:$n;function x(y){var R=r??(t.ticks?t.ticks.apply(t,n):t.domain()),I=i??(t.tickFormat?t.tickFormat.apply(t,n):Jn),te=Math.max(a,0)+D,re=t.range(),ne=+re[0]+S,Z=+re[re.length-1]+S,X=(t.bandwidth?tr:er)(t.copy(),S),$=y.selection?y.selection():y,w=$.selectAll(".domain").data([null]),N=$.selectAll(".tick").data(R,t).order(),C=N.exit(),U=N.enter().append("g").attr("class","tick"),_=N.select("line"),M=N.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),N=N.merge(U),_=_.merge(U.append("line").attr("stroke","currentColor").attr(p+"2",k*a)),M=M.merge(U.append("text").attr("fill","currentColor").attr(p,k*te).attr("dy",e===Xe?"0em":e===gt?"0.71em":"0.32em")),y!==$&&(w=w.transition(y),N=N.transition(y),_=_.transition(y),M=M.transition(y),C=C.transition(y).attr("opacity",Wt).attr("transform",function(b){return isFinite(b=X(b))?A(b+S):this.getAttribute("transform")}),U.attr("opacity",Wt).attr("transform",function(b){var L=this.parentNode.__axis;return A((L&&isFinite(L=L(b))?L:X(b))+S)})),C.remove(),w.attr("d",e===Ze||e===at?s?"M"+k*s+","+ne+"H"+S+"V"+Z+"H"+k*s:"M"+S+","+ne+"V"+Z:s?"M"+ne+","+k*s+"V"+S+"H"+Z+"V"+k*s:"M"+ne+","+S+"H"+Z),N.attr("opacity",1).attr("transform",function(b){return A(X(b)+S)}),_.attr(p+"2",k*a),M.attr(p,k*te).text(I),$.filter(nr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===at?"start":e===Ze?"end":"middle"),$.each(function(){this.__axis=X})}return x.scale=function(y){return arguments.length?(t=y,x):t},x.ticks=function(){return n=Array.from(arguments),x},x.tickArguments=function(y){return arguments.length?(n=y==null?[]:Array.from(y),x):n.slice()},x.tickValues=function(y){return arguments.length?(r=y==null?null:Array.from(y),x):r&&r.slice()},x.tickFormat=function(y){return arguments.length?(i=y,x):i},x.tickSize=function(y){return arguments.length?(a=s=+y,x):a},x.tickSizeInner=function(y){return arguments.length?(a=+y,x):a},x.tickSizeOuter=function(y){return arguments.length?(s=+y,x):s},x.tickPadding=function(y){return arguments.length?(D=+y,x):D},x.offset=function(y){return arguments.length?(S=+y,x):S},x}function rr(e){return tn(Xe,e)}function ir(e){return tn(gt,e)}const ar=Math.PI/180,sr=180/Math.PI,Ke=18,nn=.96422,rn=1,an=.82521,sn=4/29,Me=6/29,on=3*Me*Me,or=Me*Me*Me;function cn(e){if(e instanceof le)return new le(e.l,e.a,e.b,e.opacity);if(e instanceof he)return ln(e);e instanceof Jt||(e=Sn(e));var t=lt(e.r),n=lt(e.g),r=lt(e.b),i=st((.2225045*t+.7168786*n+.0606169*r)/rn),a,s;return t===n&&n===r?a=s=i:(a=st((.4360747*t+.3850649*n+.1430804*r)/nn),s=st((.0139322*t+.0971045*n+.7141733*r)/an)),new le(116*i-16,500*(a-i),200*(i-s),e.opacity)}function cr(e,t,n,r){return arguments.length===1?cn(e):new le(e,t,n,r??1)}function le(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Kt(le
`+B.showPosition()+`
Expecting `+Be.join(", ")+", got '"+(this.terminals_[F]||F)+"'":rt="Parse error on line "+(V+1)+": Unexpected "+(F==Q?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(rt,{text:B.match,token:this.terminals_[F]||F,line:B.yylineno,loc:E,expected:Be})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+F);switch(P[0]){case 1:v.push(F),T.push(B.yytext),c.push(B.yylloc),v.push(P[1]),F=null,Y=B.yyleng,o=B.yytext,V=B.yylineno,E=B.yylloc;break;case 2:if(fe=this.productions_[P[1]][1],ue.$=T[T.length-fe],ue._$={first_line:c[c.length-(fe||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(fe||1)].first_column,last_column:c[c.length-1].last_column},W&&(ue._$.range=[c[c.length-(fe||1)].range[0],c[c.length-1].range[1]]),oe=this.performAction.apply(ue,[o,Y,V,se.yy,P[1],T,c].concat(z)),typeof oe<"u")return oe;fe&&(v=v.slice(0,-1*fe*2),T=T.slice(0,-1*fe),c=c.slice(0,-1*fe)),v.push(this.productions_[P[1]][0]),T.push(ue.$),c.push(ue._$),At=l[v[v.length-2]][v[v.length-1]],v.push(At);break;case 3:return!0}}return!0},"parse")},M=(function(){var L={EOF:1,parseError:f(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:f(function(d,m){return this.yy=m||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var m=d.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:f(function(d){var m=d.length,v=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===h.length?this.yylloc.first_column:0)+h[h.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else 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).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(d){this.unput(this.match.slice(d))},"less"),pastInput:f(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var d=this.pastInput(),m=new Array(d.length+1).join("-");return d+this.upcomingInput()+`
`+m+"^"},"showPosition"),test_match:f(function(d,m){var v,h,T;if(this.options.backtrack_lexer&&(T={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(T.yylloc.range=this.yylloc.range.slice(0))),h=d[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var c in T)this[c]=T[c];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,m,v,h;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),c=0;c<T.length;c++)if(v=this._input.match(this.rules[T[c]]),v&&(!m||v[0].length>m[0].length)){if(m=v,h=c,this.options.backtrack_lexer){if(d=this.test_match(v,T[c]),d!==!1)return d;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(d=this.test_match(m,T[h]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var m=this.next();return m||this.lex()},"lex"),begin:f(function(m){this.conditionStack.push(m)},"begin"),popState:f(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:f(function(m){this.begin(m)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(m,v,h,T){switch(h){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),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],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return L})();_.lexer=M;function b(){this.yy={}}return f(b,"Parser"),b.prototype=_,_.Parser=b,new b})();kt.parser=kt;var Ii=kt;ee.extend(Ei);ee.extend(Rn);ee.extend(zn);var jt={friday:5,saturday:6},ce="",wt="",Ct=void 0,Dt="",Ve=[],Pe=[],_t=new Map,Mt=[],tt=[],Ee="",St="",Tn=["active","done","crit","milestone","vert"],Ft=[],R
.mermaid-main-font {
font-family: ${e.fontFamily};
}
.exclude-range {
fill: ${e.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${e.sectionBkgColor};
}
.section2 {
fill: ${e.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${e.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${e.titleColor};
}
.sectionTitle1 {
fill: ${e.titleColor};
}
.sectionTitle2 {
fill: ${e.titleColor};
}
.sectionTitle3 {
fill: ${e.titleColor};
}
.sectionTitle {
text-anchor: start;
font-family: ${e.fontFamily};
}
/* Grid and axis */
.grid .tick {
stroke: ${e.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
}
.grid .tick text {
font-family: ${e.fontFamily};
fill: ${e.textColor};
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${e.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: ${e.fontFamily};
}
.taskTextOutsideRight {
fill: ${e.taskTextDarkColor};
text-anchor: start;
font-family: ${e.fontFamily};
}
.taskTextOutsideLeft {
fill: ${e.taskTextDarkColor};
text-anchor: end;
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${e.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${e.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${e.taskBkgColor};
stroke: ${e.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${e.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${e.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${e.activeTaskBkgColor};
stroke: ${e.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${e.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${e.doneTaskBorderColor};
fill: ${e.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${e.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${e.critBorderColor};
fill: ${e.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${e.critBorderColor};
fill: ${e.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${e.critBorderColor};
fill: ${e.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${e.taskTextDarkColor} !important;
}
.vert {
stroke: ${e.vertLineColor};
}
.vertText {
font-size: 15px;
text-anchor: middle;
fill: ${e.vertLineColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${e.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${e.titleColor||e.textColor};
font-family: ${e.fontFamily};
}
`,"getStyles"),Ta=va,Da={parser:Ii,db:ma,renderer:pa,styles:Ta};export{Da as diagram};