64 lines
24 KiB
JavaScript
64 lines
24 KiB
JavaScript
/*! third party licenses: js/vendor.LICENSE.txt */
|
|
import{_ as r,c as mt,l as $,S as xt,A as bt,T as kt,y as _t}from"./NcSelect-DXLJbwym.chunk.mjs";import{s as R,w as wt,x as vt,y as $t}from"./isEmpty-nTVdZyYD.chunk.mjs";import{a as tt}from"./arc-pRSyNWj2.chunk.mjs";import"./whiteboard-main.mjs";import"./index-Anv74-sp.chunk.mjs";import"./vendor-BeFBwUwf.chunk.mjs";import"./index-C0mkXnFg.chunk.mjs";import"./index-Bn0s6V7w.chunk.mjs";import"./index-vg7q3Iku.chunk.mjs";import"./translation-DoG5ZELJ-DKBzIEvm.chunk.mjs";import"./percentages-BXMCSKIN-Cw9SI0WV.chunk.mjs";import"./useJwtStore-B1DPLYgs.chunk.mjs";import"./_plugin-vue2_normalizer-CBCAj2XU.chunk.mjs";import"./line-2ECJkxIB.chunk.mjs";import"./array-Cg_lHFoG.chunk.mjs";import"./path-i7Zvihw6.chunk.mjs";var U=function(){var n=r(function(g,s,c,d){for(c=c||{},d=g.length;d--;c[g[d]]=s);return c},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],a=[1,10],i=[1,11],l=[1,12],h=[1,13],y=[1,16],u=[1,17],f={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:r(function(g,s,c,d,p,o,m){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:d.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),d.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),d.getCommonDb().setAccDescription(this.$);break;case 12:d.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:d.addTask(o[k],0,""),this.$=o[k];break;case 16:d.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:a,14:i,16:l,17:h,18:14,19:15,20:y,21:u},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:a,14:i,16:l,17:h,18:14,19:15,20:y,21:u},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:r(function(g,s){if(s.recoverable)this.trace(g);else{var c=new Error(g);throw c.hash=s,c}},"parseError"),parse:r(function(g){var s=this,c=[0],d=[],p=[null],o=[],m=this.table,k="",N=0,I=0,D=2,A=1,w=o.slice.call(arguments,1),x=Object.create(this.lexer),S={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(S.yy[L]=this.yy[L]);x.setInput(g,S.yy),S.yy.lexer=x,S.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var H=x.yylloc;o.push(H);var G=x.options&&x.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(E){c.length=c.length-2*E,p.length=p.length-E,o.length=o.length-E}r(ft,"popStack");function J(){var E;return E=d.pop()||x.lex()||A,typeof E!="number"&&(E instanceof Array&&(d=E,E=d.pop()),E=s.symbols_[E]||E),E}r(J,"lex");for(var v,M,T,Z,O={},F,C,K,W;;){if(M=c[c.length-1],this.defaultActions[M]?T=this.defaultActions[M]:((v===null||typeof v>"u")&&(v=J()),T=m[M]&&m[M][v]),typeof T>"u"||!T.length||!T[0]){var q="";W=[];for(F in m[M])this.terminals_[F]&&F>D&&W.push("'"+this.terminals_[F]+"'");x.showPosition?q="Parse error on line "+(N+1)+`:
|
|
`+x.showPosition()+`
|
|
Expecting `+W.join(", ")+", got '"+(this.terminals_[v]||v)+"'":q="Parse error on line "+(N+1)+": Unexpected "+(v==A?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(q,{text:x.match,token:this.terminals_[v]||v,line:x.yylineno,loc:H,expected:W})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+v);switch(T[0]){case 1:c.push(v),p.push(x.yytext),o.push(x.yylloc),c.push(T[1]),v=null,I=x.yyleng,k=x.yytext,N=x.yylineno,H=x.yylloc;break;case 2:if(C=this.productions_[T[1]][1],O.$=p[p.length-C],O._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},G&&(O._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),Z=this.performAction.apply(O,[k,I,N,S.yy,T[1],p,o].concat(w)),typeof Z<"u")return Z;C&&(c=c.slice(0,-1*C*2),p=p.slice(0,-1*C),o=o.slice(0,-1*C)),c.push(this.productions_[T[1]][0]),p.push(O.$),o.push(O._$),K=m[c[c.length-2]][c[c.length-1]],c.push(K);break;case 3:return!0}}return!0},"parse")},_=function(){var g={EOF:1,parseError:r(function(s,c){if(this.yy.parser)this.yy.parser.parseError(s,c);else throw new Error(s)},"parseError"),setInput:r(function(s,c){return this.yy=c||this.yy||{},this._input=s,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:r(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var c=s.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:r(function(s){var c=s.length,d=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var p=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),d.length-1&&(this.yylineno-=d.length-1);var o=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:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var s=this.pastInput(),c=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
`+c+"^"},"showPosition"),test_match:r(function(s,c){var d,p,o;if(this.options.backtrack_lexer&&(o={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&&(o.yylloc.range=this.yylloc.range.slice(0))),p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],d=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var m in o)this[m]=o[m];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,c,d,p;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),m=0;m<o.length;m++)if(d=this._input.match(this.rules[o[m]]),d&&(!c||d[0].length>c[0].length)){if(c=d,p=m,this.options.backtrack_lexer){if(s=this.test_match(d,o[m]),s!==!1)return s;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(s=this.test_match(c,o[p]),s!==!1?s:!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:r(function(){var s=this.next();return s||this.lex()},"lex"),begin:r(function(s){this.conditionStack.push(s)},"begin"),popState:r(function(){var s=this.conditionStack.length-1;return s>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(s){return s=this.conditionStack.length-1-Math.abs(s||0),s>=0?this.conditionStack[s]:"INITIAL"},"topState"),pushState:r(function(s){this.begin(s)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(s,c,d,p){switch(d){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return g}();f.lexer=_;function b(){this.yy={}}return r(b,"Parser"),b.prototype=f,f.Parser=b,new b}();U.parser=U;var St=U,st={};bt(st,{addEvent:()=>pt,addSection:()=>ct,addTask:()=>dt,addTaskOrg:()=>ut,clear:()=>ot,default:()=>Et,getCommonDb:()=>at,getSections:()=>lt,getTasks:()=>ht});var P="",rt=0,Y=[],B=[],z=[],at=r(()=>kt,"getCommonDb"),ot=r(function(){Y.length=0,B.length=0,P="",z.length=0,_t()},"clear"),ct=r(function(n){P=n,Y.push(n)},"addSection"),lt=r(function(){return Y},"getSections"),ht=r(function(){let n=et();const t=100;let e=0;for(;!n&&e<t;)n=et(),e++;return B.push(...z),B},"getTasks"),dt=r(function(n,t,e){const a={id:rt++,section:P,type:P,task:n,score:t||0,events:e?[e]:[]};z.push(a)},"addTask"),pt=r(function(n){z.find(t=>t.id===rt-1).events.push(n)},"addEvent"),ut=r(function(n){const t={section:P,type:P,description:n,task:n,classes:[]};B.push(t)},"addTaskOrg"),et=r(function(){const n=r(function(e){return z[e].processed},"compileTask");let t=!0;for(const[e,a]of z.entries())n(e),t=t&&a.processed;return t},"compileTasks"),Et={clear:ot,getCommonDb:at,addSection:ct,getSections:lt,getTasks:ht,addTask:dt,addTaskOrg:ut,addEvent:pt},Tt=12,V=r(function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),Nt=r(function(n,t){const e=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),a=n.append("g");a.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function i(y){const u=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}r(i,"smile");function l(y){const u=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}r(l,"sad");function h(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r(h,"ambivalent"),t.score>3?i(a):t.score<3?l(a):h(a),e},"drawFace"),At=r(function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),yt=r(function(n,t){const e=t.text.replace(/<br\s*\/?>/gi," "),a=n.append("text");a.attr("x",t.x),a.attr("y",t.y),a.attr("class","legend"),a.style("text-anchor",t.anchor),t.class!==void 0&&a.attr("class",t.class);const i=a.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(e),a},"drawText"),Lt=r(function(n,t){function e(i,l,h,y,u){return i+","+l+" "+(i+h)+","+l+" "+(i+h)+","+(l+y-u)+" "+(i+h-u*1.2)+","+(l+y)+" "+i+","+(l+y)}r(e,"genPoints");const a=n.append("polygon");a.attr("points",e(t.x,t.y,50,20,7)),a.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,yt(n,t)},"drawLabel"),Ct=r(function(n,t,e){const a=n.append("g"),i=X();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,V(a,i),gt(e)(t.text,a,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),nt=-1,It=r(function(n,t,e){const a=t.x+e.width/2,i=n.append("g");nt++;const l=300+5*30;i.append("line").attr("id","task"+nt).attr("x1",a).attr("y1",t.y).attr("x2",a).attr("y2",l).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Nt(i,{cx:a,cy:300+(5-t.score)*30,score:t.score});const h=X();h.x=t.x,h.y=t.y,h.fill=t.fill,h.width=e.width,h.height=e.height,h.class="task task-type-"+t.num,h.rx=3,h.ry=3,V(i,h),gt(e)(t.task,i,h.x,h.y,h.width,h.height,{class:"task"},e,t.colour)},"drawTask"),Ht=r(function(n,t){V(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Mt=r(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),X=r(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),gt=function(){function n(i,l,h,y,u,f,_,b){const g=l.append("text").attr("x",h+u/2).attr("y",y+f/2+5).style("font-color",b).style("text-anchor","middle").text(i);a(g,_)}r(n,"byText");function t(i,l,h,y,u,f,_,b,g){const{taskFontSize:s,taskFontFamily:c}=b,d=i.split(/<br\s*\/?>/gi);for(let p=0;p<d.length;p++){const o=p*s-s*(d.length-1)/2,m=l.append("text").attr("x",h+u/2).attr("y",y).attr("fill",g).style("text-anchor","middle").style("font-size",s).style("font-family",c);m.append("tspan").attr("x",h+u/2).attr("dy",o).text(d[p]),m.attr("y",y+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(m,_)}}r(t,"byTspan");function e(i,l,h,y,u,f,_,b){const g=l.append("switch"),s=g.append("foreignObject").attr("x",h).attr("y",y).attr("width",u).attr("height",f).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");s.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),t(i,g,h,y,u,f,_,b),a(s,_)}r(e,"byFo");function a(i,l){for(const h in l)h in l&&i.attr(h,l[h])}return r(a,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?e:i.textPlacement==="old"?n:t}}(),jt=r(function(n){n.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function Q(n,t){n.each(function(){var e=R(this),a=e.text().split(/(\s+|<br>)/).reverse(),i,l=[],h=1.1,y=e.attr("y"),u=parseFloat(e.attr("dy")),f=e.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",u+"em");for(let _=0;_<a.length;_++)i=a[a.length-1-_],l.push(i),f.text(l.join(" ").trim()),(f.node().getComputedTextLength()>t||i==="<br>")&&(l.pop(),f.text(l.join(" ").trim()),i==="<br>"?l=[""]:l=[i],f=e.append("tspan").attr("x",0).attr("y",y).attr("dy",h+"em").text(i))})}r(Q,"wrap");var Ot=r(function(n,t,e,a){const i=e%Tt-1,l=n.append("g");t.section=i,l.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const h=l.append("g"),y=l.append("g"),u=y.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Q,t.width).node().getBBox(),f=a.fontSize?.replace?a.fontSize.replace("px",""):a.fontSize;return t.height=u.height+f*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,y.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),zt(h,t,i,a),t},"drawNode"),Pt=r(function(n,t,e){const a=n.append("g"),i=a.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(Q,t.width).node().getBBox(),l=e.fontSize?.replace?e.fontSize.replace("px",""):e.fontSize;return a.remove(),i.height+l*1.1*.5+t.padding},"getVirtualNodeHeight"),zt=r(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),j={drawRect:V,drawCircle:At,drawSection:Ct,drawText:yt,drawLabel:Lt,drawTask:It,drawBackgroundRect:Ht,getTextObj:Mt,getNoteRect:X,initGraphics:jt,drawNode:Ot,getVirtualNodeHeight:Pt},Dt=r(function(n,t,e,a){const i=mt(),l=i.timeline?.leftMargin??50;$.debug("timeline",a.db);const h=i.securityLevel;let y;h==="sandbox"&&(y=R("#i"+t));const u=(h==="sandbox"?R(y.nodes()[0].contentDocument.body):R("body")).select("#"+t);u.append("g");const f=a.db.getTasks(),_=a.db.getCommonDb().getDiagramTitle();$.debug("task",f),j.initGraphics(u);const b=a.db.getSections();$.debug("sections",b);let g=0,s=0,c=0,d=0,p=50+l,o=50;d=50;let m=0,k=!0;b.forEach(function(A){const w={number:m,descr:A,section:m,width:150,padding:20,maxHeight:g},x=j.getVirtualNodeHeight(u,w,i);$.debug("sectionHeight before draw",x),g=Math.max(g,x+20)});let N=0,I=0;$.debug("tasks.length",f.length);for(const[A,w]of f.entries()){const x={number:A,descr:w,section:w.section,width:150,padding:20,maxHeight:s},S=j.getVirtualNodeHeight(u,x,i);$.debug("taskHeight before draw",S),s=Math.max(s,S+20),N=Math.max(N,w.events.length);let L=0;for(const H of w.events){const G={descr:H,section:w.section,number:w.section,width:150,padding:20,maxHeight:50};L+=j.getVirtualNodeHeight(u,G,i)}w.events.length>0&&(L+=(w.events.length-1)*10),I=Math.max(I,L)}$.debug("maxSectionHeight before draw",g),$.debug("maxTaskHeight before draw",s),b&&b.length>0?b.forEach(A=>{const w=f.filter(H=>H.section===A),x={number:m,descr:A,section:m,width:200*Math.max(w.length,1)-50,padding:20,maxHeight:g};$.debug("sectionNode",x);const S=u.append("g"),L=j.drawNode(S,x,m,i);$.debug("sectionNode output",L),S.attr("transform",`translate(${p}, ${d})`),o+=g+50,w.length>0&&it(u,w,m,p,o,s,i,N,I,g,!1),p+=200*Math.max(w.length,1),o=d,m++}):(k=!1,it(u,f,m,p,o,s,i,N,I,g,!0));const D=u.node().getBBox();$.debug("bounds",D),_&&u.append("text").text(_).attr("x",D.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),c=k?g+s+150:s+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",l).attr("y1",c).attr("x2",D.width+3*l).attr("y2",c).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),xt(void 0,u,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),it=r(function(n,t,e,a,i,l,h,y,u,f,_){for(const b of t){const g={descr:b.task,section:e,number:e,width:150,padding:20,maxHeight:l};$.debug("taskNode",g);const s=n.append("g").attr("class","taskWrapper"),c=j.drawNode(s,g,e,h).height;if($.debug("taskHeight after draw",c),s.attr("transform",`translate(${a}, ${i})`),l=Math.max(l,c),b.events){const d=n.append("g").attr("class","lineWrapper");let p=l;i+=100,p=p+Ft(n,b.events,e,a,i,h),i-=100,d.append("line").attr("x1",a+190/2).attr("y1",i+l).attr("x2",a+190/2).attr("y2",i+l+100+u+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}a=a+200,_&&!h.timeline?.disableMulticolor&&e++}i=i-10},"drawTasks"),Ft=r(function(n,t,e,a,i,l){let h=0;const y=i;i=i+100;for(const u of t){const f={descr:u,section:e,number:e,width:150,padding:20,maxHeight:50};$.debug("eventNode",f);const _=n.append("g").attr("class","eventWrapper"),b=j.drawNode(_,f,e,l).height;h=h+b,_.attr("transform",`translate(${a}, ${i})`),i=i+10+b}return i=y,h},"drawEvents"),Wt={setConf:r(()=>{},"setConf"),draw:Dt},Rt=r(n=>{let t="";for(let e=0;e<n.THEME_COLOR_LIMIT;e++)n["lineColor"+e]=n["lineColor"+e]||n["cScaleInv"+e],wt(n["lineColor"+e])?n["lineColor"+e]=vt(n["lineColor"+e],20):n["lineColor"+e]=$t(n["lineColor"+e],20);for(let e=0;e<n.THEME_COLOR_LIMIT;e++){const a=""+(17-3*e);t+=`
|
|
.section-${e-1} rect, .section-${e-1} path, .section-${e-1} circle, .section-${e-1} path {
|
|
fill: ${n["cScale"+e]};
|
|
}
|
|
.section-${e-1} text {
|
|
fill: ${n["cScaleLabel"+e]};
|
|
}
|
|
.node-icon-${e-1} {
|
|
font-size: 40px;
|
|
color: ${n["cScaleLabel"+e]};
|
|
}
|
|
.section-edge-${e-1}{
|
|
stroke: ${n["cScale"+e]};
|
|
}
|
|
.edge-depth-${e-1}{
|
|
stroke-width: ${a};
|
|
}
|
|
.section-${e-1} line {
|
|
stroke: ${n["cScaleInv"+e]} ;
|
|
stroke-width: 3;
|
|
}
|
|
|
|
.lineWrapper line{
|
|
stroke: ${n["cScaleLabel"+e]} ;
|
|
}
|
|
|
|
.disabled, .disabled circle, .disabled text {
|
|
fill: lightgray;
|
|
}
|
|
.disabled text {
|
|
fill: #efefef;
|
|
}
|
|
`}return t},"genSections"),Bt=r(n=>`
|
|
.edge {
|
|
stroke-width: 3;
|
|
}
|
|
${Rt(n)}
|
|
.section-root rect, .section-root path, .section-root circle {
|
|
fill: ${n.git0};
|
|
}
|
|
.section-root text {
|
|
fill: ${n.gitBranchLabel0};
|
|
}
|
|
.icon-container {
|
|
height:100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.edge {
|
|
fill: none;
|
|
}
|
|
.eventWrapper {
|
|
filter: brightness(120%);
|
|
}
|
|
`,"getStyles"),Vt=Bt,oe={db:st,renderer:Wt,parser:St,styles:Vt};export{oe as diagram};
|
|
//# sourceMappingURL=timeline-definition-IT6M3QCI-CuIbrCtc.chunk.mjs.map
|