%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/nextcloud.varak.net/apps/text/js/
Upload File :
Create Path :
Current File : /www/varak.net/nextcloud.varak.net/apps/text/js/timeline-definition-85554ec2-C71xEkm_.chunk.mjs

/*! third party licenses: js/vendor.LICENSE.txt */
import{b2 as yt,A as gt,c as ft,l as $,h as R,u as mt,b3 as xt,b4 as bt,b5 as kt}from"./mermaid.core-ChD64xgE.chunk.mjs";import{a as Z}from"./arc-BPz8SdaE.chunk.mjs";import"./modulepreload-polyfill-DMTabKmO.chunk.mjs";import"./emoji-picker-SoWZqoso.chunk.mjs";import"./vue.runtime.esm-fZsuJKoo.chunk.mjs";import"./path-D16fQfbf.chunk.mjs";var X=function(){var n=function(f,i,a,l){for(a=a||{},l=f.length;l--;a[f[l]]=i);return a},t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],s=[1,10],r=[1,11],h=[1,12],c=[1,13],u=[1,16],y=[1,17],g={trace:function(){},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:function(f,i,a,l,d,o,m){var x=o.length-1;switch(d){case 1:return o[x-1];case 2:this.$=[];break;case 3:o[x-1].push(o[x]),this.$=o[x-1];break;case 4:case 5:this.$=o[x];break;case 6:case 7:this.$=[];break;case 8:l.getCommonDb().setDiagramTitle(o[x].substr(6)),this.$=o[x].substr(6);break;case 9:this.$=o[x].trim(),l.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[x].trim(),l.getCommonDb().setAccDescription(this.$);break;case 12:l.addSection(o[x].substr(8)),this.$=o[x].substr(8);break;case 15:l.addTask(o[x],0,""),this.$=o[x];break;case 16:l.addEvent(o[x].substr(2)),this.$=o[x];break}},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:s,14:r,16:h,17:c,18:14,19:15,20:u,21:y},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:s,14:r,16:h,17:c,18:14,19:15,20:u,21:y},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:function(f,i){if(i.recoverable)this.trace(f);else{var a=new Error(f);throw a.hash=i,a}},parse:function(f){var i=this,a=[0],l=[],d=[null],o=[],m=this.table,x="",S=0,D=0,z=2,C=1,W=o.slice.call(arguments,1),k=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);k.setInput(f,I.yy),I.yy.lexer=k,I.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var M=k.yylloc;o.push(M);var w=k.options&&k.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function T(){var P;return P=l.pop()||k.lex()||C,typeof P!="number"&&(P instanceof Array&&(l=P,P=l.pop()),P=i.symbols_[P]||P),P}for(var _,E,v,B,L={},F,A,Y,V;;){if(E=a[a.length-1],this.defaultActions[E]?v=this.defaultActions[E]:((_===null||typeof _>"u")&&(_=T()),v=m[E]&&m[E][_]),typeof v>"u"||!v.length||!v[0]){var U="";V=[];for(F in m[E])this.terminals_[F]&&F>z&&V.push("'"+this.terminals_[F]+"'");k.showPosition?U="Parse error on line "+(S+1)+":\n"+k.showPosition()+"\nExpecting "+V.join(", ")+", got '"+(this.terminals_[_]||_)+"'":U="Parse error on line "+(S+1)+": Unexpected "+(_==C?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(U,{text:k.match,token:this.terminals_[_]||_,line:k.yylineno,loc:M,expected:V})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(v[0]){case 1:a.push(_),d.push(k.yytext),o.push(k.yylloc),a.push(v[1]),_=null,D=k.yyleng,x=k.yytext,S=k.yylineno,M=k.yylloc;break;case 2:if(A=this.productions_[v[1]][1],L.$=d[d.length-A],L._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},w&&(L._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),B=this.performAction.apply(L,[x,D,S,I.yy,v[1],d,o].concat(W)),typeof B<"u")return B;A&&(a=a.slice(0,-1*A*2),d=d.slice(0,-1*A),o=o.slice(0,-1*A)),a.push(this.productions_[v[1]][0]),d.push(L.$),o.push(L._$),Y=m[a[a.length-2]][a[a.length-1]],a.push(Y);break;case 3:return!0}}return!0}},p=function(){var f={EOF:1,parseError:function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},setInput:function(i,a){return this.yy=a||this.yy||{},this._input=i,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},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var a=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var d=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),l.length-1&&(this.yylineno-=l.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:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+"\n"+a+"^"},test_match:function(i,a){var l,d,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))),d=i[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var m in o)this[m]=o[m];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,l,d;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),m=0;m<o.length;m++)if(l=this._input.match(this.rules[o[m]]),l&&(!a||l[0].length>a[0].length)){if(a=l,d=m,this.options.backtrack_lexer){if(i=this.test_match(l,o[m]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,o[d]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return i||this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},pushState:function(i){this.begin(i)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(i,a,l,d){switch(l){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"}},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;]+)/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 f}();g.lexer=p;function b(){this.yy={}}return b.prototype=g,g.Parser=b,new b}();X.parser=X;const _t=X;let N="",nt=0;const K=[],q=[],j=[],it=()=>yt,rt=function(){K.length=0,q.length=0,N="",j.length=0,gt()},st=function(n){N=n,K.push(n)},at=function(){return K},ot=function(){let n=J();const t=100;let e=0;for(;!n&&e<t;)n=J(),e++;return q.push(...j),q},ct=function(n,t,e){const s={id:nt++,section:N,type:N,task:n,score:t||0,events:e?[e]:[]};j.push(s)},lt=function(n){j.find(t=>t.id===nt-1).events.push(n)},ht=function(n){const t={section:N,type:N,description:n,task:n,classes:[]};q.push(t)},J=function(){const n=function(e){return j[e].processed};let t=!0;for(const[e,s]of j.entries())n(e),t=t&&s.processed;return t},vt={clear:rt,getCommonDb:it,addSection:st,getSections:at,getTasks:ot,addTask:ct,addTaskOrg:ht,addEvent:lt},wt=Object.freeze(Object.defineProperty({__proto__:null,addEvent:lt,addSection:st,addTask:ct,addTaskOrg:ht,clear:rt,default:vt,getCommonDb:it,getSections:at,getTasks:ot},Symbol.toStringTag,{value:"Module"})),$t=12,G=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},St=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"),s=n.append("g");s.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"),s.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 r(u){const y=Z().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",y).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}function h(u){const y=Z().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",y).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}function c(u){u.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 t.score>3?r(s):t.score<3?h(s):c(s),e},Et=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},dt=function(n,t){const e=t.text.replace(/<br\s*\/?>/gi," "),s=n.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class!==void 0&&s.attr("class",t.class);const r=s.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(e),s},It=function(n,t){function e(r,h,c,u,y){return r+","+h+" "+(r+c)+","+h+" "+(r+c)+","+(h+u-y)+" "+(r+c-y*1.2)+","+(h+u)+" "+r+","+(h+u)}const s=n.append("polygon");s.attr("points",e(t.x,t.y,50,20,7)),s.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,dt(n,t)},Mt=function(n,t,e){const s=n.append("g"),r=Q();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=e.width,r.height=e.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,G(s,r),ut(e)(t.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},e,t.colour)};let tt=-1;const Tt=function(n,t,e){const s=t.x+e.width/2,r=n.append("g");tt++;const h=300+5*30;r.append("line").attr("id","task"+tt).attr("x1",s).attr("y1",t.y).attr("x2",s).attr("y2",h).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),St(r,{cx:s,cy:300+(5-t.score)*30,score:t.score});const c=Q();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,G(r,c),t.x+14,ut(e)(t.task,r,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},At=function(n,t){G(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},Pt=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},Q=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},ut=function(){function n(r,h,c,u,y,g,p,b){const f=h.append("text").attr("x",c+y/2).attr("y",u+g/2+5).style("font-color",b).style("text-anchor","middle").text(r);s(f,p)}function t(r,h,c,u,y,g,p,b,f){const{taskFontSize:i,taskFontFamily:a}=b,l=r.split(/<br\s*\/?>/gi);for(let d=0;d<l.length;d++){const o=d*i-i*(l.length-1)/2,m=h.append("text").attr("x",c+y/2).attr("y",u).attr("fill",f).style("text-anchor","middle").style("font-size",i).style("font-family",a);m.append("tspan").attr("x",c+y/2).attr("dy",o).text(l[d]),m.attr("y",u+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(m,p)}}function e(r,h,c,u,y,g,p,b){const f=h.append("switch"),i=f.append("foreignObject").attr("x",c).attr("y",u).attr("width",y).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");i.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),t(r,f,c,u,y,g,p,b),s(i,p)}function s(r,h){for(const c in h)c in h&&r.attr(c,h[c])}return function(r){return r.textPlacement==="fo"?e:r.textPlacement==="old"?n:t}}(),Ct=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")};function pt(n,t){n.each(function(){var e=R(this),s=e.text().split(/(\s+|<br>)/).reverse(),r,h=[],c=1.1,u=e.attr("y"),y=parseFloat(e.attr("dy")),g=e.text(null).append("tspan").attr("x",0).attr("y",u).attr("dy",y+"em");for(let p=0;p<s.length;p++)r=s[s.length-1-p],h.push(r),g.text(h.join(" ").trim()),(g.node().getComputedTextLength()>t||r==="<br>")&&(h.pop(),g.text(h.join(" ").trim()),r==="<br>"?h=[""]:h=[r],g=e.append("tspan").attr("x",0).attr("y",u).attr("dy",c+"em").text(r))})}const Ht=function(n,t,e,s){const r=e%$t-1,h=n.append("g");t.section=r,h.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+r));const c=h.append("g"),u=h.append("g"),y=u.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,t.width).node().getBBox(),g=s.fontSize&&s.fontSize.replace?s.fontSize.replace("px",""):s.fontSize;return t.height=y.height+g*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,u.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),Ot(c,t,r),t},zt=function(n,t,e){const s=n.append("g"),r=s.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,t.width).node().getBBox(),h=e.fontSize&&e.fontSize.replace?e.fontSize.replace("px",""):e.fontSize;return s.remove(),r.height+h*1.1*.5+t.padding},Ot=function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d","M0 ".concat(t.height-5," v").concat(-t.height+2*5," q0,-5 5,-5 h").concat(t.width-2*5," q5,0 5,5 v").concat(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)},H={drawRect:G,drawCircle:Et,drawSection:Mt,drawText:dt,drawLabel:It,drawTask:Tt,drawBackgroundRect:At,getTextObj:Pt,getNoteRect:Q,initGraphics:Ct,drawNode:Ht,getVirtualNodeHeight:zt},Lt=function(n,t,e,s){var k,I,O;var r,h;const c=ft(),u=(k=c.leftMargin)!=null?k:50;$.debug("timeline",s.db);const y=c.securityLevel;let g;y==="sandbox"&&(g=R("#i"+t));const p=(y==="sandbox"?R(g.nodes()[0].contentDocument.body):R("body")).select("#"+t);p.append("g");const b=s.db.getTasks(),f=s.db.getCommonDb().getDiagramTitle();$.debug("task",b),H.initGraphics(p);const i=s.db.getSections();$.debug("sections",i);let a=0,l=0,d=0,o=0,m=50+u,x=50;o=50;let S=0,D=!0;i.forEach(function(M){const w={number:S,descr:M,section:S,width:150,padding:20,maxHeight:a},T=H.getVirtualNodeHeight(p,w,c);$.debug("sectionHeight before draw",T),a=Math.max(a,T+20)});let z=0,C=0;$.debug("tasks.length",b.length);for(const[M,w]of b.entries()){const T={number:M,descr:w,section:w.section,width:150,padding:20,maxHeight:l},_=H.getVirtualNodeHeight(p,T,c);$.debug("taskHeight before draw",_),l=Math.max(l,_+20),z=Math.max(z,w.events.length);let E=0;for(let v=0;v<w.events.length;v++){const B={descr:w.events[v],section:w.section,number:w.section,width:150,padding:20,maxHeight:50};E+=H.getVirtualNodeHeight(p,B,c)}C=Math.max(C,E)}$.debug("maxSectionHeight before draw",a),$.debug("maxTaskHeight before draw",l),i&&i.length>0?i.forEach(M=>{const w=b.filter(v=>v.section===M),T={number:S,descr:M,section:S,width:200*Math.max(w.length,1)-50,padding:20,maxHeight:a};$.debug("sectionNode",T);const _=p.append("g"),E=H.drawNode(_,T,S,c);$.debug("sectionNode output",E),_.attr("transform","translate(".concat(m,", ").concat(o,")")),x+=a+50,w.length>0&&et(p,w,S,m,x,l,c,z,C,a,!1),m+=200*Math.max(w.length,1),x=o,S++}):(D=!1,et(p,b,S,m,x,l,c,z,C,a,!0));const W=p.node().getBBox();$.debug("bounds",W),f&&p.append("text").text(f).attr("x",W.width/2-u).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),d=D?a+l+150:l+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",u).attr("y1",d).attr("x2",W.width+3*u).attr("y2",d).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),mt(void 0,p,(I=(r=c.timeline)==null?void 0:r.padding)!=null?I:50,(O=(h=c.timeline)==null?void 0:h.useMaxWidth)!=null?O:!1)},et=function(n,t,e,s,r,h,c,u,y,g,p){var b;for(const f of t){const i={descr:f.task,section:e,number:e,width:150,padding:20,maxHeight:h};$.debug("taskNode",i);const a=n.append("g").attr("class","taskWrapper"),l=H.drawNode(a,i,e,c).height;if($.debug("taskHeight after draw",l),a.attr("transform","translate(".concat(s,", ").concat(r,")")),h=Math.max(h,l),f.events){const d=n.append("g").attr("class","lineWrapper");let o=h;r+=100,o=o+Nt(n,f.events,e,s,r,c),r-=100,d.append("line").attr("x1",s+190/2).attr("y1",r+h).attr("x2",s+190/2).attr("y2",r+h+(p?h:g)+y+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s=s+200,p&&!((b=c.timeline)!=null&&b.disableMulticolor)&&e++}r=r-10},Nt=function(n,t,e,s,r,h){let c=0;const u=r;r=r+100;for(const y of t){const g={descr:y,section:e,number:e,width:150,padding:20,maxHeight:50};$.debug("eventNode",g);const p=n.append("g").attr("class","eventWrapper"),b=H.drawNode(p,g,e,h).height;c=c+b,p.attr("transform","translate(".concat(s,", ").concat(r,")")),r=r+10+b}return r=u,c},jt={setConf:()=>{},draw:Lt},Dt=n=>{let t="";for(let e=0;e<n.THEME_COLOR_LIMIT;e++)n["lineColor"+e]=n["lineColor"+e]||n["cScaleInv"+e],xt(n["lineColor"+e])?n["lineColor"+e]=bt(n["lineColor"+e],20):n["lineColor"+e]=kt(n["lineColor"+e],20);for(let e=0;e<n.THEME_COLOR_LIMIT;e++){const s=""+(17-3*e);t+="\n    .section-".concat(e-1," rect, .section-").concat(e-1," path, .section-").concat(e-1," circle, .section-").concat(e-1," path  {\n      fill: ").concat(n["cScale"+e],";\n    }\n    .section-").concat(e-1," text {\n     fill: ").concat(n["cScaleLabel"+e],";\n    }\n    .node-icon-").concat(e-1," {\n      font-size: 40px;\n      color: ").concat(n["cScaleLabel"+e],";\n    }\n    .section-edge-").concat(e-1,"{\n      stroke: ").concat(n["cScale"+e],";\n    }\n    .edge-depth-").concat(e-1,"{\n      stroke-width: ").concat(s,";\n    }\n    .section-").concat(e-1," line {\n      stroke: ").concat(n["cScaleInv"+e]," ;\n      stroke-width: 3;\n    }\n\n    .lineWrapper line{\n      stroke: ").concat(n["cScaleLabel"+e]," ;\n    }\n\n    .disabled, .disabled circle, .disabled text {\n      fill: lightgray;\n    }\n    .disabled text {\n      fill: #efefef;\n    }\n    ")}return t},Wt=n=>"\n  .edge {\n    stroke-width: 3;\n  }\n  ".concat(Dt(n),"\n  .section-root rect, .section-root path, .section-root circle  {\n    fill: ").concat(n.git0,";\n  }\n  .section-root text {\n    fill: ").concat(n.gitBranchLabel0,";\n  }\n  .icon-container {\n    height:100%;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n  }\n  .edge {\n    fill: none;\n  }\n  .eventWrapper  {\n   filter: brightness(120%);\n  }\n"),Bt=Wt,Xt={db:wt,renderer:jt,parser:_t,styles:Bt};export{Xt as diagram};

Zerion Mini Shell 1.0