(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62831,t=>{"use strict";var e=(0,t.i(84722).__name)(()=>`
  /* Font Awesome icon styling - consolidated */
  .label-icon {
    display: inline-block;
    height: 1em;
    overflow: visible;
    vertical-align: -0.125em;
  }
  
  .node .label-icon path {
    fill: currentColor;
    stroke: revert;
    stroke-width: revert;
  }
`,"getIconStyles");t.s(["getIconStyles",0,e])},27679,t=>{"use strict";var e=t.i(35279),n=t.i(84722),i=t.i(39878);t.i(26286);var a=t.i(70837),r=(0,n.__name)((t,e)=>{let n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)n.attr(t,e.attrs[t]);return e.class&&n.attr("class",e.class),n},"drawRect"),s=(0,n.__name)((t,e)=>{r(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),l=(0,n.__name)((t,n)=>{let i=n.text.replace(e.lineBreakRegex," "),a=t.append("text");a.attr("x",n.x),a.attr("y",n.y),a.attr("class","legend"),a.style("text-anchor",n.anchor),n.class&&a.attr("class",n.class);let r=a.append("tspan");return r.attr("x",n.x+2*n.textMargin),r.text(i),a},"drawText"),o=(0,n.__name)((t,e,n,a)=>{let r=t.append("image");r.attr("x",e),r.attr("y",n);let s=(0,i.sanitizeUrl)(a);r.attr("xlink:href",s)},"drawImage"),c=(0,n.__name)((t,e,n,a)=>{let r=t.append("use");r.attr("x",e),r.attr("y",n);let s=(0,i.sanitizeUrl)(a);r.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),h=(0,n.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),u=(0,n.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),p=(0,n.__name)(()=>{let t=(0,a.select)(".mermaidTooltip");return t.empty()&&(t=(0,a.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,p,"drawBackgroundRect",0,s,"drawEmbeddedImage",0,c,"drawImage",0,o,"drawRect",0,r,"drawText",0,l,"getNoteRect",0,h,"getTextObj",0,u])},82543,t=>{"use strict";var e=t.i(86831),n=t.i(55599),i=t.i(22391);function a(t){return t.innerRadius}function r(t){return t.outerRadius}function s(t){return t.startAngle}function l(t){return t.endAngle}function o(t){return t&&t.padAngle}function c(t,e,i,a,r,s,l){var o=t-i,c=e-a,h=(l?s:-s)/(0,n.sqrt)(o*o+c*c),u=h*c,p=-h*o,y=t+u,d=e+p,f=i+u,m=a+p,g=(y+f)/2,_=(d+m)/2,x=f-y,k=m-d,b=x*x+k*k,v=r-s,w=y*m-f*d,$=(k<0?-1:1)*(0,n.sqrt)((0,n.max)(0,v*v*b-w*w)),T=(w*k-x*$)/b,M=(-w*x-k*$)/b,A=(w*k+x*$)/b,S=(-w*x+k*$)/b,C=T-g,E=M-_,I=A-g,P=S-_;return C*C+E*E>I*I+P*P&&(T=A,M=S),{cx:T,cy:M,x01:-u,y01:-p,x11:T*(r/v-1),y11:M*(r/v-1)}}t.s(["arc",0,function(){var t=a,h=r,u=(0,e.default)(0),p=null,y=s,d=l,f=o,m=null,g=(0,i.withPath)(_);function _(){var e,i,a=+t.apply(this,arguments),r=+h.apply(this,arguments),s=y.apply(this,arguments)-n.halfPi,l=d.apply(this,arguments)-n.halfPi,o=(0,n.abs)(l-s),_=l>s;if(m||(m=e=g()),r<a&&(i=r,r=a,a=i),r>n.epsilon)if(o>n.tau-n.epsilon)m.moveTo(r*(0,n.cos)(s),r*(0,n.sin)(s)),m.arc(0,0,r,s,l,!_),a>n.epsilon&&(m.moveTo(a*(0,n.cos)(l),a*(0,n.sin)(l)),m.arc(0,0,a,l,s,_));else{var x,k,b=s,v=l,w=s,$=l,T=o,M=o,A=f.apply(this,arguments)/2,S=A>n.epsilon&&(p?+p.apply(this,arguments):(0,n.sqrt)(a*a+r*r)),C=(0,n.min)((0,n.abs)(r-a)/2,+u.apply(this,arguments)),E=C,I=C;if(S>n.epsilon){var P=(0,n.asin)(S/a*(0,n.sin)(A)),R=(0,n.asin)(S/r*(0,n.sin)(A));(T-=2*P)>n.epsilon?(P*=_?1:-1,w+=P,$-=P):(T=0,w=$=(s+l)/2),(M-=2*R)>n.epsilon?(R*=_?1:-1,b+=R,v-=R):(M=0,b=v=(s+l)/2)}var j=r*(0,n.cos)(b),B=r*(0,n.sin)(b),F=a*(0,n.cos)($),V=a*(0,n.sin)($);if(C>n.epsilon){var D,O=r*(0,n.cos)(v),N=r*(0,n.sin)(v),L=a*(0,n.cos)(w),z=a*(0,n.sin)(w);if(o<n.pi)if(D=function(t,e,i,a,r,s,l,o){var c=i-t,h=a-e,u=l-r,p=o-s,y=p*c-u*h;if(!(y*y<n.epsilon))return y=(u*(e-s)-p*(t-r))/y,[t+y*c,e+y*h]}(j,B,L,z,O,N,F,V)){var q=j-D[0],U=B-D[1],Y=O-D[0],W=N-D[1],X=1/(0,n.sin)((0,n.acos)((q*Y+U*W)/((0,n.sqrt)(q*q+U*U)*(0,n.sqrt)(Y*Y+W*W)))/2),K=(0,n.sqrt)(D[0]*D[0]+D[1]*D[1]);E=(0,n.min)(C,(a-K)/(X-1)),I=(0,n.min)(C,(r-K)/(X+1))}else E=I=0}M>n.epsilon?I>n.epsilon?(x=c(L,z,j,B,r,I,_),k=c(O,N,F,V,r,I,_),m.moveTo(x.cx+x.x01,x.cy+x.y01),I<C?m.arc(x.cx,x.cy,I,(0,n.atan2)(x.y01,x.x01),(0,n.atan2)(k.y01,k.x01),!_):(m.arc(x.cx,x.cy,I,(0,n.atan2)(x.y01,x.x01),(0,n.atan2)(x.y11,x.x11),!_),m.arc(0,0,r,(0,n.atan2)(x.cy+x.y11,x.cx+x.x11),(0,n.atan2)(k.cy+k.y11,k.cx+k.x11),!_),m.arc(k.cx,k.cy,I,(0,n.atan2)(k.y11,k.x11),(0,n.atan2)(k.y01,k.x01),!_))):(m.moveTo(j,B),m.arc(0,0,r,b,v,!_)):m.moveTo(j,B),a>n.epsilon&&T>n.epsilon?E>n.epsilon?(x=c(F,V,O,N,a,-E,_),k=c(j,B,L,z,a,-E,_),m.lineTo(x.cx+x.x01,x.cy+x.y01),E<C?m.arc(x.cx,x.cy,E,(0,n.atan2)(x.y01,x.x01),(0,n.atan2)(k.y01,k.x01),!_):(m.arc(x.cx,x.cy,E,(0,n.atan2)(x.y01,x.x01),(0,n.atan2)(x.y11,x.x11),!_),m.arc(0,0,a,(0,n.atan2)(x.cy+x.y11,x.cx+x.x11),(0,n.atan2)(k.cy+k.y11,k.cx+k.x11),_),m.arc(k.cx,k.cy,E,(0,n.atan2)(k.y11,k.x11),(0,n.atan2)(k.y01,k.x01),!_))):m.arc(0,0,a,$,w,_):m.lineTo(F,V)}else m.moveTo(0,0);if(m.closePath(),e)return m=null,e+""||null}return _.centroid=function(){var e=(+t.apply(this,arguments)+ +h.apply(this,arguments))/2,i=(+y.apply(this,arguments)+ +d.apply(this,arguments))/2-n.pi/2;return[(0,n.cos)(i)*e,(0,n.sin)(i)*e]},_.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:(0,e.default)(+n),_):t},_.outerRadius=function(t){return arguments.length?(h="function"==typeof t?t:(0,e.default)(+t),_):h},_.cornerRadius=function(t){return arguments.length?(u="function"==typeof t?t:(0,e.default)(+t),_):u},_.padRadius=function(t){return arguments.length?(p=null==t?null:"function"==typeof t?t:(0,e.default)(+t),_):p},_.startAngle=function(t){return arguments.length?(y="function"==typeof t?t:(0,e.default)(+t),_):y},_.endAngle=function(t){return arguments.length?(d="function"==typeof t?t:(0,e.default)(+t),_):d},_.padAngle=function(t){return arguments.length?(f="function"==typeof t?t:(0,e.default)(+t),_):f},_.context=function(t){return arguments.length?(m=null==t?null:t,_):m},_}],82543)},81244,t=>{"use strict";var e=t.i(62831),n=t.i(27679),i=t.i(35279),a=t.i(84722);t.i(26286);var r=t.i(70837),s=t.i(82543),l=function(){var t=(0,a.__name)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],r=[1,11],s=[1,12],l=[1,13],o=[1,14],c={trace:(0,a.__name)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey: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,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",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",18:"taskName",19:"taskData"},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,2]],performAction:(0,a.__name)(function(t,e,n,i,a,r,s){var l=r.length-1;switch(a){case 1:return r[l-1];case 2:case 6:case 7:this.$=[];break;case 3:r[l-1].push(r[l]),this.$=r[l-1];break;case 4:case 5:this.$=r[l];break;case 8:i.setDiagramTitle(r[l].substr(6)),this.$=r[l].substr(6);break;case 9:this.$=r[l].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[l].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[l].substr(8)),this.$=r[l].substr(8);break;case 13:i.addTask(r[l-1],r[l]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:r,16:s,17:l,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:r,16:s,17:l,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,a.__name)(function(t,e){if(e.recoverable)this.trace(t);else{var n=Error(t);throw n.hash=e,n}},"parseError"),parse:(0,a.__name)(function(t){var e=this,n=[0],i=[],r=[null],s=[],l=this.table,o="",c=0,h=0,u=0,p=s.slice.call(arguments,1),y=Object.create(this.lexer),d={};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d[f]=this.yy[f]);y.setInput(t,d),d.lexer=y,d.parser=this,void 0===y.yylloc&&(y.yylloc={});var m=y.yylloc;s.push(m);var g=y.options&&y.options.ranges;function _(){var t;return"number"!=typeof(t=i.pop()||y.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.parseError?this.parseError=d.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.__name)(function(t){n.length=n.length-2*t,r.length=r.length-t,s.length=s.length-t},"popStack"),(0,a.__name)(_,"lex");for(var x,k,b,v,w,$,T,M,A,S={};;){if(b=n[n.length-1],this.defaultActions[b]?v=this.defaultActions[b]:(null==x&&(x=_()),v=l[b]&&l[b][x]),void 0===v||!v.length||!v[0]){var C="";for($ in A=[],l[b])this.terminals_[$]&&$>2&&A.push("'"+this.terminals_[$]+"'");C=y.showPosition?"Parse error on line "+(c+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(C,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:m,expected:A})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+b+", token: "+x);switch(v[0]){case 1:n.push(x),r.push(y.yytext),s.push(y.yylloc),n.push(v[1]),x=null,k?(x=k,k=null):(h=y.yyleng,o=y.yytext,c=y.yylineno,m=y.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[v[1]][1],S.$=r[r.length-T],S._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},g&&(S._$.range=[s[s.length-(T||1)].range[0],s[s.length-1].range[1]]),void 0!==(w=this.performAction.apply(S,[o,h,c,d,v[1],r,s].concat(p))))return w;T&&(n=n.slice(0,-1*T*2),r=r.slice(0,-1*T),s=s.slice(0,-1*T)),n.push(this.productions_[v[1]][0]),r.push(S.$),s.push(S._$),M=l[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0},"parse")};function h(){this.yy={}}return c.lexer={EOF:1,parseError:(0,a.__name)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,a.__name)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,a.__name)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.__name)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),n.length-1&&(this.yylineno-=n.length-1);var a=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.__name)(function(){return this._more=!0,this},"more"),reject:(0,a.__name)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:(0,a.__name)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.__name)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.__name)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.__name)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.__name)(function(t,e){var n,i,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var r in a)this[r]=a[r];return!1},"test_match"),next:(0,a.__name)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,a=this._currentRules(),r=0;r<a.length;r++)if((n=this._input.match(this.rules[a[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,a[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.__name)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.__name)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.__name)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.__name)(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:(0,a.__name)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.__name)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.__name)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.__name)(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;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 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\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,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/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,19],inclusive:!0}}},(0,a.__name)(h,"Parser"),h.prototype=c,c.Parser=h,new h}();l.parser=l;var o="",c=[],h=[],u=[],p=(0,a.__name)(function(){c.length=0,h.length=0,o="",u.length=0,(0,i.clear)()},"clear"),y=(0,a.__name)(function(t){o=t,c.push(t)},"addSection"),d=(0,a.__name)(function(){return c},"getSections"),f=(0,a.__name)(function(){let t=x(),e=0;for(;!t&&e<100;)t=x(),e++;return h.push(...u),h},"getTasks"),m=(0,a.__name)(function(){let t=[];return h.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),g=(0,a.__name)(function(t,e){let n=e.substr(1).split(":"),i=0,a=[];1===n.length?(i=Number(n[0]),a=[]):(i=Number(n[0]),a=n[1].split(","));let r=a.map(t=>t.trim()),s={section:o,type:o,people:r,task:t,score:i};u.push(s)},"addTask"),_=(0,a.__name)(function(t){let e={section:o,type:o,description:t,task:t,classes:[]};h.push(e)},"addTaskOrg"),x=(0,a.__name)(function(){let t=(0,a.__name)(function(t){return u[t].processed},"compileTask"),e=!0;for(let[n,i]of u.entries())t(n),e=e&&i.processed;return e},"compileTasks"),k=(0,a.__name)(function(){return m()},"getActors"),b={getConfig:(0,a.__name)(()=>(0,i.getConfig2)().journey,"getConfig"),clear:p,setDiagramTitle:i.setDiagramTitle,getDiagramTitle:i.getDiagramTitle,setAccTitle:i.setAccTitle,getAccTitle:i.getAccTitle,setAccDescription:i.setAccDescription,getAccDescription:i.getAccDescription,addSection:y,getSections:d,getTasks:f,addTask:g,addTaskOrg:_,getActors:k},v=(0,a.__name)(t=>`.label {
    font-family: ${t.fontFamily};
    color: ${t.textColor};
  }
  .mouth {
    stroke: #666;
  }

  line {
    stroke: ${t.textColor}
  }

  .legend {
    fill: ${t.textColor};
    font-family: ${t.fontFamily};
  }

  .label text {
    fill: #333;
  }
  .label {
    color: ${t.textColor}
  }

  .face {
    ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
    stroke: #999;
  }

  .node rect,
  .node circle,
  .node ellipse,
  .node polygon,
  .node path {
    fill: ${t.mainBkg};
    stroke: ${t.nodeBorder};
    stroke-width: 1px;
  }

  .node .label {
    text-align: center;
  }
  .node.clickable {
    cursor: pointer;
  }

  .arrowheadPath {
    fill: ${t.arrowheadColor};
  }

  .edgePath .path {
    stroke: ${t.lineColor};
    stroke-width: 1.5px;
  }

  .flowchart-link {
    stroke: ${t.lineColor};
    fill: none;
  }

  .edgeLabel {
    background-color: ${t.edgeLabelBackground};
    rect {
      opacity: 0.5;
    }
    text-align: center;
  }

  .cluster rect {
  }

  .cluster text {
    fill: ${t.titleColor};
  }

  div.mermaidTooltip {
    position: absolute;
    text-align: center;
    max-width: 200px;
    padding: 2px;
    font-family: ${t.fontFamily};
    font-size: 12px;
    background: ${t.tertiaryColor};
    border: 1px solid ${t.border2};
    border-radius: 2px;
    pointer-events: none;
    z-index: 100;
  }

  .task-type-0, .section-type-0  {
    ${t.fillType0?`fill: ${t.fillType0}`:""};
  }
  .task-type-1, .section-type-1  {
    ${t.fillType0?`fill: ${t.fillType1}`:""};
  }
  .task-type-2, .section-type-2  {
    ${t.fillType0?`fill: ${t.fillType2}`:""};
  }
  .task-type-3, .section-type-3  {
    ${t.fillType0?`fill: ${t.fillType3}`:""};
  }
  .task-type-4, .section-type-4  {
    ${t.fillType0?`fill: ${t.fillType4}`:""};
  }
  .task-type-5, .section-type-5  {
    ${t.fillType0?`fill: ${t.fillType5}`:""};
  }
  .task-type-6, .section-type-6  {
    ${t.fillType0?`fill: ${t.fillType6}`:""};
  }
  .task-type-7, .section-type-7  {
    ${t.fillType0?`fill: ${t.fillType7}`:""};
  }

  .actor-0 {
    ${t.actor0?`fill: ${t.actor0}`:""};
  }
  .actor-1 {
    ${t.actor1?`fill: ${t.actor1}`:""};
  }
  .actor-2 {
    ${t.actor2?`fill: ${t.actor2}`:""};
  }
  .actor-3 {
    ${t.actor3?`fill: ${t.actor3}`:""};
  }
  .actor-4 {
    ${t.actor4?`fill: ${t.actor4}`:""};
  }
  .actor-5 {
    ${t.actor5?`fill: ${t.actor5}`:""};
  }
  ${(0,e.getIconStyles)()}
`,"getStyles"),w=(0,a.__name)(function(t,e){return(0,n.drawRect)(t,e)},"drawRect"),$=(0,a.__name)(function(t,e){let n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function r(t){let n=(0,s.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){let n=(0,s.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,a.__name)(r,"smile"),(0,a.__name)(l,"sad"),(0,a.__name)(o,"ambivalent"),e.score>3?r(i):e.score<3?l(i):o(i),n},"drawFace"),T=(0,a.__name)(function(t,e){let n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),M=(0,a.__name)(function(t,e){return(0,n.drawText)(t,e)},"drawText"),A=(0,a.__name)(function(t,e,i){let a=t.append("g"),r=(0,n.getNoteRect)();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,w(a,r),E(i)(e.text,a,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),S=-1,C=(0,a.__name)(function(t,e,i,a){let r=e.x+i.width/2,s=t.append("g");S++,s.append("line").attr("id",a+"-task"+S).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),$(s,{cx:r,cy:300+(5-e.score)*30,score:e.score});let l=(0,n.getNoteRect)();l.x=e.x,l.y=e.y,l.fill=e.fill,l.width=i.width,l.height=i.height,l.class="task task-type-"+e.num,l.rx=3,l.ry=3,w(s,l);let o=e.x+14;e.people.forEach(t=>{let n=e.actors[t].color;T(s,{cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position}),o+=10}),E(i)(e.task,s,l.x,l.y,l.width,l.height,{class:"task"},i,e.colour)},"drawTask"),E=function(){function t(t,e,n,a,r,s,l,o){i(e.append("text").attr("x",n+r/2).attr("y",a+s/2+5).style("font-color",o).style("text-anchor","middle").text(t),l)}function e(t,e,n,a,r,s,l,o,c){let{taskFontSize:h,taskFontFamily:u}=o,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){let o=t*h-h*(p.length-1)/2,y=e.append("text").attr("x",n+r/2).attr("y",a).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);y.append("tspan").attr("x",n+r/2).attr("dy",o).text(p[t]),y.attr("y",a+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(y,l)}}function n(t,n,a,r,s,l,o,c){let h=n.append("switch"),u=h.append("foreignObject").attr("x",a).attr("y",r).attr("width",s).attr("height",l).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,a,r,s,l,o,c),i(u,o)}function i(t,e){for(let n in e)n in e&&t.attr(n,e[n])}return(0,a.__name)(t,"byText"),(0,a.__name)(e,"byTspan"),(0,a.__name)(n,"byFo"),(0,a.__name)(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),I=(0,a.__name)(function(t,e){S=-1,t.append("defs").append("marker").attr("id",e+"-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"),P=(0,a.__name)(function(t){Object.keys(t).forEach(function(e){F[e]=t[e]})},"setConf"),R={},j=0;function B(t){let e=(0,i.getConfig2)().journey,n=e.maxLabelWidth;j=0;let a=60;Object.keys(R).forEach(i=>{let r=R[i].color;T(t,{cx:20,cy:a,r:7,fill:r,stroke:"#000",pos:R[i].position});let s=t.append("text").attr("visibility","hidden").text(i),l=s.node().getBoundingClientRect().width;s.remove();let o=[];if(l<=n)o=[i];else{let e=i.split(" "),a="";s=t.append("text").attr("visibility","hidden"),e.forEach(t=>{let e=a?`${a} ${t}`:t;if(s.text(e),s.node().getBoundingClientRect().width>n){if(a&&o.push(a),a=t,s.text(t),s.node().getBoundingClientRect().width>n){let e="";for(let i of t)e+=i,s.text(e+"-"),s.node().getBoundingClientRect().width>n&&(o.push(e.slice(0,-1)+"-"),e=i);a=e}}else a=e}),a&&o.push(a),s.remove()}o.forEach((n,i)=>{let r=M(t,{x:40,y:a+7+20*i,fill:"#666",text:n,textMargin:e.boxTextMargin??5}).node().getBoundingClientRect().width;r>j&&r>e.leftMargin-r&&(j=r)}),a+=Math.max(20,20*o.length)})}(0,a.__name)(B,"drawActorLegend");var F=(0,i.getConfig2)().journey,V=0,D=(0,a.__name)(function(t,e,n,a){let s,l=(0,i.getConfig2)(),o=l.journey.titleColor,c=l.journey.titleFontSize,h=l.journey.titleFontFamily,u=l.securityLevel;"sandbox"===u&&(s=(0,r.select)("#i"+e));let p="sandbox"===u?(0,r.select)(s.nodes()[0].contentDocument.body):(0,r.select)("body");O.init();let y=p.select("#"+e);I(y,e);let d=a.db.getTasks(),f=a.db.getDiagramTitle(),m=a.db.getActors();for(let t in R)delete R[t];let g=0;m.forEach(t=>{R[t]={color:F.actorColours[g%F.actorColours.length],position:g},g++}),B(y),V=F.leftMargin+j,O.insert(0,0,V,50*Object.keys(R).length),z(y,d,0,e);let _=O.getBounds();f&&y.append("text").text(f).attr("x",V).attr("font-size",c).attr("font-weight","bold").attr("y",25).attr("fill",o).attr("font-family",h);let x=_.stopy-_.starty+2*F.diagramMarginY,k=V+_.stopx+2*F.diagramMarginX;(0,i.configureSvgSize)(y,x,k,F.useMaxWidth),y.append("line").attr("x1",V).attr("y1",4*F.height).attr("x2",k-V-4).attr("y2",4*F.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");let b=70*!!f;y.attr("viewBox",`${_.startx} -25 ${k} ${x+b}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",x+b+25)},"draw"),O={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,a.__name)(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:(0,a.__name)(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:(0,a.__name)(function(t,e,n,r){let s=(0,i.getConfig2)().journey,l=this,o=0;function c(i){return(0,a.__name)(function(a){o++;let c=l.sequenceItems.length-o+1;l.updateVal(a,"starty",e-c*s.boxMargin,Math.min),l.updateVal(a,"stopy",r+c*s.boxMargin,Math.max),l.updateVal(O.data,"startx",t-c*s.boxMargin,Math.min),l.updateVal(O.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==i&&(l.updateVal(a,"startx",t-c*s.boxMargin,Math.min),l.updateVal(a,"stopx",n+c*s.boxMargin,Math.max),l.updateVal(O.data,"starty",e-c*s.boxMargin,Math.min),l.updateVal(O.data,"stopy",r+c*s.boxMargin,Math.max))},"updateItemBounds")}(0,a.__name)(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:(0,a.__name)(function(t,e,n,i){let a=Math.min(t,n),r=Math.max(t,n),s=Math.min(e,i),l=Math.max(e,i);this.updateVal(O.data,"startx",a,Math.min),this.updateVal(O.data,"starty",s,Math.min),this.updateVal(O.data,"stopx",r,Math.max),this.updateVal(O.data,"stopy",l,Math.max),this.updateBounds(a,s,r,l)},"insert"),bumpVerticalPos:(0,a.__name)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:(0,a.__name)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,a.__name)(function(){return this.data},"getBounds")},N=F.sectionFills,L=F.sectionColours,z=(0,a.__name)(function(t,e,n,a){let r=(0,i.getConfig2)().journey,s="",l=n+(2*r.height+r.diagramMarginY),o=0,c="#CCC",h="black",u=0;for(let[n,i]of e.entries()){if(s!==i.section){c=N[o%N.length],u=o%N.length,h=L[o%L.length];let a=0,l=i.section;for(let t=n;t<e.length;t++)if(e[t].section==l)a+=1;else break;A(t,{x:n*r.taskMargin+n*r.width+V,y:50,text:i.section,fill:c,num:u,colour:h,taskCount:a},r),s=i.section,o++}let p=i.people.reduce((t,e)=>(R[e]&&(t[e]=R[e]),t),{});i.x=n*r.taskMargin+n*r.width+V,i.y=l,i.width=r.diagramMarginX,i.height=r.diagramMarginY,i.colour=h,i.fill=c,i.num=u,i.actors=p,C(t,i,r,a),O.insert(i.x,i.y,i.x+i.width+r.taskMargin,450)}},"drawTasks"),q={setConf:P,draw:D},U={parser:l,db:b,renderer:q,styles:v,init:(0,a.__name)(t=>{q.setConf(t.journey),b.clear()},"init")};t.s(["diagram",0,U])}]);