import{_ as r,c as mt,l as S,d as R,ac as xt,ad as bt,ae as kt,af as _t,D as wt,ag as vt,z as St}from"./mermaid.core-BxtrgwOm.chunk.mjs";import{d as tt}from"./arc-DK09IL_E.chunk.mjs";import"./index-CYtgifWR.chunk.mjs";import"./emoji-picker-B23JpFV7.chunk.mjs";import"./NcLoadingIcon-zQCGdPwE.chunk.mjs";import"./vue.runtime.esm-fahCO3eG.chunk.mjs";import"./index-DxwFe63_.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],h=[1,12],l=[1,13],y=[1,16],p=[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,u,o,m){var k=o.length-1;switch(u){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:h,17:l,18:14,19:15,20:y,21:p},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:a,14:i,16:h,17:l,18:14,19:15,20:y,21:p},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=[],u=[null],o=[],m=this.table,k="",M=0,P=0,D=2,N=1,w=o.slice.call(arguments,1),x=Object.create(this.lexer),E={yy:{}};for(var C in this.yy)Object.prototype.hasOwnProperty.call(this.yy,C)&&(E.yy[C]=this.yy[C]);x.setInput(g,E.yy),E.yy.lexer=x,E.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var H=x.yylloc;o.push(H);var G=x.options&&x.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft($){c.length=c.length-2*$,u.length=u.length-$,o.length=o.length-$}r(ft,"popStack");function J(){var $;return $=d.pop()||x.lex()||N,typeof $!="number"&&($ instanceof Array&&(d=$,$=d.pop()),$=s.symbols_[$]||$),$}r(J,"lex");for(var v,L,T,Z,j={},F,I,K,W;;){if(L=c[c.length-1],this.defaultActions[L]?T=this.defaultActions[L]:((v===null||typeof v>"u")&&(v=J()),T=m[L]&&m[L][v]),typeof T>"u"||!T.length||!T[0]){var q="";W=[];for(F in m[L])this.terminals_[F]&&F>D&&W.push("'"+this.terminals_[F]+"'");x.showPosition?q="Parse error on line "+(M+1)+`: `+x.showPosition()+` Expecting `+W.join(", ")+", got '"+(this.terminals_[v]||v)+"'":q="Parse error on line "+(M+1)+": Unexpected "+(v==N?"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: "+L+", token: "+v);switch(T[0]){case 1:c.push(v),u.push(x.yytext),o.push(x.yylloc),c.push(T[1]),v=null,P=x.yyleng,k=x.yytext,M=x.yylineno,H=x.yylloc;break;case 2:if(I=this.productions_[T[1]][1],j.$=u[u.length-I],j._$={first_line:o[o.length-(I||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(I||1)].first_column,last_column:o[o.length-1].last_column},G&&(j._$.range=[o[o.length-(I||1)].range[0],o[o.length-1].range[1]]),Z=this.performAction.apply(j,[k,P,M,E.yy,T[1],u,o].concat(w)),typeof Z<"u")return Z;I&&(c=c.slice(0,-1*I*2),u=u.slice(0,-1*I),o=o.slice(0,-1*I)),c.push(this.productions_[T[1]][0]),u.push(j.$),o.push(j._$),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 u=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===u.length?this.yylloc.first_column:0)+u[u.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,u,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))),u=s[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.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,u;this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),m=0;mc[0].length)){if(c=d,u=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[u]),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,u){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 Et=U,st={};wt(st,{addEvent:()=>ut,addSection:()=>ct,addTask:()=>dt,addTaskOrg:()=>pt,clear:()=>ot,default:()=>$t,getCommonDb:()=>at,getSections:()=>lt,getTasks:()=>ht});var O="",rt=0,Y=[],V=[],z=[],at=r(()=>vt,"getCommonDb"),ot=r(function(){Y.length=0,V.length=0,O="",z.length=0,St()},"clear"),ct=r(function(n){O=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&&et.id===rt-1).events.push(n)},"addEvent"),pt=r(function(n){const t={section:O,type:O,description:n,task:n,classes:[]};V.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"),$t={clear:ot,getCommonDb:at,addSection:ct,getSections:lt,getTasks:ht,addTask:dt,addTaskOrg:pt,addEvent:ut},Tt=12,B=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"),Mt=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 p=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}r(i,"smile");function h(y){const p=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",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}r(h,"sad");function l(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(l,"ambivalent"),t.score>3?i(a):t.score<3?h(a):l(a),e},"drawFace"),Nt=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(//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"),Ct=r(function(n,t){function e(i,h,l,y,p){return i+","+h+" "+(i+l)+","+h+" "+(i+l)+","+(h+y-p)+" "+(i+l-p*1.2)+","+(h+y)+" "+i+","+(h+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"),It=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,B(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,Pt=r(function(n,t,e){const a=t.x+e.width/2,i=n.append("g");nt++,i.append("line").attr("id","task"+nt).attr("x1",a).attr("y1",t.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Mt(i,{cx:a,cy:300+(5-t.score)*30,score:t.score});const l=X();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=e.width,l.height=e.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,B(i,l),gt(e)(t.task,i,l.x,l.y,l.width,l.height,{class:"task"},e,t.colour)},"drawTask"),Ht=r(function(n,t){B(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Lt=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,h,l,y,p,f,_,b){const g=h.append("text").attr("x",l+p/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,h,l,y,p,f,_,b,g){const{taskFontSize:s,taskFontFamily:c}=b,d=i.split(//gi);for(let u=0;u)/).reverse(),i,h=[],l=1.1,y=e.attr("y"),p=parseFloat(e.attr("dy")),f=e.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",p+"em");for(let _=0;_t||i==="
")&&(h.pop(),f.text(h.join(" ").trim()),i==="
"?h=[""]:h=[i],f=e.append("tspan").attr("x",0).attr("y",y).attr("dy",l+"em").text(i))})}r(Q,"wrap");var jt=r(function(n,t,e,a){const i=e%Tt-1,h=n.append("g");t.section=i,h.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const l=h.append("g"),y=h.append("g"),p=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=p.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(l,t,i,a),t},"drawNode"),Ot=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(),h=e.fontSize?.replace?e.fontSize.replace("px",""):e.fontSize;return a.remove(),i.height+h*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+10} q0,-5 5,-5 h${t.width-10} 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"),A={drawRect:B,drawCircle:Nt,drawSection:It,drawText:yt,drawLabel:Ct,drawTask:Pt,drawBackgroundRect:Ht,getTextObj:Lt,getNoteRect:X,initGraphics:At,drawNode:jt,getVirtualNodeHeight:Ot},Dt=r(function(n,t,e,a){const i=mt(),h=i.timeline?.leftMargin??50;S.debug("timeline",a.db);const l=i.securityLevel;let y;l==="sandbox"&&(y=R("#i"+t));const p=(l==="sandbox"?R(y.nodes()[0].contentDocument.body):R("body")).select("#"+t);p.append("g");const f=a.db.getTasks(),_=a.db.getCommonDb().getDiagramTitle();S.debug("task",f),A.initGraphics(p);const b=a.db.getSections();S.debug("sections",b);let g=0,s=0,c=0,d=0,u=50+h,o=50;d=50;let m=0,k=!0;b.forEach(function(N){const w={number:m,descr:N,section:m,width:150,padding:20,maxHeight:g},x=A.getVirtualNodeHeight(p,w,i);S.debug("sectionHeight before draw",x),g=Math.max(g,x+20)});let M=0,P=0;S.debug("tasks.length",f.length);for(const[N,w]of f.entries()){const x={number:N,descr:w,section:w.section,width:150,padding:20,maxHeight:s},E=A.getVirtualNodeHeight(p,x,i);S.debug("taskHeight before draw",E),s=Math.max(s,E+20),M=Math.max(M,w.events.length);let C=0;for(const H of w.events){const G={descr:H,section:w.section,number:w.section,width:150,padding:20,maxHeight:50};C+=A.getVirtualNodeHeight(p,G,i)}w.events.length>0&&(C+=(w.events.length-1)*10),P=Math.max(P,C)}S.debug("maxSectionHeight before draw",g),S.debug("maxTaskHeight before draw",s),b&&b.length>0?b.forEach(N=>{const w=f.filter(H=>H.section===N),x={number:m,descr:N,section:m,width:200*Math.max(w.length,1)-50,padding:20,maxHeight:g};S.debug("sectionNode",x);const E=p.append("g"),C=A.drawNode(E,x,m,i);S.debug("sectionNode output",C),E.attr("transform",`translate(${u}, ${d})`),o+=g+50,w.length>0&&it(p,w,m,u,o,s,i,M,P,g,!1),u+=200*Math.max(w.length,1),o=d,m++}):(k=!1,it(p,f,m,u,o,s,i,M,P,g,!0));const D=p.node().getBBox();S.debug("bounds",D),_&&p.append("text").text(_).attr("x",D.width/2-h).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),c=k?g+s+150:s+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",h).attr("y1",c).attr("x2",D.width+3*h).attr("y2",c).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),xt(void 0,p,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),it=r(function(n,t,e,a,i,h,l,y,p,f,_){for(const b of t){const g={descr:b.task,section:e,number:e,width:150,padding:20,maxHeight:h};S.debug("taskNode",g);const s=n.append("g").attr("class","taskWrapper"),c=A.drawNode(s,g,e,l).height;if(S.debug("taskHeight after draw",c),s.attr("transform",`translate(${a}, ${i})`),h=Math.max(h,c),b.events){const d=n.append("g").attr("class","lineWrapper");let u=h;i+=100,u=u+Ft(n,b.events,e,a,i,l),i-=100,d.append("line").attr("x1",a+190/2).attr("y1",i+h).attr("x2",a+190/2).attr("y2",i+h+100+p+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}a=a+200,_&&!l.timeline?.disableMulticolor&&e++}i=i-10},"drawTasks"),Ft=r(function(n,t,e,a,i,h){let l=0;const y=i;i=i+100;for(const p of t){const f={descr:p,section:e,number:e,width:150,padding:20,maxHeight:50};S.debug("eventNode",f);const _=n.append("g").attr("class","eventWrapper"),b=A.drawNode(_,f,e,h).height;l=l+b,_.attr("transform",`translate(${a}, ${i})`),i=i+10+b}return i=y,l},"drawEvents"),Wt={setConf:r(()=>{},"setConf"),draw:Dt},Rt=r(n=>{let t="";for(let e=0;e` .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"),Bt=Vt,Jt={db:st,renderer:Wt,parser:Et,styles:Bt};export{Jt as diagram}; //# sourceMappingURL=timeline-definition-IT6M3QCI-DrptD8mO.chunk.mjs.map