UNPKG

179 kBJavaScriptView Raw
1module.exports=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=21)}([function(t,e,r){"use strict";function n(t){var e=t.getUTCHours(),r=t.getUTCMinutes(),n=t.getSeconds(),i=t.getMilliseconds();return e<10&&(e="0"+e),r<10&&(r="0"+r),n<10&&(n="0"+n),i<100&&(i="0"+i),i<10&&(i="00"+i),e+":"+r+":"+n+" ("+i+")"}function i(t){return"%c "+n(new Date)+" :%c"+t+": "}var s=function(){},a=function(){},u=function(){},o=function(){},c=function(){};e.setLogLevel=function(t){t<6&&(e.Log.fatal=console.log.bind(console,i("FATAL"),"color:grey;","color: red;")),t<5&&(e.Log.error=console.log.bind(console,i("ERROR"),"color:grey;","color: red;")),t<4&&(e.Log.warn=console.log.bind(console,i("WARN"),"color:grey;","color: orange;")),t<3&&(e.Log.info=console.log.bind(console,i("INFO"),"color:grey;","color: info;")),t<2&&(e.Log.debug=console.log.bind(console,i("DEBUG"),"color:grey;","color: green;"))},e.Log={debug:s,info:a,warn:u,error:o,fatal:c}},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(22);t.exports=i,function(){var t=!1;if(t="tspans",i.selection.prototype.textwrap)return!1;void 0===t&&(t=!1),i.selection.prototype.textwrap=i.selection.enter.prototype.textwrap=function(e,r){r=parseInt(r)||0;var s,a=this,u=function(t){var e=t[0][0];if("rect"!==e.tagName.toString())return!1;var r={};return r.x=i.select(e).attr("x")||0,r.y=i.select(e).attr("y")||0,r.width=i.select(e).attr("width")||0,r.height=i.select(e).attr("height")||0,r.attr=t.attr,r},o=function(t){if(t.attr||(t.attr=function(t){if(this[t])return this[t]}),"object"===(void 0===t?"undefined":n(t))&&void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height)return t;if("function"==typeof Array.isArray&&Array.isArray(t)||"[object Array]"===Object.prototype.toString.call(t)){return u(t)}return!1}(e);if(r&&(o=function(t,e){var r=t;return 0!==e&&(r.x=parseInt(r.x)+e,r.y=parseInt(r.y)+e,r.width-=2*e,r.height-=2*e),r}(o,r)),0!==a.length&&i&&e&&o){e=o;var c,l=function(t){var r=i.select(t[0].parentNode),n=r.select("text"),a=n.style("line-height"),u=n.text();n.remove();var o=r.append("foreignObject");o.attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height);var c=o.append("xhtml:div").attr("class","wrapped");c.style("height",e.height).style("width",e.width).html(u),a&&c.style("line-height",a),s=r.select("foreignObject")},h=function(t){var n,a=t[0],u=a.parentNode,o=i.select(a),c=a.getBBox().height,l=a.getBBox().width,h=c,y=o.style("line-height");if(n=y&&parseInt(y)?parseInt(y.replace("px","")):h,l>e.width){var d=o.text();if(o.text(""),d){var p,g;if(-1!==d.indexOf(" "))p=" ",g=d.split(" ");else{p="";var f=d.length,m=Math.ceil(l/e.width),A=Math.floor(f/m);A*m>=f||m++,g=[];for(var b,E,x=0;x<m;x++)E=x*A,b=d.substr(E,A),g.push(b)}var k=[],_=0,v={};for(x=0;x<g.length;x++){var F,D=g[x],C=o.text(),T=a.getComputedTextLength();F=C?C+p+D:D,o.text(F);var w=a.getComputedTextLength();if(w>e.width&&C&&""!==C&&(_+=T,v={string:C,width:T,offset:_},k.push(v),o.text(""),o.text(D),x===g.length-1&&(F=D,o.text(F),w=a.getComputedTextLength())),x===g.length-1){o.text("");var S=F;S&&""!==S&&(w-_>0&&(w-=_),v={string:S,width:w,offset:_},k.push(v))}}var B;for(o.text(""),x=0;x<k.length;x++)b=k[x].string,x*n<e.height-1.5*n&&(B=o.append("tspan").text(b),B.attr("dy",function(t){if(x>0)return n}),B.attr("x",function(){var t=e.x;return r&&(t+=r),t}))}}o.attr("y",function(){var t=e.y;return n&&(t+=n),r&&(t+=r),t}),o.attr("x",function(){var t=e.x;return r&&(t+=r),t}),s=i.select(u).selectAll("text")};t&&("foreignobjects"===t?c=l:"tspans"===t&&(c=h)),t||(c="undefined"!=typeof SVGForeignObjectElement?l:h);for(var y=0;y<a.length;y++){c(a[y])}return s}return a||!1}}()},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){t.exports=require("fs")},function(t,e){t.exports=require("path")},function(t,e,r){"use strict";var n,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=r(0),a=s.Log,u=r(6),o=r(1),c={},l=[],h=[],y=[],d={},p=0,g=[];e.addVertex=function(t,e,r,n){var i;void 0!==t&&0!==t.trim().length&&(void 0===c[t]&&(c[t]={id:t,styles:[],classes:[]}),void 0!==e&&(i=e.trim(),'"'===i[0]&&'"'===i[i.length-1]&&(i=i.substring(1,i.length-1)),c[t].text=i),void 0!==r&&(c[t].type=r),void 0!==r&&(c[t].type=r),void 0!==n&&null!==n&&n.forEach(function(e){c[t].styles.push(e)}))},e.addLink=function(t,e,r,n){a.info("Got edge...",t,e);var i={start:t,end:e,type:void 0,text:""};n=r.text,void 0!==n&&(i.text=n.trim(),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==r&&(i.type=r.type,i.stroke=r.stroke),l.push(i)},e.updateLinkInterpolate=function(t,e){"default"===t?l.defaultInterpolate=e:l[t].interpolate=e},e.updateLink=function(t,e){"default"===t?l.defaultStyle=e:(-1===u.isSubstringInArray("fill",e)&&e.push("fill:none"),l[t].style=e)},e.addClass=function(t,e){void 0===h[t]&&(h[t]={id:t,styles:[]}),void 0!==e&&null!==e&&e.forEach(function(e){h[t].styles.push(e)})},e.setDirection=function(t){n=t},e.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){void 0!==c[t]&&c[t].classes.push(e)}):void 0!==c[t]&&c[t].classes.push(e)};var f=function(t,e){void 0!==e&&(d[t]=e)},m=function(t,e){void 0!==e&&void 0!==c[t]&&g.push(function(r){var n=o.select(r).select("#"+t);null!==n&&n.on("click",function(){window[e](t)})})},A=function(t,e){void 0!==e&&void 0!==c[t]&&g.push(function(r){var n=o.select(r).select("#"+t);null!==n&&n.on("click",function(){window.open(e,"newTab")})})};e.getTooltip=function(t){return d[t]},e.setClickEvent=function(t,e,r,n){t.indexOf(",")>0?t.split(",").forEach(function(t){f(t,n),m(t,e),A(t,r)}):(f(t,n),m(t,e),A(t,r))},e.bindFunctions=function(t){g.forEach(function(e){e(t)})},e.getDirection=function(){return n},e.getVertices=function(){return c},e.getEdges=function(){return l},e.getClasses=function(){return h};var b=function(t){var e=o.select(".mermaidTooltip");null===e[0][0]&&(e=o.select("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),o.select(t).select("svg").selectAll("g.node").on("mouseover",function(){var t=o.select(this);if(null!==t.attr("title")){var r=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",r.left+(r.right-r.left)/2+"px").style("top",r.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),o.select(this).classed("hover",!1)})};g.push(b),e.clear=function(){c={},h={},l=[],g=[],g.push(b),y=[],p=0,d=[]},e.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},e.addSubGraph=function(t,e){var r=[];r=function(t){var e={boolean:{},number:{},string:{}},r=[];return t.filter(function(t){var n=void 0===t?"undefined":i(t);return" "!==t&&(n in e?!e[n].hasOwnProperty(t)&&(e[n][t]=!0):!(r.indexOf(t)>=0)&&r.push(t))})}(r.concat.apply(r,t));var n={id:"subGraph"+p,nodes:r,title:e};return y.push(n),p+=1,n.id};var E=function(t){var e;for(e=0;e<y.length;e++)if(y[e].id===t)return e;return-1},x=-1,k=[],_=function t(e,r){var n=y[r].nodes;if(!((x+=1)>2e3)){if(k[x]=r,y[r].id===e)return{result:!0,count:0};for(var i=0,s=1;i<n.length;){var a=E(n[i]);if(a>=0){var u=t(e,a);if(u.result)return{result:!0,count:s+u.count};s+=u.count}i+=1}return{result:!1,count:s}}};e.getDepthFirstPos=function(t){return k[t]},e.indexNodes=function(){x=-1,y.length>0&&_("none",y.length-1)},e.getSubGraphs=function(){return y},e.parseError=function(t,e){global.mermaidAPI.parseError(t,e)}},function(t,e,r){"use strict";var n=r(0),i=n.Log,s=function(t){return t=t.replace(/^\s*%%.*\n/g,"\n"),t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram/)?(i.debug("Detected classDiagram syntax"),"classDiagram"):t.match(/^\s*gitGraph/)?(i.debug("Detected gitGraph syntax"),"gitGraph"):"graph"};e.detectType=s;var a=function(t,e){for(var r,n="",s=document.styleSheets,a=0;a<s.length;a++)if("mermaid-svg-internal-css"!==s[a].title)try{var u=s[a].cssRules;if(null!==u)for(var o=0;o<u.length;o++)if(r=u[o],void 0!==r.style){var c;c=t.querySelectorAll(r.selectorText),c.length>0&&(n+=r.selectorText+" { "+r.style.cssText+"}\n")}}catch(t){void 0!==r&&i.warn('Invalid CSS selector "'+r.selectorText+'"',t)}var l="",h="";for(var y in e)e.hasOwnProperty(y)&&void 0!==y&&("default"===y?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node>rect { "+e[y].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[y].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[y].edgeLabelStyles.join("; ")+"; }\n"),e.default.clusterStyles instanceof Array&&(l+="#"+t.id.trim()+" .cluster rect { "+e[y].clusterStyles.join("; ")+"; }\n")):e[y].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+y+">rect, ."+y+">polygon, ."+y+">circle, ."+y+">ellipse { "+e[y].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* <![CDATA[ */\n",""!==l&&(d.innerHTML+=l),""!==n&&(d.innerHTML+=n),""!==h&&(d.innerHTML+=h),d.innerHTML+="/* ]]> */\n",t.insertBefore(d,t.firstChild)}};e.cloneCssStyles=a;var u=function(t,e){for(var r=0;r<e.length;r++)if(e[r].match(t))return r;return-1};e.isSubstringInArray=u},function(t,e,r){"use strict";(function(t){var n=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[1,4],n=[1,3],i=[1,5],s=[1,8,9,10,11,13,18,30,46,71,72,73,74,75,81,86,88,89,91,92,94,95,96,97,98],a=[2,2],u=[1,12],o=[1,13],c=[1,14],l=[1,15],h=[1,31],y=[1,33],d=[1,22],p=[1,34],g=[1,24],f=[1,25],m=[1,26],A=[1,27],b=[1,28],E=[1,38],x=[1,40],k=[1,35],_=[1,39],v=[1,45],F=[1,44],D=[1,36],C=[1,37],T=[1,41],w=[1,42],S=[1,43],B=[1,8,9,10,11,13,18,30,32,46,71,72,73,74,75,81,86,88,89,91,92,94,95,96,97,98],L=[1,53],I=[1,52],O=[1,54],P=[1,72],N=[1,80],M=[1,81],R=[1,66],$=[1,65],j=[1,85],V=[1,84],U=[1,82],G=[1,83],H=[1,73],Y=[1,68],W=[1,67],q=[1,63],z=[1,75],X=[1,76],K=[1,77],Z=[1,78],Q=[1,79],J=[1,70],tt=[1,69],et=[8,9,11],rt=[8,9,11,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64],nt=[1,115],it=[8,9,10,11,13,15,18,36,38,40,42,46,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,86,88,89,91,92,94,95,96,97,98],st=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,42,43,46,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,71,72,73,74,75,78,81,84,86,88,89,91,92,94,95,96,97,98],at=[1,117],ut=[1,118],ot=[8,9,10,11,13,18,30,32,46,71,72,73,74,75,81,86,88,89,91,92,94,95,96,97,98],ct=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,43,46,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,71,72,73,74,75,78,81,84,86,88,89,91,92,94,95,96,97,98],lt=[13,18,46,81,86,88,89,91,92,94,95,96,97,98],ht=[13,18,46,49,65,81,86,88,89,91,92,94,95,96,97,98],yt=[1,191],dt=[1,188],pt=[1,195],gt=[1,192],ft=[1,189],mt=[1,196],At=[1,186],bt=[1,187],Et=[1,190],xt=[1,193],kt=[1,194],_t=[1,213],vt=[8,9,11,86],Ft=[8,9,10,11,46,71,80,81,84,86,88,89,90,91,92],Dt={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,"(-":40,"-)":41,DIAMOND_START:42,DIAMOND_STOP:43,alphaNumStatement:44,alphaNumToken:45,MINUS:46,linkStatement:47,arrowText:48,TESTSTR:49,"--":50,ARROW_POINT:51,ARROW_CIRCLE:52,ARROW_CROSS:53,ARROW_OPEN:54,"-.":55,DOTTED_ARROW_POINT:56,DOTTED_ARROW_CIRCLE:57,DOTTED_ARROW_CROSS:58,DOTTED_ARROW_OPEN:59,"==":60,THICK_ARROW_POINT:61,THICK_ARROW_CIRCLE:62,THICK_ARROW_CROSS:63,THICK_ARROW_OPEN:64,PIPE:65,textToken:66,STR:67,commentText:68,commentToken:69,keywords:70,STYLE:71,LINKSTYLE:72,CLASSDEF:73,CLASS:74,CLICK:75,textNoTags:76,textNoTagsToken:77,DEFAULT:78,stylesOpt:79,HEX:80,NUM:81,INTERPOLATE:82,commentStatement:83,PCT:84,style:85,COMMA:86,styleComponent:87,ALPHA:88,COLON:89,UNIT:90,BRKT:91,DOT:92,graphCodeTokens:93,PUNCTUATION:94,UNICODE_TEXT:95,PLUS:96,EQUALS:97,MULT:98,TAG_START:99,TAG_END:100,QUOTE:101,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"(-",41:"-)",42:"DIAMOND_START",43:"DIAMOND_STOP",46:"MINUS",49:"TESTSTR",50:"--",51:"ARROW_POINT",52:"ARROW_CIRCLE",53:"ARROW_CROSS",54:"ARROW_OPEN",55:"-.",56:"DOTTED_ARROW_POINT",57:"DOTTED_ARROW_CIRCLE",58:"DOTTED_ARROW_CROSS",59:"DOTTED_ARROW_OPEN",60:"==",61:"THICK_ARROW_POINT",62:"THICK_ARROW_CIRCLE",63:"THICK_ARROW_CROSS",64:"THICK_ARROW_OPEN",65:"PIPE",67:"STR",71:"STYLE",72:"LINKSTYLE",73:"CLASSDEF",74:"CLASS",75:"CLICK",78:"DEFAULT",80:"HEX",81:"NUM",82:"INTERPOLATE",84:"PCT",86:"COMMA",88:"ALPHA",89:"COLON",90:"UNIT",91:"BRKT",92:"DOT",94:"PUNCTUATION",95:"UNICODE_TEXT",96:"PLUS",97:"EQUALS",98:"MULT",99:"TAG_START",100:"TAG_END",101:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,5],[7,4],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[44,1],[44,1],[44,1],[44,1],[34,2],[34,3],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[48,3],[31,1],[31,2],[31,1],[68,1],[68,2],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[76,1],[76,2],[27,5],[27,5],[28,5],[29,5],[29,7],[29,5],[29,7],[25,5],[25,5],[26,5],[26,5],[26,9],[26,9],[26,7],[26,7],[83,3],[79,1],[79,3],[85,1],[85,2],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[69,1],[69,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[77,1],[77,1],[77,1],[77,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1]],performAction:function(t,e,r,n,i,s,a){var u=s.length-1;switch(i){case 2:this.$=[];break;case 3:s[u]!==[]&&s[u-1].push(s[u]),this.$=s[u-1];break;case 4:case 57:case 59:case 60:case 92:case 94:case 95:case 108:this.$=s[u];break;case 11:n.setDirection(s[u-1]),this.$=s[u-1];break;case 12:n.setDirection("LR"),this.$=s[u-1];break;case 13:n.setDirection("RL"),this.$=s[u-1];break;case 14:n.setDirection("BT"),this.$=s[u-1];break;case 15:n.setDirection("TB"),this.$=s[u-1];break;case 30:this.$=s[u-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:this.$=n.addSubGraph(s[u-1],s[u-3]);break;case 37:this.$=n.addSubGraph(s[u-1],void 0);break;case 41:n.addLink(s[u-2],s[u],s[u-1]),this.$=[s[u-2],s[u]];break;case 42:this.$=[s[u]];break;case 43:this.$=s[u-3],n.addVertex(s[u-3],s[u-1],"square");break;case 44:this.$=s[u-4],n.addVertex(s[u-4],s[u-2],"square");break;case 45:this.$=s[u-5],n.addVertex(s[u-5],s[u-2],"circle");break;case 46:this.$=s[u-6],n.addVertex(s[u-6],s[u-3],"circle");break;case 47:this.$=s[u-3],n.addVertex(s[u-3],s[u-1],"ellipse");break;case 48:this.$=s[u-4],n.addVertex(s[u-4],s[u-2],"ellipse");break;case 49:this.$=s[u-3],n.addVertex(s[u-3],s[u-1],"round");break;case 50:this.$=s[u-4],n.addVertex(s[u-4],s[u-2],"round");break;case 51:this.$=s[u-3],n.addVertex(s[u-3],s[u-1],"diamond");break;case 52:this.$=s[u-4],n.addVertex(s[u-4],s[u-2],"diamond");break;case 53:this.$=s[u-3],n.addVertex(s[u-3],s[u-1],"odd");break;case 54:this.$=s[u-4],n.addVertex(s[u-4],s[u-2],"odd");break;case 55:this.$=s[u],n.addVertex(s[u]);break;case 56:this.$=s[u-1],n.addVertex(s[u-1]);break;case 58:case 93:case 96:case 109:this.$=s[u-1]+""+s[u];break;case 61:this.$="v";break;case 62:this.$="-";break;case 63:s[u-1].text=s[u],this.$=s[u-1];break;case 64:case 65:s[u-2].text=s[u-1],this.$=s[u-2];break;case 66:this.$=s[u];break;case 67:this.$={type:"arrow",stroke:"normal",text:s[u-1]};break;case 68:this.$={type:"arrow_circle",stroke:"normal",text:s[u-1]};break;case 69:this.$={type:"arrow_cross",stroke:"normal",text:s[u-1]};break;case 70:this.$={type:"arrow_open",stroke:"normal",text:s[u-1]};break;case 71:this.$={type:"arrow",stroke:"dotted",text:s[u-1]};break;case 72:this.$={type:"arrow_circle",stroke:"dotted",text:s[u-1]};break;case 73:this.$={type:"arrow_cross",stroke:"dotted",text:s[u-1]};break;case 74:this.$={type:"arrow_open",stroke:"dotted",text:s[u-1]};break;case 75:this.$={type:"arrow",stroke:"thick",text:s[u-1]};break;case 76:this.$={type:"arrow_circle",stroke:"thick",text:s[u-1]};break;case 77:this.$={type:"arrow_cross",stroke:"thick",text:s[u-1]};break;case 78:this.$={type:"arrow_open",stroke:"thick",text:s[u-1]};break;case 79:this.$={type:"arrow",stroke:"normal"};break;case 80:this.$={type:"arrow_circle",stroke:"normal"};break;case 81:this.$={type:"arrow_cross",stroke:"normal"};break;case 82:this.$={type:"arrow_open",stroke:"normal"};break;case 83:this.$={type:"arrow",stroke:"dotted"};break;case 84:this.$={type:"arrow_circle",stroke:"dotted"};break;case 85:this.$={type:"arrow_cross",stroke:"dotted"};break;case 86:this.$={type:"arrow_open",stroke:"dotted"};break;case 87:this.$={type:"arrow",stroke:"thick"};break;case 88:this.$={type:"arrow_circle",stroke:"thick"};break;case 89:this.$={type:"arrow_cross",stroke:"thick"};break;case 90:this.$={type:"arrow_open",stroke:"thick"};break;case 91:this.$=s[u-1];break;case 110:case 111:this.$=s[u-4],n.addClass(s[u-2],s[u]);break;case 112:this.$=s[u-4],n.setClass(s[u-2],s[u]);break;case 113:this.$=s[u-4],n.setClickEvent(s[u-2],s[u],void 0,void 0);break;case 114:this.$=s[u-6],n.setClickEvent(s[u-4],s[u-2],void 0,s[u]);break;case 115:this.$=s[u-4],n.setClickEvent(s[u-2],void 0,s[u],void 0);break;case 116:this.$=s[u-6],n.setClickEvent(s[u-4],void 0,s[u-2],s[u]);break;case 117:this.$=s[u-4],n.addVertex(s[u-2],void 0,void 0,s[u]);break;case 118:case 119:case 120:this.$=s[u-4],n.updateLink(s[u-2],s[u]);break;case 121:case 122:this.$=s[u-8],n.updateLinkInterpolate(s[u-6],s[u-2]),n.updateLink(s[u-6],s[u]);break;case 123:case 124:this.$=s[u-6],n.updateLinkInterpolate(s[u-4],s[u]);break;case 126:this.$=[s[u]];break;case 127:s[u-2].push(s[u]),this.$=s[u-2];break;case 129:this.$=s[u-1]+s[u]}},table:[{3:1,4:2,9:r,10:n,12:i},{1:[3]},e(s,a,{5:6}),{4:7,9:r,10:n,12:i},{4:8,9:r,10:n,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:o,10:c,11:l,13:h,18:y,23:16,25:17,26:18,27:19,28:20,29:21,30:d,33:23,35:29,44:30,45:32,46:p,71:g,72:f,73:m,74:A,75:b,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(s,[2,9]),e(s,[2,10]),{13:[1,46],15:[1,47],16:[1,48],17:[1,49],18:[1,50]},e(B,[2,3]),e(B,[2,4]),e(B,[2,5]),e(B,[2,6]),e(B,[2,7]),e(B,[2,8]),{8:L,9:I,11:O,24:51},{8:L,9:I,11:O,24:55},{8:L,9:I,11:O,24:56},{8:L,9:I,11:O,24:57},{8:L,9:I,11:O,24:58},{8:L,9:I,11:O,24:59},{8:L,9:I,10:P,11:O,12:N,13:M,15:R,16:$,17:j,18:V,24:61,30:U,31:60,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(et,[2,42],{34:86,47:87,50:[1,88],51:[1,91],52:[1,92],53:[1,93],54:[1,94],55:[1,89],56:[1,95],57:[1,96],58:[1,97],59:[1,98],60:[1,90],61:[1,99],62:[1,100],63:[1,101],64:[1,102]}),{10:[1,103]},{10:[1,104]},{10:[1,105]},{10:[1,106]},{10:[1,107]},e(rt,[2,55],{45:32,21:113,44:114,10:nt,13:h,15:[1,112],18:y,36:[1,108],38:[1,109],40:[1,110],42:[1,111],46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S}),e(it,[2,57]),e(it,[2,59]),e(it,[2,60]),e(it,[2,61]),e(it,[2,62]),e(st,[2,154]),e(st,[2,155]),e(st,[2,156]),e(st,[2,157]),e(st,[2,158]),e(st,[2,159]),e(st,[2,160]),e(st,[2,161]),e(st,[2,162]),e(st,[2,163]),e(st,[2,164]),{8:at,9:ut,10:nt,14:116,21:119},{8:at,9:ut,10:nt,14:120,21:119},{8:at,9:ut,10:nt,14:121,21:119},{8:at,9:ut,10:nt,14:122,21:119},{8:at,9:ut,10:nt,14:123,21:119},e(B,[2,30]),e(B,[2,38]),e(B,[2,39]),e(B,[2,40]),e(B,[2,31]),e(B,[2,32]),e(B,[2,33]),e(B,[2,34]),e(B,[2,35]),{8:L,9:I,10:P,11:O,12:N,13:M,15:R,16:$,17:j,18:V,24:124,30:U,32:G,45:71,46:H,50:Y,60:W,66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(ot,a,{5:126}),e(ct,[2,92]),e(ct,[2,94]),e(ct,[2,143]),e(ct,[2,144]),e(ct,[2,145]),e(ct,[2,146]),e(ct,[2,147]),e(ct,[2,148]),e(ct,[2,149]),e(ct,[2,150]),e(ct,[2,151]),e(ct,[2,152]),e(ct,[2,153]),e(ct,[2,97]),e(ct,[2,98]),e(ct,[2,99]),e(ct,[2,100]),e(ct,[2,101]),e(ct,[2,102]),e(ct,[2,103]),e(ct,[2,104]),e(ct,[2,105]),e(ct,[2,106]),e(ct,[2,107]),{13:h,18:y,33:127,35:29,44:30,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(lt,[2,66],{48:128,49:[1,129],65:[1,130]}),{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:131,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:132,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:133,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(ht,[2,79]),e(ht,[2,80]),e(ht,[2,81]),e(ht,[2,82]),e(ht,[2,83]),e(ht,[2,84]),e(ht,[2,85]),e(ht,[2,86]),e(ht,[2,87]),e(ht,[2,88]),e(ht,[2,89]),e(ht,[2,90]),{13:h,18:y,35:134,44:30,45:32,46:p,80:[1,135],81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{78:[1,136],81:[1,137]},{13:h,18:y,35:139,44:30,45:32,46:p,78:[1,138],81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{13:h,18:y,35:140,44:30,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{13:h,18:y,35:141,44:30,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:142,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:144,32:G,38:[1,143],45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:145,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:146,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:147,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(rt,[2,56]),e(it,[2,58]),e(rt,[2,29],{21:148,10:nt}),e(s,[2,11]),e(s,[2,21]),e(s,[2,22]),{9:[1,149]},e(s,[2,12]),e(s,[2,13]),e(s,[2,14]),e(s,[2,15]),e(ot,a,{5:150}),e(ct,[2,93]),{6:10,7:11,8:u,9:o,10:c,11:l,13:h,18:y,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,151],33:23,35:29,44:30,45:32,46:p,71:g,72:f,73:m,74:A,75:b,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(et,[2,41]),e(lt,[2,63],{10:[1,152]}),{10:[1,153]},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:154,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,45:71,46:H,50:Y,51:[1,155],52:[1,156],53:[1,157],54:[1,158],60:W,66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,45:71,46:H,50:Y,56:[1,159],57:[1,160],58:[1,161],59:[1,162],60:W,66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,45:71,46:H,50:Y,60:W,61:[1,163],62:[1,164],63:[1,165],64:[1,166],66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:[1,167],13:h,18:y,44:114,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:[1,168]},{10:[1,169]},{10:[1,170]},{10:[1,171]},{10:[1,172],13:h,18:y,44:114,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:[1,173],13:h,18:y,44:114,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:[1,174],13:h,18:y,44:114,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,37:[1,175],45:71,46:H,50:Y,60:W,66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,31:176,32:G,45:71,46:H,50:Y,60:W,66:62,67:q,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,39:[1,177],45:71,46:H,50:Y,60:W,66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,41:[1,178],45:71,46:H,50:Y,60:W,66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,43:[1,179],45:71,46:H,50:Y,60:W,66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,37:[1,180],45:71,46:H,50:Y,60:W,66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(rt,[2,28]),e(s,[2,23]),{6:10,7:11,8:u,9:o,10:c,11:l,13:h,18:y,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,181],33:23,35:29,44:30,45:32,46:p,71:g,72:f,73:m,74:A,75:b,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(B,[2,37]),e(lt,[2,65]),e(lt,[2,64]),{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,45:71,46:H,50:Y,60:W,65:[1,182],66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(lt,[2,67]),e(lt,[2,68]),e(lt,[2,69]),e(lt,[2,70]),e(lt,[2,71]),e(lt,[2,72]),e(lt,[2,73]),e(lt,[2,74]),e(lt,[2,75]),e(lt,[2,76]),e(lt,[2,77]),e(lt,[2,78]),{10:yt,46:dt,71:pt,79:183,80:gt,81:ft,84:mt,85:184,87:185,88:At,89:bt,90:Et,91:xt,92:kt},{10:yt,46:dt,71:pt,79:197,80:gt,81:ft,84:mt,85:184,87:185,88:At,89:bt,90:Et,91:xt,92:kt},{10:yt,46:dt,71:pt,79:198,80:gt,81:ft,82:[1,199],84:mt,85:184,87:185,88:At,89:bt,90:Et,91:xt,92:kt},{10:yt,46:dt,71:pt,79:200,80:gt,81:ft,82:[1,201],84:mt,85:184,87:185,88:At,89:bt,90:Et,91:xt,92:kt},{10:yt,46:dt,71:pt,79:202,80:gt,81:ft,84:mt,85:184,87:185,88:At,89:bt,90:Et,91:xt,92:kt},{10:yt,46:dt,71:pt,79:203,80:gt,81:ft,84:mt,85:184,87:185,88:At,89:bt,90:Et,91:xt,92:kt},{13:h,18:y,35:204,44:30,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{13:h,18:y,35:205,44:30,45:32,46:p,67:[1,206],81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(rt,[2,43],{21:207,10:nt}),{10:P,12:N,13:M,15:R,16:$,17:j,18:V,30:U,32:G,39:[1,208],45:71,46:H,50:Y,60:W,66:125,70:74,71:z,72:X,73:K,74:Z,75:Q,77:64,78:J,81:E,84:tt,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},e(rt,[2,49],{21:209,10:nt}),e(rt,[2,47],{21:210,10:nt}),e(rt,[2,51],{21:211,10:nt}),e(rt,[2,53],{21:212,10:nt}),e(B,[2,36]),e([10,13,18,46,81,86,88,89,91,92,94,95,96,97,98],[2,91]),e(et,[2,117],{86:_t}),e(vt,[2,126],{87:214,10:yt,46:dt,71:pt,80:gt,81:ft,84:mt,88:At,89:bt,90:Et,91:xt,92:kt}),e(Ft,[2,128]),e(Ft,[2,130]),e(Ft,[2,131]),e(Ft,[2,132]),e(Ft,[2,133]),e(Ft,[2,134]),e(Ft,[2,135]),e(Ft,[2,136]),e(Ft,[2,137]),e(Ft,[2,138]),e(Ft,[2,139]),e(Ft,[2,140]),e(et,[2,118],{86:_t}),e(et,[2,119],{86:_t}),{10:[1,215]},e(et,[2,120],{86:_t}),{10:[1,216]},e(et,[2,110],{86:_t}),e(et,[2,111],{86:_t}),e(et,[2,112],{45:32,44:114,13:h,18:y,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S}),e(et,[2,113],{45:32,44:114,10:[1,217],13:h,18:y,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S}),e(et,[2,115],{10:[1,218]}),e(rt,[2,44]),{39:[1,219]},e(rt,[2,50]),e(rt,[2,48]),e(rt,[2,52]),e(rt,[2,54]),{10:yt,46:dt,71:pt,80:gt,81:ft,84:mt,85:220,87:185,88:At,89:bt,90:Et,91:xt,92:kt},e(Ft,[2,129]),{13:h,18:y,35:221,44:30,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{13:h,18:y,35:222,44:30,45:32,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S},{67:[1,223]},{67:[1,224]},e(rt,[2,45],{21:225,10:nt}),e(vt,[2,127],{87:214,10:yt,46:dt,71:pt,80:gt,81:ft,84:mt,88:At,89:bt,90:Et,91:xt,92:kt}),e(et,[2,123],{45:32,44:114,10:[1,226],13:h,18:y,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S}),e(et,[2,124],{45:32,44:114,10:[1,227],13:h,18:y,46:p,81:E,86:x,88:k,89:_,91:v,92:F,94:D,95:C,96:T,97:w,98:S}),e(et,[2,114]),e(et,[2,116]),e(rt,[2,46]),{10:yt,46:dt,71:pt,79:228,80:gt,81:ft,84:mt,85:184,87:185,88:At,89:bt,90:Et,91:xt,92:kt},{10:yt,46:dt,71:pt,79:229,80:gt,81:ft,84:mt,85:184,87:185,88:At,89:bt,90:Et,91:xt,92:kt},e(et,[2,121],{86:_t}),e(et,[2,122],{86:_t})],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],s=[],a=this.table,u="",o=0,c=0,l=0,h=1,y=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var m=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var A,b,E,x,k,_,v,F,D,C={};;){if(E=r[r.length-1],this.defaultActions[E]?x=this.defaultActions[E]:(null!==A&&void 0!==A||(A=function(){var t;return t=n.pop()||d.lex()||h,"number"!=typeof t&&(t instanceof Array&&(n=t,t=n.pop()),t=e.symbols_[t]||t),t}()),x=a[E]&&a[E][A]),void 0===x||!x.length||!x[0]){var T="";D=[];for(_ in a[E])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(o+1)+": Unexpected "+(A==h?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[A]||A,line:d.yylineno,loc:f,expected:D})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+A);switch(x[0]){case 1:r.push(A),i.push(d.yytext),s.push(d.yylloc),r.push(x[1]),A=null,b?(A=b,b=null):(c=d.yyleng,u=d.yytext,o=d.yylineno,f=d.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[x[1]][1],C.$=i[i.length-v],C._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},m&&(C._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[u,c,o,p.yy,x[1],i,s].concat(y))))return k;v&&(r=r.slice(0,-1*v*2),i=i.slice(0,-1*v),s=s.slice(0,-1*v)),r.push(this.productions_[x[1]][0]),i.push(C.$),s.push(C._$),F=a[r[r.length-2]][r[r.length-1]],r.push(F);break;case 3:return!0}}return!0}},Ct=function(){return{EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&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})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:break;case 1:this.begin("string");break;case 2:this.popState();break;case 3:return"STR";case 4:return 71;case 5:return 78;case 6:return 72;case 7:return 82;case 8:return 73;case 9:return 74;case 10:return 75;case 11:return 12;case 12:return 30;case 13:return 32;case 14:case 15:case 16:case 17:case 18:case 19:return 13;case 20:return 81;case 21:return 91;case 22:return 89;case 23:return 8;case 24:return 86;case 25:return 98;case 26:return 16;case 27:return 15;case 28:return 17;case 29:return 18;case 30:return 53;case 31:return 51;case 32:return 52;case 33:return 54;case 34:return 58;case 35:return 56;case 36:return 57;case 37:return 59;case 38:return 58;case 39:return 56;case 40:return 57;case 41:return 59;case 42:return 63;case 43:return 61;case 44:return 62;case 45:return 64;case 46:return 50;case 47:return 55;case 48:return 60;case 49:return 40;case 50:return 41;case 51:return 46;case 52:return 92;case 53:return 96;case 54:return 84;case 55:case 56:return 97;case 57:return 88;case 58:return 94;case 59:return 95;case 60:return 65;case 61:return 38;case 62:return 39;case 63:return 36;case 64:return 37;case 65:return 42;case 66:return 43;case 67:return 101;case 68:return 9;case 69:return 10;case 70:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[A-Za-z]+)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70],inclusive:!0}}}}();return Dt.lexer=Ct,t.prototype=Dt,Dt.Parser=t,new t}();e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=r(3).readFileSync(r(4).normalize(t[1]),"utf8");return e.parser.parse(n)},void 0!==t&&r.c[r.s]===t&&e.main(process.argv.slice(1))}).call(e,r(2)(t))},function(t,e,r){"use strict";(function(t){var n=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[1,5],n=[1,6],i=[1,12],s=[1,13],a=[1,14],u=[1,15],o=[1,16],c=[1,17],l=[1,18],h=[1,19],y=[1,20],d=[1,21],p=[1,22],g=[8,16,17,18,19,20,21,22,23,24,25,26],f=[1,37],m=[1,33],A=[1,34],b=[1,35],E=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],k=[10,28],_=[10,28,37,57,58],v=[2,49],F=[1,45],D=[1,48],C=[1,49],T=[1,52],w=[2,65],S=[1,65],B=[1,66],L=[1,67],I=[1,68],O=[1,69],P=[1,70],N=[1,71],M=[1,72],R=[1,73],$=[8,16,17,18,19,20,21,22,23,24,25,26,47],j=[10,28,37],V={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,r,n,i,s,a){var u=s.length-1;switch(i){case 1:this.$=s[u-1];break;case 2:this.$=s[u-4];break;case 3:this.$=s[u-5];break;case 4:this.$=s[u-3];break;case 8:case 10:case 11:this.$=s[u];break;case 9:this.$=s[u-1]+""+s[u];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=s[u];break;case 17:this.$="<br>";break;case 39:this.$="oy";break;case 40:n.addLink(s[u-1],s[u].id,s[u].op),this.$="oy";break;case 42:n.addLink(s[u-1],s[u].id,s[u].op),this.$={op:s[u-2],id:s[u-1]};break;case 44:this.$={op:s[u-1],id:s[u]};break;case 48:n.addVertex(s[u-1]),this.$=s[u-1];break;case 49:n.addVertex(s[u]),this.$=s[u];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:r,13:n},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p},{6:23,12:r,13:n},e(g,[2,5]),e(g,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:f,9:25,12:m,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:A,36:b,42:32,47:E},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p},{7:30,8:f,9:40,12:m,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:A,36:b,42:32,47:E},{10:[1,41]},{10:[2,21],28:[1,42]},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(_,v,{44:44,32:[1,43],45:F}),e(k,[2,27],{41:46,43:47,57:D,58:C}),e(k,[2,47],{43:47,34:50,41:51,37:T,57:D,58:C}),{34:53,37:T},{34:54,37:T},{34:55,37:T},{7:56,8:[1,57],14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p},{7:30,8:f,9:58,12:m,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:A,36:b,42:32,47:E},e(x,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:f,9:61,12:m,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:A,36:b,42:32,47:E},{7:62,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p},e(_,[2,48]),e(_,w,{14:10,15:11,7:63,46:64,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,48:S,49:B,50:L,51:I,52:O,53:P,54:N,55:M,56:R}),e(k,[2,41],{34:74,37:T}),{7:77,8:f,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,33:76,42:75,47:E},e($,[2,66]),e($,[2,67]),e(k,[2,46]),e(k,[2,40],{34:78,37:T}),{7:81,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,38:79,39:[1,80]},e(k,[2,28]),e(k,[2,29]),e(k,[2,30]),{8:[1,82]},{7:30,8:f,9:83,12:m,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:A,36:b,42:32,47:E},{10:[1,84]},{7:30,8:f,9:85,12:m,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:A,36:b,42:32,47:E},{5:[2,2]},{10:[2,22]},e(k,[2,26]),e(_,[2,51],{45:[1,86]}),e(_,[2,52]),e(_,[2,56]),e(_,[2,57]),e(_,[2,58]),e(_,[2,59]),e(_,[2,60]),e(_,[2,61]),e(_,[2,62]),e(_,[2,63]),e(_,[2,64]),e(k,[2,38]),e(j,[2,44],{43:47,41:87,57:D,58:C}),e(j,[2,45],{43:47,41:88,57:D,58:C}),e(_,v,{44:44,45:F}),e(k,[2,39]),{39:[1,89]},e(k,[2,34],{34:90,37:T}),{32:[1,91]},{7:30,8:f,9:92,12:m,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:A,36:b,42:32,47:E},{10:[1,93]},e(_,[2,55]),{10:[1,94]},e(_,w,{46:95,48:S,49:B,50:L,51:I,52:O,53:P,54:N,55:M,56:R}),e(j,[2,42]),e(j,[2,43]),e(k,[2,33],{34:96,37:T}),e(k,[2,32]),{7:97,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p},{10:[1,98]},e(_,[2,54]),{5:[2,3]},e(_,[2,50]),e(k,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(_,[2,53]),{7:81,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:s,18:a,19:u,20:o,21:c,22:l,23:h,24:y,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],s=[],a=this.table,u="",o=0,c=0,l=0,h=1,y=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var m=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var A,b,E,x,k,_,v,F,D,C={};;){if(E=r[r.length-1],this.defaultActions[E]?x=this.defaultActions[E]:(null!==A&&void 0!==A||(A=function(){var t;return t=n.pop()||d.lex()||h,"number"!=typeof t&&(t instanceof Array&&(n=t,t=n.pop()),t=e.symbols_[t]||t),t}()),x=a[E]&&a[E][A]),void 0===x||!x.length||!x[0]){var T="";D=[];for(_ in a[E])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(o+1)+": Unexpected "+(A==h?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[A]||A,line:d.yylineno,loc:f,expected:D})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+A);switch(x[0]){case 1:r.push(A),i.push(d.yytext),s.push(d.yylloc),r.push(x[1]),A=null,b?(A=b,b=null):(c=d.yyleng,u=d.yytext,o=d.yylineno,f=d.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[x[1]][1],C.$=i[i.length-v],C._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},m&&(C._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[u,c,o,p.yy,x[1],i,s].concat(y))))return k;v&&(r=r.slice(0,-1*v*2),i=i.slice(0,-1*v),s=s.slice(0,-1*v)),r.push(this.productions_[x[1]][0]),i.push(C.$),s.push(C._$),F=a[r[r.length-2]][r[r.length-1]],r.push(F);break;case 3:return!0}}return!0}},U=function(){return{EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&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})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:return"STYLE";case 1:return"LINKSTYLE";case 2:return"CLASSDEF";case 3:return"CLASS";case 4:return"CLICK";case 5:return 12;case 6:return 13;case 7:return 47;case 8:return 35;case 9:return 36;case 10:case 11:case 12:case 13:case 14:case 15:return"DIR";case 16:return 17;case 17:return 23;case 18:return 18;case 19:return 28;case 20:return 40;case 21:return 32;case 22:return 21;case 23:return 22;case 24:return"ARROW_CROSS";case 25:return 57;case 26:return"ARROW_CIRCLE";case 27:return 58;case 28:return 25;case 29:return 19;case 30:return 20;case 31:return 16;case 32:return"PIPE";case 33:return"PS";case 34:return"PE";case 35:return 37;case 36:return 39;case 37:return 8;case 38:return 10;case 39:return"QUOTE";case 40:return 24;case 41:return"NEWLINE";case 42:return 5}},rules:[/^(?:style\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:digraph\b)/,/^(?:subgraph\b)/,/^(?:node\b)/,/^(?:edge\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9])/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:=)/,/^(?:\*)/,/^(?:\.)/,/^(?:--[x])/,/^(?:->)/,/^(?:--[o])/,/^(?:--)/,/^(?:-)/,/^(?:\+)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\s)/,/^(?:\n)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}}}();return V.lexer=U,t.prototype=V,V.Parser=t,new t}();e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=r(3).readFileSync(r(4).normalize(t[1]),"utf8");return e.parser.parse(n)},void 0!==t&&r.c[r.s]===t&&e.main(process.argv.slice(1))}).call(e,r(2)(t))},function(t,e,r){"use strict";(function(t){var n=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[1,2],n=[1,3],i=[1,4],s=[2,4],a=[1,9],u=[1,11],o=[1,12],c=[1,14],l=[1,15],h=[1,17],y=[1,18],d=[1,19],p=[1,20],g=[1,21],f=[1,23],m=[1,24],A=[1,4,5,10,15,16,18,20,21,22,23,24,25,27,28,39],b=[1,32],E=[4,5,10,15,16,18,20,21,22,23,25,28,39],x=[4,5,10,15,16,18,20,21,22,23,25,27,28,39],k=[37,38,39],_={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,participant:10,actor:11,AS:12,restOfLine:13,signal:14,activate:15,deactivate:16,note_statement:17,title:18,text2:19,loop:20,end:21,opt:22,alt:23,else:24,par:25,par_sections:26,and:27,note:28,placement:29,over:30,actor_pair:31,spaceList:32,",":33,left_of:34,right_of:35,signaltype:36,"+":37,"-":38,ACTOR:39,SOLID_OPEN_ARROW:40,DOTTED_OPEN_ARROW:41,SOLID_ARROW:42,DOTTED_ARROW:43,SOLID_CROSS:44,DOTTED_CROSS:45,TXT:46,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",10:"participant",12:"AS",13:"restOfLine",15:"activate",16:"deactivate",18:"title",20:"loop",21:"end",22:"opt",23:"alt",24:"else",25:"par",27:"and",28:"note",30:"over",33:",",34:"left_of",35:"right_of",37:"+",38:"-",39:"ACTOR",40:"SOLID_OPEN_ARROW",41:"DOTTED_OPEN_ARROW",42:"SOLID_ARROW",43:"DOTTED_ARROW",44:"SOLID_CROSS",45:"DOTTED_CROSS",46:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,5],[9,3],[9,2],[9,3],[9,3],[9,2],[9,3],[9,4],[9,4],[9,7],[9,4],[26,1],[26,4],[17,4],[17,4],[32,2],[32,1],[31,3],[31,1],[29,1],[29,1],[14,5],[14,5],[14,4],[11,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,1],[19,1]],performAction:function(t,e,r,n,i,s,a){var u=s.length-1;switch(i){case 3:return n.apply(s[u]),s[u];case 4:this.$=[];break;case 5:s[u-1].push(s[u]),this.$=s[u-1];break;case 6:case 7:this.$=s[u];break;case 8:this.$=[];break;case 9:s[u-3].description=s[u-1],this.$=s[u-3];break;case 10:this.$=s[u-1];break;case 12:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:s[u-1]};break;case 13:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:s[u-1]};break;case 15:this.$=[{type:"setTitle",text:s[u-1]}];break;case 16:s[u-1].unshift({type:"loopStart",loopText:s[u-2],signalType:n.LINETYPE.LOOP_START}),s[u-1].push({type:"loopEnd",loopText:s[u-2],signalType:n.LINETYPE.LOOP_END}),this.$=s[u-1];break;case 17:s[u-1].unshift({type:"optStart",optText:s[u-2],signalType:n.LINETYPE.OPT_START}),s[u-1].push({type:"optEnd",optText:s[u-2],signalType:n.LINETYPE.OPT_END}),this.$=s[u-1];break;case 18:s[u-4].unshift({type:"altStart",altText:s[u-5],signalType:n.LINETYPE.ALT_START}),s[u-4].push({type:"else",altText:s[u-2],signalType:n.LINETYPE.ALT_ELSE}),s[u-4]=s[u-4].concat(s[u-1]),s[u-4].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=s[u-4];break;case 19:s[u-1].unshift({type:"parStart",parText:s[u-2],signalType:n.LINETYPE.PAR_START}),s[u-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=s[u-1];break;case 21:this.$=s[u-3].concat([{type:"and",parText:s[u-1],signalType:n.LINETYPE.PAR_AND},s[u]]);break;case 22:this.$=[s[u-1],{type:"addNote",placement:s[u-2],actor:s[u-1].actor,text:s[u]}];break;case 23:s[u-2]=[].concat(s[u-1],s[u-1]).slice(0,2),s[u-2][0]=s[u-2][0].actor,s[u-2][1]=s[u-2][1].actor,this.$=[s[u-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:s[u-2].slice(0,2),text:s[u]}];break;case 26:this.$=[s[u-2],s[u]];break;case 27:this.$=s[u];break;case 28:this.$=n.PLACEMENT.LEFTOF;break;case 29:this.$=n.PLACEMENT.RIGHTOF;break;case 30:this.$=[s[u-4],s[u-1],{type:"addMessage",from:s[u-4].actor,to:s[u-1].actor,signalType:s[u-3],msg:s[u]},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:s[u-1]}];break;case 31:this.$=[s[u-4],s[u-1],{type:"addMessage",from:s[u-4].actor,to:s[u-1].actor,signalType:s[u-3],msg:s[u]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:s[u-4]}];break;case 32:this.$=[s[u-3],s[u-1],{type:"addMessage",from:s[u-3].actor,to:s[u-1].actor,signalType:s[u-2],msg:s[u]}];break;case 33:this.$={type:"addActor",actor:s[u]};break;case 34:this.$=n.LINETYPE.SOLID_OPEN;break;case 35:this.$=n.LINETYPE.DOTTED_OPEN;break;case 36:this.$=n.LINETYPE.SOLID;break;case 37:this.$=n.LINETYPE.DOTTED;break;case 38:this.$=n.LINETYPE.SOLID_CROSS;break;case 39:this.$=n.LINETYPE.DOTTED_CROSS;break;case 40:this.$=s[u].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:r,5:n,6:i},{1:[3]},{3:5,4:r,5:n,6:i},{3:6,4:r,5:n,6:i},e([1,4,5,10,15,16,18,20,22,23,25,28,39],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:u,8:8,9:10,10:o,11:22,14:13,15:c,16:l,17:16,18:h,20:y,22:d,23:p,25:g,28:f,39:m},e(A,[2,5]),{9:25,10:o,11:22,14:13,15:c,16:l,17:16,18:h,20:y,22:d,23:p,25:g,28:f,39:m},e(A,[2,7]),e(A,[2,8]),{11:26,39:m},{5:[1,27]},{11:28,39:m},{11:29,39:m},{5:[1,30]},{19:31,46:b},{13:[1,33]},{13:[1,34]},{13:[1,35]},{13:[1,36]},{36:37,40:[1,38],41:[1,39],42:[1,40],43:[1,41],44:[1,42],45:[1,43]},{29:44,30:[1,45],34:[1,46],35:[1,47]},e([5,12,33,40,41,42,43,44,45,46],[2,33]),e(A,[2,6]),{5:[1,49],12:[1,48]},e(A,[2,11]),{5:[1,50]},{5:[1,51]},e(A,[2,14]),{5:[1,52]},{5:[2,40]},e(E,s,{7:53}),e(E,s,{7:54}),e([4,5,10,15,16,18,20,22,23,24,25,28,39],s,{7:55}),e(x,s,{26:56,7:57}),{11:60,37:[1,58],38:[1,59],39:m},e(k,[2,34]),e(k,[2,35]),e(k,[2,36]),e(k,[2,37]),e(k,[2,38]),e(k,[2,39]),{11:61,39:m},{11:63,31:62,39:m},{39:[2,28]},{39:[2,29]},{13:[1,64]},e(A,[2,10]),e(A,[2,12]),e(A,[2,13]),e(A,[2,15]),{4:a,5:u,8:8,9:10,10:o,11:22,14:13,15:c,16:l,17:16,18:h,20:y,21:[1,65],22:d,23:p,25:g,28:f,39:m},{4:a,5:u,8:8,9:10,10:o,11:22,14:13,15:c,16:l,17:16,18:h,20:y,21:[1,66],22:d,23:p,25:g,28:f,39:m},{4:a,5:u,8:8,9:10,10:o,11:22,14:13,15:c,16:l,17:16,18:h,20:y,22:d,23:p,24:[1,67],25:g,28:f,39:m},{21:[1,68]},{4:a,5:u,8:8,9:10,10:o,11:22,14:13,15:c,16:l,17:16,18:h,20:y,21:[2,20],22:d,23:p,25:g,27:[1,69],28:f,39:m},{11:70,39:m},{11:71,39:m},{19:72,46:b},{19:73,46:b},{19:74,46:b},{33:[1,75],46:[2,27]},{5:[1,76]},e(A,[2,16]),e(A,[2,17]),{13:[1,77]},e(A,[2,19]),{13:[1,78]},{19:79,46:b},{19:80,46:b},{5:[2,32]},{5:[2,22]},{5:[2,23]},{11:81,39:m},e(A,[2,9]),e(E,s,{7:82}),e(x,s,{7:57,26:83}),{5:[2,30]},{5:[2,31]},{46:[2,26]},{4:a,5:u,8:8,9:10,10:o,11:22,14:13,15:c,16:l,17:16,18:h,20:y,21:[1,84],22:d,23:p,25:g,28:f,39:m},{21:[2,21]},e(A,[2,18])],defaultActions:{5:[2,1],6:[2,2],32:[2,40],46:[2,28],47:[2,29],72:[2,32],73:[2,22],74:[2,23],79:[2,30],80:[2,31],81:[2,26],83:[2,21]},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],s=[],a=this.table,u="",o=0,c=0,l=0,h=1,y=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var m=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var A,b,E,x,k,_,v,F,D,C={};;){if(E=r[r.length-1],this.defaultActions[E]?x=this.defaultActions[E]:(null!==A&&void 0!==A||(A=function(){var t;return t=n.pop()||d.lex()||h,"number"!=typeof t&&(t instanceof Array&&(n=t,t=n.pop()),t=e.symbols_[t]||t),t}()),x=a[E]&&a[E][A]),void 0===x||!x.length||!x[0]){var T="";D=[];for(_ in a[E])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(o+1)+": Unexpected "+(A==h?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[A]||A,line:d.yylineno,loc:f,expected:D})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+A);switch(x[0]){case 1:r.push(A),i.push(d.yytext),s.push(d.yylloc),r.push(x[1]),A=null,b?(A=b,b=null):(c=d.yyleng,u=d.yytext,o=d.yylineno,f=d.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[x[1]][1],C.$=i[i.length-v],C._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},m&&(C._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[u,c,o,p.yy,x[1],i,s].concat(y))))return k;v&&(r=r.slice(0,-1*v*2),i=i.slice(0,-1*v),s=s.slice(0,-1*v)),r.push(this.productions_[x[1]][0]),i.push(C.$),s.push(C._$),F=a[r[r.length-2]][r[r.length-1]],r.push(F);break;case 3:return!0}}return!0}},v=function(){return{EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&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})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return 5;case 1:case 2:case 3:case 4:break;case 5:return this.begin("ID"),10;case 6:return this.begin("ALIAS"),39;case 7:return this.popState(),this.popState(),this.begin("LINE"),12;case 8:return this.popState(),this.popState(),5;case 9:return this.begin("LINE"),20;case 10:return this.begin("LINE"),22;case 11:return this.begin("LINE"),23;case 12:return this.begin("LINE"),24;case 13:return this.begin("LINE"),25;case 14:return this.begin("LINE"),27;case 15:return this.popState(),13;case 16:return 21;case 17:return 34;case 18:return 35;case 19:return 30;case 20:return 28;case 21:return this.begin("ID"),15;case 22:return this.begin("ID"),16;case 23:return 18;case 24:return 6;case 25:return 33;case 26:return 5;case 27:return e.yytext=e.yytext.trim(),39;case 28:return 42;case 29:return 43;case 30:return 40;case 31:return 41;case 32:return 44;case 33:return 45;case 34:return 46;case 35:return 37;case 36:return 38;case 37:return 5;case 38:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[2,3,15],inclusive:!1},ALIAS:{rules:[2,3,7,8],inclusive:!1},ID:{rules:[2,3,6],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}}}();return _.lexer=v,t.prototype=_,_.Parser=t,new t}();e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=r(3).readFileSync(r(4).normalize(t[1]),"utf8");return e.parser.parse(n)},void 0!==t&&r.c[r.s]===t&&e.main(process.argv.slice(1))}).call(e,r(2)(t))},function(t,e,r){"use strict";var n={},i=[],s=[],a="",u=r(0),o=u.Log;e.addActor=function(t,e,r){var i=n[t];i&&e===i.name&&null==r||(null==r&&(r=e),n[t]={name:e,description:r})},e.addMessage=function(t,e,r,n){i.push({from:t,to:e,message:r,answer:n})},e.addSignal=function(t,e,r,n){o.debug("Adding message from="+t+" to="+e+" message="+r+" type="+n),i.push({from:t,to:e,message:r,type:n})},e.getMessages=function(){return i},e.getActors=function(){return n},e.getActor=function(t){return n[t]},e.getActorKeys=function(){return Object.keys(n)},e.getTitle=function(){return a},e.clear=function(){n={},i=[]},e.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21},e.ARROWTYPE={FILLED:0,OPEN:1},e.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},e.addNote=function(t,r,n){var a={actor:t,placement:r,message:n},u=[].concat(t,t);s.push(a),i.push({from:u[0],to:u[1],message:n,type:e.LINETYPE.NOTE,placement:r})},e.setTitle=function(t){a=t},e.parseError=function(t,e){global.mermaidAPI.parseError(t,e)},e.apply=function(t){if(t instanceof Array)t.forEach(function(t){e.apply(t)});else switch(t.type){case"addActor":e.addActor(t.actor,t.actor,t.description);break;case"activeStart":case"activeEnd":e.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":e.addNote(t.actor,t.placement,t.text);break;case"addMessage":e.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":e.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":e.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":e.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":e.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":e.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":e.addSignal(void 0,void 0,void 0,t.signalType);break;case"setTitle":e.setTitle(t.text);break;case"parStart":case"and":e.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":e.addSignal(void 0,void 0,void 0,t.signalType)}}},function(t,e,r){"use strict";var n=r(0),i=n.Log,s="",a=!1;e.setMessage=function(t){i.debug("Setting message to: "+t),s=t},e.getMessage=function(){return s},e.setInfo=function(t){a=t},e.getInfo=function(){return a},e.parseError=function(t,e){global.mermaidAPI.parseError(t,e)}},function(t,e,r){"use strict";(function(t){var n=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[6,9,10,12],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,r,n,i,s,a){var u=s.length-1;switch(i){case 1:return n;case 4:break;case 6:n.setInfo(!0);break;case 7:n.setMessage(s[u]);break;case 8:this.$=s[u-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(r,[2,3]),e(r,[2,4]),e(r,[2,5]),e(r,[2,6]),e(r,[2,7]),{13:[1,11]},e(r,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],s=[],a=this.table,u="",o=0,c=0,l=0,h=1,y=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var m=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var A,b,E,x,k,_,v,F,D,C={};;){if(E=r[r.length-1],this.defaultActions[E]?x=this.defaultActions[E]:(null!==A&&void 0!==A||(A=function(){var t;return t=n.pop()||d.lex()||h,"number"!=typeof t&&(t instanceof Array&&(n=t,t=n.pop()),t=e.symbols_[t]||t),t}()),x=a[E]&&a[E][A]),void 0===x||!x.length||!x[0]){var T="";D=[];for(_ in a[E])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(o+1)+": Unexpected "+(A==h?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[A]||A,line:d.yylineno,loc:f,expected:D})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+A);switch(x[0]){case 1:r.push(A),i.push(d.yytext),s.push(d.yylloc),r.push(x[1]),A=null,b?(A=b,b=null):(c=d.yyleng,u=d.yytext,o=d.yylineno,f=d.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[x[1]][1],C.$=i[i.length-v],C._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},m&&(C._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[u,c,o,p.yy,x[1],i,s].concat(y))))return k;v&&(r=r.slice(0,-1*v*2),i=i.slice(0,-1*v),s=s.slice(0,-1*v)),r.push(this.productions_[x[1]][0]),i.push(C.$),s.push(C._$),F=a[r[r.length-2]][r[r.length-1]],r.push(F);break;case 3:return!0}}return!0}},i=function(){return{EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&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})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}}}();return n.lexer=i,t.prototype=n,n.Parser=t,new t}();e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=r(3).readFileSync(r(4).normalize(t[1]),"utf8");return e.parser.parse(n)},void 0!==t&&r.c[r.s]===t&&e.main(process.argv.slice(1))}).call(e,r(2)(t))},function(t,e,r){"use strict";(function(t){var n=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[6,8,10,11,12,13,14],n=[1,9],i=[1,10],s=[1,11],a=[1,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,dateFormat:11,title:12,section:13,taskTxt:14,taskData:15,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"title",13:"section",14:"taskTxt",15:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,2]],performAction:function(t,e,r,n,i,s,a){var u=s.length-1;switch(i){case 1:return s[u-1];case 2:this.$=[];break;case 3:s[u-1].push(s[u]),this.$=s[u-1];break;case 4:case 5:this.$=s[u];break;case 6:case 7:this.$=[];break;case 8:n.setDateFormat(s[u].substr(11)),this.$=s[u].substr(11);break;case 9:n.setTitle(s[u].substr(6)),this.$=s[u].substr(6);break;case 10:n.addSection(s[u].substr(8)),this.$=s[u].substr(8);break;case 11:n.addTask(s[u-1],s[u]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,13:s,14:a},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:13,11:n,12:i,13:s,14:a},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),{15:[1,14]},e(r,[2,4]),e(r,[2,11])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],s=[],a=this.table,u="",o=0,c=0,l=0,h=1,y=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var m=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var A,b,E,x,k,_,v,F,D,C={};;){if(E=r[r.length-1],this.defaultActions[E]?x=this.defaultActions[E]:(null!==A&&void 0!==A||(A=function(){var t;return t=n.pop()||d.lex()||h,"number"!=typeof t&&(t instanceof Array&&(n=t,t=n.pop()),t=e.symbols_[t]||t),t}()),x=a[E]&&a[E][A]),void 0===x||!x.length||!x[0]){var T="";D=[];for(_ in a[E])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(o+1)+": Unexpected "+(A==h?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[A]||A,line:d.yylineno,loc:f,expected:D})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+A);switch(x[0]){case 1:r.push(A),i.push(d.yytext),s.push(d.yylloc),r.push(x[1]),A=null,b?(A=b,b=null):(c=d.yyleng,u=d.yytext,o=d.yylineno,f=d.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[x[1]][1],C.$=i[i.length-v],C._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},m&&(C._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[u,c,o,p.yy,x[1],i,s].concat(y))))return k;v&&(r=r.slice(0,-1*v*2),i=i.slice(0,-1*v),s=s.slice(0,-1*v)),r.push(this.productions_[x[1]][0]),i.push(C.$),s.push(C._$),F=a[r[r.length-2]][r[r.length-1]],r.push(F);break;case 3:return!0}}return!0}},o=function(){return{EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&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})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return 10;case 1:case 2:case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}}}();return u.lexer=o,t.prototype=u,u.Parser=t,new t}();e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=r(3).readFileSync(r(4).normalize(t[1]),"utf8");return e.parser.parse(n)},void 0!==t&&r.c[r.s]===t&&e.main(process.argv.slice(1))}).call(e,r(2)(t))},function(t,e,r){"use strict";var n=r(15),i=r(0),s=i.Log,a="",u="",o=[],c=[],l="";e.clear=function(){o=[],c=[],l="",u="",g=0,h=void 0,y=void 0,b=[]},e.setDateFormat=function(t){a=t},e.getDateFormat=function(){return a},e.setTitle=function(t){u=t},e.getTitle=function(){return u},e.addSection=function(t){l=t,o.push(t)},e.getTasks=function(){for(var t=x(),e=0;!t&&e<10;)t=x(),e++;return c=b};var h,y,d=function(t,r,i){i=i.trim();var a=/^after\s+([\d\w-]+)/,u=a.exec(i.trim());if(null!==u){var o=e.findTaskById(u[1]);if(void 0===o){var c=new Date;return c.setHours(0,0,0,0),c}return o.endTime}return n(i,r.trim(),!0).isValid()?n(i,r.trim(),!0).toDate():(s.debug("Invalid date:"+i),s.debug("With date format:"+r.trim()),new Date)},p=function(t,e,r){if(r=r.trim(),n(r,e.trim(),!0).isValid())return n(r,e.trim()).toDate();var i=n(t),s=/^([\d]+)([wdhms])/,a=s.exec(r.trim());if(null!==a){switch(a[2]){case"s":i.add(a[1],"seconds");break;case"m":i.add(a[1],"minutes");break;case"h":i.add(a[1],"hours");break;case"d":i.add(a[1],"days");break;case"w":i.add(a[1],"weeks")}return i.toDate()}return i.toDate()},g=0,f=function(t){return void 0===t?"task"+(g+=1):t},m=function(t,r){var n;n=":"===r.substr(0,1)?r.substr(1,r.length):r;for(var i=n.split(","),s={},a=e.getDateFormat(),u=!0;u;)u=!1,i[0].match(/^\s*active\s*$/)&&(s.active=!0,i.shift(1),u=!0),i[0].match(/^\s*done\s*$/)&&(s.done=!0,i.shift(1),u=!0),i[0].match(/^\s*crit\s*$/)&&(s.crit=!0,i.shift(1),u=!0);var o;for(o=0;o<i.length;o++)i[o]=i[o].trim();switch(i.length){case 1:s.id=f(),s.startTime=t.endTime,s.endTime=p(s.startTime,a,i[0]);break;case 2:s.id=f(),s.startTime=d(0,a,i[0]),s.endTime=p(s.startTime,a,i[1]);break;case 3:s.id=f(i[0]),s.startTime=d(0,a,i[1]),s.endTime=p(s.startTime,a,i[2])}return s},A=function(t,e){var r;r=":"===e.substr(0,1)?e.substr(1,e.length):e;for(var n=r.split(","),i={},s=!0;s;)s=!1,n[0].match(/^\s*active\s*$/)&&(i.active=!0,n.shift(1),s=!0),n[0].match(/^\s*done\s*$/)&&(i.done=!0,n.shift(1),s=!0),n[0].match(/^\s*crit\s*$/)&&(i.crit=!0,n.shift(1),s=!0);var a;for(a=0;a<n.length;a++)n[a]=n[a].trim();switch(n.length){case 1:i.id=f(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:n[0]};break;case 2:i.id=f(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=f(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]}}return i},b=[],E={};e.addTask=function(t,e){var r={section:l,type:l,processed:!1,raw:{data:e},task:t},n=A(y,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=y,r.active=n.active,r.done=n.done,r.crit=n.crit;var i=b.push(r);y=r.id,E[r.id]=i-1},e.findTaskById=function(t){var e=E[t];return b[e]},e.addTaskOrg=function(t,e){var r={section:l,type:l,description:t,task:t},n=m(h,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,h=r,c.push(r)};var x=function(){var t,r=e.getDateFormat(),n=!0;for(t=0;t<b.length;t++)!function(t){var n=b[t],i="";switch(b[t].raw.startTime.type){case"prevTaskEnd":var s=e.findTaskById(n.prevTaskId);n.startTime=s.endTime;break;case"getStartDate":i=d(0,r,b[t].raw.startTime.startData),i&&(b[t].startTime=i)}b[t].startTime&&(b[t].endTime=p(b[t].startTime,r,b[t].raw.endTime.data),b[t].endTime&&(b[t].processed=!0)),b[t].processed}(t),n=n&&b[t].processed;return n};e.parseError=function(t,e){global.mermaidAPI.parseError(t,e)}},function(t,e){t.exports=require("moment")},function(t,e,r){"use strict";(function(t){var n=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[1,11],n=[1,12],i=[1,13],s=[1,15],a=[1,16],u=[1,17],o=[6,8],c=[1,26],l=[1,27],h=[1,28],y=[1,29],d=[1,30],p=[1,31],g=[6,8,13,17,23,26,27,28,29,30,31],f=[6,8,13,17,23,26,27,28,29,30,31,45,46,47],m=[23,45,46,47],A=[23,30,31,45,46,47],b=[23,26,27,28,29,45,46,47],E=[6,8,13],x=[1,46],k={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,CLASS_DIAGRAM:5,NEWLINE:6,statements:7,EOF:8,statement:9,className:10,alphaNumToken:11,relationStatement:12,LABEL:13,classStatement:14,methodStatement:15,CLASS:16,STRUCT_START:17,members:18,STRUCT_STOP:19,MEMBER:20,SEPARATOR:21,relation:22,STR:23,relationType:24,lineType:25,AGGREGATION:26,EXTENSION:27,COMPOSITION:28,DEPENDENCY:29,LINE:30,DOTTED_LINE:31,commentToken:32,textToken:33,graphCodeTokens:34,textNoTagsToken:35,TAGSTART:36,TAGEND:37,"==":38,"--":39,PCT:40,DEFAULT:41,SPACE:42,MINUS:43,keywords:44,UNICODE_TEXT:45,NUM:46,ALPHA:47,$accept:0,$end:1},terminals_:{2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",13:"LABEL",16:"CLASS",17:"STRUCT_START",19:"STRUCT_STOP",20:"MEMBER",21:"SEPARATOR",23:"STR",26:"AGGREGATION",27:"EXTENSION",28:"COMPOSITION",29:"DEPENDENCY",30:"LINE",31:"DOTTED_LINE",34:"graphCodeTokens",36:"TAGSTART",37:"TAGEND",38:"==",39:"--",40:"PCT",41:"DEFAULT",42:"SPACE",43:"MINUS",44:"keywords",45:"UNICODE_TEXT",46:"NUM",47:"ALPHA"},productions_:[0,[3,1],[4,4],[7,1],[7,3],[10,2],[10,1],[9,1],[9,2],[9,1],[9,1],[14,2],[14,5],[18,1],[18,2],[15,1],[15,2],[15,1],[15,1],[12,3],[12,4],[12,4],[12,5],[22,3],[22,2],[22,2],[22,1],[24,1],[24,1],[24,1],[24,1],[25,1],[25,1],[32,1],[32,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[35,1],[35,1],[35,1],[35,1],[11,1],[11,1],[11,1]],performAction:function(t,e,r,n,i,s,a){var u=s.length-1;switch(i){case 5:this.$=s[u-1]+s[u];break;case 6:this.$=s[u];break;case 7:n.addRelation(s[u]);break;case 8:s[u-1].title=n.cleanupLabel(s[u]),n.addRelation(s[u-1]);break;case 12:n.addMembers(s[u-3],s[u-1]);break;case 13:this.$=[s[u]];break;case 14:s[u].push(s[u-1]),this.$=s[u];break;case 15:break;case 16:n.addMembers(s[u-1],n.cleanupLabel(s[u]));break;case 17:console.warn("Member",s[u]);break;case 18:break;case 19:this.$={id1:s[u-2],id2:s[u],relation:s[u-1],relationTitle1:"none",relationTitle2:"none"};break;case 20:this.$={id1:s[u-3],id2:s[u],relation:s[u-1],relationTitle1:s[u-2],relationTitle2:"none"};break;case 21:this.$={id1:s[u-3],id2:s[u],relation:s[u-2],relationTitle1:"none",relationTitle2:s[u-1]};break;case 22:this.$={id1:s[u-4],id2:s[u],relation:s[u-2],relationTitle1:s[u-3],relationTitle2:s[u-1]};break;case 23:this.$={type1:s[u-2],type2:s[u],lineType:s[u-1]};break;case 24:this.$={type1:"none",type2:s[u],lineType:s[u-1]};break;case 25:this.$={type1:s[u-1],type2:"none",lineType:s[u]};break;case 26:this.$={type1:"none",type2:"none",lineType:s[u]};break;case 27:this.$=n.relationType.AGGREGATION;break;case 28:this.$=n.relationType.EXTENSION;break;case 29:this.$=n.relationType.COMPOSITION;break;case 30:this.$=n.relationType.DEPENDENCY;break;case 31:this.$=n.lineType.LINE;break;case 32:this.$=n.lineType.DOTTED_LINE}},table:[{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10:10,11:14,12:7,14:8,15:9,16:r,20:n,21:i,45:s,46:a,47:u},{8:[1,18]},{6:[1,19],8:[2,3]},e(o,[2,7],{13:[1,20]}),e(o,[2,9]),e(o,[2,10]),e(o,[2,15],{22:21,24:24,25:25,13:[1,23],23:[1,22],26:c,27:l,28:h,29:y,30:d,31:p}),{10:32,11:14,45:s,46:a,47:u},e(o,[2,17]),e(o,[2,18]),e(g,[2,6],{11:14,10:33,45:s,46:a,47:u}),e(f,[2,46]),e(f,[2,47]),e(f,[2,48]),{1:[2,2]},{7:34,9:6,10:10,11:14,12:7,14:8,15:9,16:r,20:n,21:i,45:s,46:a,47:u},e(o,[2,8]),{10:35,11:14,23:[1,36],45:s,46:a,47:u},{22:37,24:24,25:25,26:c,27:l,28:h,29:y,30:d,31:p},e(o,[2,16]),{25:38,30:d,31:p},e(m,[2,26],{24:39,26:c,27:l,28:h,29:y}),e(A,[2,27]),e(A,[2,28]),e(A,[2,29]),e(A,[2,30]),e(b,[2,31]),e(b,[2,32]),e(o,[2,11],{17:[1,40]}),e(g,[2,5]),{8:[2,4]},e(E,[2,19]),{10:41,11:14,45:s,46:a,47:u},{10:42,11:14,23:[1,43],45:s,46:a,47:u},e(m,[2,25],{24:44,26:c,27:l,28:h,29:y}),e(m,[2,24]),{18:45,20:x},e(E,[2,21]),e(E,[2,20]),{10:47,11:14,45:s,46:a,47:u},e(m,[2,23]),{19:[1,48]},{18:49,19:[2,13],20:x},e(E,[2,22]),e(o,[2,12]),{19:[2,14]}],defaultActions:{2:[2,1],18:[2,2],34:[2,4],49:[2,14]},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],s=[],a=this.table,u="",o=0,c=0,l=0,h=1,y=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var m=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var A,b,E,x,k,_,v,F,D,C={};;){if(E=r[r.length-1],this.defaultActions[E]?x=this.defaultActions[E]:(null!==A&&void 0!==A||(A=function(){var t;return t=n.pop()||d.lex()||h,"number"!=typeof t&&(t instanceof Array&&(n=t,t=n.pop()),t=e.symbols_[t]||t),t}()),x=a[E]&&a[E][A]),void 0===x||!x.length||!x[0]){var T="";D=[];for(_ in a[E])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(o+1)+": Unexpected "+(A==h?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[A]||A,line:d.yylineno,loc:f,expected:D})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+A);switch(x[0]){case 1:r.push(A),i.push(d.yytext),s.push(d.yylloc),r.push(x[1]),A=null,b?(A=b,b=null):(c=d.yyleng,u=d.yytext,o=d.yylineno,f=d.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[x[1]][1],C.$=i[i.length-v],C._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},m&&(C._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[u,c,o,p.yy,x[1],i,s].concat(y))))return k;v&&(r=r.slice(0,-1*v*2),i=i.slice(0,-1*v),s=s.slice(0,-1*v)),r.push(this.productions_[x[1]][0]),i.push(C.$),s.push(C._$),F=a[r[r.length-2]][r[r.length-1]],r.push(F);break;case 3:return!0}}return!0}},_=function(){return{EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&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})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:break;case 1:return 6;case 2:break;case 3:return 5;case 4:return this.begin("struct"),17;case 5:return this.popState(),19;case 6:break;case 7:return"MEMBER";case 8:return 16;case 9:this.begin("string");break;case 10:this.popState();break;case 11:return"STR";case 12:case 13:return 27;case 14:case 15:return 29;case 16:return 28;case 17:return 26;case 18:return 30;case 19:return 31;case 20:return 13;case 21:return 43;case 22:return"DOT";case 23:return"PLUS";case 24:return 40;case 25:case 26:return"EQUALS";case 27:return 47;case 28:return"PUNCTUATION";case 29:return 46;case 30:return 45;case 31:return 42;case 32:return 8}},rules:[/^(?:%%[^\n]*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^#\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[A-Za-z]+)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[10,11],inclusive:!1},struct:{rules:[5,6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,8,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:!0}}}}();return k.lexer=_,t.prototype=k,k.Parser=t,new t}();e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=r(3).readFileSync(r(4).normalize(t[1]),"utf8");return e.parser.parse(n)},void 0!==t&&r.c[r.s]===t&&e.main(process.argv.slice(1))}).call(e,r(2)(t))},function(t,e,r){"use strict";var n,i=r(0),s=i.Log,a=[];n={},e.addClass=function(t){void 0===n[t]&&(n[t]={id:t,methods:[],members:[]})},e.clear=function(){a=[],n={}},t.exports.getClass=function(t){return n[t]},t.exports.getClasses=function(){return n},t.exports.getRelations=function(){return a},e.addRelation=function(t){s.warn("Adding relation: "+JSON.stringify(t)),e.addClass(t.id1),e.addClass(t.id2),a.push(t)},e.addMembers=function(t,e){var r=n[t];"string"==typeof e&&(")"===e.substr(-1)?r.methods.push(e):r.members.push(e))},e.cleanupLabel=function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},e.lineType={LINE:0,DOTTED_LINE:1},e.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}},function(t,e,r){"use strict";(function(t){var n=function(){function t(){this.yy={}}var e=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},r=[2,3],n=[1,7],i=[7,12,15,17,19,20,21],s=[7,11,12,15,17,19,20,21],a=[2,20],u=[1,32],o={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,r,n,i,s,a){var u=s.length-1;switch(i){case 1:return s[u-1];case 2:return n.setDirection(s[u-3]),s[u-1];case 4:n.setOptions(s[u-1]),this.$=s[u];break;case 5:s[u-1]+=s[u],this.$=s[u-1];break;case 7:this.$=[];break;case 8:s[u-1].push(s[u]),this.$=s[u-1];break;case 9:this.$=s[u-1];break;case 11:n.commit(s[u]);break;case 12:n.branch(s[u]);break;case 13:n.checkout(s[u]);break;case 14:n.merge(s[u]);break;case 15:n.reset(s[u]);break;case 16:this.$="";break;case 17:this.$=s[u];break;case 18:this.$=s[u-1]+":"+s[u];break;case 19:this.$=s[u-1]+":"+n.count,n.count=0;break;case 20:n.count=0;break;case 21:n.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:r,9:6,12:n},{5:[1,8]},{7:[1,9]},e(i,[2,7],{10:10,11:[1,11]}),e(s,[2,6]),{6:12,7:r,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},e(s,[2,5]),{7:[1,21]},e(i,[2,8]),{12:[1,22]},e(i,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},e(i,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:a,25:31,26:u},{12:a,25:33,26:u},{12:[2,18]},{12:a,25:34,26:u},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var r=function(t,e){this.message=t,this.hash=e};throw r.prototype=Error,new r(t,e)}this.trace(t)},parse:function(t){var e=this,r=[0],n=[],i=[null],s=[],a=this.table,u="",o=0,c=0,l=0,h=1,y=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var m=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var A,b,E,x,k,_,v,F,D,C={};;){if(E=r[r.length-1],this.defaultActions[E]?x=this.defaultActions[E]:(null!==A&&void 0!==A||(A=function(){var t;return t=n.pop()||d.lex()||h,"number"!=typeof t&&(t instanceof Array&&(n=t,t=n.pop()),t=e.symbols_[t]||t),t}()),x=a[E]&&a[E][A]),void 0===x||!x.length||!x[0]){var T="";D=[];for(_ in a[E])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[A]||A)+"'":"Parse error on line "+(o+1)+": Unexpected "+(A==h?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[A]||A,line:d.yylineno,loc:f,expected:D})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+A);switch(x[0]){case 1:r.push(A),i.push(d.yytext),s.push(d.yylloc),r.push(x[1]),A=null,b?(A=b,b=null):(c=d.yyleng,u=d.yytext,o=d.yylineno,f=d.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[x[1]][1],C.$=i[i.length-v],C._$={first_line:s[s.length-(v||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(v||1)].first_column,last_column:s[s.length-1].last_column},m&&(C._$.range=[s[s.length-(v||1)].range[0],s[s.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[u,c,o,p.yy,x[1],i,s].concat(y))))return k;v&&(r=r.slice(0,-1*v*2),i=i.slice(0,-1*v),s=s.slice(0,-1*v)),r.push(this.productions_[x[1]][0]),i.push(C.$),s.push(C._$),F=a[r[r.length-2]][r[r.length-1]],r.push(F);break;case 3:return!0}}return!0}},c=function(){return{EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput: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},input: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},unput:function(t){var e=t.length,r=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 n=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput: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,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),n=t[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&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})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>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(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,n){switch(r){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][a-zA-Z0-9_]+)/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}}}();return o.lexer=c,t.prototype=o,o.Parser=t,new t}();e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=r(3).readFileSync(r(4).normalize(t[1]),"utf8");return e.parser.parse(n)},void 0!==t&&r.c[r.s]===t&&e.main(process.argv.slice(1))}).call(e,r(2)(t))},function(t,e){t.exports=require("lodash")},function(t,e,r){"use strict";function n(t,e){return Math.floor(Math.random()*(e-t))+t}function i(){for(var t="",e=0;e<7;e++)t+="0123456789abcdef"[n(0,16)];return t}function s(t,e){for(y.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return y.debug("In merge commit:",e.parent),s(t,d[e.parent[0]])||s(t,d[e.parent[1]]);e=d[e.parent]}return y.debug(t.id,e.id),t.id===e.id}function a(t,e){return t.seq>e.seq&&s(e,t)}function u(t,e,r){var n=t.indexOf(e);-1===n?t.push(r):t.splice(n,1,r)}function o(t){var e=l.default.maxBy(t,"seq"),r="";t.forEach(function(t){r+=t===e?"\t*":"\t|"});var n=[r,e.id,e.seq];if(l.default.each(g,function(t,r){t===e.id&&n.push(r)}),y.debug(n.join(" ")),Array.isArray(e.parent)){var i=d[e.parent[0]];u(t,e,i),t.push(d[e.parent[1]])}else{if(null==e.parent)return;var s=d[e.parent];u(t,e,s)}t=l.default.uniqBy(t,"id"),o(t)}var c=r(19),l=function(t){return t&&t.__esModule?t:{default:t}}(c),h=r(0),y=h.Log,d={},p=null,g={master:p},f="master",m="LR",A=0;e.setDirection=function(t){m=t};var b={};e.setOptions=function(t){y.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{b=JSON.parse(t)}catch(t){y.error("error while parsing gitGraph options",t.message)}},e.getOptions=function(){return b},e.commit=function(t){var e={id:i(),message:t,seq:A++,parent:null==p?null:p.id};p=e,d[e.id]=e,g[f]=e.id,y.debug("in pushCommit "+e.id)},e.branch=function(t){g[t]=null!=p?p.id:null,y.debug("in createBranch")},e.merge=function(t){var e=d[g[f]],r=d[g[t]];if(a(e,r))return void y.debug("Already merged");if(s(e,r))g[f]=g[t],p=d[g[f]];else{var n={id:i(),message:"merged branch "+t+" into "+f,seq:A++,parent:[null==p?null:p.id,g[t]]};p=n,d[n.id]=n,g[f]=n.id}y.debug(g),y.debug("in mergeBranch")},e.checkout=function(t){y.debug("in checkout"),f=t;var e=g[f];p=d[e]},e.reset=function(t){y.debug("in reset",t);var e=t.split(":")[0],r=parseInt(t.split(":")[1]),n="HEAD"===e?p:d[g[e]];for(y.debug(n,r);r>0;)if(n=d[n.parent],r--,!n){var i="Critical error - unique parent commit not found during reset";throw y.error(i),i}p=n,g[f]=n.id},e.prettyPrint=function(){y.debug(d),o([e.getCommitsArray()[0]])},e.clear=function(){d={},p=null,g={master:p},f="master",A=0},e.getBranchesAsObjArray=function(){return l.default.map(g,function(t,e){return{name:e,commit:d[t]}})},e.getBranches=function(){return g},e.getCommits=function(){return d},e.getCommitsArray=function(){var t=Object.keys(d).map(function(t){return d[t]});return t.forEach(function(t){y.debug(t.id)}),l.default.orderBy(t,["seq"],["desc"])},e.getCurrentBranch=function(){return f},e.getDirection=function(){return m},e.getHead=function(){return p}},function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(0),s=i.Log,a=r(5),u=r(6),o=r(23),c=r(25),l=r(27),h=r(12),y=r(7),d=r(8),p=r(9),g=r(10),f=r(11),m=r(28),A=r(13),b=r(14),E=r(16),x=r(29),k=r(17),_=r(18),v=r(31),F=r(20),D=r(1),C={logLevel:5,cloneCssStyles:!0,startOnLoad:!0,arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequenceDiagram:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:3,axisFormatter:[["%I:%M",function(t){return t.getHours()}],["w. %U",function(t){return 1===t.getDay()}],["%a %d",function(t){return t.getDay()&&1!==t.getDate()}],["%b %d",function(t){return 1!==t.getDate()}],["%m-%y",function(t){return t.getMonth()}]]},classDiagram:{},gitGraph:{},info:{}};i.setLogLevel(C.logLevel);var T=function(t){var e,r=u.detectType(t);switch(r){case"gitGraph":e=_,e.parser.yy=F;break;case"graph":e=y,e.parser.yy=a;break;case"dotGraph":e=d,e.parser.yy=a;break;case"sequenceDiagram":e=p,e.parser.yy=g;break;case"info":e=h,e.parser.yy=f;break;case"gantt":e=A,e.parser.yy=b;break;case"classDiagram":e=E,e.parser.yy=k}try{return e.parse(t),!0}catch(t){return!1}};e.parse=T,e.version=function(){return r(32).version},e.encodeEntities=function(t){var e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})},e.decodeEntities=function(t){var e=t;return e=e.replace(/fl°°/g,function(){return"&#"}),e=e.replace(/fl°/g,function(){return"&"}),e=e.replace(/¶ß/g,function(){return";"})};var w=function(t,r,n,i){if(void 0!==i)i.innerHTML="",D.select(i).append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var h=document.querySelector("#d"+t);h&&(h.innerHTML=""),D.select("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=r,r=e.encodeEntities(r);var y=D.select("#d"+t).node(),d=u.detectType(r),p={};switch(d){case"gitGraph":C.flowchart.arrowMarkerAbsolute=C.arrowMarkerAbsolute,v.setConf(C.gitGraph),v.draw(r,t,!1);break;case"graph":C.flowchart.arrowMarkerAbsolute=C.arrowMarkerAbsolute,o.setConf(C.flowchart),o.draw(r,t,!1),C.cloneCssStyles&&(p=o.getClasses(r,!1),u.cloneCssStyles(y.firstChild,p));break;case"dotGraph":C.flowchart.arrowMarkerAbsolute=C.arrowMarkerAbsolute,o.setConf(C.flowchart),o.draw(r,t,!0),C.cloneCssStyles&&(p=o.getClasses(r,!0),u.cloneCssStyles(y.firstChild,p));break;case"sequenceDiagram":C.sequenceDiagram.arrowMarkerAbsolute=C.arrowMarkerAbsolute,c.setConf(C.sequenceDiagram),c.draw(r,t),C.cloneCssStyles&&u.cloneCssStyles(y.firstChild,[]);break;case"gantt":C.gantt.arrowMarkerAbsolute=C.arrowMarkerAbsolute,m.setConf(C.gantt),m.draw(r,t),C.cloneCssStyles&&u.cloneCssStyles(y.firstChild,[]);break;case"classDiagram":C.classDiagram.arrowMarkerAbsolute=C.arrowMarkerAbsolute,x.setConf(C.classDiagram),x.draw(r,t),C.cloneCssStyles&&u.cloneCssStyles(y.firstChild,[]);break;case"info":C.info.arrowMarkerAbsolute=C.arrowMarkerAbsolute,l.draw(r,t,e.version()),C.cloneCssStyles&&u.cloneCssStyles(y.firstChild,[])}D.select("#d"+t).selectAll("foreignobject div").attr("xmlns","http://www.w3.org/1999/xhtml");var g="";C.arrowMarkerAbsolute&&(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,g=g.replace(/\(/g,"\\("),g=g.replace(/\)/g,"\\)"));var f=D.select("#d"+t).node().innerHTML.replace(/url\(#arrowhead/g,"url("+g+"#arrowhead","g");f=e.decodeEntities(f),void 0!==n?n(f,a.bindFunctions):s.warn("CB = undefined!");var A=D.select("#d"+t).node();return null!==A&&"function"==typeof A.remove&&D.select("#d"+t).node().remove(),f};e.render=function(t,e,r,n){try{if(1===arguments.length&&(e=t,t="mermaidId0"),"undefined"!=typeof document)return w(t,e,r,n)}catch(t){s.warn(t)}};var S=function(t){var e,r=Object.keys(t);for(e=0;e<r.length;e++)if("object"===n(t[r[e]])){var i,a=Object.keys(t[r[e]]);for(i=0;i<a.length;i++)s.debug("Setting conf ",r[e],"-",a[i]),void 0===C[r[e]]&&(C[r[e]]={}),s.debug("Setting config: "+r[e]+" "+a[i]+" to "+t[r[e]][a[i]]),C[r[e]][a[i]]=t[r[e]][a[i]]}else C[r[e]]=t[r[e]]};e.initialize=function(t){s.debug("Initializing mermaidAPI"),"object"===(void 0===t?"undefined":n(t))&&S(t),i.setLogLevel(C.logLevel)},e.getConfig=function(){return C},e.parseError=function(t,e){"undefined"!=typeof mermaid?global.mermaid.parseError(t,e):(s.debug("Mermaid Syntax error:"),s.debug(t))},global.mermaidAPI={render:e.render,parse:e.parse,initialize:e.initialize,detectType:u.detectType,parseError:e.parseError,getConfig:e.getConfig}},function(t,e){t.exports=require("d3")},function(t,e,r){"use strict";var n=r(5),i=r(7),s=r(8),a=r(1),u=r(24),o=r(0),c=o.Log,l={};t.exports.setConf=function(t){var e,r=Object.keys(t);for(e=0;e<r.length;e++)l[r[e]]=t[r[e]]},e.addVertices=function(t,e){var r=function(t,e){var r;for(r=0;r<e.length;r++)void 0!==e[r]&&(t=t+e[r]+";");return t};Object.keys(t).forEach(function(n){var i,s=t[n],a="";s.classes.length>0&&(a=s.classes.join(" "));var u="";u=r(u,s.styles),i=void 0===s.text?s.id:s.text;var o="";if(l.htmlLabels)o="html",i=i.replace(/fa:fa[\w-]+/g,function(t){return'<i class="fa '+t.substring(3)+'"></i>'});else{var c=document.createElementNS("http://www.w3.org/2000/svg","text"),h=i.split(/<br>/),y=0;for(y=0;y<h.length;y++){var d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),d.setAttribute("dy","1em"),d.setAttribute("x","1"),d.textContent=h[y],c.appendChild(d)}o="svg",i=c}var p=0,g="";switch(s.type){case"round":p=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"odd":case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"group":g="rect",i=l.htmlLabels?"":document.createElementNS("http://www.w3.org/2000/svg","text");break;default:g="rect"}e.setNode(s.id,{labelType:o,shape:g,label:i,rx:p,ry:p,class:a,style:u,id:s.id})})},e.addEdges=function(t,e){var r,n=0;void 0!==t.defaultStyle&&(r=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(i){n++;var s={};"arrow_open"===i.type?s.arrowhead="none":s.arrowhead="normal";var a="";if(void 0!==i.style)i.style.forEach(function(t){a=a+t+";"});else switch(i.stroke){case"normal":a="fill:none",void 0!==r&&(a=r);break;case"dotted":a="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":a="stroke: #333; stroke-width: 3.5px;fill:none"}s.style=a,void 0!==i.interpolate?s.lineInterpolate=i.interpolate:void 0!==t.defaultInterpolate&&(s.lineInterpolate=t.defaultInterpolate),void 0===i.text?void 0!==i.style&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",void 0===i.style?(s.labelpos="c",l.htmlLabels?(s.labelType="html",s.label='<span class="edgeLabel">'+i.text+"</span>"):(s.labelType="text",s.style="stroke: #333; stroke-width: 1.5px;fill:none",s.label=i.text.replace(/<br>/g,"\n"))):s.label=i.text.replace(/<br>/g,"\n")),e.setEdge(i.start,i.end,s,n)})},e.getClasses=function(t,e){var r;n.clear(),r=e?s.parser:i.parser,r.yy=n,r.parse(t);var a=n.getClasses();return void 0===a.default&&(a.default={id:"default"},a.default.styles=[],a.default.clusterStyles=["rx:4px","fill: rgb(255, 255, 222)","rx: 4px","stroke: rgb(170, 170, 51)","stroke-width: 1px"],a.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],a.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),a},e.draw=function(t,r,o){c.debug("Drawing flowchart");var h;n.clear(),h=o?s.parser:i.parser,h.yy=n;try{h.parse(t)}catch(t){c.debug("Parsing failed")}var y;void 0===(y=n.getDirection())&&(y="TD");var d,p=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:y,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),g=n.getSubGraphs(),f=0;for(f=g.length-1;f>=0;f--)d=g[f],n.addVertex(d.id,d.title,"group",void 0);var m=n.getVertices(),A=n.getEdges();f=0;var b;for(f=g.length-1;f>=0;f--)for(d=g[f],a.selectAll("cluster").append("text"),b=0;b<d.nodes.length;b++)p.setParent(d.nodes[b],d.id);e.addVertices(m,p),e.addEdges(A,p);var E=u.render,x=new E;x.shapes().question=function(t,e,r){var n=e.width,i=e.height,s=.8*(n+i),a=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-s/2+","+2*s/4+")");return r.intersect=function(t){return u.intersect.polygon(r,a,t)},o},x.shapes().rect_left_inv_arrow=function(t,e,r){var n=e.width,i=e.height,s=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],a=t.insert("polygon",":first-child").attr("points",s.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-n/2+","+2*i/4+")");return r.intersect=function(t){return u.intersect.polygon(r,s,t)},a},x.shapes().rect_right_inv_arrow=function(t,e,r){var n=e.width,i=e.height,s=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],a=t.insert("polygon",":first-child").attr("points",s.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-n/2+","+2*i/4+")");return r.intersect=function(t){return u.intersect.polygon(r,s,t)},a},x.arrows().none=function(t,e,r,n){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(s,r[n+"Style"])},x.arrows().normal=function(t,e,r,n){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var k=a.select("#"+r),_=a.select("#"+r+" g");for(x(_,p),_.selectAll("g.node").attr("title",function(){return n.getTooltip(this.id)}),l.useMaxWidth?(k.attr("height","100%"),k.attr("width",l.width),k.attr("viewBox","0 0 "+(p.graph().width+20)+" "+(p.graph().height+20)),k.attr("style","max-width:"+(p.graph().width+20)+"px;")):(k.attr("height",p.graph().height),void 0===l.width?k.attr("width",p.graph().width):k.attr("width",l.width),k.attr("viewBox","0 0 "+(p.graph().width+20)+" "+(p.graph().height+20))),n.indexNodes("subGraph"+f),f=0;f<g.length;f++)if(d=g[f],"undefined"!==d.title){var v=document.querySelectorAll("#"+r+" #"+d.id+" rect"),F=document.querySelectorAll("#"+r+" #"+d.id),D=v[0].x.baseVal.value,C=v[0].y.baseVal.value,T=v[0].width.baseVal.value,w=a.select(F[0]),S=w.append("text");S.attr("x",D+T/2),S.attr("y",C+14),S.attr("fill","black"),S.attr("stroke","none"),S.attr("id",r+"Text"),S.style("text-anchor","middle"),void 0===d.title?S.text("Undef"):S.text(d.title)}if(!l.htmlLabels){var B,L=document.querySelectorAll("#"+r+" .edgeLabel .label");for(B=0;B<L.length;B++){var I=L[f],O=I.getBBox(),P=document.createElementNS("http://www.w3.org/2000/svg","rect");P.setAttribute("rx",0),P.setAttribute("ry",0),P.setAttribute("width",O.width),P.setAttribute("height",O.height),P.setAttribute("style","fill:#e8e8e8;"),I.insertBefore(P,I.firstChild)}}}},function(t,e){t.exports=require("dagre-d3-renderer")},function(t,e,r){"use strict";var n=r(9).parser;n.yy=r(10);var i=r(26),s=r(1),a=r(0),u=a.Log,o={diagramMarginX:50,diagramMarginY:30,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1,activationWidth:10,textPlacement:"tspan"};e.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],init:function(){this.sequenceItems=[],this.activations=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},updateBounds:function(t,r,n,i){function s(s){return function(c){u++;var l=a.sequenceItems.length-u+1;a.updateVal(c,"starty",r-l*o.boxMargin,Math.min),a.updateVal(c,"stopy",i+l*o.boxMargin,Math.max),a.updateVal(e.bounds.data,"startx",t-l*o.boxMargin,Math.min),a.updateVal(e.bounds.data,"stopx",n+l*o.boxMargin,Math.max),"activation"!==s&&(a.updateVal(c,"startx",t-l*o.boxMargin,Math.min),a.updateVal(c,"stopx",n+l*o.boxMargin,Math.max),a.updateVal(e.bounds.data,"starty",r-l*o.boxMargin,Math.min),a.updateVal(e.bounds.data,"stopy",i+l*o.boxMargin,Math.max))}}var a=this,u=0;this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},insert:function(t,r,n,i){var s,a,u,o;s=Math.min(t,n),u=Math.max(t,n),a=Math.min(r,i),o=Math.max(r,i),this.updateVal(e.bounds.data,"startx",s,Math.min),this.updateVal(e.bounds.data,"starty",a,Math.min),this.updateVal(e.bounds.data,"stopx",u,Math.max),this.updateVal(e.bounds.data,"stopy",o,Math.max),this.updateBounds(s,a,u,o)},newActivation:function(t,e){var r=n.yy.getActors()[t.from.actor],s=h(t.from.actor).length,a=r.x+o.width/2+(s-1)*o.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+o.activationWidth,stopy:void 0,actor:t.from.actor,anchored:i.anchorElement(e)})},endActivation:function(t){var e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},newLoop:function(t){this.sequenceItems.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var r=this.sequenceItems.pop();r.sections=r.sections||[],r.sectionTitles=r.sectionTitles||[],r.sections.push(e.bounds.getVerticalPos()),r.sectionTitles.push(t),this.sequenceItems.push(r)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var c=function(t,r,n,s,a){var u=i.getNoteRect();u.x=r,u.y=n,u.width=a||o.width,u.class="note";var c=t.append("g"),l=i.drawRect(c,u),h=i.getTextObj();h.x=r-4,h.y=n-13,h.textMargin=o.noteMargin,h.dy="1em",h.text=s.message,h.class="noteText";var y=i.drawText(c,h,u.width-o.noteMargin),d=y[0][0].getBBox().height;!a&&d>o.width?(y.remove(),c=t.append("g"),y=i.drawText(c,h,2*u.width-o.noteMargin),d=y[0][0].getBBox().height,l.attr("width",2*u.width),e.bounds.insert(r,n,r+2*u.width,n+2*o.noteMargin+d)):e.bounds.insert(r,n,r+u.width,n+2*o.noteMargin+d),l.attr("height",d+2*o.noteMargin),e.bounds.bumpVerticalPos(d+2*o.noteMargin)},l=function(t,r,i,s,a){var u,c=t.append("g"),l=r+(i-r)/2,h=c.append("text").attr("x",l).attr("y",s-7).style("text-anchor","middle").attr("class","messageText").text(a.message);u=void 0!==h[0][0].getBBox?h[0][0].getBBox().width:h[0][0].getBoundingClientRect();var y;if(r===i){y=c.append("path").attr("d","M "+r+","+s+" C "+(r+60)+","+(s-10)+" "+(r+60)+","+(s+30)+" "+r+","+(s+20)),e.bounds.bumpVerticalPos(30);var d=Math.max(u/2,100);e.bounds.insert(r-d,e.bounds.getVerticalPos()-10,i+d,e.bounds.getVerticalPos())}else y=c.append("line"),y.attr("x1",r),y.attr("y1",s),y.attr("x2",i),y.attr("y2",s),e.bounds.insert(r,e.bounds.getVerticalPos()-10,i,e.bounds.getVerticalPos());a.type===n.yy.LINETYPE.DOTTED||a.type===n.yy.LINETYPE.DOTTED_CROSS||a.type===n.yy.LINETYPE.DOTTED_OPEN?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0");var p="";o.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)")),y.attr("stroke-width",2),y.attr("stroke","black"),y.style("fill","none"),a.type!==n.yy.LINETYPE.SOLID&&a.type!==n.yy.LINETYPE.DOTTED||y.attr("marker-end","url("+p+"#arrowhead)"),a.type!==n.yy.LINETYPE.SOLID_CROSS&&a.type!==n.yy.LINETYPE.DOTTED_CROSS||y.attr("marker-end","url("+p+"#crosshead)")};t.exports.drawActors=function(t,r,n,s){var a;for(a=0;a<n.length;a++){var u=n[a];r[u].x=a*o.actorMargin+a*o.width,r[u].y=s,r[u].width=o.diagramMarginX,r[u].height=o.diagramMarginY,i.drawActor(t,r[u].x,s,r[u].description,o),e.bounds.insert(r[u].x,s,r[u].x+o.width,o.height)}e.bounds.bumpVerticalPos(o.height)},t.exports.setConf=function(t){Object.keys(t).forEach(function(e){o[e]=t[e]})};var h=function(e){return t.exports.bounds.activations.filter(function(t){return t.actor===e})},y=function(t){var e=n.yy.getActors(),r=h(t);return[r.reduce(function(t,e){return Math.min(t,e.startx)},e[t].x+o.width/2),r.reduce(function(t,e){return Math.max(t,e.stopx)},e[t].x+o.width/2)]};t.exports.draw=function(r,a){function h(t,r){var n=e.bounds.endActivation(t);n.starty+18>r&&(n.starty=r-6,r+=12),i.drawActivation(f,n,r,o),e.bounds.insert(n.startx,r-10,n.stopx,r)}n.yy.clear(),n.parse(r+"\n"),e.bounds.init();var d,p,g,f=s.select("#"+a),m=n.yy.getActors(),A=n.yy.getActorKeys(),b=n.yy.getMessages(),E=n.yy.getTitle();t.exports.drawActors(f,m,A,0),i.insertArrowHead(f),i.insertArrowCrossHead(f),b.forEach(function(t){var r;switch(t.type){case n.yy.LINETYPE.NOTE:e.bounds.bumpVerticalPos(o.boxMargin),d=m[t.from].x,p=m[t.to].x,t.placement===n.yy.PLACEMENT.RIGHTOF?c(f,d+(o.width+o.actorMargin)/2,e.bounds.getVerticalPos(),t):t.placement===n.yy.PLACEMENT.LEFTOF?c(f,d-(o.width+o.actorMargin)/2,e.bounds.getVerticalPos(),t):t.to===t.from?c(f,d,e.bounds.getVerticalPos(),t):(g=Math.abs(d-p)+o.actorMargin,c(f,(d+p+o.width-g)/2,e.bounds.getVerticalPos(),t,g));break;case n.yy.LINETYPE.ACTIVE_START:e.bounds.newActivation(t,f);break;case n.yy.LINETYPE.ACTIVE_END:h(t,e.bounds.getVerticalPos());break;case n.yy.LINETYPE.LOOP_START:e.bounds.bumpVerticalPos(o.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(o.boxMargin+o.boxTextMargin);break;case n.yy.LINETYPE.LOOP_END:r=e.bounds.endLoop(),i.drawLoop(f,r,"loop",o),e.bounds.bumpVerticalPos(o.boxMargin);break;case n.yy.LINETYPE.OPT_START:e.bounds.bumpVerticalPos(o.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(o.boxMargin+o.boxTextMargin);break;case n.yy.LINETYPE.OPT_END:r=e.bounds.endLoop(),i.drawLoop(f,r,"opt",o),e.bounds.bumpVerticalPos(o.boxMargin);break;case n.yy.LINETYPE.ALT_START:e.bounds.bumpVerticalPos(o.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(o.boxMargin+o.boxTextMargin);break;case n.yy.LINETYPE.ALT_ELSE:e.bounds.bumpVerticalPos(o.boxMargin),r=e.bounds.addSectionToLoop(t.message),e.bounds.bumpVerticalPos(o.boxMargin);break;case n.yy.LINETYPE.ALT_END:r=e.bounds.endLoop(),i.drawLoop(f,r,"alt",o),e.bounds.bumpVerticalPos(o.boxMargin);break;case n.yy.LINETYPE.PAR_START:e.bounds.bumpVerticalPos(o.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(o.boxMargin+o.boxTextMargin);break;case n.yy.LINETYPE.PAR_AND:e.bounds.bumpVerticalPos(o.boxMargin),r=e.bounds.addSectionToLoop(t.message),e.bounds.bumpVerticalPos(o.boxMargin);break;case n.yy.LINETYPE.PAR_END:r=e.bounds.endLoop(),i.drawLoop(f,r,"par",o),e.bounds.bumpVerticalPos(o.boxMargin);break;default:try{e.bounds.bumpVerticalPos(o.messageMargin);var s=y(t.from),a=y(t.to),u=s[0]<=a[0]?1:0,A=s[0]<a[0]?0:1;d=s[u],p=a[A];var b=e.bounds.getVerticalPos();l(f,d,p,b,t);var E=s.concat(a);e.bounds.insert(Math.min.apply(null,E),b,Math.max.apply(null,E),b)}catch(t){console.error("error while drawing message",t)}}}),o.mirrorActors&&(e.bounds.bumpVerticalPos(2*o.boxMargin),t.exports.drawActors(f,m,A,e.bounds.getVerticalPos()));var x=e.bounds.getBounds();u.debug("For line height fix Querying: #"+a+" .actor-line"),s.selectAll("#"+a+" .actor-line").attr("y2",x.stopy);var k=x.stopy-x.starty+2*o.diagramMarginY;o.mirrorActors&&(k=k-o.boxMargin+o.bottomMarginAdj);var _=x.stopx-x.startx+2*o.diagramMarginX;E&&f.append("text").text(E).attr("x",(x.stopx-x.startx)/2-2*o.diagramMarginX).attr("y",-25),o.useMaxWidth?(f.attr("height","100%"),f.attr("width","100%"),f.attr("style","max-width:"+_+"px;")):(f.attr("height",k),f.attr("width",_));var v=E?40:0;f.attr("viewBox",x.startx-o.diagramMarginX+" -"+(o.diagramMarginY+v)+" "+_+" "+(k+v))}},function(t,e,r){"use strict";e.drawRect=function(t,e){var r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),void 0!==e.class&&r.attr("class",e.class),r},e.drawText=function(t,e,r){var n=e.text.replace(/<br\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.attr("fill",e.fill),void 0!==e.class&&i.attr("class",e.class);var s=i.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.attr("fill",e.fill),s.text(n),void 0!==i.textwrap&&i.textwrap({x:e.x,y:e.y,width:r,height:1800},e.textMargin),i},e.drawLabel=function(t,r){var n=t.append("polygon");n.attr("points",function(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}(r.x,r.y,50,20,7)),n.attr("class","labelBox"),r.y=r.y+r.labelMargin,r.x=r.x+.5*r.labelMargin,e.drawText(t,r)};var n=-1;e.drawActor=function(t,r,s,a,u){var o=r+u.width/2,c=t.append("g");0===s&&(n++,c.append("line").attr("id","actor"+n).attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var l=e.getNoteRect();l.x=r,l.y=s,l.fill="#eaeaea",l.width=u.width,l.height=u.height,l.class="actor",l.rx=3,l.ry=3,e.drawRect(c,l),i(u)(a,c,l.x,l.y,l.width,l.height,{class:"actor"})},e.anchorElement=function(t){return t.append("g")},e.drawActivation=function(t,r,n){var i=e.getNoteRect(),s=r.anchored;i.x=r.startx,i.y=r.starty,i.fill="#f4f4f4",i.width=r.stopx-r.startx,i.height=n-r.starty,e.drawRect(s,i)},e.drawLoop=function(t,r,n,i){var s=t.append("g"),a=function(t,e,r,n){return s.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).attr("class","loopLine")};a(r.startx,r.starty,r.stopx,r.starty),a(r.stopx,r.starty,r.stopx,r.stopy),a(r.startx,r.stopy,r.stopx,r.stopy),a(r.startx,r.starty,r.startx,r.stopy),void 0!==r.sections&&r.sections.forEach(function(t){a(r.startx,t,r.stopx,t).style("stroke-dasharray","3, 3")});var u=e.getTextObj();u.text=n,u.x=r.startx,u.y=r.starty,u.labelMargin=15,u.class="labelText",e.drawLabel(s,u),u=e.getTextObj(),u.text="[ "+r.title+" ]",u.x=r.startx+(r.stopx-r.startx)/2,u.y=r.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",e.drawText(s,u),void 0!==r.sectionTitles&&r.sectionTitles.forEach(function(t,n){""!==t&&(u.text="[ "+t+" ]",u.y=r.sections[n]+1.5*i.boxMargin,e.drawText(s,u))})},e.insertArrowHead=function(t){t.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")},e.insertArrowCrossHead=function(t){var e=t.append("defs"),r=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},e.getTextObj=function(){return{x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0}},e.getNoteRect=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}};var i=function(){function t(t,e,r,i,s,a,u){n(e.append("text").attr("x",r+s/2).attr("y",i+a/2+5).style("text-anchor","middle").text(t),u)}function e(t,e,r,i,s,a,u){var o=e.append("text").attr("x",r+s/2).attr("y",i).style("text-anchor","middle");if(o.append("tspan").attr("x",r+s/2).attr("dy","0").text(t),void 0!==o.textwrap){o.textwrap({x:r+s/2,y:i,width:s,height:a},0);var c=o.selectAll("tspan");c.length>0&&c[0].length>0&&(c=c[0],o.attr("y",i+(a/2-o[0][0].getBBox().height*(1-1/c.length)/2)).attr("dominant-baseline","central").attr("alignment-baseline","central"))}n(o,u)}function r(t,r,i,s,a,u,o){var c=r.append("switch"),l=c.append("foreignObject").attr("x",i).attr("y",s).attr("width",a).attr("height",u),h=l.append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,c,i,s,a,u,o),n(h,o)}function n(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}return function(n){return"fo"===n.textPlacement?r:"old"===n.textPlacement?t:e}}()},function(t,e,r){"use strict";var n=r(11),i=r(12),s=r(1),a=r(0),u=a.Log;e.draw=function(t,e,r){var a;a=i.parser,a.yy=n,u.debug("Renering example diagram"),a.parse(t);var o=s.select("#"+e);o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+r),o.attr("height",100),o.attr("width",400)}},function(t,e,r){"use strict";var n=r(13).parser;n.yy=r(14);var i,s=r(1),a=r(15),u={titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"'};t.exports.setConf=function(t){Object.keys(t).forEach(function(e){u[e]=t[e]})};var o;t.exports.draw=function(t,e){function r(t,e,r,n,i,s,a,o){m.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",function(t,n){return n*e+r-2}).attr("width",function(){return a-u.rightPadding/2}).attr("height",e).attr("class",function(t){for(var e=0;e<x.length;e++)if(t.type===x[e])return"section section"+e%u.numberSectionStyles;return"section section0"});var c=m.append("g").selectAll("rect").data(t).enter();c.append("rect").attr("rx",3).attr("ry",3).attr("x",function(t){return E(t.startTime)+n}).attr("y",function(t,n){return n*e+r}).attr("width",function(t){return E(t.endTime)-E(t.startTime)}).attr("height",i).attr("class",function(t){for(var e="task ",r=0,n=0;n<x.length;n++)t.type===x[n]&&(r=n%u.numberSectionStyles);return t.active?t.crit?e+" activeCrit"+r:e+" active"+r:t.done?t.crit?e+" doneCrit"+r:e+" done"+r:t.crit?e+" crit"+r:e+" task"+r}),c.append("text").text(function(t){return t.task}).attr("font-size",u.fontSize).attr("x",function(t){var e=E(t.startTime),r=E(t.endTime),i=this.getBBox().width;return i>r-e?r+i+1.5*u.leftPadding>a?e+n-5:r+n+5:(r-e)/2+e+n}).attr("y",function(t,n){return n*e+u.barHeight/2+(u.fontSize/2-2)+r}).attr("text-height",i).attr("class",function(t){for(var e=E(t.startTime),r=E(t.endTime),n=this.getBBox().width,i=0,s=0;s<x.length;s++)t.type===x[s]&&(i=s%u.numberSectionStyles);var o="";return t.active&&(o=t.crit?"activeCritText"+i:"activeText"+i),t.done?o=t.crit?o+" doneCritText"+i:o+" doneText"+i:t.crit&&(o=o+" critText"+i),n>r-e?r+n+1.5*u.leftPadding>a?"taskTextOutsideLeft taskTextOutside"+i+" "+o:"taskTextOutsideRight taskTextOutside"+i+" "+o:"taskText taskText"+i+" "+o})}function c(t,e,r,n){var a,o=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!==t.getDate()}],["%b %d",function(t){return 1!==t.getDate()}],["%B",function(t){return t.getMonth()}]];void 0!==u.axisFormatter&&(l=[],u.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),a=o.concat(l).concat(c);var h=s.svg.axis().scale(E).orient("bottom").tickSize(-n+e+u.gridLineStartPadding,0,0).tickFormat(s.time.format.multi(a));i>7&&i<230&&(h=h.ticks(s.time.monday.range)),m.append("g").attr("class","grid").attr("transform","translate("+t+", "+(n-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function l(t,e){for(var r=[],n=0,i=0;i<x.length;i++)r[i]=[x[i],d(x[i],_)];m.append("g").selectAll("text").data(r).enter().append("text").text(function(t){return t[0]}).attr("x",10).attr("y",function(i,s){if(!(s>0))return i[1]*t/2+e;for(var a=0;a<s;a++)return n+=r[s-1][1],i[1]*t/2+n*t+e}).attr("class",function(t){for(var e=0;e<x.length;e++)if(t[0]===x[e])return"sectionTitle sectionTitle"+e%u.numberSectionStyles;return"sectionTitle"})}function h(t,e,r,n){var i=m.append("g").attr("class","today"),s=new Date;i.append("line").attr("x1",E(s)+t).attr("x2",E(s)+t).attr("y1",u.titleTopMargin).attr("y2",n-u.titleTopMargin).attr("class","today")}function y(t){for(var e=t.length,r={};e;)r[t[--e]]=(r[t[e]]||0)+1;return r}function d(t,e){return y(e)[t]||0}n.yy.clear(),n.parse(t);var p=document.getElementById(e);o=p.parentElement.offsetWidth,void 0===o&&(o=1200),void 0!==u.useWidth&&(o=u.useWidth);var g=n.yy.getTasks(),f=g.length*(u.barHeight+u.barGap)+2*u.topPadding;p.setAttribute("height","100%"),p.setAttribute("viewBox","0 0 "+o+" "+f);var m=s.select("#"+e),A=s.min(g,function(t){return t.startTime}),b=s.max(g,function(t){return t.endTime}),E=s.time.scale().domain([s.min(g,function(t){return t.startTime}),s.max(g,function(t){return t.endTime})]).rangeRound([0,o-u.leftPadding-u.rightPadding]),x=[];i=a.duration(b-A).asDays();for(var k=0;k<g.length;k++)x.push(g[k].type);var _=x;x=function(t){for(var e={},r=[],n=0,i=t.length;n<i;++n)e.hasOwnProperty(t[n])||(e[t[n]]=!0,r.push(t[n]));return r}(x),function(t,e,n){var i=u.barHeight,a=i+u.barGap,o=u.topPadding,y=u.leftPadding,d=s.scale.linear().domain([0,x.length]).range(["#00B9FA","#F95002"]).interpolate(s.interpolateHcl);c(y,o,e,n),r(t,a,o,y,i,d,e,n),l(a,o),h(y,o,e,n)}(g,o,f),void 0!==u.useWidth&&p.setAttribute("width",o),m.append("text").text(n.yy.getTitle()).attr("x",o/2).attr("y",u.titleTopMargin).attr("class","titleText")}},function(t,e,r){"use strict";var n=r(16).parser,i=r(17);n.yy=i;var s,a=r(1),u=r(0),o=u.Log,c=r(30);s={};var l=0,h={dividerMargin:10,padding:5,textHeight:10},y=function(t){var e,r=Object.keys(s);for(e=0;e<r.length;e++)if(s[r[e]].label===t)return r[e]},d=function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},p=0,g=function(t,e,r){var n=function(t){switch(t){case i.relationType.AGGREGATION:return"aggregation";case i.relationType.EXTENSION:return"extension";case i.relationType.COMPOSITION:return"composition";case i.relationType.DEPENDENCY:return"dependency"}},s=e.points,u=a.svg.line().x(function(t){return t.x}).y(function(t){return t.y}).interpolate("basis"),o=t.append("path").attr("d",u(s)).attr("id","edge"+p).attr("class","relation"),c="";h.arrowMarkerAbsolute&&(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,c=c.replace(/\(/g,"\\("),c=c.replace(/\)/g,"\\)")),"none"!==r.relation.type1&&o.attr("marker-start","url("+c+"#"+n(r.relation.type1)+"Start)"),"none"!==r.relation.type2&&o.attr("marker-end","url("+c+"#"+n(r.relation.type2)+"End)");var l,y,d=e.points.length;if(d%2!=0){var g=e.points[Math.floor(d/2)],f=e.points[Math.ceil(d/2)];l=(g.x+f.x)/2,y=(g.y+f.y)/2}else{var m=e.points[Math.floor(d/2)];l=m.x,y=m.y}if(void 0!==r.title){var A=t.append("g").attr("class","classLabel"),b=A.append("text").attr("class","label").attr("x",l).attr("y",y).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=b;var E=b.node().getBBox();A.insert("rect",":first-child").attr("class","box").attr("x",E.x-h.padding/2).attr("y",E.y-h.padding/2).attr("width",E.width+h.padding).attr("height",E.height+h.padding)}p++},f=function(t,e){o.info("Rendering class "+e);var r=function(t,e,r){var n=t.append("tspan").attr("x",h.padding).text(e);r||n.attr("dy",h.textHeight)},n="classId"+l,i={id:n,label:e.id,width:0,height:0},a=t.append("g").attr("id",n).attr("class","classGroup"),u=a.append("text").attr("x",h.padding).attr("y",h.textHeight+h.padding).text(e.id),c=u.node().getBBox().height,y=a.append("line").attr("x1",0).attr("y1",h.padding+c+h.dividerMargin/2).attr("y2",h.padding+c+h.dividerMargin/2),d=a.append("text").attr("x",h.padding).attr("y",c+h.dividerMargin+h.textHeight).attr("fill","white").attr("class","classText"),p=!0;e.members.forEach(function(t){r(d,t,p),p=!1});var g=d.node().getBBox(),f=a.append("line").attr("x1",0).attr("y1",h.padding+c+h.dividerMargin+g.height).attr("y2",h.padding+c+h.dividerMargin+g.height),m=a.append("text").attr("x",h.padding).attr("y",c+2*h.dividerMargin+g.height+h.textHeight).attr("fill","white").attr("class","classText");p=!0,e.methods.forEach(function(t){r(m,t,p),p=!1});var A=a.node().getBBox();return a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",A.width+2*h.padding).attr("height",A.height+h.padding+.5*h.dividerMargin),y.attr("x2",A.width+2*h.padding),f.attr("x2",A.width+2*h.padding),i.width=A.width+2*h.padding,i.height=A.height+h.padding+.5*h.dividerMargin,s[n]=i,l++,i};t.exports.setConf=function(t){Object.keys(t).forEach(function(e){h[e]=t[e]})},t.exports.draw=function(t,e){n.yy.clear(),n.parse(t),o.info("Rendering diagram "+t);var r=a.select("#"+e);d(r);var s=new c.graphlib.Graph({multigraph:!0});s.setGraph({isMultiGraph:!0}),s.setDefaultEdgeLabel(function(){return{}});var u,l=i.getClasses(),h=Object.keys(l);for(u=0;u<h.length;u++){var p=l[h[u]],m=f(r,p);s.setNode(m.id,m),o.info("Org height: "+m.height)}i.getRelations().forEach(function(t){o.info("tjoho"+y(t.id1)+y(t.id2)+JSON.stringify(t)),s.setEdge(y(t.id1),y(t.id2),{relation:t})}),c.layout(s),s.nodes().forEach(function(t){void 0!==t&&(o.debug("Node "+t+": "+JSON.stringify(s.node(t))),a.select("#"+t).attr("transform","translate("+(s.node(t).x-s.node(t).width/2)+","+(s.node(t).y-s.node(t).height/2)+" )"))}),s.edges().forEach(function(t){o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(s.edge(t))),g(r,s.edge(t),s.edge(t).relation)}),r.attr("height","100%"),r.attr("width","100%"),r.attr("viewBox","0 0 "+(s.graph().width+20)+" "+(s.graph().height+20))}},function(t,e){t.exports=require("dagre-layout")},function(t,e,r){"use strict";function n(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",b.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",b.nodeLabel.width).attr("height",b.nodeLabel.height).attr("x",b.nodeLabel.x).attr("y",b.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("xhtml:p").html("")}function i(t,e,r,n){n=n||"basis";var i=b.branchColors[r%b.branchColors.length],s=g.svg.line().x(function(t){return Math.round(t.x)}).y(function(t){return Math.round(t.y)}).interpolate(n);t.append("svg:path").attr("d",s(e)).style("stroke",i).style("stroke-width",b.lineStrokeWidth).style("fill","none")}function s(t,e){e=e||t.node().getBBox();var r=t.node().getCTM();return{left:r.e+e.x*r.a,top:r.f+e.y*r.d,width:e.width,height:e.height}}function a(t,e,r,n,a){m.debug("svgDrawLineForCommits: ",e,r);var u=s(t.select("#node-"+e+" circle")),o=s(t.select("#node-"+r+" circle"));switch(n){case"LR":if(u.left-o.left>b.nodeSpacing){var c={x:u.left-b.nodeSpacing,y:o.top+o.height/2},l={x:o.left+o.width,y:o.top+o.height/2};i(t,[c,l],a,"linear"),i(t,[{x:u.left,y:u.top+u.height/2},{x:u.left-b.nodeSpacing/2,y:u.top+u.height/2},{x:u.left-b.nodeSpacing/2,y:c.y},c],a)}else i(t,[{x:u.left,y:u.top+u.height/2},{x:u.left-b.nodeSpacing/2,y:u.top+u.height/2},{x:u.left-b.nodeSpacing/2,y:o.top+o.height/2},{x:o.left+o.width,y:o.top+o.height/2}],a);break;case"BT":o.top-u.top>b.nodeSpacing?(c={x:o.left+o.width/2,y:u.top+u.height+b.nodeSpacing},l={x:o.left+o.width/2,y:o.top},i(t,[c,l],a,"linear"),i(t,[{x:u.left+u.width/2,y:u.top+u.height},{x:u.left+u.width/2,y:u.top+u.height+b.nodeSpacing/2},{x:o.left+o.width/2,y:c.y-b.nodeSpacing/2},c],a)):i(t,[{x:u.left+u.width/2,y:u.top+u.height},{x:u.left+u.width/2,y:u.top+b.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-b.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],a)}}function u(t,e){return t.select(e).node().cloneNode(!0)}function o(t,e,r,n){var i,s=Object.keys(A).length;if(y.default.isString(e))do{if(i=A[e],m.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append(function(){return u(t,"#def-commit")}).attr("class","commit").attr("id",function(){return"node-"+i.id}).attr("transform",function(){switch(n){case"LR":return"translate("+(i.seq*b.nodeSpacing+b.leftMargin)+", "+l*b.branchOffset+")";case"BT":return"translate("+(l*b.branchOffset+b.leftMargin)+", "+(s-i.seq)*b.nodeSpacing+")"}}).attr("fill",b.nodeFillColor).attr("stroke",b.nodeStrokeColor).attr("stroke-width",b.nodeStrokeWidth);var a=y.default.find(r,["commit",i]);a&&(m.debug("found branch ",a.name),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","branch-label").text(a.name+", ")),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-id").text(i.id),""!==i.message&&"BT"===n&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),e=i.parent}while(e&&A[e]);y.default.isArray(e)&&(m.debug("found merge commmit",e),o(t,e[0],r,n),l++,o(t,e[1],r,n),l--)}function c(t,e,r,n){for(n=n||0;e.seq>0&&!e.lineDrawn;)y.default.isString(e.parent)?(a(t,e.id,e.parent,r,n),e.lineDrawn=!0,e=A[e.parent]):y.default.isArray(e.parent)&&(a(t,e.id,e.parent[0],r,n),a(t,e.id,e.parent[1],r,n+1),c(t,A[e.parent[1]],r,n+1),e.lineDrawn=!0,e=A[e.parent[0]])}var l,h=r(19),y=function(t){return t&&t.__esModule?t:{default:t}}(h),d=r(20),p=r(18),g=r(1),f=r(0),m=f.Log,A={},b={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},E={};e.setConf=function(t){E=t},e.draw=function(t,e,r){try{var i;i=p.parser,i.yy=d,m.debug("in gitgraph renderer",t,e,r),i.parse(t+"\n"),b=y.default.extend(b,E,d.getOptions()),m.debug("effective options",b);var s=d.getDirection();A=d.getCommits();var a=d.getBranchesAsObjArray();"BT"===s&&(b.nodeLabel.x=a.length*b.branchOffset,b.nodeLabel.width="100%",b.nodeLabel.y=-2*b.nodeRadius);var u=g.select("#"+e);n(u),l=1,y.default.each(a,function(t){o(u,t.commit.id,a,s),c(u,t.commit,s),l++}),u.attr("height",function(){return"BT"===s?Object.keys(A).length*b.nodeSpacing:(a.length+1)*b.branchOffset})}catch(t){m.error("Error while rendering gitgraph"),m.error(t.message)}}},function(t,e){t.exports={name:"mermaid",version:"7.0.10",description:"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",main:"src/mermaid.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],bin:{mermaid:"./bin/mermaid.js"},scripts:{build:"node -r babel-register ./node_modules/.bin/webpack --progress --colors","build:watch":"yarn build --watch",release:"yarn build -p --config webpack.config.prod.js",upgrade:"yarn upgrade --latest && yarn remove d3 && yarn add d3@3.5.17",lint:"standard",karma:"node -r babel-register node_modules/.bin/karma start karma.conf.js --single-run",tape:"node -r babel-register node_modules/.bin/tape test/cli_test-*.js",test:"yarn lint && yarn tape && yarn karma",jison:"gulp jison",prepublishOnly:"yarn build && yarn release && yarn test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js"]},dependencies:{chalk:"^2.1.0",d3:"3.5.17","dagre-d3-renderer":"^0.4.23","dagre-layout":"^0.8.0",he:"^1.1.1",lodash:"^4.17.4",minimist:"^1.2.0",mkdirp:"^0.5.1",moment:"^2.18.1",semver:"^5.4.1",which:"^1.3.0"},devDependencies:{async:"^2.5.0","babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-lodash":"^3.2.11","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1",clone:"^2.1.1","codeclimate-test-reporter":"^0.5.0","css-loader":"^0.28.7","extract-text-webpack-plugin":"^3.0.0",gulp:"^3.9.1","gulp-filelog":"^0.4.1","gulp-jison":"^1.2.0","inject-loader":"^3.0.1",jasmine:"^2.8.0","jasmine-es6":"^0.4.1",jison:"^0.4.18",karma:"^1.7.1","karma-chrome-launcher":"^2.2.0","karma-jasmine":"^1.1.0","karma-webpack":"^2.0.4",less:"^2.7.2","less-loader":"^4.0.5","phantomjs-prebuilt":"^2.1.15",rimraf:"^2.6.1",standard:"^10.0.3","style-loader":"^0.18.2",tape:"^4.8.0",webpack:"^3.5.6","webpack-node-externals":"^1.6.0"},files:["bin","dist","lib","src"]}}]);
\No newline at end of file