From 786d9ddb54f985f6e4f45112d7137e2e7181a7bd Mon Sep 17 00:00:00 2001 From: knsv Date: Mon, 5 Jan 2015 14:41:00 +0100 Subject: [PATCH] Move of drawLoop to svgDraw --- dist/mermaid.full.js | 34 +++++------ dist/mermaid.full.min.js | 2 +- dist/mermaid.slim.js | 34 +++++------ dist/mermaid.slim.min.js | 2 +- .../sequenceDiagram/sequenceRenderer.js | 58 +------------------ src/diagrams/sequenceDiagram/svgDraw.js | 53 +++++++++++++++++ 6 files changed, 92 insertions(+), 91 deletions(-) diff --git a/dist/mermaid.full.js b/dist/mermaid.full.js index f9f24d0ca..f0fed04fb 100644 --- a/dist/mermaid.full.js +++ b/dist/mermaid.full.js @@ -16313,6 +16313,9 @@ module.exports.draw = function (text, id) { exports.bounds.init(); var diagram = d3.select('#'+id); + var startx; + var stopx; + // Fetch data from the parsing var actors = sq.yy.getActors(); var actorKeys = sq.yy.getActorKeys(); @@ -16392,9 +16395,6 @@ module.exports.draw = function (text, id) { drawMessage(diagram, startx, stopx, exports.bounds.getVerticalPos(), msg); } - - var startx; - var stopx; }); var box = exports.bounds.getBounds(); @@ -16461,7 +16461,7 @@ exports.drawLabel = function(elem , txtObject){ rectData.class = 'labelBox'; //rectData.color = 'white'; - var label = exports.drawRect(elem, rectData); + exports.drawRect(elem, rectData); txtObject.y = txtObject.y + txtObject.labelMargin; txtObject.x = txtObject.x + 0.5*txtObject.labelMargin; @@ -16489,16 +16489,16 @@ exports.drawActor = function(elem, left,description,conf){ .attr("stroke-width", '0.5px') .attr("stroke", '#999'); - g.append("rect") - .attr("x", left) - .attr("y", 0) - .attr("fill", '#eaeaea') - .attr("stroke", '#666') - .attr("width", conf.width) - .attr("height", conf.height) - .attr("class", 'actor') - .attr("rx", 3) - .attr("ry", 3); + var rect = exports.getNoteRect(); + rect.x = left; + rect.fill = '#eaeaea'; + rect.width = conf.width; + rect.height = conf.height; + rect.class = 'actor'; + rect.rx = 3; + rect.ry = 3; + exports.drawRect(g, rect); + g.append("text") // text label for the x axis .attr("x", center) .attr("y", (conf.height/2)+5) @@ -16513,7 +16513,7 @@ exports.drawActor = function(elem, left,description,conf){ exports.insertArrowHead = function(elem){ elem.append("defs").append("marker") .attr("id", "arrowhead") - .attr("refX", 5) /*must be smarter way to calculate shift*/ + .attr("refX", 5) .attr("refY", 2) .attr("markerWidth", 6) .attr("markerHeight", 4) @@ -16527,11 +16527,11 @@ exports.insertArrowHead = function(elem){ exports.insertArrowCrossHead = function(elem){ elem.append("defs").append("marker") .attr("id", "crosshead") - .attr("refX", 15) /*must be smarter way to calculate shift*/ - .attr("refY", 4) .attr("markerWidth", 8) .attr("markerHeight", 8) .attr("orient", "auto") + .attr("refX", 15) + .attr("refY", 4) .append("path") .attr("fill",'none') .attr("stroke",'#000000') diff --git a/dist/mermaid.full.min.js b/dist/mermaid.full.min.js index ed6bfe42c..c30be8820 100644 --- a/dist/mermaid.full.min.js +++ b/dist/mermaid.full.min.js @@ -36,4 +36,4 @@ return u&&(e=u.v,t=u.w,delete this._edgeLabels[n],delete this._edgeObjs[n],i(thi },D=function(e,t){for(var r=-1,n=e.length;++r=55296&&57343>=e||e>1114111?(t&&B("character reference outside the permissible Unicode range"),"�"):_(b,e)?(t&&B("disallowed character reference"),b[e]):(t&&D(A,e)&&B("disallowed character reference"),e>65535&&(e-=65536,r+=E(e>>>10&1023|55296),e=56320|1023&e),r+=E(e))},F=function(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"},B=function(e){throw Error("Parse error: "+e)},T=function(e,t){t=k(t,T.options);var r=t.strict;r&&g.test(e)&&B("forbidden code point");var n=t.encodeEverything,i=t.useNamedReferences,a=t.allowUnsafeSymbols;return n?(e=e.replace(s,function(e){return i&&_(h,e)?"&"+h[e]+";":F(e)}),i&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),i&&(e=e.replace(l,function(e){return"&"+h[e]+";"}))):i?(a||(e=e.replace(d,function(e){return"&"+h[e]+";"})),e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),e=e.replace(l,function(e){return"&"+h[e]+";"})):a||(e=e.replace(d,F)),e.replace(o,function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=1024*(t-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}).replace(c,F)};T.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};var S=function(e,t){t=k(t,S.options);var r=t.strict;return r&&f.test(e)&&B("malformed character reference"),e.replace(y,function(e,n,i,a,u,o,s,c){var l,h,d,p,f;return n?(l=n,h=i,r&&!h&&B("character reference was not terminated by a semicolon"),C(l,r)):a?(d=a,h=u,r&&!h&&B("character reference was not terminated by a semicolon"),l=parseInt(d,16),C(l,r)):o?(p=o,_(m,p)?m[p]:(r&&B("named character reference was not terminated by a semicolon"),e)):(p=s,f=c,f&&t.isAttributeValue?(r&&"="==f&&B("`&` did not start a character reference"),e):(r&&B("named character reference was not terminated by a semicolon"),v[p]+(f||"")))})};S.options={isAttributeValue:!1,strict:!1};var L=function(e){return e.replace(d,function(e){return p[e]})},N={version:"0.5.0",encode:T,decode:S,escape:L,unescape:S};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return N});else if(i&&!i.nodeType)if(a)a.exports=N;else for(var q in N)_(N,q)&&(i[q]=N[q]);else n.he=N}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],101:[function(e,t,r){(function(e){(function(){function n(e,t,r){for(var n=(r||0)-1,i=e?e.length:0;++n-1?0:-1:e?0:-1}function a(e){var t=this.cache,r=typeof e;if("boolean"==r||null==e)t[e]=!0;else{"number"!=r&&"string"!=r&&(r="object");var n="number"==r?e:A+e,i=t[r]||(t[r]={});"object"==r?(i[n]||(i[n]=[])).push(e):i[n]=!0}}function u(e){return e.charCodeAt(0)}function o(e,t){for(var r=e.criteria,n=t.criteria,i=-1,a=r.length;++io||"undefined"==typeof u)return 1;if(o>u||"undefined"==typeof o)return-1}}return e.index-t.index}function s(e){var t=-1,r=e.length,n=e[0],i=e[r/2|0],u=e[r-1];if(n&&"object"==typeof n&&i&&"object"==typeof i&&u&&"object"==typeof u)return!1;var o=h();o["false"]=o["null"]=o["true"]=o.undefined=!1;var s=h();for(s.array=e,s.cache=o,s.push=a;++ti?0:i);++n=E&&a===n,c=[];if(o){var l=s(t);l?(a=i,t=l):o=!1}for(;++r-1:void 0});return i.pop(),a.pop(),v&&(d(i),d(a)),u}function tt(e,t,r,n,i){(Jn(t)?Kt:si)(t,function(t,a){var u,o,s=t,c=e[a];if(t&&((o=Jn(t))||ci(t))){for(var l=n.length;l--;)if(u=n[l]==t){c=i[l];break}if(!u){var h;r&&(s=r(c,t),(h="undefined"!=typeof s)&&(c=s)),h||(c=o?Jn(c)?c:[]:ci(c)?c:{}),n.push(t),i.push(c),h||tt(c,t,r,n,i)}}else r&&(s=r(c,t),"undefined"==typeof s&&(s=t)),"undefined"!=typeof s&&(c=s);e[a]=c})}function nt(e,t){return e+Sn(Wn()*(t-e+1))}function it(e,t,r){var a=-1,u=st(),o=e?e.length:0,c=[],h=!t&&o>=E&&u===n,f=r||h?l():c;if(h){var g=s(f);u=i,f=g}for(;++a3&&"function"==typeof t[r-2])var n=x(t[--r-1],t[r--],2);else r>2&&"function"==typeof t[r-1]&&(n=t[--r]);for(var i=f(arguments,1,r),a=-1,u=l(),o=l();++ar?Hn(0,a+r):r)||0,Jn(e)?u=i(e,t,r)>-1:"number"==typeof a?u=(It(e)?e.indexOf(t,r):i(e,t,r))>-1:si(e,function(e){return++n>=r?!(u=e===t):void 0}),u}function Yt(e,r,n){var i=!0;r=t.createCallback(r,n,3);var a=-1,u=e?e.length:0;if("number"==typeof u)for(;++aa&&(a=c)}else r=null==r&&It(e)?u:t.createCallback(r,n,3),Kt(e,function(e,t,n){var u=r(e,t,n);u>i&&(i=u,a=e)});return a}function tr(e,r,n){var i=1/0,a=i;if("function"!=typeof r&&n&&n[r]===e&&(r=null),null==r&&Jn(e))for(var o=-1,s=e.length;++oc&&(a=c)}else r=null==r&&It(e)?u:t.createCallback(r,n,3),Kt(e,function(e,t,n){var u=r(e,t,n);i>u&&(i=u,a=e)});return a}function rr(e,r,n,i){if(!e)return n;var a=arguments.length<3;r=t.createCallback(r,i,4);var u=-1,o=e.length;if("number"==typeof o)for(a&&(n=e[++u]);++ur?Hn(0,i+r):r||0}else if(r){var a=kr(e,t);return e[a]===t?a:-1}return n(e,t,r)}function vr(e,r,n){var i=0,a=e?e.length:0;if("number"!=typeof r&&null!=r){var u=a;for(r=t.createCallback(r,n,3);u--&&r(e[u],u,e);)i++}else i=null==r||n?1:r||i;return f(e,0,Yn(Hn(0,a-i),a))}function br(){for(var e=[],t=-1,r=arguments.length,a=l(),u=st(),o=u===n,c=l();++t=E&&s(t?e[t]:c)))}var f=e[0],g=-1,y=f?f.length:0,m=[];e:for(;++gr?Hn(0,n+r):Yn(r,n-1))+1);n--;)if(e[n]===t)return n;return-1}function xr(e){for(var t=arguments,r=0,n=t.length,i=e?e.length:0;++ra;){var o=a+u>>>1;n(e[o])1?arguments:arguments[0],t=-1,r=e?er(pi(e,"length")):0,n=fn(0>r?0:r);++t2?ut(e,17,f(arguments,2),null,t):ut(e,1,null,null,t)}function Ir(e){for(var t=arguments.length>1?Q(arguments,!0,!1,1):At(e),r=-1,n=t.length;++r2?ut(t,19,f(arguments,2),null,e):ut(t,3,null,null,e)}function Rr(){for(var e=arguments,t=e.length;t--;)if(!Bt(e[t]))throw new wn;return function(){for(var t=arguments,r=e.length;r--;)t=[e[r].apply(this,t)];return t[0]}}function Pr(e,t){return t="number"==typeof t?t:+t||e.length,ut(e,4,null,null,null,t)}function Mr(e,t,r){var n,i,a,u,o,s,c,l=0,h=!1,d=!0;if(!Bt(e))throw new wn;if(t=Hn(0,t)||0,r===!0){var p=!0;d=!1}else Tt(r)&&(p=r.leading,h="maxWait"in r&&(Hn(t,r.maxWait)||0),d="trailing"in r?r.trailing:d);var f=function(){var r=t-(gi()-u);if(0>=r){i&&Tn(i);var h=c;i=s=c=y,h&&(l=gi(),a=e.apply(o,n),s||i||(n=o=null))}else s=On(f,r)},g=function(){s&&Tn(s),i=s=c=y,(d||h!==t)&&(l=gi(),a=e.apply(o,n),s||i||(n=o=null))};return function(){if(n=arguments,u=gi(),o=this,c=d&&(s||!p),h===!1)var r=p&&!s;else{i||p||(l=u);var y=h-(u-l),m=0>=y;m?(i&&(i=Tn(i)),l=u,a=e.apply(o,n)):i||(i=On(g,y))}return m&&s?s=Tn(s):s||t===h||(s=On(f,t)),r&&(m=!0,a=e.apply(o,n)),!m||s||i||(n=o=null),a}}function jr(e){if(!Bt(e))throw new wn;var t=f(arguments,1);return On(function(){e.apply(y,t)},1)}function Vr(e,t){if(!Bt(e))throw new wn;var r=f(arguments,2);return On(function(){e.apply(y,r)},t)}function Ur(e,t){if(!Bt(e))throw new wn;var r=function(){var n=r.cache,i=t?t.apply(this,arguments):A+arguments[0];return qn.call(n,i)?n[i]:n[i]=e.apply(this,arguments)};return r.cache={},r}function Gr(e){var t,r;if(!Bt(e))throw new wn;return function(){return t?r:(t=!0,r=e.apply(this,arguments),e=null,r)}}function $r(e){return ut(e,16,f(arguments,1))}function Hr(e){return ut(e,32,null,f(arguments,1))}function Yr(e,t,r){var n=!0,i=!0;if(!Bt(e))throw new wn;return r===!1?n=!1:Tt(r)&&(n="leading"in r?r.leading:n,i="trailing"in r?r.trailing:i),z.leading=n,z.maxWait=t,z.trailing=i,Mr(e,t,z)}function zr(e,t){return ut(t,16,[e])}function Wr(e){return function(){return e}}function Zr(e,t,r){var n=typeof e;if(null==e||"function"==n)return x(e,t,r);if("object"!=n)return tn(e);var i=ei(e),a=i[0],u=e[a];return 1!=i.length||u!==u||Tt(u)?function(t){for(var r=i.length,n=!1;r--&&(n=et(t[i[r]],e[i[r]],null,!0)););return n}:function(e){var t=e[a];return u===t&&(0!==u||1/u==1/t)}}function Kr(e){return null==e?"":xn(e).replace(ii,ot)}function Xr(e){return e}function Jr(e,n,i){var a=!0,u=n&&At(n);n&&(i||u.length)||(null==i&&(i=n),o=r,n=e,e=t,u=At(n)),i===!1?a=!1:Tt(i)&&"chain"in i&&(a=i.chain);var o=e,s=Bt(o);Kt(u,function(t){var r=e[t]=n[t];s&&(o.prototype[t]=function(){var t=this.__chain__,n=this.__wrapped__,i=[n];In.apply(i,arguments);var u=r.apply(e,i);if(a||t){if(n===u&&Tt(u))return this;u=new o(u),u.__chain__=t}return u})})}function Qr(){return e._=kn,this}function en(){}function tn(e){return function(t){return t[e]}}function rn(e,t,r){var n=null==e,i=null==t;if(null==r&&("boolean"==typeof e&&i?(r=e,e=1):i||"boolean"!=typeof t||(r=t,i=!0)),n&&i&&(t=1),e=+e||0,i?(t=e,e=0):t=+t||0,r||e%1||t%1){var a=Wn();return Yn(e+a*(t-e+parseFloat("1e-"+((a+"").length-1))),t)}return nt(e,t)}function nn(e,t){if(e){var r=e[t];return Bt(r)?e[t]():r}}function an(e,r,n){var i=t.templateSettings;e=xn(e||""),n=ui({},n,i);var a,u=ui({},n.imports,i.imports),o=ei(u),s=Gt(u),l=0,h=n.interpolate||L,d="__p += '",p=En((n.escape||L).source+"|"+h.source+"|"+(h===T?C:L).source+"|"+(n.evaluate||L).source+"|$","g");e.replace(p,function(t,r,n,i,u,o){return n||(n=i),d+=e.slice(l,o).replace(q,c),r&&(d+="' +\n__e("+r+") +\n'"),u&&(a=!0,d+="';\n"+u+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=o+t.length,t}),d+="';\n";var f=n.variable,g=f;g||(f="obj",d="with ("+f+") {\n"+d+"\n}\n"),d=(a?d.replace(_,""):d).replace(D,"$1").replace(k,"$1;"),d="function("+f+") {\n"+(g?"":f+" || ("+f+" = {});\n")+"var __t, __p = '', __e = _.escape"+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m="\n/*\n//# sourceURL="+(n.sourceURL||"/lodash/template/source["+O++ +"]")+"\n*/";try{var v=mn(o,"return "+d+m).apply(y,s)}catch(b){throw b.source=d,b}return r?v(r):(v.source=d,v)}function un(e,t,r){e=(e=+e)>-1?e:0;var n=-1,i=fn(e);for(t=x(t,r,1);++n/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:t}},jn||(v=function(){function t(){}return function(r){if(Tt(r)){t.prototype=r;var n=new t;t.prototype=null}return n||e.Object()}}());var Xn=Mn?function(e,t){W.value=t,Mn(e,"__bindData__",W)}:en,Jn=Vn||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Cn.call(e)==P||!1},Qn=function(e){var t,r=e,n=[];if(!r)return n;if(!Z[typeof e])return n;for(t in r)qn.call(r,t)&&n.push(t);return n},ei=$n?function(e){return Tt(e)?$n(e):[]}:Qn,ti={"&":"&","<":"<",">":">",'"':""","'":"'"},ri=xt(ti),ni=En("("+ei(ri).join("|")+")","g"),ii=En("["+ei(ti).join("")+"]","g"),ai=function(e,t,r){var n,i=e,a=i;if(!i)return a;var u=arguments,o=0,s="number"==typeof r?2:u.length;if(s>3&&"function"==typeof u[s-2])var c=x(u[--s-1],u[s--],2);else s>2&&"function"==typeof u[s-1]&&(c=u[--s]);for(;++o/g,S=RegExp("^["+w+"]*0+(?=.$)"),L=/($^)/,N=/\bthis\b/,q=/['\n\r\t\u2028\u2029\\]/g,I=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],O=0,R="[object Arguments]",P="[object Array]",M="[object Boolean]",j="[object Date]",V="[object Function]",U="[object Number]",G="[object Object]",$="[object RegExp]",H="[object String]",Y={};Y[V]=!1,Y[R]=Y[P]=Y[M]=Y[j]=Y[U]=Y[G]=Y[$]=Y[H]=!0;var z={leading:!1,maxWait:0,trailing:!1},W={configurable:!1,enumerable:!1,value:null,writable:!1},Z={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},K={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},X=Z[typeof window]&&window||this,J=Z[typeof r]&&r&&!r.nodeType&&r,Q=Z[typeof t]&&t&&!t.nodeType&&t,et=Q&&Q.exports===J&&J,tt=Z[typeof e]&&e;!tt||tt.global!==tt&&tt.window!==tt||(X=tt);var rt=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(X._=rt,define(function(){return rt})):J&&Q?et?(Q.exports=rt)._=rt:J._=rt:X._=rt}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],102:[function(e,t){t.exports={name:"mermaid",version:"0.3.0",description:"Markdownish syntax for generating flowcharts",main:"src/main.js",bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"",license:"MIT",dependencies:{chalk:"^0.5.1","dagre-d3":"~0.3.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",semver:"^4.1.1",which:"^1.0.8"},devDependencies:{async:"^0.9.0",browserify:"~6.2.0",clone:"^0.2.0","codeclimate-test-reporter":"0.0.4",d3:"~3.4.13","dagre-d3":"~0.3.2","event-stream":"^3.2.0",foundation:"^4.2.1-1","front-matter":"^0.2.0",gulp:"~3.8.9","gulp-browserify":"^0.5.0","gulp-bump":"^0.1.11","gulp-concat":"~2.4.1","gulp-data":"^1.1.1","gulp-ext-replace":"~0.1.0","gulp-hogan":"^1.1.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^1.3.6","gulp-rename":"~1.2.0","gulp-shell":"^0.2.10","gulp-tag-version":"^1.2.1","gulp-uglify":"~1.0.1",he:"^0.5.0","hogan.js":"^3.0.2",jasmine:"~2.0.1",jison:"~0.4.15","jshint-stylish":"^1.0.0",karma:"~0.12.20","karma-chrome-launcher":"~0.1.5","karma-jasmine":"~0.2.1","karma-requirejs":"~0.2.2",lodash:"^2.4.1","lodash._escapestringchar":"^2.4.1","lodash._objecttypes":"^2.4.1","lodash._reinterpolate":"^2.4.1","lodash._reunescapedhtml":"^2.4.1","lodash.defaults":"^2.4.1","lodash.templatesettings":"^2.4.1","lodash.values":"^2.4.1",marked:"^0.3.2","mock-browser":"^0.90.27",path:"^0.4.9",phantomjs:"^1.9.12",rewire:"^2.1.3",rimraf:"^2.2.8","semantic-ui":"^1.4.1",tape:"^3.0.3"}} },{}],103:[function(e,t,r){var n=e("./graphDb"),i=e("./parser/flow"),a=e("./parser/dot"),u=e("dagre-d3");r.addVertices=function(e,t){var r=Object.keys(e),n=function(e,t){var r;for(r=0;r0&&(u=a.classes.join(" "));var o="";o=n(o,a.styles),i="undefined"==typeof a.text?a.id:a.text;var s=0,c="";switch(a.type){case"round":s=5,c="rect";break;case"square":c="rect";break;case"diamond":c="question";break;case"odd":c="rect_left_inv_arrow";break;case"circle":c="circle";break;default:c="rect"}t.setNode(a.id,{labelType:"html",shape:c,label:i,rx:s,ry:s,"class":u,style:o,id:a.id})})},r.addEdges=function(e,t){var r,n=0;e.forEach(function(e){n++,r="arrow_open"===e.type?"none":"normal";var i="";"undefined"!=typeof e.style&&e.style.forEach(function(e){i=i+e+";"}),"undefined"==typeof e.text?"undefined"==typeof e.style?t.setEdge(e.start,e.end,{style:"stroke: #333; stroke-width: 1.5px;fill:none",arrowheadStyle:"fill: #333",arrowhead:r},n):t.setEdge(e.start,e.end,{style:i,arrowheadStyle:"fill: #333",arrowhead:r},n):"undefined"==typeof e.style?t.setEdge(e.start,e.end,{labelType:"html",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:''+e.text+"",arrowheadStyle:"fill: #333",arrowhead:r},n):t.setEdge(e.start,e.end,{labelType:"html",style:i,arrowheadStyle:"fill: #333",label:e.text,arrowhead:r},n)})},r.getClasses=function(e,t){var r;n.clear(),r=t?a.parser:i.parser,r.yy=n,r.parse(e);var u=n.getClasses();return"undefined"==typeof u.default&&(u.default={id:"default"},u.default.styles=["fill:#eaeaea","stroke:#666","stroke-width:1.5px"]),u},r.draw=function(e,t,o){var s;n.clear(),s=o?a.parser:i.parser,s.yy=n,s.parse(e);var c;c=n.getDirection(),"undefined"==typeof c&&(c="TD");var l=new u.graphlib.Graph({multigraph:!0}).setGraph({rankdir:c,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),h=n.getVertices(),d=n.getEdges();r.addVertices(h,l),r.addEdges(d,l);var p=new u.render;p.shapes().question=function(e,t,r){var n=t.width,i=t.height,a=.8*(n+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=e.insert("polygon",":first-child").attr("points",o.map(function(e){return e.x+","+e.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return r.intersect=function(e){return u.intersect.polygon(r,o,e)},s},p.shapes().rect_left_inv_arrow=function(e,t,r){var n=t.width,i=t.height,a=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=e.insert("polygon",":first-child").attr("points",a.map(function(e){return e.x+","+e.y}).join(" ")).attr("transform","translate("+-n/2+","+2*i/4+")");return r.intersect=function(e){return u.intersect.polygon(r,a,e)},o},p.arrows().none=function(e,t,r,n){var i=e.append("marker").attr("id",t).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,r[n+"Style"])};var f=d3.select("#"+t);svgGroup=d3.select("#"+t+" g"),p(d3.select("#"+t+" g"),l);var g=document.querySelector("#mermaidChart0");f.attr("height",l.graph().height),f.attr("width",l.graph().width),f.attr("viewBox",g.getBBox().x+" 0 "+l.graph().width+" "+l.graph().height)}},{"./graphDb":104,"./parser/dot":105,"./parser/flow":106,"dagre-d3":1}],104:[function(require,module,exports){var vertices={},edges=[],classes=[],direction,funs=[];exports.addVertex=function(e,t,r,n){"undefined"!=typeof e&&0!==e.trim().length&&("undefined"==typeof vertices[e]&&(vertices[e]={id:e,styles:[],classes:[]}),"undefined"!=typeof t&&(vertices[e].text=t),"undefined"!=typeof r&&(vertices[e].type=r),"undefined"!=typeof r&&(vertices[e].type=r),"undefined"!=typeof n&&null!==n&&n.forEach(function(t){vertices[e].styles.push(t)}))},exports.addLink=function(e,t,r,n){var i={start:e,end:t,type:void 0,text:""};n=r.text,"undefined"!=typeof n&&(i.text=n),"undefined"!=typeof r&&(i.type=r.type),edges.push(i)},exports.updateLink=function(e,t){e.substr(1);edges[e].style=t},exports.addClass=function(e,t){"undefined"==typeof classes[e]&&(classes[e]={id:e,styles:[]}),"undefined"!=typeof t&&null!==t&&t.forEach(function(t){classes[e].styles.push(t)})},exports.setDirection=function(e){direction=e},exports.setClass=function(e,t){e.indexOf(",")>0?e.split(",").forEach(function(e){"undefined"!=typeof vertices[e]&&vertices[e].classes.push(t)}):"undefined"!=typeof vertices[e]&&vertices[e].classes.push(t)},exports.setClickEvent=function(id,functionName){id.indexOf(",")>0?id.split(",").forEach(function(id2){"undefined"!=typeof vertices[id2]&&funs.push(function(){var elem=document.getElementById(id2);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id2+"')")})})}):"undefined"!=typeof vertices[id]&&funs.push(function(){var elem=document.getElementById(id);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id+"')")})})},exports.bindFunctions=function(){funs.forEach(function(e){e()})},exports.getDirection=function(){return direction},exports.getVertices=function(){return vertices},exports.getEdges=function(){return edges},exports.getClasses=function(){return classes},exports.clear=function(){vertices={},classes={},edges=[],funs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}},{}],105:[function(e,t,r){(function(n){var i=function(){function e(){this.yy={}}var t=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},r=[1,5],n=[1,6],i=[1,12],a=[1,13],u=[1,14],o=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],d=[1,20],p=[1,21],f=[1,22],g=[8,16,17,18,19,20,21,22,23,24,25,26],y=[1,37],m=[1,33],v=[1,34],b=[1,35],A=[1,36],E=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],x=[10,28],w=[10,28,37,57,58],_=[2,49],D=[1,45],k=[1,48],C=[1,49],F=[1,52],B=[2,65],T=[1,65],S=[1,66],L=[1,67],N=[1,68],q=[1,69],I=[1,70],O=[1,71],R=[1,72],P=[1,73],M=[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(e,t,r,n,i,a){var u=a.length-1;switch(i){case 1:this.$=a[u-1];break;case 2:this.$=a[u-4];break;case 3:this.$=a[u-5];break;case 4:this.$=a[u-3];break;case 8:case 10:case 11:this.$=a[u];break;case 9:this.$=a[u-1]+""+a[u];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[u];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:n.addLink(a[u-1],a[u].id,a[u].op),this.$="oy";break;case 42:n.addLink(a[u-1],a[u].id,a[u].op),this.$={op:a[u-2],id:a[u-1]};break;case 44:this.$={op:a[u-1],id:a[u]};break;case 48:n.addVertex(a[u-1]),this.$=a[u-1];break;case 49:n.addVertex(a[u]),this.$=a[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:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},{6:23,12:r,13:n},t(g,[2,5]),t(g,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:y,9:25,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},t([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f}),t(E,[2,8]),t(E,[2,10]),t(E,[2,11]),t(E,[2,12]),t(E,[2,13]),t(E,[2,14]),t(E,[2,15]),t(E,[2,16]),t(E,[2,17]),t(E,[2,18]),t(E,[2,19]),t(E,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{10:[1,41]},{10:[2,21],28:[1,42]},t(x,[2,23]),t(x,[2,24]),t(x,[2,25]),t(w,_,{44:44,32:[1,43],45:D}),t(x,[2,27],{41:46,43:47,57:k,58:C}),t(x,[2,47],{43:47,34:50,41:51,37:F,57:k,58:C}),{34:53,37:F},{34:54,37:F},{34:55,37:F},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},t(E,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:y,9:61,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{7:62,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},t(w,[2,48]),t(w,B,{14:10,15:11,7:63,46:64,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,48:T,49:S,50:L,51:N,52:q,53:I,54:O,55:R,56:P}),t(x,[2,41],{34:74,37:F}),{7:77,8:y,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,33:76,42:75,47:A},t(M,[2,66]),t(M,[2,67]),t(x,[2,46]),t(x,[2,40],{34:78,37:F}),{7:81,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,38:79,39:[1,80]},t(x,[2,28]),t(x,[2,29]),t(x,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{5:[2,2]},{10:[2,22]},t(x,[2,26]),t(w,[2,51],{45:[1,86]}),t(w,[2,52]),t(w,[2,56]),t(w,[2,57]),t(w,[2,58]),t(w,[2,59]),t(w,[2,60]),t(w,[2,61]),t(w,[2,62]),t(w,[2,63]),t(w,[2,64]),t(x,[2,38]),t(j,[2,44],{43:47,41:87,57:k,58:C}),t(j,[2,45],{43:47,41:88,57:k,58:C}),t(w,_,{44:44,45:D}),t(x,[2,39]),{39:[1,89]},t(x,[2,34],{34:90,37:F}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{10:[1,93]},t(w,[2,55]),{10:[1,94]},t(w,B,{46:95,48:T,49:S,50:L,51:N,52:q,53:I,54:O,55:R,56:P}),t(j,[2,42]),t(j,[2,43]),t(x,[2,33],{34:96,37:F}),t(x,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},{10:[1,98]},t(w,[2,54]),{5:[2,3]},t(w,[2,50]),t(x,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},t(w,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,38:101},{7:81,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,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(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||d,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,n=[0],i=[null],a=[],u=this.table,o="",s=0,c=0,l=0,h=2,d=1,p=a.slice.call(arguments,1),f=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);f.setInput(e,g.yy),g.yy.lexer=f,g.yy.parser=this,"undefined"==typeof f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var v=f.options&&f.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,A,E,x,w,_,D,k,C,F={};;){if(E=n[n.length-1],this.defaultActions[E]?x=this.defaultActions[E]:((null===b||"undefined"==typeof b)&&(b=t()),x=u[E]&&u[E][b]),"undefined"==typeof x||!x.length||!x[0]){var B="";C=[];for(_ in u[E])this.terminals_[_]&&_>h&&C.push("'"+this.terminals_[_]+"'");B=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+b);switch(x[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,A?(b=A,A=null):(c=f.yyleng,o=f.yytext,s=f.yylineno,m=f.yylloc,l>0&&l--);break;case 2:if(D=this.productions_[x[1]][1],F.$=i[i.length-D],F._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},v&&(F._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),w=this.performAction.apply(F,[o,c,s,g.yy,x[1],i,a].concat(p)),"undefined"!=typeof w)return w;D&&(n=n.slice(0,-1*D*2),i=i.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),i.push(F.$),a.push(F._$),k=u[n[n.length-2]][n[n.length-1]],n.push(k);break;case 3:return!0}}return!0}},U=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){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=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(e=this.test_match(r,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[n]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,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:return"DIR";case 11:return"DIR";case 12:return"DIR";case 13:return"DIR";case 14:return"DIR";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 e}();return V.lexer=U,e.prototype=V,V.Parser=e,new e}();"undefined"!=typeof e&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof t&&e.main===t&&r.main(n.argv.slice(1)))}).call(this,e("1YiZ5S"))},{"1YiZ5S":99,fs:97,path:98}],106:[function(e,t,r){(function(n){var i=function(){function e(){this.yy={}}var t=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},r=[1,7],n=[1,8],i=[1,18],a=[1,19],u=[1,20],o=[1,21],s=[1,22],c=[1,27],l=[1,16],h=[1,29],d=[1,26],p=[1,28],f=[1,34],g=[1,33],y=[1,30],m=[1,31],v=[1,32],b=[1,6],A=[53,54,55,56,57,62,63,65,67,68,70,71,73,74,75],E=[1,46],x=[1,45],w=[1,44],_=[6,16,17],D=[1,56],k=[1,57],C=[1,58],F=[1,59],B=[6,16,17,43,44,45,46,47],T=[6,9,12,13,16,17,31,34,36,43,44,45,46,47],S=[6,9,12,13,16,17,31,34,36,43,44,45,46,47,62,65,67,68,70,71,73,74,75],L=[6,8,9,10,12,13,16,17,31,33,34,35,36,37,40,43,44,45,46,47,48,53,54,55,56,57,62,65,67,68,70,71,73,74,75,76,77,78],N=[1,6,9,17,53,54,55,56,57,62,63,65,67,68,70,71,73,74,75],q=[1,111],I=[1,103],O=[1,112],R=[1,86],P=[1,85],M=[1,101],j=[1,90],V=[1,91],U=[1,88],G=[1,89],$=[1,92],H=[1,93],Y=[1,104],z=[1,97],W=[1,98],Z=[1,96],K=[1,99],X=[1,87],J=[1,106],Q=[1,107],et=[1,108],tt=[1,109],rt=[1,110],nt=[1,94],it=[1,95],at=[1,100],ut=[62,65,67,68,70,71,73,74,75],ot=[9,48,62,65,67,68,70,71,73,74,75],st=[1,136],ct=[1,133],lt=[1,134],ht=[8,9,10,12,13,16,17,31,33,34,35,36,37,40,44,45,46,47,48,53,54,55,56,57,62,65,67,68,70,71,73,74,75,76,77,78],dt=[2,99],pt=[2,101],ft=[8,9,10,12,13,33,35,37,40,48,53,54,55,56,57,62,65,67,68,70,71,73,74,75],gt=[9,17,53,54,55,56,57,62,63,65,67,68,70,71,73,74,75],yt=[1,170],mt=[1,167],vt=[1,171],bt=[1,168],At=[1,165],Et=[1,166],xt=[1,169],wt=[1,172],_t=[1,173],Dt=[8,9,10,12,13,40,53,54,55,56,57,62,65,67,68,70,71,73,74,75],kt=[2,44],Ct=[1,185],Ft=[6,16,17,65],Bt=[6,9,16,17,40,61,62,65,67,68,69,70,71],Tt={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graphConfig:4,statements:5,EOF:6,spaceListNewline:7,GRAPH:8,SPACE:9,DIR:10,FirstStmtSeperator:11,TAGEND:12,TAGSTART:13,UP:14,DOWN:15,SEMI:16,NEWLINE:17,spaceList:18,statement:19,commentStatement:20,verticeStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,vertex:28,link:29,alphaNum:30,SQS:31,text:32,SQE:33,PS:34,PE:35,DIAMOND_START:36,DIAMOND_STOP:37,alphaNumStatement:38,alphaNumToken:39,MINUS:40,linkStatement:41,arrowText:42,"--":43,ARROW_POINT:44,ARROW_CIRCLE:45,ARROW_CROSS:46,ARROW_OPEN:47,PIPE:48,textToken:49,commentText:50,commentToken:51,keywords:52,STYLE:53,LINKSTYLE:54,CLASSDEF:55,CLASS:56,CLICK:57,textNoTags:58,textNoTagsToken:59,stylesOpt:60,HEX:61,NUM:62,PCT:63,style:64,COMMA:65,styleComponent:66,ALPHA:67,COLON:68,UNIT:69,BRKT:70,DOT:71,graphCodeTokens:72,PLUS:73,EQUALS:74,MULT:75,TAG_START:76,TAG_END:77,QUOTE:78,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",8:"GRAPH",9:"SPACE",10:"DIR",12:"TAGEND",13:"TAGSTART",14:"UP",15:"DOWN",16:"SEMI",17:"NEWLINE",31:"SQS",33:"SQE",34:"PS",35:"PE",36:"DIAMOND_START",37:"DIAMOND_STOP",40:"MINUS",43:"--",44:"ARROW_POINT",45:"ARROW_CIRCLE",46:"ARROW_CROSS",47:"ARROW_OPEN",48:"PIPE",53:"STYLE",54:"LINKSTYLE",55:"CLASSDEF",56:"CLASS",57:"CLICK",61:"HEX",62:"NUM",63:"PCT",65:"COMMA",67:"ALPHA",68:"COLON",69:"UNIT",70:"BRKT",71:"DOT",73:"PLUS",74:"EQUALS",75:"MULT",76:"TAG_START",77:"TAG_END",78:"QUOTE"},productions_:[0,[3,3],[3,2],[3,4],[3,3],[4,4],[4,4],[4,4],[4,4],[4,4],[11,1],[11,1],[11,2],[5,3],[5,2],[5,1],[7,2],[7,2],[7,1],[7,1],[18,2],[18,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[22,1],[22,1],[22,1],[21,3],[21,1],[28,4],[28,5],[28,6],[28,7],[28,4],[28,5],[28,4],[28,5],[28,4],[28,5],[28,4],[28,1],[28,2],[30,1],[30,2],[38,1],[38,3],[29,2],[29,3],[29,1],[29,2],[29,5],[29,6],[41,1],[41,1],[41,1],[41,1],[42,3],[32,1],[32,2],[50,1],[50,2],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[58,1],[58,2],[25,5],[26,5],[27,5],[23,5],[23,5],[24,5],[20,3],[60,1],[60,3],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[51,1],[51,1],[49,1],[49,1],[49,1],[59,1],[59,1],[59,1],[59,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1]],performAction:function(e,t,r,n,i,a){var u=a.length-1;switch(i){case 3:this.$=a[u-3];break;case 4:this.$=a[u-2];break;case 5:n.setDirection(a[u-1]),this.$=a[u-1];break;case 6:n.setDirection("LR"),this.$=a[u-1];break;case 7:n.setDirection("RL"),this.$=a[u-1];break;case 8:n.setDirection("BT"),this.$=a[u-1];break;case 9:n.setDirection("TB"),this.$=a[u-1];break;case 32:n.addLink(a[u-2],a[u],a[u-1]),this.$="oy";break;case 33:this.$="yo";break;case 34:this.$=a[u-3],n.addVertex(a[u-3],a[u-1],"square");break;case 35:this.$=a[u-4],n.addVertex(a[u-4],a[u-2],"square");break;case 36:this.$=a[u-5],n.addVertex(a[u-5],a[u-2],"circle");break;case 37:this.$=a[u-6],n.addVertex(a[u-6],a[u-3],"circle");break;case 38:this.$=a[u-3],n.addVertex(a[u-3],a[u-1],"round");break;case 39:this.$=a[u-4],n.addVertex(a[u-4],a[u-2],"round");break;case 40:case 44:this.$=a[u-3],n.addVertex(a[u-3],a[u-1],"diamond");break;case 41:this.$=a[u-4],n.addVertex(a[u-4],a[u-2],"diamond");break;case 42:this.$=a[u-3],n.addVertex(a[u-3],a[u-1],"odd");break;case 43:this.$=a[u-4],n.addVertex(a[u-4],a[u-2],"odd");break;case 45:this.$=a[u],n.addVertex(a[u]);break;case 46:this.$=a[u-1],n.addVertex(a[u-1]);break;case 47:case 49:case 62:case 64:case 73:this.$=a[u];break;case 48:case 63:case 65:case 74:this.$=a[u-1]+""+a[u];break;case 50:this.$=a[u-2]+"-"+a[u];break;case 51:a[u-1].text=a[u],this.$=a[u-1];break;case 52:a[u-2].text=a[u-1],this.$=a[u-2];break;case 53:this.$=a[u];break;case 54:case 61:this.$=a[u-1];break;case 55:a[u].text=a[u-2],this.$=a[u];break;case 56:a[u-1].text=a[u-3],this.$=a[u-1];break;case 57:this.$={type:"arrow"};break;case 58:this.$={type:"arrow_circle"};break;case 59:this.$={type:"arrow_cross"};break;case 60:this.$={type:"arrow_open"};break;case 75:this.$=a[u-4],n.addClass(a[u-2],a[u]);break;case 76:this.$=a[u-4],n.setClass(a[u-2],a[u]);break;case 77:this.$=a[u-4],n.setClickEvent(a[u-2],a[u]);break;case 78:this.$=a[u-4],n.addVertex(a[u-2],void 0,void 0,a[u]);break;case 79:case 80:this.$=a[u-4],n.updateLink(a[u-2],a[u]);break;case 82:this.$=[a[u]];break;case 83:a[u-2].push(a[u]),this.$=a[u-2];break;case 85:this.$=a[u-1]+a[u]}},table:[{3:1,4:2,8:[1,3]},{1:[3]},{5:4,7:5,9:r,17:n,19:6,20:9,21:10,23:11,24:12,25:13,26:14,27:15,28:17,30:23,38:24,39:25,53:i,54:a,55:u,56:o,57:s,62:c,63:l,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{9:[1,35]},{1:[2,2],6:[1,36]},{5:37,19:6,20:9,21:10,23:11,24:12,25:13,26:14,27:15,28:17,30:23,38:24,39:25,53:i,54:a,55:u,56:o,57:s,62:c,63:l,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(b,[2,15],{19:6,20:9,21:10,23:11,24:12,25:13,26:14,27:15,28:17,30:23,38:24,39:25,7:38,5:39,9:r,17:n,53:i,54:a,55:u,56:o,57:s,62:c,63:l,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v}),t(A,[2,19],{7:40,9:r,17:n}),t(A,[2,18],{7:41,9:r,17:n}),{17:[1,42]},{6:E,16:x,17:w,22:43},{6:E,16:x,17:w,22:47},{6:E,16:x,17:w,22:48},{6:E,16:x,17:w,22:49},{6:E,16:x,17:w,22:50},{6:E,16:x,17:w,22:51},{63:[1,52]},t(_,[2,33],{29:53,41:54,43:[1,55],44:D,45:k,46:C,47:F}),{9:[1,60]},{9:[1,61]},{9:[1,62]},{9:[1,63]},{9:[1,64]},t(B,[2,45],{9:[1,70],12:[1,68],13:[1,69],31:[1,65],34:[1,66],36:[1,67]}),t(T,[2,47],{38:24,39:25,30:71,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v}),t(S,[2,49],{40:[1,72]}),t(L,[2,104]),t(L,[2,105]),t(L,[2,106]),t(L,[2,107]),t(L,[2,108]),t(L,[2,109]),t(L,[2,110]),t(L,[2,111]),t(L,[2,112]),{10:[1,73],12:[1,74],13:[1,75],14:[1,76],15:[1,77]},{1:[2,1]},{1:[2,4],6:[1,78]},{5:79,19:6,20:9,21:10,23:11,24:12,25:13,26:14,27:15,28:17,30:23,38:24,39:25,53:i,54:a,55:u,56:o,57:s,62:c,63:l,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(b,[2,14]),t(A,[2,16]),t(A,[2,17]),t(N,[2,22]),t(N,[2,23]),t(N,[2,29]),t(N,[2,30]),t(N,[2,31]),t(N,[2,24]),t(N,[2,25]),t(N,[2,26]),t(N,[2,27]),t(N,[2,28]),{8:q,9:I,10:O,12:R,13:P,16:M,31:j,33:V,34:U,35:G,36:$,37:H,39:102,40:Y,44:z,45:W,46:Z,47:K,48:X,49:82,50:80,51:81,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,72:83,73:y,74:m,75:v,76:nt,77:it,78:at},{28:113,30:23,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(ut,[2,53],{42:114,9:[1,115],48:[1,116]}),{9:[1,117]},t(ot,[2,57]),t(ot,[2,58]),t(ot,[2,59]),t(ot,[2,60]),{30:118,38:24,39:25,61:[1,119],62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{62:[1,120]},{30:121,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{30:122,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{30:123,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:124,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:127,34:[1,126],39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:128,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:129,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:130,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(B,[2,46]),t(T,[2,48]),{39:131,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{9:st,11:132,16:ct,17:lt,18:135},{9:st,11:137,16:ct,17:lt,18:135},{9:st,11:138,16:ct,17:lt,18:135},{9:st,11:139,16:ct,17:lt,18:135},{9:st,11:140,16:ct,17:lt,18:135},{1:[2,3]},t(b,[2,13]),{8:q,9:I,10:O,12:R,13:P,16:M,17:[2,81],31:j,33:V,34:U,35:G,36:$,37:H,39:102,40:Y,44:z,45:W,46:Z,47:K,48:X,49:82,51:141,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,72:83,73:y,74:m,75:v,76:nt,77:it,78:at},t(ht,[2,64]),t(ht,[2,95]),t(ht,[2,96]),t(ht,[2,97]),t(ht,[2,98]),t(ht,dt),t(ht,[2,113]),t(ht,[2,114]),t(ht,[2,115]),t(ht,[2,116]),t(ht,[2,117]),t(ht,[2,118]),t(ht,[2,119]),t(ht,[2,120]),t(ht,[2,121]),t(ht,[2,122]),t(ht,[2,123]),t(ht,[2,124]),t(ht,[2,125]),t(ht,[2,126]),t(ht,[2,127]),t(ht,[2,100]),t(ht,pt),t(ht,[2,102]),t(ht,[2,103]),t(ht,[2,66]),t(ht,[2,67]),t(ht,[2,68]),t(ht,[2,69]),t(ht,[2,70]),t(ht,[2,71]),t(ht,[2,72]),t(_,[2,32]),t(ut,[2,51],{9:[1,142]}),t(ut,[2,54]),{8:q,9:I,10:O,12:R,13:P,32:143,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:144,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{9:[1,145]},{9:[1,146]},{9:[1,147]},{9:[1,148]},{9:[1,149]},{9:[1,150]},{8:q,9:I,10:O,12:R,13:P,33:[1,151],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(ft,[2,62]),{8:q,9:I,10:O,12:R,13:P,32:153,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,35:[1,154],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,37:[1,155],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,33:[1,156],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:[1,157],13:P,39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(S,[2,50]),t(gt,[2,5]),t(gt,[2,10]),t(gt,[2,11]),{17:[1,158]},{9:st,17:[2,21],18:159},t(gt,[2,6]),t(gt,[2,7]),t(gt,[2,8]),t(gt,[2,9]),t(ht,[2,65]),t(ut,[2,52]),{8:q,9:I,10:O,12:R,13:P,39:102,40:Y,48:[1,160],49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:[1,161],10:O,12:R,13:P,39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{9:yt,40:mt,60:162,61:vt,62:bt,64:163,66:164,67:At,68:Et,69:xt,70:wt,71:_t},{9:yt,40:mt,60:174,61:vt,62:bt,64:163,66:164,67:At,68:Et,69:xt,70:wt,71:_t},{9:yt,40:mt,60:175,61:vt,62:bt,64:163,66:164,67:At,68:Et,69:xt,70:wt,71:_t},{9:yt,40:mt,60:176,61:vt,62:bt,64:163,66:164,67:At,68:Et,69:xt,70:wt,71:_t},{30:177,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{30:178,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(B,[2,34],{9:[1,179]}),t(ft,[2,63]),{8:q,9:I,10:O,12:R,13:P,35:[1,180],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(B,[2,38],{9:[1,181]}),t(B,[2,40],{9:[1,182]}),t(B,[2,42],{9:[1,183]}),t(Dt,dt,{6:kt,16:kt,17:kt,43:kt,44:kt,45:kt,46:kt,47:kt}),t(gt,[2,12]),{17:[2,20]},t([9,62,65,67,68,70,71,73,74,75],[2,61]),t(Dt,pt,{41:184,44:D,45:k,46:C,47:F}),t(_,[2,78],{65:Ct}),t(Ft,[2,82],{66:186,9:yt,40:mt,61:vt,62:bt,67:At,68:Et,69:xt,70:wt,71:_t}),t(Bt,[2,84]),t(Bt,[2,86]),t(Bt,[2,87]),t(Bt,[2,88]),t(Bt,[2,89]),t(Bt,[2,90]),t(Bt,[2,91]),t(Bt,[2,92]),t(Bt,[2,93]),t(Bt,[2,94]),t(_,[2,79],{65:Ct}),t(_,[2,80],{65:Ct}),t(_,[2,75],{65:Ct}),t(_,[2,76]),t(_,[2,77]),t(B,[2,35]),{35:[1,187]},t(B,[2,39]),t(B,[2,41]),t(B,[2,43]),t(ut,[2,55],{9:[1,188]}),{9:yt,40:mt,61:vt,62:bt,64:189,66:164,67:At,68:Et,69:xt,70:wt,71:_t},t(Bt,[2,85]),t(B,[2,36],{9:[1,190]}),t(ut,[2,56]),t(Ft,[2,83],{66:186,9:yt,40:mt,61:vt,62:bt,67:At,68:Et,69:xt,70:wt,71:_t}),t(B,[2,37])],defaultActions:{36:[2,1],78:[2,3],159:[2,20]},parseError:function(e,t){if(!t.recoverable)throw new Error(e); this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||d,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,n=[0],i=[null],a=[],u=this.table,o="",s=0,c=0,l=0,h=2,d=1,p=a.slice.call(arguments,1),f=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);f.setInput(e,g.yy),g.yy.lexer=f,g.yy.parser=this,"undefined"==typeof f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var v=f.options&&f.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,A,E,x,w,_,D,k,C,F={};;){if(E=n[n.length-1],this.defaultActions[E]?x=this.defaultActions[E]:((null===b||"undefined"==typeof b)&&(b=t()),x=u[E]&&u[E][b]),"undefined"==typeof x||!x.length||!x[0]){var B="";C=[];for(_ in u[E])this.terminals_[_]&&_>h&&C.push("'"+this.terminals_[_]+"'");B=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+b);switch(x[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,A?(b=A,A=null):(c=f.yyleng,o=f.yytext,s=f.yylineno,m=f.yylloc,l>0&&l--);break;case 2:if(D=this.productions_[x[1]][1],F.$=i[i.length-D],F._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},v&&(F._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),w=this.performAction.apply(F,[o,c,s,g.yy,x[1],i,a].concat(p)),"undefined"!=typeof w)return w;D&&(n=n.slice(0,-1*D*2),i=i.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),i.push(F.$),a.push(F._$),k=u[n[n.length-2]][n[n.length-1]],n.push(k);break;case 3:return!0}}return!0}},St=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){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=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(e=this.test_match(r,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[n]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,r,n){switch(r){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:return 57;case 5:return 8;case 6:return 10;case 7:return 10;case 8:return 10;case 9:return 10;case 10:return 10;case 11:return 10;case 12:return 62;case 13:return 70;case 14:return 68;case 15:return 16;case 16:return 65;case 17:return 74;case 18:return 75;case 19:return 71;case 20:return 13;case 21:return 12;case 22:return 14;case 23:return 15;case 24:return 46;case 25:return 44;case 26:return 45;case 27:return 47;case 28:return 43;case 29:return 40;case 30:return 73;case 31:return 63;case 32:return 74;case 33:return 67;case 34:return 48;case 35:return 34;case 36:return 35;case 37:return 31;case 38:return 33;case 39:return 36;case 40:return 37;case 41:return 78;case 42:return 17;case 43:return 9;case 44:return 6}},rules:[/^(?:style\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9])/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:=)/,/^(?:\*)/,/^(?:\.)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:--[x])/,/^(?:-->)/,/^(?:--[o])/,/^(?:---)/,/^(?:--)/,/^(?:-)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u005C\u005F-\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_\/])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n)/,/^(?:\s)/,/^(?:$)/],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,43,44],inclusive:!0}}};return e}();return Tt.lexer=St,e.prototype=Tt,Tt.Parser=e,new e}();"undefined"!=typeof e&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof t&&e.main===t&&r.main(n.argv.slice(1)))}).call(this,e("1YiZ5S"))},{"1YiZ5S":99,fs:97,path:98}],107:[function(e,t,r){(function(n){var i=function(){function e(){this.yy={}}var t=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},r=[6,8,10,11,15,17,19,20,22,33],n=[2,2],i=[1,6],a=[1,8],u=[1,9],o=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],d=[1,18],p=[2,7],f=[6,8,10,11,15,17,18,19,20,21,22,33],g=[6,8,10,11,15,17,18,19,20,22,33],y=[1,46],m=[1,49],v=[1,53],b={trace:function(){},yy:{},symbols_:{error:2,start:3,SD:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,participant:11,actor:12,signal:13,note_statement:14,title:15,text:16,loop:17,end:18,opt:19,alt:20,"else":21,note:22,placement:23,text2:24,over:25,spaceList:26,actor_pair:27,",":28,left_of:29,right_of:30,signaltype:31,actors:32,ACTOR:33,SOLID_OPEN_ARROW:34,DOTTED_OPEN_ARROW:35,SOLID_ARROW:36,DOTTED_ARROW:37,SOLID_CROSS:38,DOTTED_CROSS:39,TXT:40,$accept:0,$end:1},terminals_:{2:"error",4:"SD",6:"EOF",8:"SPACE",10:"NL",11:"participant",15:"title",16:"text",17:"loop",18:"end",19:"opt",20:"alt",21:"else",22:"note",25:"over",28:",",29:"left_of",30:"right_of",33:"ACTOR",34:"SOLID_OPEN_ARROW",35:"DOTTED_OPEN_ARROW",36:"SOLID_ARROW",37:"DOTTED_ARROW",38:"SOLID_CROSS",39:"DOTTED_CROSS",40:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,3],[9,2],[9,2],[9,4],[9,4],[9,4],[9,7],[14,4],[14,5],[26,2],[26,1],[27,1],[27,3],[23,1],[23,1],[13,4],[32,2],[32,1],[12,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,1],[24,1]],performAction:function(e,t,r,n,i,a){var u=a.length-1;switch(i){case 1:return n.apply(a[u-1]),a[u-1];case 2:this.$=[];break;case 3:a[u-1].push(a[u]),this.$=a[u-1];break;case 4:case 5:this.$=a[u];break;case 6:case 7:this.$=[];break;case 8:this.$=a[u-1];break;case 12:a[u-1].unshift({type:"loopStart",loopText:a[u-2].actor,signalType:n.LINETYPE.LOOP_START}),a[u-1].push({type:"loopEnd",loopText:a[u-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[u-1];break;case 13:a[u-1].unshift({type:"optStart",optText:a[u-2].actor,signalType:n.LINETYPE.OPT_START}),a[u-1].push({type:"optEnd",optText:a[u-2].actor,signalType:n.LINETYPE.OPT_END}),this.$=a[u-1];break;case 14:a[u-4].unshift({type:"altStart",altText:a[u-5].actor,signalType:n.LINETYPE.ALT_START}),a[u-4].push({type:"else",altText:a[u-2].actor,signalType:n.LINETYPE.ALT_ELSE}),a[u-4]=a[u-4].concat(a[u-1]),a[u-4].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[u-4];break;case 15:this.$=[a[u-1],{type:"addNote",placement:a[u-2],actor:a[u-1].actor,text:a[u]}];break;case 19:this.$=a[u];break;case 20:this.$=[a[u-2],a[u]];break;case 21:this.$=n.PLACEMENT.LEFTOF;break;case 22:this.$=n.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[u-3],a[u-1],{type:"addMessage",from:a[u-3].actor,to:a[u-1].actor,signalType:a[u-2],msg:a[u]}];break;case 26:this.$={type:"addActor",actor:a[u]};break;case 27:this.$=n.LINETYPE.SOLID_OPEN;break;case 28:this.$=n.LINETYPE.DOTTED_OPEN;break;case 29:this.$=n.LINETYPE.SOLID;break;case 30:this.$=n.LINETYPE.DOTTED;break;case 31:this.$=n.LINETYPE.SOLID_CROSS;break;case 32:this.$=n.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[u].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},t(r,n,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,19:c,20:l,22:h,33:d},t(r,p,{1:[2,1]}),t(f,[2,3]),{9:19,11:u,12:16,13:10,14:11,15:o,17:s,19:c,20:l,22:h,33:d},t(f,[2,5]),t(f,[2,6]),{12:20,33:d},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:d},{12:25,33:d},{12:26,33:d},{31:27,34:[1,28],35:[1,29],36:[1,30],37:[1,31],38:[1,32],39:[1,33]},{23:34,25:[1,35],29:[1,36],30:[1,37]},t([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),t(f,[2,4]),{10:[1,38]},t(f,[2,9]),t(f,[2,10]),{16:[1,39]},t(g,n,{5:40}),t(g,n,{5:41}),t([6,8,10,11,15,17,19,20,21,22,33],n,{5:42}),{12:43,33:d},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:d},{8:y,26:45},{33:[2,21]},{33:[2,22]},t(f,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,18:[1,48],19:c,20:l,22:h,33:d},{6:m,7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,18:[1,50],19:c,20:l,22:h,33:d},{6:m,7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,19:c,20:l,21:[1,51],22:h,33:d},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:d},{8:y,26:57,33:[2,18]},t(f,[2,11]),t(f,[2,12]),t(f,p),t(f,[2,13]),{12:58,33:d},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:d},{28:[1,60],33:[2,19]},{33:[2,17]},t(g,n,{5:61}),{10:[2,16]},{12:62,33:d},{6:m,7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,18:[1,63],19:c,20:l,22:h,33:d},{33:[2,20]},t(f,[2,14])],defaultActions:{28:[2,27],29:[2,28],30:[2,29],31:[2,30],32:[2,31],33:[2,32],36:[2,21],37:[2,22],52:[2,23],53:[2,33],54:[2,15],57:[2,17],59:[2,16],62:[2,20]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||d,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,n=[0],i=[null],a=[],u=this.table,o="",s=0,c=0,l=0,h=2,d=1,p=a.slice.call(arguments,1),f=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);f.setInput(e,g.yy),g.yy.lexer=f,g.yy.parser=this,"undefined"==typeof f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var v=f.options&&f.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,A,E,x,w,_,D,k,C,F={};;){if(E=n[n.length-1],this.defaultActions[E]?x=this.defaultActions[E]:((null===b||"undefined"==typeof b)&&(b=t()),x=u[E]&&u[E][b]),"undefined"==typeof x||!x.length||!x[0]){var B="";C=[];for(_ in u[E])this.terminals_[_]&&_>h&&C.push("'"+this.terminals_[_]+"'");B=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+b);switch(x[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,A?(b=A,A=null):(c=f.yyleng,o=f.yytext,s=f.yylineno,m=f.yylloc,l>0&&l--);break;case 2:if(D=this.productions_[x[1]][1],F.$=i[i.length-D],F._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},v&&(F._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),w=this.performAction.apply(F,[o,c,s,g.yy,x[1],i,a].concat(p)),"undefined"!=typeof w)return w;D&&(n=n.slice(0,-1*D*2),i=i.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),i.push(F.$),a.push(F._$),k=u[n[n.length-2]][n[n.length-1]],n.push(k);break;case 3:return!0}}return!0}},A=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){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=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(e=this.test_match(r,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[n]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,t,r,n){switch(r){case 0:return 10;case 1:return 38;case 2:return 39;case 3:return 36;case 4:return 37;case 5:break;case 6:break;case 7:break;case 8:return 11;case 9:return 19;case 10:return 17;case 11:return 20;case 12:return 21;case 13:return 18;case 14:return 29;case 15:return 30;case 16:return 25;case 17:return 22;case 18:return 15;case 19:return 4;case 20:return 28;case 21:return 33;case 22:return 34;case 23:return 35;case 24:return 36;case 25:return 37;case 26:return 40;case 27:return 6;case 28:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:[\-][x])/i,/^(?:[\-][\-][x])/i,/^(?:[\-][>][>])/i,/^(?:[\-][\-][>][>])/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:opt\b)/i,/^(?:loop\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:[^\->:\n,]+)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?::[^#\n]+)/i,/^(?:$)/i,/^(?:.)/i],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],inclusive:!0}}};return e}();return b.lexer=A,e.prototype=b,b.Parser=e,new e}();"undefined"!=typeof e&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof t&&e.main===t&&r.main(n.argv.slice(1)))}).call(this,e("1YiZ5S"))},{"1YiZ5S":99,fs:97,path:98}],108:[function(e,t,r){var n={},i=[],a=[],u=[];r.addActor=function(e,t,r){n[e]={name:t,description:r},i.push(e)},r.addMessage=function(e,t,r,n){a.push({from:e,to:t,message:r,answer:n})},r.addSignal=function(e,t,r,n){a.push({from:e,to:t,message:r,type:n})},r.getMessages=function(){return a},r.getActors=function(){return n},r.getActor=function(e){return n[e]},r.getActorKeys=function(){return Object.keys(n)},r.clear=function(){n={},a=[]},r.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},r.ARROWTYPE={FILLED:0,OPEN:1},r.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},r.addNote=function(e,t,n){var i={actor:e,placement:t,message:n};u.push(i),a.push({from:e,to:e,message:n,type:r.LINETYPE.NOTE,placement:t})},r.parseError=function(e){console.log("Syntax error:"+e)},r.apply=function(e){if(e instanceof Array)e.forEach(function(e){r.apply(e)});else switch(e.type){case"addActor":r.addActor(e.actor,e.actor,e.actor);break;case"addNote":r.addNote(e.actor,e.placement,e.text);break;case"addMessage":r.addSignal(e.from,e.to,e.msg,e.signalType);break;case"loopStart":r.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":r.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":r.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":r.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":r.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":r.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":r.addSignal(void 0,void 0,void 0,e.signalType)}}},{}],109:[function(e,t,r){var n=e("./parser/sequenceDiagram").parser;n.yy=e("./sequenceDb");var i=e("./svgDraw"),a={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35};r.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,list:[],init:function(){this.list=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(e,t,r,n){e[t]="undefined"==typeof e[t]?r:n(r,e[t])},updateLoops:function(e,t,n,i){var u=this,o=0;this.list.forEach(function(s){o++;var c=u.list.length-o+1;u.updateVal(s,"startx",e-c*a.boxMargin,Math.min),u.updateVal(s,"starty",t-c*a.boxMargin,Math.min),u.updateVal(s,"stopx",n+c*a.boxMargin,Math.max),u.updateVal(s,"stopy",i+c*a.boxMargin,Math.max),u.updateVal(r.bounds.data,"startx",e-c*a.boxMargin,Math.min),u.updateVal(r.bounds.data,"starty",t-c*a.boxMargin,Math.min),u.updateVal(r.bounds.data,"stopx",n+c*a.boxMargin,Math.max),u.updateVal(r.bounds.data,"stopy",i+c*a.boxMargin,Math.max)})},insert:function(e,t,n,i){var a,u,o,s;a=Math.min(e,n),o=Math.max(e,n),u=Math.min(t,i),s=Math.max(t,i),this.updateVal(r.bounds.data,"startx",a,Math.min),this.updateVal(r.bounds.data,"starty",u,Math.min),this.updateVal(r.bounds.data,"stopx",o,Math.max),this.updateVal(r.bounds.data,"stopy",s,Math.max),this.updateLoops(a,u,o,s)},newLoop:function(e){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e})},endLoop:function(){var e=this.list.pop();return e},addElseToLoop:function(e){var t=this.list.pop();t.elsey=r.bounds.getVerticalPos(),t.elseText=e,this.list.push(t)},bumpVerticalPos:function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(e,t,n,u){var o=i.getNoteRect();o.x=t,o.y=n,o.width=a.width,o.class="note";var s=e.append("g"),c=i.drawRect(s,o),l=i.getTextObj();l.x=t,l.y=n+a.noteMargin,l.textMargin=a.noteMargin,l.dy="1em",l.text=u.message,l.class="noteText";var h=i.drawText(s,l),d=h[0][0].getBBox().height;r.bounds.insert(t,n,t+a.width,n+2*a.noteMargin+d),c.attr("height",d+2*a.noteMargin),r.bounds.bumpVerticalPos(d+2*a.noteMargin)};r.drawLoop=function(e,t,r){var n=e.append("g"),u=function(e,t,r,i){n.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};u(t.startx,t.starty,t.stopx,t.starty),u(t.stopx,t.starty,t.stopx,t.stopy),u(t.startx,t.stopy,t.stopx,t.stopy),u(t.startx,t.starty,t.startx,t.stopy),"undefined"!=typeof t.elsey&&u(t.startx,t.elsey,t.stopx,t.elsey);var o=i.getTextObj();o.text=r,o.x=t.startx,o.y=t.starty,o.labelMargin=1.5*a.boxMargin,o.class="labelText",o.fill="white",i.drawLabel(n,o),o=i.getTextObj(),o.text="[ "+t.title+" ]",o.x=t.startx+(t.stopx-t.startx)/2,o.y=t.starty+1.5*a.boxMargin,o.anchor="middle",o.class="loopText",i.drawText(n,o),"undefined"!=typeof t.elseText&&(o.text="[ "+t.elseText+" ]",o.y=t.elsey+1.5*a.boxMargin,i.drawText(n,o))};var o=function(e,t,i,a,u){var o,s=e.append("g"),c=t+(i-t)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(u.message),h=l[0][0].getBBox().width;if(t===i){o=s.append("path").attr("d","M "+t+","+a+" C "+(t+60)+","+(a-10)+" "+(t+60)+","+(a+30)+" "+t+","+(a+20)),r.bounds.bumpVerticalPos(30);var d=Math.max(h/2,100);r.bounds.insert(t-d,r.bounds.getVerticalPos()-10,i+d,r.bounds.getVerticalPos())}else o=s.append("line"),o.attr("x1",t),o.attr("y1",a),o.attr("x2",i),o.attr("y2",a),r.bounds.insert(t,r.bounds.getVerticalPos()-10,i,r.bounds.getVerticalPos()); -u.type===n.yy.LINETYPE.DOTTED||u.type===n.yy.LINETYPE.DOTTED_CROSS||u.type===n.yy.LINETYPE.DOTTED_OPEN?(o.style("stroke-dasharray","3, 3"),o.attr("class","messageLine1")):o.attr("class","messageLine0"),o.attr("stroke-width",2),o.attr("stroke","black"),o.style("fill","none"),(u.type===n.yy.LINETYPE.SOLID||u.type===n.yy.LINETYPE.DOTTED)&&o.attr("marker-end","url(#arrowhead)"),(u.type===n.yy.LINETYPE.SOLID_CROSS||u.type===n.yy.LINETYPE.DOTTED_CROSS)&&o.attr("marker-end","url(#crosshead)")};t.exports.drawActors=function(e,t,n){var u;for(u=0;u/gi).forEach(function(e){var n=r.append("tspan");n.attr("x",t.x+t.textMargin),n.attr("dy",t.dy),n.text(e)}),"undefined"!=typeof t.class&&r.attr("class",t.class),r},r.drawLabel=function(e,t){var n=r.getNoteRect();n.x=t.x,n.y=t.y,n.width=50,n.height=20,n.fill="#526e52",n.stroke="none",n.class="labelBox";r.drawRect(e,n);t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,t.fill="white",r.drawText(e,t)},r.drawActor=function(e,t,r,n){var i=t+n.width/2,a=e.append("g");a.append("line").attr("x1",i).attr("y1",5).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),a.append("rect").attr("x",t).attr("y",0).attr("fill","#eaeaea").attr("stroke","#666").attr("width",n.width).attr("height",n.height).attr("class","actor").attr("rx",3).attr("ry",3),a.append("text").attr("x",i).attr("y",n.height/2+5).attr("class","actor").style("text-anchor","middle").text(r)},r.insertArrowHead=function(e){e.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")},r.insertArrowCrossHead=function(e){e.append("defs").append("marker").attr("id","crosshead").attr("refX",15).attr("refY",4).attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 1,1 L 7,7 M 7,1 L 1,7")},r.getTextObj=function(){var e={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return e},r.getNoteRect=function(){var e={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return e}},{}],111:[function(e,t,r){(function(t){var n=e("./diagrams/flowchart/graphDb"),i=e("./diagrams/flowchart/parser/flow"),a=e("./utils"),u=e("./diagrams/flowchart/flowRenderer"),o=e("./diagrams/sequenceDiagram/sequenceRenderer"),s=e("he"),c=function(){var e,t=document.querySelectorAll(".mermaid"),r=0;for(e=0;e/g,">"),l=l.replace(/';var h=a.detectType(l),d={};switch(h){case"graph":d=u.getClasses(l,!1),u.draw(l,c,!1),a.cloneCssStyles(i.firstChild,d),n.bindFunctions();break;case"dotGraph":d=u.getClasses(l,!0),u.draw(l,c,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":o.draw(l,c),a.cloneCssStyles(i.firstChild,[])}}}};r.tester=function(){},r.version=function(){return e("../package.json").version};var l=function(e,t){return"undefined"==typeof t?!1:e===t};"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof mermaid_config?l(!0,mermaid_config.startOnLoad)&&c():c()},!1),t.mermaid={init:function(){c()},version:function(){return r.version()},getParser:function(){return i.parser}}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":102,"./diagrams/flowchart/flowRenderer":103,"./diagrams/flowchart/graphDb":104,"./diagrams/flowchart/parser/flow":106,"./diagrams/sequenceDiagram/sequenceRenderer":109,"./utils":112,he:100}],112:[function(e,t){t.exports.detectType=function(e){return e.match(/^\s*sequenceDiagram/)?"sequenceDiagram":e.match(/^\s*sequence/)?"sequence":e.match(/^\s*digraph/)?(console.log("Detected flow syntax"),"dotGraph"):"graph"},t.exports.cloneCssStyles=function(e,t){for(var r="",n=document.styleSheets,i=0;i0&&(r+=o.selectorText+" { "+o.style.cssText+" }\n")}}}var c="",l="";for(var h in t)t.hasOwnProperty(h)&&"undefined"!=typeof h&&("default"===h?c=".node { "+t[h].styles.join("; ")+"; }\n":l+="."+h+" { "+t[h].styles.join("; ")+"; }\n");if(""!==r||""!==c||""!==l){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",e.insertBefore(d,e.firstChild)}}},{}]},{},[111]); \ No newline at end of file +u.type===n.yy.LINETYPE.DOTTED||u.type===n.yy.LINETYPE.DOTTED_CROSS||u.type===n.yy.LINETYPE.DOTTED_OPEN?(o.style("stroke-dasharray","3, 3"),o.attr("class","messageLine1")):o.attr("class","messageLine0"),o.attr("stroke-width",2),o.attr("stroke","black"),o.style("fill","none"),(u.type===n.yy.LINETYPE.SOLID||u.type===n.yy.LINETYPE.DOTTED)&&o.attr("marker-end","url(#arrowhead)"),(u.type===n.yy.LINETYPE.SOLID_CROSS||u.type===n.yy.LINETYPE.DOTTED_CROSS)&&o.attr("marker-end","url(#crosshead)")};t.exports.drawActors=function(e,t,n){var u;for(u=0;u/gi).forEach(function(e){var n=r.append("tspan");n.attr("x",t.x+t.textMargin),n.attr("dy",t.dy),n.text(e)}),"undefined"!=typeof t.class&&r.attr("class",t.class),r},r.drawLabel=function(e,t){var n=r.getNoteRect();n.x=t.x,n.y=t.y,n.width=50,n.height=20,n.fill="#526e52",n.stroke="none",n.class="labelBox",r.drawRect(e,n),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,t.fill="white",r.drawText(e,t)},r.drawActor=function(e,t,n,i){var a=t+i.width/2,u=e.append("g");u.append("line").attr("x1",a).attr("y1",5).attr("x2",a).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var o=r.getNoteRect();o.x=t,o.fill="#eaeaea",o.width=i.width,o.height=i.height,o.class="actor",o.rx=3,o.ry=3,r.drawRect(u,o),u.append("text").attr("x",a).attr("y",i.height/2+5).attr("class","actor").style("text-anchor","middle").text(n)},r.insertArrowHead=function(e){e.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")},r.insertArrowCrossHead=function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").attr("refX",15).attr("refY",4).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 1,1 L 7,7 M 7,1 L 1,7")},r.getTextObj=function(){var e={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return e},r.getNoteRect=function(){var e={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return e}},{}],111:[function(e,t,r){(function(t){var n=e("./diagrams/flowchart/graphDb"),i=e("./diagrams/flowchart/parser/flow"),a=e("./utils"),u=e("./diagrams/flowchart/flowRenderer"),o=e("./diagrams/sequenceDiagram/sequenceRenderer"),s=e("he"),c=function(){var e,t=document.querySelectorAll(".mermaid"),r=0;for(e=0;e/g,">"),l=l.replace(/';var h=a.detectType(l),d={};switch(h){case"graph":d=u.getClasses(l,!1),u.draw(l,c,!1),a.cloneCssStyles(i.firstChild,d),n.bindFunctions();break;case"dotGraph":d=u.getClasses(l,!0),u.draw(l,c,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":o.draw(l,c),a.cloneCssStyles(i.firstChild,[])}}}};r.tester=function(){},r.version=function(){return e("../package.json").version};var l=function(e,t){return"undefined"==typeof t?!1:e===t};"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof mermaid_config?l(!0,mermaid_config.startOnLoad)&&c():c()},!1),t.mermaid={init:function(){c()},version:function(){return r.version()},getParser:function(){return i.parser}}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":102,"./diagrams/flowchart/flowRenderer":103,"./diagrams/flowchart/graphDb":104,"./diagrams/flowchart/parser/flow":106,"./diagrams/sequenceDiagram/sequenceRenderer":109,"./utils":112,he:100}],112:[function(e,t){t.exports.detectType=function(e){return e.match(/^\s*sequenceDiagram/)?"sequenceDiagram":e.match(/^\s*sequence/)?"sequence":e.match(/^\s*digraph/)?(console.log("Detected flow syntax"),"dotGraph"):"graph"},t.exports.cloneCssStyles=function(e,t){for(var r="",n=document.styleSheets,i=0;i0&&(r+=o.selectorText+" { "+o.style.cssText+" }\n")}}}var c="",l="";for(var h in t)t.hasOwnProperty(h)&&"undefined"!=typeof h&&("default"===h?c=".node { "+t[h].styles.join("; ")+"; }\n":l+="."+h+" { "+t[h].styles.join("; ")+"; }\n");if(""!==r||""!==c||""!==l){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",e.insertBefore(d,e.firstChild)}}},{}]},{},[111]); \ No newline at end of file diff --git a/dist/mermaid.slim.js b/dist/mermaid.slim.js index 9cb6b7538..5c084718d 100644 --- a/dist/mermaid.slim.js +++ b/dist/mermaid.slim.js @@ -16281,6 +16281,9 @@ module.exports.draw = function (text, id) { exports.bounds.init(); var diagram = d3.select('#'+id); + var startx; + var stopx; + // Fetch data from the parsing var actors = sq.yy.getActors(); var actorKeys = sq.yy.getActorKeys(); @@ -16360,9 +16363,6 @@ module.exports.draw = function (text, id) { drawMessage(diagram, startx, stopx, exports.bounds.getVerticalPos(), msg); } - - var startx; - var stopx; }); var box = exports.bounds.getBounds(); @@ -16429,7 +16429,7 @@ exports.drawLabel = function(elem , txtObject){ rectData.class = 'labelBox'; //rectData.color = 'white'; - var label = exports.drawRect(elem, rectData); + exports.drawRect(elem, rectData); txtObject.y = txtObject.y + txtObject.labelMargin; txtObject.x = txtObject.x + 0.5*txtObject.labelMargin; @@ -16457,16 +16457,16 @@ exports.drawActor = function(elem, left,description,conf){ .attr("stroke-width", '0.5px') .attr("stroke", '#999'); - g.append("rect") - .attr("x", left) - .attr("y", 0) - .attr("fill", '#eaeaea') - .attr("stroke", '#666') - .attr("width", conf.width) - .attr("height", conf.height) - .attr("class", 'actor') - .attr("rx", 3) - .attr("ry", 3); + var rect = exports.getNoteRect(); + rect.x = left; + rect.fill = '#eaeaea'; + rect.width = conf.width; + rect.height = conf.height; + rect.class = 'actor'; + rect.rx = 3; + rect.ry = 3; + exports.drawRect(g, rect); + g.append("text") // text label for the x axis .attr("x", center) .attr("y", (conf.height/2)+5) @@ -16481,7 +16481,7 @@ exports.drawActor = function(elem, left,description,conf){ exports.insertArrowHead = function(elem){ elem.append("defs").append("marker") .attr("id", "arrowhead") - .attr("refX", 5) /*must be smarter way to calculate shift*/ + .attr("refX", 5) .attr("refY", 2) .attr("markerWidth", 6) .attr("markerHeight", 4) @@ -16495,11 +16495,11 @@ exports.insertArrowHead = function(elem){ exports.insertArrowCrossHead = function(elem){ elem.append("defs").append("marker") .attr("id", "crosshead") - .attr("refX", 15) /*must be smarter way to calculate shift*/ - .attr("refY", 4) .attr("markerWidth", 8) .attr("markerHeight", 8) .attr("orient", "auto") + .attr("refX", 15) + .attr("refY", 4) .append("path") .attr("fill",'none') .attr("stroke",'#000000') diff --git a/dist/mermaid.slim.min.js b/dist/mermaid.slim.min.js index 0282f34d4..5fc8bf4cf 100644 --- a/dist/mermaid.slim.min.js +++ b/dist/mermaid.slim.min.js @@ -4,4 +4,4 @@ return u&&(e=u.v,t=u.w,delete this._edgeLabels[n],delete this._edgeObjs[n],i(thi },D=function(e,t){for(var r=-1,n=e.length;++r=55296&&57343>=e||e>1114111?(t&&B("character reference outside the permissible Unicode range"),"�"):_(b,e)?(t&&B("disallowed character reference"),b[e]):(t&&D(A,e)&&B("disallowed character reference"),e>65535&&(e-=65536,r+=E(e>>>10&1023|55296),e=56320|1023&e),r+=E(e))},F=function(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"},B=function(e){throw Error("Parse error: "+e)},T=function(e,t){t=k(t,T.options);var r=t.strict;r&&g.test(e)&&B("forbidden code point");var n=t.encodeEverything,i=t.useNamedReferences,a=t.allowUnsafeSymbols;return n?(e=e.replace(s,function(e){return i&&_(h,e)?"&"+h[e]+";":F(e)}),i&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),i&&(e=e.replace(l,function(e){return"&"+h[e]+";"}))):i?(a||(e=e.replace(d,function(e){return"&"+h[e]+";"})),e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),e=e.replace(l,function(e){return"&"+h[e]+";"})):a||(e=e.replace(d,F)),e.replace(o,function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=1024*(t-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}).replace(c,F)};T.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};var S=function(e,t){t=k(t,S.options);var r=t.strict;return r&&f.test(e)&&B("malformed character reference"),e.replace(y,function(e,n,i,a,u,o,s,c){var l,h,d,p,f;return n?(l=n,h=i,r&&!h&&B("character reference was not terminated by a semicolon"),C(l,r)):a?(d=a,h=u,r&&!h&&B("character reference was not terminated by a semicolon"),l=parseInt(d,16),C(l,r)):o?(p=o,_(m,p)?m[p]:(r&&B("named character reference was not terminated by a semicolon"),e)):(p=s,f=c,f&&t.isAttributeValue?(r&&"="==f&&B("`&` did not start a character reference"),e):(r&&B("named character reference was not terminated by a semicolon"),v[p]+(f||"")))})};S.options={isAttributeValue:!1,strict:!1};var L=function(e){return e.replace(d,function(e){return p[e]})},N={version:"0.5.0",encode:T,decode:S,escape:L,unescape:S};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return N});else if(i&&!i.nodeType)if(a)a.exports=N;else for(var q in N)_(N,q)&&(i[q]=N[q]);else n.he=N}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],101:[function(e,t,r){(function(e){(function(){function n(e,t,r){for(var n=(r||0)-1,i=e?e.length:0;++n-1?0:-1:e?0:-1}function a(e){var t=this.cache,r=typeof e;if("boolean"==r||null==e)t[e]=!0;else{"number"!=r&&"string"!=r&&(r="object");var n="number"==r?e:A+e,i=t[r]||(t[r]={});"object"==r?(i[n]||(i[n]=[])).push(e):i[n]=!0}}function u(e){return e.charCodeAt(0)}function o(e,t){for(var r=e.criteria,n=t.criteria,i=-1,a=r.length;++io||"undefined"==typeof u)return 1;if(o>u||"undefined"==typeof o)return-1}}return e.index-t.index}function s(e){var t=-1,r=e.length,n=e[0],i=e[r/2|0],u=e[r-1];if(n&&"object"==typeof n&&i&&"object"==typeof i&&u&&"object"==typeof u)return!1;var o=h();o["false"]=o["null"]=o["true"]=o.undefined=!1;var s=h();for(s.array=e,s.cache=o,s.push=a;++ti?0:i);++n=E&&a===n,c=[];if(o){var l=s(t);l?(a=i,t=l):o=!1}for(;++r-1:void 0});return i.pop(),a.pop(),v&&(d(i),d(a)),u}function tt(e,t,r,n,i){(Jn(t)?Kt:si)(t,function(t,a){var u,o,s=t,c=e[a];if(t&&((o=Jn(t))||ci(t))){for(var l=n.length;l--;)if(u=n[l]==t){c=i[l];break}if(!u){var h;r&&(s=r(c,t),(h="undefined"!=typeof s)&&(c=s)),h||(c=o?Jn(c)?c:[]:ci(c)?c:{}),n.push(t),i.push(c),h||tt(c,t,r,n,i)}}else r&&(s=r(c,t),"undefined"==typeof s&&(s=t)),"undefined"!=typeof s&&(c=s);e[a]=c})}function nt(e,t){return e+Sn(Wn()*(t-e+1))}function it(e,t,r){var a=-1,u=st(),o=e?e.length:0,c=[],h=!t&&o>=E&&u===n,f=r||h?l():c;if(h){var g=s(f);u=i,f=g}for(;++a3&&"function"==typeof t[r-2])var n=x(t[--r-1],t[r--],2);else r>2&&"function"==typeof t[r-1]&&(n=t[--r]);for(var i=f(arguments,1,r),a=-1,u=l(),o=l();++ar?Hn(0,a+r):r)||0,Jn(e)?u=i(e,t,r)>-1:"number"==typeof a?u=(It(e)?e.indexOf(t,r):i(e,t,r))>-1:si(e,function(e){return++n>=r?!(u=e===t):void 0}),u}function Yt(e,r,n){var i=!0;r=t.createCallback(r,n,3);var a=-1,u=e?e.length:0;if("number"==typeof u)for(;++aa&&(a=c)}else r=null==r&&It(e)?u:t.createCallback(r,n,3),Kt(e,function(e,t,n){var u=r(e,t,n);u>i&&(i=u,a=e)});return a}function tr(e,r,n){var i=1/0,a=i;if("function"!=typeof r&&n&&n[r]===e&&(r=null),null==r&&Jn(e))for(var o=-1,s=e.length;++oc&&(a=c)}else r=null==r&&It(e)?u:t.createCallback(r,n,3),Kt(e,function(e,t,n){var u=r(e,t,n);i>u&&(i=u,a=e)});return a}function rr(e,r,n,i){if(!e)return n;var a=arguments.length<3;r=t.createCallback(r,i,4);var u=-1,o=e.length;if("number"==typeof o)for(a&&(n=e[++u]);++ur?Hn(0,i+r):r||0}else if(r){var a=kr(e,t);return e[a]===t?a:-1}return n(e,t,r)}function vr(e,r,n){var i=0,a=e?e.length:0;if("number"!=typeof r&&null!=r){var u=a;for(r=t.createCallback(r,n,3);u--&&r(e[u],u,e);)i++}else i=null==r||n?1:r||i;return f(e,0,Yn(Hn(0,a-i),a))}function br(){for(var e=[],t=-1,r=arguments.length,a=l(),u=st(),o=u===n,c=l();++t=E&&s(t?e[t]:c)))}var f=e[0],g=-1,y=f?f.length:0,m=[];e:for(;++gr?Hn(0,n+r):Yn(r,n-1))+1);n--;)if(e[n]===t)return n;return-1}function xr(e){for(var t=arguments,r=0,n=t.length,i=e?e.length:0;++ra;){var o=a+u>>>1;n(e[o])1?arguments:arguments[0],t=-1,r=e?er(pi(e,"length")):0,n=fn(0>r?0:r);++t2?ut(e,17,f(arguments,2),null,t):ut(e,1,null,null,t)}function Ir(e){for(var t=arguments.length>1?Q(arguments,!0,!1,1):At(e),r=-1,n=t.length;++r2?ut(t,19,f(arguments,2),null,e):ut(t,3,null,null,e)}function Rr(){for(var e=arguments,t=e.length;t--;)if(!Bt(e[t]))throw new wn;return function(){for(var t=arguments,r=e.length;r--;)t=[e[r].apply(this,t)];return t[0]}}function Pr(e,t){return t="number"==typeof t?t:+t||e.length,ut(e,4,null,null,null,t)}function Mr(e,t,r){var n,i,a,u,o,s,c,l=0,h=!1,d=!0;if(!Bt(e))throw new wn;if(t=Hn(0,t)||0,r===!0){var p=!0;d=!1}else Tt(r)&&(p=r.leading,h="maxWait"in r&&(Hn(t,r.maxWait)||0),d="trailing"in r?r.trailing:d);var f=function(){var r=t-(gi()-u);if(0>=r){i&&Tn(i);var h=c;i=s=c=y,h&&(l=gi(),a=e.apply(o,n),s||i||(n=o=null))}else s=On(f,r)},g=function(){s&&Tn(s),i=s=c=y,(d||h!==t)&&(l=gi(),a=e.apply(o,n),s||i||(n=o=null))};return function(){if(n=arguments,u=gi(),o=this,c=d&&(s||!p),h===!1)var r=p&&!s;else{i||p||(l=u);var y=h-(u-l),m=0>=y;m?(i&&(i=Tn(i)),l=u,a=e.apply(o,n)):i||(i=On(g,y))}return m&&s?s=Tn(s):s||t===h||(s=On(f,t)),r&&(m=!0,a=e.apply(o,n)),!m||s||i||(n=o=null),a}}function jr(e){if(!Bt(e))throw new wn;var t=f(arguments,1);return On(function(){e.apply(y,t)},1)}function Vr(e,t){if(!Bt(e))throw new wn;var r=f(arguments,2);return On(function(){e.apply(y,r)},t)}function Ur(e,t){if(!Bt(e))throw new wn;var r=function(){var n=r.cache,i=t?t.apply(this,arguments):A+arguments[0];return qn.call(n,i)?n[i]:n[i]=e.apply(this,arguments)};return r.cache={},r}function Gr(e){var t,r;if(!Bt(e))throw new wn;return function(){return t?r:(t=!0,r=e.apply(this,arguments),e=null,r)}}function $r(e){return ut(e,16,f(arguments,1))}function Hr(e){return ut(e,32,null,f(arguments,1))}function Yr(e,t,r){var n=!0,i=!0;if(!Bt(e))throw new wn;return r===!1?n=!1:Tt(r)&&(n="leading"in r?r.leading:n,i="trailing"in r?r.trailing:i),z.leading=n,z.maxWait=t,z.trailing=i,Mr(e,t,z)}function zr(e,t){return ut(t,16,[e])}function Wr(e){return function(){return e}}function Zr(e,t,r){var n=typeof e;if(null==e||"function"==n)return x(e,t,r);if("object"!=n)return tn(e);var i=ei(e),a=i[0],u=e[a];return 1!=i.length||u!==u||Tt(u)?function(t){for(var r=i.length,n=!1;r--&&(n=et(t[i[r]],e[i[r]],null,!0)););return n}:function(e){var t=e[a];return u===t&&(0!==u||1/u==1/t)}}function Kr(e){return null==e?"":xn(e).replace(ii,ot)}function Xr(e){return e}function Jr(e,n,i){var a=!0,u=n&&At(n);n&&(i||u.length)||(null==i&&(i=n),o=r,n=e,e=t,u=At(n)),i===!1?a=!1:Tt(i)&&"chain"in i&&(a=i.chain);var o=e,s=Bt(o);Kt(u,function(t){var r=e[t]=n[t];s&&(o.prototype[t]=function(){var t=this.__chain__,n=this.__wrapped__,i=[n];In.apply(i,arguments);var u=r.apply(e,i);if(a||t){if(n===u&&Tt(u))return this;u=new o(u),u.__chain__=t}return u})})}function Qr(){return e._=kn,this}function en(){}function tn(e){return function(t){return t[e]}}function rn(e,t,r){var n=null==e,i=null==t;if(null==r&&("boolean"==typeof e&&i?(r=e,e=1):i||"boolean"!=typeof t||(r=t,i=!0)),n&&i&&(t=1),e=+e||0,i?(t=e,e=0):t=+t||0,r||e%1||t%1){var a=Wn();return Yn(e+a*(t-e+parseFloat("1e-"+((a+"").length-1))),t)}return nt(e,t)}function nn(e,t){if(e){var r=e[t];return Bt(r)?e[t]():r}}function an(e,r,n){var i=t.templateSettings;e=xn(e||""),n=ui({},n,i);var a,u=ui({},n.imports,i.imports),o=ei(u),s=Gt(u),l=0,h=n.interpolate||L,d="__p += '",p=En((n.escape||L).source+"|"+h.source+"|"+(h===T?C:L).source+"|"+(n.evaluate||L).source+"|$","g");e.replace(p,function(t,r,n,i,u,o){return n||(n=i),d+=e.slice(l,o).replace(q,c),r&&(d+="' +\n__e("+r+") +\n'"),u&&(a=!0,d+="';\n"+u+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=o+t.length,t}),d+="';\n";var f=n.variable,g=f;g||(f="obj",d="with ("+f+") {\n"+d+"\n}\n"),d=(a?d.replace(_,""):d).replace(D,"$1").replace(k,"$1;"),d="function("+f+") {\n"+(g?"":f+" || ("+f+" = {});\n")+"var __t, __p = '', __e = _.escape"+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m="\n/*\n//# sourceURL="+(n.sourceURL||"/lodash/template/source["+O++ +"]")+"\n*/";try{var v=mn(o,"return "+d+m).apply(y,s)}catch(b){throw b.source=d,b}return r?v(r):(v.source=d,v)}function un(e,t,r){e=(e=+e)>-1?e:0;var n=-1,i=fn(e);for(t=x(t,r,1);++n/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:t}},jn||(v=function(){function t(){}return function(r){if(Tt(r)){t.prototype=r;var n=new t;t.prototype=null}return n||e.Object()}}());var Xn=Mn?function(e,t){W.value=t,Mn(e,"__bindData__",W)}:en,Jn=Vn||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Cn.call(e)==P||!1},Qn=function(e){var t,r=e,n=[];if(!r)return n;if(!Z[typeof e])return n;for(t in r)qn.call(r,t)&&n.push(t);return n},ei=$n?function(e){return Tt(e)?$n(e):[]}:Qn,ti={"&":"&","<":"<",">":">",'"':""","'":"'"},ri=xt(ti),ni=En("("+ei(ri).join("|")+")","g"),ii=En("["+ei(ti).join("")+"]","g"),ai=function(e,t,r){var n,i=e,a=i;if(!i)return a;var u=arguments,o=0,s="number"==typeof r?2:u.length;if(s>3&&"function"==typeof u[s-2])var c=x(u[--s-1],u[s--],2);else s>2&&"function"==typeof u[s-1]&&(c=u[--s]);for(;++o/g,S=RegExp("^["+w+"]*0+(?=.$)"),L=/($^)/,N=/\bthis\b/,q=/['\n\r\t\u2028\u2029\\]/g,I=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],O=0,R="[object Arguments]",P="[object Array]",M="[object Boolean]",j="[object Date]",V="[object Function]",U="[object Number]",G="[object Object]",$="[object RegExp]",H="[object String]",Y={};Y[V]=!1,Y[R]=Y[P]=Y[M]=Y[j]=Y[U]=Y[G]=Y[$]=Y[H]=!0;var z={leading:!1,maxWait:0,trailing:!1},W={configurable:!1,enumerable:!1,value:null,writable:!1},Z={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},K={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},X=Z[typeof window]&&window||this,J=Z[typeof r]&&r&&!r.nodeType&&r,Q=Z[typeof t]&&t&&!t.nodeType&&t,et=Q&&Q.exports===J&&J,tt=Z[typeof e]&&e;!tt||tt.global!==tt&&tt.window!==tt||(X=tt);var rt=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(X._=rt,define(function(){return rt})):J&&Q?et?(Q.exports=rt)._=rt:J._=rt:X._=rt}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],102:[function(e,t){t.exports={name:"mermaid",version:"0.3.0",description:"Markdownish syntax for generating flowcharts",main:"src/main.js",bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"",license:"MIT",dependencies:{chalk:"^0.5.1","dagre-d3":"~0.3.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",semver:"^4.1.1",which:"^1.0.8"},devDependencies:{async:"^0.9.0",browserify:"~6.2.0",clone:"^0.2.0","codeclimate-test-reporter":"0.0.4",d3:"~3.4.13","dagre-d3":"~0.3.2","event-stream":"^3.2.0",foundation:"^4.2.1-1","front-matter":"^0.2.0",gulp:"~3.8.9","gulp-browserify":"^0.5.0","gulp-bump":"^0.1.11","gulp-concat":"~2.4.1","gulp-data":"^1.1.1","gulp-ext-replace":"~0.1.0","gulp-hogan":"^1.1.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^1.3.6","gulp-rename":"~1.2.0","gulp-shell":"^0.2.10","gulp-tag-version":"^1.2.1","gulp-uglify":"~1.0.1",he:"^0.5.0","hogan.js":"^3.0.2",jasmine:"~2.0.1",jison:"~0.4.15","jshint-stylish":"^1.0.0",karma:"~0.12.20","karma-chrome-launcher":"~0.1.5","karma-jasmine":"~0.2.1","karma-requirejs":"~0.2.2",lodash:"^2.4.1","lodash._escapestringchar":"^2.4.1","lodash._objecttypes":"^2.4.1","lodash._reinterpolate":"^2.4.1","lodash._reunescapedhtml":"^2.4.1","lodash.defaults":"^2.4.1","lodash.templatesettings":"^2.4.1","lodash.values":"^2.4.1",marked:"^0.3.2","mock-browser":"^0.90.27",path:"^0.4.9",phantomjs:"^1.9.12",rewire:"^2.1.3",rimraf:"^2.2.8","semantic-ui":"^1.4.1",tape:"^3.0.3"}} },{}],103:[function(e,t,r){var n=e("./graphDb"),i=e("./parser/flow"),a=e("./parser/dot"),u=e("dagre-d3");r.addVertices=function(e,t){var r=Object.keys(e),n=function(e,t){var r;for(r=0;r0&&(u=a.classes.join(" "));var o="";o=n(o,a.styles),i="undefined"==typeof a.text?a.id:a.text;var s=0,c="";switch(a.type){case"round":s=5,c="rect";break;case"square":c="rect";break;case"diamond":c="question";break;case"odd":c="rect_left_inv_arrow";break;case"circle":c="circle";break;default:c="rect"}t.setNode(a.id,{labelType:"html",shape:c,label:i,rx:s,ry:s,"class":u,style:o,id:a.id})})},r.addEdges=function(e,t){var r,n=0;e.forEach(function(e){n++,r="arrow_open"===e.type?"none":"normal";var i="";"undefined"!=typeof e.style&&e.style.forEach(function(e){i=i+e+";"}),"undefined"==typeof e.text?"undefined"==typeof e.style?t.setEdge(e.start,e.end,{style:"stroke: #333; stroke-width: 1.5px;fill:none",arrowheadStyle:"fill: #333",arrowhead:r},n):t.setEdge(e.start,e.end,{style:i,arrowheadStyle:"fill: #333",arrowhead:r},n):"undefined"==typeof e.style?t.setEdge(e.start,e.end,{labelType:"html",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:''+e.text+"",arrowheadStyle:"fill: #333",arrowhead:r},n):t.setEdge(e.start,e.end,{labelType:"html",style:i,arrowheadStyle:"fill: #333",label:e.text,arrowhead:r},n)})},r.getClasses=function(e,t){var r;n.clear(),r=t?a.parser:i.parser,r.yy=n,r.parse(e);var u=n.getClasses();return"undefined"==typeof u.default&&(u.default={id:"default"},u.default.styles=["fill:#eaeaea","stroke:#666","stroke-width:1.5px"]),u},r.draw=function(e,t,o){var s;n.clear(),s=o?a.parser:i.parser,s.yy=n,s.parse(e);var c;c=n.getDirection(),"undefined"==typeof c&&(c="TD");var l=new u.graphlib.Graph({multigraph:!0}).setGraph({rankdir:c,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),h=n.getVertices(),d=n.getEdges();r.addVertices(h,l),r.addEdges(d,l);var p=new u.render;p.shapes().question=function(e,t,r){var n=t.width,i=t.height,a=.8*(n+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=e.insert("polygon",":first-child").attr("points",o.map(function(e){return e.x+","+e.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return r.intersect=function(e){return u.intersect.polygon(r,o,e)},s},p.shapes().rect_left_inv_arrow=function(e,t,r){var n=t.width,i=t.height,a=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=e.insert("polygon",":first-child").attr("points",a.map(function(e){return e.x+","+e.y}).join(" ")).attr("transform","translate("+-n/2+","+2*i/4+")");return r.intersect=function(e){return u.intersect.polygon(r,a,e)},o},p.arrows().none=function(e,t,r,n){var i=e.append("marker").attr("id",t).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,r[n+"Style"])};var f=d3.select("#"+t);svgGroup=d3.select("#"+t+" g"),p(d3.select("#"+t+" g"),l);var g=document.querySelector("#mermaidChart0");f.attr("height",l.graph().height),f.attr("width",l.graph().width),f.attr("viewBox",g.getBBox().x+" 0 "+l.graph().width+" "+l.graph().height)}},{"./graphDb":104,"./parser/dot":105,"./parser/flow":106,"dagre-d3":1}],104:[function(require,module,exports){var vertices={},edges=[],classes=[],direction,funs=[];exports.addVertex=function(e,t,r,n){"undefined"!=typeof e&&0!==e.trim().length&&("undefined"==typeof vertices[e]&&(vertices[e]={id:e,styles:[],classes:[]}),"undefined"!=typeof t&&(vertices[e].text=t),"undefined"!=typeof r&&(vertices[e].type=r),"undefined"!=typeof r&&(vertices[e].type=r),"undefined"!=typeof n&&null!==n&&n.forEach(function(t){vertices[e].styles.push(t)}))},exports.addLink=function(e,t,r,n){var i={start:e,end:t,type:void 0,text:""};n=r.text,"undefined"!=typeof n&&(i.text=n),"undefined"!=typeof r&&(i.type=r.type),edges.push(i)},exports.updateLink=function(e,t){e.substr(1);edges[e].style=t},exports.addClass=function(e,t){"undefined"==typeof classes[e]&&(classes[e]={id:e,styles:[]}),"undefined"!=typeof t&&null!==t&&t.forEach(function(t){classes[e].styles.push(t)})},exports.setDirection=function(e){direction=e},exports.setClass=function(e,t){e.indexOf(",")>0?e.split(",").forEach(function(e){"undefined"!=typeof vertices[e]&&vertices[e].classes.push(t)}):"undefined"!=typeof vertices[e]&&vertices[e].classes.push(t)},exports.setClickEvent=function(id,functionName){id.indexOf(",")>0?id.split(",").forEach(function(id2){"undefined"!=typeof vertices[id2]&&funs.push(function(){var elem=document.getElementById(id2);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id2+"')")})})}):"undefined"!=typeof vertices[id]&&funs.push(function(){var elem=document.getElementById(id);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id+"')")})})},exports.bindFunctions=function(){funs.forEach(function(e){e()})},exports.getDirection=function(){return direction},exports.getVertices=function(){return vertices},exports.getEdges=function(){return edges},exports.getClasses=function(){return classes},exports.clear=function(){vertices={},classes={},edges=[],funs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}},{}],105:[function(e,t,r){(function(n){var i=function(){function e(){this.yy={}}var t=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},r=[1,5],n=[1,6],i=[1,12],a=[1,13],u=[1,14],o=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],d=[1,20],p=[1,21],f=[1,22],g=[8,16,17,18,19,20,21,22,23,24,25,26],y=[1,37],m=[1,33],v=[1,34],b=[1,35],A=[1,36],E=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],x=[10,28],w=[10,28,37,57,58],_=[2,49],D=[1,45],k=[1,48],C=[1,49],F=[1,52],B=[2,65],T=[1,65],S=[1,66],L=[1,67],N=[1,68],q=[1,69],I=[1,70],O=[1,71],R=[1,72],P=[1,73],M=[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(e,t,r,n,i,a){var u=a.length-1;switch(i){case 1:this.$=a[u-1];break;case 2:this.$=a[u-4];break;case 3:this.$=a[u-5];break;case 4:this.$=a[u-3];break;case 8:case 10:case 11:this.$=a[u];break;case 9:this.$=a[u-1]+""+a[u];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[u];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:n.addLink(a[u-1],a[u].id,a[u].op),this.$="oy";break;case 42:n.addLink(a[u-1],a[u].id,a[u].op),this.$={op:a[u-2],id:a[u-1]};break;case 44:this.$={op:a[u-1],id:a[u]};break;case 48:n.addVertex(a[u-1]),this.$=a[u-1];break;case 49:n.addVertex(a[u]),this.$=a[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:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},{6:23,12:r,13:n},t(g,[2,5]),t(g,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:y,9:25,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},t([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f}),t(E,[2,8]),t(E,[2,10]),t(E,[2,11]),t(E,[2,12]),t(E,[2,13]),t(E,[2,14]),t(E,[2,15]),t(E,[2,16]),t(E,[2,17]),t(E,[2,18]),t(E,[2,19]),t(E,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{10:[1,41]},{10:[2,21],28:[1,42]},t(x,[2,23]),t(x,[2,24]),t(x,[2,25]),t(w,_,{44:44,32:[1,43],45:D}),t(x,[2,27],{41:46,43:47,57:k,58:C}),t(x,[2,47],{43:47,34:50,41:51,37:F,57:k,58:C}),{34:53,37:F},{34:54,37:F},{34:55,37:F},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},t(E,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:y,9:61,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{7:62,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},t(w,[2,48]),t(w,B,{14:10,15:11,7:63,46:64,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,48:T,49:S,50:L,51:N,52:q,53:I,54:O,55:R,56:P}),t(x,[2,41],{34:74,37:F}),{7:77,8:y,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,33:76,42:75,47:A},t(M,[2,66]),t(M,[2,67]),t(x,[2,46]),t(x,[2,40],{34:78,37:F}),{7:81,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,38:79,39:[1,80]},t(x,[2,28]),t(x,[2,29]),t(x,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{5:[2,2]},{10:[2,22]},t(x,[2,26]),t(w,[2,51],{45:[1,86]}),t(w,[2,52]),t(w,[2,56]),t(w,[2,57]),t(w,[2,58]),t(w,[2,59]),t(w,[2,60]),t(w,[2,61]),t(w,[2,62]),t(w,[2,63]),t(w,[2,64]),t(x,[2,38]),t(j,[2,44],{43:47,41:87,57:k,58:C}),t(j,[2,45],{43:47,41:88,57:k,58:C}),t(w,_,{44:44,45:D}),t(x,[2,39]),{39:[1,89]},t(x,[2,34],{34:90,37:F}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:A},{10:[1,93]},t(w,[2,55]),{10:[1,94]},t(w,B,{46:95,48:T,49:S,50:L,51:N,52:q,53:I,54:O,55:R,56:P}),t(j,[2,42]),t(j,[2,43]),t(x,[2,33],{34:96,37:F}),t(x,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f},{10:[1,98]},t(w,[2,54]),{5:[2,3]},t(w,[2,50]),t(x,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},t(w,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,38:101},{7:81,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:d,25:p,26:f,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(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||d,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,n=[0],i=[null],a=[],u=this.table,o="",s=0,c=0,l=0,h=2,d=1,p=a.slice.call(arguments,1),f=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);f.setInput(e,g.yy),g.yy.lexer=f,g.yy.parser=this,"undefined"==typeof f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var v=f.options&&f.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,A,E,x,w,_,D,k,C,F={};;){if(E=n[n.length-1],this.defaultActions[E]?x=this.defaultActions[E]:((null===b||"undefined"==typeof b)&&(b=t()),x=u[E]&&u[E][b]),"undefined"==typeof x||!x.length||!x[0]){var B="";C=[];for(_ in u[E])this.terminals_[_]&&_>h&&C.push("'"+this.terminals_[_]+"'");B=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+b);switch(x[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,A?(b=A,A=null):(c=f.yyleng,o=f.yytext,s=f.yylineno,m=f.yylloc,l>0&&l--);break;case 2:if(D=this.productions_[x[1]][1],F.$=i[i.length-D],F._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},v&&(F._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),w=this.performAction.apply(F,[o,c,s,g.yy,x[1],i,a].concat(p)),"undefined"!=typeof w)return w;D&&(n=n.slice(0,-1*D*2),i=i.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),i.push(F.$),a.push(F._$),k=u[n[n.length-2]][n[n.length-1]],n.push(k);break;case 3:return!0}}return!0}},U=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){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=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(e=this.test_match(r,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[n]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,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:return"DIR";case 11:return"DIR";case 12:return"DIR";case 13:return"DIR";case 14:return"DIR";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 e}();return V.lexer=U,e.prototype=V,V.Parser=e,new e}();"undefined"!=typeof e&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof t&&e.main===t&&r.main(n.argv.slice(1)))}).call(this,e("1YiZ5S"))},{"1YiZ5S":99,fs:97,path:98}],106:[function(e,t,r){(function(n){var i=function(){function e(){this.yy={}}var t=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},r=[1,7],n=[1,8],i=[1,18],a=[1,19],u=[1,20],o=[1,21],s=[1,22],c=[1,27],l=[1,16],h=[1,29],d=[1,26],p=[1,28],f=[1,34],g=[1,33],y=[1,30],m=[1,31],v=[1,32],b=[1,6],A=[53,54,55,56,57,62,63,65,67,68,70,71,73,74,75],E=[1,46],x=[1,45],w=[1,44],_=[6,16,17],D=[1,56],k=[1,57],C=[1,58],F=[1,59],B=[6,16,17,43,44,45,46,47],T=[6,9,12,13,16,17,31,34,36,43,44,45,46,47],S=[6,9,12,13,16,17,31,34,36,43,44,45,46,47,62,65,67,68,70,71,73,74,75],L=[6,8,9,10,12,13,16,17,31,33,34,35,36,37,40,43,44,45,46,47,48,53,54,55,56,57,62,65,67,68,70,71,73,74,75,76,77,78],N=[1,6,9,17,53,54,55,56,57,62,63,65,67,68,70,71,73,74,75],q=[1,111],I=[1,103],O=[1,112],R=[1,86],P=[1,85],M=[1,101],j=[1,90],V=[1,91],U=[1,88],G=[1,89],$=[1,92],H=[1,93],Y=[1,104],z=[1,97],W=[1,98],Z=[1,96],K=[1,99],X=[1,87],J=[1,106],Q=[1,107],et=[1,108],tt=[1,109],rt=[1,110],nt=[1,94],it=[1,95],at=[1,100],ut=[62,65,67,68,70,71,73,74,75],ot=[9,48,62,65,67,68,70,71,73,74,75],st=[1,136],ct=[1,133],lt=[1,134],ht=[8,9,10,12,13,16,17,31,33,34,35,36,37,40,44,45,46,47,48,53,54,55,56,57,62,65,67,68,70,71,73,74,75,76,77,78],dt=[2,99],pt=[2,101],ft=[8,9,10,12,13,33,35,37,40,48,53,54,55,56,57,62,65,67,68,70,71,73,74,75],gt=[9,17,53,54,55,56,57,62,63,65,67,68,70,71,73,74,75],yt=[1,170],mt=[1,167],vt=[1,171],bt=[1,168],At=[1,165],Et=[1,166],xt=[1,169],wt=[1,172],_t=[1,173],Dt=[8,9,10,12,13,40,53,54,55,56,57,62,65,67,68,70,71,73,74,75],kt=[2,44],Ct=[1,185],Ft=[6,16,17,65],Bt=[6,9,16,17,40,61,62,65,67,68,69,70,71],Tt={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graphConfig:4,statements:5,EOF:6,spaceListNewline:7,GRAPH:8,SPACE:9,DIR:10,FirstStmtSeperator:11,TAGEND:12,TAGSTART:13,UP:14,DOWN:15,SEMI:16,NEWLINE:17,spaceList:18,statement:19,commentStatement:20,verticeStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,vertex:28,link:29,alphaNum:30,SQS:31,text:32,SQE:33,PS:34,PE:35,DIAMOND_START:36,DIAMOND_STOP:37,alphaNumStatement:38,alphaNumToken:39,MINUS:40,linkStatement:41,arrowText:42,"--":43,ARROW_POINT:44,ARROW_CIRCLE:45,ARROW_CROSS:46,ARROW_OPEN:47,PIPE:48,textToken:49,commentText:50,commentToken:51,keywords:52,STYLE:53,LINKSTYLE:54,CLASSDEF:55,CLASS:56,CLICK:57,textNoTags:58,textNoTagsToken:59,stylesOpt:60,HEX:61,NUM:62,PCT:63,style:64,COMMA:65,styleComponent:66,ALPHA:67,COLON:68,UNIT:69,BRKT:70,DOT:71,graphCodeTokens:72,PLUS:73,EQUALS:74,MULT:75,TAG_START:76,TAG_END:77,QUOTE:78,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",8:"GRAPH",9:"SPACE",10:"DIR",12:"TAGEND",13:"TAGSTART",14:"UP",15:"DOWN",16:"SEMI",17:"NEWLINE",31:"SQS",33:"SQE",34:"PS",35:"PE",36:"DIAMOND_START",37:"DIAMOND_STOP",40:"MINUS",43:"--",44:"ARROW_POINT",45:"ARROW_CIRCLE",46:"ARROW_CROSS",47:"ARROW_OPEN",48:"PIPE",53:"STYLE",54:"LINKSTYLE",55:"CLASSDEF",56:"CLASS",57:"CLICK",61:"HEX",62:"NUM",63:"PCT",65:"COMMA",67:"ALPHA",68:"COLON",69:"UNIT",70:"BRKT",71:"DOT",73:"PLUS",74:"EQUALS",75:"MULT",76:"TAG_START",77:"TAG_END",78:"QUOTE"},productions_:[0,[3,3],[3,2],[3,4],[3,3],[4,4],[4,4],[4,4],[4,4],[4,4],[11,1],[11,1],[11,2],[5,3],[5,2],[5,1],[7,2],[7,2],[7,1],[7,1],[18,2],[18,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[22,1],[22,1],[22,1],[21,3],[21,1],[28,4],[28,5],[28,6],[28,7],[28,4],[28,5],[28,4],[28,5],[28,4],[28,5],[28,4],[28,1],[28,2],[30,1],[30,2],[38,1],[38,3],[29,2],[29,3],[29,1],[29,2],[29,5],[29,6],[41,1],[41,1],[41,1],[41,1],[42,3],[32,1],[32,2],[50,1],[50,2],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[58,1],[58,2],[25,5],[26,5],[27,5],[23,5],[23,5],[24,5],[20,3],[60,1],[60,3],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[51,1],[51,1],[49,1],[49,1],[49,1],[59,1],[59,1],[59,1],[59,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1]],performAction:function(e,t,r,n,i,a){var u=a.length-1;switch(i){case 3:this.$=a[u-3];break;case 4:this.$=a[u-2];break;case 5:n.setDirection(a[u-1]),this.$=a[u-1];break;case 6:n.setDirection("LR"),this.$=a[u-1];break;case 7:n.setDirection("RL"),this.$=a[u-1];break;case 8:n.setDirection("BT"),this.$=a[u-1];break;case 9:n.setDirection("TB"),this.$=a[u-1];break;case 32:n.addLink(a[u-2],a[u],a[u-1]),this.$="oy";break;case 33:this.$="yo";break;case 34:this.$=a[u-3],n.addVertex(a[u-3],a[u-1],"square");break;case 35:this.$=a[u-4],n.addVertex(a[u-4],a[u-2],"square");break;case 36:this.$=a[u-5],n.addVertex(a[u-5],a[u-2],"circle");break;case 37:this.$=a[u-6],n.addVertex(a[u-6],a[u-3],"circle");break;case 38:this.$=a[u-3],n.addVertex(a[u-3],a[u-1],"round");break;case 39:this.$=a[u-4],n.addVertex(a[u-4],a[u-2],"round");break;case 40:case 44:this.$=a[u-3],n.addVertex(a[u-3],a[u-1],"diamond");break;case 41:this.$=a[u-4],n.addVertex(a[u-4],a[u-2],"diamond");break;case 42:this.$=a[u-3],n.addVertex(a[u-3],a[u-1],"odd");break;case 43:this.$=a[u-4],n.addVertex(a[u-4],a[u-2],"odd");break;case 45:this.$=a[u],n.addVertex(a[u]);break;case 46:this.$=a[u-1],n.addVertex(a[u-1]);break;case 47:case 49:case 62:case 64:case 73:this.$=a[u];break;case 48:case 63:case 65:case 74:this.$=a[u-1]+""+a[u];break;case 50:this.$=a[u-2]+"-"+a[u];break;case 51:a[u-1].text=a[u],this.$=a[u-1];break;case 52:a[u-2].text=a[u-1],this.$=a[u-2];break;case 53:this.$=a[u];break;case 54:case 61:this.$=a[u-1];break;case 55:a[u].text=a[u-2],this.$=a[u];break;case 56:a[u-1].text=a[u-3],this.$=a[u-1];break;case 57:this.$={type:"arrow"};break;case 58:this.$={type:"arrow_circle"};break;case 59:this.$={type:"arrow_cross"};break;case 60:this.$={type:"arrow_open"};break;case 75:this.$=a[u-4],n.addClass(a[u-2],a[u]);break;case 76:this.$=a[u-4],n.setClass(a[u-2],a[u]);break;case 77:this.$=a[u-4],n.setClickEvent(a[u-2],a[u]);break;case 78:this.$=a[u-4],n.addVertex(a[u-2],void 0,void 0,a[u]);break;case 79:case 80:this.$=a[u-4],n.updateLink(a[u-2],a[u]);break;case 82:this.$=[a[u]];break;case 83:a[u-2].push(a[u]),this.$=a[u-2];break;case 85:this.$=a[u-1]+a[u]}},table:[{3:1,4:2,8:[1,3]},{1:[3]},{5:4,7:5,9:r,17:n,19:6,20:9,21:10,23:11,24:12,25:13,26:14,27:15,28:17,30:23,38:24,39:25,53:i,54:a,55:u,56:o,57:s,62:c,63:l,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{9:[1,35]},{1:[2,2],6:[1,36]},{5:37,19:6,20:9,21:10,23:11,24:12,25:13,26:14,27:15,28:17,30:23,38:24,39:25,53:i,54:a,55:u,56:o,57:s,62:c,63:l,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(b,[2,15],{19:6,20:9,21:10,23:11,24:12,25:13,26:14,27:15,28:17,30:23,38:24,39:25,7:38,5:39,9:r,17:n,53:i,54:a,55:u,56:o,57:s,62:c,63:l,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v}),t(A,[2,19],{7:40,9:r,17:n}),t(A,[2,18],{7:41,9:r,17:n}),{17:[1,42]},{6:E,16:x,17:w,22:43},{6:E,16:x,17:w,22:47},{6:E,16:x,17:w,22:48},{6:E,16:x,17:w,22:49},{6:E,16:x,17:w,22:50},{6:E,16:x,17:w,22:51},{63:[1,52]},t(_,[2,33],{29:53,41:54,43:[1,55],44:D,45:k,46:C,47:F}),{9:[1,60]},{9:[1,61]},{9:[1,62]},{9:[1,63]},{9:[1,64]},t(B,[2,45],{9:[1,70],12:[1,68],13:[1,69],31:[1,65],34:[1,66],36:[1,67]}),t(T,[2,47],{38:24,39:25,30:71,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v}),t(S,[2,49],{40:[1,72]}),t(L,[2,104]),t(L,[2,105]),t(L,[2,106]),t(L,[2,107]),t(L,[2,108]),t(L,[2,109]),t(L,[2,110]),t(L,[2,111]),t(L,[2,112]),{10:[1,73],12:[1,74],13:[1,75],14:[1,76],15:[1,77]},{1:[2,1]},{1:[2,4],6:[1,78]},{5:79,19:6,20:9,21:10,23:11,24:12,25:13,26:14,27:15,28:17,30:23,38:24,39:25,53:i,54:a,55:u,56:o,57:s,62:c,63:l,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(b,[2,14]),t(A,[2,16]),t(A,[2,17]),t(N,[2,22]),t(N,[2,23]),t(N,[2,29]),t(N,[2,30]),t(N,[2,31]),t(N,[2,24]),t(N,[2,25]),t(N,[2,26]),t(N,[2,27]),t(N,[2,28]),{8:q,9:I,10:O,12:R,13:P,16:M,31:j,33:V,34:U,35:G,36:$,37:H,39:102,40:Y,44:z,45:W,46:Z,47:K,48:X,49:82,50:80,51:81,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,72:83,73:y,74:m,75:v,76:nt,77:it,78:at},{28:113,30:23,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(ut,[2,53],{42:114,9:[1,115],48:[1,116]}),{9:[1,117]},t(ot,[2,57]),t(ot,[2,58]),t(ot,[2,59]),t(ot,[2,60]),{30:118,38:24,39:25,61:[1,119],62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{62:[1,120]},{30:121,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{30:122,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{30:123,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:124,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:127,34:[1,126],39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:128,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:129,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:130,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(B,[2,46]),t(T,[2,48]),{39:131,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{9:st,11:132,16:ct,17:lt,18:135},{9:st,11:137,16:ct,17:lt,18:135},{9:st,11:138,16:ct,17:lt,18:135},{9:st,11:139,16:ct,17:lt,18:135},{9:st,11:140,16:ct,17:lt,18:135},{1:[2,3]},t(b,[2,13]),{8:q,9:I,10:O,12:R,13:P,16:M,17:[2,81],31:j,33:V,34:U,35:G,36:$,37:H,39:102,40:Y,44:z,45:W,46:Z,47:K,48:X,49:82,51:141,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,72:83,73:y,74:m,75:v,76:nt,77:it,78:at},t(ht,[2,64]),t(ht,[2,95]),t(ht,[2,96]),t(ht,[2,97]),t(ht,[2,98]),t(ht,dt),t(ht,[2,113]),t(ht,[2,114]),t(ht,[2,115]),t(ht,[2,116]),t(ht,[2,117]),t(ht,[2,118]),t(ht,[2,119]),t(ht,[2,120]),t(ht,[2,121]),t(ht,[2,122]),t(ht,[2,123]),t(ht,[2,124]),t(ht,[2,125]),t(ht,[2,126]),t(ht,[2,127]),t(ht,[2,100]),t(ht,pt),t(ht,[2,102]),t(ht,[2,103]),t(ht,[2,66]),t(ht,[2,67]),t(ht,[2,68]),t(ht,[2,69]),t(ht,[2,70]),t(ht,[2,71]),t(ht,[2,72]),t(_,[2,32]),t(ut,[2,51],{9:[1,142]}),t(ut,[2,54]),{8:q,9:I,10:O,12:R,13:P,32:143,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,32:144,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{9:[1,145]},{9:[1,146]},{9:[1,147]},{9:[1,148]},{9:[1,149]},{9:[1,150]},{8:q,9:I,10:O,12:R,13:P,33:[1,151],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(ft,[2,62]),{8:q,9:I,10:O,12:R,13:P,32:153,39:102,40:Y,49:125,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,35:[1,154],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,37:[1,155],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:R,13:P,33:[1,156],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:I,10:O,12:[1,157],13:P,39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(S,[2,50]),t(gt,[2,5]),t(gt,[2,10]),t(gt,[2,11]),{17:[1,158]},{9:st,17:[2,21],18:159},t(gt,[2,6]),t(gt,[2,7]),t(gt,[2,8]),t(gt,[2,9]),t(ht,[2,65]),t(ut,[2,52]),{8:q,9:I,10:O,12:R,13:P,39:102,40:Y,48:[1,160],49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{8:q,9:[1,161],10:O,12:R,13:P,39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{9:yt,40:mt,60:162,61:vt,62:bt,64:163,66:164,67:At,68:Et,69:xt,70:wt,71:_t},{9:yt,40:mt,60:174,61:vt,62:bt,64:163,66:164,67:At,68:Et,69:xt,70:wt,71:_t},{9:yt,40:mt,60:175,61:vt,62:bt,64:163,66:164,67:At,68:Et,69:xt,70:wt,71:_t},{9:yt,40:mt,60:176,61:vt,62:bt,64:163,66:164,67:At,68:Et,69:xt,70:wt,71:_t},{30:177,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},{30:178,38:24,39:25,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(B,[2,34],{9:[1,179]}),t(ft,[2,63]),{8:q,9:I,10:O,12:R,13:P,35:[1,180],39:102,40:Y,49:152,52:105,53:J,54:Q,55:et,56:tt,57:rt,59:84,62:c,65:h,67:d,68:p,70:f,71:g,73:y,74:m,75:v},t(B,[2,38],{9:[1,181]}),t(B,[2,40],{9:[1,182]}),t(B,[2,42],{9:[1,183]}),t(Dt,dt,{6:kt,16:kt,17:kt,43:kt,44:kt,45:kt,46:kt,47:kt}),t(gt,[2,12]),{17:[2,20]},t([9,62,65,67,68,70,71,73,74,75],[2,61]),t(Dt,pt,{41:184,44:D,45:k,46:C,47:F}),t(_,[2,78],{65:Ct}),t(Ft,[2,82],{66:186,9:yt,40:mt,61:vt,62:bt,67:At,68:Et,69:xt,70:wt,71:_t}),t(Bt,[2,84]),t(Bt,[2,86]),t(Bt,[2,87]),t(Bt,[2,88]),t(Bt,[2,89]),t(Bt,[2,90]),t(Bt,[2,91]),t(Bt,[2,92]),t(Bt,[2,93]),t(Bt,[2,94]),t(_,[2,79],{65:Ct}),t(_,[2,80],{65:Ct}),t(_,[2,75],{65:Ct}),t(_,[2,76]),t(_,[2,77]),t(B,[2,35]),{35:[1,187]},t(B,[2,39]),t(B,[2,41]),t(B,[2,43]),t(ut,[2,55],{9:[1,188]}),{9:yt,40:mt,61:vt,62:bt,64:189,66:164,67:At,68:Et,69:xt,70:wt,71:_t},t(Bt,[2,85]),t(B,[2,36],{9:[1,190]}),t(ut,[2,56]),t(Ft,[2,83],{66:186,9:yt,40:mt,61:vt,62:bt,67:At,68:Et,69:xt,70:wt,71:_t}),t(B,[2,37])],defaultActions:{36:[2,1],78:[2,3],159:[2,20]},parseError:function(e,t){if(!t.recoverable)throw new Error(e); this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||d,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,n=[0],i=[null],a=[],u=this.table,o="",s=0,c=0,l=0,h=2,d=1,p=a.slice.call(arguments,1),f=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);f.setInput(e,g.yy),g.yy.lexer=f,g.yy.parser=this,"undefined"==typeof f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var v=f.options&&f.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,A,E,x,w,_,D,k,C,F={};;){if(E=n[n.length-1],this.defaultActions[E]?x=this.defaultActions[E]:((null===b||"undefined"==typeof b)&&(b=t()),x=u[E]&&u[E][b]),"undefined"==typeof x||!x.length||!x[0]){var B="";C=[];for(_ in u[E])this.terminals_[_]&&_>h&&C.push("'"+this.terminals_[_]+"'");B=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+b);switch(x[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,A?(b=A,A=null):(c=f.yyleng,o=f.yytext,s=f.yylineno,m=f.yylloc,l>0&&l--);break;case 2:if(D=this.productions_[x[1]][1],F.$=i[i.length-D],F._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},v&&(F._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),w=this.performAction.apply(F,[o,c,s,g.yy,x[1],i,a].concat(p)),"undefined"!=typeof w)return w;D&&(n=n.slice(0,-1*D*2),i=i.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),i.push(F.$),a.push(F._$),k=u[n[n.length-2]][n[n.length-1]],n.push(k);break;case 3:return!0}}return!0}},St=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){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=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(e=this.test_match(r,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[n]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,r,n){switch(r){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:return 57;case 5:return 8;case 6:return 10;case 7:return 10;case 8:return 10;case 9:return 10;case 10:return 10;case 11:return 10;case 12:return 62;case 13:return 70;case 14:return 68;case 15:return 16;case 16:return 65;case 17:return 74;case 18:return 75;case 19:return 71;case 20:return 13;case 21:return 12;case 22:return 14;case 23:return 15;case 24:return 46;case 25:return 44;case 26:return 45;case 27:return 47;case 28:return 43;case 29:return 40;case 30:return 73;case 31:return 63;case 32:return 74;case 33:return 67;case 34:return 48;case 35:return 34;case 36:return 35;case 37:return 31;case 38:return 33;case 39:return 36;case 40:return 37;case 41:return 78;case 42:return 17;case 43:return 9;case 44:return 6}},rules:[/^(?:style\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9])/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:=)/,/^(?:\*)/,/^(?:\.)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:--[x])/,/^(?:-->)/,/^(?:--[o])/,/^(?:---)/,/^(?:--)/,/^(?:-)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u005C\u005F-\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_\/])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n)/,/^(?:\s)/,/^(?:$)/],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,43,44],inclusive:!0}}};return e}();return Tt.lexer=St,e.prototype=Tt,Tt.Parser=e,new e}();"undefined"!=typeof e&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof t&&e.main===t&&r.main(n.argv.slice(1)))}).call(this,e("1YiZ5S"))},{"1YiZ5S":99,fs:97,path:98}],107:[function(e,t,r){(function(n){var i=function(){function e(){this.yy={}}var t=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},r=[6,8,10,11,15,17,19,20,22,33],n=[2,2],i=[1,6],a=[1,8],u=[1,9],o=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],d=[1,18],p=[2,7],f=[6,8,10,11,15,17,18,19,20,21,22,33],g=[6,8,10,11,15,17,18,19,20,22,33],y=[1,46],m=[1,49],v=[1,53],b={trace:function(){},yy:{},symbols_:{error:2,start:3,SD:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,participant:11,actor:12,signal:13,note_statement:14,title:15,text:16,loop:17,end:18,opt:19,alt:20,"else":21,note:22,placement:23,text2:24,over:25,spaceList:26,actor_pair:27,",":28,left_of:29,right_of:30,signaltype:31,actors:32,ACTOR:33,SOLID_OPEN_ARROW:34,DOTTED_OPEN_ARROW:35,SOLID_ARROW:36,DOTTED_ARROW:37,SOLID_CROSS:38,DOTTED_CROSS:39,TXT:40,$accept:0,$end:1},terminals_:{2:"error",4:"SD",6:"EOF",8:"SPACE",10:"NL",11:"participant",15:"title",16:"text",17:"loop",18:"end",19:"opt",20:"alt",21:"else",22:"note",25:"over",28:",",29:"left_of",30:"right_of",33:"ACTOR",34:"SOLID_OPEN_ARROW",35:"DOTTED_OPEN_ARROW",36:"SOLID_ARROW",37:"DOTTED_ARROW",38:"SOLID_CROSS",39:"DOTTED_CROSS",40:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,3],[9,2],[9,2],[9,4],[9,4],[9,4],[9,7],[14,4],[14,5],[26,2],[26,1],[27,1],[27,3],[23,1],[23,1],[13,4],[32,2],[32,1],[12,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,1],[24,1]],performAction:function(e,t,r,n,i,a){var u=a.length-1;switch(i){case 1:return n.apply(a[u-1]),a[u-1];case 2:this.$=[];break;case 3:a[u-1].push(a[u]),this.$=a[u-1];break;case 4:case 5:this.$=a[u];break;case 6:case 7:this.$=[];break;case 8:this.$=a[u-1];break;case 12:a[u-1].unshift({type:"loopStart",loopText:a[u-2].actor,signalType:n.LINETYPE.LOOP_START}),a[u-1].push({type:"loopEnd",loopText:a[u-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[u-1];break;case 13:a[u-1].unshift({type:"optStart",optText:a[u-2].actor,signalType:n.LINETYPE.OPT_START}),a[u-1].push({type:"optEnd",optText:a[u-2].actor,signalType:n.LINETYPE.OPT_END}),this.$=a[u-1];break;case 14:a[u-4].unshift({type:"altStart",altText:a[u-5].actor,signalType:n.LINETYPE.ALT_START}),a[u-4].push({type:"else",altText:a[u-2].actor,signalType:n.LINETYPE.ALT_ELSE}),a[u-4]=a[u-4].concat(a[u-1]),a[u-4].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[u-4];break;case 15:this.$=[a[u-1],{type:"addNote",placement:a[u-2],actor:a[u-1].actor,text:a[u]}];break;case 19:this.$=a[u];break;case 20:this.$=[a[u-2],a[u]];break;case 21:this.$=n.PLACEMENT.LEFTOF;break;case 22:this.$=n.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[u-3],a[u-1],{type:"addMessage",from:a[u-3].actor,to:a[u-1].actor,signalType:a[u-2],msg:a[u]}];break;case 26:this.$={type:"addActor",actor:a[u]};break;case 27:this.$=n.LINETYPE.SOLID_OPEN;break;case 28:this.$=n.LINETYPE.DOTTED_OPEN;break;case 29:this.$=n.LINETYPE.SOLID;break;case 30:this.$=n.LINETYPE.DOTTED;break;case 31:this.$=n.LINETYPE.SOLID_CROSS;break;case 32:this.$=n.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[u].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},t(r,n,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,19:c,20:l,22:h,33:d},t(r,p,{1:[2,1]}),t(f,[2,3]),{9:19,11:u,12:16,13:10,14:11,15:o,17:s,19:c,20:l,22:h,33:d},t(f,[2,5]),t(f,[2,6]),{12:20,33:d},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:d},{12:25,33:d},{12:26,33:d},{31:27,34:[1,28],35:[1,29],36:[1,30],37:[1,31],38:[1,32],39:[1,33]},{23:34,25:[1,35],29:[1,36],30:[1,37]},t([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),t(f,[2,4]),{10:[1,38]},t(f,[2,9]),t(f,[2,10]),{16:[1,39]},t(g,n,{5:40}),t(g,n,{5:41}),t([6,8,10,11,15,17,19,20,21,22,33],n,{5:42}),{12:43,33:d},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:d},{8:y,26:45},{33:[2,21]},{33:[2,22]},t(f,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,18:[1,48],19:c,20:l,22:h,33:d},{6:m,7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,18:[1,50],19:c,20:l,22:h,33:d},{6:m,7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,19:c,20:l,21:[1,51],22:h,33:d},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:d},{8:y,26:57,33:[2,18]},t(f,[2,11]),t(f,[2,12]),t(f,p),t(f,[2,13]),{12:58,33:d},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:d},{28:[1,60],33:[2,19]},{33:[2,17]},t(g,n,{5:61}),{10:[2,16]},{12:62,33:d},{6:m,7:5,8:i,9:7,10:a,11:u,12:16,13:10,14:11,15:o,17:s,18:[1,63],19:c,20:l,22:h,33:d},{33:[2,20]},t(f,[2,14])],defaultActions:{28:[2,27],29:[2,28],30:[2,29],31:[2,30],32:[2,31],33:[2,32],36:[2,21],37:[2,22],52:[2,23],53:[2,33],54:[2,15],57:[2,17],59:[2,16],62:[2,20]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||d,"number"!=typeof e&&(e=r.symbols_[e]||e),e}var r=this,n=[0],i=[null],a=[],u=this.table,o="",s=0,c=0,l=0,h=2,d=1,p=a.slice.call(arguments,1),f=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);f.setInput(e,g.yy),g.yy.lexer=f,g.yy.parser=this,"undefined"==typeof f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var v=f.options&&f.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,A,E,x,w,_,D,k,C,F={};;){if(E=n[n.length-1],this.defaultActions[E]?x=this.defaultActions[E]:((null===b||"undefined"==typeof b)&&(b=t()),x=u[E]&&u[E][b]),"undefined"==typeof x||!x.length||!x[0]){var B="";C=[];for(_ in u[E])this.terminals_[_]&&_>h&&C.push("'"+this.terminals_[_]+"'");B=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+b);switch(x[0]){case 1:n.push(b),i.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,A?(b=A,A=null):(c=f.yyleng,o=f.yytext,s=f.yylineno,m=f.yylloc,l>0&&l--);break;case 2:if(D=this.productions_[x[1]][1],F.$=i[i.length-D],F._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},v&&(F._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),w=this.performAction.apply(F,[o,c,s,g.yy,x[1],i,a].concat(p)),"undefined"!=typeof w)return w;D&&(n=n.slice(0,-1*D*2),i=i.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),i.push(F.$),a.push(F._$),k=u[n[n.length-2]][n[n.length-1]],n.push(k);break;case 3:return!0}}return!0}},A=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){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=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(e=this.test_match(r,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[n]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,t,r,n){switch(r){case 0:return 10;case 1:return 38;case 2:return 39;case 3:return 36;case 4:return 37;case 5:break;case 6:break;case 7:break;case 8:return 11;case 9:return 19;case 10:return 17;case 11:return 20;case 12:return 21;case 13:return 18;case 14:return 29;case 15:return 30;case 16:return 25;case 17:return 22;case 18:return 15;case 19:return 4;case 20:return 28;case 21:return 33;case 22:return 34;case 23:return 35;case 24:return 36;case 25:return 37;case 26:return 40;case 27:return 6;case 28:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:[\-][x])/i,/^(?:[\-][\-][x])/i,/^(?:[\-][>][>])/i,/^(?:[\-][\-][>][>])/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:opt\b)/i,/^(?:loop\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:[^\->:\n,]+)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?::[^#\n]+)/i,/^(?:$)/i,/^(?:.)/i],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],inclusive:!0}}};return e}();return b.lexer=A,e.prototype=b,b.Parser=e,new e}();"undefined"!=typeof e&&"undefined"!=typeof r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),n.exit(1));var i=e("fs").readFileSync(e("path").normalize(t[1]),"utf8");return r.parser.parse(i)},"undefined"!=typeof t&&e.main===t&&r.main(n.argv.slice(1)))}).call(this,e("1YiZ5S"))},{"1YiZ5S":99,fs:97,path:98}],108:[function(e,t,r){var n={},i=[],a=[],u=[];r.addActor=function(e,t,r){n[e]={name:t,description:r},i.push(e)},r.addMessage=function(e,t,r,n){a.push({from:e,to:t,message:r,answer:n})},r.addSignal=function(e,t,r,n){a.push({from:e,to:t,message:r,type:n})},r.getMessages=function(){return a},r.getActors=function(){return n},r.getActor=function(e){return n[e]},r.getActorKeys=function(){return Object.keys(n)},r.clear=function(){n={},a=[]},r.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},r.ARROWTYPE={FILLED:0,OPEN:1},r.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},r.addNote=function(e,t,n){var i={actor:e,placement:t,message:n};u.push(i),a.push({from:e,to:e,message:n,type:r.LINETYPE.NOTE,placement:t})},r.parseError=function(e){console.log("Syntax error:"+e)},r.apply=function(e){if(e instanceof Array)e.forEach(function(e){r.apply(e)});else switch(e.type){case"addActor":r.addActor(e.actor,e.actor,e.actor);break;case"addNote":r.addNote(e.actor,e.placement,e.text);break;case"addMessage":r.addSignal(e.from,e.to,e.msg,e.signalType);break;case"loopStart":r.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":r.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":r.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":r.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":r.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":r.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":r.addSignal(void 0,void 0,void 0,e.signalType)}}},{}],109:[function(e,t,r){var n=e("./parser/sequenceDiagram").parser;n.yy=e("./sequenceDb");var i=e("./svgDraw"),a={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35};r.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,list:[],init:function(){this.list=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(e,t,r,n){e[t]="undefined"==typeof e[t]?r:n(r,e[t])},updateLoops:function(e,t,n,i){var u=this,o=0;this.list.forEach(function(s){o++;var c=u.list.length-o+1;u.updateVal(s,"startx",e-c*a.boxMargin,Math.min),u.updateVal(s,"starty",t-c*a.boxMargin,Math.min),u.updateVal(s,"stopx",n+c*a.boxMargin,Math.max),u.updateVal(s,"stopy",i+c*a.boxMargin,Math.max),u.updateVal(r.bounds.data,"startx",e-c*a.boxMargin,Math.min),u.updateVal(r.bounds.data,"starty",t-c*a.boxMargin,Math.min),u.updateVal(r.bounds.data,"stopx",n+c*a.boxMargin,Math.max),u.updateVal(r.bounds.data,"stopy",i+c*a.boxMargin,Math.max)})},insert:function(e,t,n,i){var a,u,o,s;a=Math.min(e,n),o=Math.max(e,n),u=Math.min(t,i),s=Math.max(t,i),this.updateVal(r.bounds.data,"startx",a,Math.min),this.updateVal(r.bounds.data,"starty",u,Math.min),this.updateVal(r.bounds.data,"stopx",o,Math.max),this.updateVal(r.bounds.data,"stopy",s,Math.max),this.updateLoops(a,u,o,s)},newLoop:function(e){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e})},endLoop:function(){var e=this.list.pop();return e},addElseToLoop:function(e){var t=this.list.pop();t.elsey=r.bounds.getVerticalPos(),t.elseText=e,this.list.push(t)},bumpVerticalPos:function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(e,t,n,u){var o=i.getNoteRect();o.x=t,o.y=n,o.width=a.width,o.class="note";var s=e.append("g"),c=i.drawRect(s,o),l=i.getTextObj();l.x=t,l.y=n+a.noteMargin,l.textMargin=a.noteMargin,l.dy="1em",l.text=u.message,l.class="noteText";var h=i.drawText(s,l),d=h[0][0].getBBox().height;r.bounds.insert(t,n,t+a.width,n+2*a.noteMargin+d),c.attr("height",d+2*a.noteMargin),r.bounds.bumpVerticalPos(d+2*a.noteMargin)};r.drawLoop=function(e,t,r){var n=e.append("g"),u=function(e,t,r,i){n.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};u(t.startx,t.starty,t.stopx,t.starty),u(t.stopx,t.starty,t.stopx,t.stopy),u(t.startx,t.stopy,t.stopx,t.stopy),u(t.startx,t.starty,t.startx,t.stopy),"undefined"!=typeof t.elsey&&u(t.startx,t.elsey,t.stopx,t.elsey);var o=i.getTextObj();o.text=r,o.x=t.startx,o.y=t.starty,o.labelMargin=1.5*a.boxMargin,o.class="labelText",o.fill="white",i.drawLabel(n,o),o=i.getTextObj(),o.text="[ "+t.title+" ]",o.x=t.startx+(t.stopx-t.startx)/2,o.y=t.starty+1.5*a.boxMargin,o.anchor="middle",o.class="loopText",i.drawText(n,o),"undefined"!=typeof t.elseText&&(o.text="[ "+t.elseText+" ]",o.y=t.elsey+1.5*a.boxMargin,i.drawText(n,o))};var o=function(e,t,i,a,u){var o,s=e.append("g"),c=t+(i-t)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(u.message),h=l[0][0].getBBox().width;if(t===i){o=s.append("path").attr("d","M "+t+","+a+" C "+(t+60)+","+(a-10)+" "+(t+60)+","+(a+30)+" "+t+","+(a+20)),r.bounds.bumpVerticalPos(30);var d=Math.max(h/2,100);r.bounds.insert(t-d,r.bounds.getVerticalPos()-10,i+d,r.bounds.getVerticalPos())}else o=s.append("line"),o.attr("x1",t),o.attr("y1",a),o.attr("x2",i),o.attr("y2",a),r.bounds.insert(t,r.bounds.getVerticalPos()-10,i,r.bounds.getVerticalPos()); -u.type===n.yy.LINETYPE.DOTTED||u.type===n.yy.LINETYPE.DOTTED_CROSS||u.type===n.yy.LINETYPE.DOTTED_OPEN?(o.style("stroke-dasharray","3, 3"),o.attr("class","messageLine1")):o.attr("class","messageLine0"),o.attr("stroke-width",2),o.attr("stroke","black"),o.style("fill","none"),(u.type===n.yy.LINETYPE.SOLID||u.type===n.yy.LINETYPE.DOTTED)&&o.attr("marker-end","url(#arrowhead)"),(u.type===n.yy.LINETYPE.SOLID_CROSS||u.type===n.yy.LINETYPE.DOTTED_CROSS)&&o.attr("marker-end","url(#crosshead)")};t.exports.drawActors=function(e,t,n){var u;for(u=0;u/gi).forEach(function(e){var n=r.append("tspan");n.attr("x",t.x+t.textMargin),n.attr("dy",t.dy),n.text(e)}),"undefined"!=typeof t.class&&r.attr("class",t.class),r},r.drawLabel=function(e,t){var n=r.getNoteRect();n.x=t.x,n.y=t.y,n.width=50,n.height=20,n.fill="#526e52",n.stroke="none",n.class="labelBox";r.drawRect(e,n);t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,t.fill="white",r.drawText(e,t)},r.drawActor=function(e,t,r,n){var i=t+n.width/2,a=e.append("g");a.append("line").attr("x1",i).attr("y1",5).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),a.append("rect").attr("x",t).attr("y",0).attr("fill","#eaeaea").attr("stroke","#666").attr("width",n.width).attr("height",n.height).attr("class","actor").attr("rx",3).attr("ry",3),a.append("text").attr("x",i).attr("y",n.height/2+5).attr("class","actor").style("text-anchor","middle").text(r)},r.insertArrowHead=function(e){e.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")},r.insertArrowCrossHead=function(e){e.append("defs").append("marker").attr("id","crosshead").attr("refX",15).attr("refY",4).attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 1,1 L 7,7 M 7,1 L 1,7")},r.getTextObj=function(){var e={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return e},r.getNoteRect=function(){var e={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return e}},{}],111:[function(e,t,r){(function(t){var n=e("./diagrams/flowchart/graphDb"),i=e("./diagrams/flowchart/parser/flow"),a=e("./utils"),u=e("./diagrams/flowchart/flowRenderer"),o=e("./diagrams/sequenceDiagram/sequenceRenderer"),s=e("he"),c=function(){var e,t=document.querySelectorAll(".mermaid"),r=0;for(e=0;e/g,">"),l=l.replace(/';var h=a.detectType(l),d={};switch(h){case"graph":d=u.getClasses(l,!1),u.draw(l,c,!1),a.cloneCssStyles(i.firstChild,d),n.bindFunctions();break;case"dotGraph":d=u.getClasses(l,!0),u.draw(l,c,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":o.draw(l,c),a.cloneCssStyles(i.firstChild,[])}}}};r.tester=function(){},r.version=function(){return e("../package.json").version};var l=function(e,t){return"undefined"==typeof t?!1:e===t};"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof mermaid_config?l(!0,mermaid_config.startOnLoad)&&c():c()},!1),t.mermaid={init:function(){c()},version:function(){return r.version()},getParser:function(){return i.parser}}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":102,"./diagrams/flowchart/flowRenderer":103,"./diagrams/flowchart/graphDb":104,"./diagrams/flowchart/parser/flow":106,"./diagrams/sequenceDiagram/sequenceRenderer":109,"./utils":112,he:100}],112:[function(e,t){t.exports.detectType=function(e){return e.match(/^\s*sequenceDiagram/)?"sequenceDiagram":e.match(/^\s*sequence/)?"sequence":e.match(/^\s*digraph/)?(console.log("Detected flow syntax"),"dotGraph"):"graph"},t.exports.cloneCssStyles=function(e,t){for(var r="",n=document.styleSheets,i=0;i0&&(r+=o.selectorText+" { "+o.style.cssText+" }\n")}}}var c="",l="";for(var h in t)t.hasOwnProperty(h)&&"undefined"!=typeof h&&("default"===h?c=".node { "+t[h].styles.join("; ")+"; }\n":l+="."+h+" { "+t[h].styles.join("; ")+"; }\n");if(""!==r||""!==c||""!==l){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",e.insertBefore(d,e.firstChild)}}},{}]},{},[111]); \ No newline at end of file +u.type===n.yy.LINETYPE.DOTTED||u.type===n.yy.LINETYPE.DOTTED_CROSS||u.type===n.yy.LINETYPE.DOTTED_OPEN?(o.style("stroke-dasharray","3, 3"),o.attr("class","messageLine1")):o.attr("class","messageLine0"),o.attr("stroke-width",2),o.attr("stroke","black"),o.style("fill","none"),(u.type===n.yy.LINETYPE.SOLID||u.type===n.yy.LINETYPE.DOTTED)&&o.attr("marker-end","url(#arrowhead)"),(u.type===n.yy.LINETYPE.SOLID_CROSS||u.type===n.yy.LINETYPE.DOTTED_CROSS)&&o.attr("marker-end","url(#crosshead)")};t.exports.drawActors=function(e,t,n){var u;for(u=0;u/gi).forEach(function(e){var n=r.append("tspan");n.attr("x",t.x+t.textMargin),n.attr("dy",t.dy),n.text(e)}),"undefined"!=typeof t.class&&r.attr("class",t.class),r},r.drawLabel=function(e,t){var n=r.getNoteRect();n.x=t.x,n.y=t.y,n.width=50,n.height=20,n.fill="#526e52",n.stroke="none",n.class="labelBox",r.drawRect(e,n),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,t.fill="white",r.drawText(e,t)},r.drawActor=function(e,t,n,i){var a=t+i.width/2,u=e.append("g");u.append("line").attr("x1",a).attr("y1",5).attr("x2",a).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var o=r.getNoteRect();o.x=t,o.fill="#eaeaea",o.width=i.width,o.height=i.height,o.class="actor",o.rx=3,o.ry=3,r.drawRect(u,o),u.append("text").attr("x",a).attr("y",i.height/2+5).attr("class","actor").style("text-anchor","middle").text(n)},r.insertArrowHead=function(e){e.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")},r.insertArrowCrossHead=function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").attr("refX",15).attr("refY",4).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 1,1 L 7,7 M 7,1 L 1,7")},r.getTextObj=function(){var e={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return e},r.getNoteRect=function(){var e={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return e}},{}],111:[function(e,t,r){(function(t){var n=e("./diagrams/flowchart/graphDb"),i=e("./diagrams/flowchart/parser/flow"),a=e("./utils"),u=e("./diagrams/flowchart/flowRenderer"),o=e("./diagrams/sequenceDiagram/sequenceRenderer"),s=e("he"),c=function(){var e,t=document.querySelectorAll(".mermaid"),r=0;for(e=0;e/g,">"),l=l.replace(/';var h=a.detectType(l),d={};switch(h){case"graph":d=u.getClasses(l,!1),u.draw(l,c,!1),a.cloneCssStyles(i.firstChild,d),n.bindFunctions();break;case"dotGraph":d=u.getClasses(l,!0),u.draw(l,c,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":o.draw(l,c),a.cloneCssStyles(i.firstChild,[])}}}};r.tester=function(){},r.version=function(){return e("../package.json").version};var l=function(e,t){return"undefined"==typeof t?!1:e===t};"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof mermaid_config?l(!0,mermaid_config.startOnLoad)&&c():c()},!1),t.mermaid={init:function(){c()},version:function(){return r.version()},getParser:function(){return i.parser}}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":102,"./diagrams/flowchart/flowRenderer":103,"./diagrams/flowchart/graphDb":104,"./diagrams/flowchart/parser/flow":106,"./diagrams/sequenceDiagram/sequenceRenderer":109,"./utils":112,he:100}],112:[function(e,t){t.exports.detectType=function(e){return e.match(/^\s*sequenceDiagram/)?"sequenceDiagram":e.match(/^\s*sequence/)?"sequence":e.match(/^\s*digraph/)?(console.log("Detected flow syntax"),"dotGraph"):"graph"},t.exports.cloneCssStyles=function(e,t){for(var r="",n=document.styleSheets,i=0;i0&&(r+=o.selectorText+" { "+o.style.cssText+" }\n")}}}var c="",l="";for(var h in t)t.hasOwnProperty(h)&&"undefined"!=typeof h&&("default"===h?c=".node { "+t[h].styles.join("; ")+"; }\n":l+="."+h+" { "+t[h].styles.join("; ")+"; }\n");if(""!==r||""!==c||""!==l){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",e.insertBefore(d,e.firstChild)}}},{}]},{},[111]); \ No newline at end of file diff --git a/src/diagrams/sequenceDiagram/sequenceRenderer.js b/src/diagrams/sequenceDiagram/sequenceRenderer.js index f2a9f1e38..54e09c217 100644 --- a/src/diagrams/sequenceDiagram/sequenceRenderer.js +++ b/src/diagrams/sequenceDiagram/sequenceRenderer.js @@ -147,58 +147,6 @@ var drawNote = function(elem, startx, verticalPos, msg){ exports.bounds.bumpVerticalPos(textHeight+ 2*conf.noteMargin); }; -/** - * Draws an actor in the diagram with the attaced line - * @param center - The center of the the actor - * @param pos The position if the actor in the list of actors - * @param description The text in the box - */ -exports.drawLoop = function(elem,bounds,labelText){ - var g = elem.append("g"); - var drawLoopLine = function(startx,starty,stopx,stopy){ - g.append("line") - .attr("x1", startx) - .attr("y1", starty) - .attr("x2", stopx ) - .attr("y2", stopy ) - .attr("stroke-width", 2) - .attr("stroke", "#526e52") - .attr('class','loopLine'); - }; - drawLoopLine(bounds.startx, bounds.starty, bounds.stopx , bounds.starty); - drawLoopLine(bounds.stopx , bounds.starty, bounds.stopx , bounds.stopy ); - drawLoopLine(bounds.startx, bounds.stopy , bounds.stopx , bounds.stopy ); - drawLoopLine(bounds.startx, bounds.starty, bounds.startx, bounds.stopy ); - if(typeof bounds.elsey !== 'undefined'){ - drawLoopLine(bounds.startx, bounds.elsey, bounds.stopx, bounds.elsey ); - } - - var txt = svgDraw.getTextObj(); - txt.text = labelText; - txt.x = bounds.startx; - txt.y = bounds.starty; - txt.labelMargin = 1.5 * conf.boxMargin; - txt.class = 'labelText'; - txt.fill = 'white'; - - svgDraw.drawLabel(g,txt); - - txt = svgDraw.getTextObj(); - txt.text = '[ ' + bounds.title + ' ]'; - txt.x = bounds.startx + (bounds.stopx - bounds.startx)/2; - txt.y = bounds.starty + 1.5 * conf.boxMargin; - txt.anchor = 'middle'; - txt.class = 'loopText'; - - svgDraw.drawText(g,txt); - - if(typeof bounds.elseText !== 'undefined') { - txt.text = '[ ' + bounds.elseText + ' ]'; - txt.y = bounds.elsey + 1.5 * conf.boxMargin; - svgDraw.drawText(g, txt); - } -}; - /** * Draws a message @@ -344,7 +292,7 @@ module.exports.draw = function (text, id) { case sq.yy.LINETYPE.LOOP_END: loopData = exports.bounds.endLoop(); - exports.drawLoop(diagram, loopData,'loop'); + exports.drawLoop(diagram, loopData,'loop', conf); exports.bounds.bumpVerticalPos(conf.boxMargin); break; case sq.yy.LINETYPE.OPT_START: @@ -355,7 +303,7 @@ module.exports.draw = function (text, id) { case sq.yy.LINETYPE.OPT_END: loopData = exports.bounds.endLoop(); - exports.drawLoop(diagram, loopData, 'opt'); + exports.drawLoop(diagram, loopData, 'opt', conf); exports.bounds.bumpVerticalPos(conf.boxMargin); break; case sq.yy.LINETYPE.ALT_START: @@ -373,7 +321,7 @@ module.exports.draw = function (text, id) { case sq.yy.LINETYPE.ALT_END: loopData = exports.bounds.endLoop(); - exports.drawLoop(diagram, loopData,'alt'); + exports.drawLoop(diagram, loopData,'alt', conf); exports.bounds.bumpVerticalPos(conf.boxMargin); break; default: diff --git a/src/diagrams/sequenceDiagram/svgDraw.js b/src/diagrams/sequenceDiagram/svgDraw.js index 7c2043f4f..c70bc56c1 100644 --- a/src/diagrams/sequenceDiagram/svgDraw.js +++ b/src/diagrams/sequenceDiagram/svgDraw.js @@ -97,6 +97,59 @@ exports.drawActor = function(elem, left,description,conf){ .text(description) ; }; + +/** + * Draws an actor in the diagram with the attaced line + * @param center - The center of the the actor + * @param pos The position if the actor in the list of actors + * @param description The text in the box + */ +exports.drawLoop = function(elem,bounds,labelText, conf){ + var g = elem.append("g"); + var drawLoopLine = function(startx,starty,stopx,stopy){ + g.append("line") + .attr("x1", startx) + .attr("y1", starty) + .attr("x2", stopx ) + .attr("y2", stopy ) + .attr("stroke-width", 2) + .attr("stroke", "#526e52") + .attr('class','loopLine'); + }; + drawLoopLine(bounds.startx, bounds.starty, bounds.stopx , bounds.starty); + drawLoopLine(bounds.stopx , bounds.starty, bounds.stopx , bounds.stopy ); + drawLoopLine(bounds.startx, bounds.stopy , bounds.stopx , bounds.stopy ); + drawLoopLine(bounds.startx, bounds.starty, bounds.startx, bounds.stopy ); + if(typeof bounds.elsey !== 'undefined'){ + drawLoopLine(bounds.startx, bounds.elsey, bounds.stopx, bounds.elsey ); + } + + var txt = exports.getTextObj(); + txt.text = labelText; + txt.x = bounds.startx; + txt.y = bounds.starty; + txt.labelMargin = 1.5 * conf.boxMargin; + txt.class = 'labelText'; + txt.fill = 'white'; + + exports.drawLabel(g,txt); + + txt = exports.getTextObj(); + txt.text = '[ ' + bounds.title + ' ]'; + txt.x = bounds.startx + (bounds.stopx - bounds.startx)/2; + txt.y = bounds.starty + 1.5 * conf.boxMargin; + txt.anchor = 'middle'; + txt.class = 'loopText'; + + exports.drawText(g,txt); + + if(typeof bounds.elseText !== 'undefined') { + txt.text = '[ ' + bounds.elseText + ' ]'; + txt.y = bounds.elsey + 1.5 * conf.boxMargin; + exports.drawText(g, txt); + } +}; + /** * Setup arrow head and define the marker. The result is appended to the svg. */